@viewlift/player-backup 2.0.7-backup → 2.0.9-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.
- package/cjs/{autoNextVideo-1a70d67c.js → autoNextVideo-67643370.js} +1 -1
- package/cjs/bundle.css +39 -39
- package/cjs/{features-66e55751.js → features-29929135.js} +1 -1
- package/cjs/generic-fa17673c.js +1 -0
- package/cjs/{index-9e780f27.js → index-76878508.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-0d0c3ff1.js → keyboardShortcuts-f6891b63.js} +1 -1
- package/cjs/{multicamv2-db3448be.js → multicamv2-941d6607.js} +1 -1
- package/cjs/{multicamv2-e4a760a4.js → multicamv2-c47a0cf5.js} +1 -1
- package/cjs/{nextEpisodeButton-3a018fdb.js → nextEpisodeButton-a7b08e1e.js} +1 -1
- package/cjs/{playlist-601d3222.js → playlist-51ea4f44.js} +1 -1
- package/cjs/{series-1f5e46da.js → series-2a1743fe.js} +1 -1
- package/cjs/{series-v2-ae1043d1.js → series-v2-13b6d6e8.js} +1 -1
- package/cjs/{series-v2-5cf287e5.js → series-v2-91b4d8b0.js} +1 -1
- package/cjs/{skin-6d9e7f67.js → skin-12d04dd8.js} +1 -1
- package/cjs/{skin-1e4e2ede.js → skin-25178702.js} +1 -1
- package/cjs/{skin-176180ff.js → skin-6a709af6.js} +1 -1
- package/cjs/{skin-3b1d7864.js → skin-76379d6c.js} +1 -1
- package/cjs/{skin-7d10cc61.js → skin-7a1d70e1.js} +1 -1
- package/cjs/{skin-6f1f7bfc.js → skin-e41d2756.js} +1 -1
- package/cjs/{videoSelector-76f35ff9.js → videoSelector-23a44d1f.js} +1 -1
- package/cjs/{videoSelector-8aee1728.js → videoSelector-e3fe56e0.js} +1 -1
- package/esm/{autoNextVideo-b3f361d9.js → autoNextVideo-c475592c.js} +1 -1
- package/esm/bundle.css +39 -39
- package/esm/{features-bf71fd6e.js → features-e4c04012.js} +1 -1
- package/esm/generic-919025fc.js +1 -0
- package/esm/{index-00f19cbd.js → index-530ca330.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-5d743be0.js → keyboardShortcuts-4d65af9c.js} +1 -1
- package/esm/{multicamv2-7a6956d7.js → multicamv2-138f8c2c.js} +1 -1
- package/esm/{multicamv2-0a13cf3a.js → multicamv2-cb88ce9b.js} +1 -1
- package/esm/{nextEpisodeButton-37c2e0bb.js → nextEpisodeButton-3fcdc7ba.js} +1 -1
- package/esm/{playlist-1f65c63b.js → playlist-8bd0584c.js} +1 -1
- package/esm/{series-9faf3331.js → series-cd3984e1.js} +1 -1
- package/esm/{series-v2-09541c88.js → series-v2-239db351.js} +1 -1
- package/esm/{series-v2-979f8264.js → series-v2-69495f60.js} +1 -1
- package/esm/{skin-69595ceb.js → skin-0a6417ad.js} +1 -1
- package/esm/{skin-b3918671.js → skin-10acbf01.js} +1 -1
- package/esm/{skin-f7b309f6.js → skin-594228bc.js} +1 -1
- package/esm/{skin-47c2c547.js → skin-9ac188b3.js} +1 -1
- package/esm/{skin-e2a48f27.js → skin-d5ae9351.js} +1 -1
- package/esm/{skin-f686b20e.js → skin-f10cfd51.js} +1 -1
- package/esm/{videoSelector-82d9f0d3.js → videoSelector-6381f90c.js} +1 -1
- package/esm/{videoSelector-afe232e9.js → videoSelector-fe244cc0.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-68f01105.js +0 -1
- package/esm/generic-35152f51.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as d,B as c}from"./icons-3bd3bd8f.js";import{j as u,T as m,U as p,c as v,x as h,F as f}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as d,B as c}from"./icons-3bd3bd8f.js";import{j as u,T as m,U as p,c as v,x as h,F as f}from"./generic-919025fc.js";import{e as C,p as g,g as y}from"./skin-b8df984d.js";import{a as b}from"./autoNextVideo-c475592c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"./util-1c8c0f16.js";function N(e){var t=E();return function(){var s,o=l(e);if(t){var n=l(this).constructor;s=Reflect.construct(o,arguments,n)}else s=o.apply(this,arguments);return i(this,s)}}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}var k=a.getComponent("Component"),S=function(i){n(E,k);var l=N(E);function E(s){var n,i,a,r,d,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,E),(c=l.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(n=v.sres)||void 0===n?void 0:n.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(a=v.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=u(),null!==(r=o(c))&&void 0!==r&&r.autoPlayNext&&null!=v&&null!==(d=v.series)&&void 0!==d&&d.enable){var h,f,C,g,y=null==v||null===(h=v.sres)||void 0===h?void 0:h.seasons,N=[];y.map((function(t){N.push.apply(N,e(t.episodes))})),m(N),p(null===(f=c.options_)||void 0===f||null===(C=f.res)||void 0===C||null===(g=C.video)||void 0===g?void 0:g.id),b({playerId:c.playerId,content:N,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(E,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),s.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var o=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(o,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=g(d());n.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,l),y(this.playerId).on("fullscreenchange",(function(){var s=document.getElementById(t.playerId);if(s){var o=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;y(this.playerId);for(var t=v(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(o));var l=document.createElement("div");l.className="season - ".concat(o),l.textContent=null===(n=t[o])||void 0===n?void 0:n.title;var r=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==o&&(r.checked=!0),r.onclick=function(t){h.set(o),e.showSeasonDetails(o)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(s,i)},n=0;n<t.length;n++)o(n);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,n,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==o||null===(i=o.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var n=function(n){var i,l,r,d,c,u,m,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:n}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,g),a.dom.appendContent(v,h),a.dom.appendContent(s,v);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),E.alt="".concat(null===(m=t[n])||void 0===m?void 0:m.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(v,y),a.dom.appendContent(s,v),y.onclick=function(e){var s;e.stopPropagation(),p(null===(s=t[n])||void 0===s?void 0:s.id),f(o.playerId,t[n].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))},h.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=v()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=g(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),E}();export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./skin-b8df984d.js";import{f as r,n as t}from"./features-
|
|
1
|
+
import{g as e}from"./skin-b8df984d.js";import{f as r,n as t}from"./features-e4c04012.js";import{g as o}from"./renditions-aa307468.js";import{r as i}from"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-919025fc.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./localisation-0bf399a1.js";function s(s,n){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,s){e(t).on("loadeddata",(function(){var e;(null===(e=o(t))||void 0===e?void 0:e.length)>0&&r(t,s),null!=s&&s.disableCaptions&&i(t)}))}(s,n),function(r,o){var i=e(r);i.controls(!1),t(r)}(s)}export{s as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,C as t}from"./generic-
|
|
1
|
+
import{B as e,C as t}from"./generic-919025fc.js";import{g as r}from"./skin-b8df984d.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";function o(o){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),n(),function(o){var n=document.getElementById("".concat(o)),i=r(o);n&&n.addEventListener("touchstart",(function(){i.paused()?e(o):t(o)}))}(o)}var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as r,C as e}from"./generic-
|
|
1
|
+
import{B as r,C as e}from"./generic-919025fc.js";import{g as t}from"./skin-b8df984d.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";function o(r){n(r),i(r)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",(function(){i.paused()?r(o):e(o)}))},n=function(r){var e=t(r);e.requestFullscreen=function(){},e.controlBar.hide()};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as o,d as s,e as i}from"./features-
|
|
1
|
+
import{a as e,b as t,c as o,d as s,e as i}from"./features-e4c04012.js";import{i as n}from"./keyboardShortcuts-4d65af9c.js";import{S as r,M as l,a,N as d,b as m,R as u}from"./icons-3bd3bd8f.js";import{g as p,b as c}from"./skin-b8df984d.js";import{g as b}from"./generic-919025fc.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-aa307468.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-3fcdc7ba.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,b())}))})),n.one("loadedmetadata",(function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,n,r=p(e),m=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(m&&(m.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(d()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as l,g as e,h as o,d as i,e as n,i as t,j as a,k as r,l as s,m as d}from"./features-
|
|
1
|
+
import{f as l,g as e,h as o,d as i,e as n,i as t,j as a,k as r,l as s,m as d}from"./features-e4c04012.js";import{M as u,a as m,c as v,d as p}from"./icons-3bd3bd8f.js";import{g as c,b as h}from"./skin-b8df984d.js";import{g as f}from"./renditions-aa307468.js";import{g as b}from"./captions-135a6d13.js";import{a as g,i as y,b as j}from"./index-530ca330.js";import{i as C,d as V}from"./browser-d4613b36.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./generic-919025fc.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-c475592c.js";import"./util-1c8c0f16.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";function w(i,n){var t=c(i);t&&(t.on("loadeddata",(function(){var o,a,r,s,d,u,m;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(a=b(i))||void 0===a?void 0:a.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(s=window)&&void 0!==s&&null!==(d=s.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(m=u.features)&&void 0!==m&&m.auto_play)||null!=n&&n.liveVideo||g(i,n),function(l,e){var o,i=Math.floor(l/60),n=null===(o=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===o?void 0:o[0];n&&(n.style.marginRight=i>60?"56px":"41px");var t=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");e&&t.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",n&&(n.style.marginRight="56px"))}(t.duration(),(null==n?void 0:n.liveVideo)||!1),null!=n&&n.liveVideo||C()||y(i)})),t.one("play",(function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}function k(l,e){c(l).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-e4b35c14.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),w(l,e),function(l,e){var o,i,n,t,a,r,s=c(l);null==s||null===(o=s.controlBar)||void 0===o||null===(i=o.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(h(u(window.controlsColor))),null==s||null===(t=s.controlBar)||void 0===t||null===(a=t.getChild("FullscreenToggle"))||void 0===a||null===(r=a.el())||void 0===r||r.appendChild(h(m(window.controlsColor)));var d=document.getElementsByClassName("vjs-time-control");e.liveVideo&&d[0]&&(d[0].style.display="none")}(l,e),function(l,e){var o,u,m,c,h,f;0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());e.liveVideo||t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&a(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&r(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&s(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&d(l,e)}(l,e),j(l,e)}export{k as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,o as n,p as t,q as o}from"./features-bf71fd6e.js";import{g as r,t as a,p as i}from"./skin-b8df984d.js";import{a as l,i as s,b as d}from"./index-00f19cbd.js";import{i as u}from"./browser-d4613b36.js";import"videojs-contrib-quality-menu";import c from"video.js";import{k as p,i as v}from"./keyboardShortcuts-5d743be0.js";import{l as m,R as f,e as y}from"./generic-35152f51.js";import b from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import g from"@babel/runtime/helpers/defineProperty";import S from"@babel/runtime/helpers/asyncToGenerator";import j from"@babel/runtime/regenerator";import{I as k}from"./icons-3bd3bd8f.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-aa307468.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-b3f361d9.js";import"./util-1c8c0f16.js";import"@babel/runtime/helpers/typeof";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";function w(n,t){var o=r(n);o&&(o.on("loadeddata",(function(){var e,o,a,i,d;!function(e){var n=r(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable||null!==(o=window)&&void 0!==o&&null!==(a=o.app_data)&&void 0!==a&&null!==(i=a.appcmsMain)&&void 0!==i&&null!==(d=i.features)&&void 0!==d&&d.auto_play)||null!=t&&t.liveVideo||l(n,t),null!=t&&t.liveVideo||u()||s(n)})),o.one("play",(function(){var t,o,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.iframeOverlayUrl&&e(n,null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.iframeOverlayUrl)})))}function I(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 O(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)?O(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 a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function T(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(){return x=S(j.mark((function e(n,t){var o,l,s,d,u,c,v,y,g,w,O,T,x,E,M,A,P,N,U;return j.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U=function(e,t,o){var a=r(n);Math.floor(a.currentTime());var i,l,s,d,u,c,p,v,m,f,y,b,h,g,S=I(t);try{for(S.s();!(i=S.n()).done;)l=void 0,s=void 0,d=void 0,u=void 0,c=void 0,p=void 0,v=void 0,m=void 0,f=void 0,y=void 0,b=void 0,h=void 0,g=void 0,c=i.value,p=c.eventType,v=c.beaconUrls,m=c.startTimeInSeconds,f=c.startTime,y=c.durationInSeconds,b=Math.round(m),h=v[0],g=(null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,b!=Math.round(a.currentTime())||N.has(f)||(N.set(f,!0),"function"==typeof g&&g({adsData:{eventType:p,startTimeInSeconds:m,startTime:f,durationInSeconds:y,ad:null==e||null===(u=e.ads)||void 0===u?void 0:u[o],adIndex:o}}),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",p,"Fired:".concat(Math.round(a.currentTime())),"AD_POD:",e),fetch(h))}catch(e){S.e(e)}finally{S.f()}},P=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},M=function(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=I(t.split("&"));try{for(r.s();!(o=r.n()).done;){var a=o.value.split("="),i=h(a,2),l=i[0],s=i[1];n[decodeURIComponent(l)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},u=0,c=Object.entries(n);u<c.length;u++){var p=h(c[u],2),v=p[0],m=p[1];if(v.startsWith("ads."))d[v.replace(/^ads\./,"")]=m;else d[v]=m}return d},o=r(n),l=t.replace("dash","session").replace("master","session"),l=f(l,n,{}),s=M(l),l=l.split("?")[0],e.next=10,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:C({},s)})});case 10:return d=e.sent,e.next=13,d.json();case 13:u=e.sent,c="https://"+new URL(l).hostname,v=u.trackingUrl,y=u.manifestUrl,g=c+v,w=c+y,console.log("%c TRACKING URL","background: #bdf369; color: #000",g),null!=t&&t.includes(".mpd")?(T=(null==o||null===(O=o.currentSource())||void 0===O?void 0:O.keySystemOptions)||null,m(n,{src:w,type:"application/x-mpegURL",keySystemOptions:T})):(E=(null==o||null===(x=o.currentSource())||void 0===x?void 0:x.keySystems)||null,m(n,{src:w,type:"application/x-mpegURL",keySystems:E})),o.one("loadeddata",(function(){A(g)})),A=function(){var e=S(j.mark((function e(t){var o,l,s,d,u,c,v,m,f,y,h,g,S,w,I,O,T;return j.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return l=e.sent,e.next=5,l.json();case 5:s=e.sent,d=s.avails,u=[],c=r(n),v=c.controlBar.progressControl,m=v.seekBar.el(),d.map((function(e){var n;Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&u.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)})})),u.forEach((function(e){var n=e.markerPositionInSeconds,t=c.duration();if(!(n>t)){var o=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(o,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(o,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),f=new Map,y=-1,c.on("timeupdate",a((function(){var e=Math.floor(c.currentTime());if(e!==y){y=e;for(var n=!1,t=function(){var t=r[o],a=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,s=Math.floor(a+i);if(e>=a&&e<=s){n=!0,f.set(a,!0),p.disable(),v.el().style.visibility="hidden";for(var d=e-a,u=0,c=0,m=0;m<l.length;m++){var y,g=null==l||null===(y=l[m])||void 0===y?void 0:y.durationInSeconds;if(d<u+g){c=m;break}u+=g}var S=l[c],j=d-u,k=Math.max(0,S.durationInSeconds-j),w=Math.round(k);h.style.display="block",O.textContent="".concat(c+1," of ").concat(l.length," • ").concat(P(w));var I=[];return l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));I.push.apply(I,b(n))})),U(t,I,c),"break"}},o=0,r=u;o<r.length;o++){if("break"===t())break}n||(h.style.display="none",v.el().style.visibility="visible",p.enable())}}),1e3)),c.on("seeked",(function(){for(var e=null,n=0,t=u;n<t.length;n++){var o=t[n],r=null==c?void 0:c.currentTime(),a=o.startTimeInSeconds,i=o.durationInSeconds;r>Math.floor(a+i)&&!f.has(a)&&(e=a,f.set(a,!0))}e&&(c.currentTime(e),console.log("seeking back to",e),e=null)})),(h=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(S=document.createElement("div")).className="sponsored-text",S.textContent="Sponsored Ad",(w=document.createElement("div")).className="ad-info-icon",I=i(k()),w.appendChild(I),g.append(S),g.append(w),(O=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(T=document.createElement("div")).className="ad-visit-advertiser",T.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(T.style.right="8.6rem"),h.append(g),h.append(O),h.append(T),c.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=new Map;case 24:case"end":return e.stop()}}),e)}))),x.apply(this,arguments)}function E(e,a){r(e).addClass("skin_vlone"),w(e,a),function(e,r){var a,i,l,s,u,c,p=null==r||null===(a=r.res)||void 0===a||null===(i=a.video)||void 0===i?void 0:i.isSSAIEnabled,m=y(null==r?void 0:r.res,e),f=m.src;(null==r||null===(l=r.relatedVideos)||void 0===l||null===(s=l.content)||void 0===s?void 0:s.length)>0&&n(e,null==r?void 0:r.relatedVideos);null!=r&&null!==(u=r.series)&&void 0!==u&&u.enable&&t(e,r);(null==r||null===(c=r.streams)||void 0===c?void 0:c.length)>1&&o(e,null==r?void 0:r.streams);d(e,r),v(e,r),p&&function(e,n){x.apply(this,arguments)}(e,f)}(e,a),M()}var M=function(){var e,n,t,o,r,a,i,l,s,d,u,p,v=c.dom.$(".vjs-play-progress"),m=c.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");m&&(m.style.color="".concat(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(o=t.brand)||void 0===o||null===(r=o.cta)||void 0===r||null===(a=r.primary)||void 0===a?void 0:a.backgroundColor)),v&&(v.style.background="".concat(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.brand)||void 0===d||null===(u=d.cta)||void 0===u||null===(p=u.primary)||void 0===p?void 0:p.backgroundColor))};export{E as initialiseSkin};
|
|
1
|
+
import{h as e,o as n,p as t,q as o}from"./features-e4c04012.js";import{g as r,t as a,p as i}from"./skin-b8df984d.js";import{a as l,i as s,b as d}from"./index-530ca330.js";import{i as u}from"./browser-d4613b36.js";import"videojs-contrib-quality-menu";import c from"video.js";import{k as p,i as v}from"./keyboardShortcuts-4d65af9c.js";import{l as m,R as f,e as y}from"./generic-919025fc.js";import b from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import g from"@babel/runtime/helpers/defineProperty";import S from"@babel/runtime/helpers/asyncToGenerator";import j from"@babel/runtime/regenerator";import{I as k}from"./icons-3bd3bd8f.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-aa307468.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-c475592c.js";import"./util-1c8c0f16.js";import"@babel/runtime/helpers/typeof";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";function w(n,t){var o=r(n);o&&(o.on("loadeddata",(function(){var e,o,a,i,d;!function(e){var n=r(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable||null!==(o=window)&&void 0!==o&&null!==(a=o.app_data)&&void 0!==a&&null!==(i=a.appcmsMain)&&void 0!==i&&null!==(d=i.features)&&void 0!==d&&d.auto_play)||null!=t&&t.liveVideo||l(n,t),null!=t&&t.liveVideo||u()||s(n)})),o.one("play",(function(){var t,o,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.iframeOverlayUrl&&e(n,null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.iframeOverlayUrl)})))}function I(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 O(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)?O(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 a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function T(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 C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(){return x=S(j.mark((function e(n,t){var o,l,s,d,u,c,v,y,g,w,O,T,x,E,M,A,P,N,U;return j.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U=function(e,t,o){var a=r(n);Math.floor(a.currentTime());var i,l,s,d,u,c,p,v,m,f,y,b,h,g,S=I(t);try{for(S.s();!(i=S.n()).done;)l=void 0,s=void 0,d=void 0,u=void 0,c=void 0,p=void 0,v=void 0,m=void 0,f=void 0,y=void 0,b=void 0,h=void 0,g=void 0,c=i.value,p=c.eventType,v=c.beaconUrls,m=c.startTimeInSeconds,f=c.startTime,y=c.durationInSeconds,b=Math.round(m),h=v[0],g=(null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,b!=Math.round(a.currentTime())||N.has(f)||(N.set(f,!0),"function"==typeof g&&g({adsData:{eventType:p,startTimeInSeconds:m,startTime:f,durationInSeconds:y,ad:null==e||null===(u=e.ads)||void 0===u?void 0:u[o],adIndex:o}}),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",p,"Fired:".concat(Math.round(a.currentTime())),"AD_POD:",e),fetch(h))}catch(e){S.e(e)}finally{S.f()}},P=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},M=function(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=I(t.split("&"));try{for(r.s();!(o=r.n()).done;){var a=o.value.split("="),i=h(a,2),l=i[0],s=i[1];n[decodeURIComponent(l)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},u=0,c=Object.entries(n);u<c.length;u++){var p=h(c[u],2),v=p[0],m=p[1];if(v.startsWith("ads."))d[v.replace(/^ads\./,"")]=m;else d[v]=m}return d},o=r(n),l=t.replace("dash","session").replace("master","session"),l=f(l,n,{}),s=M(l),l=l.split("?")[0],e.next=10,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:C({},s)})});case 10:return d=e.sent,e.next=13,d.json();case 13:u=e.sent,c="https://"+new URL(l).hostname,v=u.trackingUrl,y=u.manifestUrl,g=c+v,w=c+y,console.log("%c TRACKING URL","background: #bdf369; color: #000",g),null!=t&&t.includes(".mpd")?(T=(null==o||null===(O=o.currentSource())||void 0===O?void 0:O.keySystemOptions)||null,m(n,{src:w,type:"application/x-mpegURL",keySystemOptions:T})):(E=(null==o||null===(x=o.currentSource())||void 0===x?void 0:x.keySystems)||null,m(n,{src:w,type:"application/x-mpegURL",keySystems:E})),o.one("loadeddata",(function(){A(g)})),A=function(){var e=S(j.mark((function e(t){var o,l,s,d,u,c,v,m,f,y,h,g,S,w,I,O,T;return j.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return l=e.sent,e.next=5,l.json();case 5:s=e.sent,d=s.avails,u=[],c=r(n),v=c.controlBar.progressControl,m=v.seekBar.el(),d.map((function(e){var n;Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&u.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)})})),u.forEach((function(e){var n=e.markerPositionInSeconds,t=c.duration();if(!(n>t)){var o=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(o,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(o,"%"),r.style.pointerEvents="none",m.appendChild(r)}})),f=new Map,y=-1,c.on("timeupdate",a((function(){var e=Math.floor(c.currentTime());if(e!==y){y=e;for(var n=!1,t=function(){var t=r[o],a=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,s=Math.floor(a+i);if(e>=a&&e<=s){n=!0,f.set(a,!0),p.disable(),v.el().style.visibility="hidden";for(var d=e-a,u=0,c=0,m=0;m<l.length;m++){var y,g=null==l||null===(y=l[m])||void 0===y?void 0:y.durationInSeconds;if(d<u+g){c=m;break}u+=g}var S=l[c],j=d-u,k=Math.max(0,S.durationInSeconds-j),w=Math.round(k);h.style.display="block",O.textContent="".concat(c+1," of ").concat(l.length," • ").concat(P(w));var I=[];return l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));I.push.apply(I,b(n))})),U(t,I,c),"break"}},o=0,r=u;o<r.length;o++){if("break"===t())break}n||(h.style.display="none",v.el().style.visibility="visible",p.enable())}}),1e3)),c.on("seeked",(function(){for(var e=null,n=0,t=u;n<t.length;n++){var o=t[n],r=null==c?void 0:c.currentTime(),a=o.startTimeInSeconds,i=o.durationInSeconds;r>Math.floor(a+i)&&!f.has(a)&&(e=a,f.set(a,!0))}e&&(c.currentTime(e),console.log("seeking back to",e),e=null)})),(h=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(S=document.createElement("div")).className="sponsored-text",S.textContent="Sponsored Ad",(w=document.createElement("div")).className="ad-info-icon",I=i(k()),w.appendChild(I),g.append(S),g.append(w),(O=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(T=document.createElement("div")).className="ad-visit-advertiser",T.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(T.style.right="8.6rem"),h.append(g),h.append(O),h.append(T),c.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=new Map;case 24:case"end":return e.stop()}}),e)}))),x.apply(this,arguments)}function E(e,a){r(e).addClass("skin_vlone"),w(e,a),function(e,r){var a,i,l,s,u,c,p=null==r||null===(a=r.res)||void 0===a||null===(i=a.video)||void 0===i?void 0:i.isSSAIEnabled,m=y(null==r?void 0:r.res,e),f=m.src;(null==r||null===(l=r.relatedVideos)||void 0===l||null===(s=l.content)||void 0===s?void 0:s.length)>0&&n(e,null==r?void 0:r.relatedVideos);null!=r&&null!==(u=r.series)&&void 0!==u&&u.enable&&t(e,r);(null==r||null===(c=r.streams)||void 0===c?void 0:c.length)>1&&o(e,null==r?void 0:r.streams);d(e,r),v(e,r),p&&function(e,n){x.apply(this,arguments)}(e,f)}(e,a),M()}var M=function(){var e,n,t,o,r,a,i,l,s,d,u,p,v=c.dom.$(".vjs-play-progress"),m=c.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");m&&(m.style.color="".concat(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(t=n.appcmsMain)||void 0===t||null===(o=t.brand)||void 0===o||null===(r=o.cta)||void 0===r||null===(a=r.primary)||void 0===a?void 0:a.backgroundColor)),v&&(v.style.background="".concat(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.brand)||void 0===d||null===(u=d.cta)||void 0===u||null===(p=u.primary)||void 0===p?void 0:p.backgroundColor))};export{E as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-919025fc.js";import{e as c,s as m,f as u,j as p,k as v}from"./skin-b8df984d.js";import{a as h}from"./autoNextVideo-c475592c.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";import"./util-1c8c0f16.js";function b(e){var t=y();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var g=a.getComponent("Component"),C=function(n){o(y,g);var i=b(y);function y(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(d(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),u(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),u=function(e){var o,n,i,r,l,u=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(u,p),a.dom.appendContent(u,f),a.dom.appendContent(m,u),a.dom.appendContent(c,m)},h=0;h<this.videos.length;h++)u(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),p(this.playerId,e)}}]),y}();export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as l}from"./icons-3bd3bd8f.js";import{F as s,Q as d}from"./generic-919025fc.js";import{e as c,s as m,f as p,j as u,h as v,i as h}from"./skin-b8df984d.js";import{a as f}from"./autoNextVideo-c475592c.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-135a6d13.js";import"@babel/runtime/helpers/toConsumableArray";import"./util-1c8c0f16.js";function y(e){var t=C();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var g=a.getComponent("Component"),j=function(n){o(C,g);var i=y(C);function C(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,C),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(d(0),f({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(C,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open")};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p,u,f,b=a.dom.createEl("div",{className:"video -".concat(e)}),y=a.dom.createEl("div",{className:"recommended -".concat(e)});y.setAttribute("video-idx",e),y.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var C=document.createElement("img");C.className="related-thumbnail-image",C.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.appcmsMain)||void 0===l||null===(p=l.images)||void 0===p?void 0:p.placeholderCover)),C.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),y.append(C);var g=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(f=t.videos[e])||void 0===f?void 0:f.title)||"")});a.dom.appendContent(b,y),a.dom.appendContent(b,g),a.dom.appendContent(m,b),a.dom.appendContent(c,m)},f=0;f<this.videos.length;f++)p(f);a.dom.appendContent(n,r),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,c),u(this.playerId,e)}}]),C}();export{j as default};
|
package/package.json
CHANGED
package/cjs/generic-68f01105.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-34fbc337.js"),a=require("./browser-77c57718.js"),l=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-fbd6fefb.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"2.0.19",main:"dist/bundle.cjs.js",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","ua-parser-js":"^2.0.3","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=f.version;var w,g=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),h=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},T=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),b=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},_=null;function D(){return{set:function(e){e&&(_=e)},get:function(){return _}}}var O,F,S,P,R,L,V=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,C=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!b(t)){e.next=6;break}return W||(W=V().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},M=function(e){S=e},j=function(e){if(P){var t=P.get(e);M(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var G=0,z=function(){var e,t,n,i,o,r,a,l=N();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function q(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=Y(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),c("PLAY",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":z(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:q(),vid:z(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),vid:z()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),vid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:q(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:z()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(K(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var K=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p,f,w,g,I,E,h,T,y,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return E=e.sent,h=A(E),T=null==h?void 0:h.site,y=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:T,cid:y,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=q(),e.t5=z(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(f=p.beacon)||void 0===f?void 0:f.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g||null===(I=g.beacon)||void 0===I?void 0:I.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Q=function(){var e=U.get();return e>=0?e+1:1},Z=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var te=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ne=function(e){var t=ie(e,"video.tags",[]),n=ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ie=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},oe=function(){var e,t,n,i,o,a,d,u,s,c,v,m,p,f,w,g,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,h=arguments.length>2?arguments[2]:void 0,T=(null==h?void 0:h.contentType)||"video",y=null==h||null===(e=h[T])||void 0===e?void 0:e.metadata,b=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===T?null==h||null===(t=h.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==h?void 0:h.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ie(h,"video.gist.id",""),S=ee(ee({},re(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:te(O,D),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ie(h,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(u=b.options_)||void 0===u?void 0:u.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:ne(h),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ie(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ie(h,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ie(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ie(null===(m=window)||void 0===m||null===(p=m.app_data)||void 0===p||null===(f=p.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ie(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:ie(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ie(h,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ie(h,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Z(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:ne(h)},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var P in S){var R=new RegExp(P,"g");I=I.replace(R,S[P])}return I},re=function(e){var t,n,i,o,r,l,d={},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===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(a.isMobile()?s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=a.isMobile()?ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ee(ee({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},ae=function(e,t){var n,i,o,r,l,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,h=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var T=(null==e||null===(m=e[w])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return de(E);if(g){var y=ue(I,t);return y.src=oe(y.src,t,e),y}if("Safari"!==a.detectBrowser()&&T)return le(I);if(h){var b=de(I);return b.src=oe(b.src,t,e),b}if(null!=I&&I.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return _.src=oe(_.src,t,e),_}return null},le=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},de=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ue=function(e,t){var n=e.fairPlay,o=e.widevine,l=e.playReady,d=a.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return se(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(se(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var se=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ce=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ve=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var me=!1,pe=function(e,t,n){var i=oe(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r.getPlayer(e);if(null!==a.el_){me=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),me&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var we=function(e){return!!i.getPlayer("".concat(e))},ge=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,C();case 3:return a=e.sent,l=r.getPlayer(t),e.abrupt("return",new Promise((function(e,n){I(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=Y(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ae(r,t);x(r),a&&o?(he(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ie=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,s,c,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return s=e.sent,(B()||null)&&j(i),c=0,v=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&h(i,s).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){g(i,s).then((function(i){var o,a,l,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;x(i.data);var h=(null==I||null===(l=I.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);h&&pe(t,h,I);var T=ae(I,t);if(T){var y,b,_,D,O,F,S,P,R,L,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||(null==I||null===(_=I.video)||void 0===_||null===(D=_.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),he(t,T),B.on("loadstart",(function(){E&&e({status:!0,msg:"Video Loaded",response:I})})),B.on("loadeddata",(function(){ve(),e({status:!0,msg:"Video Loaded",response:I})})),B.one("play",(function(){c&&v<95&&setTimeout((function(){B.currentTime(c)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(F=I.video)||void 0===F||null===(S=F.contentDetails)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0||(null==I||null===(R=I.video)||void 0===R||null===(L=R.closedCaptions)||void 0===L?void 0:L.length)>0)V=((null==I||null===(W=I.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(A=I.video)||void 0===A?void 0:A.closedCaptions)).filter((function(e){return"VTT"===e.format})),u.addCaptions(t,V);else u.removeCaptions(t)}else ce(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Te(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Ee=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()},he=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},Te=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);we(n)&&ce(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=ge,exports.baseUrlManager=y,exports.clearError=ve,exports.createIdxMapping=function(e){P=new Map,e.map((function(e,t){P.set(e.id,t)}))},exports.createSeriesWatchMap=function(e,t){var n=new Map;T({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),R=n})).catch((function(e){return console.log(e)}))},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Ee(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getEntitlementData=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=Z,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,t){var n,i,r=A(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=T,exports.getSeriesWatchMap=function(){return R},exports.getSource=ae,exports.getToken=C,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=q,exports.getVideoDetails=g,exports.getVideoIdx=function(){return S},exports.getVideoInfo=h,exports.handleError=ce,exports.initialiseAdvertisement=pe,exports.initiateErrorHandling=Te,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=we,exports.isTokenExpired=b,exports.load=Ie,exports.loadVideo=he,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=oe,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=M,exports.setVideoIdxById=j,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
package/esm/generic-35152f51.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-b8df984d.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-135a6d13.js";function m(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,t){m("event",e,t)}var w={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function I(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?E(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):E(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var g={name:"@viewlift/player",version:"2.0.19",main:"dist/bundle.cjs.js",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","ua-parser-js":"^2.0.3","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=g.version;var T,h=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:I({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":g.version},withCredentials:!0})},y=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F.get()+w.getLinearChannelDetails,params:I(I(I(I(I({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},b=function(e,t){var n,i,r=x(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},_=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:I({},t),params:I({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},D=function(e){var t=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),R=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},S=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},P=null;function L(){return{set:function(e){e&&(P=e)},get:function(){return P}}}var W,A,V,C,N,j,B=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L().get(),i=F.get(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);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,U=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!S(t)){e.next=6;break}return M||(M=B().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){M=null}))),e.abrupt("return",M);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){A=e},G=function(){return A},z=function(e){W=e},Y=function(){return W},X=function(){return V},q=function(e){V=e},J=function(){return N},K=function(e){C=new Map,e.map((function(e,t){C.set(e.id,t)}))},Q=function(e){if(C){var t=C.get(e);q(t+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var te=0,ne=function(){var e,t,n,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null}),100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":ne(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&te<4)te++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ne()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(te=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(le(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var le=function(e,t,n){return e>=t&&e<=n};function de(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}}window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f,p,w,E,I,g,T,h,y,b;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return g=e.sent,T=x(g),h=null==T?void 0:T.site,y=null==T?void 0:T.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:h,cid:y,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,re();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(w=window)||void 0===w||null===(E=w.customData)||void 0===E||null===(I=E.beacon)||void 0===I?void 0:I.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ue=function(e,t){var n=new Map;D({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),N=n})).catch((function(e){return console.log(e)}))},se=function(){var e=Z.get();return e>=0?e+1:1},ce=function(){var e,t,n,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function me(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=s(navigator.userAgent);var fe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},we=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Ee=function(){var e,t,n,i,o,a,l,d,s,c,v,m,f,p,w,E,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",g=arguments.length>1?arguments[1]:void 0,T=arguments.length>2?arguments[2]:void 0,h=(null==T?void 0:T.contentType)||"video",y=null==T||null===(e=T[h])||void 0===e?void 0:e.metadata,b=r(g);if(!I.includes("VIEWLIFT_"))return I;var _=window.getComputedStyle(document.getElementById(g),null),O=Math.trunc(_.getPropertyValue("height").slice(0,-2)),D=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===h?null==T||null===(t=T.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==T?void 0:T.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:we(T,"video.gist.id",""),R=me(me({},Ie(y)),{},{VIEWLIFT_WIDTH:D,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:fe(D,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(l=b.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(T),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+we(T,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:we(null===(m=window)||void 0===m||null===(f=m.app_data)||void 0===f||null===(p=f.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:we(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:we(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(T,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ce(),VIEWLIFT_SEASON_NUMBER:se(),VIEWLIFT_CONTENT_TAGS:pe(T)},null===(w=window)||void 0===w||null===(E=w.customData)||void 0===E?void 0:E.macros);for(var S in R){var P=new RegExp(S,"g");I=I.replace(P,R[S])}return I},Ie=function(e){var t,n,i,o,r,a,d={},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===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=l()?me(me({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):me(me({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=l()?me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):me(me({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},ge=function(e,t){var n,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",E=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,g=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||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===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.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!=g&&g.hls)return he(g);if(E){var y=ye(I,t);return y.src=Ee(y.src,t,e),y}if("Safari"!==d()&&h)return Te(I);if(T){var b=he(I);return b.src=Ee(b.src,t,e),b}if(null!=I&&I.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return _.src=Ee(_.src,t,e),_}return null},Te=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},he=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ye=function(e,t){var n=e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(t),"Safari"===l){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return be(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},_e=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Oe=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},De=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Fe=!1,Re=function(e,t,n){var i=Ee(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r(e);if(null!==a.el_){Fe=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Fe&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Pe=function(e){i(e).play()},Le=function(e){i(e).pause()},We=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ae=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ve=function(e){return!!i.getPlayer("".concat(e))},Ce=function(e){return i(e).paused()},Ne=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,U();case 3:return a=e.sent,l=r(t),e.abrupt("return",new Promise((function(e,n){y(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ge(r,t);H(r),a&&o?(ke(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),je=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,u,s,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return u=e.sent,(Y()||null)&&Q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&O(i,u).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){h(i,u).then((function(i){var o,a,l,d,u,f,p,w,E,I,g=null==i?void 0:i.data,T=(null==g||null===(o=g.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==g||null===(l=g.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==g||null===(p=g.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(E=w.adTags)||void 0===E||null===(I=E.web)||void 0===I?void 0:I.url);h&&Re(t,h,g);var y=ge(g,t);if(y){var b,_,O,D,F,R,S,P,L,W,A,V,C,N,j=(null==g||null===(b=g.video)||void 0===b||null===(_=b.gist)||void 0===_?void 0:_.videoImageUrl)||(null==g||null===(O=g.video)||void 0===O||null===(D=O.gist)||void 0===D||null===(F=D.imageGist)||void 0===F?void 0:F.r16x9),B=r(t);if(B.poster(j),ke(t,y),B.on("loadstart",(function(){T&&e({status:!0,msg:"Video Loaded",response:g})})),B.on("loadeddata",(function(){De(),e({status:!0,msg:"Video Loaded",response:g})})),B.one("play",(function(){s&&m<95&&setTimeout((function(){B.currentTime(s)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(R=g.video)||void 0===R||null===(S=R.contentDetails)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0||(null==g||null===(L=g.video)||void 0===L||null===(W=L.closedCaptions)||void 0===W?void 0:W.length)>0)A=((null==g||null===(V=g.video)||void 0===V||null===(C=V.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==g||null===(N=g.video)||void 0===N?void 0:N.closedCaptions)).filter((function(e){return"VTT"===e.format})),c(t,A);else v(t)}else Oe(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){xe(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Be=function(e,t,n){var i=r(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},Me=function(e){var t=r(e);if(Ue(),a(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},Ue=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()},ke=function(e,t){var n=r(e);n&&n.src(t)},xe=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Ve(n)&&Oe(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Se(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Se(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},He=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{We as A,Pe as B,Le as C,Ae as D,Ve as E,je as F,Ne as G,Me as H,R as I,F as J,k as K,L,S as M,f as N,X as O,Ce as P,q as Q,Ee as R,D as S,K as T,Q as U,oe as a,ce as b,Y as c,se as d,ge as e,H as f,G as g,De as h,Oe as i,J as j,de as k,ke as l,Re as m,_e as n,He as o,h as p,O as q,xe as r,_ as s,U as t,y as u,b as v,ue as w,Z as x,z as y,Be as z};
|