@viewlift/player-backup 1.0.43-backup → 1.0.44-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 (73) hide show
  1. package/cjs/{autoNextVideo-1b97904e.js → autoNextVideo-1594d766.js} +1 -1
  2. package/cjs/bundle.css +1 -1
  3. package/cjs/caption-settings-1b9e6076.js +1 -0
  4. package/cjs/{features-93e8ab1c.js → features-b66f39dd.js} +1 -1
  5. package/cjs/{generic-2145e1a3.js → generic-fcf768bf.js} +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/{keyboardShortcuts-e8e1f83d.js → keyboardShortcuts-32bdcd48.js} +1 -1
  8. package/cjs/multicam-17394302.js +1 -0
  9. package/cjs/multicamv2-ed291a45.js +1 -0
  10. package/cjs/mwebPotraitTray-44761620.js +1 -0
  11. package/cjs/nextEpisodeButton-8287d392.js +1 -0
  12. package/cjs/playlist-a0b873eb.js +1 -0
  13. package/cjs/{renditions-ae0b91b0.js → renditions-a1279aef.js} +1 -1
  14. package/cjs/resolution-142cc0fb.js +1 -0
  15. package/cjs/series-a1fea718.js +1 -0
  16. package/cjs/series-v2-f79891c0.js +1 -0
  17. package/cjs/settings-icon-f8b22373.js +1 -0
  18. package/cjs/{skin-7f88eed1.js → skin-01566525.js} +1 -1
  19. package/cjs/{skin-bcd27388.js → skin-44eecaad.js} +1 -1
  20. package/cjs/{skin-cb51a604.js → skin-8e13cca6.js} +1 -1
  21. package/cjs/skin-dc37ddf9.js +1 -0
  22. package/cjs/{skin-88d311e4.js → skin-dd023187.js} +1 -1
  23. package/cjs/{util-f41a0d05.js → util-7946bdd0.js} +1 -1
  24. package/cjs/videoSelector-ef5aa254.js +1 -0
  25. package/esm/{autoNextVideo-010a759a.js → autoNextVideo-92a16327.js} +1 -1
  26. package/esm/bundle.css +1 -1
  27. package/esm/caption-settings-920f3763.js +1 -0
  28. package/esm/{features-2ea1a15f.js → features-ddd73442.js} +1 -1
  29. package/esm/{generic-29eb27c1.js → generic-518c65e7.js} +1 -1
  30. package/esm/index.js +1 -1
  31. package/esm/{keyboardShortcuts-0c877dc8.js → keyboardShortcuts-39ad08cb.js} +1 -1
  32. package/esm/multicam-046c8eb8.js +1 -0
  33. package/esm/multicamv2-5be1eec7.js +1 -0
  34. package/esm/mwebPotraitTray-595e6b38.js +1 -0
  35. package/esm/nextEpisodeButton-1dc6315f.js +1 -0
  36. package/esm/playlist-32643c9d.js +1 -0
  37. package/esm/{renditions-354bfc7a.js → renditions-4e100e8d.js} +1 -1
  38. package/esm/resolution-1cf62681.js +1 -0
  39. package/esm/series-a74a895d.js +1 -0
  40. package/esm/series-v2-0c938cf5.js +1 -0
  41. package/esm/settings-icon-053a6a85.js +1 -0
  42. package/esm/{skin-3e3ee571.js → skin-137a25bb.js} +1 -1
  43. package/esm/{skin-c60cb1cc.js → skin-4a0460c1.js} +1 -1
  44. package/esm/{skin-06ef0296.js → skin-70d4628f.js} +1 -1
  45. package/esm/skin-825cb6f3.js +1 -0
  46. package/esm/{skin-ec7489b0.js → skin-96fd2eb4.js} +1 -1
  47. package/esm/{util-c26d0ca6.js → util-c658b894.js} +1 -1
  48. package/esm/videoSelector-ebeace23.js +1 -0
  49. package/package.json +1 -1
  50. package/cjs/caption-settings-a9eaa431.js +0 -1
  51. package/cjs/multicam-161f94e5.js +0 -1
  52. package/cjs/multicamv2-99839290.js +0 -1
  53. package/cjs/mwebPotraitTray-030cdf18.js +0 -1
  54. package/cjs/nextEpisodeButton-d4d45875.js +0 -1
  55. package/cjs/playlist-84d6bd2a.js +0 -1
  56. package/cjs/resolution-2e3b55f8.js +0 -1
  57. package/cjs/series-d77673a6.js +0 -1
  58. package/cjs/series-v2-8c202aa7.js +0 -1
  59. package/cjs/settings-icon-cf28b8a7.js +0 -1
  60. package/cjs/skin-0ba6b7cd.js +0 -1
  61. package/cjs/videoSelector-cc6220c3.js +0 -1
  62. package/esm/caption-settings-07be0234.js +0 -1
  63. package/esm/multicam-1183d2b8.js +0 -1
  64. package/esm/multicamv2-bb4da1c4.js +0 -1
  65. package/esm/mwebPotraitTray-ecca1c5a.js +0 -1
  66. package/esm/nextEpisodeButton-b8035c60.js +0 -1
  67. package/esm/playlist-2e7517e0.js +0 -1
  68. package/esm/resolution-0c647183.js +0 -1
  69. package/esm/series-89e35ad8.js +0 -1
  70. package/esm/series-v2-4d07a70f.js +0 -1
  71. package/esm/settings-icon-1cf7c621.js +0 -1
  72. package/esm/skin-850fe8a5.js +0 -1
  73. package/esm/videoSelector-810bebd0.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("./features-93e8ab1c.js"),r=require("./keyboardShortcuts-e8e1f83d.js"),t=require("./icons-0f7b3404.js"),i=require("./generic-2145e1a3.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-ae0b91b0.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(n,s){r.initialiseKeyboardEvents(n,s),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,i){0==i.liveVideo&&0==i.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==i.liveVideo&&0==i.liveui||1==i.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(n,s),function(r,n){var s=i.getPlayer(r),o=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-d4d45875.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,i.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var t;o&&(e.addSeriesModule(r,null==n||null===(t=n.sres)||void 0===t?void 0:t.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(n,s),function(e,r){var n=i.getPlayer(e),s=document.getElementsByClassName("vjs-current-time")[0],o=document.getElementsByClassName("vjs-duration")[0],l=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(s&&(s.style.display="none"),o&&(o.style.display="none"),l&&(l.style.display="none"));n.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MinimizeSvg(window.controlsColor))),n.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var a=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(i.createIconMarkup(t.NewCaptionsSvg()));var u=document.createElement("div");u.classList.add("caption-header"),a.querySelector(".vjs-menu-content").insertBefore(u,a.querySelector(".vjs-menu-item"))}(n,s)};
1
+ "use strict";var e=require("./features-b66f39dd.js"),r=require("./keyboardShortcuts-32bdcd48.js"),t=require("./icons-0f7b3404.js"),i=require("./generic-fcf768bf.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-a1279aef.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(n,s){r.initialiseKeyboardEvents(n,s),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,i){0==i.liveVideo&&0==i.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==i.liveVideo&&0==i.liveui||1==i.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(n,s),function(r,n){var s=i.getPlayer(r),o=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-8287d392.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,i.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var t;o&&(e.addSeriesModule(r,null==n||null===(t=n.sres)||void 0===t?void 0:t.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(n,s),function(e,r){var n=i.getPlayer(e),s=document.getElementsByClassName("vjs-current-time")[0],o=document.getElementsByClassName("vjs-duration")[0],l=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(s&&(s.style.display="none"),o&&(o.style.display="none"),l&&(l.style.display="none"));n.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MinimizeSvg(window.controlsColor))),n.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var a=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(i.createIconMarkup(t.NewCaptionsSvg()));var u=document.createElement("div");u.classList.add("caption-header"),a.querySelector(".vjs-menu-content").insertBefore(u,a.querySelector(".vjs-menu-item"))}(n,s)};
@@ -1 +1 @@
1
- "use strict";var e,t=require("./features-93e8ab1c.js"),n=require("./icons-0f7b3404.js"),r=require("./generic-2145e1a3.js"),s=require("@babel/runtime/helpers/defineProperty"),o=require("./keyboardShortcuts-e8e1f83d.js");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,o){var l=r.getPlayer(e);l.one("play",(function(){null!=o&&o.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)),null!=o&&o.airplay&&"Safari"==r.detectBrowser()&&l.addChild("airPlayButton"),null!=o&&o.chromecastReceiverId&&l.addChild("chromecastButton"),l.addChild("FullscreenToggle"),l.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(n.MinimizeSvg(window.controlsColor))),l.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(n.MaximizeSvg(window.controlsColor))),a(e)})),l.on("loadedmetadata",(function(){window.endFirstFrame(l),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),l.one("loadedmetadata",(function(){var n;null!=o&&o.streams&&(null==o||null===(n=o.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,o)}))}function a(t){var n=r.getPlayer(t);c(),n.on("pause",(function(){clearTimeout(e),u()})),n.on("play",(function(){c()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){u(),n.paused()||c()})),s.addEventListener("touchstart",(function(){u(),c()})),s.addEventListener("mousemove",(function(){u(),n.paused()||c()}))}function u(){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 c(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-ae0b91b0.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=a,exports.initialiseSkin=function(e,s){var i;o.initialiseKeyboardEvents(e,s),(null==(i=s)||!i.liveui)&&(null==i||!i.liveVideo)||null!=i&&i.liveui&&null!=i&&i.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e){t.addSlowMotion(e)}(e),function(e,t){var s=r.getPlayer(e),o=s.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(r.createIconMarkup(n.NewCaptionsSvg()));var i=document.createElement("div");i.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(i,o.querySelector(".vjs-menu-item"));var l=document.createElement("div");if(l.innerText="Captions",l.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(l),"Safari"==r.detectBrowser()){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,s),l(e,s)};
1
+ "use strict";var e,t=require("./features-b66f39dd.js"),n=require("./icons-0f7b3404.js"),r=require("./generic-fcf768bf.js"),s=require("@babel/runtime/helpers/defineProperty"),o=require("./keyboardShortcuts-32bdcd48.js");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,o){var l=r.getPlayer(e);l.one("play",(function(){null!=o&&o.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)),null!=o&&o.airplay&&"Safari"==r.detectBrowser()&&l.addChild("airPlayButton"),null!=o&&o.chromecastReceiverId&&l.addChild("chromecastButton"),l.addChild("FullscreenToggle"),l.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(n.MinimizeSvg(window.controlsColor))),l.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(n.MaximizeSvg(window.controlsColor))),a(e)})),l.on("loadedmetadata",(function(){window.endFirstFrame(l),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),l.one("loadedmetadata",(function(){var n;null!=o&&o.streams&&(null==o||null===(n=o.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,o)}))}function a(t){var n=r.getPlayer(t);c(),n.on("pause",(function(){clearTimeout(e),u()})),n.on("play",(function(){c()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){u(),n.paused()||c()})),s.addEventListener("touchstart",(function(){u(),c()})),s.addEventListener("mousemove",(function(){u(),n.paused()||c()}))}function u(){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 c(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-a1279aef.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=a,exports.initialiseSkin=function(e,s){var i;o.initialiseKeyboardEvents(e,s),(null==(i=s)||!i.liveui)&&(null==i||!i.liveVideo)||null!=i&&i.liveui&&null!=i&&i.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e){t.addSlowMotion(e)}(e),function(e,t){var s=r.getPlayer(e),o=s.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(r.createIconMarkup(n.NewCaptionsSvg()));var i=document.createElement("div");i.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(i,o.querySelector(".vjs-menu-item"));var l=document.createElement("div");if(l.innerText="Captions",l.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(l),"Safari"==r.detectBrowser()){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,s),l(e,s)};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-2145e1a3.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
1
+ "use strict";var e=require("./generic-fcf768bf.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./features-b66f39dd.js"),t=require("./icons-0f7b3404.js"),l=require("./generic-fcf768bf.js"),i=require("./renditions-a1279aef.js"),n=require("@babel/runtime/helpers/toConsumableArray"),o=require("./autoNextVideo-1594d766.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-7946bdd0.js");var r=l.getCurrentSeries(),a=[];null==r||r.map((function(e){return a.push.apply(a,n(e.episodes))}));var d=function(e,t){var i=l.getPlayer(e),n=Math.floor(i.currentTime());if(Math.floor(i.duration())!=n){i.pause(e);var r=l.getVideoIdx();o.switchToNext(r,e,a,sessionStorage.getItem("token"))}};function u(t,n){var o=l.getPlayer(t);o.on("loadeddata",(function(){var r,u,s;(null===(r=i.getRenditions(t))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(t,n),(null===(u=l.getCaptions(t))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(t,n),null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable&&function(e,t){var i;null==t||null===(i=t.series)||void 0===i||i.cb;var n=l.getPlayer(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),i=n.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-t<=10&&l.getVideoIdx()<=(null==a?void 0:a.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=a.filter((function(e,t){return t==l.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var u,s,v,c,m,p,g,h,f,y,C;(null===(u=document.getElementsByClassName("next-ep-preview"))||void 0===u?void 0:u[0]).style.visibility="hidden";var b=null===(s=document.getElementsByClassName("next-ep-title"))||void 0===s?void 0:s[0],x=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],j=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],w=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=w)||void 0===p?void 0:p.length)>60&&(w=w.substr(0,60)+"..."),b.textContent="".concat(w),x.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(C=y.customData)||void 0===C?void 0:C.fallbackImage),j.onclick=function(){return d(e)}}else{var q,E,N,B,V,S,k,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(q=r[0])||void 0===q?void 0:q.title,R=document.createElement("img");R.className="next-ep-img",R.src=(null===(E=r[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(S=V.customData)||void 0===S?void 0:S.fallbackImage);var O=document.createElement("div");O.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),O.textContent="".concat(M);var T=document.createElement("div");T.className="next-ep-content",T.append(R),T.append(O),T.onclick=function(){return d(e)},P.append(I),P.append(T)}}(t,n),function(e,t){var l,i=Math.floor(e/60),n=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];n&&(n.style.marginRight=i>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");t&&o.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",n&&(n.style.marginRight="56px"))}(o.duration(),(null==n?void 0:n.liveVideo)||!1)})),o.one("play",(function(){var l,i,n,o;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}exports.initialiseSkin=function(i,n){!function(){"Chrome"==l.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-921d35a8.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),u(i,n),function(e,i){var n=l.getPlayer(e);n.controlBar.getChild("FullscreenToggle").el().appendChild(l.createIconMarkup(t.MinimizeSvg(window.controlsColor))),n.controlBar.getChild("FullscreenToggle").el().appendChild(l.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var o=document.getElementsByClassName("vjs-time-control");i.liveVideo&&(o[0].style.display="none")}(i,n),function(l,i){var n,o,r,a,d,u;0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)&&e.addSkipButton(l,"defaultV2",t.SkipSvgV2());(0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)||1==(null==i?void 0:i.liveui))&&e.addRewindButton(l,"defaultV2",t.RewindSvgV2());i.liveVideo||e.addSlowMotion(l);(null==i||null===(n=i.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);(null==i||null===(r=i.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);(null==i||null===(a=i.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(l,null==i?void 0:i.playlist);null!=i&&null!==(u=i.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(l,i)}(i,n),function(e,t){var i=l.getPlayer(e),n=null==t?void 0:t.tvProviderLogoUrl;if(!n)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(n),r.alt="Provider Image",o.append(r),i.el().appendChild(o),i.on("useractive",(function(){o.classList.remove("vjs-fade")})),i.on("userinactive",(function(){i.paused()||o.classList.add("vjs-fade")})),i.on("fullscreenchange",(function(){i.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(i,n)};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-2145e1a3.js"),r=require("./features-93e8ab1c.js"),i=require("./renditions-ae0b91b0.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),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"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-fc1e7e52.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var e;(null===(e=i.getRenditions(t))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(t,n)}))}(t,n),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(t)};
1
+ "use strict";var e=require("./generic-fcf768bf.js"),r=require("./features-b66f39dd.js"),i=require("./renditions-a1279aef.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),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"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-fc1e7e52.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var e;(null===(e=i.getRenditions(t))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(t,n)}))}(t,n),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(t)};
@@ -1 +1 @@
1
- "use strict";var t=require("./generic-2145e1a3.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
1
+ "use strict";var t=require("./generic-fcf768bf.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),l=require("./icons-0f7b3404.js"),r=require("./generic-fcf768bf.js"),d=require("./autoNextVideo-1594d766.js"),c=require("./localisation-56e0a999.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-7946bdd0.js");var u=a.getComponent("Component"),v=function(){n(h,u);var v,m,p=(v=h,m=s(),function(){var e,t=i(v);if(m){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function h(t){var n,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(i=p.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(r.setVideoIdx(0),d.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(h,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l.EpisodesSvg())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(r.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");t.style.height="".concat(n),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),r.detectOrientationChange(this.playerId,t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var d=a.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=a.dom.createEl("div",{className:"video-selector-content"}),u=a.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o,i,l,d,c=a.dom.createEl("div",{className:"video -".concat(e)}),v=a.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){r.setVideoIdx(e+1);for(var n=a.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),r.load(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var m=document.createElement("img");m.className="related-thumbnail-image",m.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.fallbackImage)),m.alt="No Thumbnail Available",v.append(m);var p=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});a.dom.appendContent(c,v),a.dom.appendContent(c,p),a.dom.appendContent(u,c),a.dom.appendContent(s,u)},m=0;m<this.videos.length;m++)v(m);a.dom.appendContent(o,i),a.dom.appendContent(o,d),a.dom.appendContent(e,o),a.dom.appendContent(e,s),r.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}}]),h}();exports.default=v;
@@ -1 +1 @@
1
- import{g as n,o as t,N as o,b as e,O as i,M as a,P as s}from"./generic-29eb27c1.js";import{a as c}from"./util-c26d0ca6.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;u=null==l?void 0:l.cb;var g=l.playerId,h=sessionStorage.getItem("token");c(g,(function(){var c=n(g);0!==(null==c?void 0:c.currentTime())&&((f=a())>d.length-1||t(g,d[f].id,h).then((function(n){o(f),e(n.response),f++,s(f),v(n)})).catch((function(n){v(n),o(f),f++,s(f),r=setTimeout((function(){i(g)&&m(f,g,d,h)}),5e3)})))}))},m=function n(e,i,a,c,u){f=e,e>a.length-1||t(i,a[e].id,c).then((function(n){o(f),f++,s(f),v(n)})).catch((function(t){v(t),setTimeout((function(){o(f),f++,s(f),n(f,i,a,c)}),5e3)}))},v=function(n){u&&u(n)};export{l as a,m as s};
1
+ import{g as n,o as t,N as o,b as e,O as i,M as a,P as s}from"./generic-518c65e7.js";import{a as c}from"./util-c658b894.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;u=null==l?void 0:l.cb;var g=l.playerId,h=sessionStorage.getItem("token");c(g,(function(){var c=n(g);0!==(null==c?void 0:c.currentTime())&&((f=a())>d.length-1||t(g,d[f].id,h).then((function(n){o(f),e(n.response),f++,s(f),v(n)})).catch((function(n){v(n),o(f),f++,s(f),r=setTimeout((function(){i(g)&&m(f,g,d,h)}),5e3)})))}))},m=function n(e,i,a,c,u){f=e,e>a.length-1||t(i,a[e].id,c).then((function(n){o(f),f++,s(f),v(n)})).catch((function(t){v(t),setTimeout((function(){o(f),f++,s(f),n(f,i,a,c)}),5e3)}))},v=function(n){u&&u(n)};export{l as a,m as s};
package/esm/bundle.css CHANGED
@@ -15,7 +15,6 @@
15
15
 
16
16
 
17
17
 
18
-
19
18
  .widget-selection{
20
19
  display: flex;
21
20
  align-items: center;
@@ -136,6 +135,7 @@
136
135
  .widget-selector-content #sr-widget{
137
136
  padding: 0 18px;
138
137
  }
138
+
139
139
  .vjs-poster {
140
140
  display: inline-block;
141
141
  vertical-align: middle;
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-c2efba97.js";import{v as l,u as s,R as d,S as p,g as m,t as u}from"./generic-518c65e7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var h=i.getComponent("Component"),f=function(){n(C,h);var f,g,y=(f=C,g=v(),function(){var e,t=o(f);if(g){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function C(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,C),(n=y.call(this,t,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return t(C,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-2e47813b.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=l(this.playerId);null==t||t.map((function(t){return s(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(d(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px"):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");a.style.height="".concat(o),i.dom.appendContent(n,a),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=i.dom.createEl("div",{className:"caption-selector-head"}),o=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(c())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var r=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d);var p=this.createFontSizeContainer();i.dom.appendContent(s,p),i.dom.appendContent(a,o),i.dom.appendContent(a,r),i.dom.appendContent(e,a),i.dom.appendContent(e,l),i.dom.appendContent(l,s),m(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){l(e.playerId).map((function(t){return s(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),d=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){u(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},p=0;p<c.length;p++)d(p);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),C}();export{f as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{g as a,J as s,r as c,j as d}from"./generic-29eb27c1.js";import{g as u}from"./renditions-354bfc7a.js";import{g as m}from"./localisation-0bf399a1.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){var t=h();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=m("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},g=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){c(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},C=function(e,t){import("./multicam-1183d2b8.js").then((function(n){var r=n.default,o=t.streams,l=a(e);i.registerComponent("multicamModule",r),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var n=document.querySelector(".vjs-control-bar");n&&"live"==(null==t?void 0:t.skin)&&(n.style.background="transparent")},B=function(e,t,n){import("./resolution-0c647183.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a(e),s=u(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:s},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-b8035c60.js").then((function(r){var o=r.default,l=a(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},j=function(e,t){import("./mwebPotraitTray-ecca1c5a.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("mwebPotraitTray",r),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},k=function(e,t,n){import("./series-89e35ad8.js").then((function(r){var o=r.seriesModule,l=a(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},d=0;d<s.length;d++)c(d)}))},E=function(e,t){import("./videoSelector-810bebd0.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},O=function(e,t){import("./caption-settings-07be0234.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("captionSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-1cf7c621.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("settingsSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},S=function(e,t){import("./playlist-2e7517e0.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},I=function(t,n){import("./series-v2-4d07a70f.js").then((function(r){var o=r.default,l=a(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({playerId:t},n),l.controlBar.children().length-3)}))},M=function(e,t){import("./multicamv2-bb4da1c4.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},P=function(e,t){var n=a(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},T=function(e){var t=a(e).el(),n=0,r=a(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o};export{C as a,B as b,j as c,v as d,k as e,b as f,y as g,g as h,w as i,O as j,P as k,E as l,M as m,S as n,I as o,T as p};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{g as a,J as s,r as c,j as d}from"./generic-518c65e7.js";import{g as u}from"./renditions-4e100e8d.js";import{g as m}from"./localisation-0bf399a1.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){var t=h();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=m("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},g=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){c(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},C=function(e,t){import("./multicam-046c8eb8.js").then((function(n){var r=n.default,o=t.streams,l=a(e);i.registerComponent("multicamModule",r),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var n=document.querySelector(".vjs-control-bar");n&&"live"==(null==t?void 0:t.skin)&&(n.style.background="transparent")},B=function(e,t,n){import("./resolution-1cf62681.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a(e),s=u(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:s},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-1dc6315f.js").then((function(r){var o=r.default,l=a(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},j=function(e,t){import("./mwebPotraitTray-595e6b38.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("mwebPotraitTray",r),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},k=function(e,t,n){import("./series-a74a895d.js").then((function(r){var o=r.seriesModule,l=a(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},d=0;d<s.length;d++)c(d)}))},E=function(e,t){import("./videoSelector-ebeace23.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},O=function(e,t){import("./caption-settings-920f3763.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("captionSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-053a6a85.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("settingsSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},S=function(e,t){import("./playlist-32643c9d.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},I=function(t,n){import("./series-v2-0c938cf5.js").then((function(r){var o=r.default,l=a(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({playerId:t},n),l.controlBar.children().length-3)}))},M=function(e,t){import("./multicamv2-5be1eec7.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},P=function(e,t){var n=a(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},T=function(e){var t=a(e).el(),n=0,r=a(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o};export{C as a,B as b,j as c,v as d,k as e,b as f,y as g,g as h,w as i,O as j,P as k,E as l,M as m,S as n,I as o,T as p};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"video.js";import t from"axios";import"js-cookie";import o from"ua-parser-js";import i from"@babel/runtime/helpers/toConsumableArray";var r={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 l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var d={name:"@viewlift/player-backup",version:"1.0.42-backup",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"}},s=function(e,n){var o,i,r,l;return null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):t({url:y(),params:a({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":d.version},withCredentials:!0})},u=function(e,n){var o,i;return t({url:h()+r.getLinearChannelDetails,params:a(a(a(a(a({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===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n}})},c=function(e,n){var o,i,r=JSON.parse(atob(n.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):t({url:h()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},v=function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:w(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r=a({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return t({url:T(),method:"POST",headers:{Authorization:n},data:r,params:a({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},m=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:f(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:E(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},p=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:g(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:I(i),headers:{Authorization:e.token}})},I=function(e){return h()+"".concat(null==r?void 0:r.getSeriesWatchHistoryV2,"/").concat(e)},g=function(){return h()+"".concat(null==r?void 0:r.getSeriesWatchHistoryV1)},f=function(e){return h()+"".concat(null==r?void 0:r.getVideoInfoV1,"/").concat(e)},E=function(e,n){return h()+"".concat(null==r?void 0:r.getVideoInfoV2,"/").concat(n,"/").concat(e)},w=function(){return h()+"".concat(null==r?void 0:r.saveWatchHistoryV1)},T=function(){return h()+"".concat(null==r?void 0:r.saveWatchHistoryV2)},y=function(){return h()+"".concat(null==r?void 0:r.getVideoDetails)},h=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==r?void 0:r.apiBaseUrl)},_=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},O=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},b=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var D=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function L(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=o(navigator.userAgent);var S,C,W,A,F,R=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},P=function(e){var n=N(e,"video.tags",[]),t=N(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},N=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},k=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},j=function(){var e,n,t,o,i,r,l,a,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,I=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,g=he(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=N(p,"video.gist.id",""),y=L(L({},x(I)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:R(w,E),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:N(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(t=g.options_)||void 0===t?void 0:t.autoplay)||1,VIEWLIFT_MUTE:(null==g||null===(o=g.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:P(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(N(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+N(p,"video.gist.permalink","")),VIEWLIFT_COPPA:N(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:N(null===(a=window)||void 0===a||null===(d=a.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:N(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:N(p,"video.series[0].gist.title",N(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:N(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:N(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:N(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},x=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(k()?s?a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=k()?L(L({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):L(L({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=k()?L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},B=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,m,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[I])||void 0===t?void 0:t.drmEnabled,f=null==e||null===(o=e[I])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[I])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[I])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[I])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return H(E);if(g){var y=M(f,n);return y.src=j(y.src,n,e),y}if("Safari"!==D()&&T)return U(f);if(w){var h=H(f);return h.src=j(h.src,n,e),h}if(null!=f&&f.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(f);return _.src=j(_.src,n,e),_}return null},U=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},H=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},M=function(e,t){var o=e.fairPlay,i=e.widevine,r=e.playReady,l=D(),a=he(t);if("Safari"===l){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(i,(function(e,n,t){console.log(e),e&&o(e),o(null,new Uint8Array(t))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(t,o,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(o);try{a.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(a.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var z=function(e){C=e},G=function(){return C},q=function(e){S=e},Y=function(){return S},J=function(){return W},X=function(e){W=e},K=function(e){F=e},Q=function(){return F},Z=function(e){A=new Map,e.map((function(e,n){A.set(e.id,n)}))},$=function(e){if(A){var n=A.get(e);X(n+1)}},ee=function(e,n){for(var t=he(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},ne=function(e,n){for(var t=he(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},te=function(e){var n,t=he(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},oe=function(e,n){var t=he(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ie=!1,re=function(e,n,t){var o=j(n,e,t),i=he(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=he(e);if(null!==r.el_){ie=!0;var l={id:e,adTagUrl:"".concat(n,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ie&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},le=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},ae=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},de=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},se=function(e){return de(e)},ue=function(e){i(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},ce=function(){var e=i(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},ve=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},me="",pe=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(me!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),me=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))};function Ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var ge=function(e){n(e).play()},fe=function(e){n(e).pause()},Ee=function(e,t){var o=n(e),i=o.currentTime()+t;o.currentTime(i)},we=function(e,t){var o=n(e),i=o.currentTime(),r=i<=t?0:i-t;o.currentTime(r)},Te=function(e){return!!n.getPlayer("".concat(e))},ye=function(e){return n(e).paused()},he=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},_e=function(e,n,t){var o,i,r;$(n);var l=0,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&m(n,t).then((function(e){var n,t,o,i,r,d;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,a=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){s(n,t).then((function(n){var t,r,d,s,u,c,v,m,p,I,g=null==n?void 0:n.data;null==g||null===(t=g.video)||void 0===t||null===(r=t.streamingInfo)||void 0===r||r.isLiveStream,z(n.data);var f=(null==g||null===(d=g.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(I=p.web)||void 0===I?void 0:I.url);f&&re(e,f,g);var E=B(g,e);if(E){var w,T,y,h,_,D,V,L,S,C,W,A,F,R,P=(null==g||null===(w=g.video)||void 0===w||null===(T=w.gist)||void 0===T?void 0:T.videoImageUrl)||(null==g||null===(y=g.video)||void 0===y||null===(h=y.gist)||void 0===h||null===(_=h.imageGist)||void 0===_?void 0:_.r16x9),N=he(e);if(N.poster(P),Ve(e,E),N.on("loadstart",(function(){b(),o({status:!0,msg:"Video Loaded",response:g})})),N.one("play",(function(){l&&a<95&&setTimeout((function(){N.currentTime(l)}),0)})),N.one("error",(function(){var e;i({status:!1,msg:(null==N||null===(e=N.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(D=g.video)||void 0===D||null===(V=D.contentDetails)||void 0===V||null===(L=V.closedCaptions)||void 0===L?void 0:L.length)>0||(null==g||null===(S=g.video)||void 0===S||null===(C=S.closedCaptions)||void 0===C?void 0:C.length)>0)W=((null==g||null===(A=g.video)||void 0===A||null===(F=A.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null==g||null===(R=g.video)||void 0===R?void 0:R.closedCaptions)).filter((function(e){return"VTT"===e.format})),oe(e,W);else!function(e){var n=he(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))}(e)}else O(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){Le(t,e,i,n)}))}))},Oe=function(e,n,t){var o=he(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},be=function(e){var n=he(e);if(De(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},De=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()},Ve=function(e,n){he(e).src(n)},Le=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Te(t)&&O(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ie(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Se=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{c as A,s as B,Le as C,u as D,m as E,ve as F,re as G,oe as H,q as I,de as J,se as K,Y as L,J as M,ue as N,ye as O,X as P,ae as Q,ce as R,pe as S,Z as T,$ as U,G as a,z as b,b as c,D as d,Q as e,p as f,he as g,O as h,K as i,Ee as j,fe as k,Oe as l,Ve as m,Te as n,_e as o,ge as p,be as q,we as r,v as s,ee as t,ne as u,te as v,B as w,Se as x,_ as y,le as z};
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"video.js";import t from"axios";import"js-cookie";import o from"ua-parser-js";import i from"@babel/runtime/helpers/toConsumableArray";var r={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 l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var d={name:"@viewlift/player-backup",version:"1.0.44-backup",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"}},s=function(e,n){var o,i,r,l;return null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):t({url:y(),params:a({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":d.version},withCredentials:!0})},u=function(e,n){var o,i;return t({url:h()+r.getLinearChannelDetails,params:a(a(a(a(a({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===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n}})},c=function(e,n){var o,i,r=JSON.parse(atob(n.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):t({url:h()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},v=function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:w(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r=a({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return t({url:T(),method:"POST",headers:{Authorization:n},data:r,params:a({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},m=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:f(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:E(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},p=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:g(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:I(i),headers:{Authorization:e.token}})},I=function(e){return h()+"".concat(null==r?void 0:r.getSeriesWatchHistoryV2,"/").concat(e)},g=function(){return h()+"".concat(null==r?void 0:r.getSeriesWatchHistoryV1)},f=function(e){return h()+"".concat(null==r?void 0:r.getVideoInfoV1,"/").concat(e)},E=function(e,n){return h()+"".concat(null==r?void 0:r.getVideoInfoV2,"/").concat(n,"/").concat(e)},w=function(){return h()+"".concat(null==r?void 0:r.saveWatchHistoryV1)},T=function(){return h()+"".concat(null==r?void 0:r.saveWatchHistoryV2)},y=function(){return h()+"".concat(null==r?void 0:r.getVideoDetails)},h=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==r?void 0:r.apiBaseUrl)},_=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},O=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},b=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var D=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function L(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=o(navigator.userAgent);var S,C,W,A,F,R=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},P=function(e){var n=N(e,"video.tags",[]),t=N(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},N=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},k=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},j=function(){var e,n,t,o,i,r,l,a,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,I=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,g=he(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=N(p,"video.gist.id",""),y=L(L({},x(I)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:R(w,E),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:N(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(t=g.options_)||void 0===t?void 0:t.autoplay)||1,VIEWLIFT_MUTE:(null==g||null===(o=g.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:P(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(N(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+N(p,"video.gist.permalink","")),VIEWLIFT_COPPA:N(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:N(null===(a=window)||void 0===a||null===(d=a.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:N(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:N(p,"video.series[0].gist.title",N(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:N(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:N(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:N(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},x=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(k()?s?a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=k()?L(L({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):L(L({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=L(L({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=k()?L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):L(L({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},B=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,m,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[I])||void 0===t?void 0:t.drmEnabled,f=null==e||null===(o=e[I])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[I])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[I])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[I])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return H(E);if(g){var y=M(f,n);return y.src=j(y.src,n,e),y}if("Safari"!==D()&&T)return U(f);if(w){var h=H(f);return h.src=j(h.src,n,e),h}if(null!=f&&f.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(f);return _.src=j(_.src,n,e),_}return null},U=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},H=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},M=function(e,t){var o=e.fairPlay,i=e.widevine,r=e.playReady,l=D(),a=he(t);if("Safari"===l){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(i,(function(e,n,t){console.log(e),e&&o(e),o(null,new Uint8Array(t))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(t,o,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(o);try{a.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(a.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var z=function(e){C=e},G=function(){return C},q=function(e){S=e},Y=function(){return S},J=function(){return W},X=function(e){W=e},K=function(e){F=e},Q=function(){return F},Z=function(e){A=new Map,e.map((function(e,n){A.set(e.id,n)}))},$=function(e){if(A){var n=A.get(e);X(n+1)}},ee=function(e,n){for(var t=he(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},ne=function(e,n){for(var t=he(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},te=function(e){var n,t=he(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},oe=function(e,n){var t=he(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ie=!1,re=function(e,n,t){var o=j(n,e,t),i=he(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=he(e);if(null!==r.el_){ie=!0;var l={id:e,adTagUrl:"".concat(n,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ie&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},le=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},ae=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},de=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},se=function(e){return de(e)},ue=function(e){i(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},ce=function(){var e=i(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},ve=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},me="",pe=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(me!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),me=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))};function Ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var ge=function(e){n(e).play()},fe=function(e){n(e).pause()},Ee=function(e,t){var o=n(e),i=o.currentTime()+t;o.currentTime(i)},we=function(e,t){var o=n(e),i=o.currentTime(),r=i<=t?0:i-t;o.currentTime(r)},Te=function(e){return!!n.getPlayer("".concat(e))},ye=function(e){return n(e).paused()},he=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},_e=function(e,n,t){var o,i,r;$(n);var l=0,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&m(n,t).then((function(e){var n,t,o,i,r,d;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,a=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){s(n,t).then((function(n){var t,r,d,s,u,c,v,m,p,I,g=null==n?void 0:n.data,f=(null==g||null===(t=g.video)||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;z(n.data);var E=(null==g||null===(d=g.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(I=p.web)||void 0===I?void 0:I.url);E&&re(e,E,g);var w=B(g,e);if(w){var T,y,h,_,D,V,L,S,C,W,A,F,R,P,N=(null==g||null===(T=g.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==g||null===(h=g.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(D=_.imageGist)||void 0===D?void 0:D.r16x9),k=he(e);if(k.poster(N),Ve(e,w),k.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:g})})),k.on("loadeddata",(function(){b(),o({status:!0,msg:"Video Loaded",response:g})})),k.one("play",(function(){l&&a<95&&setTimeout((function(){k.currentTime(l)}),0)})),k.one("error",(function(){var e;i({status:!1,msg:(null==k||null===(e=k.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(V=g.video)||void 0===V||null===(L=V.contentDetails)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0||(null==g||null===(C=g.video)||void 0===C||null===(W=C.closedCaptions)||void 0===W?void 0:W.length)>0)A=((null==g||null===(F=g.video)||void 0===F||null===(R=F.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==g||null===(P=g.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),oe(e,A);else!function(e){var n=he(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))}(e)}else O(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){Le(t,e,i,n)}))}))},Oe=function(e,n,t){var o=he(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},be=function(e){var n=he(e);if(De(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},De=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()},Ve=function(e,n){he(e).src(n)},Le=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Te(t)&&O(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ie(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Se=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{c as A,s as B,Le as C,u as D,m as E,ve as F,re as G,oe as H,q as I,de as J,se as K,Y as L,J as M,ue as N,ye as O,X as P,ae as Q,ce as R,pe as S,Z as T,$ as U,G as a,z as b,b as c,D as d,Q as e,p as f,he as g,O as h,K as i,Ee as j,fe as k,Oe as l,Ve as m,Te as n,_e as o,ge as p,be as q,we as r,v as s,ee as t,ne as u,te as v,B as w,Se as x,_ as y,le as z};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"axios";import i from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import t from"video.js";import{g as r,d as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as I,q as P,t as k,u as O,v as E,w as S,x as j,y as D,z as A,A as R,B as F,C,D as B,E as M,F as x,G as _,H,I as N}from"./generic-29eb27c1.js";import{o as L,g as V,a as U,s as W,b as q}from"./util-c26d0ca6.js";import{g as z}from"./renditions-354bfc7a.js";import{playSelectedResolution as G}from"./resolution-0c647183.js";import{s as J}from"./localisation-0bf399a1.js";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/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function K(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function Q(e,n){K("event",e,n)}function Y(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,o)}return i}function X(n){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?Y(Object(o),!0).forEach((function(i){e(n,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Y(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function $(){var e=window.sessionStorage.getItem("uid");return e||(e=Z(),window.sessionStorage.setItem("uid",e),e)}function ee(){var e=sessionStorage.getItem("token"),n=JSON.parse(atob(e.split(".")[1]));return null!=n&&n.anonymousId?"guest-user":null==n?void 0:n.userId}window.initialise=function(e){window.sid=Z(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",(function(){var i,o,t,r=Math.floor(e.currentTime());Q(r?"FAILED_TO_START":"DROPPED_STREAM",X({pfm:window.platform,uid:$(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(t=o.beacon)||void 0===t?void 0:t.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),Q("PLAY",X({pfm:window.platform,uid:$(),vid:window.videoId,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:"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(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,n){var i,o;if(n.el_){var t,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(i=n.el_)&&void 0!==i&&null!==(o=i.className)&&void 0!==o&&o.includes("vjs-waiting"))Q("BUFFERING",X({pfm:window.platform,uid:$(),vid:window.videoId,videoPosition:n.el_&&Math.floor(n.currentTime())},null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var n,i,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,Q("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$(),vid:window.videoId},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:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var n,i,o,t,r,l;Q("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},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:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),Q("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var n=[];e.on("timeupdate",(function(){var i=Math.floor(e.currentTime());i>=30&&i%30==0&&!n.includes(i)&&(n.push(i),fireEvent({eventName:"PING",videoPosition:i,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var n=e.currentTime(),i=e.duration(),o=e.buffered(),t=0;t<o.length;t++){var r=o.start(t),l=o.end(t);if(ne(n,r,l)){var a=Math.round(i-l);if(isFinite(a))return a}}}))()};var ne=function(e,n,i){return e>=n&&e<=i};window.fireEvent=function(e){var i,o,t,r,l,a,s,d,u,c,v=[X(X(X({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(t=o.beacon)||void 0===t?void 0:t.params),{},{uid:$(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:ee(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];n({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ie,oe,te=function(e){var n,i,o=r(null==e?void 0:e.playerId);null!=e&&null!==(n=e.series)&&void 0!==n&&n.enable||null==e||!e.chromecastReceiverId||null===(i=window)||void 0===i||!i.cast?console.log("Chromecast plugin is not available"):null==o||o.chromecast({receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}),null!=e&&e.airplay&&"Safari"==l()?null==o||o.airPlay({addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available")},re=function(e,n){var i=r(e);i&&n&&i.controlBar&&i.controlBar.progressControl.seekBar.on("click",(function(n){var i,o,r,l,a,s=this.el(),d=t.dom.getPointerPosition(s,n).x;t.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(i=window)||void 0===i||null===(o=i.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function le(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,o)}return i}var ae=[],se=0,de=null;function ue(n,i,o){var t,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];oe=(null==i||null===(t=i.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1";var d=null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(n.currentTime()),c=Math.floor(n.duration()),v=null==i||null===(l=i.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==oe?m={videoId:ie,watchedTime:Math.floor(n.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:i.siteOwner,userId:i.userId,xApiKey:v}:"v2"==oe&&(m=function(n){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?le(Object(o),!0).forEach((function(i){e(n,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({videoId:ie,watchedTime:Math.floor(n.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},de&&{seriesId:de})),a(m,i.token,oe).then((function(e){})).catch((function(e){})),se=u+o}var ce=function(e,n,i){var o=r(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var t=parseFloat(n)/100;o.volume(t),i&&i({status:!0,msg:"Volume set to ".concat(n,"%")})}else i&&i({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else i({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ve=function(e){var n=r(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function me(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,o)}return i}function fe(n){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?me(Object(o),!0).forEach((function(i){e(n,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):me(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var we=function(e,n,i,o){var t,l,a=o.res,m=o.sres,f=r(e),w=(null==a?void 0:a.contentType)||"video";null==a||null===(t=a[w])||void 0===t||null===(l=t.streamingInfo)||void 0===l||l.isLiveStream,c(a),f.on("loadstart",(function(){s(),i.resolve(fe({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:a}:{response:a}))})),f.on("loadeddata",(function(){var o;(null==f||!f.muted())&&ce(e,sessionStorage.getItem("volume")||"100");var t,l,d=u();(s(),i.resolve(fe({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:a}:{response:a})),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&!n.isAnonymousUser)&&function(e,n,i){var o,t;null!=n&&n.series&&(de=null==n||null===(o=n.series)||void 0===o?void 0:o.id),ae=[],se=0,ie=i;var l=(null==n||null===(t=n.watchHistory)||void 0===t?void 0:t.interval)||30,a=r(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ae.includes(se)||(e==se?(ae.push(e),ue(a,n,l)):e>se&&(se=e+l))})),a.on("ended",(function(){ue(a,n,l,!0)})))}(e,n,null==d||null===(t=d.video)||void 0===t||null===(l=t.gist)||void 0===l?void 0:l.id)})),f.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];f.trigger("subtitlechanged",n)})),f.on("subtitlechanged",(function(e,n){var i,o,t,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(i=window)||void 0===i||null===(o=i.cast)||void 0===o||null===(t=o.framework)||void 0===t||null===(r=t.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),f.on("loadedmetadata",(function(){window.endFirstFrame(f)})),f.one("error",(function(){var n,o;d(e,(null==f||null===(n=f.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==f||null===(o=f.error())||void 0===o?void 0:o.message)||"Some error occured"})})),f.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var i,o,t,r=null===(i=u())||void 0===i||null===(o=i.video)||void 0===o||null===(t=o.gist)||void 0===t?void 0:t.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){f.currentTime(a)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){f.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),f.on("volumechange",(function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},pe=function(e,n){var i=null==n?void 0:n.skin;"live"==i?import("./skin-06ef0296.js").then((function(i){i.initialiseSkin(e,n)})):"default"==i?import("./skin-ec7489b0.js").then((function(i){i.initialiseSkin(e,n)})):"carousel"==i?import("./skin-3e3ee571.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==i?import("./skin-850fe8a5.js").then((function(i){i.initialiseSkin(e,n)})):"multiplayer"==i&&import("./skin-c60cb1cc.js").then((function(i){i.initialiseSkin(e,n)}))},he=function(e){return new Promise((function(n,i){if(ge(e))i("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,o.onload=function(){n()},o.onerror=function(n){i("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}}))},ge=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ye=function(e,n){n.controlBar.el_.style.color=e,n.controlBar.el_.querySelector(".vjs-play-progress")&&(n.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),n.controlBar.el_.querySelector(".vjs-volume-level")&&(n.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var be,Te=function(){var e=i(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ie=function(){var e=i(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){he("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(t)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(t)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),he("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Te,loadEMELibrary:Ie});function ke(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,o)}return i}function Oe(n){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?ke(Object(o),!0).forEach((function(i){e(n,i,o[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ke(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ee=function(n,a,s,u){var c,v,m,f,w,p,h,g,y,T,I,P,k,O,E,D,A,R,F,C,B,M,N,L,V,U,W,q,z,G,J,K,Q,Y=a.res,X=void 0===Y?null:Y,Z=a.sres,$=void 0===Z?null:Z,ee=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,ne=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==ee&&"NOT_CONNECTED"!==ee?["html5","chromecast"]:["chromecast","html5"]:["html5"],ie=(null===(p=X)||void 0===p?void 0:p.contentType)||"video",oe=x(null===(h=X)||void 0===h||null===(g=h[ie])||void 0===g||null===(y=g.gist)||void 0===y?void 0:y.videoImageUrl)||x(null===(T=X)||void 0===T||null===(I=T[ie])||void 0===I||null===(P=I.gist)||void 0===P||null===(k=P.imageGist)||void 0===k?void 0:k.r16x9),le=(null===(O=X)||void 0===O||null===(E=O[ie])||void 0===E||null===(D=E.liveDetails)||void 0===D?void 0:D.isDvrEnabled)||!1,ae=(null===(A=X)||void 0===A||null===(R=A[ie])||void 0===R||null===(F=R.streamingInfo)||void 0===F?void 0:F.isLiveStream)||!1,se=(null==s?void 0:s.drmLibrary)||!1,de=(null===(C=X)||void 0===C||null===(B=C.ads)||void 0===B||null===(M=B.preRoll)||void 0===M||null===(N=M.adTags)||void 0===N||null===(L=N.web)||void 0===L?void 0:L.active)&&(null===(V=X)||void 0===V||null===(U=V.ads)||void 0===U||null===(W=U.preRoll)||void 0===W||null===(q=W.adTags)||void 0===q||null===(z=q.web)||void 0===z?void 0:z.url);X=Oe(Oe({},X),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var ue=(Q={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:le},e(Q,"autoplay",null==s?void 0:s.autoplay),e(Q,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!de),e(Q,"loop",(null==s?void 0:s.loop)||!1),e(Q,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(Q,"html5",Oe(Oe({dash:Oe(Oe({},!t.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:Oe(Oe({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(G=s.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(K=s.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(Q,"poster",oe),e(Q,"techOrder",ne),e(Q,"chromecast",{requestCustomDataFn:function(e){var i=r(n);console.log(i.textTracksJson_);var o=i.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,n,i){var o,t,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(o=e.video)||void 0===o||null===(t=o.gist)||void 0===t?void 0:t.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=i,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(X,e,o)}}),Q),ce=t(n,ue,function(){var e=i(o.mark((function e(){var i,r,a,c,v,m,f,w,p,h,g,y,T,I,P,k,O,E,D,A,R,F,C,B;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(te(s),ae&&u.resolve(Oe({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:X}:{response:X})),window.initialise(ce),window.firstFrame(ce),"white"!==window.controlsColor&&ye(window.controlsColor,ce),/Android/i.test(navigator.userAgent)&&(t.options.vhs.overrideNative=!0),I=null===(i=X)||void 0===i||null===(r=i[ie])||void 0===r?void 0:r.drmEnabled,P=null===(a=X)||void 0===a||null===(c=a[ie])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!I&&!se){e.next=21;break}if("Safari"!==l()){e.next=14;break}return e.next=12,Ie();case 12:e.next=21;break;case 14:if("caliente"!=(null===(k=window)||void 0===k?void 0:k.siteName)){e.next=19;break}return e.next=17,Ie();case 17:e.next=21;break;case 19:return e.next=21,Te();case 21:le&&re(n,P),!de||null!=s&&null!==(m=s.customData)&&void 0!==m&&m.disableAds||_(n,de,X),(O=S(X,n))?b(n,O):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),d(n,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(f=X)||void 0===f||null===(w=f[ie])||void 0===w||null===(p=w.contentDetails)||void 0===p||null===(h=p.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=X)||void 0===g||null===(y=g[ie])||void 0===y||null===(T=y.closedCaptions)||void 0===T?void 0:T.length)>0)&&(B=(null===(D=X)||void 0===D||null===(A=D[ie])||void 0===A||null===(R=A.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null===(F=X)||void 0===F||null===(C=F[ie])||void 0===C?void 0:C.closedCaptions),E=B.filter((function(e){return"VTT"===e.format})),H(n,E)),null!=s&&s.disableControls?j(n):pe(n,Oe(Oe(Oe({},s),ue),{},{liveVideo:ae,isDvrEnabled:le,res:X,sres:$})),we(n,Oe(Oe(Oe({},s),ue),{},{liveVideo:ae}),u,{res:X,sres:$});case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Se(){return{loadVideoInstantly:w,onTimeUpdate:L,getVideoDuration:V,onVideoEnded:U,init:function(e){return new Promise((function(n,i){var o,t,r,a,s,d,u,v,w,p,h;if(!T(null==e?void 0:e.playerId)){var g=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,y=null==e?void 0:e.videoId,b=(null==e||null===(t=e.series)||void 0===t?void 0:t.enable)||!1;window.videoId=y;var I=null==e?void 0:e.token;if(I&&!D(I)){be=JSON.parse(atob(I.split(".")[1])),window.siteId=null===(r=be)||void 0===r?void 0:r.siteId,window.siteName=null===(a=be)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=be)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=be)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=be)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=be)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",I);var P=null==e?void 0:e.playerId,k=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,E=null==e?void 0:e.apiBaseUrl,S=(null==e||null===(w=e.analytics)||void 0===w?void 0:w.gaId)||null,j=null==e?void 0:e.errors;j&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,J(null==e||null===(p=e.customData)||void 0===p?void 0:p.localisation),E&&(window.playerEntitlementUrl=E),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!A(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Pe})).then((function(e){e.importIMA()})),!k||null!=e&&e.series||Promise.resolve().then((function(){return Pe})).then((function(e){e.importChromecast()})),O&&"Safari"==l()&&Promise.resolve().then((function(){return Pe})).then((function(e){e.importAirplay()})),S&&he("https://www.googletagmanager.com/gtag/js?id=".concat(S)).then((function(){return e=S,window.dataLayer=window.dataLayer||[],K("js",new Date),void K("config",e);var e})).catch((function(e){}));var x=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(P));if(x&&x.addEventListener("contextmenu",(function(e){return e.preventDefault()})),b){var _,H=null==e||null===(_=e.series)||void 0===_?void 0:_.id;R(H,I).then((function(o){var t,r,l,a=o.data,s=o.data.seasons;N(s);var d=y||(null==s||null===(t=s[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,n){var i=new Map;m({videoId:e,token:n}).then((function(e){e.data.map((function(e){i.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(i)})).catch((function(e){return console.log(e)}))}(H,I),F(d,I).then((function(o){var t,r,l;window.contentType=null==o||null===(t=o.data)||void 0===t||null===(r=t.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(o.data),Ee(P,{res:null==o?void 0:o.data,sres:a},e,{resolve:n,reject:i})})).catch((function(e){C(e,P,i,y)}))})).catch((function(e){C(e,P,i)}))}else if(g){var L=null==e?void 0:e.epg;B(L,I).then((function(o){var t=null==o?void 0:o.data;t.contentType="linearchannel",Ee(P,{res:t},e,{resolve:n,reject:i})})).catch((function(e){C(e,P,i,y)}))}else F(y,I).then((function(o){var t,r,l,a;window.contentType=null==o||null===(t=o.data)||void 0===t||null===(r=t.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==o?void 0:o.data);var s=null==o?void 0:o.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?M(y,I).then((function(o){var t,r,l,a,d,u;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==o?void 0:o.data)),e.watchHistoryResumeTime=(null==o||null===(d=o.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==o||null===(u=o.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Ee(P,{res:s},e,{resolve:n,reject:i})})).catch((function(o){var t,r,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(o)),Ee(P,{res:s},e,{resolve:n,reject:i})})):Ee(P,{res:s},e,{resolve:n,reject:i})})).catch((function(e){C(e,P,i,y)}))}else i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}})}}))},getRenditions:z,skip:p,getPlayer:r,play:h,pause:g,detectBrowser:l,rewind:y,loadVideo:b,seekToTimeStamp:W,isPlayerInitialised:T,load:I,dispose:P,enableCaptions:k,disableCaptions:O,getCaptions:E,playSelectedResolution:G,getSource:S,setVolume:ce,getVolume:ve,disableControls:j,setPlaybackSpeed:q}}export{Se as default};
1
+ import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import i from"axios";import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import t from"video.js";import{g as r,d as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as I,q as P,t as k,u as O,v as E,w as S,x as j,y as D,z as A,A as R,B as F,C,D as B,E as M,F as x,G as _,H,I as N}from"./generic-518c65e7.js";import{o as L,g as V,a as U,s as W,b as q}from"./util-c658b894.js";import{g as z}from"./renditions-4e100e8d.js";import{playSelectedResolution as G}from"./resolution-1cf62681.js";import{s as J}from"./localisation-0bf399a1.js";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/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function K(){var e,i;null===(e=window)||void 0===e||null===(i=e.dataLayer)||void 0===i||i.push(arguments)}function Q(e,i){K("event",e,i)}function Y(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);i&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,o)}return n}function X(i){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Y(Object(o),!0).forEach((function(n){e(i,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):Y(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}))}return i}function Z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function $(){var e=window.sessionStorage.getItem("uid");return e||(e=Z(),window.sessionStorage.setItem("uid",e),e)}function ee(){var e=sessionStorage.getItem("token"),i=JSON.parse(atob(e.split(".")[1]));return null!=i&&i.anonymousId?"guest-user":null==i?void 0:i.userId}window.initialise=function(e){window.sid=Z(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var i=Math.floor(e.currentTime());e.on("error",(function(){var n,o,t,r=Math.floor(e.currentTime());Q(r?"FAILED_TO_START":"DROPPED_STREAM",X({pfm:window.platform,uid:$(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(t=o.beacon)||void 0===t?void 0:t.params)),fireEvent({eventName:i===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var i,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),Q("PLAY",X({pfm:window.platform,uid:$(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.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(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,i){var n,o;if(i.el_){var t,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=i&&null!==(n=i.el_)&&void 0!==n&&null!==(o=n.className)&&void 0!==o&&o.includes("vjs-waiting"))Q("BUFFERING",X({pfm:window.platform,uid:$(),vid:window.videoId,videoPosition:i.el_&&Math.floor(i.currentTime())},null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:i.el_&&Math.floor(i.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var i,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,Q("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$(),vid:window.videoId},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.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 i,n,o,t,r,l;Q("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(i=window)||void 0===i||null===(n=i.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),Q("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:$(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.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 i=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!i.includes(n)&&(i.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 i=e.currentTime(),n=e.duration(),o=e.buffered(),t=0;t<o.length;t++){var r=o.start(t),l=o.end(t);if(ie(i,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var ie=function(e,i,n){return e>=i&&e<=n};window.fireEvent=function(e){var n,o,t,r,l,a,s,d,u,c,v=[X(X(X({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(t=o.beacon)||void 0===t?void 0:t.params),{},{uid:$(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:ee(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];i({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ne,oe,te=function(e){var i,n,o=r(null==e?void 0:e.playerId);null!=e&&null!==(i=e.series)&&void 0!==i&&i.enable||null==e||!e.chromecastReceiverId||null===(n=window)||void 0===n||!n.cast?console.log("Chromecast plugin is not available"):null==o||o.chromecast({receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}),null!=e&&e.airplay&&"Safari"==l()?null==o||o.airPlay({addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available")},re=function(e,i){var n=r(e);n&&i&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(i){var n,o,r,l,a,s=this.el(),d=t.dom.getPointerPosition(s,i).x;t.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function le(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);i&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,o)}return n}var ae=[],se=0,de=null;function ue(i,n,o){var t,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];oe=(null==n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1";var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(i.currentTime()),c=Math.floor(i.duration()),v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==oe?m={videoId:ne,watchedTime:Math.floor(i.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==oe&&(m=function(i){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?le(Object(o),!0).forEach((function(n){e(i,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}))}return i}({videoId:ne,watchedTime:Math.floor(i.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},de&&{seriesId:de})),a(m,n.token,oe).then((function(e){})).catch((function(e){})),se=u+o}var ce=function(e,i,n){var o=r(e);if(o)if(i>=0&&i<=100){o.muted()&&o.muted(!1);var t=parseFloat(i)/100;o.volume(t),n&&n({status:!0,msg:"Volume set to ".concat(i,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ve=function(e){var i=r(e);return i?parseInt(100*i.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function me(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);i&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,o)}return n}var fe=function(i,n,o,t){var l,a,m=t.res,f=t.sres,w=r(i),p=(null==m?void 0:m.contentType)||"video",h=(null==m||null===(l=m[p])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){h&&o.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var t;(null==w||!w.muted())&&ce(i,sessionStorage.getItem("volume")||"100");var l,a,d=u();(s(),o.resolve(function(i){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?me(Object(o),!0).forEach((function(n){e(i,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):me(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}))}return i}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&!n.isAnonymousUser)&&function(e,i,n){var o,t;null!=i&&i.series&&(de=null==i||null===(o=i.series)||void 0===o?void 0:o.id),ae=[],se=0,ne=n;var l=(null==i||null===(t=i.watchHistory)||void 0===t?void 0:t.interval)||30,a=r(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ae.includes(se)||(e==se?(ae.push(e),ue(a,i,l)):e>se&&(se=e+l))})),a.on("ended",(function(){ue(a,i,l,!0)})))}(i,n,null==d||null===(l=d.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.id)})),w.textTracks().on("change",(function(e){var i=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",i)})),w.on("subtitlechanged",(function(e,i){var n,o,t,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(t=o.framework)||void 0===t||null===(r=t.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=i?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,n;d(i,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==w||null===(n=w.error())||void 0===n?void 0:n.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var i,o,t,r=null===(i=u())||void 0===i||null===(o=i.video)||void 0===o||null===(t=o.gist)||void 0===t?void 0:t.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},we=function(e,i){var n=null==i?void 0:i.skin;"live"==n?import("./skin-70d4628f.js").then((function(n){n.initialiseSkin(e,i)})):"default"==n?import("./skin-96fd2eb4.js").then((function(n){n.initialiseSkin(e,i)})):"carousel"==n?import("./skin-137a25bb.js").then((function(i){i.initaliseSkin(e)})):"defaultV2"==n?import("./skin-825cb6f3.js").then((function(n){n.initialiseSkin(e,i)})):"multiplayer"==n&&import("./skin-4a0460c1.js").then((function(n){n.initialiseSkin(e,i)}))},pe=function(e){return new Promise((function(i,n){if(he(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,o.onload=function(){i()},o.onerror=function(i){n("Error while loading script ".concat(e," : ").concat(i))},document.head.appendChild(o)}}))},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ge=function(e,i){i.controlBar.el_.style.color=e,i.controlBar.el_.querySelector(".vjs-play-progress")&&(i.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),i.controlBar.el_.querySelector(".vjs-volume-level")&&(i.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var ye,be=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ie=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(t)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(t)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:be,loadEMELibrary:Te});function Pe(e,i){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);i&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,o)}return n}function ke(i){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(o),!0).forEach((function(n){e(i,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):Pe(Object(o)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}))}return i}var Oe=function(i,a,s,u){var c,v,m,f,w,p,h,g,y,T,I,P,k,O,E,D,A,R,F,C,B,M,N,L,V,U,W,q,z,G,J,K,Q,Y=a.res,X=void 0===Y?null:Y,Z=a.sres,$=void 0===Z?null:Z,ee=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,ie=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==ee&&"NOT_CONNECTED"!==ee?["html5","chromecast"]:["chromecast","html5"]:["html5"],ne=(null===(p=X)||void 0===p?void 0:p.contentType)||"video",oe=x(null===(h=X)||void 0===h||null===(g=h[ne])||void 0===g||null===(y=g.gist)||void 0===y?void 0:y.videoImageUrl)||x(null===(T=X)||void 0===T||null===(I=T[ne])||void 0===I||null===(P=I.gist)||void 0===P||null===(k=P.imageGist)||void 0===k?void 0:k.r16x9),le=(null===(O=X)||void 0===O||null===(E=O[ne])||void 0===E||null===(D=E.liveDetails)||void 0===D?void 0:D.isDvrEnabled)||!1,ae=(null===(A=X)||void 0===A||null===(R=A[ne])||void 0===R||null===(F=R.streamingInfo)||void 0===F?void 0:F.isLiveStream)||!1,se=(null==s?void 0:s.drmLibrary)||!1,de=(null===(C=X)||void 0===C||null===(B=C.ads)||void 0===B||null===(M=B.preRoll)||void 0===M||null===(N=M.adTags)||void 0===N||null===(L=N.web)||void 0===L?void 0:L.active)&&(null===(V=X)||void 0===V||null===(U=V.ads)||void 0===U||null===(W=U.preRoll)||void 0===W||null===(q=W.adTags)||void 0===q||null===(z=q.web)||void 0===z?void 0:z.url);X=ke(ke({},X),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var ue=(Q={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:le},e(Q,"autoplay",null==s?void 0:s.autoplay),e(Q,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!de),e(Q,"loop",(null==s?void 0:s.loop)||!1),e(Q,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(Q,"html5",ke(ke({dash:ke(ke({},!t.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:ke(ke({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(G=s.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(K=s.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(Q,"poster",oe),e(Q,"techOrder",ie),e(Q,"chromecast",{requestCustomDataFn:function(e){var n=r(i);console.log(n.textTracksJson_);var o=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,i,n){var o,t,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=i.keySystemOptions&&i.keySystemOptions[0]&&i.keySystemOptions[0].options&&i.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=i.keySystemOptions&&i.keySystemOptions[0]&&i.keySystemOptions[0].options&&i.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(o=e.video)||void 0===o||null===(t=o.gist)||void 0===t?void 0:t.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(X,e,o)}}),Q),ce=t(i,ue,function(){var e=n(o.mark((function e(){var n,r,a,c,v,m,f,w,p,h,g,y,T,I,P,k,O,E,D,A,R,F,C,B;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(te(s),ae&&u.resolve(ke({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:X}:{response:X})),window.initialise(ce),window.firstFrame(ce),"white"!==window.controlsColor&&ge(window.controlsColor,ce),/Android/i.test(navigator.userAgent)&&(t.options.vhs.overrideNative=!0),I=null===(n=X)||void 0===n||null===(r=n[ne])||void 0===r?void 0:r.drmEnabled,P=null===(a=X)||void 0===a||null===(c=a[ne])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!I&&!se){e.next=21;break}if("Safari"!==l()){e.next=14;break}return e.next=12,Te();case 12:e.next=21;break;case 14:if("caliente"!=(null===(k=window)||void 0===k?void 0:k.siteName)){e.next=19;break}return e.next=17,Te();case 17:e.next=21;break;case 19:return e.next=21,be();case 21:le&&re(i,P),!de||null!=s&&null!==(m=s.customData)&&void 0!==m&&m.disableAds||_(i,de,X),(O=S(X,i))?b(i,O):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),d(i,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(f=X)||void 0===f||null===(w=f[ne])||void 0===w||null===(p=w.contentDetails)||void 0===p||null===(h=p.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=X)||void 0===g||null===(y=g[ne])||void 0===y||null===(T=y.closedCaptions)||void 0===T?void 0:T.length)>0)&&(B=(null===(D=X)||void 0===D||null===(A=D[ne])||void 0===A||null===(R=A.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null===(F=X)||void 0===F||null===(C=F[ne])||void 0===C?void 0:C.closedCaptions),E=B.filter((function(e){return"VTT"===e.format})),H(i,E)),null!=s&&s.disableControls?j(i):we(i,ke(ke(ke({},s),ue),{},{liveVideo:ae,isDvrEnabled:le,res:X,sres:$})),fe(i,ke(ke(ke({},s),ue),{},{liveVideo:ae}),u,{res:X,sres:$});case 28:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Ee(){return{loadVideoInstantly:w,onTimeUpdate:L,getVideoDuration:V,onVideoEnded:U,init:function(e){return new Promise((function(i,n){var o,t,r,a,s,d,u,v,w,p,h;if(!T(null==e?void 0:e.playerId)){var g=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,y=null==e?void 0:e.videoId,b=(null==e||null===(t=e.series)||void 0===t?void 0:t.enable)||!1;window.videoId=y;var I=null==e?void 0:e.token;if(I&&!D(I)){ye=JSON.parse(atob(I.split(".")[1])),window.siteId=null===(r=ye)||void 0===r?void 0:r.siteId,window.siteName=null===(a=ye)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=ye)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=ye)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=ye)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=ye)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",I);var P=null==e?void 0:e.playerId,k=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,E=null==e?void 0:e.apiBaseUrl,S=(null==e||null===(w=e.analytics)||void 0===w?void 0:w.gaId)||null,j=null==e?void 0:e.errors;j&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,J(null==e||null===(p=e.customData)||void 0===p?void 0:p.localisation),E&&(window.playerEntitlementUrl=E),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!A(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Ie})).then((function(e){e.importIMA()})),!k||null!=e&&e.series||Promise.resolve().then((function(){return Ie})).then((function(e){e.importChromecast()})),O&&"Safari"==l()&&Promise.resolve().then((function(){return Ie})).then((function(e){e.importAirplay()})),S&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(S)).then((function(){return e=S,window.dataLayer=window.dataLayer||[],K("js",new Date),void K("config",e);var e})).catch((function(e){}));var x=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(P));if(x&&x.addEventListener("contextmenu",(function(e){return e.preventDefault()})),b){var _,H=null==e||null===(_=e.series)||void 0===_?void 0:_.id;R(H,I).then((function(o){var t,r,l,a=o.data,s=o.data.seasons;N(s);var d=y||(null==s||null===(t=s[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,i){var n=new Map;m({videoId:e,token:i}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(n)})).catch((function(e){return console.log(e)}))}(H,I),F(d,I).then((function(o){var t,r,l;window.contentType=null==o||null===(t=o.data)||void 0===t||null===(r=t.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(o.data),Oe(P,{res:null==o?void 0:o.data,sres:a},e,{resolve:i,reject:n})})).catch((function(e){C(e,P,n,y)}))})).catch((function(e){C(e,P,n)}))}else if(g){var L=null==e?void 0:e.epg;B(L,I).then((function(o){var t=null==o?void 0:o.data;t.contentType="linearchannel",Oe(P,{res:t},e,{resolve:i,reject:n})})).catch((function(e){C(e,P,n,y)}))}else F(y,I).then((function(o){var t,r,l,a;window.contentType=null==o||null===(t=o.data)||void 0===t||null===(r=t.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==o?void 0:o.data);var s=null==o?void 0:o.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?M(y,I).then((function(o){var t,r,l,a,d,u;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==o?void 0:o.data)),e.watchHistoryResumeTime=(null==o||null===(d=o.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==o||null===(u=o.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Oe(P,{res:s},e,{resolve:i,reject:n})})).catch((function(o){var t,r,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(o)),Oe(P,{res:s},e,{resolve:i,reject:n})})):Oe(P,{res:s},e,{resolve:i,reject:n})})).catch((function(e){C(e,P,n,y)}))}else n({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}})}}))},getRenditions:z,skip:p,getPlayer:r,play:h,pause:g,detectBrowser:l,rewind:y,loadVideo:b,seekToTimeStamp:W,isPlayerInitialised:T,load:I,dispose:P,enableCaptions:k,disableCaptions:O,getCaptions:E,playSelectedResolution:G,getSource:S,setVolume:ce,getVolume:ve,disableControls:j,setPlaybackSpeed:q}}export{Ee as default};
@@ -1 +1 @@
1
- import{g as e,j as r,r as t}from"./generic-29eb27c1.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
1
+ import{g as e,j as r,r as t}from"./generic-518c65e7.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{o as c,p as u}from"./generic-518c65e7.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var m=s.getComponent("Component"),p=function(){l(h,m);var p,v,f=(p=h,v=d(),function(){var e,t=n(p);if(v){var i=n(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return o(this,e)});function h(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),l=f.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),p=m.getPropertyValue("height"),v=m.getPropertyValue("width"),f=p.slice(0,-2);v.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(s=r.config)||void 0===s||!s.liveVideo)||null!==(a=i(l))&&void 0!==a&&null!==(c=a.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(d=u.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(h,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,s=this,a=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==a||null===(n=a.classList)||void 0===n||n.add("".concat(this.config.skin)):null==a||null===(r=a.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(a,this.playerId),window.onresize=function(){s.multicamCssPositioning(a,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,o);var n=sessionStorage.getItem("token");return o.addEventListener("click",(function(t){a(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id,n).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),h}();export{p as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as s,e as l,h as i}from"./icons-c2efba97.js";import{R as c,g as d,o as m,p}from"./generic-518c65e7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var h=r.getComponent("Component"),v=function(){a(g,h);var v,y,f=(v=g,y=u(),function(){var e,t=o(v);if(y){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return n(this,e)});function g(t){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(a=f.call(this,t,n)).playerId=n.playerId,a.seriesData=n.sres,a.streams=n.streams,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a}return t(g,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"stream-container hidden"});r.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(c(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",r.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),n=r.dom.createEl("div",{className:"stream-selector-head"}),o=r.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=r.dom.createEl("div",{className:"stream-selector-content"}),u=r.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,n=r.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var a=r.dom.$$(".stream"),o=0;o<a.length;o++)a[o].style.border="none",a[o].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",m(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){p(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),o.alt="No Thumbnail Available",n.append(o),r.dom.appendContent(u,n),r.dom.appendContent(c,u)},v=0;v<this.streams.length;v++)h(v);r.dom.appendContent(n,o),r.dom.appendContent(n,s),r.dom.appendContent(e,n),r.dom.appendContent(e,c),d(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),g}();export{v as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{s}from"./loader-580278fe.js";import{o as i,p as a}from"./generic-518c65e7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var d=r.getComponent("Component"),u=function(){l(p,d);var u,m,v=(u=p,m=c(),function(){var e,t=n(u);if(m){var l=n(this).constructor;e=Reflect.construct(t,arguments,l)}else e=t.apply(this,arguments);return o(this,e)});function p(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(l=v.call(this,t,o)).playerId=o.playerId,l.config=o.config,l.createUI(null==o?void 0:o.config.streams),l}return t(p,[{key:"createEl",value:function(){return r.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,o,n,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(o=this.config)&&void 0!==o&&o.liveui)&&!(null!=this&&null!==(n=this.config)&&void 0!==n&&n.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var m=r.dom.createEl("div",{className:"broadcast"});m.innerHTML="Broadcasts";var v=r.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==v||null===(a=v.classList)||void 0===a||a.add("dvr"):null==v||null===(c=v.classList)||void 0===c||c.add("nondvr"),v.style.width="".concat(window.innerWidth-50,"px");var p=r.dom.createEl("div",{className:"tilecontainer-potrait"});r.dom.appendContent(d,m),r.dom.appendContent(d,v),r.dom.appendContent(v,p),m.addEventListener("click",(function(){null!=v&&v.classList.contains("hideMWebTray")?(v.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==v||v.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var h=0;h<e.length;h++)this.createTile(e[h],h)}},{key:"createTile",value:function(e,t){var l=this,o=this.el(),n=r.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(n.style.border="2px solid red"),n.style.backgroundImage="url(".concat(e.img,")");var c=r.dom.$(".tilecontainer-potrait",this.contentEl());r.dom.appendContent(c,n);var d=sessionStorage.getItem("token");return n.addEventListener("click",(function(t){s(l.playerId),l.removeSelectedTile();var o=document.getElementsByClassName("".concat(t.srcElement.className))[0];o&&(o.style.border="2px solid red"),i(l.playerId,e.id,d).then((function(e){a(l.playerId)}))})),o}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./mwebPotrait-3c1805d8.js").then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),o=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),n=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==o||o.classList.add("hide-controls"),null==n||n.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),p}();export{u as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-c2efba97.js";import{o as s,b as a,Q as d}from"./generic-518c65e7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var u=r.getComponent("Component"),c=function(){n(c,u);var s,a,d=(s=c,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function c(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(c,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),c}(),m=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t,n=sessionStorage.getItem("token");s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id,n).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),u=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{c as default,m as initaliseFunctionality};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as s,e as r}from"./icons-c2efba97.js";import{R as d,g as c,o as p,P as m}from"./generic-518c65e7.js";import{a as u}from"./autoNextVideo-92a16327.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"./util-c658b894.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var y=i.getComponent("Component"),h=function(){l(b,y);var h,f,g=(h=b,f=v(),function(){var e,t=a(h);if(f){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function b(e){var n,l,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,b),(a=g.call(this,e,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=null==i||null===(n=i.playlist)||void 0===n?void 0:n.content,a.cb=(null==i||null===(l=i.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==i||null===(o=i.playlist)||void 0===o?void 0:o.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&u({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(b,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=i.dom.createEl("div",{className:"selection-container hidden"});i.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),i.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),o=i.dom.createEl("div",{className:"playlist-selector-head"}),a=i.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var s=i.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=i.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,o,a=i.dom.createEl("div",{className:"playlist-container"}),s=i.dom.createEl("div",{className:"playlist-section",index:t}),r=i.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),c=i.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});i.dom.appendContent(s,r),i.dom.appendContent(s,c),i.dom.appendContent(a,s),i.dom.appendContent(d,a);var u=i.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=i.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.description)||"")}),y=i.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),i.dom.appendContent(u,y),i.dom.appendContent(u,v),i.dom.appendContent(a,u),i.dom.appendContent(d,a),u.onclick=function(e){e.stopPropagation(),m(t+1),p(n.playerId,n.videos[t].id,sessionStorage.getItem("token")).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,o,i=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(i=e(i))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(o=s.classList)||void 0===o||o.add("hidden"),a.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);i.dom.appendContent(o,a),i.dom.appendContent(o,s),i.dom.appendContent(t,o),i.dom.appendContent(t,d),c(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),b}();export{h as default};
@@ -1 +1 @@
1
- import{g as l}from"./generic-29eb27c1.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var e,d,v=null==o||null===(e=o.tech_)||void 0===e||null===(d=e.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(t=null==v?void 0:v.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort((function(l,i){return i.height-l.height})))}return t};export{i as g};
1
+ import{g as l}from"./generic-518c65e7.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var e,d,v=null==o||null===(e=o.tech_)||void 0===e||null===(d=e.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(t=null==v?void 0:v.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort((function(l,i){return i.height-l.height})))}return t};export{i as g};