@viewlift/player-backup 1.0.117-backup → 1.0.119-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 (59) hide show
  1. package/cjs/autoNextVideo-483e9153.js +1 -0
  2. package/cjs/bundle.css +0 -60
  3. package/cjs/{caption-settings-31ef2eca.js → caption-settings-b41710bf.js} +1 -1
  4. package/cjs/{features-01b46d06.js → features-658c8a46.js} +1 -1
  5. package/cjs/generic-a2a5ad78.js +1 -0
  6. package/cjs/index.js +1 -1
  7. package/cjs/{keyboardShortcuts-b0878608.js → keyboardShortcuts-664f0a09.js} +1 -1
  8. package/cjs/{multicam-47b26256.js → multicam-28ad2186.js} +1 -1
  9. package/cjs/{multicamv2-a89af001.js → multicamv2-aa481861.js} +1 -1
  10. package/cjs/{mwebPotraitTray-386929a9.js → mwebPotraitTray-65dfc2de.js} +1 -1
  11. package/cjs/{nextEpisodeButton-4d7f25fc.js → nextEpisodeButton-c4f3d621.js} +1 -1
  12. package/cjs/{playlist-7716973c.js → playlist-91a68d26.js} +1 -1
  13. package/cjs/{renditions-7d87c437.js → renditions-e00ec925.js} +1 -1
  14. package/cjs/{resolution-d80755ba.js → resolution-65c490cf.js} +1 -1
  15. package/cjs/{series-1459b496.js → series-232bf4fd.js} +1 -1
  16. package/cjs/{series-v2-0ffce577.js → series-v2-09adb1a4.js} +1 -1
  17. package/cjs/{series-v2-fd7485a5.js → series-v2-70137d8c.js} +1 -1
  18. package/cjs/{settings-icon-4d195fb7.js → settings-icon-93d87559.js} +1 -1
  19. package/cjs/skin-0c1c1fc7.js +1 -0
  20. package/cjs/{skin-6c644e12.js → skin-142a2c5d.js} +1 -1
  21. package/cjs/{skin-a4c5017b.js → skin-ba9b4442.js} +1 -1
  22. package/cjs/{skin-c8788c6e.js → skin-ce922912.js} +1 -1
  23. package/cjs/{skin-1e978bb9.js → skin-f027a4a1.js} +1 -1
  24. package/cjs/{skin-6a15d59b.js → skin-f46e9286.js} +1 -1
  25. package/cjs/{util-ed4f843b.js → util-abb0e4bb.js} +1 -1
  26. package/cjs/{videoSelector-da3ca816.js → videoSelector-80449ebf.js} +1 -1
  27. package/esm/autoNextVideo-72386267.js +1 -0
  28. package/esm/bundle.css +0 -60
  29. package/esm/{caption-settings-0f86d410.js → caption-settings-10a68378.js} +1 -1
  30. package/esm/{features-c3e4f064.js → features-26a449bf.js} +1 -1
  31. package/esm/generic-d42b8a76.js +1 -0
  32. package/esm/index.js +1 -1
  33. package/esm/{keyboardShortcuts-1c745bdb.js → keyboardShortcuts-9bad5b1e.js} +1 -1
  34. package/esm/{multicam-30f85cb4.js → multicam-a3a95813.js} +1 -1
  35. package/esm/{multicamv2-2f34443b.js → multicamv2-9e651919.js} +1 -1
  36. package/esm/{mwebPotraitTray-40f0a167.js → mwebPotraitTray-a0a61627.js} +1 -1
  37. package/esm/{nextEpisodeButton-f62cf735.js → nextEpisodeButton-ba2c9e06.js} +1 -1
  38. package/esm/{playlist-0bc0de63.js → playlist-2531b9e6.js} +1 -1
  39. package/esm/{renditions-fad105ce.js → renditions-a3821a38.js} +1 -1
  40. package/esm/{resolution-a0de88d0.js → resolution-b1c446fc.js} +1 -1
  41. package/esm/{series-d2e867de.js → series-07624a74.js} +1 -1
  42. package/esm/{series-v2-4cdbf9b1.js → series-v2-0727ee8c.js} +1 -1
  43. package/esm/{series-v2-e1b9ab18.js → series-v2-624e4fd2.js} +1 -1
  44. package/esm/{settings-icon-bcdc332b.js → settings-icon-bcc0a21c.js} +1 -1
  45. package/esm/{skin-ddd08f69.js → skin-002752e0.js} +1 -1
  46. package/esm/{skin-407e8059.js → skin-0707520b.js} +1 -1
  47. package/esm/{skin-8e3a6c8e.js → skin-25101c84.js} +1 -1
  48. package/esm/skin-41dbf549.js +1 -0
  49. package/esm/{skin-2e8c3df2.js → skin-76d61ddb.js} +1 -1
  50. package/esm/{skin-ecbaa04d.js → skin-ff917e75.js} +1 -1
  51. package/esm/{util-aed042c3.js → util-a8fb05bb.js} +1 -1
  52. package/esm/{videoSelector-65caf3a8.js → videoSelector-accf5414.js} +1 -1
  53. package/package.json +1 -1
  54. package/cjs/autoNextVideo-50b90ad3.js +0 -1
  55. package/cjs/generic-a8452cd3.js +0 -1
  56. package/cjs/skin-0805a296.js +0 -1
  57. package/esm/autoNextVideo-b3fc4c59.js +0 -1
  58. package/esm/generic-65eb4fde.js +0 -1
  59. package/esm/skin-5c7de557.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{f as l,e as d,T as s}from"./icons-3e9a1686.js";import{_ as c,$ as u,a0 as p,a1 as m,g as h,Z as v,Q as f}from"./generic-65eb4fde.js";import{g}from"./renditions-fad105ce.js";import{playSelectedResolution as y}from"./resolution-a0de88d0.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(L,E);var N,k,I=(N=L,k=C(),function(){var e,t=o(N);if(k){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function L(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,L),(a=I.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(L,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),r.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),n=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:b("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),l=r.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();r.dom.appendContent(l,s);var c=this.createAudioQualityContainer();r.dom.appendContent(l,c),r.dom.appendContent(a,n),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,o),r.dom.appendContent(o,l),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=h(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=r.dom.createEl("div",{className:"audio-language-container"}),n=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:b("audioLanguageText")||"Audio Language"});r.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=r.dom.createEl("div",{className:"video-quality-container"}),n=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:b("videoQualityText")||"Video Quality"});r.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o,l,d=document.createElement("label"),c=document.createElement("div"),u=document.createElement("div");u.className="video-quality-bitrate-label",c.className="video-quality-holder",d.className="video-quality-label-container",d.setAttribute("for","quality".concat(e));var p=document.createElement("div");p.className="video-quality - ".concat(e);var m=(null==i||null===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),h=document.createTextNode(m),g="".concat(t.isEnhancedBitrate(i[e])?b("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(g);if(u.appendChild(C),p.appendChild(h),(null==i||null===(l=i[e])||void 0===l?void 0:l.height)>=720)for(var E=v("<span class='hd-rendition'> HD </span>");null!=E&&E.firstChild;)p.appendChild(E.firstChild);var N=r.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});N.setAttribute("type","radio"),N.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var k=document.createElement("span");k.className=g?"check-mark center":"check-mark";var I=f(s());k.appendChild(I),c.appendChild(N),c.appendChild(k),c.appendChild(p),r.dom.appendContent(d,c),d.appendChild(u),r.dom.appendContent(a,d)},l=0;l<i.length;l++)o(l);return a}}]),L}();export{N as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{f as l,e as d,T as s}from"./icons-3e9a1686.js";import{_ as c,$ as u,a0 as p,a1 as m,g as h,Z as v,Q as f}from"./generic-d42b8a76.js";import{g}from"./renditions-a3821a38.js";import{playSelectedResolution as y}from"./resolution-b1c446fc.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(L,E);var N,k,I=(N=L,k=C(),function(){var e,t=o(N);if(k){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function L(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,L),(a=I.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(L,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),r.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),n=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:b("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),l=r.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();r.dom.appendContent(l,s);var c=this.createAudioQualityContainer();r.dom.appendContent(l,c),r.dom.appendContent(a,n),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,o),r.dom.appendContent(o,l),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=h(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=r.dom.createEl("div",{className:"audio-language-container"}),n=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:b("audioLanguageText")||"Audio Language"});r.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=r.dom.createEl("div",{className:"video-quality-container"}),n=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:b("videoQualityText")||"Video Quality"});r.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o,l,d=document.createElement("label"),c=document.createElement("div"),u=document.createElement("div");u.className="video-quality-bitrate-label",c.className="video-quality-holder",d.className="video-quality-label-container",d.setAttribute("for","quality".concat(e));var p=document.createElement("div");p.className="video-quality - ".concat(e);var m=(null==i||null===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),h=document.createTextNode(m),g="".concat(t.isEnhancedBitrate(i[e])?b("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(g);if(u.appendChild(C),p.appendChild(h),(null==i||null===(l=i[e])||void 0===l?void 0:l.height)>=720)for(var E=v("<span class='hd-rendition'> HD </span>");null!=E&&E.firstChild;)p.appendChild(E.firstChild);var N=r.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});N.setAttribute("type","radio"),N.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var k=document.createElement("span");k.className=g?"check-mark center":"check-mark";var I=f(s());k.appendChild(I),c.appendChild(N),c.appendChild(k),c.appendChild(p),r.dom.appendContent(d,c),d.appendChild(u),r.dom.appendContent(a,d)},l=0;l<i.length;l++)o(l);return a}}]),L}();export{N as default};
@@ -1 +1 @@
1
- import{b as e,e as t,f as o,g as s,h as n}from"./features-c3e4f064.js";import{i}from"./keyboardShortcuts-1c745bdb.js";import{S as r,M as l,a,N as d,b as m,R as u}from"./icons-3e9a1686.js";import{g as p,a as c,R as v}from"./generic-65eb4fde.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"./renditions-fad105ce.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(b,h){i(b,h),import("./skin-cd537931.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"default",u())}(b,h),function(s,n){var i=p(s),l=(null==n?void 0:n.sres)||null;i.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-f62cf735.js").then((function(e){e.initaliseFunctionality(n.sres.seasons,c())}))})),i.one("loadedmetadata",(function(){var e;l&&(t(s,null==n||null===(e=n.sres)||void 0===e?void 0:e.seasons,n),o(n.sres,n.res,s))}))}(b,h),function(e,t){var o,s,n,i,r=p(e),m=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(m&&(m.style.display="none"),u&&(u.style.display="none"),c&&(c.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(v(l(window.controlsColor))),null===(n=r.controlBar.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(v(a(window.controlsColor)));var b=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(v(d()));var h=document.createElement("div");h.classList.add("caption-header"),b.querySelector(".vjs-menu-content").insertBefore(h,b.querySelector(".vjs-menu-item"))}(b,h)}export{b as initialiseSkin};
1
+ import{b as e,e as t,f as o,g as s,h as n}from"./features-26a449bf.js";import{i}from"./keyboardShortcuts-9bad5b1e.js";import{S as r,M as l,a,N as d,b as m,R as u}from"./icons-3e9a1686.js";import{g as p,a as c,R as v}from"./generic-d42b8a76.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"./renditions-a3821a38.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(b,h){i(b,h),import("./skin-cd537931.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"default",u())}(b,h),function(s,n){var i=p(s),l=(null==n?void 0:n.sres)||null;i.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-ba2c9e06.js").then((function(e){e.initaliseFunctionality(n.sres.seasons,c())}))})),i.one("loadedmetadata",(function(){var e;l&&(t(s,null==n||null===(e=n.sres)||void 0===e?void 0:e.seasons,n),o(n.sres,n.res,s))}))}(b,h),function(e,t){var o,s,n,i,r=p(e),m=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(m&&(m.style.display="none"),u&&(u.style.display="none"),c&&(c.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(v(l(window.controlsColor))),null===(n=r.controlBar.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(v(a(window.controlsColor)));var b=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(v(d()));var h=document.createElement("div");h.classList.add("caption-header"),b.querySelector(".vjs-menu-content").insertBefore(h,b.querySelector(".vjs-menu-item"))}(b,h)}export{b as initialiseSkin};
@@ -1 +1 @@
1
- import{g as e,p as r,n as t}from"./generic-65eb4fde.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function o(e){i(e),n(e)}var n=function(o){var n=e(o),i=document.getElementById("".concat(o));i&&i.addEventListener("touchstart",(function(){n.paused()?r(o):t(o)}))},i=function(r){var t=e(r);t.requestFullscreen=function(){},t.controlBar.hide()};export{o as initaliseSkin};
1
+ import{g as e,p as r,n as t}from"./generic-d42b8a76.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function o(e){i(e),n(e)}var n=function(o){var n=e(o),i=document.getElementById("".concat(o));i&&i.addEventListener("touchstart",(function(){n.paused()?r(o):t(o)}))},i=function(r){var t=e(r);t.requestFullscreen=function(){},t.controlBar.hide()};export{o as initaliseSkin};
@@ -1 +1 @@
1
- import{g as e,Y as r}from"./generic-65eb4fde.js";import{i as t,p as o}from"./features-c3e4f064.js";import{g as i}from"./renditions-fad105ce.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";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"./localisation-0bf399a1.js";function n(n,a){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(o,n){e(o).on("loadeddata",(function(){var e;(null===(e=i(o))||void 0===e?void 0:e.length)>0&&t(o,n),null!=n&&n.disableCaptions&&r(o)}))}(n,a),function(r){var t=e(r);t.controls(!1),o(r)}(n)}export{n as initialiseSkin};
1
+ import{g as e,Y as r}from"./generic-d42b8a76.js";import{i as t,p as o}from"./features-26a449bf.js";import{g as i}from"./renditions-a3821a38.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";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"./localisation-0bf399a1.js";function n(n,a){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(o,n){e(o).on("loadeddata",(function(){var e;(null===(e=i(o))||void 0===e?void 0:e.length)>0&&t(o,n),null!=n&&n.disableCaptions&&r(o)}))}(n,a),function(r){var t=e(r);t.controls(!1),o(r)}(n)}export{n as initialiseSkin};
@@ -0,0 +1 @@
1
+ import{i as e,j as t,k as n,g as r,h as l,d as i,l as o,m as a,n as s,o as u}from"./features-26a449bf.js";import{M as c,a as d,c as m,d as p}from"./icons-3e9a1686.js";import{S as v,g as f,T as h,a as g,x as y,U as x,R as b,d as w}from"./generic-d42b8a76.js";import{g as E}from"./renditions-a3821a38.js";import C from"@babel/runtime/helpers/toConsumableArray";import{s as N}from"./autoNextVideo-72386267.js";import k from"@babel/runtime/helpers/typeof";import j from"video.js";import T from"@babel/runtime/helpers/asyncToGenerator";import B from"@babel/runtime/regenerator";import A from"@babel/runtime/helpers/slicedToArray";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"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"./util-a8fb05bb.js";var M=v(),I=[];null==M||M.map((function(e){return I.push.apply(I,C(e.episodes))}));var L,O,P,R,S=function(e,t){var n=f(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var l=h();N(l,e,I)}};function V(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function X(e){return F.apply(this,arguments)}function F(){return(F=T(B.mark((function e(t){return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],l=t.layout.split("x"),i=A(l,2),o=i[0],a=i[1];n.onload=function(){var l=document.createElement("canvas");l.width=n.width,l.height=n.height,l.getContext("2d").drawImage(n,0,0,l.width,l.height);for(var i=l.width/a,s=l.height/o,u=0;u<o;u++)for(var c=0;c<a;c++){var d=document.createElement("canvas");d.width=i,d.height=s,d.getContext("2d").drawImage(l,c*i,u*s,i,s,0,0,i,s);var m=d.toDataURL("image/png");r.push({uri:m,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return D.apply(this,arguments)}function D(){return(D=T(B.mark((function e(t){var n,r;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",V(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function G(e){return W.apply(this,arguments)}function W(){return(W=T(B.mark((function e(t){var n,r;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return X(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n=e.duration;r[n*t]={src:e.uri,style:{left:"-60px",height:"85px",width:"130px"}}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}L={0:{src:"example-thumbnail.png"}},O=function e(){var t,n,r,l,i;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(i in l=t[r])l.hasOwnProperty(i)&&("object"===k(l[i])?n[i]=e(n[i],l[i]):n[i]=l[i]);return n},P=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},R=function e(t){return"HTML"!==t.nodeName&&"static"===P(t)("position")?e(t.offsetParent):t},j.registerPlugin("thumbnails",(function(e){var t,n,r,l,i,o,a,s;n=O({},L,e),l=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=l.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",O(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=l.duration(),l.on("durationchange",(function(e){o=l.duration()})),l.on("loadedmetadata",(function(e){o=l.duration()})),(i=l.controlBar.progressControl).el().appendChild(t),a=function(e){var l,a,s,u,c,d,m,p,v,f;for(a in s=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,m=((f=R(i.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),u=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,u-=R(i.el()).getBoundingClientRect().left+v,l=Math.floor((u-i.el().offsetLeft)/i.width()*o),n)l>a&&(s=Math.max(s,a));(c=n[s]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&O(r.style,c.style),u+(p=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=P(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>m?u-=u+p-m:u<p&&(u=p),t.style.left=u+"px"},i.on("mousemove",a),i.on("touchmove",a),s=function(e){t.style.left="-1000px"},i.on("mouseout",s),i.on("touchcancel",s),i.on("touchend",s),l.on("userinactive",s)}));var $=function(){var e=T(B.mark((function e(t,n){var r,l,i,o;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return l=e.sent,i=l.split("\n"),o=[],i.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&i[n-1].includes("#EXT-X-TILES")&&(i[n-1]=i[n-1].split(","),r.uri=t+e,i[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=A(t,2),l=n[0],i=n[1];l=l.toLowerCase(),r[l]=i}))})),o.push(r))})),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function _(e){return z.apply(this,arguments)}function z(){return(z=T(B.mark((function e(t){var n,r,l,i,o,a,s,u,c,d,m,p,v,f,h,y,x,b,w,E,C,N;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return i=e.sent,e.next=7,i.text();case 7:o=e.sent,a=new DOMParser,s=a.parseFromString(o,"application/xml"),u=null===(r=g())||void 0===r||null===(l=r.video)||void 0===l?void 0:l.runtime,c=s.getElementsByTagName("AdaptationSet"),d=0;case 13:if(!(d<c.length)){e.next=34;break}if("image"!==(m=c[d]).getAttribute("contentType")||"image/png"!==m.getAttribute("mimeType")){e.next=31;break}if(p=m.getElementsByTagName("SegmentTemplate")[0],v=m.getElementsByTagName("Representation")[0],f=v.getElementsByTagName("EssentialProperty")[0],h=f.getAttribute("value"),!p){e.next=31;break}for(p.getAttribute("media"),y=p.getAttribute("duration"),x=p.getAttribute("timescale"),b=y/x,w=Math.round(u/b),E=Math.ceil(w/9),C=p.getAttribute("media"),N=[],d=0;d<E;d++)N.push({duration:b,layout:h,uri:n+"/"+C.replace("$Number$",d)});return e.abrupt("return",N);case 31:d++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function H(){return(H=T(B.mark((function e(t){var n,r,l,i,o,a,s,u,c,d,m,p,v,h,g,y,x,b,w,E,C;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=f(t),r=n.currentSource(),null==(l=r.src)||!l.includes("m3u8")){e.next=18;break}return e.next=5,U(l);case 5:if(!((null==(i=e.sent)?void 0:i.length)>0)){e.next=16;break}return g=(null==i?void 0:i[0])||null,y=g.uri,x=(null==n||null===(o=n.tech())||void 0===o||null===(a=o.vhs)||void 0===a||null===(s=a.playlists)||void 0===s||null===(u=s.master)||void 0===u||null===(c=u.uri)||void 0===c?void 0:c.substring(0,null==n||null===(d=n.tech())||void 0===d||null===(m=d.vhs)||void 0===m||null===(p=m.playlists)||void 0===p||null===(v=p.master)||void 0===v||null===(h=v.uri)||void 0===h?void 0:h.lastIndexOf("/")))+"/",e.next=11,$(x,y);case 11:return b=e.sent,e.next=14,G(b);case 14:w=e.sent,n.thumbnails(w);case 16:e.next=27;break;case 18:if(null==l||!l.includes("mpd")){e.next=27;break}return e.next=21,_(l);case 21:if(!((null==(E=e.sent)?void 0:E.length)>0)){e.next=27;break}return e.next=25,G(E);case 25:C=e.sent,n.thumbnails(C);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(r,l){var i=f(r);i&&(i.on("loadeddata",(function(){var n,o,a;(null===(n=E(r))||void 0===n?void 0:n.length)>0&&e(r,l),(null===(o=y(r))||void 0===o?void 0:o.length)>0&&t(r,l),null!=l&&null!==(a=l.series)&&void 0!==a&&a.enable&&function(e,t){var n;null==t||null===(n=t.series)||void 0===n||n.cb;var r=f(e);r.on("timeupdate",(function(){var e,t=Math.floor(r.currentTime()),n=r.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];n-t<=10&&h()<=(null==I?void 0:I.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}));var l,i=I.filter((function(e,t){return t==h()}));if((null==i?void 0:i.length)>0)if(null!==(l=document.getElementsByClassName("next-ep-preview"))&&void 0!==l&&l[0]){var o,a,s,u,c,d,m,p,v,g,y;(null===(o=document.getElementsByClassName("next-ep-preview"))||void 0===o?void 0:o[0]).style.visibility="hidden";var x=null===(a=document.getElementsByClassName("next-ep-title"))||void 0===a?void 0:a[0],b=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],w=null===(u=document.getElementsByClassName("next-ep-content"))||void 0===u?void 0:u[0],E=null===(c=i[0])||void 0===c?void 0:c.title;(null===(d=E)||void 0===d?void 0:d.length)>60&&(E=E.substr(0,60)+"..."),x.textContent="".concat(E),b.src=(null===(m=i[0])||void 0===m||null===(p=m.gist)||void 0===p||null===(v=p.imageGist)||void 0===v?void 0:v.r16x9)||(null===(g=window)||void 0===g||null===(y=g.customData)||void 0===y?void 0:y.fallbackImage),w.onclick=function(){return S(e)}}else{var C,N,k,j,T,B,A,M=document.createElement("div");M.className="next-ep-preview",M.style.visibility="hidden",document.getElementById(e).append(M);var L=document.createElement("div");L.className="next-ep-header",L.textContent="Next up";var O=null===(C=i[0])||void 0===C?void 0:C.title,P=document.createElement("img");P.className="next-ep-img",P.src=(null===(N=i[0])||void 0===N||null===(k=N.gist)||void 0===k||null===(j=k.imageGist)||void 0===j?void 0:j.r16x9)||(null===(T=window)||void 0===T||null===(B=T.customData)||void 0===B?void 0:B.fallbackImage);var R=document.createElement("div");R.className="next-ep-title",(null===(A=O)||void 0===A?void 0:A.length)>60&&(O=O.substr(0,60)+"..."),R.textContent="".concat(O);var V=document.createElement("div");V.className="next-ep-content",V.append(P),V.append(R),V.onclick=function(){return S(e)},M.append(L),M.append(V)}}(r,l),function(e,t){var n,r=Math.floor(e/60),l=null===(n=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===n?void 0:n[0];l&&(l.style.marginRight=r>60?"56px":"41px");var i=document.getElementsByClassName("vjs-live-control")[0],o=document.getElementsByClassName("vjs-time-control");t&&i.classList.value.includes("vjs-hidden")&&(o[0].style.display="block",l&&(l.style.marginRight="56px"))}(i.duration(),(null==l?void 0:l.liveVideo)||!1),null!=l&&l.liveVideo||x()||function(e){H.apply(this,arguments)}(r)})),i.one("play",(function(){var e,t,l,i;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&n(r,null===(l=window)||void 0===l||null===(i=l.customData)||void 0===i?void 0:i.iframeOverlayUrl)})))}function q(e,t){!function(){"Chrome"==w()&&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-fbc45594.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),Y(e,t),function(e,t){var n,r,l,i,o,a,s=f(e);null==s||null===(n=s.controlBar)||void 0===n||null===(r=n.getChild("FullscreenToggle"))||void 0===r||null===(l=r.el())||void 0===l||l.appendChild(b(c(window.controlsColor))),null==s||null===(i=s.controlBar)||void 0===i||null===(o=i.getChild("FullscreenToggle"))||void 0===o||null===(a=o.el())||void 0===a||a.appendChild(b(d(window.controlsColor)));var u=document.getElementsByClassName("vjs-time-control");t.liveVideo&&u[0]&&(u[0].style.display="none")}(e,t),function(e,t){var n,c,d,v,f,h;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&r(e,"defaultV2",m());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&l(e,"defaultV2",p());t.liveVideo||i(e);(null==t||null===(n=t.relatedVideos)||void 0===n||null===(c=n.content)||void 0===c?void 0:c.length)>0&&o(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&a(e,null==t?void 0:t.streams);(null==t||null===(v=t.playlist)||void 0===v||null===(f=v.content)||void 0===f?void 0:f.length)>0&&s(e,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&u(e,t)}(e,t),function(e,t){var n=f(e),r=null==t?void 0:t.tvProviderLogoUrl;if(!r)return;var l=document.createElement("div");l.className="tvProviderImage";var i=document.createElement("img");i.src="".concat(r),i.alt="Provider Image",l.append(i),n.el().appendChild(l),n.on("useractive",(function(){l.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||l.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"}))}(e,t)}export{q as initialiseSkin};
@@ -1 +1 @@
1
- import{a as e,b as t,c as n,d as o}from"./features-c3e4f064.js";import{M as s,a as r,S as l,N as a}from"./icons-3e9a1686.js";import{g as i,d as c,R as u}from"./generic-65eb4fde.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-1c745bdb.js";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"./renditions-fad105ce.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(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 v(o,a){var m=i(o);m.one("play",(function(){var t,n,l,i;null!=a&&a.streams&&e(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a)),null!=a&&a.airplay&&"Safari"==c()&&m.addChild("airPlayButton"),null!=a&&a.chromecastReceiverId&&m.addChild("chromecastButton"),m.addChild("FullscreenToggle"),null===(t=m.getChild("FullscreenToggle"))||void 0===t||null===(n=t.el())||void 0===n||n.appendChild(u(s(window.controlsColor))),null===(l=m.getChild("FullscreenToggle"))||void 0===l||null===(i=l.el())||void 0===i||i.appendChild(u(r(window.controlsColor))),h(o)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&t(o,"live",l())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&n(o,a)}))}function f(e,t){var n;m(e,t),(null==(n=t)||!n.liveui)&&(null==n||!n.liveVideo)||null!=n&&n.liveui&&null!=n&&n.liveVideo?import("./dvr_skin-9cc1b144.js").then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):import("./nondvr_skin-64be70e5.js").then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e){o(e)}(e),function(e,t){var n=i(e),o=n.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(a()));var s=document.createElement("div");s.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(s,o.querySelector(".vjs-menu-item"));var r=document.createElement("div");if(r.innerText="Captions",r.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(r),"Safari"==c()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,t),v(e,t)}var b;function h(e){var t=i(e);g(),t.on("pause",(function(){clearTimeout(b),y()})),t.on("play",(function(){g()}));var n=document.getElementById("".concat(e));n.addEventListener("mouseenter",(function(){y(),t.paused()||g()})),n.addEventListener("touchstart",(function(){y(),g()})),n.addEventListener("mousemove",(function(){y(),t.paused()||g()}))}function y(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function g(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-fullscreen-control")[0],n=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(b),b=setTimeout((function(){null==e||e.classList.add("hideoutsidecontrols"),null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols")}),2200)}export{h as hideControls,f as initialiseSkin};
1
+ import{a as e,b as t,c as n,d as o}from"./features-26a449bf.js";import{M as s,a as r,S as l,N as a}from"./icons-3e9a1686.js";import{g as i,d as c,R as u}from"./generic-d42b8a76.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-9bad5b1e.js";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"./renditions-a3821a38.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(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 v(o,a){var m=i(o);m.one("play",(function(){var t,n,l,i;null!=a&&a.streams&&e(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a)),null!=a&&a.airplay&&"Safari"==c()&&m.addChild("airPlayButton"),null!=a&&a.chromecastReceiverId&&m.addChild("chromecastButton"),m.addChild("FullscreenToggle"),null===(t=m.getChild("FullscreenToggle"))||void 0===t||null===(n=t.el())||void 0===n||n.appendChild(u(s(window.controlsColor))),null===(l=m.getChild("FullscreenToggle"))||void 0===l||null===(i=l.el())||void 0===i||i.appendChild(u(r(window.controlsColor))),h(o)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&t(o,"live",l())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&n(o,a)}))}function f(e,t){var n;m(e,t),(null==(n=t)||!n.liveui)&&(null==n||!n.liveVideo)||null!=n&&n.liveui&&null!=n&&n.liveVideo?import("./dvr_skin-9cc1b144.js").then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):import("./nondvr_skin-64be70e5.js").then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e){o(e)}(e),function(e,t){var n=i(e),o=n.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(a()));var s=document.createElement("div");s.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(s,o.querySelector(".vjs-menu-item"));var r=document.createElement("div");if(r.innerText="Captions",r.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(r),"Safari"==c()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,t),v(e,t)}var b;function h(e){var t=i(e);g(),t.on("pause",(function(){clearTimeout(b),y()})),t.on("play",(function(){g()}));var n=document.getElementById("".concat(e));n.addEventListener("mouseenter",(function(){y(),t.paused()||g()})),n.addEventListener("touchstart",(function(){y(),g()})),n.addEventListener("mousemove",(function(){y(),t.paused()||g()}))}function y(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function g(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-fullscreen-control")[0],n=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(b),b=setTimeout((function(){null==e||e.classList.add("hideoutsidecontrols"),null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols")}),2200)}export{h as hideControls,f as initialiseSkin};
@@ -1 +1 @@
1
- import{g as e,p as t,n as r}from"./generic-65eb4fde.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function n(n){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),o(),function(n){var o=document.getElementById("".concat(n)),a=e(n);o&&o.addEventListener("touchstart",(function(){a.paused()?t(n):r(n)}))}(n)}var o=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{n as initaliseSkin};
1
+ import{g as e,p as t,n as r}from"./generic-d42b8a76.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function n(n){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),o(),function(n){var o=document.getElementById("".concat(n)),a=e(n);o&&o.addEventListener("touchstart",(function(){a.paused()?t(n):r(n)}))}(n)}var o=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{n as initaliseSkin};
@@ -1 +1 @@
1
- import{g as t}from"./generic-65eb4fde.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{g as t}from"./generic-d42b8a76.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/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as r,e as l}from"./icons-3e9a1686.js";import{_ as s,$ as d,a0 as c,a1 as m,V as u,q as p,X as v}from"./generic-65eb4fde.js";import{a as h}from"./autoNextVideo-b3fc4c59.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-aed042c3.js";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y=i.getComponent("Component"),g=function(){o(E,y);var g,C,N=(g=E,C=b(),function(){var e,t=a(g);if(C){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function E(t){var o,n,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(a=N.call(this,t,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=i.related.content,a.cb=(null==i||null===(o=i.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==i||null===(n=i.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(v(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(E,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return i.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,t=this.el(),o=i.dom.createEl("div",{className:"video-selection-container hidden"});i.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(s(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",d(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var a=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(a),i.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),c(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=i.dom.createEl("div",{className:"video-selector-head"}),a=i.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});a.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=i.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),s=i.dom.createEl("div",{className:"video-selector-content"}),d=i.dom.createEl("div",{className:"video-container"}),c=function(e){var o,n,a,r,l,c=i.dom.createEl("div",{className:"video -".concat(e)}),m=i.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){v(e+1);for(var o=i.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";u(e),p(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(a=window)||void 0===a||null===(r=a.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",m.append(h);var f=i.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});i.dom.appendContent(c,m),i.dom.appendContent(c,f),i.dom.appendContent(d,c),i.dom.appendContent(s,d)},h=0;h<this.videos.length;h++)c(h);i.dom.appendContent(n,a),i.dom.appendContent(n,r),i.dom.appendContent(e,n),i.dom.appendContent(e,s),m(this.playerId,e)}}]),E}();export{g as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as r,e as l}from"./icons-3e9a1686.js";import{_ as s,$ as d,a0 as c,a1 as m,V as u,q as p,X as v}from"./generic-d42b8a76.js";import{a as h}from"./autoNextVideo-72386267.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-a8fb05bb.js";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y=i.getComponent("Component"),g=function(){o(E,y);var g,C,N=(g=E,C=b(),function(){var e,t=a(g);if(C){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function E(t){var o,n,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(a=N.call(this,t,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=i.related.content,a.cb=(null==i||null===(o=i.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==i||null===(n=i.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(v(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(E,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return i.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,t=this.el(),o=i.dom.createEl("div",{className:"video-selection-container hidden"});i.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(s(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",d(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var a=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(a),i.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),c(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=i.dom.createEl("div",{className:"video-selector-head"}),a=i.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});a.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=i.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),s=i.dom.createEl("div",{className:"video-selector-content"}),d=i.dom.createEl("div",{className:"video-container"}),c=function(e){var o,n,a,r,l,c=i.dom.createEl("div",{className:"video -".concat(e)}),m=i.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){v(e+1);for(var o=i.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";u(e),p(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(a=window)||void 0===a||null===(r=a.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",m.append(h);var f=i.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});i.dom.appendContent(c,m),i.dom.appendContent(c,f),i.dom.appendContent(d,c),i.dom.appendContent(s,d)},h=0;h<this.videos.length;h++)c(h);i.dom.appendContent(n,a),i.dom.appendContent(n,r),i.dom.appendContent(e,n),i.dom.appendContent(e,s),m(this.playerId,e)}}]),E}();export{g as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "1.0.117-backup",
3
+ "version": "1.0.119-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "amdName": "_playerCore",
6
6
  "dependencies": {
@@ -1 +0,0 @@
1
- "use strict";var e,i=require("./generic-a8452cd3.js"),t=require("./util-ed4f843b.js"),n=0,o=0,u=function e(t,n,u,c){o=t,t>u.length-1||(i.setVideoIdx(o+1),i.load(n,u[t].id).then((function(e){i.highlightVideo(o),o++,d(e)})).catch((function(t){d(t),setTimeout((function(){i.highlightVideo(o),o++,e(o,n,u)}),5e3)})))},d=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(n);var r=null==c?void 0:c.content;e=null==c?void 0:c.cb;var h=c.playerId;t.onVideoEnded(h,(function(){var e=i.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((o=i.getVideoIdx())>r.length-1||(i.setVideoIdx(o+1),i.load(h,r[o].id).then((function(e){i.highlightVideo(o),i.setCurrentVideo(e.response),o++,d(e)})).catch((function(e){d(e),i.highlightVideo(o),o++,n=setTimeout((function(){i.isPaused(h)&&u(o,h,r)}),5e3)}))))}))},exports.switchToNext=u;
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("js-cookie"),a=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),d={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 u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e,t){u("event",e,t)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function v(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?c(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var m={name:"@viewlift/player",version:"1.0.116",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"}};window.vl_player_version=m.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:_(),params:v({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:t,"Sdk-Version":m.version},withCredentials:!0})},f=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:O()+d.getLinearChannelDetails,params:v(v(v(v(v({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},w=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:y(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:b(),method:"POST",headers:{Authorization:r},data:v({},t),params:v({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:E(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:T(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},I=function(e){return O()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},h=function(){return O()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},E=function(e){return O()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},T=function(e,t){return O()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},y=function(){return O()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},b=function(){return O()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},_=function(){var e,t,n,i,o=O()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},O=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},D=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},x=null;function S(){return{set:function(e){e&&(x=e)},get:function(){return x}}}var F,P,V,A,C,L,R=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S().get(),i=O(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,N=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!D(t)){e.next=6;break}return W||(W=R().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&S().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(e){P=e},B=function(){return P},M=function(){return F},j=function(e){V=e},H=function(e){if(A){var t=A.get(e);j(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function G(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?z(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var q=function(){var e,t,n,i,o,r,a,l=B();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function J(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function X(){return K.apply(this,arguments)}function K(){return(K=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=Y(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());s(r?"FAILED_TO_START":"DROPPED_STREAM",G({pfm:window.platform,uid:J(),vid:q(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),s("PLAY",G({pfm:window.platform,uid:J(),vid:q(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))s("BUFFERING",G({pfm:window.platform,uid:J(),vid:q(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,s("FIRST_FRAME",G({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),vid:q()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;s("AD_REQUEST",G({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),vid:q(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),s("AD_IMPRESSION",G({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:q()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(Q(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var Q=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=G,e.t1=G,e.t2=G({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=J(),e.t5=q(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=20,X();case 20:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,N();case 37:p=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:p},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Z=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 i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},$=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ee=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"},te=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ie(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ne(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var oe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},re=function(e){var t=ae(e,"video.tags",[]),n=ae(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ae=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},le=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,p,f,w,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,h=arguments.length>2?arguments[2]:void 0,E=(null==h?void 0:h.contentType)||"video",T=null==h||null===(e=h[E])||void 0===e?void 0:e.metadata,y=De(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===E?null==h||null===(t=h.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==h?void 0:h.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ae(h,"video.gist.id",""),x=ie(ie({},se(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:oe(O,_),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===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ae(h,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:re(h),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ae(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+ae(h,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ae(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ae(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(p=m.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:ae(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ae(h,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ae(h,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ue(),VIEWLIFT_SEASON_NUMBER:de(),VIEWLIFT_CONTENT_TAGS:re(h)},null===(f=window)||void 0===f||null===(w=f.customData)||void 0===w?void 0:w.macros);for(var S in x){var F=new RegExp(S,"g");g=g.replace(F,x[S])}return g},de=function(){var e=U.get();return e>=0?e+1:1},ue=function(){var e,t,n,i=M(),o=B(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},se=function(e){var t,n,i,o,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 u=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(te()?u?l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=te()?ie(ie({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):ie(ie({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=te()?ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},ce=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[f])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[f])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[f])||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.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return me(I);if(w){var T=pe(g,t);return T.src=le(T.src,t,e),T}if("Safari"!==ee()&&E)return ve(g);if(h){var y=me(g);return y.src=le(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=le(b.src,t,e),b}return null},ve=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},me=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},pe=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=ee();if(De(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return fe(t),l}var d,u={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(fe(t),u.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.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 fe=function(e){var t=De(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},we=function(e){var t=De(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},ge=function(e,t){var n=De(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})}))},Ie=!1,he=function(e,t,n){var i=le(t,e,n),o=De(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=De(e);if(null!==r.el_){Ie=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Ie&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!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",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ee=["live","carousel","V2","defaultV2","multiplayer","minimalist"],Te=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},ye="",be=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Oe=function(e){return!!i.getPlayer("".concat(e))},De=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},xe=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,N();case 3:return r=e.sent,a=De(t),e.abrupt("return",new Promise((function(e,n){f(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=Y(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ce(r,t);k(r),l&&o?(Pe(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Se=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:return d=e.sent,(M()||null)&&H(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&g(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,p,f,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;k(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);I&&he(t,I,w);var h=ce(w,t);if(h){var E,T,y,b,_,O,D,x,S,F,P,V,A,C,L=(null==w||null===(E=w.video)||void 0===E||null===(T=E.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),R=De(t);if(R.poster(L),Pe(t,h),R.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),R.on("loadeddata",(function(){$(),e({status:!0,msg:"Video Loaded",response:w})})),R.one("play",(function(){u&&s<95&&setTimeout((function(){R.currentTime(u)}),0)})),R.one("error",(function(){var e;n({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(x=D.closedCaptions)||void 0===x?void 0:x.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(F=S.closedCaptions)||void 0===F?void 0:F.length)>0)P=((null==w||null===(V=w.video)||void 0===V||null===(A=V.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==w||null===(C=w.video)||void 0===C?void 0:C.closedCaptions)).filter((function(e){return"VTT"===e.format})),ge(t,P);else we(t)}else Z(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Ve(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Fe=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()},Pe=function(e,t){var n=De(e);n&&n.src(t)},Ve=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Oe(n)&&Z(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.addCaptions=ge,exports.authenticateLC=xe,exports.clearError=$,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 Te(e)},exports.createIdxMapping=function(e){A=new Map,e.map((function(e,t){A.set(e.id,t)}))},exports.detectBrowser=ee,exports.detectOrientationChange=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&ye!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),ye=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},exports.disableCaptions=function(e,t){for(var n=De(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=De(e);if(Fe(),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){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=De(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},exports.getCaptions=function(e){var t,n=De(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=M,exports.getCurrentVideo=B,exports.getEntitlementData=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getLinearChannelDetails=f,exports.getPlayer=De,exports.getSeriesDetails=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:O()+"/v3/content/series/".concat(e),params:{site:a},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 o({method:"GET",url:h(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:I(i),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return C},exports.getSource=ce,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getVideoDetails=p,exports.getVideoIdx=function(){return V},exports.getVideoInfo=g,exports.handleDrawerResizing=function(e,t){var n,i=De(e),o=De(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){be(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){be(e,t)}),50)}))},exports.handleError=Z,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=he,exports.initiateErrorHandling=Ve,exports.isMobile=te,exports.isNotAValidSkin=function(e){return!Ee.includes(e)},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=Oe,exports.isTokenExpired=D,exports.load=Se,exports.loadVideo=Pe,exports.loadVideoInstantly=function(e,t,n){var i=De(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=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=Te,exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=S,exports.removeCaptions=we,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)},exports.saveWatchHistory=w,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=k,exports.setSeriesWatchMap=function(e){C=e},exports.setUpdatedElHeight=be,exports.setVideoIdx=j,exports.setVideoIdxById=H,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./features-01b46d06.js"),t=require("./icons-515b2da0.js"),n=require("./generic-a8452cd3.js"),r=require("./renditions-7d87c437.js"),i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./autoNextVideo-50b90ad3.js"),o=require("@babel/runtime/helpers/typeof"),a=require("video.js"),u=require("@babel/runtime/helpers/asyncToGenerator"),s=require("@babel/runtime/regenerator"),d=require("@babel/runtime/helpers/slicedToArray");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("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-ed4f843b.js");var c,v,p,m,f=[],h=function(e,t){var r=n.getPlayer(e),i=Math.floor(r.currentTime());if(Math.floor(r.duration())!=i){r.pause(e);var o=n.getVideoIdx();l.switchToNext(o,e,f)}};function g(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function y(e){return x.apply(this,arguments)}function x(){return(x=u(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),l=d(i,2),o=l[0],a=l[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var l=i.width/a,u=i.height/o,s=0;s<o;s++)for(var d=0;d<a;d++){var c=document.createElement("canvas");c.width=l,c.height=u,c.getContext("2d").drawImage(i,d*l,s*u,l,u,0,0,l,u);var v=c.toDataURL("image/png");r.push({uri:v,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return w.apply(this,arguments)}function w(){return(w=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",g(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function C(e){return E.apply(this,arguments)}function E(){return(E=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return y(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n=e.duration;r[n*t]={src:e.uri,style:{left:"-60px",height:"85px",width:"130px"}}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}c={0:{src:"example-thumbnail.png"}},v=function e(){var t,n,r,i,l;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[r])i.hasOwnProperty(l)&&("object"===o(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},p=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===p(t)("position")?e(t.offsetParent):t},a.registerPlugin("thumbnails",(function(e){var t,n,r,i,l,o,a,u;n=v({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",v(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",(function(e){o=i.duration()})),i.on("loadedmetadata",(function(e){o=i.duration()})),(l=i.controlBar.progressControl).el().appendChild(t),a=function(e){var i,a,u,s,d,c,f,h,g,y;for(a in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=m(l.el()).getBoundingClientRect()).width||y.right)+g,c=e.pageX,e.changedTouches&&(c=e.changedTouches[0].pageX),s=c||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=m(l.el()).getBoundingClientRect().left+g,i=Math.floor((s-l.el().offsetLeft)/l.width()*o),n)i>a&&(u=Math.max(u,a));(d=n[u]).src&&r.src!=d.src&&(r.src=d.src),d.style&&r.style!=d.style&&v(r.style,d.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=p(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,d.width||n[0].width)/2)>f?s-=s+h-f:s<h&&(s=h),t.style.left=s+"px"},l.on("mousemove",a),l.on("touchmove",a),u=function(e){t.style.left="-1000px"},l.on("mouseout",u),l.on("touchcancel",u),l.on("touchend",u),i.on("userinactive",u)}));var k=function(){var e=u(s.mark((function e(t,n){var r,i,l,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,l=i.split("\n"),o=[],l.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&l[n-1].includes("#EXT-X-TILES")&&(l[n-1]=l[n-1].split(","),r.uri=t+e,l[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=d(t,2),i=n[0],l=n[1];i=i.toLowerCase(),r[i]=l}))})),o.push(r))})),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function N(e){return B.apply(this,arguments)}function B(){return(B=u(s.mark((function e(t){var r,i,l,o,a,u,d,c,v,p,m,f,h,g,y,x,b,w,C,E,k,N;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return o=e.sent,e.next=7,o.text();case 7:a=e.sent,u=new DOMParser,d=u.parseFromString(a,"application/xml"),c=null===(i=n.getCurrentVideo())||void 0===i||null===(l=i.video)||void 0===l?void 0:l.runtime,v=d.getElementsByTagName("AdaptationSet"),p=0;case 13:if(!(p<v.length)){e.next=34;break}if("image"!==(m=v[p]).getAttribute("contentType")||"image/png"!==m.getAttribute("mimeType")){e.next=31;break}if(f=m.getElementsByTagName("SegmentTemplate")[0],h=m.getElementsByTagName("Representation")[0],g=h.getElementsByTagName("EssentialProperty")[0],y=g.getAttribute("value"),!f){e.next=31;break}for(f.getAttribute("media"),x=f.getAttribute("duration"),b=f.getAttribute("timescale"),w=x/b,C=Math.round(c/w),E=Math.ceil(C/9),k=f.getAttribute("media"),N=[],p=0;p<E;p++)N.push({duration:w,layout:y,uri:r+"/"+k.replace("$Number$",p)});return e.abrupt("return",N);case 31:p++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function j(){return(j=u(s.mark((function e(t){var r,i,l,o,a,u,d,c,v,p,m,f,h,g,y,x,w,E,B,j,S;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.getPlayer(t),i=r.currentSource(),null==(l=i.src)||!l.includes("m3u8")){e.next=18;break}return e.next=5,b(l);case 5:if(!((null==(o=e.sent)?void 0:o.length)>0)){e.next=16;break}return y=(null==o?void 0:o[0])||null,x=y.uri,w=(null==r||null===(a=r.tech())||void 0===a||null===(u=a.vhs)||void 0===u||null===(d=u.playlists)||void 0===d||null===(c=d.master)||void 0===c||null===(v=c.uri)||void 0===v?void 0:v.substring(0,null==r||null===(p=r.tech())||void 0===p||null===(m=p.vhs)||void 0===m||null===(f=m.playlists)||void 0===f||null===(h=f.master)||void 0===h||null===(g=h.uri)||void 0===g?void 0:g.lastIndexOf("/")))+"/",e.next=11,k(w,x);case 11:return E=e.sent,e.next=14,C(E);case 14:B=e.sent,r.thumbnails(B);case 16:e.next=27;break;case 18:if(null==l||!l.includes("mpd")){e.next=27;break}return e.next=21,N(l);case 21:if(!((null==(j=e.sent)?void 0:j.length)>0)){e.next=27;break}return e.next=25,C(j);case 25:S=e.sent,r.thumbnails(S);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(t,l){var o=n.getPlayer(t);o&&(o.on("loadeddata",(function(){var a,u,s,d,c,v,p;(null===(a=r.getRenditions(t))||void 0===a?void 0:a.length)>0&&e.addSettingsButtonV2(t,l),(null===(u=n.getCaptions(t))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(t,l),(null!=l&&null!==(s=l.series)&&void 0!==s&&s.enable||null!==(d=window)&&void 0!==d&&null!==(c=d.app_data)&&void 0!==c&&null!==(v=c.appcmsMain)&&void 0!==v&&null!==(p=v.features)&&void 0!==p&&p.auto_play)&&function(e,t){var r;if(null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable){var l;f=[];var o=n.getCurrentSeries();null==o||o.map((function(e){var t;return(t=f).push.apply(t,i(e.episodes))})),null==t||null===(l=t.series)||void 0===l||l.cb}else{var a,u;f=null==t||null===(a=t.relatedVideos)||void 0===a?void 0:a.content,null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var s=n.getPlayer(e);s.on("timeupdate",(function(){var e,t,r=Math.floor(s.currentTime()),i=s.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n.getVideoIdx()<=(null===(t=f)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}));var d,c=f.filter((function(e,t){return t==n.getVideoIdx()}));if((null==c?void 0:c.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,p,m,g,y,x,b,w,C,E,k,N;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var B=null===(p=document.getElementsByClassName("next-ep-title"))||void 0===p?void 0:p[0],j=null===(m=document.getElementsByClassName("next-ep-img"))||void 0===m?void 0:m[0],S=null===(g=document.getElementsByClassName("next-ep-content"))||void 0===g?void 0:g[0],q=null===(y=c[0])||void 0===y?void 0:y.title;(null===(x=q)||void 0===x?void 0:x.length)>60&&(q=q.substr(0,60)+"..."),B.textContent="".concat(q),j.src=(null===(b=c[0])||void 0===b||null===(w=b.gist)||void 0===w||null===(C=w.imageGist)||void 0===C?void 0:C.r16x9)||(null==c||null===(E=c[0])||void 0===E?void 0:E.img)||(null===(k=window)||void 0===k||null===(N=k.customData)||void 0===N?void 0:N.fallbackImage),S.onclick=function(){return h(e)}}else{var T,M,P,V,I,O,A,L,R=document.createElement("div");R.className="next-ep-preview",R.style.visibility="hidden",document.getElementById(e).append(R);var X=document.createElement("div");X.className="next-ep-header",X.textContent="Next up";var F=null===(T=c[0])||void 0===T?void 0:T.title,D=document.createElement("img");D.className="next-ep-img",D.src=(null===(M=c[0])||void 0===M||null===(P=M.gist)||void 0===P||null===(V=P.imageGist)||void 0===V?void 0:V.r16x9)||(null==c||null===(I=c[0])||void 0===I?void 0:I.img)||(null===(O=window)||void 0===O||null===(A=O.customData)||void 0===A?void 0:A.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(L=F)||void 0===L?void 0:L.length)>60&&(F=F.substr(0,60)+"..."),U.textContent="".concat(F);var G=document.createElement("div");G.className="next-ep-content",G.append(D),G.append(U),G.onclick=function(){return h(e)},R.append(X),R.append(G)}}(t,l),function(e,t){var n,r=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=r>60?"56px":"41px");var l=document.getElementsByClassName("vjs-live-control")[0],o=document.getElementsByClassName("vjs-time-control");t&&l.classList.value.includes("vjs-hidden")&&(o[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==l?void 0:l.liveVideo)||!1),null!=l&&l.liveVideo||n.isMobile()||function(e){j.apply(this,arguments)}(t)})),o.one("play",(function(){var n,r,i,l;null!==(n=window)&&void 0!==n&&null!==(r=n.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.iframeOverlayUrl)})))}exports.initialiseSkin=function(r,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-c66e9b42.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),S(r,i),function(e,r){var i,l,o,a,u,s,d=n.getPlayer(e);null==d||null===(i=d.controlBar)||void 0===i||null===(l=i.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),null==d||null===(a=d.controlBar)||void 0===a||null===(u=a.getChild("FullscreenToggle"))||void 0===u||null===(s=u.el())||void 0===s||s.appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var c=document.getElementsByClassName("vjs-time-control");r.liveVideo&&c[0]&&(c[0].style.display="none")}(r,i),function(n,r){var i,l,o,a,u,s;0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(n,"defaultV2",t.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(n,"defaultV2",t.RewindSvgV2());r.liveVideo||e.addSlowMotion(n);(null==r||null===(i=r.relatedVideos)||void 0===i||null===(l=i.content)||void 0===l?void 0:l.length)>0&&e.addVideoSelector(n,null==r?void 0:r.relatedVideos);(null==r||null===(o=r.streams)||void 0===o?void 0:o.length)>1&&e.addMulticamSelector(n,null==r?void 0:r.streams);(null==r||null===(a=r.playlist)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(n,null==r?void 0:r.playlist);null!=r&&null!==(s=r.series)&&void 0!==s&&s.enable&&e.addSeriesSelectorV2(n,r)}(r,i),function(e,t){var r=n.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(!i)return;var l=document.createElement("div");l.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",l.append(o),r.el().appendChild(l),r.on("useractive",(function(){l.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||l.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"}))}(r,i)};
@@ -1 +0,0 @@
1
- import{g as n,q as t,V as i,c as o,W as e,S as a,X as c}from"./generic-65eb4fde.js";import{a as u}from"./util-aed042c3.js";var s,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;s=null==l?void 0:l.cb;var h=l.playerId;u(h,(function(){var u=n(h);0!==(null==u?void 0:u.currentTime())&&((f=a())>d.length-1||(c(f+1),t(h,d[f].id).then((function(n){i(f),o(n.response),f++,v(n)})).catch((function(n){v(n),i(f),f++,r=setTimeout((function(){e(h)&&m(f,h,d)}),5e3)}))))}))},m=function n(o,e,a,u){f=o,o>a.length-1||(c(f+1),t(e,a[o].id).then((function(n){i(f),f++,v(n)})).catch((function(t){v(t),setTimeout((function(){i(f),f++,n(f,e,a)}),5e3)})))},v=function(n){s&&s(n)};export{l as a,m as s};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import r from"js-cookie";import a from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var d={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 u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)}function c(e,t){u("event",e,t)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?v(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"1.0.116",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"}};window.vl_player_version=f.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F(),params:m({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:t,"Sdk-Version":f.version},withCredentials:!0})},w=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:S()+d.getLinearChannelDetails,params:m(m(m(m(m({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},g=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:S()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},I=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:O(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:D(),method:"POST",headers:{Authorization:r},data:m({},t),params:m({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),E=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:b(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:_(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},h=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 o({method:"GET",url:y(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:T(i),headers:{Authorization:e.token},timeout:15e3})},T=function(e){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},y=function(){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},b=function(e){return S()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},_=function(e,t){return S()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},O=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},D=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},F=function(){var e,t,n,i,o=S()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},S=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},P=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},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var R,V,C,W,N,k,B=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L().get(),i=S(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),x=null,j=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!P(t)){e.next=6;break}return x||(x=B().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){x=null}))),e.abrupt("return",x);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},U=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},H=function(e){V=e},z=function(){return V},G=function(e){R=e},Y=function(){return R},q=function(){return C},J=function(e){C=e},X=function(e){N=e},K=function(){return N},Q=function(e){W=new Map,e.map((function(e,t){W.set(e.id,t)}))},Z=function(e){if(W){var t=W.get(e);J(t+1)}},$=(k=0,{set:function(e){e>=0&&(k=e)},get:function(){return k}});function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ne=function(){var e,t,n,i,o,r,a,l=z();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());c(r?"FAILED_TO_START":"DROPPED_STREAM",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("PLAY",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))c("BUFFERING",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",te({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;c("AD_REQUEST",te({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",te({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ne()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(le(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var le=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=te,e.t1=te,e.t2=te({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=20,re();case 20:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,j();case 37:f=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var de=function(e,t){if(import("./error-2395864b.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 i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ue=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=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"},ce=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function me(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var fe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},we=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},ge=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,f,p,w,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,h=(null==E?void 0:E.contentType)||"video",T=null==E||null===(e=E[h])||void 0===e?void 0:e.metadata,y=$e(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===h?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:we(E,"video.gist.id",""),F=me(me({},he(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:fe(O,_),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===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(E),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+we(E,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:we(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(f=m.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:we(E,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Ee(),VIEWLIFT_SEASON_NUMBER:Ie(),VIEWLIFT_CONTENT_TAGS:pe(E)},null===(p=window)||void 0===p||null===(w=p.customData)||void 0===w?void 0:w.macros);for(var S in F){var P=new RegExp(S,"g");g=g.replace(P,F[S])}return g},Ie=function(){var e=$.get();return e>=0?e+1:1},Ee=function(){var e,t,n,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=$.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},he=function(e){var t,n,i,o,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 u=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(ce()?u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=ce()?me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=ce()?me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},Te=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[p])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[p])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,E=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.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!=I&&I.hls)return be(I);if(w){var T=_e(g,t);return T.src=ge(T.src,t,e),T}if("Safari"!==se()&&h)return ye(g);if(E){var y=be(g);return y.src=ge(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,t,e),b}return null},ye=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},be=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},_e=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=se();if($e(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return Oe(t),l}var d,u={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Oe(t),u.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.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 Oe=function(e){var t=$e(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},De=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Fe=function(e,t){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=$e(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},Se=function(e,t){for(var n=$e(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},Pe=function(e){var t,n=$e(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})))||[]},Ae=function(e){var t=$e(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},Le=function(e,t){var n=$e(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})}))},Re=!1,Ve=function(e,t,n){var i=ge(t,e,n),o=$e(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=$e(e);if(null!==r.el_){Re=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Re&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!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",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ce=["live","carousel","V2","defaultV2","multiplayer","minimalist"],We=function(e){return!Ce.includes(e)},Ne=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},ke=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Be=function(e){return ke(e)},xe=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"}))},je=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()}))},Me=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ue="",He=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&Ue!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Ue=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},ze=function(e,t){var n,i=$e(e),o=$e(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){Ge(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){Ge(e,t)}),50)}))},Ge=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var qe=function(e){i(e).play()},Je=function(e){i(e).pause()},Xe=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ke=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Qe=function(e){return!!i.getPlayer("".concat(e))},Ze=function(e){return i(e).paused()},$e=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},et=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,j();case 3:return r=e.sent,a=$e(t),e.abrupt("return",new Promise((function(e,n){w(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=Te(r,t);H(r),l&&o?(rt(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),tt=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return d=e.sent,(Y()||null)&&Z(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&E(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,f,p,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;H(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(f=m.adTags)||void 0===f||null===(p=f.web)||void 0===p?void 0:p.url);I&&Ve(t,I,w);var E=Te(w,t);if(E){var h,T,y,b,_,O,D,F,S,P,A,L,R,V,C=(null==w||null===(h=w.video)||void 0===h||null===(T=h.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),W=$e(t);if(W.poster(C),rt(t,E),W.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),W.on("loadeddata",(function(){ue(),e({status:!0,msg:"Video Loaded",response:w})})),W.one("play",(function(){u&&s<95&&setTimeout((function(){W.currentTime(u)}),0)})),W.one("error",(function(){var e;n({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(F=D.closedCaptions)||void 0===F?void 0:F.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0)A=((null==w||null===(L=w.video)||void 0===L||null===(R=L.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==w||null===(V=w.video)||void 0===V?void 0:V.closedCaptions)).filter((function(e){return"VTT"===e.format})),Le(t,A);else Ae(t)}else de(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){at(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),nt=function(e,t,n){var i=$e(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},it=function(e){var t=$e(e);if(ot(),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()}},ot=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()},rt=function(e,t){var n=$e(e);n&&n.src(t)},at=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Qe(n)&&de(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ye(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ye(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},lt=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{Ge as $,M as A,L as B,P as C,We as D,s as E,p as F,at as G,g as H,w as I,E as J,Me as K,Ve as L,De as M,Le as N,$ as O,G as P,ke as Q,Be as R,q as S,Y as T,ce as U,xe as V,Ze as W,J as X,Ae as Y,Ne as Z,je as _,z as a,He as a0,ze as a1,Q as a2,Z as a3,Te as b,H as c,se as d,ue as e,K as f,$e as g,de as h,h as i,X as j,nt as k,rt as l,Xe as m,Je as n,Qe as o,qe as p,tt as q,Ke as r,I as s,et as t,it as u,Fe as v,Se as w,Pe as x,lt as y,U as z};
@@ -1 +0,0 @@
1
- import{i as e,j as t,k as n,g as l,h as i,d as r,l as o,m as a,n as u,o as s}from"./features-c3e4f064.js";import{M as c,a as d,c as v,d as p}from"./icons-3e9a1686.js";import{g as m,S as f,T as h,a as g,x as y,U as b,R as x,d as w}from"./generic-65eb4fde.js";import{g as E}from"./renditions-fad105ce.js";import C from"@babel/runtime/helpers/toConsumableArray";import{s as N}from"./autoNextVideo-b3fc4c59.js";import k from"@babel/runtime/helpers/typeof";import j from"video.js";import T from"@babel/runtime/helpers/asyncToGenerator";import B from"@babel/runtime/regenerator";import M from"@babel/runtime/helpers/slicedToArray";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"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"./util-aed042c3.js";var A,I,L,O,P=[],V=function(e,t){var n=m(e),l=Math.floor(n.currentTime());if(Math.floor(n.duration())!=l){n.pause(e);var i=f();N(i,e,P)}};function R(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),l={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(l.resolution=e.split("=")[1]),e.includes("URI")&&(l.uri=e.split("=")[1].replace(/"/g,""))})),n.push(l)}})),n}function S(e){return X.apply(this,arguments)}function X(){return(X=T(B.mark((function e(t){return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var l=[],i=t.layout.split("x"),r=M(i,2),o=r[0],a=r[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var r=i.width/a,u=i.height/o,s=0;s<o;s++)for(var c=0;c<a;c++){var d=document.createElement("canvas");d.width=r,d.height=u,d.getContext("2d").drawImage(i,c*r,s*u,r,u,0,0,r,u);var v=d.toDataURL("image/png");l.push({uri:v,duration:t.duration})}e(l)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e){return U.apply(this,arguments)}function U(){return(U=T(B.mark((function e(t){var n,l;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return l=e.sent,e.abrupt("return",R(l));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function D(e){return G.apply(this,arguments)}function G(){return(G=T(B.mark((function e(t){var n,l;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return S(e)})));case 2:return n=e.sent.flat(),l={},n.map((function(e,t){var n=e.duration;l[n*t]={src:e.uri,style:{left:"-60px",height:"85px",width:"130px"}}})),e.abrupt("return",l);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}A={0:{src:"example-thumbnail.png"}},I=function e(){var t,n,l,i,r;for(l in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(r in i=t[l])i.hasOwnProperty(r)&&("object"===k(i[r])?n[r]=e(n[r],i[r]):n[r]=i[r]);return n},L=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},O=function e(t){return"HTML"!==t.nodeName&&"static"===L(t)("position")?e(t.offsetParent):t},j.registerPlugin("thumbnails",(function(e){var t,n,l,i,r,o,a,u;n=I({},A,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),t.appendChild(l),l.src=n[0].src,l.className="vjs-thumbnail",I(l.style,n[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",(function(e){o=i.duration()})),i.on("loadedmetadata",(function(e){o=i.duration()})),(r=i.controlBar.progressControl).el().appendChild(t),a=function(e){var i,a,u,s,c,d,v,p,m,f;for(a in u=0,m=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,v=((f=O(r.el()).getBoundingClientRect()).width||f.right)+m,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=O(r.el()).getBoundingClientRect().left+m,i=Math.floor((s-r.el().offsetLeft)/r.width()*o),n)i>a&&(u=Math.max(u,a));(c=n[u]).src&&l.src!=c.src&&(l.src=c.src),c.style&&l.style!=c.style&&I(l.style,c.style),s+(p=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=L(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(l,c.width||n[0].width)/2)>v?s-=s+p-v:s<p&&(s=p),t.style.left=s+"px"},r.on("mousemove",a),r.on("touchmove",a),u=function(e){t.style.left="-1000px"},r.on("mouseout",u),r.on("touchcancel",u),r.on("touchend",u),i.on("userinactive",u)}));var _=function(){var e=T(B.mark((function e(t,n){var l,i,r,o;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return l=e.sent,e.next=5,l.text();case 5:return i=e.sent,r=i.split("\n"),o=[],r.forEach((function(e,n){e=e.trim();var l={resolution:null,duration:null,uri:null,layout:null};n>0&&r[n-1].includes("#EXT-X-TILES")&&(r[n-1]=r[n-1].split(","),l.uri=t+e,r[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=M(t,2),i=n[0],r=n[1];i=i.toLowerCase(),l[i]=r}))})),o.push(l))})),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function W(e){return $.apply(this,arguments)}function $(){return($=T(B.mark((function e(t){var n,l,i,r,o,a,u,s,c,d,v,p,m,f,h,y,b,x,w,E,C,N;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:o=e.sent,a=new DOMParser,u=a.parseFromString(o,"application/xml"),s=null===(l=g())||void 0===l||null===(i=l.video)||void 0===i?void 0:i.runtime,c=u.getElementsByTagName("AdaptationSet"),d=0;case 13:if(!(d<c.length)){e.next=34;break}if("image"!==(v=c[d]).getAttribute("contentType")||"image/png"!==v.getAttribute("mimeType")){e.next=31;break}if(p=v.getElementsByTagName("SegmentTemplate")[0],m=v.getElementsByTagName("Representation")[0],f=m.getElementsByTagName("EssentialProperty")[0],h=f.getAttribute("value"),!p){e.next=31;break}for(p.getAttribute("media"),y=p.getAttribute("duration"),b=p.getAttribute("timescale"),x=y/b,w=Math.round(s/x),E=Math.ceil(w/9),C=p.getAttribute("media"),N=[],d=0;d<E;d++)N.push({duration:x,layout:h,uri:n+"/"+C.replace("$Number$",d)});return e.abrupt("return",N);case 31:d++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function z(){return(z=T(B.mark((function e(t){var n,l,i,r,o,a,u,s,c,d,v,p,f,h,g,y,b,x,w,E,C;return B.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=m(t),l=n.currentSource(),null==(i=l.src)||!i.includes("m3u8")){e.next=18;break}return e.next=5,F(i);case 5:if(!((null==(r=e.sent)?void 0:r.length)>0)){e.next=16;break}return g=(null==r?void 0:r[0])||null,y=g.uri,b=(null==n||null===(o=n.tech())||void 0===o||null===(a=o.vhs)||void 0===a||null===(u=a.playlists)||void 0===u||null===(s=u.master)||void 0===s||null===(c=s.uri)||void 0===c?void 0:c.substring(0,null==n||null===(d=n.tech())||void 0===d||null===(v=d.vhs)||void 0===v||null===(p=v.playlists)||void 0===p||null===(f=p.master)||void 0===f||null===(h=f.uri)||void 0===h?void 0:h.lastIndexOf("/")))+"/",e.next=11,_(b,y);case 11:return x=e.sent,e.next=14,D(x);case 14:w=e.sent,n.thumbnails(w);case 16:e.next=27;break;case 18:if(null==i||!i.includes("mpd")){e.next=27;break}return e.next=21,W(i);case 21:if(!((null==(E=e.sent)?void 0:E.length)>0)){e.next=27;break}return e.next=25,D(E);case 25:C=e.sent,n.thumbnails(C);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(l,i){var r=m(l);r&&(r.on("loadeddata",(function(){var n,o,a,u,s,c,d;(null===(n=E(l))||void 0===n?void 0:n.length)>0&&e(l,i),(null===(o=y(l))||void 0===o?void 0:o.length)>0&&t(l,i),(null!=i&&null!==(a=i.series)&&void 0!==a&&a.enable||null!==(u=window)&&void 0!==u&&null!==(s=u.app_data)&&void 0!==s&&null!==(c=s.appcmsMain)&&void 0!==c&&null!==(d=c.features)&&void 0!==d&&d.auto_play)&&function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var l;P=[];var i=h();null==i||i.map((function(e){var t;return(t=P).push.apply(t,C(e.episodes))})),null==t||null===(l=t.series)||void 0===l||l.cb}else{var r,o;P=null==t||null===(r=t.relatedVideos)||void 0===r?void 0:r.content,null==t||null===(o=t.relatedVideos)||void 0===o||o.cb}var a=m(e);a.on("timeupdate",(function(){var e,t,n=Math.floor(a.currentTime()),l=a.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];l-n<=10&&f()<=(null===(t=P)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var u,s=P.filter((function(e,t){return t==f()}));if((null==s?void 0:s.length)>0)if(null!==(u=document.getElementsByClassName("next-ep-preview"))&&void 0!==u&&u[0]){var c,d,v,p,g,y,b,x,w,E,N,k;(null===(c=document.getElementsByClassName("next-ep-preview"))||void 0===c?void 0:c[0]).style.visibility="hidden";var j=null===(d=document.getElementsByClassName("next-ep-title"))||void 0===d?void 0:d[0],T=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],B=null===(p=document.getElementsByClassName("next-ep-content"))||void 0===p?void 0:p[0],M=null===(g=s[0])||void 0===g?void 0:g.title;(null===(y=M)||void 0===y?void 0:y.length)>60&&(M=M.substr(0,60)+"..."),j.textContent="".concat(M),T.src=(null===(b=s[0])||void 0===b||null===(x=b.gist)||void 0===x||null===(w=x.imageGist)||void 0===w?void 0:w.r16x9)||(null==s||null===(E=s[0])||void 0===E?void 0:E.img)||(null===(N=window)||void 0===N||null===(k=N.customData)||void 0===k?void 0:k.fallbackImage),B.onclick=function(){return V(e)}}else{var A,I,L,O,R,S,X,F,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(e).append(U);var D=document.createElement("div");D.className="next-ep-header",D.textContent="Next up";var G=null===(A=s[0])||void 0===A?void 0:A.title,_=document.createElement("img");_.className="next-ep-img",_.src=(null===(I=s[0])||void 0===I||null===(L=I.gist)||void 0===L||null===(O=L.imageGist)||void 0===O?void 0:O.r16x9)||(null==s||null===(R=s[0])||void 0===R?void 0:R.img)||(null===(S=window)||void 0===S||null===(X=S.customData)||void 0===X?void 0:X.fallbackImage);var W=document.createElement("div");W.className="next-ep-title",(null===(F=G)||void 0===F?void 0:F.length)>60&&(G=G.substr(0,60)+"..."),W.textContent="".concat(G);var $=document.createElement("div");$.className="next-ep-content",$.append(_),$.append(W),$.onclick=function(){return V(e)},U.append(D),U.append($)}}(l,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),null!=i&&i.liveVideo||b()||function(e){z.apply(this,arguments)}(l)})),r.one("play",(function(){var e,t,i,r;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&n(l,null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.iframeOverlayUrl)})))}function Y(e,t){!function(){"Chrome"==w()&&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-fbc45594.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),H(e,t),function(e,t){var n,l,i,r,o,a,u=m(e);null==u||null===(n=u.controlBar)||void 0===n||null===(l=n.getChild("FullscreenToggle"))||void 0===l||null===(i=l.el())||void 0===i||i.appendChild(x(c(window.controlsColor))),null==u||null===(r=u.controlBar)||void 0===r||null===(o=r.getChild("FullscreenToggle"))||void 0===o||null===(a=o.el())||void 0===a||a.appendChild(x(d(window.controlsColor)));var s=document.getElementsByClassName("vjs-time-control");t.liveVideo&&s[0]&&(s[0].style.display="none")}(e,t),function(e,t){var n,c,d,m,f,h;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&l(e,"defaultV2",v());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(e,"defaultV2",p());t.liveVideo||r(e);(null==t||null===(n=t.relatedVideos)||void 0===n||null===(c=n.content)||void 0===c?void 0:c.length)>0&&o(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&a(e,null==t?void 0:t.streams);(null==t||null===(m=t.playlist)||void 0===m||null===(f=m.content)||void 0===f?void 0:f.length)>0&&u(e,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&s(e,t)}(e,t),function(e,t){var n=m(e),l=null==t?void 0:t.tvProviderLogoUrl;if(!l)return;var i=document.createElement("div");i.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(l),r.alt="Provider Image",i.append(r),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,t)}export{Y as initialiseSkin};