@viewlift/player-backup 2.0.184-backup → 2.0.186-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 (54) hide show
  1. package/cjs/{autoNextVideo-673c1382.js → autoNextVideo-38dc2b1a.js} +1 -1
  2. package/cjs/bundle.css +1 -1
  3. package/cjs/{features-7f469c69.js → features-01e49472.js} +1 -1
  4. package/cjs/generic-cba69bf4.js +1 -0
  5. package/cjs/{index-c035c73b.js → index-9be117e8.js} +1 -1
  6. package/cjs/index-d4234b99.js +1 -0
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-487604ad.js → multicamv2-398474da.js} +1 -1
  9. package/cjs/{multicamv2-f138b353.js → multicamv2-8b23229d.js} +1 -1
  10. package/cjs/{nextEpisodeButton-e786d302.js → nextEpisodeButton-1b40ef26.js} +1 -1
  11. package/cjs/{playlist-e6759d53.js → playlist-e6c2825f.js} +1 -1
  12. package/cjs/{series-ec74e2e2.js → series-297bafc1.js} +1 -1
  13. package/cjs/{series-v2-09923887.js → series-v2-5570a2cd.js} +1 -1
  14. package/cjs/{series-v2-69e14ba7.js → series-v2-db1ad461.js} +1 -1
  15. package/cjs/{skin-7920c51a.js → skin-11323a87.js} +1 -1
  16. package/cjs/{skin-ca14df5e.js → skin-1c423666.js} +1 -1
  17. package/cjs/{skin-d5963b85.js → skin-48246a19.js} +1 -1
  18. package/cjs/{skin-e436cded.js → skin-561b659e.js} +1 -1
  19. package/cjs/{skin-6fc657c2.js → skin-6e8afee1.js} +1 -1
  20. package/cjs/{skin-292be09b.js → skin-883f5d34.js} +1 -1
  21. package/cjs/{skin-9e2ed110.js → skin-ce90f0eb.js} +1 -1
  22. package/cjs/{util-846f8431.js → util-18aee790.js} +1 -1
  23. package/cjs/{videoSelector-7db1d2c2.js → videoSelector-0729098f.js} +1 -1
  24. package/cjs/{videoSelector-1c7e0271.js → videoSelector-6de13ca6.js} +1 -1
  25. package/esm/{autoNextVideo-f45464b6.js → autoNextVideo-dc705315.js} +1 -1
  26. package/esm/bundle.css +1 -1
  27. package/esm/{features-d847e381.js → features-f56e8bed.js} +1 -1
  28. package/esm/{generic-3d4ce4c7.js → generic-8a8db481.js} +1 -1
  29. package/esm/index-5670e62c.js +1 -0
  30. package/esm/{index-55f4f2aa.js → index-af9c0e7a.js} +1 -1
  31. package/esm/index.js +1 -1
  32. package/esm/{multicamv2-f14a670c.js → multicamv2-64140948.js} +1 -1
  33. package/esm/{multicamv2-62ff700f.js → multicamv2-b744e410.js} +1 -1
  34. package/esm/{nextEpisodeButton-4a7eea47.js → nextEpisodeButton-73551df3.js} +1 -1
  35. package/esm/{playlist-068a7e2a.js → playlist-578ea2ea.js} +1 -1
  36. package/esm/plugins/comscore_dist/index.d.ts +2 -1
  37. package/esm/plugins/comscore_dist/index.min.d.ts +4 -3
  38. package/esm/{series-3c8d0ca4.js → series-294218d4.js} +1 -1
  39. package/esm/{series-v2-bc6f792d.js → series-v2-12b0bca5.js} +1 -1
  40. package/esm/{series-v2-bbd4d425.js → series-v2-854ae2a8.js} +1 -1
  41. package/esm/{skin-024f3e27.js → skin-15e91bab.js} +1 -1
  42. package/esm/{skin-559d51a0.js → skin-3bc4aeac.js} +1 -1
  43. package/esm/{skin-29321864.js → skin-7515bc9e.js} +1 -1
  44. package/esm/{skin-072763e8.js → skin-997d3668.js} +1 -1
  45. package/esm/{skin-0623d1d1.js → skin-aed83d3c.js} +1 -1
  46. package/esm/{skin-6517711c.js → skin-b0003a89.js} +1 -1
  47. package/esm/{skin-7ab436df.js → skin-b97969e2.js} +1 -1
  48. package/esm/{util-f4aa7ada.js → util-e83800cb.js} +1 -1
  49. package/esm/{videoSelector-b5a30052.js → videoSelector-3f031925.js} +1 -1
  50. package/esm/{videoSelector-2567f5af.js → videoSelector-8c1c483c.js} +1 -1
  51. package/package.json +1 -1
  52. package/cjs/generic-54695799.js +0 -1
  53. package/cjs/index-0b884f33.js +0 -1
  54. package/esm/index-fbb0819a.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{A as a,x as s}from"./generic-3d4ce4c7.js";import{g as c}from"./resolution-1c59b0f3.js";import{p as d}from"./skin-d5091b86.js";import{g as u}from"./localisation-0bf399a1.js";import{g as m}from"./player_instance-34118a5b.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=d(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=d(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-v2-9ed4268f.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=m(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-4a7eea47.js").then((function(r){var o=r.default,l=m(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},j=function(e,t,n){import("./series-3c8d0ca4.js").then((function(r){var o=r.seriesModule,l=m(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]&&r.handleSeasonChange(t[e],e,l,n)}))},c=0;c<a.length;c++)s(c)}))},k=function(e,t){import("./videoSelector-b5a30052.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},S=function(e,t){import("./caption-settings-34414f59.js").then((function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-4708c41d.js").then((function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},I=function(e,t){import("./playlist-068a7e2a.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},E=function(e,t){import("./series-v2-bc6f792d.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},O=function(e,t){import("./multicamv2-62ff700f.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},M=function(e,t){var n=m(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=m(e).el(),n=0,r=m(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-2567f5af.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},L=function(e,t){import("./series-v2-bbd4d425.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},_=function(e,t){import("./multicamv2-f14a670c.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},N=function(e,t){import("./start-begin-btn-1e096fec.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("startFromBeginingButton",r);var l=o.getChild("controlBar").addChild("startFromBeginingButton",h({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},T=function(e,t){import("./watch-live-btn-5419f3a7.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("watchLiveButton",r);var l=o.getChild("controlBar").addChild("watchLiveButton",h({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};export{B as a,j as b,b as c,y as d,C as e,w as f,S as g,M as h,g as i,x as j,_ as k,I as l,L as m,P as n,k as o,E as p,O as q,N as r,T as s};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{A as a,x as s}from"./generic-8a8db481.js";import{g as c}from"./resolution-1c59b0f3.js";import{p as d}from"./skin-d5091b86.js";import{g as u}from"./localisation-0bf399a1.js";import{g as m}from"./player_instance-34118a5b.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=d(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=d(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-v2-9ed4268f.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=m(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-73551df3.js").then((function(r){var o=r.default,l=m(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},j=function(e,t,n){import("./series-294218d4.js").then((function(r){var o=r.seriesModule,l=m(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]&&r.handleSeasonChange(t[e],e,l,n)}))},c=0;c<a.length;c++)s(c)}))},k=function(e,t){import("./videoSelector-3f031925.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},S=function(e,t){import("./caption-settings-34414f59.js").then((function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-4708c41d.js").then((function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},I=function(e,t){import("./playlist-578ea2ea.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},E=function(e,t){import("./series-v2-12b0bca5.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},O=function(e,t){import("./multicamv2-b744e410.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},M=function(e,t){var n=m(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=m(e).el(),n=0,r=m(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-8c1c483c.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},L=function(e,t){import("./series-v2-854ae2a8.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},_=function(e,t){import("./multicamv2-64140948.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},N=function(e,t){import("./start-begin-btn-1e096fec.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("startFromBeginingButton",r);var l=o.getChild("controlBar").addChild("startFromBeginingButton",h({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},T=function(e,t){import("./watch-live-btn-5419f3a7.js").then((function(n){var r=n.default,o=m(e);i.registerComponent("watchLiveButton",r);var l=o.getChild("controlBar").addChild("watchLiveButton",h({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};export{B as a,j as b,b as c,y as d,C as e,w as f,S as g,M as h,g as i,x as j,_ as k,I as l,L as m,P as n,k as o,E as p,O as q,N as r,T as s};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{a,e as d,g as s,h as u,s as c,i as v,d as f}from"./currentVideoInfo-a8a254c2.js";import{a as m,r as p}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import w from"@babel/runtime/helpers/toConsumableArray";import y from"@babel/runtime/helpers/slicedToArray";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function h(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function _(e,n){E("event",e,n)}var T={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 b(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 O(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var S={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=S.version;var A,C=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==T?void 0:T.getVideoDetails)},L=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:C(),params:O({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":S.version,"x-player-name":"videojs"},withCredentials:!0})},P=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:F.get()+T.getLinearChannelDetails,params:O(O(O(O(O({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},R=function(e,n){var t,o,r=G(n),l=(null==r?void 0:r.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})})):i({url:F.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},D=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,x();case 2:return o=e.sent,e.abrupt("return",i({url:F.get()+"".concat(null==T?void 0:T.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(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)}}(),k=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getVideoInfoV2,"/").concat(r,"/").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})},j=function(e){var n=e.videoId;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(A=null==T?void 0:T.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),M=function(e,n,t,o){return i({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})},V=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},N=null;function W(){return{set:function(e){e&&(N=e)},get:function(){return N}}}var U=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=W().get(),o=F.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),B=null,x=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"))||!V(n)){e.next=6;break}return B||(B=U().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&W().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){B=null}))),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=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},G=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function Q(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var z=100,q=function(){var e,n,t,o,i,r,l,d=a();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.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==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function K(){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=K(),window.sessionStorage.setItem("uid",e),e)}function J(){return $.apply(this,arguments)}function $(){return($=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,x();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 Z(e){return e?String(e):""}var ee=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ne(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=K(),d="production",s="WEBSITE",u=null,c=0,v=null,f=0,m=0,p=!1,g=[],I=r(e);if(I){var w=function(){var e,n,t,o;return Math.round((null==I||null===(e=I.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)},y=ee((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0})),E=function(){var e=n(t.mark((function e(n){var o,r,u,c,v,f,m,p,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return g=e.sent,I=G(g),e.t0=Y,e.t1=Y,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=X(),e.t6=q(),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=d,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?Z(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r: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!==(f=n.bufferHealth)&&void 0!==f?f: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==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],i({url:(null==l||null===(p=l.beacon)||void 0===p?void 0:p.url)||F.get()+T.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),h=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,_("BUFFERING",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";_(o,Y({pfm:s,uid:X(),vid:q(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=ee((function(){var e;c=0,v=setInterval((function(){c=h(c)}),z),_("PLAY",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":q(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},S=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,_("FIRST_FRAME",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:y()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:y()}),p=!0,c=0}))},A=function(){var e=!1;I.on("waiting",ee((function(){p&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!I.paused()?f=h(f):clearInterval(u)}),z))}))),I.on("playing",ee((function(){e=!1,clearInterval(u)})))},C=function(){var e=function(e){var n,t,o,i=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:y(),pfm:s,uid:X(),vid:q(),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==l||null===(o=l.beacon)||void 0===o?void 0:o.params);_(e,Y({},i)),E(Y({eventName:e,adPosition:1},i))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},L=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];m=0,g.push(e),E({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:y(),bitrate:w()})}}))};b(),A(),C(),L(),O(),I.on("loadeddata",S)}else console.error("Videojs: Player instance not found.")}function te(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ne(e,n,t)}var oe=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"},ie=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;j({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))},le=function(){var e=d.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),i=a(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=d.get(),u=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return u>=0?u+1:1};function de(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?de(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ue=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ce=function(e){var n=ve(e,"video.tags",[]),t=ve(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ve=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var n,t,o,i,a,d,s,u,c,v,f,m,p,g,I,w,y,E,h,_,T,b,O,S,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",C=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return A;var P=(null==L?void 0:L.siteName)||"",R=(null==L?void 0:L.contentType)||"video",D=(null==L||null===(o=L[R])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[R])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),k=r(C);if(!A.includes("VIEWLIFT_"))return A;var j,F=window.getComputedStyle(document.getElementById(C),null),M=Math.trunc(F.getPropertyValue("height").slice(0,-2)),V=Math.trunc(F.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==L||null===(d=L.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:ve(L,"video.gist.id",""),W="linearchannel"===R?null==L||null===(v=L.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===m?void 0:m.title:ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,B=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",(function(e){U=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=se(se({},me(D)),{},(b={VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:M,VIEWLIFT_SIZE:ue(V,M),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===(p=window)||void 0===p?void 0:p.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ve(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ce(L),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ve(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ve(null===(w=window)||void 0===w||null===(y=w.app_data)||void 0===y||null===(E=y.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"==P||"usanetwork"==P?"":ve(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:ve(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ve(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:le(),VIEWLIFT_CONTENT_TAGS:ce(L),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(O=window)||void 0===O||null===(S=O.customData)||void 0===S?void 0:S.macros);for(var H in x){var G=new RegExp(H,"g");A=A.replace(G,x[H])}return A},me=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(ie()?s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=ie()?se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=ie()?se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=se(se({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},pe=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[p])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.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!=w&&w.hls)return Ie(w);if(g){var h=we(I,n);return h.src=fe(h.src,n,e),h}if("Safari"!==oe()&&E)return ge(I);if(y){var _=Ie(I);return _.src=fe(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=fe(T.src,n,e),T}return null},ge=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Ie=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=oe();if(r(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(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,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(i);return ye(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ye(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.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==a?void 0:a.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:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ye=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==oe()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=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 i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},he=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},_e=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Te=!1,be=function(e,n,t){var o=fe(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Te=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Te&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,(function(){u&&l.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.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})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function Oe(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",(function(t){var o,i,r,s,u,c,v,f,m;if(Ae.enabled&&"input"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.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||_n(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||hn(e,10)}}}),!0)}var Se,Ae=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Ce="ssai-breakStart",Le="ssai-adImpression",Pe="ssai-firstQuartile",Re="ssai-midpoint",De="ssai-thirdQuartile",ke="ssai-complete",je="ssai-breakEnd",Fe={breakStart:Ce,impression:Le,firstQuartile:Pe,midpoint:Re,thirdQuartile:De,complete:ke,breakEnd:je};function Me(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Fe[o];i&&t.trigger(i,n)}function Ve(e){var n=r(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(Le,e)},adFirstQuartile:function(e){return t(Pe,e)},adMidpoint:function(e){return t(Re,e)},adThirdQuartile:function(e){return t(De,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(je,e)}}}function Ne(e){var n,t,o,i,r=e.isLive,l=e.startTimeInSeconds;return r?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===i?void 0:i.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function We(){var e,n,t,o,i,r,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(Ne({isLive:null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===i?void 0:i.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.durationMs,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Ue(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function Be(){var e,n,t,o,i;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var r=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;r.notifyPause(),r.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(r.setMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),r.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function xe(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 He(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Ge(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?He(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):He(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Qe(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 Ye(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)?Ye(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Ye(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),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 i=document.createElement("script");i.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",i.async=!0,document.head.appendChild(i),i.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 i=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(i),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},i.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var ze,qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Ke=(ze=null,{set:function(e){ze=e},get position(){return ze}});function Xe(e,n){return Je.apply(this,arguments)}function Je(){return(Je=n(t.mark((function e(n,o){var i,l,a,d,s,u,c,v,f,m,p,g,I,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=pe(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=Ze(u),v=y(c,2),f=v[0],m=v[1],p=$e(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=y(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ge({adsParams:Ge({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return I=e.sent,w="https://"+new URL(u).hostname,E=I.trackingUrl,h=I.manifestUrl,_=w+E,T=w+h,qe.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function $e(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=y(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function Ze(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Qe((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=y(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var v=y(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var en,nn,tn,on,rn=(en=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),en=Array.isArray(e)?w(e):en},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",en),w(en)}}),ln=new Map;function an(e,n){return dn.apply(this,arguments)}function dn(){return dn=n(t.mark((function e(o,i){var l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,i,l,a){var d=r(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Qe(t);try{var c=function(){var t,r,u,c=s.value,v=c.eventType,f=c.beaconUrls,m=c.startTimeInSeconds,p=c.startTime,g=c.durationInSeconds,I=m||0,w=f,y=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=ln.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",ln),e>=I&&!h.includes(E)){h.push(E),ln.set("pod-".concat(l),h);try{C(v,n,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Ke.position;Ke.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof y)try{var T,b={eventType:v,startTimeInSeconds:m,startTime:p,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[i],adIndex:i};y({adsData:b}),Me(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var O,S=qe.get();We(xe(Ge(Ge({},null==n||null===(O=n.ads)||void 0===O?void 0:O[i]),{},{trackingUrl:S})))}else"complete"===v?Ue():"breakEnd"===v&&Be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},ln.clear(),Ke.set(i),m=qe.get(),(p=r(o)).one("loadeddata",(function(){m&&S(m)})),I=new Map,y=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=function(){var e=n(t.mark((function e(n){var l,a,d,s,u,c,v,f,m,p,S,C,P,R,D,k,j,F,M,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",k),0===e.button&&P()},D=function(e){},R=function(){var e,n=p.currentTime(),t=null,o=Qe(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){p.currentTime(t+2.2)}),100))},P=function(){var e,n=p.currentTime(),t=null,o=Qe(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!I.has(r)||n>=r&&n<=d)&&(t=r,I.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){p.currentTime(t+.4)}),100))},u=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),f=v.avails,m=[],p=r(o),S=p.controlBar.progressControl,C=S.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t,o,i;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),m.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===(i=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===i?void 0:i[0])||[]})})),!u&&i&&(p.currentTime(i),R()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m),console.log(m,"data"),m.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",C.appendChild(r)}})),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=g((function(){var e=p.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=m[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(i,!0),Ae.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),S.el().classList.add("hide-progress-bar");for(var d=e-i,s=0,u=0,c=0;c<l.length;c++){var v,f=null==l||null===(v=l[c])||void 0===v?void 0:v.durationInSeconds;if(d<s+f){u=c;break}s+=f}l[u];var p=Math.max(0,r-d),g=Math.round(p);j.style.display="block",V.textContent="".concat(u+1," of ").concat(l.length," • ").concat(A(g));var E=[];return null==l||l.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,w(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),L(e,t,E,u,o,R),"break"}y.delete(i)},o=0;o<m.length;o++){if("break"===t())break}n||(j.style.display="none",S.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){Ae.enabled&&"ArrowRight"==e.key&&(P(),hn(o,10),e.stopPropagation())})),S.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(j=document.createElement("div")).className="ssai-ad-container",(F=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",F.append(M),(V=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(F),j.append(V),p.el().appendChild(j);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),dn.apply(this,arguments)}function sn(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 un(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)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function un(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function cn(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 vn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var fn={},mn=(null===(nn=window)||void 0===nn||null===(tn=nn.location)||void 0===tn||null===(on=tn.search)||void 0===on?void 0:on.includes("debug=true"))||!1,pn=null;function gn(e){return In.apply(this,arguments)}function In(){return In=n(t.mark((function e(o){var i,l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a=r(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=sn(t);try{for(u.s();!(s=u.n()).done;){var c,v,f,m=s.value,p=m.eventType,g=m.beaconUrls,I=m.startTimeInSeconds,w=m.startTime,y=m.durationInSeconds,E=m.eventId,h=I||0,_=g,T=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.ads)||void 0===f?void 0:f.adEventHandler)||null,b="".concat(E,"_").concat(p),O="pod-".concat(d);P.has(O)||P.set(O,new Set);var S=P.get(O);if(mn&&console.warn(e,h,"map:",p,"condition1:",e>=h,"map:",P),e>=h&&e<=h+R&&!S.has(b)){S.add(b);try{D(p,n,_,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,p,n)}if("function"==typeof T)try{var A,C={eventType:p,startTimeInSeconds:I,startTime:w,durationInSeconds:y,ad:null==n||null===(A=n.ads)||void 0===A?void 0:A[i],adIndex:i};T({adsData:C}),Me(o,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},D=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=fn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=fn)||void 0===r?void 0:r.totalAds)||(mn&&(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)}))})))},p=function(){pn&&clearInterval(pn)},f=qe.get(),(m=r(o)).one("loadeddata",(function(){p(),pn=setInterval((function(){f&&!m.paused()&&L(f)}),2e3)})),m.on("dispose",(function(){p()})),I=new Map,y=new Map,E=-1,h=null,_=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==m||null===(a=m.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==m||null===(d=m.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,O=(null==m||null===(s=m.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(c=m.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!1,C=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return w(o);var i=[],r=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),s=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!s&&l){var u=null==d?void 0:d.map((function(e){return vn(vn({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},L=function(){var e=n(t.mark((function e(n){var i,l,a,d,s,u,c,v,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,c=[],v=r(o),f=v.controlBar.progressControl,m=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),s.map((function(e,n){c.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:C(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),mn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=c),c.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=v.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=g((function(){var e=v.currentTime();if(e!==E){E=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&I.set(o,!0),Ae.disable(),_&&_.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,v=0;v<r.length;v++){var m,p=null==r||null===(m=r[v])||void 0===m?void 0:m.durationInSeconds;if(d<s+p){u=v;break}s+=p}setTimeout((function(){fn.totalAds=null==r?void 0:r.length,fn.currentAdIndex=u}),1e3);var g=[];return null==r||r.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,w(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&g.push.apply(g,w(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,g,u),"break"}y.delete(o)},t=0;t<c.length;t++){if("break"===n())break}A||(fn={},f.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,R=2.5;case 22:case"end":return e.stop()}}),e)}))),In.apply(this,arguments)}function wn(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 yn=function(e){o(e).play()},En=function(e){o(e).pause()},hn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},_n=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Tn=function(e){return!!o.getPlayer("".concat(e))},bn=function(e){return o(e).paused()},On=function(){var e=n(t.mark((function e(o,i){var l,a,d,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,x();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise((function(e,r){var s=(null==i?void 0:i.programs)||[];null==i||delete i.programs,P(i,a).then(function(){var r=n(t.mark((function n(r){var a,u,v,m,p,g,I,w;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(g=null==r?void 0:r.data,window.sid=K(),g.contentType="linearchannel",g.channelId=null==i?void 0:i.channelId,I=(null==g||null===(a=g.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(v=u.app_data)||void 0===v||null===(m=v.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,w=pe(g,o),!I){n.next=11;break}return n.next=9,Xe(o,g);case 9:w=n.sent,l=!0;case 11:c(g),f(s),sessionStorage.setItem("program_switched",!0),w&&l?(Pn(o,w),I&&gn(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:g})}))):e({status:!0,msg:"Feed authenticated",response:g});case 15:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){r({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)}}(),Sn=function(){var e=n(t.mark((function e(o,i,l){var a,d,u,f,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return f=e.sent,(s()||null)&&v(i),g=0,I=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&k(i,f).then((function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),g=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(I=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,l){L(i,f).then(function(){var i=n(t.mark((function n(i){var a,d,s,u,v,f,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k,j,F,M,V,N,W,U,B,x,H,G,Q,Y,z,q,K,X;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==i?void 0:i.data,L=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(a=C[L])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(v=u.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==C||null===(f=C.video)||void 0===f||null===(y=f.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,c(i.data),(D=(null==C||null===(E=C.ads)||void 0===E||null===(h=E.preRoll)||void 0===h||null===(_=h.adTags)||void 0===_||null===(T=_.web)||void 0===T?void 0:T.active)&&(null==C||null===(b=C.ads)||void 0===b||null===(O=b.preRoll)||void 0===O||null===(S=O.adTags)||void 0===S||null===(A=S.web)||void 0===A?void 0:A.url))&&be(o,D,C),k=pe(C,o),!P){n.next=12;break}return n.next=11,Xe(o,C);case 11:k=n.sent;case 12:k?(G=(null==C||null===(j=C.video)||void 0===j||null===(F=j.gist)||void 0===F?void 0:F.videoImageUrl)||(null==C||null===(M=C.video)||void 0===M||null===(V=M.gist)||void 0===V||null===(N=V.imageGist)||void 0===N?void 0:N.r16x9),(Q=r(o)).poster(G),Pn(o,k),P&&an(o,w),Q.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:C})})),Q.on("loadeddata",(function(){_e(),e({status:!0,msg:"Video Loaded",response:C})})),Q.one("play",(function(){g&&!P&&I<95&&setTimeout((function(){Q.currentTime(g)}),0)})),Q.one("error",(function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==C||null===(W=C.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==C||null===(x=C.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==C||null===(z=C.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==C||null===(K=C.video)||void 0===K?void 0:K.closedCaptions),Y=X.filter((function(e){return"VTT"===e.format})),m(o,Y)):p(o)):(he(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){Rn(e,o,l,i)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),An=function(e,n,t){var o=r(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Cn=function(e){var n=r(e);if(Ln(),function(){var e,n,t,o,i,r,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef){try{null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||r.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Ln=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()},Pn=function(e,n){var t=r(e);t&&t.src(n)},Rn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Tn(t)&&he(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):wn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Dn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{_n as A,Tn as B,Sn as C,On as D,Cn as E,M as F,rn as G,Ve as H,F as I,H as J,W as K,V as L,h as M,ln as N,Oe as O,ie as P,bn as Q,gn as R,an as S,j as T,ae as a,le as b,pe as c,oe as d,_e as e,Dn as f,X as g,he as h,te as i,be as j,Ee as k,Pn as l,Xe as m,G as n,L as o,k as p,Rn as q,x as r,D as s,P as t,R as u,re as v,An as w,hn as x,yn as y,En as z};
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{a,e as d,g as s,h as u,s as c,i as v,d as f}from"./currentVideoInfo-a8a254c2.js";import{a as m,r as p}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import w from"@babel/runtime/helpers/toConsumableArray";import y from"@babel/runtime/helpers/slicedToArray";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function h(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function _(e,n){E("event",e,n)}var T={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 b(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 O(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var S={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=S.version;var A,C=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==T?void 0:T.getVideoDetails)},L=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:C(),params:O({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":S.version,"x-player-name":"videojs"},withCredentials:!0})},P=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:F.get()+T.getLinearChannelDetails,params:O(O(O(O(O({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},R=function(e,n){var t,o,r=G(n),l=(null==r?void 0:r.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})})):i({url:F.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},D=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,x();case 2:return o=e.sent,e.abrupt("return",i({url:F.get()+"".concat(null==T?void 0:T.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:O({},n),params:O({},(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)}}(),k=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getVideoInfoV2,"/").concat(r,"/").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})},j=function(e){var n=e.videoId;return i({method:"GET",url:F.get()+"".concat(null==T?void 0:T.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(A=null==T?void 0:T.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),V=function(e,n,t,o){return i({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})},M=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},N=null;function W(){return{set:function(e){e&&(N=e)},get:function(){return N}}}var U=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=W().get(),o=F.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),B=null,x=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"))||!M(n)){e.next=6;break}return B||(B=U().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&W().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){B=null}))),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=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},G=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function Q(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 Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var z=100,q=function(){var e,n,t,o,i,r,l,d=a();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.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==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(i=d.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function K(){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=K(),window.sessionStorage.setItem("uid",e),e)}function J(){return $.apply(this,arguments)}function $(){return($=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,x();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 Z(e){return e?String(e):""}var ee=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ne(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=K(),d="production",s="WEBSITE",u=null,c=0,v=null,f=0,m=0,p=!1,g=[],I=r(e);if(I){var w=function(){var e,n,t,o;return Math.round((null==I||null===(e=I.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)},y=ee((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0})),E=function(){var e=n(t.mark((function e(n){var o,r,u,c,v,f,m,p,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return g=e.sent,I=G(g),e.t0=Y,e.t1=Y,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=X(),e.t6=q(),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=d,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?Z(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r: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!==(f=n.bufferHealth)&&void 0!==f?f: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==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],i({url:(null==l||null===(p=l.beacon)||void 0===p?void 0:p.url)||F.get()+T.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),h=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,_("BUFFERING",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";_(o,Y({pfm:s,uid:X(),vid:q(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),E({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=ee((function(){var e;c=0,v=setInterval((function(){c=h(c)}),z),_("PLAY",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":q(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},S=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),f=c||0,_("FIRST_FRAME",Y({pfm:s,uid:X(),vid:q(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:y()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),E({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:y()}),p=!0,c=0}))},A=function(){var e=!1;I.on("waiting",ee((function(){p&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!I.paused()?f=h(f):clearInterval(u)}),z))}))),I.on("playing",ee((function(){e=!1,clearInterval(u)})))},C=function(){var e=function(e){var n,t,o,i=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:y(),pfm:s,uid:X(),vid:q(),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==l||null===(o=l.beacon)||void 0===o?void 0:o.params);_(e,Y({},i)),E(Y({eventName:e,adPosition:1},i))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},L=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];m=0,g.push(e),E({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:y(),bitrate:w()})}}))};b(),A(),C(),L(),O(),I.on("loadeddata",S)}else console.error("Videojs: Player instance not found.")}function te(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ne(e,n,t)}var oe=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"},ie=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;j({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))},le=function(){var e=d.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),i=a(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=d.get(),u=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return u>=0?u+1:1};function de(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?de(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):de(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ue=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ce=function(e){var n=ve(e,"video.tags",[]),t=ve(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ve=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var n,t,o,i,a,d,s,u,c,v,f,m,p,g,I,w,y,E,h,_,T,b,O,S,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",C=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return A;var P=(null==L?void 0:L.siteName)||"",R=(null==L?void 0:L.contentType)||"video",D=(null==L||null===(o=L[R])||void 0===o?void 0:o.metadata)||(null==L||null===(i=L[R])||void 0===i||null===(a=i.gist)||void 0===a?void 0:a.metadata),k=r(C);if(!A.includes("VIEWLIFT_"))return A;var j,F=window.getComputedStyle(document.getElementById(C),null),V=Math.trunc(F.getPropertyValue("height").slice(0,-2)),M=Math.trunc(F.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==L||null===(d=L.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:ve(L,"video.gist.id",""),W="linearchannel"===R?null==L||null===(v=L.linearchannel)||void 0===v||null===(f=v.channels)||void 0===f||null===(m=f.find((function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)})))||void 0===m?void 0:m.title:ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,B=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",(function(e){U=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=se(se({},me(D)),{},(b={VIEWLIFT_WIDTH:M,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ue(M,V),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===(p=window)||void 0===p?void 0:p.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ve(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ce(L),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ve(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ve(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ve(null===(w=window)||void 0===w||null===(y=w.app_data)||void 0===y||null===(E=y.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"==P||"usanetwork"==P?"":ve(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ve(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:ve(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ve(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:le(),VIEWLIFT_CONTENT_TAGS:ce(L),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(O=window)||void 0===O||null===(S=O.customData)||void 0===S?void 0:S.macros);for(var H in x){var G=new RegExp(H,"g");A=A.replace(G,x[H])}return A},me=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(ie()?s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=ie()?se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=se(se({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=ie()?se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):se(se({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=se(se({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},pe=function(e,n){var t,o,i,r,l,a,d,s,u,c,v,f,m,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[p])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[p])||void 0===v||null===(f=v.streamingInfo)||void 0===f||null===(m=f.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!=w&&w.hls)return Ie(w);if(g){var h=we(I,n);return h.src=fe(h.src,n,e),h}if("Safari"!==oe()&&E)return ge(I);if(y){var _=Ie(I);return _.src=fe(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=fe(T.src,n,e),T}return null},ge=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Ie=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=oe();if(r(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(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,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(i);return ye(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ye(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.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==a?void 0:a.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:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ye=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==oe()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ee=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 i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},he=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},_e=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Te=!1,be=function(e,n,t){var o=fe(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Te=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Te&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout((function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,(function(){u&&l.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),l.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})}))})),l.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function Oe(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",(function(t){var o,i,r,s,u,c,v,f,m;if(Ae.enabled&&"input"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.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||Tn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||_n(e,10)}}}),!0)}var Se,Ae=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Ce="ssai-breakStart",Le="ssai-adImpression",Pe="ssai-firstQuartile",Re="ssai-midpoint",De="ssai-thirdQuartile",ke="ssai-complete",je="ssai-breakEnd",Fe={breakStart:Ce,impression:Le,firstQuartile:Pe,midpoint:Re,thirdQuartile:De,complete:ke,breakEnd:je};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=Fe[o];i&&t.trigger(i,n)}function Me(e){var n=r(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(Le,e)},adFirstQuartile:function(e){return t(Pe,e)},adMidpoint:function(e){return t(Re,e)},adThirdQuartile:function(e){return t(De,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(je,e)}}}function Ne(e){var n,t,o,i,r=e.isLive,l=e.startTimeInSeconds;return r?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===i?void 0:i.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function We(){var e,n,t,o,i,r,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(Ne({isLive:null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===i?void 0:i.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.adDuration,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Ue(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function Be(){var e,n,t,o,i;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var r=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;r.notifyPause(),r.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(r.setMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),r.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function xe(e,n){var t,o,i=null!==(o=null===(t=null==e?void 0:e.match(/campaignId=([^;]*)/))||void 0===t?void 0:t[1])&&void 0!==o?o:null;return(null==i?void 0:i.trim())||null}function He(e){var n,t,o,i;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:xe(null===(t=null===(n=null==e?void 0:e.extensions)||void 0===n?void 0:n[0])||void 0===t?void 0:t.content),placementId:xe(null===(i=null===(o=null==e?void 0:e.extensions)||void 0===o?void 0:o[0])||void 0===i?void 0:i.content),trackingUrl:null==e?void 0:e.trackingUrl,creativeId:null==e?void 0:e.creativeId}}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}function Qe(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}function Ye(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 ze(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)?ze(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function ze(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),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 i=document.createElement("script");i.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",i.async=!0,document.head.appendChild(i),i.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 i=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(i),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},i.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var qe,Ke=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Xe=(qe=null,{set:function(e){qe=e},get position(){return qe}});function Je(e,n){return $e.apply(this,arguments)}function $e(){return($e=n(t.mark((function e(n,o){var i,l,a,d,s,u,c,v,f,m,p,g,I,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=pe(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=en(u),v=y(c,2),f=v[0],m=v[1],p=Ze(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=y(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qe({adsParams:Qe({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return I=e.sent,w="https://"+new URL(u).hostname,E=I.trackingUrl,h=I.manifestUrl,_=w+E,T=w+h,Ke.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}}),e,null,[[11,29]])})))).apply(this,arguments)}function Ze(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=y(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function en(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ye((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=y(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var v=y(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var nn,tn,on,rn,ln=(nn=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),nn=Array.isArray(e)?w(e):nn},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",nn),w(nn)}}),an=new Map;function dn(e,n){return sn.apply(this,arguments)}function sn(){return sn=n(t.mark((function e(o,i){var l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,i,l,a){var d=r(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Ye(t);try{var c=function(){var t,r,u,c=s.value,v=c.eventType,f=c.beaconUrls,m=c.startTimeInSeconds,p=c.startTime,g=c.durationInSeconds,I=m||0,w=f,y=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(u=r.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=an.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",an),e>=I&&!h.includes(E)){h.push(E),an.set("pod-".concat(l),h);try{C(v,n,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Xe.position;Xe.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof y)try{var T,b={eventType:v,startTimeInSeconds:m,startTime:p,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[i],adIndex:i};y({adsData:b}),Ve(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var O,S=Ke.get();We(He(Qe(Qe({},null==n||null===(O=n.ads)||void 0===O?void 0:O[i]),{},{trackingUrl:S})))}else"complete"===v?Ue():"breakEnd"===v&&Be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},C=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},an.clear(),Xe.set(i),m=Ke.get(),(p=r(o)).one("loadeddata",(function(){m&&S(m)})),I=new Map,y=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==p||null===(s=p.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==p||null===(u=p.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,O=(null==p||null===(v=p.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=function(){var e=n(t.mark((function e(n){var l,a,d,s,u,c,v,f,m,p,S,C,P,R,D,k,j,F,V,M;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",k),0===e.button&&P()},D=function(e){},R=function(){var e,n=p.currentTime(),t=null,o=Ye(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){p.currentTime(t+2.2)}),100))},P=function(){var e,n=p.currentTime(),t=null,o=Ye(m);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!I.has(r)||n>=r&&n<=d)&&(t=r,I.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){p.currentTime(t+.4)}),100))},u=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),f=v.avails,m=[],p=r(o),S=p.controlBar.progressControl,C=S.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t,o,i;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),m.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===(i=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===i?void 0:i[0])||[]})})),!u&&i&&(p.currentTime(i),R()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m),console.log(m,"data"),m.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",C.appendChild(r)}})),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=g((function(){var e=p.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=m[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(i,!0),Ae.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),S.el().classList.add("hide-progress-bar");for(var d=e-i,s=0,u=0,c=0;c<l.length;c++){var v,f=null==l||null===(v=l[c])||void 0===v?void 0:v.durationInSeconds;if(d<s+f){u=c;break}s+=f}l[u];var p=Math.max(0,r-d),g=Math.round(p);j.style.display="block",M.textContent="".concat(u+1," of ").concat(l.length," • ").concat(A(g));var E=[];return null==l||l.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,w(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),L(e,t,E,u,o,R),"break"}y.delete(i)},o=0;o<m.length;o++){if("break"===t())break}n||(j.style.display="none",S.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){Ae.enabled&&"ArrowRight"==e.key&&(P(),_n(o,10),e.stopPropagation())})),S.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(j=document.createElement("div")).className="ssai-ad-container",(F=document.createElement("div")).className="sponsored-adbox",(V=document.createElement("div")).className="sponsored-text",V.textContent="Sponsored Ad",F.append(V),(M=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(F),j.append(M),p.el().appendChild(j);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),sn.apply(this,arguments)}function un(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 cn(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)?cn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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 r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function cn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function vn(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 fn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):vn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var mn={},pn=(null===(tn=window)||void 0===tn||null===(on=tn.location)||void 0===on||null===(rn=on.search)||void 0===rn?void 0:rn.includes("debug=true"))||!1,gn=null;function In(e){return wn.apply(this,arguments)}function wn(){return wn=n(t.mark((function e(o){var i,l,a,d,s,u,c,v,f,m,p,I,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a=r(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=un(t);try{for(u.s();!(s=u.n()).done;){var c,v,f,m=s.value,p=m.eventType,g=m.beaconUrls,I=m.startTimeInSeconds,w=m.startTime,y=m.durationInSeconds,E=m.eventId,h=I||0,_=g,T=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(f=v.ads)||void 0===f?void 0:f.adEventHandler)||null,b="".concat(E,"_").concat(p),O="pod-".concat(d);P.has(O)||P.set(O,new Set);var S=P.get(O);if(pn&&console.warn(e,h,"map:",p,"condition1:",e>=h,"map:",P),e>=h&&e<=h+R&&!S.has(b)){S.add(b);try{D(p,n,_,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,p,n)}if("function"==typeof T)try{var A,C={eventType:p,startTimeInSeconds:I,startTime:w,durationInSeconds:y,ad:null==n||null===(A=n.ads)||void 0===A?void 0:A[i],adIndex:i};T({adsData:C}),Ve(o,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},D=function(e,n,t,o){var i,r;"breakEnd"===e&&(null===(i=mn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=mn)||void 0===r?void 0:r.totalAds)||(pn&&(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)}))})))},p=function(){gn&&clearInterval(gn)},f=Ke.get(),(m=r(o)).one("loadeddata",(function(){p(),gn=setInterval((function(){f&&!m.paused()&&L(f)}),2e3)})),m.on("dispose",(function(){p()})),I=new Map,y=new Map,E=-1,h=null,_=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==m||null===(a=m.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==m||null===(d=m.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,O=(null==m||null===(s=m.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(c=m.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!1,C=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return w(o);var i=[],r=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find((function(e){return e.includes("videoView")})))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),s=(null==d?void 0:d.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!s&&l){var u=null==d?void 0:d.map((function(e){return fn(fn({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},L=function(){var e=n(t.mark((function e(n){var i,l,a,d,s,u,c,v,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,c=[],v=r(o),f=v.controlBar.progressControl,m=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),s.map((function(e,n){c.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:C(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),pn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),null!=c&&c.length&&(window.adsQueueList=c),c.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=v.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),v._timeUpdateHandler&&v.off("timeupdate",v._timeUpdateHandler),v._timeUpdateHandler=g((function(){var e=v.currentTime();if(e!==E){E=e;for(var n=function(){var n=c[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&I.set(o,!0),Ae.disable(),_&&_.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,v=0;v<r.length;v++){var m,p=null==r||null===(m=r[v])||void 0===m?void 0:m.durationInSeconds;if(d<s+p){u=v;break}s+=p}setTimeout((function(){mn.totalAds=null==r?void 0:r.length,mn.currentAdIndex=u}),1e3);var g=[];return null==r||r.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,w(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&g.push.apply(g,w(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,g,u),"break"}y.delete(o)},t=0;t<c.length;t++){if("break"===n())break}A||(mn={},f.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ae.enable())}}),1e3),v.on("timeupdate",v._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,R=2.5;case 22:case"end":return e.stop()}}),e)}))),wn.apply(this,arguments)}function yn(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 En=function(e){o(e).play()},hn=function(e){o(e).pause()},_n=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Tn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},bn=function(e){return!!o.getPlayer("".concat(e))},On=function(e){return o(e).paused()},Sn=function(){var e=n(t.mark((function e(o,i){var l,a,d,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,x();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise((function(e,r){var s=(null==i?void 0:i.programs)||[];null==i||delete i.programs,P(i,a).then(function(){var r=n(t.mark((function n(r){var a,u,v,m,p,g,I,w;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(g=null==r?void 0:r.data,window.sid=K(),g.contentType="linearchannel",g.channelId=null==i?void 0:i.channelId,I=(null==g||null===(a=g.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(v=u.app_data)||void 0===v||null===(m=v.appcmsMain)||void 0===m||null===(p=m.adsConfig)||void 0===p?void 0:p.vodAdSticherProvider)||!1,w=pe(g,o),!I){n.next=11;break}return n.next=9,Je(o,g);case 9:w=n.sent,l=!0;case 11:c(g),f(s),sessionStorage.setItem("program_switched",!0),w&&l?(Rn(o,w),I&&In(o),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:g})}))):e({status:!0,msg:"Feed authenticated",response:g});case 15:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){r({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)}}(),An=function(){var e=n(t.mark((function e(o,i,l){var a,d,u,f,g,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x();case 2:return f=e.sent,(s()||null)&&v(i),g=0,I=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&k(i,f).then((function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),g=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(I=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,l){L(i,f).then(function(){var i=n(t.mark((function n(i){var a,d,s,u,v,f,y,E,h,_,T,b,O,S,A,C,L,P,R,D,k,j,F,V,M,N,W,U,B,x,H,G,Q,Y,z,q,K,X;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==i?void 0:i.data,L=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(a=C[L])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(v=u.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==C||null===(f=C.video)||void 0===f||null===(y=f.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,c(i.data),(D=(null==C||null===(E=C.ads)||void 0===E||null===(h=E.preRoll)||void 0===h||null===(_=h.adTags)||void 0===_||null===(T=_.web)||void 0===T?void 0:T.active)&&(null==C||null===(b=C.ads)||void 0===b||null===(O=b.preRoll)||void 0===O||null===(S=O.adTags)||void 0===S||null===(A=S.web)||void 0===A?void 0:A.url))&&be(o,D,C),k=pe(C,o),!P){n.next=12;break}return n.next=11,Je(o,C);case 11:k=n.sent;case 12:k?(G=(null==C||null===(j=C.video)||void 0===j||null===(F=j.gist)||void 0===F?void 0:F.videoImageUrl)||(null==C||null===(V=C.video)||void 0===V||null===(M=V.gist)||void 0===M||null===(N=M.imageGist)||void 0===N?void 0:N.r16x9),(Q=r(o)).poster(G),Rn(o,k),P&&dn(o,w),Q.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:C})})),Q.on("loadeddata",(function(){_e(),e({status:!0,msg:"Video Loaded",response:C})})),Q.one("play",(function(){g&&!P&&I<95&&setTimeout((function(){Q.currentTime(g)}),0)})),Q.one("error",(function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==C||null===(W=C.video)||void 0===W||null===(U=W.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==C||null===(x=C.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==C||null===(z=C.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==C||null===(K=C.video)||void 0===K?void 0:K.closedCaptions),Y=X.filter((function(e){return"VTT"===e.format})),m(o,Y)):p(o)):(he(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){Dn(e,o,l,i)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Cn=function(e,n,t){var o=r(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ln=function(e){var n=r(e);if(Pn(),function(){var e,n,t,o,i,r,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef){try{null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||r.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Pn=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()},Rn=function(e,n){var t=r(e);t&&t.src(n)},Dn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);bn(t)&&he(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):yn(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},kn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{Tn as A,bn as B,An as C,Sn as D,Ln as E,V as F,ln as G,Me as H,F as I,H as J,W as K,M as L,h as M,an as N,Oe as O,ie as P,On as Q,In as R,dn as S,j as T,ae as a,le as b,pe as c,oe as d,_e as e,kn as f,X as g,he as h,te as i,be as j,Ee as k,Rn as l,Je as m,G as n,L as o,k as p,Dn as q,x as r,D as s,P as t,R as u,re as v,Cn as w,_n as x,En as y,hn as z};
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import"axios";import{d as i,g as t,a as l,b as r,s as a,c as d,l as s,e as u,h as c,f as v,i as p,j as f,k as m,m as w,n as g,o as y,p as b,q as h,r as O,t as _,u as C,v as I,w as S,x as k,y as E,z as T,A as P,B as j,C as D,D as R,E as A,F as M,G as x,H as N,I as L,J as V,K as B,L as F,M as U}from"./generic-8a8db481.js";import{g as H}from"./player_instance-34118a5b.js";import G from"video.js";import{o as z,g as W,a as q,s as K,b as J,p as Y,c as X}from"./util-e83800cb.js";import{g as Q,d as $,a as Z,e as ee}from"./captions-f507e8ee.js";import{g as ne,p as oe}from"./resolution-1c59b0f3.js";import{i as ie,a as te}from"./skin-d5091b86.js";import{s as le}from"./localisation-0bf399a1.js";import{g as re,a as ae,s as de,v as se,b as ue,c as ce,d as ve,e as pe,f as fe}from"./currentVideoInfo-a8a254c2.js";import me from"@babel/runtime/helpers/typeof";import{s as we,w as ge}from"./icons-37daa6b3.js";import{c as ye,p as be,a as he,h as Oe,r as _e,g as Ce,b as Ie,d as Se,s as ke,e as Ee,f as Te}from"./helper-349e076f.js";import Pe from"@babel/runtime/helpers/toConsumableArray";var je=function(e){return new Promise((function(n,o){if(De(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){o("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}}))},De=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Re=function(e,n,o){var i=H(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var t=parseFloat(n)/100;i.volume(t),o&&o({status:!0,msg:"Volume set to ".concat(n,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Ae=function(e){var n=H(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Me=function(){var e=n(o.mark((function e(n){var t,l,r,a,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=H(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||!(null!=n&&n.chromecastReceiverId||null!=n&&n.airplay)){e.next=10;break}return e.prev=2,e.next=5,je("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.log("Error",e.t0);case 10:if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=13,import("@silvermine/videojs-chromecast");case 13:e.sent.default(G),(d=G.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(a=window)&&void 0!==a&&a.cast?null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==i()?null==r||r.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}}),e,null,[[2,7]])})));return function(n){return e.apply(this,arguments)}}(),xe=function(e,n){var o=H(e);o&&n&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var o,i,t,l,r,a=this.el(),d=G.dom.getPointerPosition(a,n).x;G.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(t=i.framework)||void 0===t||null===(l=t.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(s),s&&"CONNECTED"===u){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*d,c.seek()}}))};var Ne=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),je("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Le=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.resolve().then((function(){return Hn}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ve=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){G.getPlugin("eme")||G.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=n(o.mark((function e(){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(G),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Fe=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-8e3eab6d.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),Ue=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-08c7635e.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),He=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){je("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(G)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(G)}))},loadAdsLibrary:Ne,loadEMELibrary:Ve,loadMuxPlugin:Be,loadDvrSeekbar:Fe,loadContribDash:Ue,loadComscorePlugin:Le});function Ge(e){return ze.apply(this,arguments)}function ze(){return(ze=n(o.mark((function e(n){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,Ne();case 3:t&&"Safari"==i()&&Promise.resolve().then((function(){return He})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function We(e){return qe.apply(this,arguments)}function qe(){return(qe=n(o.mark((function e(n){var i,t,l,r,a,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=H(n.playerId),e.next=3,Le();case 3:d.comscore({publisherId:null==n||null===(i=n.comscore)||void 0===i?void 0:i.publishedId,endpoint:null==n||null===(t=n.comscore)||void 0===t?void 0:t.endpoint,implementationId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.implementationId,projectId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.projectId,debug:(null==n||null===(a=n.comscore)||void 0===a?void 0:a.debug)||!1});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ke(e,n){return Je.apply(this,arguments)}function Je(){return(Je=n(o.mark((function e(n,t){var l,r,a,d,s,u,c,v,p,f,m,w;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",p=null==t||null===(l=t[v])||void 0===l?void 0:l.drmEnabled,null==t||null===(r=t[v])||void 0===r||null===(a=r.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(d=t[v])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,e.prev=6,We(n),e.next=10,Promise.allSettled([p?"Safari"==i()?Ve():"caliente"!=(null===(w=window)||void 0===w?void 0:w.siteName)?Ue():Ve():"Safari"!=i()&&f?Ue():null,m?Me(n):null,Me(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[6,12]])})))).apply(this,arguments)}function Ye(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Xe(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Ye(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ye(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var Qe=new Set,$e=null,Ze=function(e,n,o){var i,l,r,a,d,s,u,c={},v=(null==e?void 0:e.contentType)||"video";c["c3.cm.id"]=(null===(i=e[v])||void 0===i?void 0:i.id)||"Null",c["c3.cm.contentType"]=an(e),c[null==o||null===(l=o.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==e||!e.linearchannel),c[null==o||null===(r=o.Constants)||void 0===r?void 0:r.STREAM_URL]=n.currentSrc(),c[null==o||null===(a=o.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===t()?"NULL":t(),c["c3.cm.categoryType"]=tn(e),c["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),c.DRMEnabled=(null===(d=e[v])||void 0===d?void 0:d.drmEnabled)||"None",c.DAIStream=null!==(s=e[v])&&void 0!==s&&null!==(u=s.gist)&&void 0!==u&&u.isSSAIEnabled?"YES":"NO",c[o.Constants.DEFAULT_RESOURCE]="AKAMAI",c["c3.cm.brand"]="NULL",c.CDVREnabled=ln(e),c["c3.cm.genreList"]=nn(e),c["c3.cm.genre"]=en(e),c["c3.cm.channel"]=on(e);var p=un(re(),e);return c=Xe(Xe({},c),p)},en=function(e){var n,o,i,t=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[t])||void 0===n||null===(o=n.gist)||void 0===o||null===(i=o.primaryCategory)||void 0===i?void 0:i.title)||"Null"},nn=function(e){var n,o=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[o])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},on=function(e){var n,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null==e||null===(n=e[i])||void 0===n||null===(o=n.channels[0])||void 0===o?void 0:o.title)||"NULL"},tn=function(e){return(null==e?void 0:e.contentType)||"null"},ln=function(e){var n,o,i=(null==e?void 0:e.contentType)||"video",t=(null==e||null===(n=e[i])||void 0===n||null===(o=n.liveDetails)||void 0===o?void 0:o.isDvrEnabled)||!1;return t?"YES":"NO"},rn=function(e,n){var o,i,t=(n||{}).epg;if(t&&null!=t&&t.enable&&null!=t&&t.programTitle)return t.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(o=e[l])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(r)},an=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var dn,sn,un=function(e,n){var o,i,t,a,d,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return s;var u=r(),c=l();return s["c3.cm.seriesName"]=(null==n||null===(o=n.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==e||null===(t=e[u-1])||void 0===t||null===(a=t.episodes)||void 0===a||null===(d=a[c-1])||void 0===d?void 0:d.title)||"Null",s["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",s},cn=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},vn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},pn=function(){var e=n(o.mark((function e(n,i){var t,l,r,a,d,s,u,c,v,p;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(null==i?void 0:i.convivaConfig)||{},l=t.trackConvivaPlayerEvent,r=t.paymentHandler,a=t.tveProvider,d=t.enable,s=t.appName,u=(i||{}).token,d){e.next=4;break}return e.abrupt("return");case 4:if(c=H(n),"function"==typeof(v=l)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(p=e.sent){e.next=13;break}return e.abrupt("return");case 13:c.ready((function(){var e=c.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var o=e.target;if(o&&o.keySystem){var i=cn(o.keySystem);v("contentInfo",{DRMEnabled:i})}else v("contentInfo",{DRMEnabled:"None"})})),n||v("contentInfo",{DRMEnabled:"None"})})),c.on("loadstart",(function(){var e,n;$e&&$e!==c.currentSrc()&&v("playbackEnded"),v("setPlayer",c),Qe.clear(),$e=c.currentSrc();var o=vn(c.currentType()),t=ae(),l=Ze(t,c,p);l[null==p||null===(e=p.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",l[null==p||null===(n=p.Constants)||void 0===n?void 0:n.ASSET_NAME]=rn(t,i),l.authToken=u||"NULL",l.streamType=o,l.D2CType=r||"NONE",l.subscriberType=a||(r?"D2C":"FREE"),l["c3.cm.affiliate"]=a||"NULL",fn.setData(l),v("contentInfo",l)})),c.on("loadedmetadata",(function(){var e,n=c.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})})),c.on("play",(function(){Qe.has(c.currentSrc())||(Qe.add(c.currentSrc()),v("playbackStarted",null))})),c.on("ended",(function(){Qe.has(c.currentSrc())&&Qe.delete(c.currentSrc()),v("playbackEnded")})),c.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:c,adsLoader:null==e?void 0:e.adsLoader})})),c.on("dispose",(function(){null==Qe||Qe.clear(),v("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,o){return e.apply(this,arguments)}}(),fn=(dn={},{setData:function(e){dn=Xe(Xe({},dn),e)},getData:function(){return dn}}),mn=function(e,n){var o=null==n?void 0:n.skin;"default"==o?import("./skin-7515bc9e.js").then((function(o){o.initialiseSkin(e,n)})):"carousel"==o?import("./skin-15e91bab.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==o?import("./skin-aed83d3c.js").then((function(o){o.initialiseSkin(e,n)})):"multiplayer"==o?import("./skin-3bc4aeac.js").then((function(o){o.initialiseSkin(e,n)})):"minimalist"==o?import("./skin-b97969e2.js").then((function(o){o.initaliseSkin(e,n)})):"VL_ONE"==o?import("./skin-b0003a89.js").then((function(o){o.initialiseSkin(e,n)})):"news"==o&&import("./skin-997d3668.js").then((function(o){o.initialiseSkin(e,n)}))};function wn(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function gn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?wn(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):wn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var yn=[],bn=0,hn=null;function On(){console.log("Cleaning up watch history data"),sn=null,yn=[],bn=0,hn=null}function _n(e,n,o){var i,t,l,r,d,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(i=n.watchHistory)||void 0===i||i.apiVersion;var u=null==n||null===(t=n.watchHistory)||void 0===t?void 0:t.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(l=n.watchHistory)||void 0===l||l.xapiKey;var p=(null==n||null===(r=n.video)||void 0===r?void 0:r.originalObjectId)||null,f=(null==n||null===(d=n.watchHistory)||void 0===d?void 0:d.saveOffline)||!1,m=Math.floor(e.currentTime()),w=s?100:Math.floor(c/v*100),g={};f?In(g={completed:s,watchedTime:m,watchedPercentage:w},u,n.siteOwner):(g=gn(gn({videoId:sn,watchedTime:m,watchedPercentage:w,doneWatching:s,profileId:u},hn&&{seriesId:hn}),p&&{originalObjectId:p}),a(g).then((function(e){})).catch((function(e){}))),bn=c+o}function Cn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function In(n,o,i){var t=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=Cn(t),r=(new Date).getTime(),a=ae(),d=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(n,o){return gn(gn({},n),{},e({},o,d[o]))}),{}),u=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===sn}));u<0?l.push(gn(gn({content:s},n),{},{addedDate:r,updateDate:r})):l[u]=gn(gn(gn({},l[u]),n),{},{updateDate:r}),localStorage.setItem("".concat(t),JSON.stringify(l))}function Sn(e,n,o){var i=Cn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(o)),t=[];return i&&Array.isArray(i)&&(t=i.filter((function(e){var o;return(null==e||null===(o=e.content)||void 0===o?void 0:o.id)===n}))),t}var kn=!1,En=function(e,n){var o,i,t=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(o=e[t])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!kn){var l=Tn(e,"videoAssets","secondaryVideoAssets"),r=d(l,n);return r&&s(n,r),kn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Tn(e,n,o){if(Array.isArray(e))return e.map((function(e){return Tn(e,n,o)}));if(null!==e&&"object"===me(e)){var i={};return Object.keys(e).forEach((function(t){t===n&&void 0!==e[o]?i[t]=e[o]:t===o&&void 0!==e[n]?i[t]=e[n]:i[t]=Tn(e[t],n,o)})),i}return e}function Pn(e){var n=e.publisherId,o=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var i=window.ns_.analytics;i.PlatformApi.setPlatformAPI(i.PlatformApi.PlatformApis.WebBrowser);var t=new i.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==o?void 0:o.userConsent)||"",cs_fpid:(null==o?void 0:o.userId)||""}});return i.configuration.addClient(t),i.configuration.enableFirstPartyCookie(),i.configuration.enableImplementationValidationMode(),i.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=i,i}function jn(){var e,n,o,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(window.analytics){var t=window.analytics,l=new t.StreamingAnalytics;null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e||(e.tagRef=l),null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n||(n.contentOptions=i),i.implementationId&&l.setImplementationId(i.implementationId),i.projectId&&l.setProjectId(i.projectId),l.setMediaPlayerName(i.playerName||"Video.js"),l.setMediaPlayerVersion(i.playerVersion||"8.x"),l.createPlaybackSession(),i.isDvr&&l.setDVRWindowLength((null==i?void 0:i.dvrWindowLength)||0);var r=new t.StreamingAnalytics.ContentMetadata;r.setMediaType(t.StreamingAnalytics.ContentMetadata.ContentType[i.contentType||"LONG_FORM_ON_DEMAND"]),r.setUniqueId(i.uniqueId),r.setLength((null==i?void 0:i.isLive)?0:i.duration||0),r.setStationTitle(i.stationTitle),r.setPublisherName(i.publisherName),r.setProgramTitle(i.programTitle),r.setDateOfDigitalAiring(i.digitalAirdate.year,i.digitalAirdate.month,i.digitalAirdate.day),r.setDateOfTvAiring(i.tvAiring.year,i.tvAiring.month,i.tvAiring.day),r.carryTvAdvertisementLoad(i.isDaiAds?"1":null),r.setEpisodeTitle(null==i?void 0:i.contentTitle),r.setEpisodeSeasonNumber(i.seasonNumber),r.setEpisodeNumber(i.episodeNumber),r.setProgramId(i.programId),r.setEpisodeId(i.episodeId),r.setGenreName(i.contentGenre),r.setDictionaryClassificationC3(i.brand||"null"),r.setDictionaryClassificationC4(i.platform||"null"),r.setDictionaryClassificationC6(i.genre||"null"),r.classifyAsCompleteEpisode(i.completeEpisode?"1":null);var a={ns_st_li:(null==i?void 0:i.isLive)?"1":"0"};return r.addCustomLabels(a),l.setMetadata(r),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.contentMetadata=r),l.notifyPlay(),console.log("[Comscore] StreamingAnalytics initialized for:",i.programTitle),l}console.error("[Comscore] analytics SDK not found.")}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null});var Dn=!1;function Rn(e){var n,o,i,t;if(e)if(null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef){var l=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef;null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i||(i.comscorePlayerInstance=e);var r=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyPlay())},a=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyPause())},d=function(){var e;return"content"===(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.mode)&&(null==l?void 0:l.notifyEnd())},s=function(){return null==l?void 0:l.notifySeekStart()},u=function(){null==l||l.notifyBufferStart(),function(){var e,n;Dn||(Dn=!0,null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscorePlayerInstance)||void 0===n||n.any(["playing","timeupdate"],(function(){var e,n,o,i,t,l;Dn=!1,(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&"content"===(null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.mode)&&(null===(i=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef)||void 0===i||i.notifyBufferStop(),null===(l=null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.tagRef)||void 0===l||l.notifyPlay())})))}()};e.on("play",r),e.on("pause",a),e.on("ended",d),e.on("seeking",s),e.on("waiting",u),e.on("timeupdate",(function(){var n,o;if(null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.contentOptions)||void 0===o?void 0:o.isLive)return l.startFromPosition(0);l.startFromPosition&&"function"==typeof e.currentTime&&l.startFromPosition(1e3*e.currentTime())})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||t.comscoreCleanupFns.push((function(){e.off("play",r),e.off("pause",a),e.off("ended",d),e.off("seeking",s),e.off("waiting",u)})),console.log("[Comscore] Player events attached.")}else console.warn("[Comscore] Tag not initialized. Call initializeComscoreTag() first.");else console.warn("[Comscore] No player instance provided.")}function An(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}function Mn(e){var n,o,i,t,l=e.isLive,r=e.startTimeInSeconds;return l?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==r?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:r===("function"==typeof(null===(o=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===o?void 0:o.getDuration)&&(null===(t=null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.comscorePlayerInstance)||void 0===t?void 0:t.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function xn(){var e,n,o,i,t,l,r,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.comscoreCleanupFns=[]),console.log("comscoreTag",null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.tagRef),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.tagRef){try{null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||l.tagRef.notifyEnd()}catch(e){}null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r||(r.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}function Nn(e){var n,o,i,t,l,r,a,d,s={contentType:(null==e?void 0:e.contentType)||"LONG_FORM_ON_DEMAND",uniqueId:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.id,duration:(null==e?void 0:e.runtime)||0,stationTitle:null==e?void 0:e.siteName,publisherName:null==e?void 0:e.network,programTitle:(null==e?void 0:e.programTitle)||Vn(e),programId:(null==e?void 0:e.programId)||Bn(e),episodeId:(null==e?void 0:e.episodeId)||(null===(o=null==e?void 0:e.gist)||void 0===o?void 0:o.id),contentTitle:null===(i=null==e?void 0:e.gist)||void 0===i?void 0:i.title,isLive:null===(t=null==e?void 0:e.streamingInfo)||void 0===t?void 0:t.isLiveStream,brand:null==e?void 0:e.network,seasonNumber:(null==e?void 0:e.seasonNumber)||Un(null==e?void 0:e.episodeDisplayAttribute).season,episodeNumber:(null==e?void 0:e.episodeNumber)||Un(null==e?void 0:e.episodeDisplayAttribute).episode,platform:(null==e?void 0:e.platform)||"browser",genre:(null==e?void 0:e.customGenre)||(null==e?void 0:e.genre)||"null",completeEpisode:(null==e?void 0:e.isCompleteEpisode)||!0,digitalAirdate:Fn(null==e?void 0:e.publishDate),tvAiring:Fn(null==e?void 0:e.publishDate),contentGenre:null==e?void 0:e.genre,isDaiAds:!!(null==e?void 0:e.isDaiAds),isDvr:(null===(l=null==e?void 0:e.streamInfo)||void 0===l?void 0:l.isDvr)||!1,dvrWindowLength:(null===(r=null==e?void 0:e.streamInfo)||void 0===r?void 0:r.isDvr)&&(null===(a=null==e?void 0:e.streamInfo)||void 0===a?void 0:a.dvrWindowLength)||0,implementationId:null===(d=null==e?void 0:e.comscoreConfig)||void 0===d?void 0:d.implementationId};return"LINEARCHANNEL"===(null==e?void 0:e.contentType)&&(s.ContentType="LIVE"),s}function Ln(e,n){var o,i,t=null!==(i=null===(o=null==e?void 0:e.match(/campaignId=([^;]*)/))||void 0===o?void 0:o[1])&&void 0!==i?i:null;return(null==t?void 0:t.trim())||null}function Vn(e){var n,o;return(null==e?void 0:e.series)?null===(o=null==e?void 0:e.series)||void 0===o?void 0:o.title:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.title}function Bn(e){var n,o;return(null==e?void 0:e.series)?null===(o=null==e?void 0:e.series)||void 0===o?void 0:o.id:null===(n=null==e?void 0:e.gist)||void 0===n?void 0:n.id}function Fn(e){var n;return{year:(n=isNaN(Number(e))?new Date(e):new Date(1e3*Number(e))).getFullYear(),month:n.getMonth()+1,day:n.getDate()}}function Un(e){if(!e)return{season:null,episode:null};var n=e.match(/S(\d+)\s*E(\d+)/i);return n?{season:Number(n[1]),episode:Number(n[2])}:{season:null,episode:null}}!function(e){e.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(o,i){var t=document.createElement("script");t.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",t.async=!0,document.head.appendChild(t),t.onload=function(){Pn({publisherId:e||"40813950"})},t.onerror=function(e){i("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}))}(G);var Hn=Object.freeze({__proto__:null,createComscoreStreamingTag:jn,destroyComscoreTag:xn,endComscoreAdTracking:function(){var e,n,o,i,t;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var l=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;l.notifyPause(),l.notifyEnd(),null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.mode="content"),(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata)&&(l.setMetadata(null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t?void 0:t.contentMetadata),l.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}},finishComscoreAdTracking:function(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))},formulateComscoreAdPayload:function(e){var n,o,i,t;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:Ln(null===(o=null===(n=null==e?void 0:e.extensions)||void 0===n?void 0:n[0])||void 0===o?void 0:o.content),placementId:Ln(null===(t=null===(i=null==e?void 0:e.extensions)||void 0===i?void 0:i[0])||void 0===t?void 0:t.content),trackingUrl:null==e?void 0:e.trackingUrl,creativeId:null==e?void 0:e.creativeId}},formulateComscorePayload:Nn,getComscoreTagInstance:function(){var e;return null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef},setComscorePlayerInstance:Rn,startComscoreAdTracking:function(){var e,n,o,i,t,l,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",An()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o||(o.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(Mn({isLive:null===(t=null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentOptions)||void 0===t?void 0:t.isLive,startTimeInSeconds:null==r?void 0:r.startTimeInSeconds})),s.setUniqueId(r.id||"ad-001"),s.setLength(1e3*parseInt(r.adDuration,10)||0),s.setTitle(r.title||"Advertisement"),s.setServerCampaignId(r.campaignId),s.setRelatedContentMetadata(null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l?void 0:l.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(r.placementId);var u={cs_ad_tu:null==r?void 0:r.trackingUrl,ns_st_ami:null==r?void 0:r.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",r)}});function Gn(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function zn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Gn(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Gn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function Wn(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return qn(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?qn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var i=0,t=function(){};return{s:t,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t}}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 l,r=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==o.return||o.return()}finally{if(a)throw l}}}}function qn(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,i=Array(n);o<n;o++)i[o]=e[o];return i}function Kn(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function Jn(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Kn(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Kn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var Yn=function(e,n,o,t){var l,r,a,d,s,v=t.res,p=t.sres,f=H(e),m=(null==v?void 0:v.contentType)||"video",w=(null==v||null===(l=v[m])||void 0===l?void 0:l.drmEnabled)||!1,g=(null==v||null===(r=v[m])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,y=(null==v||null===(d=v[m])||void 0===d||null===(s=d.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;de(v),se.set(v),f&&(f.on("loadstart",(function(){g?o.resolve({status:!0,msg:"Video Loaded",response:v}):o.resolve(Jn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:v}:{response:v}))})),f.on("loadeddata",(function(){var o,t,l,r=Q(e);if(null==r||r.map((function(n){return $(e,n.id)})),y&&"Safari"===i())try{var a;null==f||null===(a=f.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&Re(e,sessionStorage.getItem("volume")||"100");var d=ae();if(function(e,n){var o,i,t,l,r,a,d,s,u,c,v,p,f=null==e?void 0:e.playerId,m=H(f),w=null==n?void 0:n.siteName;if(null!=e&&null!==(o=e.comscore)&&void 0!==o&&o.enable){var g=ae(),y=(null==g||null===(i=g.video)||void 0===i?void 0:i.metadata)||[],b=(null==y?void 0:y.length)&&y.filter((function(e){return"advertisingGenre"===e.name}));if(null!==(t=b)&&void 0!==t&&t.length){var h=b.map((function(e){return e.value}));b=null==h?void 0:h.join(",")}xn();var O=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,_=Array.isArray(null==O?void 0:O.category)?null==O||null===(r=O.category)||void 0===r?void 0:r.join(","):(null==O?void 0:O.category)||null,C=zn(zn(zn({},null==g?void 0:g.video),null==g?void 0:g.linearchannel),{},{siteName:w,programId:(null==O?void 0:O.videotmsid)||null,programTitle:(null==O?void 0:O.lcProgrammeName)||null,episodeId:(null==O?void 0:O.videotmsid)||null,seasonNumber:(null==O||null===(a=O.seriesDetails)||void 0===a?void 0:a.season)||null,episodeNumber:(null==O||null===(d=O.seriesDetails)||void 0===d?void 0:d.episode)||null,isCompleteEpisode:!!(null!=g&&null!==(s=g.video)&&void 0!==s&&s.series||null!=O&&null!==(u=O.seriesDetails)&&void 0!==u&&u.episode),genre:b||_,comscoreConfig:{implementationId:(null==e||null===(c=e.comscore)||void 0===c?void 0:c.implementationId)||null,projectId:(null==e||null===(v=e.comscore)||void 0===v?void 0:v.projectId)||null}});null!=C&&null!==(p=C.streamingInfo)&&void 0!==p&&p.isLiveStream&&(C.contentType="LIVE"),null!=C&&C.network&&null!=C&&C.genre&&(C.customGenre="".concat(C.network,"_").concat((null==C?void 0:C.programTitle)||function(e){var n,o;return null!=e&&e.series?null==e||null===(o=e.series)||void 0===o?void 0:o.title:null==e||null===(n=e.gist)||void 0===n?void 0:n.title}(C),"_").concat(C.genre)),null!=O&&O.airDate&&(C.publishDate=O.airDate);var I=Nn(C);console.log("comscoreOptions player data",I),jn(zn({playerName:"Video.js"},I)),Rn(m)}}(n,v),u(),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&(!n.isAnonymousUser||null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.saveOffline)){var s,c,p=Jn(Jn({},n),v);!function(e,n,o){var i,t,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(hn=null==n||null===(t=n.series)||void 0===t?void 0:t.id),yn=[],bn=0,sn=o;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=H(e);a&&(a.on("dispose",On),a.on("timeupdate",(function(){if(!a.seeking()){var e=Math.floor(a.currentTime());yn.includes(bn)||(e!=bn||e<r?e>bn&&(bn=e+r):(yn.push(e),_n(a,n,r)))}})),a.one("ended",(function(){_n(a,n,r,!0)})))}(e,p,null==d||null===(s=d.video)||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=f&&f.mux){var m,w,g,b,h,O,_=(null===(m=ae())||void 0===m?void 0:m.video)||(null==v?void 0:v.video),C=null==_?void 0:_.gist,I={env_key:null==n||null===(w=n.analytics)||void 0===w?void 0:w.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==C?void 0:C.id,video_title:null==C?void 0:C.title,video_series:null==_||null===(b=_.series)||void 0===b?void 0:b.title,video_stream_type:null!=_&&null!==(h=_.streamingInfo)&&void 0!==h&&h.isLiveStream?"live":"video",viewer_user_id:null==n||null===(O=n.analytics)||void 0===O?void 0:O.userId};f.mux({debug:!1,data:I})}})),f.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];f.trigger("subtitlechanged",n)})),f.on("subtitlechanged",(function(e,n){var o,i,t,l,r,a,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(t=i.framework)||void 0===t||null===(l=t.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(d=a.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,w=f.getMediaSession(),g=w.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(m)}})),f.tech_.on("retryplaylist",(function(){g&&En(v,e)})),f.on("error",(function(){var n,i;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&g)?En(v,e):(c(e,(null==f||null===(n=f.error())||void 0===n?void 0:n.message)||"Some error occured"),o.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:v}))})),f.one("play",(function(){var e,o,i,t,l;if(null===(e=window)||void 0===e||null===(o=e.app_data)||void 0===o||null===(i=o.appcmsMain)||void 0===i||null===(t=i.adsConfig)||void 0===t||!t.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var r,a,d,s=null===(r=ae())||void 0===r||null===(a=r.video)||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.id,u=ue(),c=(null==u?void 0:u.get(s))||{t:0,p:0},v=c.t,p=c.p;v&&p<95&&setTimeout((function(){f.currentTime(v)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){f.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0);if(null!=f&&f.dvrSeekbar)try{f.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),f.on("volumechange",(function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),f.on("chromecastDisconnected",(function(){if(g){f.currentSource();for(var e=f.textTracks(),n=e.length-1;n>=0;n--)f.removeRemoteTextTrack(e[n])}})),f.one("loadeddata",(function(){var e,n=(null==f||null===(e=f.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort((function(e,n){var o=(e.language||e.language||"").toUpperCase(),i=(n.language||n.label||"").toUpperCase();return o<i?-1:o>i?1:0})),"object"==me(f.dash)){var o,t,l,r=null==f||null===(o=f.dash)||void 0===o||null===(t=o.mediaPlayer)||void 0===t?void 0:t.getTracksFor("audio"),a=null==r?void 0:r.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),d=Wn(n);try{for(d.s();!(l=d.n()).done;){var s=l.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){d.e(e)}finally{d.f()}}else{var u,c=Wn(n);try{for(c.s();!(u=c.n()).done;){var v,p,m,g=u.value;if(("Chrome"==i()||"Edge"==i()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!w))&&null!=g&&null!==(m=g.label)&&void 0!==m&&m.includes("5.1"))f.audioTracks().removeTrack(g);else{if("main"==g.kind){g.enabled=!0;break}g.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}})))};function Xn(e){var n=H(e),o=n.seekable(),i=n.controlBar.progressControl.seekBar.el();if(o&&o.length>0){var t=o.start(0),l=o.end(o.length-1)-t;$n(),Zn(l).forEach((function(e){var n=e.id,o=e.title,t=e.time,r=Qn(n,o,Math.min(t/l*100,99.5));i.appendChild(r)}))}}function Qn(e,n,o){var i=document.createElement("div");return i.className="vjs-seekbar-program-marker",i.id=e,i.style.title=n,i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="4px",i.style.backgroundColor="#000000",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",i}function $n(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach((function(e){e.remove()}))}function Zn(e){var n=(new Date).getTime(),o=new Date(n-1e3*e).getTime();return(ce()||[]).filter((function(e){var i=new Date(e.formatted_startdate).getTime();return i>=o&&i<=n})).map((function(e){var n=new Date(e.formatted_startdate).getTime()-o;return{title:e.title,time:n/1e3,id:e.programme_id}}))}function eo(e,n){var o=H(e);if(o){var i=n.dvrConfig,t=void 0===i?{}:i,l=n.videoId;n.epg;var r=t.playLive,a=t.playFromBegining,d=t.programs;ve(d),o.on("loadeddata",(function(){ye(n)?a?be(o,n):r?he(o,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.dvrConfig,i=void 0===o?{}:o,t=n.videoId,l=n.epg,r=i.buttonConfig,a=void 0===r?{}:r,d=a.watchLive;a.resume;var s=a.startFromBegining,u=t;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));u="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!Ce(u),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var f=Ie(n);f&&(p.style.backgroundImage="url(".concat(f,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=oo(i,v),p.style.display="flex",e.el().appendChild(p),Se(e),no("watch-live-resume-btn",d,(function(){Te(e,p),he(e,u)})),no("watch-begining-btn",s,(function(){Te(e,p),be(e,n)}))}(o,n),Oe({player:o,showWatchLive:!0,showStartOver:!0})):_e(o)})),o.one("loadedmetadata",(function(){sessionStorage.setItem("program_switched",!0),function(e,n){var o=n.videoId,i=e.currentTime(),t=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,d=JSON.parse(sessionStorage.getItem("epgConfig")),s=o,u=!0;if(d&&null!=d&&d.enable){var c;u=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==d?void 0:d.programId),s=null==d?void 0:d.programId}e.on("seeking",(function(){t=!0})),e.on("seeked",(function(){t=!1,i=e.currentTime();var o=JSON.parse(sessionStorage.getItem("epgConfig"));if(o&&null!=o&&o.enable){if(!u||sessionStorage.getItem("program_switched"))return;s="".concat(null==o?void 0:o.programId,"-").concat(null==o?void 0:o.channelId)}ke(s,i),Ee(e,n),Oe({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})})),e.on("timeupdate",(function(){if(!t){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!u||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var o=e.currentTime();Math.abs(o-i)>=20&&(ke(s,o),i=o,function(e,n){Zn(n).forEach((function(o){var i=o.id,t=o.title,l=o.time,r=document.getElementById(i);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var d=e.controlBar.progressControl.seekBar.el(),s=Qn(i,t,Math.min(l/n*100,99.5));d.appendChild(s)}}))}(e,a))}}))}(o,n)}))}else console.warn("Player instance is required to initialize start over.")}function no(e,n,o){var i,t,l=document.getElementById(e);l&&(t=n,(i=l)&&(i.style.color="".concat((null==t?void 0:t.textColor)||"#000"),i.style.backgroundColor="".concat((null==t?void 0:t.backGroundColor)||"#DCF95B")),l.addEventListener("click",o))}function oo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(null==e?void 0:e.buttonConfig)||{},i=o.watchLive,t=o.resume,l=o.startFromBegining,r=n?(null==t?void 0:t.text)||"Resume":(null==i?void 0:i.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(ge()," ").concat(r,"</button>"),d='<button id="watch-begining-btn">'.concat(we()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(d,"</div>")}function io(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function to(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?io(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):io(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var lo=function(t,l,r,a){var u,g,y,b,h,O,_,C,I,S,k,E,T,P,j,D,R,A,M,x,N,L,V,B,F,U,z,W,q,K,J,Y,X,Q,$,ee,ne,oe,te,le,re=l.res,ae=void 0===re?null:re,de=l.sres,se=void 0===de?null:de,ue=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],ce=(null===(u=ae)||void 0===u?void 0:u.contentType)||"video",ve=ie(null===(g=ae)||void 0===g||null===(y=g[ce])||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||ie(null===(h=ae)||void 0===h||null===(O=h[ce])||void 0===O||null===(_=O.gist)||void 0===_||null===(C=_.imageGist)||void 0===C?void 0:C.r16x9),pe=(null===(I=ae)||void 0===I||null===(S=I[ce])||void 0===S||null===(k=S.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,fe=(null===(E=ae)||void 0===E||null===(T=E[ce])||void 0===T||null===(P=T.streamingInfo)||void 0===P?void 0:P.isLiveStream)||!1,me=(null===(j=ae)||void 0===j||null===(D=j.ads)||void 0===D||null===(R=D.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(M=A.web)||void 0===M?void 0:M.active)&&(null===(x=ae)||void 0===x||null===(N=x.ads)||void 0===N||null===(L=N.preRoll)||void 0===L||null===(V=L.adTags)||void 0===V||null===(B=V.web)||void 0===B?void 0:B.url),we=(null===(F=ae=to(to({},ae),{},{audioAssetSource:null==r?void 0:r.audioAssetSource}))||void 0===F||null===(U=F[ce])||void 0===U?void 0:U.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(z=window)||void 0===z||null===(W=z.app_data)||void 0===W||null===(q=W.appcmsMain)||void 0===q||null===(K=q.adsConfig)||void 0===K?void 0:K.vodAdSticherProvider)||!1,ge=(null==r?void 0:r.latency)||6,ye=(null==r?void 0:r.skin_settings)||{};null==r||r.dvrConfig;var be=(te={enableSmoothSeeking:!0,controls:0!=(null==r?void 0:r.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==r?void 0:r.muted)||!1,autoplay:(null==r?void 0:r.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ye?void 0:ye.pictureInPictureToggle)||!1},playbackRates:null!=ye&&ye.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==r.skin,liveui:pe},e(te,"autoplay",null==r?void 0:r.autoplay),e(te,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!me),e(te,"loop",(null==r?void 0:r.loop)||!1),e(te,"audioPosterMode",null==r?void 0:r.audioPosterMode),e(te,"html5",to(to({dash:to(to(to({},!G.browser.IS_SAFARI&&{useTTML:!0}),(null==r?void 0:r.debugConfig)&&(null==r||null===(J=r.debugConfig)||void 0===J?void 0:J.enable)&&{debug:!0,logLevel:null!=r&&null!==(Y=r.debugConfig)&&void 0!==Y&&Y.logLevel?null==r||null===(X=r.debugConfig)||void 0===X?void 0:X.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ge},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:to(to({liveRangeSafeTimeDelta:ge,useDevicePixelRatio:!0,experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==r||null===(Q=r.customData)||void 0===Q?void 0:Q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===($=null==r?void 0:r.enableLowInitialPlaylist)||void 0===$||$}),debug:(null==r?void 0:r.debugConfig)&&(null==r||null===(ee=r.debugConfig)||void 0===ee?void 0:ee.enable)||!1,nativeTextTracks:"Safari"==i()},0==(null==r||null===(ne=r.customData)||void 0===ne?void 0:ne.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(oe=r.customData)||void 0===oe?void 0:oe.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(te,"poster",ve),e(te,"techOrder",ue),e(te,"chromecast",{requestCustomDataFn:function(e){var n,o,i=H(t),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind})),a=function(e,n,o){var i,t,l,r,a,d,s,u,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,w,g,y,b,h,O,_;f.isDrmEnabled=!0;var C=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==C?void 0:C.url)||(null==n||null===(w=n.keySystemOptions)||void 0===w||null===(g=w[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=I;var S=(null==C?void 0:C.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(h=b[0])||void 0===h||null===(O=h.options)||void 0===O||null===(_=O.httpRequestHeaders)||void 0===_?void 0:_["X-AxDRM-Message"]);f.licenseToken=S}var k=(null==e||null===(i=e[p])||void 0===i||null===(t=i.gist)||void 0===t?void 0:t.contentType)||"VIDEO";f.contentType=k;var E=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=E;var T=null==e||null===(a=e[p])||void 0===a||null===(d=a.gist)||void 0===d?void 0:d.title;f.mediaTitle=T;var P=null==e||null===(s=e[p])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return f.mediaImage=P,f.subTitles=o,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(ae,e,l);return to(to({},a),{},{convivaMetaData:to({customerKey:(null==r||null===(n=r.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==r||null===(o=r.convivaConfig)||void 0===o?void 0:o.debug)||!1},fn.getData())})},modifyLoadRequestFn:function(e){var n,o,i,l,r,a=H(t),d=(null==a?void 0:a.currentSource())||{};!(null===(n=ae)||void 0===n||null===(o=n[ce])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=d&&d.src&&null!=d&&null!==(r=d.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),te);if(!G.getPlayers()[t]){null!=r&&r.debugConfig&&null!=r&&null!==(le=r.debugConfig)&&void 0!==le&&le.enable&&G.log.level("debug");var he=G(t,be,function(){var e=n(o.mark((function e(){var n,i,l,u,g,y,b,h,O,_,C,I,S,k,E,T,P,j,D,R,A;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(G.VERSION),console.log(G.getPlugins()),e.next=5,Ke(r,ae);case 5:if(S=null===(n=ae)||void 0===n||null===(i=n[ce])||void 0===i||null===(l=i.liveDetails)||void 0===l?void 0:l.startOverTime,fe&&a.resolve(to({status:!0,msg:"Player Initialised"},se?{seriesResponse:se,response:ae}:{response:ae})),pe&&null!=r&&null!==(u=r.dvrConfig)&&void 0!==u&&u.enable&&eo(t,to(to({},r),{},{isDvrEnabled:pe})),p(t,null==r?void 0:r.analyticsCb,null==r?void 0:r.customData),pn(t,r),/Android/i.test(navigator.userAgent)&&(G.options.vhs.overrideNative=!0),pe&&xe(t,S),!me||null!=r&&null!==(g=r.customData)&&void 0!==g&&g.disableAds||f(t,me,ae),k=d(ae,t),console.log(k),null!=r&&r.nearestClusterUrl&&(k=m(k,r.nearestClusterUrl)),!we){e.next=21;break}return e.next=20,w(t,ae);case 20:k=e.sent;case 21:k?s(t,k):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:ae}),c(t,"Incompatible / Missing Source")),((null===(y=ae)||void 0===y||null===(b=y[ce])||void 0===b||null===(h=b.contentDetails)||void 0===h||null===(O=h.closedCaptions)||void 0===O?void 0:O.length)>0||(null===(_=ae)||void 0===_||null===(C=_[ce])||void 0===C||null===(I=C.closedCaptions)||void 0===I?void 0:I.length)>0)&&(A=(null===(T=ae)||void 0===T||null===(P=T[ce])||void 0===P||null===(j=P.contentDetails)||void 0===j?void 0:j.closedCaptions)||(null===(D=ae)||void 0===D||null===(R=D[ce])||void 0===R?void 0:R.closedCaptions),E=A.filter((function(e){return"VTT"===e.format||"WEBVTT"===e.format})),Z(t,E)),null!=r&&r.disableControls?v(t):mn(t,to(to(to({},r),be),{},{liveVideo:fe,isDvrEnabled:pe,res:ae,sres:se})),Yn(t,to(to(to({},r),be),{},{liveVideo:fe}),a,{res:ae,sres:se});case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}},ro={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function ao(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function so(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ao(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ao(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var uo,co=function(e,n){var o=n.resolve,i=n.reject,t=null==e?void 0:e.playerId,l=vo(e);lo(t,{res:l},e,{resolve:o,reject:i})},vo=function(e){var n,o,i,t,l,r,a,d,s=null==e?void 0:e.streamingInfo,u=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,c=(null==e||null===(o=e.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,v=(null==e||null===(i=e.streamingInfo)||void 0===i||null===(t=i.ads)||void 0===t?void 0:t.url)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,f=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(d=a.videoAssets)||void 0===d?void 0:d.drmProvider)||null,w=null==e?void 0:e.token,y=g(w),b=null==y?void 0:y.site;return so(so({id:null==ro?void 0:ro[b]},!c&&{directPlaybackUrl:null==u?void 0:u.url}),{},{video:{drmEnabled:c,streamingInfo:{videoAssets:so(so({},m&&{drmProvider:m}),{},{widevine:null==u?void 0:u.widevine,fairPlay:null==u?void 0:u.fairPlay,playReady:null==u?void 0:u.playReady})},liveDetails:{isDvrEnabled:null==s?void 0:s.isDvrEnabled},gist:so({},p&&{videoImageUrl:p}),contentDetails:so({},(null==f?void 0:f.length)>0&&{closedCaptions:Pe(f)})},ads:{preRoll:{adTags:{web:so(so({},v&&{active:!0}),v&&{url:v})}}}})};function po(e,n){return fo.apply(this,arguments)}function fo(){return(fo=n(o.mark((function e(n,i){var t,l,r,a,d,s;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.resolve,l=i.reject,r=null==n?void 0:n.videoId,a=null==n?void 0:n.playerId,d=!(null==n||!n.anonymousId),e.next=6,O();case 6:s=e.sent,y(r,s).then((function(e){var o,i,u,c;window.contentType=null==e||null===(o=e.data)||void 0===o||null===(i=o.video)||void 0===i||null===(u=i.gist)||void 0===u?void 0:u.contentType,de(null==e?void 0:e.data);var v,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(c=n.watchHistory)&&void 0!==c&&c.enable&&!d)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var f,m,w,g=Sn((null===(f=n.watchHistory)||void 0===f?void 0:f.profileId)||"",r,null==n?void 0:n.siteOwner);if(g&&g.length)n.watchHistoryResumeTime=(null===(m=g[0])||void 0===m?void 0:m.watchedTime)||null,n.watchedPercentage=(null===(w=g[0])||void 0===w?void 0:w.watchedPercentage)||null;p.contentType="video",lo(a,{res:p},n,{resolve:t,reject:l})}else b(r,s).then((function(e){var o,i,t,l,r,a;null!==(o=window)&&void 0!==o&&null!==(i=o.watchHistory)&&void 0!==i&&i.cb&&(null===(t=window)||void 0===t||null===(l=t.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"})).catch((function(e){var n,o,i,t;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(t=i.watchHistory)||void 0===t||t.cb(e))})).finally((function(){lo(a,{res:p},n,{resolve:t,reject:l})}));else lo(a,{res:p},n,{resolve:t,reject:l})})).catch((function(e){h(e,a,l,r)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mo(e,n){return wo.apply(this,arguments)}function wo(){return(wo=n(o.mark((function e(n,i){var t,l,r,a,d;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.resolve,l=i.reject,e.next=3,O();case 3:r=e.sent,a=null==n?void 0:n.playerId,d=null==n?void 0:n.epg,_(d,r).then((function(e){var o=null==e?void 0:e.data;o.contentType="linearchannel",o.channelId=null==d?void 0:d.channelId,lo(a,{res:o},n,{resolve:t,reject:l})})).catch((function(e){h(e,a,l,videoId)}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function go(e,n){return yo.apply(this,arguments)}function yo(){return(yo=n(o.mark((function e(n,i){var t,l,r,a,d,s,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=i.resolve,r=i.reject,e.next=3,O();case 3:a=e.sent,d=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,pe.set(parseInt(s)),u=null==n||null===(t=n.series)||void 0===t?void 0:t.id,C(u,a).then((function(e){var o,i,t,s=e.data,c=e.data.seasons;fe(c);var v=videoId||(null==c||null===(o=c[0])||void 0===o||null===(i=o.episodes)||void 0===i||null===(t=i[0])||void 0===t?void 0:t.id);I(u,a),y(v,a).then((function(e){var o,i,t;window.contentType=null==e||null===(o=e.data)||void 0===o||null===(i=o.video)||void 0===i||null===(t=i.gist)||void 0===t?void 0:t.contentType,de(e.data),lo(d,{res:null==e?void 0:e.data,sres:s},n,{resolve:l,reject:r})})).catch((function(e){h(e,d,r,videoId)}))})).catch((function(e){h(e,d,r)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bo(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,i)}return o}function ho(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?bo(Object(i),!0).forEach((function(o){e(n,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):bo(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function Oo(){return{loadVideoInstantly:S,onTimeUpdate:z,getVideoDuration:W,onVideoEnded:q,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=n(o.mark((function n(i,t){var l,r,a,d,s,u,c,v,p,f,m,w,g,b,O,_,C,I,S,k,E,T,P,D,R;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!j(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(g=(null==e?void 0:e.videoSourceUrl)||!1,b=null==e?void 0:e.asat,O=(null==e||null===(l=e.epg)||void 0===l?void 0:l.enable)||!1,_=null==e?void 0:e.videoId,C=(null==e||null===(r=e.series)||void 0===r?void 0:r.enable)||!1,I=(null==e?void 0:e.streamingInfo)||!1,window.videoId=_,S=null==e?void 0:e.token,!V(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",S),B().set(null==e?void 0:e.refreshToken),S&&!F(S)){n.next=16;break}return t({status:!1,msg:"".concat(S?"Token is expired !":"Missing Authorization Token"),response:{token:S}}),n.abrupt("return");case 16:uo=JSON.parse(atob(S.split(".")[1]));case 17:return window.siteName=null===(a=uo)||void 0===a?void 0:a.site,window.siteId=null===(d=uo)||void 0===d?void 0:d.siteId,e.isAnonymousUser=!(null===(s=uo)||void 0===s||!s.anonymousId),e.siteOwner=(null===(u=uo)||void 0===u?void 0:u.site)||null,e.userId=(null===(c=uo)||void 0===c?void 0:c.userId)||null,window.sessionStorage.setItem("uid",null===(v=uo)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,k=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,E=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,le(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),L.set(e.apiBaseUrl),null!=e&&e.skin&&!te(e.skin)||(e.skin="VL_ONE"),n.next=35,Ge(e);case 35:E&&je("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return U(E)})).catch((function(e){})),(P=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(k)))&&P.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g?(R={directPlaybackUrl:g,id:D="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},b?y(D,S).then((function(n){var o=(null==n?void 0:n.data)||{};lo(k,{res:ho(ho({},o),R)},e,{resolve:i,reject:t})})).catch((function(e){h(e,k,t,D)})):lo(k,{res:R},e,{resolve:i,reject:t})):I?co(e,{resolve:i,reject:t}):C?go(e,{resolve:i,reject:t}):O?mo(e,{resolve:i,reject:t}):po(e,{resolve:i,reject:t});case 39:case"end":return n.stop()}}),n)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:ne,skip:k,getPlayer:H,play:E,pause:T,detectBrowser:i,rewind:P,loadVideo:s,seekToTimeStamp:K,isPlayerInitialised:j,load:D,authenticateLC:R,dispose:A,enableCaptions:ee,disableCaptions:$,getCaptions:Q,playSelectedResolution:oe,getSource:d,setVolume:Re,getVolume:Ae,disableControls:v,setPlaybackSpeed:J,getEntitlementData:M,adsQueuePointManager:x,getSsaiEvents:N,playerEvents:Y,onReplay:X}}export{Oo as V,Xn as i,$n as r};