@viewlift/player-backup 2.0.169-backup → 2.0.170-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 (49) hide show
  1. package/cjs/{autoNextVideo-b18583b0.js → autoNextVideo-64eb7e76.js} +1 -1
  2. package/cjs/bundle.css +3 -3
  3. package/cjs/{features-9af43661.js → features-bec43f2c.js} +1 -1
  4. package/cjs/{generic-9f637989.js → generic-b213cb89.js} +1 -1
  5. package/cjs/{index-e5fc9b6e.js → index-44d50f3c.js} +1 -1
  6. package/cjs/{index-050c0e0f.js → index-b63d87ed.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-a12dd551.js → multicamv2-2f128b90.js} +1 -1
  9. package/cjs/{multicamv2-a659a2b1.js → multicamv2-ab156f58.js} +1 -1
  10. package/cjs/{nextEpisodeButton-a1b94489.js → nextEpisodeButton-176ca818.js} +1 -1
  11. package/cjs/{playlist-1314bb95.js → playlist-028cfe36.js} +1 -1
  12. package/cjs/{series-c1490c2e.js → series-247b33bf.js} +1 -1
  13. package/cjs/{series-v2-93f3be92.js → series-v2-08fab93b.js} +1 -1
  14. package/cjs/{series-v2-f6b8ba96.js → series-v2-7beed8b1.js} +1 -1
  15. package/cjs/{skin-bbe15a2f.js → skin-06f5737f.js} +1 -1
  16. package/cjs/{skin-d7744eae.js → skin-1babd05b.js} +1 -1
  17. package/cjs/{skin-8a2b1efa.js → skin-a71df785.js} +1 -1
  18. package/cjs/{skin-97b54404.js → skin-b1381b44.js} +1 -1
  19. package/cjs/{skin-c60a42cc.js → skin-c4884fbb.js} +1 -1
  20. package/cjs/{skin-a1d6ec8a.js → skin-d2f3cb65.js} +1 -1
  21. package/cjs/{skin-7dad68a3.js → skin-dfa2ab0e.js} +1 -1
  22. package/cjs/{util-ca307e43.js → util-07a4832d.js} +1 -1
  23. package/cjs/{videoSelector-c26fa0bc.js → videoSelector-78fe6fe5.js} +1 -1
  24. package/cjs/{videoSelector-521d73d1.js → videoSelector-c74365e1.js} +1 -1
  25. package/esm/{autoNextVideo-b2b1dcef.js → autoNextVideo-6662a4a8.js} +1 -1
  26. package/esm/bundle.css +3 -3
  27. package/esm/{features-afa6b543.js → features-d8c6684a.js} +1 -1
  28. package/esm/{generic-e21fdb61.js → generic-0daefc45.js} +1 -1
  29. package/esm/{index-abc06824.js → index-6e0e957a.js} +1 -1
  30. package/esm/{index-b5c2b4c0.js → index-f522bee8.js} +1 -1
  31. package/esm/index.js +1 -1
  32. package/esm/{multicamv2-bef0bb77.js → multicamv2-5f58971a.js} +1 -1
  33. package/esm/{multicamv2-a17c68b4.js → multicamv2-d40dff42.js} +1 -1
  34. package/esm/{nextEpisodeButton-a17c23de.js → nextEpisodeButton-6e105ff0.js} +1 -1
  35. package/esm/{playlist-dfcb4552.js → playlist-f5e75f6e.js} +1 -1
  36. package/esm/{series-f68b4534.js → series-78119d9a.js} +1 -1
  37. package/esm/{series-v2-eb3fb4a4.js → series-v2-0c299ee7.js} +1 -1
  38. package/esm/{series-v2-0dd9b510.js → series-v2-125b1dfa.js} +1 -1
  39. package/esm/{skin-9c9a2ee9.js → skin-082904b9.js} +1 -1
  40. package/esm/{skin-c91fa37f.js → skin-378ead11.js} +1 -1
  41. package/esm/{skin-df073080.js → skin-4372b9ad.js} +1 -1
  42. package/esm/{skin-9f13e83e.js → skin-a2965a49.js} +1 -1
  43. package/esm/{skin-5c7fa838.js → skin-e373ab51.js} +1 -1
  44. package/esm/{skin-f4aa20b4.js → skin-e4e92c17.js} +1 -1
  45. package/esm/{skin-88d3eb07.js → skin-fd4547b9.js} +1 -1
  46. package/esm/{util-7d5b2427.js → util-19a0ca29.js} +1 -1
  47. package/esm/{videoSelector-31ecc342.js → videoSelector-27c53444.js} +1 -1
  48. package/esm/{videoSelector-bc90f24e.js → videoSelector-4a27b031.js} +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-9f637989.js"),n=require("./util-ca307e43.js"),o=require("./skin-516012d7.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then((function(e){o.highlightVideo(d,r),d++,s(e)})).catch((function(i){s(i),setTimeout((function(){o.highlightVideo(d,r),d++,e(d,r,u)}),5e3)})))},s=function(i){e&&e(i)};exports.autoPlayNext=function(l){clearTimeout(u);var h=null==l?void 0:l.content;e=null==l?void 0:l.cb;var a=l.playerId;n.onVideoEnded(a,(function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>h.length-1||(i.setVideoIdx(d+1),t.load(a,h[d].id).then((function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)})).catch((function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout((function(){t.isPaused(a)&&c(d,a,h)}),5e3)}))))}))},exports.switchToNext=c;
1
+ "use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-b213cb89.js"),n=require("./util-07a4832d.js"),o=require("./skin-516012d7.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then((function(e){o.highlightVideo(d,r),d++,s(e)})).catch((function(i){s(i),setTimeout((function(){o.highlightVideo(d,r),d++,e(d,r,u)}),5e3)})))},s=function(i){e&&e(i)};exports.autoPlayNext=function(l){clearTimeout(u);var h=null==l?void 0:l.content;e=null==l?void 0:l.cb;var a=l.playerId;n.onVideoEnded(a,(function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>h.length-1||(i.setVideoIdx(d+1),t.load(a,h[d].id).then((function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)})).catch((function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout((function(){t.isPaused(a)&&c(d,a,h)}),5e3)}))))}))},exports.switchToNext=c;
package/cjs/bundle.css CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
 
4
4
 
5
-
6
-
7
5
  .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
8
6
  height: 0.7em;
9
7
  position: absolute;
@@ -224,6 +222,8 @@
224
222
  }
225
223
 
226
224
 
225
+
226
+
227
227
  /* CSS for videojs-dvr-seekbar */
228
228
 
229
229
  .video-js.vjs-dvr-seekbar {
@@ -397,6 +397,7 @@
397
397
 
398
398
 
399
399
 
400
+
400
401
  .video-js .multicamera-parent.default{
401
402
  height: 345px;
402
403
  position: absolute;
@@ -479,7 +480,6 @@
479
480
 
480
481
 
481
482
 
482
-
483
483
  /* nextep */
484
484
  .next-ep-preview{
485
485
  position: absolute;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-9f637989.js"),s=require("./resolution-f9dcc1b4.js"),d=require("./skin-516012d7.js"),c=require("./localisation-56e0a999.js"),u=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-4ca6c759.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=u.getPlayer(e).el(),r=0,n=u.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-a12dd551.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-a659a2b1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-a1b94489.js")})).then((function(n){var o=n.default,l=u.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=u.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-1314bb95.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-v2-e42e0101.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=u.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-c1490c2e.js")})).then((function(n){var o=n.seriesModule,l=u.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},d=0;d<a.length;d++)s(d)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-f6b8ba96.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-93f3be92.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-a8ec6794.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then((function(){return require("./start-begin-btn-5739a6c0.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-521d73d1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-c26fa0bc.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addWatchLiveButton=function(e,t){Promise.resolve().then((function(){return require("./watch-live-btn-822534d1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-b213cb89.js"),s=require("./resolution-f9dcc1b4.js"),d=require("./skin-516012d7.js"),c=require("./localisation-56e0a999.js"),u=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-4ca6c759.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=u.getPlayer(e).el(),r=0,n=u.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-2f128b90.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-ab156f58.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-176ca818.js")})).then((function(n){var o=n.default,l=u.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=u.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-028cfe36.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-v2-e42e0101.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=u.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-247b33bf.js")})).then((function(n){var o=n.seriesModule,l=u.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},d=0;d<a.length;d++)s(d)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-7beed8b1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-08fab93b.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-a8ec6794.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then((function(){return require("./start-begin-btn-5739a6c0.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-c74365e1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-78fe6fe5.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addWatchLiveButton=function(e,t){Promise.resolve().then((function(){return require("./watch-live-btn-822534d1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),a=require("js-cookie"),l=require("./currentVideoInfo-31d70bec.js"),s=require("./captions-dbc83a75.js"),d=require("./skin-516012d7.js"),u=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var m={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?f(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var I={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=I.version;var y,h=function(e,n){var t,o,i,a,l,s,d,u;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:null!==(l=window)&&void 0!==l&&null!==(s=l.customData)&&void 0!==s&&s.overrideEntitlementBaseUrl?(null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u?void 0:u.overrideEntitlementBaseUrl)+"/video/status":S.get()+"".concat(null==m?void 0:m.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":I.version,"x-player-name":"videojs"},withCredentials:!0})},E=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:S.get()+m.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},T=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",r({url:S.get()+"".concat(null==m?void 0:m.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:S.get()+"".concat(null==m?void 0:m.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var n=e.videoId;return r({method:"GET",url:S.get()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},S=(y=null==m?void 0:m.apiBaseUrl,{set:function(e){e&&(y=e)},get:function(){return y}}),_=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},A=null;function O(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var L=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O().get(),o=S.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),P=null,D=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!_(n)){e.next=6;break}return P||(P=L().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&O().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){P=null}))),e.abrupt("return",P);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function R(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var V=100,N=function(){var e,n,t,o,r,i,a,s=l.getCurrentVideo();return"linearchannel"===((null==s?void 0:s.contentType)||"video")?null==s||null===(e=s.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==s?void 0:s.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==s||null===(r=s.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==s||null===(a=s.video)||void 0===a?void 0:a.id)||(null==s?void 0:s.id)};function F(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function x(){var e=window.sessionStorage.getItem("uid");return e||(e=F(),window.sessionStorage.setItem("uid",e),e)}function W(){return j.apply(this,arguments)}function j(){return(j=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return e?String(e):""}var U=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function B(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=F(),s="production",d="WEBSITE",u=null,c=0,v=null,f=0,g=0,I=!1,y=[],h=i.getPlayer(e);if(h){var E=function(){var e,n,t,o;return Math.round((null==h||null===(e=h.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},T=U((function(){for(var e=h.currentTime(),n=h.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),b=function(){var e=n(t.mark((function e(n){var o,i,u,c,v,p,f,g,I,y,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return I=e.sent,y=C(I),e.t0=R,e.t1=R,e.t2=null==y?void 0:y.site,e.t3=null==y?void 0:y.siteId,e.t4=d,e.t5=x(),e.t6=N(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=s,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?M(n.adPosition):"",e.next=25,W();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(f=a.beacon)||void 0===f?void 0:f.params,e.t32=(0,e.t0)(e.t30,e.t31),h=[e.t32],r({url:(null==a||null===(g=a.beacon)||void 0===g?void 0:g.url)||S.get()+m.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:h}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(e){if(!h.paused()&&h.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&g<4&&I?(g++,p("BUFFERING",R({pfm:d,uid:x(),vid:N(),videoPosition:Math.floor(h.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),b({eventName:"BUFFERING",videoPosition:Math.floor(h.currentTime),isAdEvent:!1}),0):t},_=function(){var e=Math.floor(h.currentTime);h.on("error",(function(){var n,t=Math.floor(h.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";p(o,R({pfm:d,uid:x(),vid:N(),videoPosition:t},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),b({eventName:o,videoPosition:t,isAdEvent:!1})}))},A=function(){var e=U((function(){var e;c=0,v=setInterval((function(){c=w(c)}),V),p("PLAY",R({pfm:d,uid:x(),vid:N(),videoPosition:Math.floor(h.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),b({eventName:"PLAY",videoPosition:Math.floor(h.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":N(),watchTime:Math.floor(h.currentTime)})}));h.one("play",e)},O=function(){h.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,p("FIRST_FRAME",R({pfm:d,uid:x(),vid:N(),videoPosition:Math.floor(h.currentTime),ttFirstFrame:c,bufferHealth:T()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),b({eventName:"FIRST_FRAME",videoPosition:Math.floor(h.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:T()}),I=!0,c=0}))},L=function(){var e=!1;h.on("waiting",U((function(){I&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!h.paused()?f=w(f):clearInterval(u)}),V))}))),h.on("playing",U((function(){e=!1,clearInterval(u)})))},P=function(){var e=function(e){var n,t,o,r=R({videoPosition:Math.floor(h.currentTime),isAdEvent:!0,bufferHealth:T(),pfm:d,uid:x(),vid:N(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);p(e,R({},r)),b(R({eventName:e,adPosition:1},r))};h.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),h.on("adskip",(function(){c=0})),h.on("adend",(function(){c=0}))},k=function(){h.on("timeupdate",(function(){var e=Math.floor(h.currentTime());if(e>=30&&e%30==0&&!y.includes(e)){var n,t=null===(n=h.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];g=0,y.push(e),b({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:T(),bitrate:E()})}}))};_(),L(),P(),k(),A(),h.on("loadeddata",O)}else console.error("Videojs: Player instance not found.")}var H=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},G=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},q=function(){var e=l.seasonIdxManager.get();return e>=0?e+1:1},Q=function(){var e,n,t,o=l.getCurrentSeries(),r=l.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=l.seasonIdxManager.get(),s=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return s>=0?s+1:1};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function z(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Y(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var K=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},X=function(e){var n=J(e,"video.tags",[]),t=J(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},J=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},$=function(){var n,t,o,r,l,s,d,u,c,v,p,m,f,g,I,y,h,E,T,b,w,S,_,A,O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return O;var D=(null==P?void 0:P.siteName)||"",C=(null==P?void 0:P.contentType)||"video",k=(null==P||null===(o=P[C])||void 0===o?void 0:o.metadata)||(null==P||null===(r=P[C])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),R=i.getPlayer(L);if(!O.includes("VIEWLIFT_"))return O;var V,N=window.getComputedStyle(document.getElementById(L),null),F=Math.trunc(N.getPropertyValue("height").slice(0,-2)),x=Math.trunc(N.getPropertyValue("width").slice(0,-2)),W="linearchannel"===C?null==P||null===(s=P.linearchannel)||void 0===s||null===(d=s.channels)||void 0===d||null===(u=d.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:J(P,"video.gist.id",""),j="linearchannel"===C?null==P||null===(v=P.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(m=p.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===m?void 0:m.title:J(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",(function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]})));var B=z(z({},Z(k)),{},(S={VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:F,VIEWLIFT_SIZE:K(x,F),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===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:J(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(g=R.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(I=R.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:X(P),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(J(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+J(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:J(null===(y=window)||void 0===y||null===(h=y.app_data)||void 0===h||null===(E=h.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":J(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(w=b.site)||void 0===w?void 0:w.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:j,VIEWLIFT_CONTENT_SERIES_TITLE:J(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:J(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Q(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:X(P),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(S,"VIEWLIFT_LAT",""),e(S,"VIEWLIFT_APP_BUNDLE",""),e(S,"VIEWLIFT_ATT_CONSENT",""),S),null===(_=window)||void 0===_||null===(A=_.customData)||void 0===A?void 0:A.macros);for(var H in B){var G=new RegExp(H,"g");O=O.replace(G,B[H])}return O},Z=function(e){var n,t,o,r,i,a,l={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){s.set(e.name,e.value)})));var d=(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===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return d||u?(G()?d?l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):u&&(l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):d?l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):u&&(l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),d?l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):u&&(l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),l=G()?z(z({},l),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):z(z({},l),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),l=G()?z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),l=z(z({},l),{},{VIEWLIFT_AFID:s.get("afid"),VIEWLIFT_NIELSEN_APP_ID:s.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:s.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:s.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},ee=function(e,n){var t,o,r,i,a,l,s,d,u,c,v,p,m,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(u=e[f])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[f])||void 0===v||null===(p=v.streamingInfo)||void 0===p||null===(m=p.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return te(y);if(g){var T=oe(I,n);return T.src=$(T.src,n,e),T}if("Safari"!==H()&&E)return ne(I);if(h){var b=te(I);return b.src=$(b.src,n,e),b}if(null!=I&&I.mpeg){var w=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return w.src=$(w.src,n,e),w}return null},ne=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},te=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},oe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=H();if(i.getPlayer(n),"Safari"===s){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return re(n),d}var u,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(re(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var re=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==H()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ie=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var le=!1,se=function(e,n,t){var o=$(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i.getPlayer(e);if(null!==a.el_){le=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),le&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()}),1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,(function(){u&&a.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};var de,ue=(de=!0,{enable:function(){de=!0},disable:function(){de=!1},get enabled(){return de}}),ce="ssai-breakStart",ve="ssai-adImpression",pe="ssai-firstQuartile",me="ssai-midpoint",fe="ssai-thirdQuartile",ge="ssai-complete",Ie="ssai-breakEnd",ye={breakStart:ce,impression:ve,firstQuartile:pe,midpoint:me,thirdQuartile:fe,complete:ge,breakEnd:Ie};function he(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=ye[o];r&&t.trigger(r,n)}function Ee(e){var n=e.isLive,t=e.startTimeInSeconds;return n?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==t?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:!1===t?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!window.analytics)return console.log("is StreamingAnalytics started Initialised?",(console.warn("[Comscore] Tag not initialized."),!1)),void console.warn("[Comscore] Tag not initialized or analytics missing.");var n=window.analytics,t=null;t.notifyPause();var o=new n.StreamingAnalytics.AdvertisementMetadata;o.setMediaType(Ee({isLive:void 0,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds})),o.setUniqueId(e.id||"ad-001"),o.setLength(e.durationMs||0),o.setTitle(e.title||"Advertisement"),o.setServerCampaignId(e.campaignId),o.setRelatedContentMetadata(null),o.setDeliveryType(n.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),o.setPlacementId(e.placementId);var r={cs_ad_tu:null==e?void 0:e.trackingUrl,ns_st_ami:null==e?void 0:e.creativeId};o.addCustomLabels(r),t.setMetadata(o),t.notifyPlay(),console.log("[Comscore] Ad started:",e)}function be(e){return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:null==e?void 0:e.campaignId,placementId:null==e?void 0:e.placementId,trackingUrl:null==e?void 0:e.trackingUrl}}function we(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 Se(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?we(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):we(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function _e(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ae(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ae(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}o.registerPlugin("comscore",(function(e){console.log(this),console.log("hello form comscore plugin",e);var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var r=document.createElement("script");r.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",r.async=!0,document.head.appendChild(r),r.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var r=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(r),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},r.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var Oe,Le=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Pe=(Oe=null,{set:function(e){Oe=e},get position(){return Oe}});function De(e,n){return Ce.apply(this,arguments)}function Ce(){return(Ce=n(t.mark((function e(n,o){var r,a,l,s,d,u,v,p,m,f,g,I,y,h,E,T,b,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),l=ee(o,n),s=l.src,d=(null==o?void 0:o.contentType)||"video",u=(null==o||null===(r=o[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,v=s.replace("/dash/","/session/").replace("/master/","/session/"),v=$(v,n,o),p=ke(v),m=c(p,2),f=m[0],g=m[1],v=new URL(v.split("?")[0]),Object.keys(g).length>0&&Object.entries(g).forEach((function(e){var n=c(e,2),t=n[0],o=n[1];v.searchParams.set(t,o)})),e.prev=10,e.next=13,fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Se({adsParams:Se({},f)},u&&{availSuppression:{mode:"BEHIND_LIVE_EDGE",value:"00:00:00"}}))});case 13:return I=e.sent,e.next=16,I.json();case 16:return y=e.sent,h="https://"+new URL(v).hostname,E=y.trackingUrl,T=y.manifestUrl,b=h+E,w=h+T,Le.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=w,e.abrupt("return",l);case 28:return e.prev=28,e.t0=e.catch(10),e.abrupt("return",l);case 31:case"end":return e.stop()}}),e,null,[[10,28]])})))).apply(this,arguments)}function ke(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=_e((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,v=Object.entries(n);u<v.length;u++){var p=c(v[u],2),m=p[0],f=p[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=f;else d[m]=f}return[s,d]}var Re,Ve=(Re=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Re=Array.isArray(e)?u(e):Re},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Re),u(Re)}}),Ne=new Map;function Fe(e,n){return xe.apply(this,arguments)}function xe(){return xe=n(t.mark((function e(o,r){var a,l,s,c,v,p,m,f,g,I,y,h,E,T,b,w,S,_,A,O,L,P;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P=function(e,n,t,r,a,l){var s=i.getPlayer(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var d,u=_e(t);try{var c=function(){var t,i,u,c=d.value,v=c.eventType,p=c.beaconUrls,m=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=m||0,y=p,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(u=i.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),T=Ne.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",Ne),e>=I&&!T.includes(E)){T.push(E),Ne.set("pod-".concat(a),T);try{L(v,n,y,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var b=Pe.position;Pe.set(null),setTimeout((function(){null!=b&&(s.currentTime(b),l())}),500)}if("function"==typeof h)try{var w,S={eventType:v,startTimeInSeconds:m,startTime:f,durationInSeconds:g,ad:null==n||null===(w=n.ads)||void 0===w?void 0:w[r],adIndex:r};h({adsData:S}),he(o,S)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var _,A=Le.get();Te(be(Se(Se({},null==n||null===(_=n.ads)||void 0===_?void 0:_[r]),{},{trackingUrl:A})))}}};for(u.s();!(d=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},L=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ne.clear(),Pe.set(r),g=Le.get(),(I=i.getPlayer(o)).one("loadeddata",(function(){g&&A(g)})),y=new Map,h=new Map,E=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==I||null===(s=I.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,w=(null==I||null===(c=I.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,S=(null==I||null===(v=I.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,_=(null==I||null===(m=I.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,A=function(){var e=n(t.mark((function e(n){var a,l,s,c,v,p,m,f,g,I,A,L,D,C,k,R,V,N,F,x;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",R),0===e.button&&D()},k=function(e){},C=function(){var e,n=I.currentTime(),t=null,o=_e(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){I.currentTime(t+2.2)}),100))},D=function(){var e,n=I.currentTime(),t=null,o=_e(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>i)&&!y.has(i)||n>=i&&n<=s)&&(t=i,y.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){I.currentTime(t+.4)}),100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:m=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",m),f=m.avails,g=[],I=i.getPlayer(o),A=I.controlBar.progressControl,L=A.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===r?void 0:r[0])||[]})})),!v&&r&&(I.currentTime(r),C()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=I.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",L.appendChild(i)}})),I._timeUpdateHandler&&I.off("timeupdate",I._timeUpdateHandler),I._timeUpdateHandler=d.throttle((function(){var e=I.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&y.set(r,!0),ue.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var s=e-r,d=0,c=0,v=0;v<a.length;v++){var p,m=null==a||null===(p=a[v])||void 0===p?void 0:p.durationInSeconds;if(s<d+m){c=v;break}d+=m}a[c];var f=Math.max(0,i-s),I=Math.round(f);V.style.display="block",x.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(I));var E=[];return null==a||a.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));E.push.apply(E,u(n))})),Array.isArray(a)&&0==(null==a?void 0:a.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,E,c,o,C),"break"}h.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(V.style.display="none",A.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),ue.enable())}}),1e3),I.on("timeupdate",I._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",(function(e){ue.enabled&&"ArrowRight"==e.key&&(D(),qe(o,10),e.stopPropagation())})),A.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",R))})),null===(s=document)||void 0===s||null===(c=s.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach((function(e){return null==e?void 0:e.remove()})),(V=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(F=document.createElement("div")).className="sponsored-text",F.textContent="Sponsored Ad",N.append(F),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",V.append(N),V.append(x),I.el().appendChild(V);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),xe.apply(this,arguments)}function We(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return je(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?je(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function je(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Me={},Ue=null;function Be(e){return He.apply(this,arguments)}function He(){return He=n(t.mark((function e(o){var r,a,l,s,c,v,p,m,f,g,I,y,h,E,T,b,w,S,_,A,O,L,P,D,C,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,r,a){var l=i.getPlayer(o);if(!l.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(l.currentTime());var s,d=We(t);try{for(d.s();!(s=d.n()).done;){var u,c,v,p=s.value,m=p.eventType,f=p.beaconUrls,g=p.startTimeInSeconds,I=p.startTime,y=p.durationInSeconds,h=g||0,E=f,T=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,b="".concat(h,"_").concat(m),w=P.get("pod-".concat(a))||[];if(console.warn(e,h,"map:",m,"condition1:",e>=h,"map:",P),e>=h&&e<=h+D&&!w.includes(b)){w.push(b),P.set("pod-".concat(a),w);try{C(m,n,E,l)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,n)}if("function"==typeof T)try{var S,_={eventType:m,startTimeInSeconds:g,startTime:I,durationInSeconds:y,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[r],adIndex:r};T({adsData:_}),he(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},C=function(e,n,t,o){var r,i;"breakEnd"!==e||(null===(r=Me)||void 0===r?void 0:r.currentAdIndex)+1==(null===(i=Me)||void 0===i?void 0:i.totalAds)?(console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))):console.log("SKIPPED FROM FIRING")},I=function(){Ue&&clearInterval(Ue)},f=Le.get(),(g=i.getPlayer(o)).one("loadeddata",(function(){I(),Ue=setInterval((function(){f&&!g.paused()&&L(f)}),2e3)})),g.on("dispose",(function(){I()})),y=new Map,h=new Map,E=-1,T=null,b=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,w=(null==g||null===(l=g.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,S=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,A=(null==g||null===(p=g.el())||void 0===p||null===(m=p.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=!1,L=function(){var e=n(t.mark((function e(n){var r,a,l,s,c,v,p,m,f,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new URL(n),T&&a.searchParams.append("nextToken",T),e.next=4,fetch(a.toString(),{method:"GET"});case 4:return l=e.sent,e.next=7,l.json();case 7:s=e.sent,c=s.avails,v=s.nextToken||null,T=v,p=[],m=i.getPlayer(o),f=m.controlBar.progressControl,g=f.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),c.map((function(e,n){var t,o;p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(t=e.adBreakTrackingEvents)||void 0===t||null===(o=t.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===o?void 0:o[0])||[]})})),console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",g.appendChild(i)}})),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=d.throttle((function(){var e=m.currentTime();if(e!==E){E=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,a=o+r;if(e>=o-1.2&&e<=a+1.2){O=!!(e>=o&&e<=a&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>a&&y.set(o,!0),ue.disable(),b&&b.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),A&&(A.style.pointerEvents="none",A.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var l=e-o,s=0,d=0,c=0;c<i.length;c++){var v,m=null==i||null===(v=i[c])||void 0===v?void 0:v.durationInSeconds;if(l<s+m){d=c;break}s+=m}setTimeout((function(){Me.totalAds=null==i?void 0:i.length,Me.currentAdIndex=d}),1e3);var g=[];return null==i||i.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));g.push.apply(g,u(n))})),Array.isArray(i)&&0==(null==i?void 0:i.length)&&g.push(null==n?void 0:n.podSlotImpressionBeacon),k(e,n,g,d,t),"break"}h.delete(o)},t=0;t<p.length;t++){if("break"===n())break}O||(Me={},f.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),b&&b.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),A&&(A.style.pointerEvents="auto",A.classList.remove("vjs-hidden")),ue.enable())}}),1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,D=2.5;case 21:case"end":return e.stop()}}),e)}))),He.apply(this,arguments)}function Ge(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 qe=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},Qe=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},Ye=function(e){return!!o.getPlayer("".concat(e))},ze=function(){var e=n(t.mark((function e(o,r){var a,s,d,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>2&&void 0!==u[2]&&u[2],e.next=3,D();case 3:return s=e.sent,d=i.getPlayer(o),e.abrupt("return",new Promise((function(e,i){var u=(null==r?void 0:r.programs)||[];null==r||delete r.programs,E(r,s).then(function(){var i=n(t.mark((function n(i){var s,c,v,p,m,f,g,I;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(f=null==i?void 0:i.data,window.sid=F(),f.contentType="linearchannel",f.channelId=null==r?void 0:r.channelId,g=(null==f||null===(s=f.linearchannel)||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(m=p.adsConfig)||void 0===m?void 0:m.vodAdSticherProvider)||!1,I=ee(f,o),!g){n.next=11;break}return n.next=9,De(o,f);case 9:I=n.sent,a=!0;case 11:l.setCurrentVideo(f),l.setCurrentEpgPrograms(u),sessionStorage.setItem("program_switched",!0),I&&a?(Je(o,I),g&&Be(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})}))):e({status:!0,msg:"Feed authenticated",response:f});case 15:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){i({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Ke=function(){var e=n(t.mark((function e(o,r,a){var d,u,c,v,p,m,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(l.getCurrentSeries()||null)&&l.setVideoIdxById(r),p=0,m=0,f=null,null!==(d=window)&&void 0!==d&&d.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(c=u.watchHistory)&&void 0!==c&&c.enable&&b(r,v).then((function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),p=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)})).catch((function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))})),e.abrupt("return",new Promise((function(e,a){h(r,v).then(function(){var r=n(t.mark((function n(r){var d,u,c,v,g,I,y,h,E,T,b,w,S,_,A,O,L,P,D,C,k,R,V,N,F,x,W,j,M,U,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==r?void 0:r.data,L=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(d=O[L])||void 0===d?void 0:d.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,D=(null==O||null===(I=O.video)||void 0===I||null===(y=I.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,l.setCurrentVideo(r.data),(C=(null==O||null===(h=O.ads)||void 0===h||null===(E=h.preRoll)||void 0===E||null===(T=E.adTags)||void 0===T||null===(b=T.web)||void 0===b?void 0:b.active)&&(null==O||null===(w=O.ads)||void 0===w||null===(S=w.preRoll)||void 0===S||null===(_=S.adTags)||void 0===_||null===(A=_.web)||void 0===A?void 0:A.url))&&se(o,C,O),k=ee(O,o),!P){n.next=12;break}return n.next=11,De(o,O);case 11:k=n.sent;case 12:k?(H=(null==O||null===(R=O.video)||void 0===R||null===(V=R.gist)||void 0===V?void 0:V.videoImageUrl)||(null==O||null===(N=O.video)||void 0===N||null===(F=N.gist)||void 0===F||null===(x=F.imageGist)||void 0===x?void 0:x.r16x9),(G=i.getPlayer(o)).poster(H),Je(o,k),P&&Fe(o,f),G.on("loadstart",(function(){D&&e({status:!0,msg:"Video Loaded",response:O})})),G.on("loadeddata",(function(){ae(),e({status:!0,msg:"Video Loaded",response:O})})),G.one("play",(function(){p&&!P&&m<95&&setTimeout((function(){G.currentTime(p)}),0)})),G.one("error",(function(){var e;a({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==O||null===(W=O.video)||void 0===W||null===(j=W.contentDetails)||void 0===j||null===(M=j.closedCaptions)||void 0===M?void 0:M.length)>0||(null==O||null===(U=O.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==O||null===(Q=O.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),s.addCaptions(o,q)):s.removeCaptions(o)):(ie(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){$e(e,o,a,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Xe=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()},Je=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},$e=function(n,t,o,r){var i,a,l,s,d,u,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);Ye(t)&&ie(t,(null===(d=window)||void 0===d?void 0:d.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?Ge(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ge(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ve,exports.authenticateLC=ze,exports.baseUrlManager=S,exports.clearError=ae,exports.createSeriesWatchMap=function(e,n){var t=new Map;w({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),l.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=H,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e);if(Xe(),d.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=C,exports.getEntitlementData=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=Q,exports.getLinearChannelDetails=E,exports.getSGAIEnabledSource=De,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,n){var t,o,i=C(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:S.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=w,exports.getSource=ee,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ce,e)},adImpression:function(e){return t(ve,e)},adFirstQuartile:function(e){return t(pe,e)},adMidpoint:function(e){return t(me,e)},adThirdQuartile:function(e){return t(fe,e)},adComplete:function(e){return t(ge,e)},adBreakEnd:function(e){return t(Ie,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=x,exports.getVideoDetails=h,exports.getVideoInfo=b,exports.handleError=ie,exports.initialiseAdvertisement=se,exports.initialiseKeyboardEvents=function(e,n){var t,o,r,a=i.getPlayer(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,d,u,c,v,p,m;if(ue.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==s||s.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Qe(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(d=i.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||qe(e,10)}}}),!0)},exports.initiateErrorHandling=$e,exports.inititateBeacon=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&B(e,n,t)},exports.isMobile=G,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=Ye,exports.isTokenExpired=_,exports.load=Ke,exports.loadVideo=Je,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=O,exports.rewind=Qe,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=T,exports.setupAdvertisementMarkers=Fe,exports.setupAdvertisementMarkersForLinear=Be,exports.skip=qe,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=Ne;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),a=require("js-cookie"),l=require("./currentVideoInfo-31d70bec.js"),s=require("./captions-dbc83a75.js"),d=require("./skin-516012d7.js"),u=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var m={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?f(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var I={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=I.version;var y,h=function(e,n){var t,o,i,a,l,s,d,u;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:null!==(l=window)&&void 0!==l&&null!==(s=l.customData)&&void 0!==s&&s.overrideEntitlementBaseUrl?(null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u?void 0:u.overrideEntitlementBaseUrl)+"/video/status":S.get()+"".concat(null==m?void 0:m.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":I.version,"x-player-name":"videojs"},withCredentials:!0})},E=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:S.get()+m.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},T=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",r({url:S.get()+"".concat(null==m?void 0:m.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:S.get()+"".concat(null==m?void 0:m.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var n=e.videoId;return r({method:"GET",url:S.get()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},S=(y=null==m?void 0:m.apiBaseUrl,{set:function(e){e&&(y=e)},get:function(){return y}}),_=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},A=null;function O(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var L=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=O().get(),o=S.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),P=null,D=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!_(n)){e.next=6;break}return P||(P=L().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&O().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){P=null}))),e.abrupt("return",P);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function R(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var V=100,N=function(){var e,n,t,o,r,i,a,s=l.getCurrentVideo();return"linearchannel"===((null==s?void 0:s.contentType)||"video")?null==s||null===(e=s.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==s?void 0:s.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==s||null===(r=s.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==s||null===(a=s.video)||void 0===a?void 0:a.id)||(null==s?void 0:s.id)};function F(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function x(){var e=window.sessionStorage.getItem("uid");return e||(e=F(),window.sessionStorage.setItem("uid",e),e)}function W(){return j.apply(this,arguments)}function j(){return(j=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return e?String(e):""}var U=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function B(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=F(),s="production",d="WEBSITE",u=null,c=0,v=null,f=0,g=0,I=!1,y=[],h=i.getPlayer(e);if(h){var E=function(){var e,n,t,o;return Math.round((null==h||null===(e=h.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},T=U((function(){for(var e=h.currentTime(),n=h.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),b=function(){var e=n(t.mark((function e(n){var o,i,u,c,v,p,f,g,I,y,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return I=e.sent,y=C(I),e.t0=R,e.t1=R,e.t2=null==y?void 0:y.site,e.t3=null==y?void 0:y.siteId,e.t4=d,e.t5=x(),e.t6=N(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=s,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?M(n.adPosition):"",e.next=25,W();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(f=a.beacon)||void 0===f?void 0:f.params,e.t32=(0,e.t0)(e.t30,e.t31),h=[e.t32],r({url:(null==a||null===(g=a.beacon)||void 0===g?void 0:g.url)||S.get()+m.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:h}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(e){if(!h.paused()&&h.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&g<4&&I?(g++,p("BUFFERING",R({pfm:d,uid:x(),vid:N(),videoPosition:Math.floor(h.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),b({eventName:"BUFFERING",videoPosition:Math.floor(h.currentTime),isAdEvent:!1}),0):t},_=function(){var e=Math.floor(h.currentTime);h.on("error",(function(){var n,t=Math.floor(h.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";p(o,R({pfm:d,uid:x(),vid:N(),videoPosition:t},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),b({eventName:o,videoPosition:t,isAdEvent:!1})}))},A=function(){var e=U((function(){var e;c=0,v=setInterval((function(){c=w(c)}),V),p("PLAY",R({pfm:d,uid:x(),vid:N(),videoPosition:Math.floor(h.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),b({eventName:"PLAY",videoPosition:Math.floor(h.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":N(),watchTime:Math.floor(h.currentTime)})}));h.one("play",e)},O=function(){h.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,p("FIRST_FRAME",R({pfm:d,uid:x(),vid:N(),videoPosition:Math.floor(h.currentTime),ttFirstFrame:c,bufferHealth:T()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),b({eventName:"FIRST_FRAME",videoPosition:Math.floor(h.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:T()}),I=!0,c=0}))},L=function(){var e=!1;h.on("waiting",U((function(){I&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!h.paused()?f=w(f):clearInterval(u)}),V))}))),h.on("playing",U((function(){e=!1,clearInterval(u)})))},P=function(){var e=function(e){var n,t,o,r=R({videoPosition:Math.floor(h.currentTime),isAdEvent:!0,bufferHealth:T(),pfm:d,uid:x(),vid:N(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);p(e,R({},r)),b(R({eventName:e,adPosition:1},r))};h.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),h.on("adskip",(function(){c=0})),h.on("adend",(function(){c=0}))},k=function(){h.on("timeupdate",(function(){var e=Math.floor(h.currentTime());if(e>=30&&e%30==0&&!y.includes(e)){var n,t=null===(n=h.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];g=0,y.push(e),b({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:T(),bitrate:E()})}}))};_(),L(),P(),k(),A(),h.on("loadeddata",O)}else console.error("Videojs: Player instance not found.")}var H=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},G=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},q=function(){var e=l.seasonIdxManager.get();return e>=0?e+1:1},Q=function(){var e,n,t,o=l.getCurrentSeries(),r=l.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=l.seasonIdxManager.get(),s=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return s>=0?s+1:1};function Y(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function z(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Y(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var K=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},X=function(e){var n=J(e,"video.tags",[]),t=J(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},J=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},$=function(){var n,t,o,r,l,s,d,u,c,v,p,m,f,g,I,y,h,E,T,b,w,S,_,A,O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return O;var D=(null==P?void 0:P.siteName)||"",C=(null==P?void 0:P.contentType)||"video",k=(null==P||null===(o=P[C])||void 0===o?void 0:o.metadata)||(null==P||null===(r=P[C])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),R=i.getPlayer(L);if(!O.includes("VIEWLIFT_"))return O;var V,N=window.getComputedStyle(document.getElementById(L),null),F=Math.trunc(N.getPropertyValue("height").slice(0,-2)),x=Math.trunc(N.getPropertyValue("width").slice(0,-2)),W="linearchannel"===C?null==P||null===(s=P.linearchannel)||void 0===s||null===(d=s.channels)||void 0===d||null===(u=d.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:J(P,"video.gist.id",""),j="linearchannel"===C?null==P||null===(v=P.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(m=p.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===m?void 0:m.title:J(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",(function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]})));var B=z(z({},Z(k)),{},(S={VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:F,VIEWLIFT_SIZE:K(x,F),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===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:J(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(g=R.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(I=R.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:X(P),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(J(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+J(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:J(null===(y=window)||void 0===y||null===(h=y.app_data)||void 0===h||null===(E=h.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":J(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(w=b.site)||void 0===w?void 0:w.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:J(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:j,VIEWLIFT_CONTENT_SERIES_TITLE:J(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:J(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Q(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:X(P),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(S,"VIEWLIFT_LAT",""),e(S,"VIEWLIFT_APP_BUNDLE",""),e(S,"VIEWLIFT_ATT_CONSENT",""),S),null===(_=window)||void 0===_||null===(A=_.customData)||void 0===A?void 0:A.macros);for(var H in B){var G=new RegExp(H,"g");O=O.replace(G,B[H])}return O},Z=function(e){var n,t,o,r,i,a,l={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){s.set(e.name,e.value)})));var d=(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===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return d||u?(G()?d?l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):u&&(l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):d?l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):u&&(l=z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),d?l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):u&&(l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),l=G()?z(z({},l),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):z(z({},l),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(l=z(z({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),l=G()?z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):z(z({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),l=z(z({},l),{},{VIEWLIFT_AFID:s.get("afid"),VIEWLIFT_NIELSEN_APP_ID:s.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:s.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:s.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},ee=function(e,n){var t,o,r,i,a,l,s,d,u,c,v,p,m,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(u=e[f])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[f])||void 0===v||null===(p=v.streamingInfo)||void 0===p||null===(m=p.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return te(y);if(g){var T=oe(I,n);return T.src=$(T.src,n,e),T}if("Safari"!==H()&&E)return ne(I);if(h){var b=te(I);return b.src=$(b.src,n,e),b}if(null!=I&&I.mpeg){var w=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return w.src=$(w.src,n,e),w}return null},ne=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},te=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},oe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=H();if(i.getPlayer(n),"Safari"===s){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return re(n),d}var u,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(re(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var re=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==H()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ie=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var le=!1,se=function(e,n,t){var o=$(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i.getPlayer(e);if(null!==a.el_){le=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),le&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()}),1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,(function(){u&&a.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};var de,ue=(de=!0,{enable:function(){de=!0},disable:function(){de=!1},get enabled(){return de}}),ce="ssai-breakStart",ve="ssai-adImpression",pe="ssai-firstQuartile",me="ssai-midpoint",fe="ssai-thirdQuartile",ge="ssai-complete",Ie="ssai-breakEnd",ye={breakStart:ce,impression:ve,firstQuartile:pe,midpoint:me,thirdQuartile:fe,complete:ge,breakEnd:Ie};function he(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=ye[o];r&&t.trigger(r,n)}function Ee(e){var n=e.isLive,t=e.startTimeInSeconds;return n?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==t?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:!1===t?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!window.analytics)return console.log("is StreamingAnalytics started Initialised?",(console.warn("[Comscore] Tag not initialized."),!1)),void console.warn("[Comscore] Tag not initialized or analytics missing.");var n=window.analytics,t=null;t.notifyPause();var o=new n.StreamingAnalytics.AdvertisementMetadata;o.setMediaType(Ee({isLive:void 0,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds})),o.setUniqueId(e.id||"ad-001"),o.setLength(e.durationMs||0),o.setTitle(e.title||"Advertisement"),o.setServerCampaignId(e.campaignId),o.setRelatedContentMetadata(null),o.setDeliveryType(n.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),o.setPlacementId(e.placementId);var r={cs_ad_tu:null==e?void 0:e.trackingUrl,ns_st_ami:null==e?void 0:e.creativeId};o.addCustomLabels(r),t.setMetadata(o),t.notifyPlay(),console.log("[Comscore] Ad started:",e)}function be(e){return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:null==e?void 0:e.campaignId,placementId:null==e?void 0:e.placementId,trackingUrl:null==e?void 0:e.trackingUrl}}function we(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 Se(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?we(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):we(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function _e(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ae(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ae(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}o.registerPlugin("comscore",(function(e){console.log(this),console.log("hello form comscore plugin",e);var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var r=document.createElement("script");r.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",r.async=!0,document.head.appendChild(r),r.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var r=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(r),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},r.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var Oe,Le=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Pe=(Oe=null,{set:function(e){Oe=e},get position(){return Oe}});function De(e,n){return Ce.apply(this,arguments)}function Ce(){return(Ce=n(t.mark((function e(n,o){var r,a,l,s,d,u,v,p,m,f,g,I,y,h,E,T,b,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),l=ee(o,n),s=l.src,d=(null==o?void 0:o.contentType)||"video",u=(null==o||null===(r=o[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,v=s.replace("/dash/","/session/").replace("/master/","/session/"),v=$(v,n,o),p=ke(v),m=c(p,2),f=m[0],g=m[1],v=new URL(v.split("?")[0]),Object.keys(g).length>0&&Object.entries(g).forEach((function(e){var n=c(e,2),t=n[0],o=n[1];v.searchParams.set(t,o)})),e.prev=10,e.next=13,fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Se({adsParams:Se({},f)},u&&{availSuppression:{mode:"BEHIND_LIVE_EDGE",value:"00:00:00"}}))});case 13:return I=e.sent,e.next=16,I.json();case 16:return y=e.sent,h="https://"+new URL(v).hostname,E=y.trackingUrl,T=y.manifestUrl,b=h+E,w=h+T,Le.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=w,e.abrupt("return",l);case 28:return e.prev=28,e.t0=e.catch(10),e.abrupt("return",l);case 31:case"end":return e.stop()}}),e,null,[[10,28]])})))).apply(this,arguments)}function ke(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=_e((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,v=Object.entries(n);u<v.length;u++){var p=c(v[u],2),m=p[0],f=p[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=f;else d[m]=f}return[s,d]}var Re,Ve=(Re=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Re=Array.isArray(e)?u(e):Re},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Re),u(Re)}}),Ne=new Map;function Fe(e,n){return xe.apply(this,arguments)}function xe(){return xe=n(t.mark((function e(o,r){var a,l,s,c,v,p,m,f,g,I,y,h,E,T,b,w,S,_,A,O,L,P;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P=function(e,n,t,r,a,l){var s=i.getPlayer(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var d,u=_e(t);try{var c=function(){var t,i,u,c=d.value,v=c.eventType,p=c.beaconUrls,m=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=m||0,y=p,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(u=i.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),T=Ne.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",Ne),e>=I&&!T.includes(E)){T.push(E),Ne.set("pod-".concat(a),T);try{L(v,n,y,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var b=Pe.position;Pe.set(null),setTimeout((function(){null!=b&&(s.currentTime(b),l())}),500)}if("function"==typeof h)try{var w,S={eventType:v,startTimeInSeconds:m,startTime:f,durationInSeconds:g,ad:null==n||null===(w=n.ads)||void 0===w?void 0:w[r],adIndex:r};h({adsData:S}),he(o,S)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var _,A=Le.get();Te(be(Se(Se({},null==n||null===(_=n.ads)||void 0===_?void 0:_[r]),{},{trackingUrl:A})))}}};for(u.s();!(d=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},L=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ne.clear(),Pe.set(r),g=Le.get(),(I=i.getPlayer(o)).one("loadeddata",(function(){g&&A(g)})),y=new Map,h=new Map,E=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==I||null===(s=I.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,w=(null==I||null===(c=I.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,S=(null==I||null===(v=I.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,_=(null==I||null===(m=I.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,A=function(){var e=n(t.mark((function e(n){var a,l,s,c,v,p,m,f,g,I,A,L,D,C,k,R,V,N,F,x;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",R),0===e.button&&D()},k=function(e){},C=function(){var e,n=I.currentTime(),t=null,o=_e(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){I.currentTime(t+2.2)}),100))},D=function(){var e,n=I.currentTime(),t=null,o=_e(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>i)&&!y.has(i)||n>=i&&n<=s)&&(t=i,y.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){I.currentTime(t+.4)}),100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:m=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",m),f=m.avails,g=[],I=i.getPlayer(o),A=I.controlBar.progressControl,L=A.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===r?void 0:r[0])||[]})})),!v&&r&&(I.currentTime(r),C()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=I.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",L.appendChild(i)}})),I._timeUpdateHandler&&I.off("timeupdate",I._timeUpdateHandler),I._timeUpdateHandler=d.throttle((function(){var e=I.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&y.set(r,!0),ue.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var s=e-r,d=0,c=0,v=0;v<a.length;v++){var p,m=null==a||null===(p=a[v])||void 0===p?void 0:p.durationInSeconds;if(s<d+m){c=v;break}d+=m}a[c];var f=Math.max(0,i-s),I=Math.round(f);V.style.display="block",x.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(I));var E=[];return null==a||a.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));E.push.apply(E,u(n))})),Array.isArray(a)&&0==(null==a?void 0:a.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,E,c,o,C),"break"}h.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(V.style.display="none",A.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),ue.enable())}}),1e3),I.on("timeupdate",I._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",(function(e){ue.enabled&&"ArrowRight"==e.key&&(D(),qe(o,10),e.stopPropagation())})),A.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",R))})),null===(s=document)||void 0===s||null===(c=s.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach((function(e){return null==e?void 0:e.remove()})),(V=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(F=document.createElement("div")).className="sponsored-text",F.textContent="Sponsored Ad",N.append(F),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",V.append(N),V.append(x),I.el().appendChild(V);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),xe.apply(this,arguments)}function We(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return je(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?je(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function je(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Me={},Ue=null;function Be(e){return He.apply(this,arguments)}function He(){return He=n(t.mark((function e(o){var r,a,l,s,c,v,p,m,f,g,I,y,h,E,T,b,w,S,_,A,O,L,P,D,C,k,R;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:R=function(e,n,t,r,a){var l=i.getPlayer(o);if(!l.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(l.currentTime());var s,d=We(t);try{for(d.s();!(s=d.n()).done;){var u,c,v,p=s.value,m=p.eventType,f=p.beaconUrls,g=p.startTimeInSeconds,I=p.startTime,y=p.durationInSeconds,h=g||0,E=f,T=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,b="".concat(h,"_").concat(m),w=D.get("pod-".concat(a))||[];if(console.warn(e,h,"map:",m,"condition1:",e>=h,"map:",D),e>=h&&e<=h+C&&!w.includes(b)){w.push(b),D.set("pod-".concat(a),w);try{k(m,n,E,l)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,n)}if("function"==typeof T)try{var S,_={eventType:m,startTimeInSeconds:g,startTime:I,durationInSeconds:y,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[r],adIndex:r};T({adsData:_}),he(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},k=function(e,n,t,o){var r,i;"breakEnd"!==e||(null===(r=Me)||void 0===r?void 0:r.currentAdIndex)+1==(null===(i=Me)||void 0===i?void 0:i.totalAds)?(console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))):console.log("SKIPPED FROM FIRING")},I=function(){Ue&&clearInterval(Ue)},f=Le.get(),(g=i.getPlayer(o)).one("loadeddata",(function(){I(),Ue=setInterval((function(){f&&!g.paused()&&P(f)}),2e3)})),g.on("dispose",(function(){I()})),y=new Map,h=new Map,E=-1,T=null,b=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,w=(null==g||null===(l=g.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,S=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,A=(null==g||null===(p=g.el())||void 0===p||null===(m=p.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=!1,L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==e?void 0:e.length))return u(n);for(var t,o,r,i,a=[],l=(r=(null===(t=e[0])||void 0===t?void 0:t.trackingEvents)||[],i=(null===(o=e[e.length-1])||void 0===o?void 0:o.trackingEvents)||[],0===e.length?[]:1===e.length?r:[].concat(u(r),u(i))),s=null==l?void 0:l.filter((function(e){return["breakStart","breakEnd"].includes(null==e?void 0:e.eventType)})),d=function(){var e,t,o=null===(e=n[c])||void 0===e||null===(t=e.beaconUrls)||void 0===t?void 0:t[0],r=(null==s?void 0:s.filter((function(e){var n;return(null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n[0])==o})))||null;r?console.log("EVENT ALREADY PRESENT",r,n[c]):a.push(n[c])},c=0;c<(null==n?void 0:n.length);c++)d();return a},P=function(){var e=n(t.mark((function e(n){var r,a,l,s,c,v,p,m,f,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new URL(n),T&&a.searchParams.append("nextToken",T),e.next=4,fetch(a.toString(),{method:"GET"});case 4:return l=e.sent,e.next=7,l.json();case 7:s=e.sent,c=s.avails,v=s.nextToken||null,T=v,p=[],m=i.getPlayer(o),f=m.controlBar.progressControl,g=f.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),c.map((function(e,n){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:L(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",g.appendChild(i)}})),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=d.throttle((function(){var e=m.currentTime();if(e!==E){E=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,a=o+r;if(e>=o-1.2&&e<=a+1.2){var l;O=!!(e>=o&&e<=a&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>a&&y.set(o,!0),ue.disable(),b&&b.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),A&&(A.style.pointerEvents="none",A.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var s=e-o,d=0,c=0,v=0;v<i.length;v++){var m,g=null==i||null===(m=i[v])||void 0===m?void 0:m.durationInSeconds;if(s<d+g){c=v;break}d+=g}setTimeout((function(){Me.totalAds=null==i?void 0:i.length,Me.currentAdIndex=c}),1e3);var I=[];return null==i||i.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));I.push.apply(I,u(n))})),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&I.push(null==n?void 0:n.podSlotImpressionBeacon),R(e,n,I,c,t),"break"}h.delete(o)},t=0;t<p.length;t++){if("break"===n())break}O||(Me={},f.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),b&&b.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),A&&(A.style.pointerEvents="auto",A.classList.remove("vjs-hidden")),ue.enable())}}),1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=new Map,C=2.5;case 22:case"end":return e.stop()}}),e)}))),He.apply(this,arguments)}function Ge(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 qe=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},Qe=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},Ye=function(e){return!!o.getPlayer("".concat(e))},ze=function(){var e=n(t.mark((function e(o,r){var a,s,d,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>2&&void 0!==u[2]&&u[2],e.next=3,D();case 3:return s=e.sent,d=i.getPlayer(o),e.abrupt("return",new Promise((function(e,i){var u=(null==r?void 0:r.programs)||[];null==r||delete r.programs,E(r,s).then(function(){var i=n(t.mark((function n(i){var s,c,v,p,m,f,g,I;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(f=null==i?void 0:i.data,window.sid=F(),f.contentType="linearchannel",f.channelId=null==r?void 0:r.channelId,g=(null==f||null===(s=f.linearchannel)||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(m=p.adsConfig)||void 0===m?void 0:m.vodAdSticherProvider)||!1,I=ee(f,o),!g){n.next=11;break}return n.next=9,De(o,f);case 9:I=n.sent,a=!0;case 11:l.setCurrentVideo(f),l.setCurrentEpgPrograms(u),sessionStorage.setItem("program_switched",!0),I&&a?(Je(o,I),g&&Be(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})}))):e({status:!0,msg:"Feed authenticated",response:f});case 15:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){i({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Ke=function(){var e=n(t.mark((function e(o,r,a){var d,u,c,v,p,m,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(l.getCurrentSeries()||null)&&l.setVideoIdxById(r),p=0,m=0,f=null,null!==(d=window)&&void 0!==d&&d.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(c=u.watchHistory)&&void 0!==c&&c.enable&&b(r,v).then((function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),p=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)})).catch((function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))})),e.abrupt("return",new Promise((function(e,a){h(r,v).then(function(){var r=n(t.mark((function n(r){var d,u,c,v,g,I,y,h,E,T,b,w,S,_,A,O,L,P,D,C,k,R,V,N,F,x,W,j,M,U,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==r?void 0:r.data,L=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(d=O[L])||void 0===d?void 0:d.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,D=(null==O||null===(I=O.video)||void 0===I||null===(y=I.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,l.setCurrentVideo(r.data),(C=(null==O||null===(h=O.ads)||void 0===h||null===(E=h.preRoll)||void 0===E||null===(T=E.adTags)||void 0===T||null===(b=T.web)||void 0===b?void 0:b.active)&&(null==O||null===(w=O.ads)||void 0===w||null===(S=w.preRoll)||void 0===S||null===(_=S.adTags)||void 0===_||null===(A=_.web)||void 0===A?void 0:A.url))&&se(o,C,O),k=ee(O,o),!P){n.next=12;break}return n.next=11,De(o,O);case 11:k=n.sent;case 12:k?(H=(null==O||null===(R=O.video)||void 0===R||null===(V=R.gist)||void 0===V?void 0:V.videoImageUrl)||(null==O||null===(N=O.video)||void 0===N||null===(F=N.gist)||void 0===F||null===(x=F.imageGist)||void 0===x?void 0:x.r16x9),(G=i.getPlayer(o)).poster(H),Je(o,k),P&&Fe(o,f),G.on("loadstart",(function(){D&&e({status:!0,msg:"Video Loaded",response:O})})),G.on("loadeddata",(function(){ae(),e({status:!0,msg:"Video Loaded",response:O})})),G.one("play",(function(){p&&!P&&m<95&&setTimeout((function(){G.currentTime(p)}),0)})),G.one("error",(function(){var e;a({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==O||null===(W=O.video)||void 0===W||null===(j=W.contentDetails)||void 0===j||null===(M=j.closedCaptions)||void 0===M?void 0:M.length)>0||(null==O||null===(U=O.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==O||null===(Q=O.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),s.addCaptions(o,q)):s.removeCaptions(o)):(ie(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){$e(e,o,a,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Xe=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()},Je=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},$e=function(n,t,o,r){var i,a,l,s,d,u,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);Ye(t)&&ie(t,(null===(d=window)||void 0===d?void 0:d.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?Ge(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ge(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ve,exports.authenticateLC=ze,exports.baseUrlManager=S,exports.clearError=ae,exports.createSeriesWatchMap=function(e,n){var t=new Map;w({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),l.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=H,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e);if(Xe(),d.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=C,exports.getEntitlementData=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=Q,exports.getLinearChannelDetails=E,exports.getSGAIEnabledSource=De,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,n){var t,o,i=C(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:S.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=w,exports.getSource=ee,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ce,e)},adImpression:function(e){return t(ve,e)},adFirstQuartile:function(e){return t(pe,e)},adMidpoint:function(e){return t(me,e)},adThirdQuartile:function(e){return t(fe,e)},adComplete:function(e){return t(ge,e)},adBreakEnd:function(e){return t(Ie,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=x,exports.getVideoDetails=h,exports.getVideoInfo=b,exports.handleError=ie,exports.initialiseAdvertisement=se,exports.initialiseKeyboardEvents=function(e,n){var t,o,r,a=i.getPlayer(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,d,u,c,v,p,m;if(ue.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==s||s.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Qe(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(d=i.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||qe(e,10)}}}),!0)},exports.initiateErrorHandling=$e,exports.inititateBeacon=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&B(e,n,t)},exports.isMobile=G,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=Ye,exports.isTokenExpired=_,exports.load=Ke,exports.loadVideo=Je,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=O,exports.rewind=Qe,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=T,exports.setupAdvertisementMarkers=Fe,exports.setupAdvertisementMarkersForLinear=Be,exports.skip=qe,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=Ne;