@viewlift/player-backup 2.0.138-backup → 2.0.139-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/cjs/{autoNextVideo-f2d8baa2.js → autoNextVideo-eb4b0117.js} +1 -1
  2. package/cjs/bundle.css +33 -33
  3. package/cjs/{features-dea68fda.js → features-41c962ec.js} +1 -1
  4. package/cjs/{generic-c0065ab4.js → generic-a853d62d.js} +1 -1
  5. package/cjs/index-27ae8447.js +1 -0
  6. package/cjs/{index-2c531497.js → index-9bc2da0c.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-ec8c724f.js → multicamv2-a524f4bd.js} +1 -1
  9. package/cjs/{multicamv2-b35397df.js → multicamv2-b007bed6.js} +1 -1
  10. package/cjs/{nextEpisodeButton-0dc30f83.js → nextEpisodeButton-d25d073d.js} +1 -1
  11. package/cjs/{playlist-737b0c7f.js → playlist-cb888adb.js} +1 -1
  12. package/cjs/{series-228fd012.js → series-57940e70.js} +1 -1
  13. package/cjs/{series-v2-3df981cb.js → series-v2-af8dad5e.js} +1 -1
  14. package/cjs/{series-v2-26e3b2a9.js → series-v2-ebd760ed.js} +1 -1
  15. package/cjs/{skin-32f14cc5.js → skin-15e39c1f.js} +1 -1
  16. package/cjs/{skin-6f41639e.js → skin-5016df82.js} +1 -1
  17. package/cjs/{skin-d9f02bbe.js → skin-6ea5f667.js} +1 -1
  18. package/cjs/{skin-2d87911f.js → skin-74dc830c.js} +1 -1
  19. package/cjs/{skin-5d4a732f.js → skin-9b14b553.js} +1 -1
  20. package/cjs/{skin-39e8259d.js → skin-aca1919d.js} +1 -1
  21. package/cjs/{skin-806b17ae.js → skin-b686e1ed.js} +1 -1
  22. package/cjs/{videoSelector-f35a369b.js → videoSelector-12e3a326.js} +1 -1
  23. package/cjs/{videoSelector-5d51be25.js → videoSelector-a0b2dd5b.js} +1 -1
  24. package/esm/{autoNextVideo-0db8dd88.js → autoNextVideo-f210a594.js} +1 -1
  25. package/esm/bundle.css +33 -33
  26. package/esm/{features-514d5b16.js → features-9278d97a.js} +1 -1
  27. package/esm/{generic-a55d7135.js → generic-642d8b79.js} +1 -1
  28. package/esm/index-2d5cd44b.js +1 -0
  29. package/esm/{index-728e5270.js → index-73098d5e.js} +1 -1
  30. package/esm/index.js +1 -1
  31. package/esm/{multicamv2-4cf6126c.js → multicamv2-5529439a.js} +1 -1
  32. package/esm/{multicamv2-8ba6cb5c.js → multicamv2-b785f38c.js} +1 -1
  33. package/esm/{nextEpisodeButton-b1a752cd.js → nextEpisodeButton-28669e20.js} +1 -1
  34. package/esm/{playlist-3b6581e0.js → playlist-eb85945a.js} +1 -1
  35. package/esm/{series-30be507a.js → series-d599ad1b.js} +1 -1
  36. package/esm/{series-v2-b6849ca2.js → series-v2-888212e7.js} +1 -1
  37. package/esm/{series-v2-18da57cf.js → series-v2-ad9641b0.js} +1 -1
  38. package/esm/{skin-ec431521.js → skin-0ad6f8be.js} +1 -1
  39. package/esm/{skin-9eaf1c80.js → skin-3d12f1bc.js} +1 -1
  40. package/esm/{skin-a6d73985.js → skin-77207446.js} +1 -1
  41. package/esm/{skin-637a78ec.js → skin-cb0240ca.js} +1 -1
  42. package/esm/{skin-18445dd3.js → skin-cbb67ece.js} +1 -1
  43. package/esm/{skin-a4ddcb65.js → skin-e611f388.js} +1 -1
  44. package/esm/{skin-fa3873c5.js → skin-ef63adce.js} +1 -1
  45. package/esm/{videoSelector-cd7499aa.js → videoSelector-218bf7f6.js} +1 -1
  46. package/esm/{videoSelector-910251cf.js → videoSelector-ebf4ffad.js} +1 -1
  47. package/package.json +1 -1
  48. package/cjs/index-25ebdb57.js +0 -1
  49. package/esm/index-a0b6e39c.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-2609dbe4.js"),l=require("./generic-c0065ab4.js"),d=require("./currentVideoInfo-b52ab371.js"),s=require("./skin-516012d7.js"),c=require("./autoNextVideo-f2d8baa2.js"),u=require("./localisation-56e0a999.js");function v(e){var t=m();return function(){var n,r=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return i(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./util-88690406.js"),require("@babel/runtime/helpers/typeof");var p=r.getComponent("Component"),h=function(i){n(m,p);var o=v(m);function m(t){var n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=o.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(i=a.related)||void 0===i?void 0:i.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb})),r}return t(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var o=window.getComputedStyle(i,null).getPropertyValue("height");n.style.height="".concat(o),r.dom.appendContent(t,n),i.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),i=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var c=r.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),v=r.dom.createEl("div",{className:"video-selector-content"}),m=r.dom.createEl("div",{className:"video-container"}),p=function(e){var n,i,o,a,c,u=r.dom.createEl("div",{className:"video -".concat(e)}),p=r.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){d.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),i=0;i<n.length;i++)n[i].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),l.load(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(i=n[e])||void 0===i?void 0:i.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var b=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(c=t.videos[e])||void 0===c?void 0:c.title)||"")});r.dom.appendContent(u,p),r.dom.appendContent(u,b),r.dom.appendContent(m,u),r.dom.appendContent(v,m)},h=0;h<this.videos.length;h++)p(h);r.dom.appendContent(i,o),r.dom.appendContent(i,c),r.dom.appendContent(e,i),r.dom.appendContent(e,v),s.handleDrawerResizing(this.playerId,e)}}]),m}();exports.default=h;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-2609dbe4.js"),l=require("./generic-a853d62d.js"),d=require("./currentVideoInfo-b52ab371.js"),s=require("./skin-516012d7.js"),c=require("./autoNextVideo-eb4b0117.js"),u=require("./localisation-56e0a999.js");function v(e){var t=m();return function(){var n,r=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return i(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./util-88690406.js"),require("@babel/runtime/helpers/typeof");var p=r.getComponent("Component"),h=function(i){n(m,p);var o=v(m);function m(t){var n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=o.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(i=a.related)||void 0===i?void 0:i.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb})),r}return t(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var o=window.getComputedStyle(i,null).getPropertyValue("height");n.style.height="".concat(o),r.dom.appendContent(t,n),i.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),i=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var c=r.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),v=r.dom.createEl("div",{className:"video-selector-content"}),m=r.dom.createEl("div",{className:"video-container"}),p=function(e){var n,i,o,a,c,u=r.dom.createEl("div",{className:"video -".concat(e)}),p=r.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){d.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),i=0;i<n.length;i++)n[i].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),l.load(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(i=n[e])||void 0===i?void 0:i.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var b=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(c=t.videos[e])||void 0===c?void 0:c.title)||"")});r.dom.appendContent(u,p),r.dom.appendContent(u,b),r.dom.appendContent(m,u),r.dom.appendContent(v,m)},h=0;h<this.videos.length;h++)p(h);r.dom.appendContent(i,o),r.dom.appendContent(i,c),r.dom.appendContent(e,i),r.dom.appendContent(e,v),s.handleDrawerResizing(this.playerId,e)}}]),m}();exports.default=h;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-2609dbe4.js"),r=require("./generic-c0065ab4.js"),d=require("./currentVideoInfo-b52ab371.js"),s=require("./skin-516012d7.js"),c=require("./autoNextVideo-f2d8baa2.js"),u=require("./localisation-56e0a999.js");function m(e){var t=v();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.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})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./util-88690406.js"),require("@babel/runtime/helpers/typeof");var p=l.getComponent("Component"),h=function(o){n(v,p);var i=m(v);function v(t){var n,o,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(l=i.call(this,t,a)).playerId=a.playerId,l.seriesData=a.sres,l.videos=a.related.content,l.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,l.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,l.currentVideoData=a.res,l.initialiseStructure(),l.loadCSS(),l.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:l.playerId,content:l.videos,cb:l.cb})),l}return t(v,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-b6e03076.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";s.highlightVideo(e),r.load(this.playerId,this.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var r=l.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,r,u,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(s.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||s.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(r=a.appcmsMain)||void 0===r||null===(u=r.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(c,p),l.dom.appendContent(d,c)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,r),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,d),s.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=h;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-2609dbe4.js"),r=require("./generic-a853d62d.js"),d=require("./currentVideoInfo-b52ab371.js"),s=require("./skin-516012d7.js"),c=require("./autoNextVideo-eb4b0117.js"),u=require("./localisation-56e0a999.js");function m(e){var t=v();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.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})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./util-88690406.js"),require("@babel/runtime/helpers/typeof");var p=l.getComponent("Component"),h=function(o){n(v,p);var i=m(v);function v(t){var n,o,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(l=i.call(this,t,a)).playerId=a.playerId,l.seriesData=a.sres,l.videos=a.related.content,l.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,l.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,l.currentVideoData=a.res,l.initialiseStructure(),l.loadCSS(),l.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:l.playerId,content:l.videos,cb:l.cb})),l}return t(v,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-b6e03076.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";s.highlightVideo(e),r.load(this.playerId,this.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var r=l.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,r,u,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(s.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||s.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(r=a.appcmsMain)||void 0===r||null===(u=r.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(c,p),l.dom.appendContent(d,c)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,r),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,d),s.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=h;
@@ -1 +1 @@
1
- import{s as n,j as t,k as o}from"./currentVideoInfo-d9beb914.js";import{C as i,P as e}from"./generic-a55d7135.js";import{a as r}from"./util-5a8e886e.js";import{h as s}from"./skin-d5091b86.js";import{g as a}from"./player_instance-34118a5b.js";var c,u=0,f=0,m=function(m){clearTimeout(u);var d=null==m?void 0:m.content;c=null==m?void 0:m.cb;var h=m.playerId;r(h,(function(){var r=a(h);0!==(null==r?void 0:r.currentTime())&&((f=t())>d.length-1||(o(f+1),i(h,d[f].id).then((function(t){s(f,h),n(t.response),f++,p(t)})).catch((function(n){p(n),s(f,h),f++,u=setTimeout((function(){e(h)&&l(f,h,d)}),5e3)}))))}))},l=function n(t,e,r,a){f=t,t>r.length-1||(o(f+1),i(e,r[t].id).then((function(n){s(f,e),f++,p(n)})).catch((function(t){p(t),setTimeout((function(){s(f,e),f++,n(f,e,r)}),5e3)})))},p=function(n){c&&c(n)};export{m as a,l as s};
1
+ import{s as n,j as t,k as o}from"./currentVideoInfo-d9beb914.js";import{C as i,P as e}from"./generic-642d8b79.js";import{a as r}from"./util-5a8e886e.js";import{h as s}from"./skin-d5091b86.js";import{g as a}from"./player_instance-34118a5b.js";var c,u=0,f=0,m=function(m){clearTimeout(u);var d=null==m?void 0:m.content;c=null==m?void 0:m.cb;var h=m.playerId;r(h,(function(){var r=a(h);0!==(null==r?void 0:r.currentTime())&&((f=t())>d.length-1||(o(f+1),i(h,d[f].id).then((function(t){s(f,h),n(t.response),f++,p(t)})).catch((function(n){p(n),s(f,h),f++,u=setTimeout((function(){e(h)&&l(f,h,d)}),5e3)}))))}))},l=function n(t,e,r,a){f=t,t>r.length-1||(o(f+1),i(e,r[t].id).then((function(n){s(f,e),f++,p(n)})).catch((function(t){p(t),setTimeout((function(){s(f,e),f++,n(f,e,r)}),5e3)})))},p=function(n){c&&c(n)};export{m as a,l as s};
package/esm/bundle.css CHANGED
@@ -3,7 +3,6 @@
3
3
 
4
4
 
5
5
 
6
-
7
6
  .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
8
7
  height: 0.7em;
9
8
  position: absolute;
@@ -224,6 +223,7 @@
224
223
  }
225
224
 
226
225
 
226
+
227
227
  /* CSS for videojs-dvr-seekbar */
228
228
 
229
229
  .video-js.vjs-dvr-seekbar {
@@ -555,6 +555,38 @@
555
555
  margin-left: 8px;
556
556
  }
557
557
  }
558
+ /* a wrapper element that tracks the mouse vertically */
559
+ .vjs-thumbnail-holder {
560
+ position: absolute;
561
+ left: -1000px;
562
+ }
563
+
564
+ /* the thumbnail image itself */
565
+ .vjs-thumbnail {
566
+ position: absolute;
567
+ left: 0;
568
+ bottom: 1.3em;
569
+ opacity: 0;
570
+ transition: opacity .2s ease;
571
+ -webkit-transition: opacity .2s ease;
572
+ -moz-transition: opacity .2s ease;
573
+ -mz-transition: opacity .2s ease;
574
+ }
575
+
576
+ /* fade in the thumbnail when hovering over the progress bar */
577
+ /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
578
+ .vjs-progress-control:hover .vjs-thumbnail,
579
+ .vjs-progress-control.fake-active .vjs-thumbnail,
580
+ .vjs-progress-control:active .vjs-thumbnail {
581
+ opacity: 1;
582
+ }
583
+
584
+ /* ... but hide the thumbnail when hovering directly over it */
585
+ .vjs-progress-control:hover .vjs-thumbnail:hover,
586
+ .vjs-progress-control:active .vjs-thumbnail:active {
587
+ opacity: 0;
588
+ }
589
+
558
590
  .video-js.vjs-quality-menu {
559
591
  display: block;
560
592
  }
@@ -625,38 +657,6 @@
625
657
  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
626
658
  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
627
659
  }
628
- /* a wrapper element that tracks the mouse vertically */
629
- .vjs-thumbnail-holder {
630
- position: absolute;
631
- left: -1000px;
632
- }
633
-
634
- /* the thumbnail image itself */
635
- .vjs-thumbnail {
636
- position: absolute;
637
- left: 0;
638
- bottom: 1.3em;
639
- opacity: 0;
640
- transition: opacity .2s ease;
641
- -webkit-transition: opacity .2s ease;
642
- -moz-transition: opacity .2s ease;
643
- -mz-transition: opacity .2s ease;
644
- }
645
-
646
- /* fade in the thumbnail when hovering over the progress bar */
647
- /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
648
- .vjs-progress-control:hover .vjs-thumbnail,
649
- .vjs-progress-control.fake-active .vjs-thumbnail,
650
- .vjs-progress-control:active .vjs-thumbnail {
651
- opacity: 1;
652
- }
653
-
654
- /* ... but hide the thumbnail when hovering directly over it */
655
- .vjs-progress-control:hover .vjs-thumbnail:hover,
656
- .vjs-progress-control:active .vjs-thumbnail:active {
657
- opacity: 0;
658
- }
659
-
660
660
  .vjs-poster {
661
661
  display: inline-block;
662
662
  vertical-align: middle;
@@ -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-a55d7135.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-b1a752cd.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-30be507a.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-cd7499aa.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-3b6581e0.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-b6849ca2.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-4cf6126c.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-910251cf.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-18da57cf.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-8ba6cb5c.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-ae6cc7f1.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-67f7208b.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-642d8b79.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-28669e20.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-d599ad1b.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-218bf7f6.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-eb85945a.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-888212e7.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-5529439a.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-ebf4ffad.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-ad9641b0.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-b785f38c.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-ae6cc7f1.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-67f7208b.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 r from"axios";import{g as i}from"./player_instance-34118a5b.js";import a from"js-cookie";import{a as l,e as u,g as s,h as d,d as c,s as v,i as m}from"./currentVideoInfo-d9beb914.js";import{a as p,r as f}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import E from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";function y(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],y("js",new Date),y("config",e)}function w(e,n){y("event",e,n)}var b={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 _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function S(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var O={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=O.version;var L,P=function(e,n){var t,o,i,a,l,u,s,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:null!==(l=window)&&void 0!==l&&null!==(u=l.customData)&&void 0!==u&&u.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==b?void 0:b.getVideoDetails),params:S({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":O.version,"x-player-name":"videojs"},withCredentials:!0})},A=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:F.get()+b.getLinearChannelDetails,params:S(S(S(S(S({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},D=function(e,n){var t,o,i=H(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=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,B();case 2:return o=e.sent,e.abrupt("return",r({url:F.get()+"".concat(null==b?void 0:b.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:S({},n),params:S({},(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)}}(),C=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},k=function(e){var n=e.videoId;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(L=null==b?void 0:b.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),V=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},W=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},j=null;function N(){return{set:function(e){e&&(j=e)},get:function(){return j}}}var U=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=N().get(),o=F.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),M=null,B=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"))||!W(n)){e.next=6;break}return M||(M=U().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&N().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){M=null}))),e.abrupt("return",M);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=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},H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function G(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?G(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Q=100,z=function(){var e,n,t,o,r,i,a,u=l();return"linearchannel"===((null==u?void 0:u.contentType)||"video")?null==u||null===(e=u.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==u?void 0:u.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==u||null===(r=u.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==u||null===(a=u.video)||void 0===a?void 0:a.id)||(null==u?void 0:u.id)};function q(){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=q(),window.sessionStorage.setItem("uid",e),e)}function J(){return K.apply(this,arguments)}function K(){return(K=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,B();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 $(e){return e?String(e):""}var Z=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ee(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=q(),u="production",s="WEBSITE",d=null,c=0,v=null,m=0,p=0,f=!1,g=[],I=i(e);if(I){var E=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)},h=Z((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),y=function(){var e=n(t.mark((function e(n){var o,i,d,c,v,m,p,f,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return g=e.sent,I=H(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=z(),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=u,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?$(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(d=n.bitrate)&&void 0!==d?d: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!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(p=a.beacon)||void 0===p?void 0:p.params,e.t32=(0,e.t0)(e.t30,e.t31),E=[e.t32],r({url:(null==a||null===(f=a.beacon)||void 0===f?void 0:f.url)||F.get()+b.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:E}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(d),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&p<4&&f?(p++,w("BUFFERING",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),y({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},_=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(d);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";w(o,Y({pfm:s,uid:X(),vid:z(),videoPosition:t},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),y({eventName:o,videoPosition:t,isAdEvent:!1})}))},S=function(){var e=Z((function(){var e;c=0,v=setInterval((function(){c=T(c)}),Q),w("PLAY",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),y({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":z(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},O=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(d),m=c||0,w("FIRST_FRAME",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:h()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),y({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:h()}),f=!0,c=0}))},L=function(){var e=!1;I.on("waiting",Z((function(){f&&(e=!0,clearInterval(d),d=setInterval((function(){e&&!I.paused()?m=T(m):clearInterval(d)}),Q))}))),I.on("playing",Z((function(){e=!1,clearInterval(d)})))},P=function(){var e=function(e){var n,t,o,r=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:h(),pfm:s,uid:X(),vid:z(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);w(e,Y({},r)),y(Y({eventName:e,adPosition:1},r))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},A=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(console.log(e,g),e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];p=0,g.push(e),y({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:h(),bitrate:E()})}}))};_(),L(),P(),A(),S(),I.on("loadeddata",O)}else console.error("Videojs: Player instance not found.")}function ne(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ee(e,n,t)}var te=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"},oe=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;k({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),d(t)})).catch((function(e){return console.log(e)}))},ie=function(){var e=u.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),r=l(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=u.get(),d=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return d>=0?d+1:1};function le(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 ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?le(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var se=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},de=function(e){var n=ce(e,"video.tags",[]),t=ce(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ce=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},ve=function(){var n,t,o,r,l,u,s,d,c,v,m,p,f,g,I,E,h,y,T,w,b,_,S,O,L=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return L;var D=(null==A?void 0:A.siteName)||"",R=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(o=A[R])||void 0===o?void 0:o.metadata)||(null==A||null===(r=A[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),k=i(P);if(!L.includes("VIEWLIFT_"))return L;var F,V=window.getComputedStyle(document.getElementById(P),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),j=Math.trunc(V.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==A||null===(u=A.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(d=s.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:ce(A,"video.gist.id",""),U="linearchannel"===R?null==A||null===(v=A.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(p=m.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===p?void 0:p.title:ce(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,B=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",(function(e){M=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=ue(ue({},me(C)),{},(_={VIEWLIFT_WIDTH:j,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:se(j,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ce(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ce(A,"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"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:de(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ce(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ce(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ce(null===(E=window)||void 0===E||null===(h=E.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":ce(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(b=w.site)||void 0===b?void 0:b.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ce(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ce(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:ie(),VIEWLIFT_CONTENT_TAGS:de(A),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in x){var G=new RegExp(H,"g");L=L.replace(G,x[H])}return L},me=function(e){var n,t,o,r,i,a,l={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.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,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return s||d?(oe()?s?l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),l=oe()?ue(ue({},l),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},l),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),l=oe()?ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),l=ue(ue({},l),{},{VIEWLIFT_AFID:u.get("afid")})},pe=function(e,n){var t,o,r,i,a,l,u,s,d,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(d=e[f])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var y=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ge(E);if(g){var T=Ie(I,n);return T.src=ve(T.src,n,e),T}if("Safari"!==te()&&y)return fe(I);if(h){var w=ge(I);return w.src=ve(w.src,n,e),w}if(null!=I&&I.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return b.src=ve(b.src,n,e),b}return null},fe=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ge=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Ie=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,u=te();if(i(n),"Safari"===u){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 r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return Ee(n),s}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Ee(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var Ee=function(e){var n=i(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==te()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},he=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},ye=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 r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},Te=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var we=!1,be=function(e,n,t){var o=ve(n,e,t),r=i(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i(e);if(null!==a.el_){we=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),we&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()}),1e3));var u=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&u.hasAttribute("controls")&&u.removeAttribute("controls");var s="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,s="touchend"),a.one(s,(function(){d&&a.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function _e(e,n){var t,o,r,a=i(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,s,d,c,v,m,p;if(Oe.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==u||u.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||nn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(s=i.appcmsMain)||void 0===s||null===(d=s.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||en(e,10)}}}),!0)}var Se,Oe=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Le="ssai-breakStart",Pe="ssai-adImpression",Ae="ssai-firstQuartile",De="ssai-midpoint",Re="ssai-thirdQuartile",Ce="ssai-complete",ke="ssai-breakEnd",Fe={breakStart:Le,impression:Pe,firstQuartile:Ae,midpoint:De,thirdQuartile:Re,complete:Ce,breakEnd:ke};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Fe[o];r&&t.trigger(r,n)}function We(e){var n=i(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(Le,e)},adImpression:function(e){return t(Pe,e)},adFirstQuartile:function(e){return t(Ae,e)},adMidpoint:function(e){return t(De,e)},adThirdQuartile:function(e){return t(Re,e)},adComplete:function(e){return t(Ce,e)},adBreakEnd:function(e){return t(ke,e)}}}function je(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 Ne(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?je(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):je(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Ue(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 Me(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)?Me(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Me(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Be,xe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),He=(Be=null,{set:function(e){Be=e},get position(){return Be}});function Ge(e,n){return Ye.apply(this,arguments)}function Ye(){return(Ye=n(t.mark((function e(n,o){var r,a,l,u,s,d,c,v,m,p,f,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(n),r=pe(o,n),a=r.src,l=a.replace("/dash/","/session/").replace("/master/","/session/"),l=ve(l,n,o),u=Qe(l),s=h(u,2),d=s[0],c=s[1],l=new URL(l.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach((function(e){var n=h(e,2),t=n[0],o=n[1];l.searchParams.set(t,o)})),e.prev=8,e.next=11,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ne({},d)})});case 11:return v=e.sent,e.next=14,v.json();case 14:return m=e.sent,p="https://"+new URL(l).hostname,f=m.trackingUrl,g=m.manifestUrl,I=p+f,E=p+g,xe.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),r.src=E,e.abrupt("return",r);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",r);case 29:case"end":return e.stop()}}),e,null,[[8,26]])})))).apply(this,arguments)}function Qe(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ue((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=h(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},s={},d=0,c=Object.entries(n);d<c.length;d++){var v=h(c[d],2),m=v[0],p=v[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=p;else s[m]=p}return[u,s]}var ze,qe=(ze=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),ze=Array.isArray(e)?E(e):ze},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",ze),E(ze)}});function Xe(e,n){return Je.apply(this,arguments)}function Je(){return Je=n(t.mark((function e(o,r){var a,l,u,s,d,c,v,m,p,f,I,h,y,T,w,b,_,S,O,L,P,A,D;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,n,t,r,a,l){var u=i(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=Ue(t);try{var c=function(){var t,i,d,c=s.value,v=c.eventType,m=c.beaconUrls,p=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=p||0,E=m,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,y="".concat(I,"_").concat(v),T=P.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",P),e>=I&&!T.includes(y)){T.push(y),P.set("pod-".concat(a),T);try{A(v,n,E,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var w=He.position;He.set(null),setTimeout((function(){null!=w&&(u.currentTime(w),l())}),500)}if("function"==typeof h)try{var b,_={eventType:v,startTimeInSeconds:p,startTime:f,durationInSeconds:g,ad:null==n||null===(b=n.ads)||void 0===b?void 0:b[r],adIndex:r};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},A=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)}))}))},L=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},He.set(r),p=xe.get(),(f=i(o)).one("loadeddata",(function(){p&&O(p)})),I=new Map,h=new Map,y=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,w=(null==f||null===(u=f.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==f||null===(s=f.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==f||null===(d=f.el())||void 0===d||null===(c=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var a,l,u,s,d,c,v,m,p,f,O,P,A,R,C,k,F,V,W,j;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",k),0===e.button&&A()},C=function(e){},R=function(){var e,n=f.currentTime(),t=null,o=Ue(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,I.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){f.currentTime(t+2.2)}),100))},A=function(){var e,n=f.currentTime(),t=null,o=Ue(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,u=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>u||n>i)&&!I.has(i)||n>=i&&n<=u)&&(t=i,I.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){f.currentTime(t+.4)}),100))},d=!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),m=v.avails,p=[],f=i(o),O=f.controlBar.progressControl,P=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.map((function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(d=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===r?void 0:r[0])||[]})})),!d&&r&&(f.currentTime(r),R()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",P.appendChild(i)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=g((function(){var e=f.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&I.set(r,!0),Oe.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,d=0,c=0;c<a.length;c++){var v,m=null==a||null===(v=a[c])||void 0===v?void 0:v.durationInSeconds;if(u<s+m){d=c;break}s+=m}a[d];var f=Math.max(0,i-u),g=Math.round(f);F.style.display="block",j.textContent="".concat(d+1," of ").concat(a.length," • ").concat(L(g));var y=[];return null==a||a.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));y.push.apply(y,E(n))})),Array.isArray(a)&&0==(null==a?void 0:a.length)&&y.push(null==t?void 0:t.podSlotImpressionBeacon),D(e,t,y,d,o,R),"break"}h.delete(r)},o=0;o<p.length;o++){if("break"===t())break}n||(F.style.display="none",O.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Oe.enable())}}),1e3),f.on("timeupdate",f._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",(function(e){Oe.enabled&&"ArrowRight"==e.key&&(A(),en(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",C),document.addEventListener("pointerup",k))})),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(F=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(W=document.createElement("div")).className="sponsored-text",W.textContent="Sponsored Ad",V.append(W),(j=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",F.append(V),F.append(j),f.el().appendChild(F);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map;case 18:case"end":return e.stop()}}),e)}))),Je.apply(this,arguments)}function Ke(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 $e=function(e){o(e).play()},Ze=function(e){o(e).pause()},en=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},nn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},tn=function(e){return!!o.getPlayer("".concat(e))},on=function(e){return o(e).paused()},rn=function(){var e=n(t.mark((function e(n,o){var r,a,l,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],e.next=3,B();case 3:return a=e.sent,l=i(n),e.abrupt("return",new Promise((function(e,t){var i=(null==o?void 0:o.epg)||o;A(i,a).then((function(t){var i=null==t?void 0:t.data;window.sid=q(),i.contentType="linearchannel",i.channelId=null==o?void 0:o.channelId;var a=pe(i,n);v(i),c((null==o?void 0:o.programs)||[]),a&&r?(dn(n,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:i})}))):e({status:!0,msg:"Feed authenticated",response:i})})).catch((function(e){t({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,r,a){var l,u,d,c,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return c=e.sent,(s()||null)&&m(r),g=0,I=0,E=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(d=u.watchHistory)&&void 0!==d&&d.enable&&C(r,c).then((function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),g=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(I=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(E=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)})).catch((function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))})),e.abrupt("return",new Promise((function(e,a){P(r,c).then(function(){var r=n(t.mark((function n(r){var l,u,s,d,c,m,h,y,T,w,b,_,S,O,L,P,A,D,R,C,k,F,V,W,j,N,U,M,B,x,H,G,Y,Q,z,q,X,J;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(l=P[A])||void 0===l?void 0:l.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(d=s.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)||!1,R=(null==P||null===(m=P.video)||void 0===m||null===(h=m.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,v(r.data),(C=(null==P||null===(y=P.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(b=w.web)||void 0===b?void 0:b.active)&&(null==P||null===(_=P.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(L=O.web)||void 0===L?void 0:L.url))&&be(o,C,P),k=pe(P,o),!D){n.next=12;break}return n.next=11,Ge(o,P);case 11:k=n.sent;case 12:k?(G=(null==P||null===(F=P.video)||void 0===F||null===(V=F.gist)||void 0===V?void 0:V.videoImageUrl)||(null==P||null===(W=P.video)||void 0===W||null===(j=W.gist)||void 0===j||null===(N=j.imageGist)||void 0===N?void 0:N.r16x9),(Y=i(o)).poster(G),dn(o,k),D&&Xe(o,E),Y.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:P})})),Y.on("loadeddata",(function(){Te(),e({status:!0,msg:"Video Loaded",response:P})})),Y.one("play",(function(){g&&!D&&I<95&&setTimeout((function(){Y.currentTime(g)}),0)})),Y.one("error",(function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==P||null===(U=P.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==P||null===(x=P.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(J=(null==P||null===(z=P.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==P||null===(X=P.video)||void 0===X?void 0:X.closedCaptions),Q=J.filter((function(e){return"VTT"===e.format})),p(o,Q)):f(o)):(ye(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){cn(e,o,a,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),ln=function(e,n,t){var o=i(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},un=function(e){var n=i(e);if(sn(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},sn=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()},dn=function(e,n){var t=i(e);t&&t.src(n)},cn=function(n,t,o,r){var i,a,l,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);tn(t)&&ye(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(d=window)||void 0===d?void 0:d.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?Ke(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ke(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},vn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{nn as A,tn as B,an as C,rn as D,un as E,V as F,qe as G,We as H,F as I,x as J,N as K,W as L,T as M,_e as N,oe as O,on as P,Xe as Q,k as R,ae as a,ie as b,pe as c,te as d,Te as e,vn as f,X as g,ye as h,ne as i,be as j,he as k,dn as l,Ge as m,H as n,P as o,C as p,cn as q,B as r,R as s,A as t,D as u,re as v,ln as w,en as x,$e as y,Ze 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 r from"axios";import{g as i}from"./player_instance-34118a5b.js";import a from"js-cookie";import{a as l,e as u,g as s,h as d,d as c,s as v,i as m}from"./currentVideoInfo-d9beb914.js";import{a as p,r as f}from"./captions-f507e8ee.js";import{t as g,c as I}from"./skin-d5091b86.js";import E from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";function y(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],y("js",new Date),y("config",e)}function w(e,n){y("event",e,n)}var b={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 _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function S(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var O={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=O.version;var L,P=function(e,n){var t,o,i,a,l,u,s,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:null!==(l=window)&&void 0!==l&&null!==(u=l.customData)&&void 0!==u&&u.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==b?void 0:b.getVideoDetails),params:S({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":O.version,"x-player-name":"videojs"},withCredentials:!0})},A=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:F.get()+b.getLinearChannelDetails,params:S(S(S(S(S({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},D=function(e,n){var t,o,i=H(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=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,B();case 2:return o=e.sent,e.abrupt("return",r({url:F.get()+"".concat(null==b?void 0:b.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:S({},n),params:S({},(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)}}(),C=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},k=function(e){var n=e.videoId;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(L=null==b?void 0:b.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),V=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},W=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},j=null;function N(){return{set:function(e){e&&(j=e)},get:function(){return j}}}var U=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=N().get(),o=F.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),M=null,B=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"))||!W(n)){e.next=6;break}return M||(M=U().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&N().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){M=null}))),e.abrupt("return",M);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=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},H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function G(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?G(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Q=100,z=function(){var e,n,t,o,r,i,a,u=l();return"linearchannel"===((null==u?void 0:u.contentType)||"video")?null==u||null===(e=u.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==u?void 0:u.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==u||null===(r=u.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==u||null===(a=u.video)||void 0===a?void 0:a.id)||(null==u?void 0:u.id)};function q(){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=q(),window.sessionStorage.setItem("uid",e),e)}function J(){return K.apply(this,arguments)}function K(){return(K=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,B();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 $(e){return e?String(e):""}var Z=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function ee(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=q(),u="production",s="WEBSITE",d=null,c=0,v=null,m=0,p=0,f=!1,g=[],I=i(e);if(I){var E=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)},h=Z((function(){for(var e=I.currentTime(),n=I.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),y=function(){var e=n(t.mark((function e(n){var o,i,d,c,v,m,p,f,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return g=e.sent,I=H(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=z(),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=u,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?$(n.adPosition):"",e.next=25,J();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(d=n.bitrate)&&void 0!==d?d: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!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(p=a.beacon)||void 0===p?void 0:p.params,e.t32=(0,e.t0)(e.t30,e.t31),E=[e.t32],r({url:(null==a||null===(f=a.beacon)||void 0===f?void 0:f.url)||F.get()+b.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:E}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e){if(!I.paused()&&I.readyState()>2)return clearInterval(d),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&p<4&&f?(p++,w("BUFFERING",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),y({eventName:"BUFFERING",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),0):t},_=function(){var e=Math.floor(I.currentTime);I.on("error",(function(){var n,t=Math.floor(I.currentTime);clearInterval(d);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";w(o,Y({pfm:s,uid:X(),vid:z(),videoPosition:t},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),y({eventName:o,videoPosition:t,isAdEvent:!1})}))},S=function(){var e=Z((function(){var e;c=0,v=setInterval((function(){c=T(c)}),Q),w("PLAY",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),y({eventName:"PLAY",videoPosition:Math.floor(I.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":z(),watchTime:Math.floor(I.currentTime)})}));I.one("play",e)},O=function(){I.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(d),m=c||0,w("FIRST_FRAME",Y({pfm:s,uid:X(),vid:z(),videoPosition:Math.floor(I.currentTime),ttFirstFrame:c,bufferHealth:h()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),y({eventName:"FIRST_FRAME",videoPosition:Math.floor(I.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:h()}),f=!0,c=0}))},L=function(){var e=!1;I.on("waiting",Z((function(){f&&(e=!0,clearInterval(d),d=setInterval((function(){e&&!I.paused()?m=T(m):clearInterval(d)}),Q))}))),I.on("playing",Z((function(){e=!1,clearInterval(d)})))},P=function(){var e=function(e){var n,t,o,r=Y({videoPosition:Math.floor(I.currentTime),isAdEvent:!0,bufferHealth:h(),pfm:s,uid:X(),vid:z(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);w(e,Y({},r)),y(Y({eventName:e,adPosition:1},r))};I.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),I.on("adskip",(function(){c=0})),I.on("adend",(function(){c=0}))},A=function(){I.on("timeupdate",(function(){var e=Math.floor(I.currentTime());if(console.log(e,g),e>=30&&e%30==0&&!g.includes(e)){var n,t=null===(n=I.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];p=0,g.push(e),y({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:h(),bitrate:E()})}}))};_(),L(),P(),A(),S(),I.on("loadeddata",O)}else console.error("Videojs: Player instance not found.")}function ne(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&ee(e,n,t)}var te=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"},oe=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},re=function(e,n){var t=new Map;k({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),d(t)})).catch((function(e){return console.log(e)}))},ie=function(){var e=u.get();return e>=0?e+1:1},ae=function(){var e,n,t,o=s(),r=l(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=u.get(),d=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===i}));return d>=0?d+1:1};function le(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 ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?le(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var se=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},de=function(e){var n=ce(e,"video.tags",[]),t=ce(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},ce=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},ve=function(){var n,t,o,r,l,u,s,d,c,v,m,p,f,g,I,E,h,y,T,w,b,_,S,O,L=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return L;var D=(null==A?void 0:A.siteName)||"",R=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(o=A[R])||void 0===o?void 0:o.metadata)||(null==A||null===(r=A[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),k=i(P);if(!L.includes("VIEWLIFT_"))return L;var F,V=window.getComputedStyle(document.getElementById(P),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),j=Math.trunc(V.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==A||null===(u=A.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(d=s.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:ce(A,"video.gist.id",""),U="linearchannel"===R?null==A||null===(v=A.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(p=m.find((function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)})))||void 0===p?void 0:p.title:ce(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,B=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",(function(e){M=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]})));var x=ue(ue({},me(C)),{},(_={VIEWLIFT_WIDTH:j,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:se(j,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ce(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ce(A,"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"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:de(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ce(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ce(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ce(null===(E=window)||void 0===E||null===(h=E.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":ce(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(b=w.site)||void 0===b?void 0:b.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ce(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:ce(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ce(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ae(),VIEWLIFT_SEASON_NUMBER:ie(),VIEWLIFT_CONTENT_TAGS:de(A),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in x){var G=new RegExp(H,"g");L=L.replace(G,x[H])}return L},me=function(e){var n,t,o,r,i,a,l={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.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,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return s||d?(oe()?s?l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):d&&(l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),l=oe()?ue(ue({},l),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},l),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(l=ue(ue({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),l=oe()?ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ue(ue({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),l=ue(ue({},l),{},{VIEWLIFT_AFID:u.get("afid")})},pe=function(e,n){var t,o,r,i,a,l,u,s,d,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(d=e[f])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var y=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ge(E);if(g){var T=Ie(I,n);return T.src=ve(T.src,n,e),T}if("Safari"!==te()&&y)return fe(I);if(h){var w=ge(I);return w.src=ve(w.src,n,e),w}if(null!=I&&I.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return b.src=ve(b.src,n,e),b}return null},fe=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ge=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Ie=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,u=te();if(i(n),"Safari"===u){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 r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return Ee(n),s}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Ee(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var Ee=function(e){var n=i(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==te()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},he=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},ye=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 r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},Te=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var we=!1,be=function(e,n,t){var o=ve(n,e,t),r=i(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i(e);if(null!==a.el_){we=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),we&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()}),1e3));var u=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&u.hasAttribute("controls")&&u.removeAttribute("controls");var s="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,s="touchend"),a.one(s,(function(){d&&a.ima.initializeAdDisplayContainer()}));var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.addEventListener(google.ima.AdEvent.Type.LOADED,(function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o)}};function _e(e,n){var t,o,r,a=i(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,s,d,c,v,m,p;if(Oe.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==u||u.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||nn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(s=i.appcmsMain)||void 0===s||null===(d=s.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||en(e,10)}}}),!0)}var Se,Oe=(Se=!0,{enable:function(){Se=!0},disable:function(){Se=!1},get enabled(){return Se}}),Le="ssai-breakStart",Pe="ssai-adImpression",Ae="ssai-firstQuartile",De="ssai-midpoint",Re="ssai-thirdQuartile",Ce="ssai-complete",ke="ssai-breakEnd",Fe={breakStart:Le,impression:Pe,firstQuartile:Ae,midpoint:De,thirdQuartile:Re,complete:Ce,breakEnd:ke};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Fe[o];r&&t.trigger(r,n)}function We(e){var n=i(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(Le,e)},adImpression:function(e){return t(Pe,e)},adFirstQuartile:function(e){return t(Ae,e)},adMidpoint:function(e){return t(De,e)},adThirdQuartile:function(e){return t(Re,e)},adComplete:function(e){return t(Ce,e)},adBreakEnd:function(e){return t(ke,e)}}}function je(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 Ne(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?je(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):je(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Ue(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 Me(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)?Me(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Me(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Be,xe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),He=(Be=null,{set:function(e){Be=e},get position(){return Be}});function Ge(e,n){return Ye.apply(this,arguments)}function Ye(){return(Ye=n(t.mark((function e(n,o){var r,a,l,u,s,d,c,v,m,p,f,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(n),r=pe(o,n),a=r.src,l=a.replace("/dash/","/session/").replace("/master/","/session/"),l=ve(l,n,o),u=Qe(l),s=h(u,2),d=s[0],c=s[1],l=new URL(l.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach((function(e){var n=h(e,2),t=n[0],o=n[1];l.searchParams.set(t,o)})),e.prev=8,e.next=11,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Ne({},d)})});case 11:return v=e.sent,e.next=14,v.json();case 14:return m=e.sent,p="https://"+new URL(l).hostname,f=m.trackingUrl,g=m.manifestUrl,I=p+f,E=p+g,xe.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),r.src=E,e.abrupt("return",r);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",r);case 29:case"end":return e.stop()}}),e,null,[[8,26]])})))).apply(this,arguments)}function Qe(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ue((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=h(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},s={},d=0,c=Object.entries(n);d<c.length;d++){var v=h(c[d],2),m=v[0],p=v[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=p;else s[m]=p}return[u,s]}var ze,qe=(ze=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),ze=Array.isArray(e)?E(e):ze},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",ze),E(ze)}});function Xe(e,n){return Je.apply(this,arguments)}function Je(){return Je=n(t.mark((function e(o,r){var a,l,u,s,d,c,v,m,p,f,I,h,y,T,w,b,_,S,O,L,P,A,D;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,n,t,r,a,l){var u=i(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=Ue(t);try{var c=function(){var t,i,d,c=s.value,v=c.eventType,m=c.beaconUrls,p=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=p||0,E=m,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,y="".concat(I,"_").concat(v),T=P.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",P),e>=I&&!T.includes(y)){T.push(y),P.set("pod-".concat(a),T);try{A(v,n,E,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var w=He.position;He.set(null),setTimeout((function(){null!=w&&(u.currentTime(w),l())}),500)}if("function"==typeof h)try{var b,_={eventType:v,startTimeInSeconds:p,startTime:f,durationInSeconds:g,ad:null==n||null===(b=n.ads)||void 0===b?void 0:b[r],adIndex:r};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},A=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)}))}))},L=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},He.set(r),p=xe.get(),(f=i(o)).one("loadeddata",(function(){p&&O(p)})),I=new Map,h=new Map,y=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,w=(null==f||null===(u=f.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==f||null===(s=f.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==f||null===(d=f.el())||void 0===d||null===(c=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var a,l,u,s,d,c,v,m,p,f,O,P,A,R,C,k,F,V,W,j;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",k),0===e.button&&A()},C=function(e){},R=function(){var e,n=f.currentTime(),t=null,o=Ue(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,I.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){f.currentTime(t+2.2)}),100))},A=function(){var e,n=f.currentTime(),t=null,o=Ue(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,u=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>u||n>i)&&!I.has(i)||n>=i&&n<=u)&&(t=i,I.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){f.currentTime(t+.4)}),100))},d=!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),m=v.avails,p=[],f=i(o),O=f.controlBar.progressControl,P=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.map((function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(d=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===r?void 0:r[0])||[]})})),!d&&r&&(f.currentTime(r),R()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",P.appendChild(i)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=g((function(){var e=f.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&I.set(r,!0),Oe.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,d=0,c=0;c<a.length;c++){var v,m=null==a||null===(v=a[c])||void 0===v?void 0:v.durationInSeconds;if(u<s+m){d=c;break}s+=m}a[d];var f=Math.max(0,i-u),g=Math.round(f);F.style.display="block",j.textContent="".concat(d+1," of ").concat(a.length," • ").concat(L(g));var y=[];return null==a||a.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));y.push.apply(y,E(n))})),Array.isArray(a)&&0==(null==a?void 0:a.length)&&y.push(null==t?void 0:t.podSlotImpressionBeacon),D(e,t,y,d,o,R),"break"}h.delete(r)},o=0;o<p.length;o++){if("break"===t())break}n||(F.style.display="none",O.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Oe.enable())}}),1e3),f.on("timeupdate",f._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",(function(e){Oe.enabled&&"ArrowRight"==e.key&&(A(),en(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",C),document.addEventListener("pointerup",k))})),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach((function(e){return null==e?void 0:e.remove()})),(F=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(W=document.createElement("div")).className="sponsored-text",W.textContent="Sponsored Ad",V.append(W),(j=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",F.append(V),F.append(j),f.el().appendChild(F);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map;case 18:case"end":return e.stop()}}),e)}))),Je.apply(this,arguments)}function Ke(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 $e=function(e){o(e).play()},Ze=function(e){o(e).pause()},en=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},nn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},tn=function(e){return!!o.getPlayer("".concat(e))},on=function(e){return o(e).paused()},rn=function(){var e=n(t.mark((function e(n,o){var r,a,l,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],e.next=3,B();case 3:return a=e.sent,l=i(n),e.abrupt("return",new Promise((function(e,t){var i=(null==o?void 0:o.epg)||o;A(i,a).then((function(t){var i=null==t?void 0:t.data;window.sid=q(),i.contentType="linearchannel",i.channelId=null==o?void 0:o.channelId;var a=pe(i,n);v(i),c((null==o?void 0:o.programs)||[]),sessionStorage.setItem("program_switched",!0),a&&r?(dn(n,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:i})}))):e({status:!0,msg:"Feed authenticated",response:i})})).catch((function(e){t({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,r,a){var l,u,d,c,g,I,E;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return c=e.sent,(s()||null)&&m(r),g=0,I=0,E=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(d=u.watchHistory)&&void 0!==d&&d.enable&&C(r,c).then((function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),g=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(I=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(E=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)})).catch((function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))})),e.abrupt("return",new Promise((function(e,a){P(r,c).then(function(){var r=n(t.mark((function n(r){var l,u,s,d,c,m,h,y,T,w,b,_,S,O,L,P,A,D,R,C,k,F,V,W,j,N,U,M,B,x,H,G,Y,Q,z,q,X,J;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,A=(null==P?void 0:P.contentType)||"video",D=(null==P||null===(l=P[A])||void 0===l?void 0:l.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(d=s.appcmsMain)||void 0===d||null===(c=d.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)||!1,R=(null==P||null===(m=P.video)||void 0===m||null===(h=m.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,v(r.data),(C=(null==P||null===(y=P.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(b=w.web)||void 0===b?void 0:b.active)&&(null==P||null===(_=P.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(L=O.web)||void 0===L?void 0:L.url))&&be(o,C,P),k=pe(P,o),!D){n.next=12;break}return n.next=11,Ge(o,P);case 11:k=n.sent;case 12:k?(G=(null==P||null===(F=P.video)||void 0===F||null===(V=F.gist)||void 0===V?void 0:V.videoImageUrl)||(null==P||null===(W=P.video)||void 0===W||null===(j=W.gist)||void 0===j||null===(N=j.imageGist)||void 0===N?void 0:N.r16x9),(Y=i(o)).poster(G),dn(o,k),D&&Xe(o,E),Y.on("loadstart",(function(){R&&e({status:!0,msg:"Video Loaded",response:P})})),Y.on("loadeddata",(function(){Te(),e({status:!0,msg:"Video Loaded",response:P})})),Y.one("play",(function(){g&&!D&&I<95&&setTimeout((function(){Y.currentTime(g)}),0)})),Y.one("error",(function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==P||null===(U=P.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==P||null===(x=P.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(J=(null==P||null===(z=P.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==P||null===(X=P.video)||void 0===X?void 0:X.closedCaptions),Q=J.filter((function(e){return"VTT"===e.format})),p(o,Q)):f(o)):(ye(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){cn(e,o,a,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),ln=function(e,n,t){var o=i(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},un=function(e){var n=i(e);if(sn(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},sn=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()},dn=function(e,n){var t=i(e);t&&t.src(n)},cn=function(n,t,o,r){var i,a,l,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);tn(t)&&ye(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(d=window)||void 0===d?void 0:d.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?Ke(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ke(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},vn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{nn as A,tn as B,an as C,rn as D,un as E,V as F,qe as G,We as H,F as I,x as J,N as K,W as L,T as M,_e as N,oe as O,on as P,Xe as Q,k as R,ae as a,ie as b,pe as c,te as d,Te as e,vn as f,X as g,ye as h,ne as i,be as j,he as k,dn as l,Ge as m,H as n,P as o,C as p,cn as q,B as r,R as s,A as t,D as u,re as v,ln as w,en as x,$e as y,Ze as z};