@viewlift/player-backup 2.0.19-backup → 2.0.20-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-0cf4e98c.js → autoNextVideo-38ff5be2.js} +1 -1
- package/cjs/bundle.css +16 -1
- package/cjs/{features-ea71ea9f.js → features-08160f6b.js} +1 -1
- package/cjs/generic-e66dbbab.js +1 -0
- package/cjs/index-fea840b7.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-c4e15dc2.js → keyboardShortcuts-059c7f2e.js} +1 -1
- package/cjs/{multicamv2-88fa763b.js → multicamv2-7e4600ff.js} +1 -1
- package/cjs/{multicamv2-e306f7f9.js → multicamv2-da716283.js} +1 -1
- package/cjs/{nextEpisodeButton-9416798d.js → nextEpisodeButton-4b98787e.js} +1 -1
- package/cjs/{playlist-64c1725c.js → playlist-a6685f10.js} +1 -1
- package/cjs/{series-b135e84b.js → series-36f02809.js} +1 -1
- package/cjs/{series-v2-acb7ebe2.js → series-v2-4033b179.js} +1 -1
- package/cjs/{series-v2-abb428aa.js → series-v2-fd57f817.js} +1 -1
- package/cjs/{skin-490c5558.js → skin-12cbe798.js} +1 -1
- package/cjs/{skin-41c85d3a.js → skin-4c4eb311.js} +1 -1
- package/cjs/{skin-1db1d332.js → skin-6f31d5a1.js} +1 -1
- package/cjs/{skin-69e3f0b0.js → skin-7f854307.js} +1 -1
- package/cjs/{skin-c6027bde.js → skin-9db0445f.js} +1 -1
- package/cjs/{skin-d1a3883e.js → skin-dfbd22b7.js} +1 -1
- package/cjs/{videoSelector-05e61894.js → videoSelector-220ff0f9.js} +1 -1
- package/cjs/{videoSelector-6c4235d7.js → videoSelector-60a7fb27.js} +1 -1
- package/esm/{autoNextVideo-2f1cd9c0.js → autoNextVideo-2becef90.js} +1 -1
- package/esm/bundle.css +16 -1
- package/esm/{caption-settings-006b2c1e.js → caption-settings-01ea9cd7.js} +1 -1
- package/esm/{features-fa983247.js → features-fada03dd.js} +1 -1
- package/esm/generic-777b1c46.js +1 -0
- package/esm/{icons-3bd3bd8f.js → icons-8e47e640.js} +1 -1
- package/esm/index-02a018e9.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-cea17c9b.js → keyboardShortcuts-42facba3.js} +1 -1
- package/esm/{multicamv2-152200b5.js → multicamv2-432edafa.js} +1 -1
- package/esm/{multicamv2-b69c7fe9.js → multicamv2-fd94f8fe.js} +1 -1
- package/esm/{nextEpisodeButton-3deff1db.js → nextEpisodeButton-94569533.js} +1 -1
- package/esm/{playlist-6c45d87c.js → playlist-c384f2a8.js} +1 -1
- package/esm/{series-9a50d502.js → series-4c06c67c.js} +1 -1
- package/esm/series-v2-0f15e8fc.js +1 -0
- package/esm/{series-v2-c5214254.js → series-v2-1455370e.js} +1 -1
- package/esm/{settings-icon-b8f0ec18.js → settings-icon-73ca5775.js} +1 -1
- package/esm/{skin-362f72ec.js → skin-0f6936a2.js} +1 -1
- package/esm/{skin-bdd082e5.js → skin-12b21e1b.js} +1 -1
- package/esm/{skin-508d476e.js → skin-28eda21a.js} +1 -1
- package/esm/{skin-559a2709.js → skin-3acd738f.js} +1 -1
- package/esm/{skin-28dedec7.js → skin-d0064a44.js} +1 -1
- package/esm/{skin-395fca4e.js → skin-d9a6f07f.js} +1 -1
- package/esm/{videoSelector-8a2e825b.js → videoSelector-7837e131.js} +1 -1
- package/esm/{videoSelector-13a249c5.js → videoSelector-85df56c7.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-e8975a66.js +0 -1
- package/cjs/index-9ec5b6d6.js +0 -1
- package/esm/generic-16b6151a.js +0 -1
- package/esm/index-e27c516e.js +0 -1
- package/esm/series-v2-c267885e.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 i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{
|
|
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 i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as r,e as d,B as c}from"./icons-8e47e640.js";import{j as u,U as m,V as v,b as p,y as h,G as f}from"./generic-777b1c46.js";import{e as C,s as b,p as y,j as g,g as N,i as E}from"./skin-b8df984d.js";import{a as k}from"./autoNextVideo-2becef90.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 S(e){var t=L();return function(){var s,o=l(e);if(t){var i=l(this).constructor;s=Reflect.construct(o,arguments,i)}else s=o.apply(this,arguments);return n(this,s)}}function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}var j=a.getComponent("Component"),x=function(n){i(L,j);var l=S(L);function L(s){var i,n,a,r,d,c,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(c=l.call(this,s,p)).playerId=p.playerId,c.seriesData=p.sres,c.videos=null==p||null===(i=p.sres)||void 0===i?void 0:i.seasons,c.currentVideoData=p.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==p||null===(n=p.series)||void 0===n?void 0:n.cb,c.autoPlayNext=(null==p||null===(a=p.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!=p&&null!==(d=p.series)&&void 0!==d&&d.enable){var h,f,C,b,y=null==p||null===(h=p.sres)||void 0===h?void 0:h.seasons,g=[];y.map((function(t){g.push.apply(g,e(t.episodes))})),m(g),v(null===(f=c.options_)||void 0===f||null===(C=f.res)||void 0===C||null===(b=C.video)||void 0===b?void 0:b.id),k({playerId:c.playerId,content:g,cb:c.cb,series:null==p?void 0:p.sres})}return c}return s(L,[{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-8a8b6f0c.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"),b(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{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 i=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(i,"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"}),i=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),s.classList.remove("open");else if("series-selector-back-icon"===i.className){var o=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=t.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var l=y(d());i.appendChild(l)}};var n=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,i),a.dom.appendContent(o,n),a.dom.appendContent(e,o),a.dom.appendContent(e,l),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;N(this.playerId);for(var t=p(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var i,n=document.createElement("label");n.className="season-holder",n.setAttribute("for","season-".concat(o));var l=document.createElement("div");l.className="season - ".concat(o),l.textContent=null===(i=t[o])||void 0===i?void 0:i.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(n,r),a.dom.appendContent(n,l),a.dom.appendContent(s,n)},i=0;i<t.length;i++)o(i);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,i,n,l,a,r,d,c;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===(i=s.imageGist)||void 0===i?void 0:i.r16x9)||(null===(n=window)||void 0===n||null===(l=n.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var i=function(i){var n,l,r,d,c,u=a.dom.createEl("div",{className:"series-container"}),m=a.dom.createEl("div",{className:"series-section-data",index:i,innerHTML:"".concat((null===(n=t[i])||void 0===n?void 0:n.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[i])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=a.dom.createEl("div",{className:"series-section-image"}),h=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var C=a.dom.createEl("img",{className:"series-image"});C.src="".concat(E(null===(c=t[i])||void 0===c?void 0:c.img)),C.alt="Episode ".concat(i+1),a.dom.appendContent(p,C),a.dom.appendContent(u,p),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){var s;e.stopPropagation(),v(null===(s=t[i])||void 0===s?void 0:s.id),f(o.playerId,t[i].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))},m.onclick=function(t){var s,o,i,n=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(n=e(n))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(i=l.classList)||void 0===i||i.add("hidden"),u.style.backgroundColor="unset")}},n=0;n<t.length;n++)i(n);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=p()[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 i=y(c());o.appendChild(i),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{g as r,
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{g as r,e as d,T as s}from"./icons-8e47e640.js";import{e as c,s as u,f as p,j as m,g as v,d as h,p as f}from"./skin-b8df984d.js";import{g}from"./renditions-aa307468.js";import{playSelectedResolution as y}from"./resolution-e9c353f4.js";import{g as C}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/defineProperty";import"./browser-d4613b36.js";function b(e){var t=E();return function(){var a,n=o(e);if(t){var l=o(this).constructor;a=Reflect.construct(n,arguments,l)}else a=n.apply(this,arguments);return i(this,a)}}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}var N=l.getComponent("Component"),k=function(i){n(E,N);var o=b(E);function E(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,E),(a=o.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(E,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=l.dom.createEl("div",{className:"selection-container hidden"});l.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),l.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=l.dom.createEl("div",{className:"settings-selector-head"}),n=l.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=l.dom.createEl("div",{className:"settings-selector-title",innerHTML:C("settingsTitle")||"Settings"}),o=l.dom.createEl("div",{className:"settings-selector-content"}),r=l.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();l.dom.appendContent(r,s);var c=this.createAudioQualityContainer();l.dom.appendContent(r,c),l.dom.appendContent(a,n),l.dom.appendContent(a,i),l.dom.appendContent(e,a),l.dom.appendContent(e,o),l.dom.appendContent(o,r),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=v(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=l.dom.createEl("div",{className:"audio-language-container"}),n=l.dom.createEl("div",{className:"audio-language-container-title",innerHTML:C("audioLanguageText")||"Audio Language"});l.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var r=l.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});r.setAttribute("type","radio"),1==t[e].enabled&&(r.checked=!0),r.onchange=function(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},l.dom.appendContent(i,r),l.dom.appendContent(i,o),l.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=l.dom.createEl("div",{className:"video-quality-container"}),n=l.dom.createEl("div",{className:"video-quality-container-title",innerHTML:C("videoQualityText")||"Video Quality"});l.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o,r,d=document.createElement("label"),c=document.createElement("div"),u=document.createElement("div");u.className="video-quality-bitrate-label",c.className="video-quality-holder",d.className="video-quality-label-container",d.setAttribute("for","quality".concat(e));var p=document.createElement("div");p.className="video-quality - ".concat(e);var m=(null==i||null===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),v=document.createTextNode(m),g="".concat(t.isEnhancedBitrate(i[e])?C("enhancedBitrateLabel")||"Enhanced Bitrate":""),b=document.createTextNode(g);if(u.appendChild(b),p.appendChild(v),(null==i||null===(r=i[e])||void 0===r?void 0:r.height)>=720)for(var E=h("<span class='hd-rendition'> HD </span>");null!=E&&E.firstChild;)p.appendChild(E.firstChild);var N=l.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});N.setAttribute("type","radio"),N.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var k=document.createElement("span");k.className=g?"check-mark center":"check-mark";var I=f(s());k.appendChild(I),c.appendChild(N),c.appendChild(k),c.appendChild(p),l.dom.appendContent(d,c),d.appendChild(u),l.dom.appendContent(a,d)},r=0;r<i.length;r++)o(r);return a}}]),E}();export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,o as n,p as t,q as o}from"./features-fa983247.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-e27c516e.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-cea17c9b.js";import{l as m,R as f,e as y}from"./generic-16b6151a.js";import b from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import g from"@babel/runtime/helpers/defineProperty";import k from"@babel/runtime/helpers/asyncToGenerator";import S from"@babel/runtime/regenerator";import{I as j}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-2f1cd9c0.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 C(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 I(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)?I(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 I(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 O(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 T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(){return x=k(S.mark((function e(n,t){var o,l,s,d,u,c,v,y,g,w,I,O,x,E,M,A,B,P,N;return S.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N=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,k=C(t);try{for(k.s();!(i=k.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())||P.has(f)||(P.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){k.e(e)}finally{k.f()}},B=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=C(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:T({},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")?(O=(null==o||null===(I=o.currentSource())||void 0===I?void 0:I.keySystemOptions)||null,m(n,{src:w,type:"application/x-mpegURL",keySystemOptions:O})):(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=k(S.mark((function e(t){var o,l,s,d,u,c,v,m,f,y,h,g,k,w,C,I,O;return S.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 k=l[c],S=d-u,j=Math.max(0,k.durationInSeconds-S),w=Math.round(j);h.style.display="block",I.textContent="".concat(c+1," of ").concat(l.length," • ").concat(B(w));var C=[];return l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));C.push.apply(C,b(n))})),N(t,C,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",(k=document.createElement("div")).className="sponsored-text",k.textContent="Sponsored Ad",(w=document.createElement("div")).className="ad-info-icon",C=i(j()),w.appendChild(C),g.append(k),g.append(w),(I=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(O=document.createElement("div")).className="ad-visit-advertiser",O.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(O.style.right="8.6rem"),h.append(g),h.append(I),h.append(O),c.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=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(e,a)}var M=function(e,n){var t,o,a,i,l,s,d,u,p,v,m,f,y=r(e),b=(null==n?void 0:n.theme)||{},h=c.dom.$(".vjs-play-progress"),g=c.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(t=window)||void 0===t||null===(o=t.app_data)||void 0===o||null===(a=o.appcmsMain)||void 0===a||null===(i=a.brand)||void 0===i||null===(l=i.cta)||void 0===l||null===(s=l.primary)||void 0===s?void 0:s.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(p=u.appcmsMain)||void 0===p||null===(v=p.brand)||void 0===v||null===(m=v.cta)||void 0===m||null===(f=m.primary)||void 0===f?void 0:f.backgroundColor));var k=y.getChild("BigPlayButton")||null;(null==b?void 0:b.progressBarColor)&&h&&(h.style.background=b.progressBarColor),(null==b?void 0:b.playButtonBackgroundColor)&&k&&(k.el().style.background=b.playButtonBackgroundColor),(null==b?void 0:b.playButtonColor)&&g&&(g.style.color=b.playButtonColor),(null==b?void 0:b.playButtonType)&&("square"==(null==b?void 0:b.playButtonType)?k.el().style.borderRadius=".3em":k.el().style.borderRadius="1.3em")};export{E as initialiseSkin};
|
|
1
|
+
import{h as e,o as n,p as t,q as o}from"./features-fada03dd.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-02a018e9.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-42facba3.js";import{l as m,S as f,e as y}from"./generic-777b1c46.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 k from"@babel/runtime/regenerator";import{I as j}from"./icons-8e47e640.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-2becef90.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 C(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 I(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)?I(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 I(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 O(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 T(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){g(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function x(){return x=S(k.mark((function e(n,t){var o,l,s,d,u,c,v,y,g,w,I,O,x,E,M,A,B,P,N;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N=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=C(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())||P.has(f)||(P.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()}},B=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=C(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:T({},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")?(O=(null==o||null===(I=o.currentSource())||void 0===I?void 0:I.keySystemOptions)||null,m(n,{src:w,type:"application/x-mpegURL",keySystemOptions:O})):(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(k.mark((function e(t){var o,l,s,d,u,c,v,m,f,y,h,g,S,w,C,I,O;return k.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],k=d-u,j=Math.max(0,S.durationInSeconds-k),w=Math.round(j);h.style.display="block",I.textContent="".concat(c+1," of ").concat(l.length," • ").concat(B(w));var C=[];return l.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));C.push.apply(C,b(n))})),N(t,C,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",C=i(j()),w.appendChild(C),g.append(S),g.append(w),(I=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(O=document.createElement("div")).className="ad-visit-advertiser",O.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(O.style.right="8.6rem"),h.append(g),h.append(I),h.append(O),c.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=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(e,a)}var M=function(e,n){var t,o,a,i,l,s,d,u,p,v,m,f,y=r(e),b=(null==n?void 0:n.theme)||{},h=c.dom.$(".vjs-play-progress"),g=c.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(t=window)||void 0===t||null===(o=t.app_data)||void 0===o||null===(a=o.appcmsMain)||void 0===a||null===(i=a.brand)||void 0===i||null===(l=i.cta)||void 0===l||null===(s=l.primary)||void 0===s?void 0:s.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(p=u.appcmsMain)||void 0===p||null===(v=p.brand)||void 0===v||null===(m=v.cta)||void 0===m||null===(f=m.primary)||void 0===f?void 0:f.backgroundColor));var S=y.getChild("BigPlayButton")||null;(null==b?void 0:b.progressBarColor)&&h&&(h.style.background=b.progressBarColor),(null==b?void 0:b.playButtonBackgroundColor)&&S&&(S.el().style.background=b.playButtonBackgroundColor),(null==b?void 0:b.playButtonColor)&&g&&(g.style.color=b.playButtonColor),(null==b?void 0:b.playButtonType)&&("square"==(null==b?void 0:b.playButtonType)?S.el().style.borderRadius=".3em":S.el().style.borderRadius="1.3em")};export{E 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-fada03dd.js";import{M as u,a as m,c as v,d as p}from"./icons-8e47e640.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-02a018e9.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-777b1c46.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-2becef90.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{
|
|
1
|
+
import{C as r,D as e}from"./generic-777b1c46.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{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-fada03dd.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-777b1c46.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{
|
|
1
|
+
import{C as e,D as t}from"./generic-777b1c46.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{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-fada03dd.js";import{i as n}from"./keyboardShortcuts-42facba3.js";import{S as r,M as l,a,N as d,b as m,R as u}from"./icons-8e47e640.js";import{g as p,b as c}from"./skin-b8df984d.js";import{d as b}from"./generic-777b1c46.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-94569533.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 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,
|
|
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,e as l}from"./icons-8e47e640.js";import{G as s,R as d}from"./generic-777b1c46.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-2becef90.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{
|
|
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{f as r,e as l}from"./icons-8e47e640.js";import{G as s,R as d}from"./generic-777b1c46.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-2becef90.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-e8975a66.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",getBeaconUrl:"/analytics/player-beacon"};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.27",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)}}(),T=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})},h=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}}),_=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},b=null;function D(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var O,F,P,S,R,L,V=function(){var e=t(n.mark((function e(){var t,i,r;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,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),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"))||!_(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){P=e},j=function(e){if(S){var t=S.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,Y=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 q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function z(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),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=q(),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:z(),vid:Y(),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:z(),vid:Y(),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":Y(),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:z(),vid:Y(),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:z(),vid:Y()},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:z(),vid:Y(),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:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Y()},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,m,p,f,w,g,I,E,T,h,_,b,D;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return T=e.sent,h=A(T),_=null==h?void 0:h.site,b=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:_,cid:b,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=z(),e.t5=Y(),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!==(m=t.bufferHealth)&&void 0!==m?m: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===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t31=(0,e.t0)(e.t29,e.t30),D=[e.t31],o({url:(null===(g=window)||void 0===g||null===(I=g.customData)||void 0===I||null===(E=I.beacon)||void 0===E?void 0:E.url)||y.get()+v.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:D}).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,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,_=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var b,D=window.getComputedStyle(document.getElementById(E),null),O=Math.trunc(D.getPropertyValue("height").slice(0,-2)),F=Math.trunc(D.getPropertyValue("width").slice(0,-2)),P="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:ie(T,"video.gist.id",""),S=null,R=null;"function"==typeof window.__gpp&&(null===(b=window)||void 0===b||b.__gpp("ping",(function(e){S=null==e?void 0:e.gppString,R=null==e?void 0:e.sectionList[0]})));var L=ee(ee({},re(y)),{},{VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:te(F,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:ie(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==_||null===(d=_.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==_||null===(u=_.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(T),VIEWLIFT_MEDIA_ID:P,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ie(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:P,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ie(T,"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(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ie(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:P,VIEWLIFT_CONTENT_TITLE:ie(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ie(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ie(T,"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(T),VIEWLIFT_GPP_SID:R||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:S||"VIEWLIFT_GPP"},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var V in L){var W=new RegExp(V,"g");I=I.replace(W,L[V])}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")||u.get("sfid.web.dtc")||""}):c&&(d=ee(ee({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.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")||u.get("sfid.web.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,T=(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 h=(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()&&h)return le(I);if(T){var _=de(I);return _.src=oe(_.src,t,e),_}if(null!=I&&I.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return b.src=oe(b.src,t,e),b}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=q(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=ae(r,t);x(r),a&&o?(Te(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&&T(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 T=(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);T&&pe(t,T,I);var h=ae(I,t);if(h){var y,_,b,D,O,F,P,S,R,L,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(_=y.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(b=I.video)||void 0===b||null===(D=b.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),Te(t,h),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===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.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){he(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()},Te=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},he=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){S=new Map,e.map((function(e,t){S.set(e.id,t)}))},exports.createSeriesWatchMap=function(e,t){var n=new Map;h({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=h,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=z,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=T,exports.handleError=ce,exports.initialiseAdvertisement=pe,exports.initiateErrorHandling=he,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=_,exports.load=Ie,exports.loadVideo=Te,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/cjs/index-9ec5b6d6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./skin-34fbc337.js"),a=require("./generic-e8975a66.js"),l=require("./autoNextVideo-0cf4e98c.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=o.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();l.switchToNext(i,e,m)}};function g(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function h(e){return x.apply(this,arguments)}function x(){return(x=c(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=v(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)},n.onerror=function(n){var r,i,o,a;e([{duration:t.duration,uri:"".concat(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(a=o.images)||void 0===a?void 0:a.placeholderCover)}])}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",g(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return h(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},p(n,"left","-60px"),p(n,"border","1px solid transparent"),p(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e={0:{src:"example-thumbnail.png"}},t=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===u(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",(function(i){var o,a,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}a=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),o.appendChild(l),l.src=a[0].src,l.className="vjs-thumbnail",t(l.style,a[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",(function(e){c=u.duration()})),u.on("loadedmetadata",(function(e){c=u.duration()})),(s=u.controlBar.progressControl).el().appendChild(o),d=function(e){var i,u,d,p,v,m,f,g,h,x;for(u in d=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=r(s.el()).getBoundingClientRect()).width||x.right)+h,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+h,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(g=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||a[0].width)/2)>f?p-=p+g-f:p<g&&(p=g),o.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",(function(e){document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)})),p=function(e){o.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)}));var N=function(){var e=c(d.mark((function e(t,n){var r,i,o,a;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=v(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function C(e,t){return k.apply(this,arguments)}function k(){return(k=c(d.mark((function e(t,n){var r,i,l,u,s,c,p,m,f,g,h,x,y,b,w,E,N,C,k,P,A,L,B,M,S,j,q,O,R,X,V,$,D;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.getPlayer(n),i=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=2,e.next=5,fetch(t);case 5:return c=e.sent,e.next=8,c.text();case 8:p=e.sent,m=new DOMParser,f=m.parseFromString(p,"application/xml"),g=(null==r?void 0:r.duration())||(null===(l=a.getCurrentVideo())||void 0===l||null===(u=l.video)||void 0===u?void 0:u.runtime),h=(null==f||null===(s=f.querySelector("MPD > BaseURL"))||void 0===s?void 0:s.textContent)||i+"/",x=f.getElementsByTagName("AdaptationSet"),y=0;case 15:if(!(y<x.length)){e.next=43;break}if(("image"!==(b=x[y]).getAttribute("contentType")||"image/png"!==b.getAttribute("mimeType"))&&"image/jpeg"!==b.getAttribute("mimeType")){e.next=40;break}if(w=b.getElementsByTagName("SegmentTemplate")[0],E=b.getElementsByTagName("Representation")[0],N=E.getElementsByTagName("EssentialProperty")[0],C=N.getAttribute("value"),k=null==C?void 0:C.split("x"),P=v(k,2),A=P[0],L=P[1],!w){e.next=40;break}if(w.getAttribute("media"),B=w.getAttribute("duration"),M=w.getAttribute("timescale"),S=(M?B/M:B)/(A*L),j=E.getAttribute("id"),q=Math.round(g/S),O=Math.ceil(q/(A*L)),R=w.getAttribute("media"),X=parseInt(w.getAttribute("startNumber"))||0,!isNaN(parseInt(O))){e.next=36;break}return e.abrupt("return");case 36:for(V=[],$=T(R),y=0;y<O;y++)D=$?I($,y+X):R,V.push({duration:S,layout:C,uri:h+D.replace("$Number$",y+X).replace("$RepresentationID$",j)});return e.abrupt("return",V);case 40:y++,e.next=15;break;case 43:return console.log("No trickplay segment found."),e.abrupt("return",null);case 47:e.prev=47,e.t0=e.catch(2),console.error("Error fetching or parsing MPD:",e.t0);case 50:case"end":return e.stop()}}),e,null,[[2,47]])})))).apply(this,arguments)}function T(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function I(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function P(){return(P=c(d.mark((function e(t){var n,r,i,a,l,u,s,c,p,v,m,f,g,h,x,b;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=o.getPlayer(t),s=u.currentSource(),c=s.src,c=null!==(n=c)&&void 0!==n&&n.includes("blob")?null===(r=window)||void 0===r||null===(i=r.player)||void 0===i?void 0:i.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,y(c);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return v=(null==p?void 0:p[0])||null,m=v.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,N(f,m);case 12:return g=e.sent,e.next=15,w(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,C(c,t);case 22:if(!((null==(x=e.sent)?void 0:x.length)>0)){e.next=28;break}return e.next=26,w(x);case 26:b=e.sent,u.thumbnails(b);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=a.getCurrentSeries();null==l||l.map((function(e){var t;return(t=m).push.apply(t,i(e.episodes))})),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=o.getPlayer(e);c.on("timeupdate",(function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var d,p=m.filter((function(e,t){return t==a.getVideoIdx()}));if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,g,h,x,y,b,w,E,N,C,k,T;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var I=null===(g=document.getElementsByClassName("next-ep-title"))||void 0===g?void 0:g[0],P=null===(h=document.getElementsByClassName("next-ep-img"))||void 0===h?void 0:h[0],A=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],L=null===(y=p[0])||void 0===y?void 0:y.title;(null===(b=L)||void 0===b?void 0:b.length)>60&&(L=L.substr(0,60)+"..."),I.textContent="".concat(L),P.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(N=E.imageGist)||void 0===N?void 0:N.r16x9)||(null==p||null===(C=p[0])||void 0===C?void 0:C.img)||(null===(k=window)||void 0===k||null===(T=k.customData)||void 0===T?void 0:T.fallbackImage),A.onclick=function(){return f(e)}}else{var B,M,S,j,q,O,R,X,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var $=document.createElement("div");$.className="next-ep-header",$.textContent="Next up";var D=null===(B=p[0])||void 0===B?void 0:B.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(M=p[0])||void 0===M||null===(S=M.gist)||void 0===S||null===(j=S.imageGist)||void 0===j?void 0:j.r16x9)||(null==p||null===(q=p[0])||void 0===q?void 0:q.img)||(null===(O=window)||void 0===O||null===(R=O.customData)||void 0===R?void 0:R.fallbackImage);var U=document.createElement("div");U.className="next-ep-title",(null===(X=D)||void 0===X?void 0:X.length)>60&&(D=D.substr(0,60)+"..."),U.textContent="".concat(D);var G=document.createElement("div");G.className="next-ep-content",G.append(F),G.append(U),G.onclick=function(){return f(e)},V.append($),V.append(G)}},exports.addTVProviderImage=function(e,t){var n=o.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}},exports.initiateTrickplay=function(e){return P.apply(this,arguments)};
|
package/esm/generic-16b6151a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t 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,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}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",getBeaconUrl:"/analytics/player-beacon"};function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var E={name:"@viewlift/player",version:"2.0.27",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=E.version;var T,h=function(e,n){var t,i,r,a,l,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.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:g({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:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,a;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=x(n),a=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})})):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},b=function(){var e=n(t.mark((function e(n){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();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:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},D=function(e){var n=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),S=function(e,n,t,i){return o({url:t,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:n},withCredentials:!0})},R=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},P=null;function L(){return{set:function(e){e&&(P=e)},get:function(){return P}}}var W,V,A,C,N,B,j=function(){var e=n(t.mark((function e(){var n,i,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),i=F.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),U=null,M=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!R(n)){e.next=6;break}return U||(U=j().then((function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.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||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){U=null}))),e.abrupt("return",U);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){V=e},G=function(){return V},z=function(e){W=e},Y=function(){return W},X=function(){return A},q=function(e){A=e},J=function(){return N},K=function(e){C=new Map,e.map((function(e,n){C.set(e.id,n)}))},Q=function(e){if(C){var n=C.get(e);q(n+1)}},Z=(B=0,{set:function(e){e>=0&&(B=e)},get:function(){return B}});function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var ne=0,te=function(){var e,n,t,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===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===t||null===(i=t.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=n(t.mark((function e(){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.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 n=Math.floor(e.currentTime());e.on("error",(function(){var t,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:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,n){e.one("play",tryCatch((function(){var t,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:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.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}),n&&n("started_video_playback",{"Video ID":te(),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 n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.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:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var n,t,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:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.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 n,t,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:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.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:te()},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 n=[];e.on("timeupdate",(function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(ne=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(le(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}}))()};var le=function(e,n,t){return e>=n&&e<=t};function de(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",(function(){window.endFirstFrame(t)}))}}window.fireEvent=function(){var e=n(t.mark((function e(n){var i,r,a,l,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=x(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,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=te(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?(t=n.adPosition)?String(t):"":"",e.next=26,re();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.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==n?void 0:n.duration)&&{duration:n.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===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||F.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var t}),e)})));return function(n){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,n){var t=new Map;D({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),N=t})).catch((function(e){return console.log(e)}))},se=function(){var e=Z.get();return e>=0?e+1:1},ce=function(){var e,n,t,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===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function me(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}window._deviceInfo=s(navigator.userAgent);var fe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},pe=function(e){var n=we(e,"video.tags",[]),t=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},we=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},Ie=function(){var e,n,t,i,o,a,l,d,s,c,v,m,f,p,w,I,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=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,_=r(E);if(!g.includes("VIEWLIFT_"))return g;var b,O=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(O.getPropertyValue("height").slice(0,-2)),F=Math.trunc(O.getPropertyValue("width").slice(0,-2)),S="linearchannel"===h?null==T||null===(n=T.linearchannel)||void 0===n||null===(t=n.channels)||void 0===t||null===(i=t.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=null,P=null;"function"==typeof window.__gpp&&(null===(b=window)||void 0===b||b.__gpp("ping",(function(e){R=null==e?void 0:e.gppString,P=null==e?void 0:e.sectionList[0]})));var L=me(me({},ge(y)),{},{VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:fe(F,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: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==_||null===(l=_.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==_||null===(d=_.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:S,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:S,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:S,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),VIEWLIFT_GPP_SID:P||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:R||"VIEWLIFT_GPP"},null===(w=window)||void 0===w||null===(I=w.customData)||void 0===I?void 0:I.macros);for(var W in L){var V=new RegExp(W,"g");g=g.replace(V,L[W])}return g},ge=function(e){var n,t,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===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.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")||u.get("sfid.web.dtc")||""}):c&&(d=me(me({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.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")||u.get("sfid.web.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},Ee=function(e,n){var t,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=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===(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!=E&&E.hls)return he(E);if(I){var y=ye(g,n);return y.src=Ie(y.src,n,e),y}if("Safari"!==d()&&h)return Te(g);if(T){var _=he(g);return _.src=Ie(_.src,n,e),_}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=Ie(b.src,n,e),b}return null},Te=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},he=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ye=function(e,n){var t=e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(n),"Safari"===l){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,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,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);return _e(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(_e(n),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 _e=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},be=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Oe=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var 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(n),o.appendChild(r),i.append(o)}}},De=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Fe=!1,Se=function(e,n,t){var i=Ie(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Fe=!0;var l={id:e,adTagUrl:"".concat(n),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,n,!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===(t=window)||void 0===t||null===(i=t.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 Re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}var Pe=function(e){i(e).play()},Le=function(e){i(e).pause()},We=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ve=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ae=function(e){return!!i.getPlayer("".concat(e))},Ce=function(e){return i(e).paused()},Ne=function(){var e=n(t.mark((function e(n,i){var o,a,l,d=arguments;return t.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,M();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise((function(e,t){y(i,a).then((function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Ee(r,n);H(r),a&&o?(ke(n,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){t({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Be=function(){var e=n(t.mark((function e(n,i,o){var a,l,d,u,s,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();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 n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.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 n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,t){h(i,u).then((function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==E||null===(l=E.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==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Se(n,h,E);var y=Ee(E,n);if(y){var _,b,O,D,F,S,R,P,L,W,V,A,C,N,B=(null==E||null===(_=E.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==E||null===(O=E.video)||void 0===O||null===(D=O.gist)||void 0===D||null===(F=D.imageGist)||void 0===F?void 0:F.r16x9),j=r(n);if(j.poster(B),ke(n,y),j.on("loadstart",(function(){T&&e({status:!0,msg:"Video Loaded",response:E})})),j.on("loadeddata",(function(){De(),e({status:!0,msg:"Video Loaded",response:E})})),j.one("play",(function(){s&&m<95&&setTimeout((function(){j.currentTime(s)}),0)})),j.one("error",(function(){var e;t({status:!1,msg:(null==j||null===(e=j.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==E||null===(S=E.video)||void 0===S||null===(R=S.contentDetails)||void 0===R||null===(P=R.closedCaptions)||void 0===P?void 0:P.length)>0||(null==E||null===(L=E.video)||void 0===L||null===(W=L.closedCaptions)||void 0===W?void 0:W.length)>0)V=((null==E||null===(A=E.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==E||null===(N=E.video)||void 0===N?void 0:N.closedCaptions)).filter((function(e){return"VTT"===e.format})),c(n,V);else v(n)}else Oe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){xe(e,n,t,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}(),je=function(e,n,t){var i=r(e);return i.src(n),new Promise((function(e,n){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ue=function(e){var n=r(e);if(Me(),a(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Me=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,n){var t=r(e);t&&t.src(n)},xe=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ae(t)&&Oe(t,(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(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Re(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},He=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{We as A,Pe as B,Le as C,Ve as D,Ae as E,Be as F,Ne as G,Ue as H,S as I,F as J,k as K,L,R as M,f as N,X as O,Ce as P,q as Q,Ie as R,D as S,K as T,Q as U,oe as a,ce as b,Y as c,se as d,Ee as e,H as f,G as g,De as h,Oe as i,J as j,de as k,ke as l,Se as m,be as n,He as o,h as p,O as q,xe as r,b as s,M as t,y as u,_ as v,ue as w,Z as x,z as y,je as z};
|
package/esm/index-e27c516e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./skin-b8df984d.js";import{O as n,c as r,g as i}from"./generic-16b6151a.js";import{s as o}from"./autoNextVideo-2f1cd9c0.js";import a from"@babel/runtime/helpers/typeof";import l from"video.js";import u from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/regenerator";import c from"@babel/runtime/helpers/defineProperty";import d from"@babel/runtime/helpers/slicedToArray";var p,m,v,f,h=[],g=function(i,o){var a;if(null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable){var l;h=[];var u=r();null==u||u.map((function(t){var n;return(n=h).push.apply(n,e(t.episodes))})),null==o||null===(l=o.series)||void 0===l||l.cb}else{var s,c;h=(null==o||null===(s=o.relatedVideos)||void 0===s?void 0:s.content)||[],null==o||null===(c=o.relatedVideos)||void 0===c||c.cb}var d=t(i);d.on("timeupdate",(function(){var e,t,r=Math.floor(d.currentTime()),i=d.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=h)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var p,m=h.filter((function(e,t){return t==n()}));if((null==m?void 0:m.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var v,f,g,b,y,w,E,N,C,k,T,A;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var I=null===(f=document.getElementsByClassName("next-ep-title"))||void 0===f?void 0:f[0],L=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],B=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],M=null===(y=m[0])||void 0===y?void 0:y.title;(null===(w=M)||void 0===w?void 0:w.length)>60&&(M=M.substr(0,60)+"..."),I.textContent="".concat(M),L.src=(null===(E=m[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(C=N.imageGist)||void 0===C?void 0:C.r16x9)||(null==m||null===(k=m[0])||void 0===k?void 0:k.img)||(null===(T=window)||void 0===T||null===(A=T.customData)||void 0===A?void 0:A.fallbackImage),B.onclick=function(){return x(i)}}else{var S,P,O,j,R,X,$,D,F=document.createElement("div");F.className="next-ep-preview",F.style.visibility="hidden",document.getElementById(i).append(F);var U=document.createElement("div");U.className="next-ep-header",U.textContent="Next up";var G=null===(S=m[0])||void 0===S?void 0:S.title,V=document.createElement("img");V.className="next-ep-img",V.src=(null===(P=m[0])||void 0===P||null===(O=P.gist)||void 0===O||null===(j=O.imageGist)||void 0===j?void 0:j.r16x9)||(null==m||null===(R=m[0])||void 0===R?void 0:R.img)||(null===(X=window)||void 0===X||null===($=X.customData)||void 0===$?void 0:$.fallbackImage);var _=document.createElement("div");_.className="next-ep-title",(null===(D=G)||void 0===D?void 0:D.length)>60&&(G=G.substr(0,60)+"..."),_.textContent="".concat(G);var W=document.createElement("div");W.className="next-ep-content",W.append(V),W.append(_),W.onclick=function(){return x(i)},F.append(U),F.append(W)}},x=function(e,r){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var l=n();o(l,e,h)}};function b(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function y(e){return w.apply(this,arguments)}function w(){return(w=u(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=d(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)},n.onerror=function(n){var r,i,o,a;e([{duration:t.duration,uri:"".concat(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(a=o.images)||void 0===a?void 0:a.placeholderCover)}])}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return N.apply(this,arguments)}function N(){return(N=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",b(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function C(e){return k.apply(this,arguments)}function k(){return(k=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return y(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},c(n,"left","-60px"),c(n,"border","1px solid transparent"),c(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}p={0:{src:"example-thumbnail.png"}},m=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===a(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},v=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},f=function e(t){return"HTML"!==t.nodeName&&"static"===v(t)("position")?e(t.offsetParent):t},l.registerPlugin("thumbnails",(function(e){var t,n,r,i,o,a,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=m({},p,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",m(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",(function(e){a=i.duration()})),i.on("loadedmetadata",(function(e){a=i.duration()})),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,h,g,x;for(l in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((x=f(o.el()).getBoundingClientRect()).width||x.right)+g,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=f(o.el()).getBoundingClientRect().left+g,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&m(r.style,c.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=v(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+h-p:s<h&&(s=h),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),o.on("pointerdown",(function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)})),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)}));var T=function(){var e=u(s.mark((function e(t,n){var r,i,o,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=d(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function A(e,t){return I.apply(this,arguments)}function I(){return(I=u(s.mark((function e(n,r){var o,a,l,u,c,p,m,v,f,h,g,x,b,y,w,E,N,C,k,T,A,I,M,S,P,O,j,R,X,$,D,F,U;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t(r),a=n.split("/").slice(0,n.split("/").indexOf("dash")+1).join("/")||n,e.prev=2,e.next=5,fetch(n);case 5:return p=e.sent,e.next=8,p.text();case 8:m=e.sent,v=new DOMParser,f=v.parseFromString(m,"application/xml"),h=(null==o?void 0:o.duration())||(null===(l=i())||void 0===l||null===(u=l.video)||void 0===u?void 0:u.runtime),g=(null==f||null===(c=f.querySelector("MPD > BaseURL"))||void 0===c?void 0:c.textContent)||a+"/",x=f.getElementsByTagName("AdaptationSet"),b=0;case 15:if(!(b<x.length)){e.next=43;break}if(("image"!==(y=x[b]).getAttribute("contentType")||"image/png"!==y.getAttribute("mimeType"))&&"image/jpeg"!==y.getAttribute("mimeType")){e.next=40;break}if(w=y.getElementsByTagName("SegmentTemplate")[0],E=y.getElementsByTagName("Representation")[0],N=E.getElementsByTagName("EssentialProperty")[0],C=N.getAttribute("value"),k=null==C?void 0:C.split("x"),T=d(k,2),A=T[0],I=T[1],!w){e.next=40;break}if(w.getAttribute("media"),M=w.getAttribute("duration"),S=w.getAttribute("timescale"),P=(S?M/S:M)/(A*I),O=E.getAttribute("id"),j=Math.round(h/P),R=Math.ceil(j/(A*I)),X=w.getAttribute("media"),$=parseInt(w.getAttribute("startNumber"))||0,!isNaN(parseInt(R))){e.next=36;break}return e.abrupt("return");case 36:for(D=[],F=L(X),b=0;b<R;b++)U=F?B(F,b+$):X,D.push({duration:P,layout:C,uri:g+U.replace("$Number$",b+$).replace("$RepresentationID$",O)});return e.abrupt("return",D);case 40:b++,e.next=15;break;case 43:return console.log("No trickplay segment found."),e.abrupt("return",null);case 47:e.prev=47,e.t0=e.catch(2),console.error("Error fetching or parsing MPD:",e.t0);case 50:case"end":return e.stop()}}),e,null,[[2,47]])})))).apply(this,arguments)}function L(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function B(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function M(e){return S.apply(this,arguments)}function S(){return(S=u(s.mark((function e(n){var r,i,o,a,l,u,c,d,p,m,v,f,h,g,x,b;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),c=u.currentSource(),d=c.src,d=null!==(r=d)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(o=i.player)||void 0===o?void 0:o.getSource():d,null===(a=d)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,E(d);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return m=(null==p?void 0:p[0])||null,v=m.uri,f=d.substring(0,d.lastIndexOf("/"))+"/",e.next=12,T(f,v);case 12:return h=e.sent,e.next=15,C(h);case 15:g=e.sent,u.thumbnails(g);case 17:e.next=28;break;case 19:if(null===(l=d)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,A(d,n);case 22:if(!((null==(x=e.sent)?void 0:x.length)>0)){e.next=28;break}return e.next=26,C(x);case 26:b=e.sent,u.thumbnails(b);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",(function(){o.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||o.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}export{g as a,P as b,M as i};
|
|
@@ -1 +0,0 @@
|
|
|
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-16b6151a.js";import{e as C,p as g,g as y}from"./skin-b8df984d.js";import{a as b}from"./autoNextVideo-2f1cd9c0.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};
|