@viewlift/player-backup 2.0.117-backup → 2.0.118-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/cjs/{autoNextVideo-b8450765.js → autoNextVideo-5fd08f6b.js} +1 -1
  2. package/cjs/bundle.css +82 -82
  3. package/cjs/{features-badd86f2.js → features-dfab79d7.js} +1 -1
  4. package/cjs/{generic-05ef2861.js → generic-090f20e4.js} +1 -1
  5. package/cjs/{index-0b3792d7.js → index-a2c88360.js} +1 -1
  6. package/cjs/{index-6a6f8368.js → index-c5bb1c0f.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-07e13c53.js → multicamv2-9b16e7b4.js} +1 -1
  9. package/cjs/{multicamv2-39262f51.js → multicamv2-f64e8e6e.js} +1 -1
  10. package/cjs/{nextEpisodeButton-4e891cf4.js → nextEpisodeButton-174ce343.js} +1 -1
  11. package/cjs/{playlist-4b56fc94.js → playlist-975d63e2.js} +1 -1
  12. package/cjs/{series-fcc866d0.js → series-d787a3c5.js} +1 -1
  13. package/cjs/{series-v2-eda449bd.js → series-v2-90b35eef.js} +1 -1
  14. package/cjs/{series-v2-784168f8.js → series-v2-dc89938a.js} +1 -1
  15. package/cjs/{skin-9aeadda0.js → skin-00cff21e.js} +1 -1
  16. package/cjs/{skin-658cd334.js → skin-17344da4.js} +1 -1
  17. package/cjs/{skin-f238c543.js → skin-3874c0d0.js} +1 -1
  18. package/cjs/{skin-58100657.js → skin-4cf0f454.js} +1 -1
  19. package/cjs/{skin-7bbf08e9.js → skin-6da45dd8.js} +1 -1
  20. package/cjs/{skin-a4802e10.js → skin-fb780f09.js} +1 -1
  21. package/cjs/{videoSelector-f3704f94.js → videoSelector-9c7be217.js} +1 -1
  22. package/cjs/{videoSelector-74885792.js → videoSelector-9eb3d659.js} +1 -1
  23. package/esm/{autoNextVideo-44e6d7e6.js → autoNextVideo-cfe8aa87.js} +1 -1
  24. package/esm/bundle.css +82 -82
  25. package/esm/{features-5a4e3389.js → features-15befb53.js} +1 -1
  26. package/esm/generic-63e4557c.js +1 -0
  27. package/esm/{index-863cdd6a.js → index-0e07d7c1.js} +1 -1
  28. package/esm/{index-94145c0c.js → index-6884c042.js} +1 -1
  29. package/esm/index.js +1 -1
  30. package/esm/{multicamv2-140c7b5f.js → multicamv2-879ad44b.js} +1 -1
  31. package/esm/{multicamv2-bc51f879.js → multicamv2-c67371c1.js} +1 -1
  32. package/esm/{nextEpisodeButton-7033ccfb.js → nextEpisodeButton-68eb0785.js} +1 -1
  33. package/esm/{playlist-efc64fc5.js → playlist-26e445f5.js} +1 -1
  34. package/esm/{series-81d21874.js → series-016bb1c9.js} +1 -1
  35. package/esm/{series-v2-05b04cf6.js → series-v2-0d2dd639.js} +1 -1
  36. package/esm/{series-v2-224ee9f1.js → series-v2-6b9fe00e.js} +1 -1
  37. package/esm/{skin-05c9af11.js → skin-01b0e1a5.js} +1 -1
  38. package/esm/{skin-0f3166df.js → skin-072e0b5c.js} +1 -1
  39. package/esm/{skin-3ff9d56b.js → skin-160448cf.js} +1 -1
  40. package/esm/{skin-cc9a0b3a.js → skin-43ce728e.js} +1 -1
  41. package/esm/{skin-d1f3257d.js → skin-a31850f0.js} +1 -1
  42. package/esm/{skin-24059b44.js → skin-c169e7d8.js} +1 -1
  43. package/esm/{videoSelector-f7c3d747.js → videoSelector-b4b6876d.js} +1 -1
  44. package/esm/{videoSelector-a12206bc.js → videoSelector-bb89e286.js} +1 -1
  45. package/package.json +1 -1
  46. package/esm/generic-7e22e260.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("./features-badd86f2.js"),r=require("./index-6a6f8368.js"),i=require("./icons-79591410.js"),n=require("./player_instance-fcf6a8fb.js"),t=require("./skin-9e714900.js"),s=require("./generic-05ef2861.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./util-db87d399.js"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("./index-36a39813.js"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(l,o){n.getPlayer(l).addClass("skin_default"),r.initialiseKeyboardEvents(l,o),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(l,o),function(r,t){var l=n.getPlayer(r),o=(null==t?void 0:t.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-4e891cf4.js")}).then(function(e){e.initaliseFunctionality(t.sres.seasons,s.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==t||null===(i=t.sres)||void 0===i?void 0:i.seasons,t),e.addNextEpisodeButton(t.sres,t.res,r))})}(l,o),function(e,r){var s,l,o,u,a=n.getPlayer(e),d=document.getElementsByClassName("vjs-current-time")[0],c=document.getElementsByClassName("vjs-duration")[0],m=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(d&&(d.style.display="none"),c&&(c.style.display="none"),m&&(m.style.display="none"));null===(s=a.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(l=s.el())||void 0===l||l.appendChild(t.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(o=a.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(u=o.el())||void 0===u||u.appendChild(t.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var p=a.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(t.createIconMarkup(i.NewCaptionsSvg()));var v=document.createElement("div");v.classList.add("caption-header"),p.querySelector(".vjs-menu-content").insertBefore(v,p.querySelector(".vjs-menu-item"))}(l,o)};
1
+ "use strict";var e=require("./features-dfab79d7.js"),r=require("./index-c5bb1c0f.js"),i=require("./icons-79591410.js"),n=require("./player_instance-fcf6a8fb.js"),t=require("./skin-9e714900.js"),s=require("./generic-090f20e4.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./util-db87d399.js"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("./index-36a39813.js"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(l,o){n.getPlayer(l).addClass("skin_default"),r.initialiseKeyboardEvents(l,o),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(l,o),function(r,t){var l=n.getPlayer(r),o=(null==t?void 0:t.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-174ce343.js")}).then(function(e){e.initaliseFunctionality(t.sres.seasons,s.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==t||null===(i=t.sres)||void 0===i?void 0:i.seasons,t),e.addNextEpisodeButton(t.sres,t.res,r))})}(l,o),function(e,r){var s,l,o,u,a=n.getPlayer(e),d=document.getElementsByClassName("vjs-current-time")[0],c=document.getElementsByClassName("vjs-duration")[0],m=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(d&&(d.style.display="none"),c&&(c.style.display="none"),m&&(m.style.display="none"));null===(s=a.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(l=s.el())||void 0===l||l.appendChild(t.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(o=a.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(u=o.el())||void 0===u||u.appendChild(t.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var p=a.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(t.createIconMarkup(i.NewCaptionsSvg()));var v=document.createElement("div");v.classList.add("caption-header"),p.querySelector(".vjs-menu-content").insertBefore(v,p.querySelector(".vjs-menu-item"))}(l,o)};
@@ -1 +1 @@
1
- "use strict";var e=require("./features-badd86f2.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("./index-0b3792d7.js"),l=require("./generic-05ef2861.js");require("videojs-contrib-quality-menu");var t=require("video.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/regenerator"),o=require("./index-6a6f8368.js"),u=require("./icons-79591410.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./skin-9e714900.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-b8450765.js"),require("./util-db87d399.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("video.js/dist/video-js.min.css"),require("./index-36a39813.js");var d={markerStyle:{width:"5px","background-color":"red"},markerTip:{display:!1,text:function(e){return e.title},time:function(e){return e.time}},onMarkerClick:function(e){},markers:[],duration:0};function s(){return(s=n(a.mark(function e(i,l){var t,n,o,u,d,s;return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=r.getPlayer(i),(n=t.seekable())&&n.length>0&&(o=n.start(0),u=n.end(n.length-1),d=u-o,t.markers({markerStyle:{width:"4px","background-color":"#576478"},markerTip:{display:!1},duration:d||0}),t.markers.initializeMarker(),s=v(l,d),t.markers.add(s));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function v(e,r){var i=(new Date).getTime(),l=new Date(i-1e3*r).getTime();return e.filter(function(e){var r=new Date(e.formatted_startdate).getTime();return r>=l&&r<=i}).map(function(e){var r=new Date(e.formatted_startdate).getTime()-l;return{key:e.programId,title:e.title,time:r/1e3}})}function c(t,n){var a=r.getPlayer(t);a&&(a.on("loadeddata",function(){var e,o,u,d,v,c,p,m=(null==n||null===(e=n.dvrConfig)||void 0===e?void 0:e.programs)||[];a.qualityLevels()&&a.qualityLevels().length&&function(e){var i=r.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(t),!(null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(v=d.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play)||null!=n&&n.liveVideo||i.addNextEpPreview(t,n),null!=n&&n.liveVideo||l.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||i.initiateTrickplay(t),null!=n&&null!==(p=n.dvrConfig)&&void 0!==p&&p.enable&&m&&m.length&&function(e,r){s.apply(this,arguments)}(t,m)}),a.one("play",function(){var r,i,l,n;null!==(r=window)&&void 0!==r&&null!==(i=r.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(l=window)||void 0===l||null===(n=l.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}t.registerPlugin("markers",function(e){var r=t.mergeOptions(d,e),i={},l=[],n=this,a=null;function o(){l.sort(function(e,i){return r.markerTip.time(e)-r.markerTip.time(i)})}function u(e){e.forEach(function(e){n.el().querySelector(".vjs-progress-holder").appendChild(function(e){var l=t.dom.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":r.markerTip.time(e)});return v(e,l),l.addEventListener("click",function(l){var t=!1;if("function"==typeof r.onMarkerClick&&(t=!1===r.onMarkerClick(e)),!t){var a=this.getAttribute("data-marker-key");n.currentTime(r.markerTip.time(i[a]))}}),r.markerTip.display&&function(e){e.addEventListener("mouseover",function(){var l=i[e.getAttribute("data-marker-key")];a&&(r.markerTip.html?a.querySelector(".vjs-tip-inner").innerHTML=r.markerTip.html(l):a.querySelector(".vjs-tip-inner").innerText=r.markerTip.text(l),a.style.left=s(l)+"%",a.style.visibility="visible")}),e.addEventListener("mouseout",function(){a&&(a.style.visibility="hidden")})}(l),l}(e)),i[e.key]=e,l.push(e)}),o()}function s(e){return r.markerTip.time(e)/r.duration*100}function v(e,i){i.className="vjs-marker ".concat(e.class||""),Object.keys(r.markerStyle).forEach(function(e){i.style[e]=r.markerStyle[e]});var l=e.time/r.duration;(l<0||l>1)&&(i.style.display="none");var t=s(e);t>=99.5&&(t=99.5),i.style.left=t+"%"}n.markers={getMarkers:function(){return l},initializeMarker:function(){a=t.dom.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),n.el().querySelector(".vjs-progress-holder").appendChild(a)},add:function(e){u(e)},update:function(e,i){!function(e,i){e.forEach(function(e){var l=n.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),t=r.markerTip.time(e);l?(i||l.getAttribute("data-marker-time")!==t)&&(v(e,l),l.setAttribute("data-marker-time",t)):u([e])}),o()}(e,i)}}});var p=function(e,i){var l,n,a,o,u,d,s,v,c,p,m,y,k=r.getPlayer(e),f=(null==i?void 0:i.theme)||{},g=t.dom.$(".vjs-play-progress"),b=t.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(l=window)||void 0===l||null===(n=l.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a||null===(o=a.brand)||void 0===o||null===(u=o.cta)||void 0===u||null===(d=u.primary)||void 0===d?void 0:d.backgroundColor)),g&&(g.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(y=m.primary)||void 0===y?void 0:y.backgroundColor));var h=k.getChild("BigPlayButton")||null;(null==f?void 0:f.progressBarColor)&&g&&(g.style.background=f.progressBarColor),(null==f?void 0:f.playButtonBackgroundColor)&&h&&(h.el().style.background=f.playButtonBackgroundColor),(null==f?void 0:f.playButtonColor)&&b&&(b.style.color=f.playButtonColor),(null==f?void 0:f.playButtonType)&&("square"==(null==f?void 0:f.playButtonType)?h.el().style.borderRadius=".3em":h.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(t,n){r.getPlayer(t).addClass("skin_vlone"),c(t,n),function(r,t){var n,a,d,s,v,c,p,m,y,k,f,g,b,h,q,j=(null==t||null===(n=t.res)||void 0===n||null===(a=n.video)||void 0===a?void 0:a.isSSAIEnabled)||!1,T=l.getSource(null==t?void 0:t.res,r)||{};T.src;var w=(null==t?void 0:t.skin_settings)||{};null!=w&&w.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&e.addSkipButton(r,"VL_ONE",u.SkipSvgV2());(null!=w&&w.rewindBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&e.addRewindButton(r,"VL_ONE",u.RewindSvgV2());(null==t||null===(d=t.relatedVideos)||void 0===d||null===(s=d.content)||void 0===s?void 0:s.length)>0&&e.addVideoSelector(r,null==t?void 0:t.relatedVideos);null!=t&&null!==(v=t.series)&&void 0!==v&&v.enable&&e.addSeriesSelectorV2(r,t);(null==t||null===(c=t.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector(r,null==t?void 0:t.streams);if(i.addTVProviderImage(r,t),o.initialiseKeyboardEvents(r,t),"MEDIA_TAILOR"==(null===(p=window)||void 0===p||null===(m=p.app_data)||void 0===m||null===(y=m.appcmsMain)||void 0===y||null===(k=y.adsConfig)||void 0===k?void 0:k.vodAdSticherProvider)&&null!==(f=window)&&void 0!==f&&null!==(g=f.app_data)&&void 0!==g&&null!==(b=g.appcmsMain)&&void 0!==b&&null!==(h=b.adsConfig)&&void 0!==h&&h.vodAdClientSideTracking&&j){var C,S=null;if(null!=t&&null!==(C=t.series)&&void 0!==C&&C.enable){var M,B,E,V=null===(M=l.getCurrentVideo())||void 0===M||null===(B=M.video)||void 0===B||null===(E=B.gist)||void 0===E?void 0:E.id,_=l.getSeriesWatchMap(),x=(null==_?void 0:_.get(V))||{t:0,p:0},P=x.t;x.p<95&&(S=P)}else{var A=t.watchHistoryResumeTime;t.watchedPercentage<95&&(S=A)}o.setupAdvertisementMarkers(r,S)}null!=t&&null!==(q=t.dvrConfig)&&void 0!==q&&q.enable&&null!=t&&t.isDvrEnabled&&(e.addStartFromBeginningButton(r,t),e.addWatchLiveButton(r,t))}(t,n),p(t,n)};
1
+ "use strict";var e=require("./features-dfab79d7.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("./index-a2c88360.js"),l=require("./generic-090f20e4.js");require("videojs-contrib-quality-menu");var t=require("video.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/regenerator"),o=require("./index-c5bb1c0f.js"),u=require("./icons-79591410.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./skin-9e714900.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-5fd08f6b.js"),require("./util-db87d399.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("video.js/dist/video-js.min.css"),require("./index-36a39813.js");var d={markerStyle:{width:"5px","background-color":"red"},markerTip:{display:!1,text:function(e){return e.title},time:function(e){return e.time}},onMarkerClick:function(e){},markers:[],duration:0};function s(){return(s=n(a.mark(function e(i,l){var t,n,o,u,d,s;return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=r.getPlayer(i),(n=t.seekable())&&n.length>0&&(o=n.start(0),u=n.end(n.length-1),d=u-o,t.markers({markerStyle:{width:"4px","background-color":"#576478"},markerTip:{display:!1},duration:d||0}),t.markers.initializeMarker(),s=v(l,d),t.markers.add(s));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function v(e,r){var i=(new Date).getTime(),l=new Date(i-1e3*r).getTime();return e.filter(function(e){var r=new Date(e.formatted_startdate).getTime();return r>=l&&r<=i}).map(function(e){var r=new Date(e.formatted_startdate).getTime()-l;return{key:e.programId,title:e.title,time:r/1e3}})}function c(t,n){var a=r.getPlayer(t);a&&(a.on("loadeddata",function(){var e,o,u,d,v,c,p,m=(null==n||null===(e=n.dvrConfig)||void 0===e?void 0:e.programs)||[];a.qualityLevels()&&a.qualityLevels().length&&function(e){var i=r.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(t),!(null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(v=d.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play)||null!=n&&n.liveVideo||i.addNextEpPreview(t,n),null!=n&&n.liveVideo||l.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||i.initiateTrickplay(t),null!=n&&null!==(p=n.dvrConfig)&&void 0!==p&&p.enable&&m&&m.length&&function(e,r){s.apply(this,arguments)}(t,m)}),a.one("play",function(){var r,i,l,n;null!==(r=window)&&void 0!==r&&null!==(i=r.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(l=window)||void 0===l||null===(n=l.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}t.registerPlugin("markers",function(e){var r=t.mergeOptions(d,e),i={},l=[],n=this,a=null;function o(){l.sort(function(e,i){return r.markerTip.time(e)-r.markerTip.time(i)})}function u(e){e.forEach(function(e){n.el().querySelector(".vjs-progress-holder").appendChild(function(e){var l=t.dom.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":r.markerTip.time(e)});return v(e,l),l.addEventListener("click",function(l){var t=!1;if("function"==typeof r.onMarkerClick&&(t=!1===r.onMarkerClick(e)),!t){var a=this.getAttribute("data-marker-key");n.currentTime(r.markerTip.time(i[a]))}}),r.markerTip.display&&function(e){e.addEventListener("mouseover",function(){var l=i[e.getAttribute("data-marker-key")];a&&(r.markerTip.html?a.querySelector(".vjs-tip-inner").innerHTML=r.markerTip.html(l):a.querySelector(".vjs-tip-inner").innerText=r.markerTip.text(l),a.style.left=s(l)+"%",a.style.visibility="visible")}),e.addEventListener("mouseout",function(){a&&(a.style.visibility="hidden")})}(l),l}(e)),i[e.key]=e,l.push(e)}),o()}function s(e){return r.markerTip.time(e)/r.duration*100}function v(e,i){i.className="vjs-marker ".concat(e.class||""),Object.keys(r.markerStyle).forEach(function(e){i.style[e]=r.markerStyle[e]});var l=e.time/r.duration;(l<0||l>1)&&(i.style.display="none");var t=s(e);t>=99.5&&(t=99.5),i.style.left=t+"%"}n.markers={getMarkers:function(){return l},initializeMarker:function(){a=t.dom.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),n.el().querySelector(".vjs-progress-holder").appendChild(a)},add:function(e){u(e)},update:function(e,i){!function(e,i){e.forEach(function(e){var l=n.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),t=r.markerTip.time(e);l?(i||l.getAttribute("data-marker-time")!==t)&&(v(e,l),l.setAttribute("data-marker-time",t)):u([e])}),o()}(e,i)}}});var p=function(e,i){var l,n,a,o,u,d,s,v,c,p,m,y,k=r.getPlayer(e),f=(null==i?void 0:i.theme)||{},g=t.dom.$(".vjs-play-progress"),b=t.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(l=window)||void 0===l||null===(n=l.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a||null===(o=a.brand)||void 0===o||null===(u=o.cta)||void 0===u||null===(d=u.primary)||void 0===d?void 0:d.backgroundColor)),g&&(g.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(y=m.primary)||void 0===y?void 0:y.backgroundColor));var h=k.getChild("BigPlayButton")||null;(null==f?void 0:f.progressBarColor)&&g&&(g.style.background=f.progressBarColor),(null==f?void 0:f.playButtonBackgroundColor)&&h&&(h.el().style.background=f.playButtonBackgroundColor),(null==f?void 0:f.playButtonColor)&&b&&(b.style.color=f.playButtonColor),(null==f?void 0:f.playButtonType)&&("square"==(null==f?void 0:f.playButtonType)?h.el().style.borderRadius=".3em":h.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(t,n){r.getPlayer(t).addClass("skin_vlone"),c(t,n),function(r,t){var n,a,d,s,v,c,p,m,y,k,f,g,b,h,q,j=(null==t||null===(n=t.res)||void 0===n||null===(a=n.video)||void 0===a?void 0:a.isSSAIEnabled)||!1,T=l.getSource(null==t?void 0:t.res,r)||{};T.src;var w=(null==t?void 0:t.skin_settings)||{};null!=w&&w.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&e.addSkipButton(r,"VL_ONE",u.SkipSvgV2());(null!=w&&w.rewindBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&e.addRewindButton(r,"VL_ONE",u.RewindSvgV2());(null==t||null===(d=t.relatedVideos)||void 0===d||null===(s=d.content)||void 0===s?void 0:s.length)>0&&e.addVideoSelector(r,null==t?void 0:t.relatedVideos);null!=t&&null!==(v=t.series)&&void 0!==v&&v.enable&&e.addSeriesSelectorV2(r,t);(null==t||null===(c=t.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector(r,null==t?void 0:t.streams);if(i.addTVProviderImage(r,t),o.initialiseKeyboardEvents(r,t),"MEDIA_TAILOR"==(null===(p=window)||void 0===p||null===(m=p.app_data)||void 0===m||null===(y=m.appcmsMain)||void 0===y||null===(k=y.adsConfig)||void 0===k?void 0:k.vodAdSticherProvider)&&null!==(f=window)&&void 0!==f&&null!==(g=f.app_data)&&void 0!==g&&null!==(b=g.appcmsMain)&&void 0!==b&&null!==(h=b.adsConfig)&&void 0!==h&&h.vodAdClientSideTracking&&j){var C,S=null;if(null!=t&&null!==(C=t.series)&&void 0!==C&&C.enable){var M,B,E,V=null===(M=l.getCurrentVideo())||void 0===M||null===(B=M.video)||void 0===B||null===(E=B.gist)||void 0===E?void 0:E.id,_=l.getSeriesWatchMap(),x=(null==_?void 0:_.get(V))||{t:0,p:0},P=x.t;x.p<95&&(S=P)}else{var A=t.watchHistoryResumeTime;t.watchedPercentage<95&&(S=A)}o.setupAdvertisementMarkers(r,S)}null!=t&&null!==(q=t.dvrConfig)&&void 0!==q&&q.enable&&null!=t&&t.isDvrEnabled&&(e.addStartFromBeginningButton(r,t),e.addWatchLiveButton(r,t))}(t,n),p(t,n)};
@@ -1 +1 @@
1
- "use strict";var e=require("./features-badd86f2.js"),l=require("./icons-79591410.js"),i=require("./player_instance-fcf6a8fb.js"),r=require("./skin-9e714900.js"),n=require("./resolution-9c4872ec.js"),o=require("./captions-bf891620.js"),t=require("./index-0b3792d7.js"),d=require("./generic-05ef2861.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./autoNextVideo-b8450765.js"),require("./util-db87d399.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(u,a){i.getPlayer(u).addClass("skin_defaultv2"),function(){"Chrome"==d.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)});Promise.resolve().then(function(){return require("./skin-38de8257.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),function(l,r){var u=i.getPlayer(l);u&&(u.on("loadeddata",function(){var i,u,a,s,v,c,p;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,r),(null===(u=o.getCaptions(l))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(l,r),!(null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable||null!==(s=window)&&void 0!==s&&null!==(v=s.app_data)&&void 0!==v&&null!==(c=v.appcmsMain)&&void 0!==c&&null!==(p=c.features)&&void 0!==p&&p.auto_play)||null!=r&&r.liveVideo||t.addNextEpPreview(l,r),null!=r&&r.liveVideo||d.isMobile()||t.initiateTrickplay(l)}),u.one("play",function(){var i,r,n,o;null!==(i=window)&&void 0!==i&&null!==(r=i.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}(u,a),function(e,n){var o,t,d,u,a,s,v,c,p,m,h,g,b,q=i.getPlayer(e);null===(o=q.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(t=q.controlBar)||void 0===t||t.addChild("VolumePanel",{inline:!1},1);var C=null===(d=q.controlBar)||void 0===d?void 0:d.getChild("ProgressControl"),f=null===(u=q.controlBar)||void 0===u?void 0:u.getChild("CurrentTimeDisplay"),y=null===(a=q.controlBar)||void 0===a?void 0:a.getChild("SeekToLive"),V=document.createElement("div");V.className="custom-spaced-progress-bar",C&&f&&y&&V.append(C.el(),f.el(),y.el());null===(s=q.controlBar)||void 0===s||null===(v=s.el())||void 0===v||v.append(V),null==q||null===(c=q.controlBar)||void 0===c||null===(p=c.getChild("FullscreenToggle"))||void 0===p||null===(m=p.el())||void 0===m||m.appendChild(r.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==q||null===(h=q.controlBar)||void 0===h||null===(g=h.getChild("FullscreenToggle"))||void 0===g||null===(b=g.el())||void 0===b||b.appendChild(r.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var j=document.getElementsByClassName("vjs-time-control");n.liveVideo&&j[0]&&(j[0].style.display="none")}(u,a),function(i,r){var n,o,t,d,u,a,s=(null==r?void 0:r.skin_settings)||{},v=0!=(null==s?void 0:s.slowMoBtn);0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());!r.liveVideo&&v&&e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(u,a),t.addTVProviderImage(u,a)};
1
+ "use strict";var e=require("./features-dfab79d7.js"),l=require("./icons-79591410.js"),i=require("./player_instance-fcf6a8fb.js"),r=require("./skin-9e714900.js"),n=require("./resolution-9c4872ec.js"),o=require("./captions-bf891620.js"),t=require("./index-a2c88360.js"),d=require("./generic-090f20e4.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./autoNextVideo-5fd08f6b.js"),require("./util-db87d399.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(u,a){i.getPlayer(u).addClass("skin_defaultv2"),function(){"Chrome"==d.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)});Promise.resolve().then(function(){return require("./skin-38de8257.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),function(l,r){var u=i.getPlayer(l);u&&(u.on("loadeddata",function(){var i,u,a,s,v,c,p;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,r),(null===(u=o.getCaptions(l))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(l,r),!(null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable||null!==(s=window)&&void 0!==s&&null!==(v=s.app_data)&&void 0!==v&&null!==(c=v.appcmsMain)&&void 0!==c&&null!==(p=c.features)&&void 0!==p&&p.auto_play)||null!=r&&r.liveVideo||t.addNextEpPreview(l,r),null!=r&&r.liveVideo||d.isMobile()||t.initiateTrickplay(l)}),u.one("play",function(){var i,r,n,o;null!==(i=window)&&void 0!==i&&null!==(r=i.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}(u,a),function(e,n){var o,t,d,u,a,s,v,c,p,m,h,g,b,q=i.getPlayer(e);null===(o=q.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(t=q.controlBar)||void 0===t||t.addChild("VolumePanel",{inline:!1},1);var C=null===(d=q.controlBar)||void 0===d?void 0:d.getChild("ProgressControl"),f=null===(u=q.controlBar)||void 0===u?void 0:u.getChild("CurrentTimeDisplay"),y=null===(a=q.controlBar)||void 0===a?void 0:a.getChild("SeekToLive"),V=document.createElement("div");V.className="custom-spaced-progress-bar",C&&f&&y&&V.append(C.el(),f.el(),y.el());null===(s=q.controlBar)||void 0===s||null===(v=s.el())||void 0===v||v.append(V),null==q||null===(c=q.controlBar)||void 0===c||null===(p=c.getChild("FullscreenToggle"))||void 0===p||null===(m=p.el())||void 0===m||m.appendChild(r.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==q||null===(h=q.controlBar)||void 0===h||null===(g=h.getChild("FullscreenToggle"))||void 0===g||null===(b=g.el())||void 0===b||b.appendChild(r.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var j=document.getElementsByClassName("vjs-time-control");n.liveVideo&&j[0]&&(j[0].style.display="none")}(u,a),function(i,r){var n,o,t,d,u,a,s=(null==r?void 0:r.skin_settings)||{},v=0!=(null==s?void 0:s.slowMoBtn);0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());!r.liveVideo&&v&&e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(u,a),t.addTVProviderImage(u,a)};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-05ef2861.js"),r=require("./player_instance-fcf6a8fb.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("./skin-9e714900.js"),require("@babel/runtime/helpers/toConsumableArray");var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(i){Promise.resolve().then(function(){return require("./skin-225252ff.js")}).then(function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)}),n(),function(n){var i=document.getElementById("".concat(n)),t=r.getPlayer(n);i&&i.addEventListener("touchstart",function(){t.paused()?e.play(n):e.pause(n)})}(i)};
1
+ "use strict";var e=require("./generic-090f20e4.js"),r=require("./player_instance-fcf6a8fb.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("./skin-9e714900.js"),require("@babel/runtime/helpers/toConsumableArray");var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(i){Promise.resolve().then(function(){return require("./skin-225252ff.js")}).then(function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)}),n(),function(n){var i=document.getElementById("".concat(n)),t=r.getPlayer(n);i&&i.addEventListener("touchstart",function(){t.paused()?e.play(n):e.pause(n)})}(i)};
@@ -1 +1 @@
1
- "use strict";var e=require("./player_instance-fcf6a8fb.js"),r=require("./features-badd86f2.js"),i=require("./resolution-9c4872ec.js"),t=require("./captions-bf891620.js");require("video.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./generic-05ef2861.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./skin-9e714900.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/assertThisInitialized"),exports.initialiseSkin=function(n,s){Promise.resolve().then(function(){return require("./skin-fc1e7e52.js")}).then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(n,s){e.getPlayer(n).on("loadeddata",function(){var e;(null===(e=i.getRenditions(n))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(n,s),null!=s&&s.disableCaptions&&t.removeCaptions(n)})}(n,s),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(n)};
1
+ "use strict";var e=require("./player_instance-fcf6a8fb.js"),r=require("./features-dfab79d7.js"),i=require("./resolution-9c4872ec.js"),t=require("./captions-bf891620.js");require("video.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./generic-090f20e4.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./skin-9e714900.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/assertThisInitialized"),exports.initialiseSkin=function(n,s){Promise.resolve().then(function(){return require("./skin-fc1e7e52.js")}).then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(n,s){e.getPlayer(n).on("loadeddata",function(){var e;(null===(e=i.getRenditions(n))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(n,s),null!=s&&s.disableCaptions&&t.removeCaptions(n)})}(n,s),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(n)};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-79591410.js"),l=require("./generic-05ef2861.js"),d=require("./skin-9e714900.js"),s=require("./autoNextVideo-b8450765.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-db87d399.js");var v=r.getComponent("Component"),m=function(){n(b,v);var m,p,h=(m=b,p=u(),function(){var e,t=o(m);if(p){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function b(t){var n,i,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(o=h.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(n=r.related)||void 0===n?void 0:n.cb)||null,o.autoNext=(null==r||null===(i=r.related)||void 0===i?void 0:i.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(l.setVideoIdx(0),s.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o}return t(b,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-fcdf11eb.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var o=window.getComputedStyle(i,null).getPropertyValue("height");n.style.height="".concat(o),r.dom.appendContent(t,n),i.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),i=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),u=r.dom.createEl("div",{className:"video-selector-content"}),v=r.dom.createEl("div",{className:"video-container"}),m=function(e){var n,i,o,a,s,c=r.dom.createEl("div",{className:"video -".concat(e)}),m=r.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),i=0;i<n.length;i++)n[i].style.border="none";d.highlightVideo_DEFAULTV2_TEMP(e),l.load(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(i=n[e])||void 0===i?void 0:i.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(c,m),r.dom.appendContent(c,h),r.dom.appendContent(v,c),r.dom.appendContent(u,v)},p=0;p<this.videos.length;p++)m(p);r.dom.appendContent(i,o),r.dom.appendContent(i,s),r.dom.appendContent(e,i),r.dom.appendContent(e,u),d.handleDrawerResizing(this.playerId,e)}}]),b}();exports.default=m;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-79591410.js"),l=require("./generic-090f20e4.js"),d=require("./skin-9e714900.js"),s=require("./autoNextVideo-5fd08f6b.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-db87d399.js");var v=r.getComponent("Component"),m=function(){n(b,v);var m,p,h=(m=b,p=u(),function(){var e,t=o(m);if(p){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function b(t){var n,i,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(o=h.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(n=r.related)||void 0===n?void 0:n.cb)||null,o.autoNext=(null==r||null===(i=r.related)||void 0===i?void 0:i.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(l.setVideoIdx(0),s.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o}return t(b,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-fcdf11eb.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var i;null!==(i=n.classList)&&void 0!==i&&i.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var i=document.getElementById(this.playerId);if(i){var o=window.getComputedStyle(i,null).getPropertyValue("height");n.style.height="".concat(o),r.dom.appendContent(t,n),i.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),i=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),u=r.dom.createEl("div",{className:"video-selector-content"}),v=r.dom.createEl("div",{className:"video-container"}),m=function(e){var n,i,o,a,s,c=r.dom.createEl("div",{className:"video -".concat(e)}),m=r.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),i=0;i<n.length;i++)n[i].style.border="none";d.highlightVideo_DEFAULTV2_TEMP(e),l.load(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(i=n[e])||void 0===i?void 0:i.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(c,m),r.dom.appendContent(c,h),r.dom.appendContent(v,c),r.dom.appendContent(u,v)},p=0;p<this.videos.length;p++)m(p);r.dom.appendContent(i,o),r.dom.appendContent(i,s),r.dom.appendContent(e,i),r.dom.appendContent(e,u),d.handleDrawerResizing(this.playerId,e)}}]),b}();exports.default=m;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-79591410.js"),d=require("./generic-05ef2861.js"),r=require("./skin-9e714900.js"),s=require("./autoNextVideo-b8450765.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-db87d399.js");var m=l.getComponent("Component"),v=function(){n(y,m);var v,p,h=(v=y,p=u(),function(){var e,t=i(v);if(p){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(i=h.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d.setVideoIdx(0),s.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(y,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),d.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var d=l.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),u=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,d,c,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(u,p),l.dom.appendContent(s,u)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,d),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=v;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-79591410.js"),d=require("./generic-090f20e4.js"),r=require("./skin-9e714900.js"),s=require("./autoNextVideo-5fd08f6b.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-db87d399.js");var m=l.getComponent("Component"),v=function(){n(y,m);var v,p,h=(v=y,p=u(),function(){var e,t=i(v);if(p){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(i=h.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d.setVideoIdx(0),s.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(y,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),d.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var d=l.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),u=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,d,c,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(u,p),l.dom.appendContent(s,u)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,d),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=v;
@@ -1 +1 @@
1
- import{I as n,j as t,T as i,S as o,U as a}from"./generic-7e22e260.js";import{a as e}from"./util-9649ae40.js";import{h as c}from"./skin-16f83185.js";import{g as s}from"./player_instance-34118a5b.js";var r,u=0,f=0,l=function(l){clearTimeout(u);var h=null==l?void 0:l.content;r=null==l?void 0:l.cb;var v=l.playerId;e(v,function(){var e=s(v);0!==(null==e?void 0:e.currentTime())&&((f=o())>h.length-1||(a(f+1),n(v,h[f].id).then(function(n){c(f,v),t(n.response),f++,p(n)}).catch(function(n){p(n),c(f,v),f++,u=setTimeout(function(){i(v)&&m(f,v,h)},5e3)})))})},m=function t(i,o,e,s){f=i,i>e.length-1||(a(f+1),n(o,e[i].id).then(function(n){c(f,o),f++,p(n)}).catch(function(n){p(n),setTimeout(function(){c(f,o),f++,t(f,o,e)},5e3)}))},p=function(n){r&&r(n)};export{l as a,m as s};
1
+ import{I as n,j as t,T as i,S as o,U as a}from"./generic-63e4557c.js";import{a as e}from"./util-9649ae40.js";import{h as c}from"./skin-16f83185.js";import{g as s}from"./player_instance-34118a5b.js";var r,u=0,f=0,l=function(l){clearTimeout(u);var h=null==l?void 0:l.content;r=null==l?void 0:l.cb;var v=l.playerId;e(v,function(){var e=s(v);0!==(null==e?void 0:e.currentTime())&&((f=o())>h.length-1||(a(f+1),n(v,h[f].id).then(function(n){c(f,v),t(n.response),f++,p(n)}).catch(function(n){p(n),c(f,v),f++,u=setTimeout(function(){i(v)&&m(f,v,h)},5e3)})))})},m=function t(i,o,e,s){f=i,i>e.length-1||(a(f+1),n(o,e[i].id).then(function(n){c(f,o),f++,p(n)}).catch(function(n){p(n),setTimeout(function(){c(f,o),f++,t(f,o,e)},5e3)}))},p=function(n){r&&r(n)};export{l as a,m as s};
package/esm/bundle.css CHANGED
@@ -548,6 +548,88 @@
548
548
  margin-left: 8px;
549
549
  }
550
550
  }
551
+ /* a wrapper element that tracks the mouse vertically */
552
+ .vjs-thumbnail-holder {
553
+ position: absolute;
554
+ left: -1000px;
555
+ }
556
+
557
+ /* the thumbnail image itself */
558
+ .vjs-thumbnail {
559
+ position: absolute;
560
+ left: 0;
561
+ bottom: 1.3em;
562
+ opacity: 0;
563
+ transition: opacity .2s ease;
564
+ -webkit-transition: opacity .2s ease;
565
+ -moz-transition: opacity .2s ease;
566
+ -mz-transition: opacity .2s ease;
567
+ }
568
+
569
+ /* fade in the thumbnail when hovering over the progress bar */
570
+ /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
571
+ .vjs-progress-control:hover .vjs-thumbnail,
572
+ .vjs-progress-control.fake-active .vjs-thumbnail,
573
+ .vjs-progress-control:active .vjs-thumbnail {
574
+ opacity: 1;
575
+ }
576
+
577
+ /* ... but hide the thumbnail when hovering directly over it */
578
+ .vjs-progress-control:hover .vjs-thumbnail:hover,
579
+ .vjs-progress-control:active .vjs-thumbnail:active {
580
+ opacity: 0;
581
+ }
582
+
583
+ .vjs-marker {
584
+ position: absolute;
585
+ left: 0;
586
+ bottom: 0em;
587
+ opacity: 1;
588
+ height: 100%;
589
+ transition: opacity .2s ease;
590
+ -webkit-transition: opacity .2s ease;
591
+ -moz-transition: opacity .2s ease;
592
+ z-index: 100;
593
+ }
594
+ .vjs-marker:hover {
595
+ cursor: pointer;
596
+ -webkit-transform: scale(1.3, 1.3);
597
+ -moz-transform: scale(1.3, 1.3);
598
+ -o-transform: scale(1.3, 1.3);
599
+ -ms-transform: scale(1.3, 1.3);
600
+ transform: scale(1.3, 1.3);
601
+ }
602
+ .vjs-tip {
603
+ visibility: hidden;
604
+ display: block;
605
+ opacity: 0.8;
606
+ padding: 5px;
607
+ font-size: 10px;
608
+ position: absolute;
609
+ bottom: 14px;
610
+ z-index: 100000;
611
+ }
612
+ .vjs-tip .vjs-tip-arrow {
613
+ background: url(data:image/gif;base64,R0lGODlhCQAJAIABAAAAAAAAACH5BAEAAAEALAAAAAAJAAkAAAIRjAOnwIrcDJxvwkplPtchVQAAOw==) no-repeat top left;
614
+ bottom: 0;
615
+ left: 50%;
616
+ margin-left: -4px;
617
+ background-position: bottom left;
618
+ position: absolute;
619
+ width: 9px;
620
+ height: 5px;
621
+ }
622
+ .vjs-tip .vjs-tip-inner {
623
+ border-radius: 3px;
624
+ -moz-border-radius: 3px;
625
+ -webkit-border-radius: 3px;
626
+ padding: 5px 8px 4px 8px;
627
+ background-color: black;
628
+ color: white;
629
+ max-width: 200px;
630
+ text-align: center;
631
+ }
632
+
551
633
  .video-js.vjs-quality-menu {
552
634
  display: block;
553
635
  }
@@ -618,88 +700,6 @@
618
700
  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
619
701
  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
620
702
  }
621
- .vjs-marker {
622
- position: absolute;
623
- left: 0;
624
- bottom: 0em;
625
- opacity: 1;
626
- height: 100%;
627
- transition: opacity .2s ease;
628
- -webkit-transition: opacity .2s ease;
629
- -moz-transition: opacity .2s ease;
630
- z-index: 100;
631
- }
632
- .vjs-marker:hover {
633
- cursor: pointer;
634
- -webkit-transform: scale(1.3, 1.3);
635
- -moz-transform: scale(1.3, 1.3);
636
- -o-transform: scale(1.3, 1.3);
637
- -ms-transform: scale(1.3, 1.3);
638
- transform: scale(1.3, 1.3);
639
- }
640
- .vjs-tip {
641
- visibility: hidden;
642
- display: block;
643
- opacity: 0.8;
644
- padding: 5px;
645
- font-size: 10px;
646
- position: absolute;
647
- bottom: 14px;
648
- z-index: 100000;
649
- }
650
- .vjs-tip .vjs-tip-arrow {
651
- background: url(data:image/gif;base64,R0lGODlhCQAJAIABAAAAAAAAACH5BAEAAAEALAAAAAAJAAkAAAIRjAOnwIrcDJxvwkplPtchVQAAOw==) no-repeat top left;
652
- bottom: 0;
653
- left: 50%;
654
- margin-left: -4px;
655
- background-position: bottom left;
656
- position: absolute;
657
- width: 9px;
658
- height: 5px;
659
- }
660
- .vjs-tip .vjs-tip-inner {
661
- border-radius: 3px;
662
- -moz-border-radius: 3px;
663
- -webkit-border-radius: 3px;
664
- padding: 5px 8px 4px 8px;
665
- background-color: black;
666
- color: white;
667
- max-width: 200px;
668
- text-align: center;
669
- }
670
-
671
- /* a wrapper element that tracks the mouse vertically */
672
- .vjs-thumbnail-holder {
673
- position: absolute;
674
- left: -1000px;
675
- }
676
-
677
- /* the thumbnail image itself */
678
- .vjs-thumbnail {
679
- position: absolute;
680
- left: 0;
681
- bottom: 1.3em;
682
- opacity: 0;
683
- transition: opacity .2s ease;
684
- -webkit-transition: opacity .2s ease;
685
- -moz-transition: opacity .2s ease;
686
- -mz-transition: opacity .2s ease;
687
- }
688
-
689
- /* fade in the thumbnail when hovering over the progress bar */
690
- /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
691
- .vjs-progress-control:hover .vjs-thumbnail,
692
- .vjs-progress-control.fake-active .vjs-thumbnail,
693
- .vjs-progress-control:active .vjs-thumbnail {
694
- opacity: 1;
695
- }
696
-
697
- /* ... but hide the thumbnail when hovering directly over it */
698
- .vjs-progress-control:hover .vjs-thumbnail:hover,
699
- .vjs-progress-control:active .vjs-thumbnail:active {
700
- opacity: 0;
701
- }
702
-
703
703
  .vjs-poster {
704
704
  display: inline-block;
705
705
  vertical-align: middle;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,m as s}from"./generic-7e22e260.js";import{g as c}from"./resolution-62be852a.js";import{p as d}from"./skin-16f83185.js";import{g as u}from"./localisation-0bf399a1.js";import{g as m}from"./player_instance-34118a5b.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=d(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=d(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-v2-6446fe47.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=m(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-7033ccfb.js").then(function(r){var o=r.default,l=m(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-81d21874.js").then(function(r){var o=r.seriesModule,l=m(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-a12206bc.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-c9b18ef8.js").then(function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},w=function(e,t){import("./settings-icon-e8ed293a.js").then(function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},I=function(e,t){import("./playlist-efc64fc5.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},E=function(e,t){import("./series-v2-05b04cf6.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},O=function(e,t){import("./multicamv2-bc51f879.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=m(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=m(e).el(),n=0,r=m(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},L=function(e,t){import("./videoSelector-f7c3d747.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},_=function(e,t){import("./series-v2-224ee9f1.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},x=function(e,t){import("./multicamv2-140c7b5f.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},N=function(e,t){import("./start-begin-btn-798fe08c.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("startFromBeginingButton",r);var l=o.getChild("controlBar").addChild("startFromBeginingButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},T=function(e,t){import("./watch-live-btn-d4d27011.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("watchLiveButton",r);var l=o.getChild("controlBar").addChild("watchLiveButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};export{B as a,j as b,b as c,y as d,C as e,w as f,S as g,M as h,g as i,L as j,x as k,I as l,_ as m,P as n,k as o,E as p,O as q,N as r,T as s};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,m as s}from"./generic-63e4557c.js";import{g as c}from"./resolution-62be852a.js";import{p as d}from"./skin-16f83185.js";import{g as u}from"./localisation-0bf399a1.js";import{g as m}from"./player_instance-34118a5b.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=d(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=d(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-v2-6446fe47.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=m(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-68eb0785.js").then(function(r){var o=r.default,l=m(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-016bb1c9.js").then(function(r){var o=r.seriesModule,l=m(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-bb89e286.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-c9b18ef8.js").then(function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},w=function(e,t){import("./settings-icon-e8ed293a.js").then(function(n){var r,o,l,a,s=n.default,c=m(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},I=function(e,t){import("./playlist-26e445f5.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},E=function(e,t){import("./series-v2-0d2dd639.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},O=function(e,t){import("./multicamv2-c67371c1.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=m(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=m(e).el(),n=0,r=m(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},L=function(e,t){import("./videoSelector-b4b6876d.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},_=function(e,t){import("./series-v2-6b9fe00e.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},x=function(e,t){import("./multicamv2-879ad44b.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},N=function(e,t){import("./start-begin-btn-798fe08c.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("startFromBeginingButton",r);var l=o.getChild("controlBar").addChild("startFromBeginingButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},T=function(e,t){import("./watch-live-btn-d4d27011.js").then(function(n){var r=n.default,o=m(e);i.registerComponent("watchLiveButton",r);var l=o.getChild("controlBar").addChild("watchLiveButton",h({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};export{B as a,j as b,b as c,y as d,C as e,w as f,S as g,M as h,g as i,L as j,x as k,I as l,_ as m,P as n,k as o,E as p,O as q,N as r,T as s};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"js-cookie";import{UAParser as a}from"ua-parser-js";import{a as u,r as d}from"./captions-b619441b.js";import{c as s}from"./skin-16f83185.js";function c(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function v(e){window.dataLayer=window.dataLayer||[],c("js",new Date),c("config",e)}function m(e,n){c("event",e,n)}var p={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function f(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function I(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?f(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var E={name:"@viewlift/player",version:"2.0.54",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","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 g,T=function(e,n){var t,o,r,l,a,u,d,s;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:null!==(a=window)&&void 0!==a&&null!==(u=a.customData)&&void 0!==u&&u.overrideEntitlementBaseUrl?(null===(d=window)||void 0===d||null===(s=d.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":O.get()+"".concat(null==p?void 0:p.getVideoDetails),params:I({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version},withCredentials:!0})},h=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:O.get()+p.getLinearChannelDetails,params:I(I(I(I(I({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},y=function(e,n){var t,o,r=B(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},w=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return o=e.sent,e.abrupt("return",i({url:O.get()+"".concat(null==p?void 0:p.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:I({},n),params:I({},(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)}}(),_=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:O.get()+"".concat(null==p?void 0:p.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},b=function(e){var n=e.videoId;return i({method:"GET",url:O.get()+"".concat(null==p?void 0:p.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},O=(g=null==p?void 0:p.apiBaseUrl,{set:function(e){e&&(g=e)},get:function(){return g}}),D=function(e,n,t,o){return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},S=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 R,V,W,F,C,A,N=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=O.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),U=null,j=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"))||!S(n)){e.next=6;break}return U||(U=N().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||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,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},B=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},M=function(e){V=e},x=function(){return V},H=function(e){R=e},G=function(){return R},Y=function(){return W},z=function(e){W=e},q=function(){return C},X=function(e){F=new Map,e.map(function(e,n){F.set(e.id,n)})},J=function(e){if(F){var n=F.get(e);z(n+1)}},K=(A=0,{set:function(e){e>=0&&(A=e)},get:function(){return A}});function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Z(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Q(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var $=function(){var e,n,t,o,i,r,l,a=x();return"linearchannel"===((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.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==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function ne(){var e=window.sessionStorage.getItem("uid");return e||(e=ee(),window.sessionStorage.setItem("uid",e),e)}function te(){return oe.apply(this,arguments)}function oe(){return(oe=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}var re=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function le(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&function(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=ee(),u="WEBSITE",d=null,s=0,c=null,v=0,f=0,I=!1,E=[],g=r(e);if(g){var T,h,y,w,_=re(function(){for(var e=g.currentTime(),n=g.buffered(),t=0;t<n.length;t++){var o=n.start(t),i=n.end(t);if(e>=o&&e<=i)return Math.round(i-e)}return 0}),b=function(){var e=n(t.mark(function e(n){var o,r,d,s,c,v,m,f,I,E,g;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return I=e.sent,E=B(I),e.t0=Z,e.t1=Z,e.t2=null==E?void 0:E.site,e.t3=null==E?void 0:E.siteId,e.t4=u,e.t5=ne(),e.t6=$(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11="production",e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?ie(n.adPosition):"",e.next=25,te();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(r=n.ttFirstFrame)&&void 0!==r?r:null,e.t24=null!==(d=n.bitrate)&&void 0!==d?d:null,e.t25=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t26=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t27=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),g=[e.t32],i({url:(null==l||null===(f=l.beacon)||void 0===f?void 0:f.url)||O.get()+p.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:g}).catch(function(e){return console.error(e)});case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e){if(!g.paused()&&g.readyState()>2)return clearInterval(d),clearInterval(c),e;var n,t=e+.1;return+t.toFixed(2)>=5&&f<4&&I?(f++,m("BUFFERING",Z({pfm:u,uid:ne(),vid:$(),videoPosition:Math.floor(g.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),b({eventName:"BUFFERING",videoPosition:Math.floor(g.currentTime),isAdEvent:!1}),0):t};T=Math.floor(g.currentTime),g.on("error",function(){var e,n=Math.floor(g.currentTime);clearInterval(d);var t=T===n?"FAILED_TO_START":"DROPPED_STREAM";m(t,Z({pfm:u,uid:ne(),vid:$(),videoPosition:n},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),b({eventName:t,videoPosition:n,isAdEvent:!1})}),h=!1,g.on("waiting",re(function(){I&&(h=!0,clearInterval(d),d=setInterval(function(){h&&!g.paused()?v=D(v):clearInterval(d)},100))})),g.on("playing",re(function(){h=!1,clearInterval(d)})),y=function(e){var n,t,o,i=Z({videoPosition:Math.floor(g.currentTime),isAdEvent:!0,bufferHealth:_(),pfm:u,uid:ne(),vid:$(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==l||null===(o=l.beacon)||void 0===o?void 0:o.params);m(e,Z({},i)),b(Z({eventName:e,adPosition:1},i))},g.on("adstart",function(){y("AD_REQUEST"),y("AD_IMPRESSION")}),g.on("adskip",function(){s=0}),g.on("adend",function(){s=0}),g.on("timeupdate",function(){var e,n,t,o,i=Math.floor(g.currentTime());if(console.log(i,E),i>=30&&i%30==0&&!E.includes(i)){var r,l=null===(r=g.el().getElementsByTagName("video"))||void 0===r?void 0:r[0];f=0,E.push(i),b({eventName:"PING",videoPosition:i,isAdEvent:!1,duration:30,resHeight:(null==l?void 0:l.videoHeight)||null,resWidth:(null==l?void 0:l.videoWidth)||null,bufferHealth:_(),bitrate:Math.round((null==g||null===(e=g.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)})}}),w=re(function(){var e;s=0,c=setInterval(function(){s=D(s)},100),m("PLAY",Z({pfm:u,uid:ne(),vid:$(),videoPosition:Math.floor(g.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),b({eventName:"PLAY",videoPosition:Math.floor(g.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":$(),watchTime:Math.floor(g.currentTime)})}),g.one("play",w),g.on("loadeddata",function(){g.one("timeupdate",function(){var e;clearInterval(c),clearInterval(d),v=s||0,m("FIRST_FRAME",Z({pfm:u,uid:ne(),vid:$(),videoPosition:Math.floor(g.currentTime),ttFirstFrame:s,bufferHealth:_()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),b({eventName:"FIRST_FRAME",videoPosition:Math.floor(g.currentTime),isAdEvent:!1,ttFirstFrame:s,bufferHealth:_()}),I=!0,s=0})})}else console.error("Videojs: Player instance not found.")}(e,o,l)}var ae=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ue=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},de=function(e,n){var t=new Map;b({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),C=t}).catch(function(e){return console.log(e)})},se=function(){var e=K.get();return e>=0?e+1:1},ce=function(){var e,n,t,o=G(),i=x(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=K.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function ve(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 me(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ve(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}window._deviceInfo=a(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},fe=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},Ee=function(){var n,t,o,i,a,u,d,s,c,v,m,p,f,I,E,g,T,h,y,w,_,b,O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",D=arguments.length>1?arguments[1]:void 0,S=arguments.length>2?arguments[2]:void 0,P=(null==S?void 0:S.siteName)||"",L=(null==S?void 0:S.contentType)||"video",R=(null==S||null===(n=S[L])||void 0===n?void 0:n.metadata)||(null==S||null===(t=S[L])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.metadata),V=r(D);if(!O.includes("VIEWLIFT_"))return O;var W,F=window.getComputedStyle(document.getElementById(D),null),C=Math.trunc(F.getPropertyValue("height").slice(0,-2)),A=Math.trunc(F.getPropertyValue("width").slice(0,-2)),N="linearchannel"===L?null==S||null===(i=S.linearchannel)||void 0===i||null===(a=i.channels)||void 0===a||null===(u=a.find(function(e){return(null==e?void 0:e.id)===(null==S?void 0:S.channelId)}))||void 0===u||null===(d=u.content)||void 0===d?void 0:d.id:Ie(S,"video.gist.id",""),U="linearchannel"===L?null==S||null===(s=S.linearchannel)||void 0===s||null===(c=s.channels)||void 0===c||null===(v=c.find(function(e){return(null==e?void 0:e.id)===(null==S?void 0:S.channelId)}))||void 0===v?void 0:v.title:Ie(S,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),j=null,k=null;"function"==typeof window.__gpp&&(null===(W=window)||void 0===W||W.__gpp("ping",function(e){j=null==e?void 0:e.gppString,k=null==e?void 0:e.sectionList[0]}));var B=me(me({},ge(R)),{},(w={VIEWLIFT_WIDTH:A,VIEWLIFT_HEIGHT:C,VIEWLIFT_SIZE:pe(A,C),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===(m=window)||void 0===m?void 0:m.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(S,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(S,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(S,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==V||null===(p=V.options_)||void 0===p?void 0:p.autoplay)||1,VIEWLIFT_MUTE:(null==V||null===(f=V.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:fe(S),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(S,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(S,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(g=E.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==P||"usanetwork"==P?"":Ie(null===(T=window)||void 0===T||null===(h=T.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(S,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(S,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(S,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(S,"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:fe(S),VIEWLIFT_GPP_SID:k||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:j||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(w,"VIEWLIFT_LAT",""),e(w,"VIEWLIFT_APP_BUNDLE",""),e(w,"VIEWLIFT_ATT_CONSENT",""),w),null===(_=window)||void 0===_||null===(b=_.customData)||void 0===b?void 0:b.macros);for(var M in B){var x=new RegExp(M,"g");O=O.replace(x,B[M])}return O},ge=function(e){var n,t,o,i,r,l,a={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var d=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return d||s?(ue()?d?a=me(me({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):s&&(a=me(me({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):d?a=me(me({},a),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):s&&(a=me(me({},a),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),d?a=me(me({},a),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):s&&(a=me(me({},a),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),a=ue()?me(me({},a),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):me(me({},a),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(a=me(me({},a),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),a=ue()?me(me({},a),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):me(me({},a),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),a=me(me({},a),{},{VIEWLIFT_AFID:u.get("afid")})},Te=function(e,n){var t,o,i,r,l,a,u,d,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,E=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,g=null==e||null===(r=e[f])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(a=e[f])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(d=u.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=g&&g.hls)return ye(g);if(I){var y=we(E,n);return y.src=Ee(y.src,n,e),y}if("Safari"!==ae()&&h)return he(E);if(T){var w=ye(E);return w.src=Ee(w.src,n,e),w}if(null!=E&&E.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(E);return _.src=Ee(_.src,n,e),_}return null},he=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},we=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,u=ae();if(r(n),"Safari"===u){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return _e(n),d}var s,c={src:l.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:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var _e=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==ae()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},be=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},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 o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},De=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var o=Ee(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima)return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var u=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&u.hasAttribute("controls")&&u.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),l.one(d,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function Le(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var Re=function(e){o(e).play()},Ve=function(e){o(e).pause()},We=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Fe=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Ce=function(e){return!!o.getPlayer("".concat(e))},Ae=function(e){return o(e).paused()},Ne=function(){var e=n(t.mark(function e(n,o){var i,l,a,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]&&u[2],e.next=3,j();case 3:return l=e.sent,a=r(n),e.abrupt("return",new Promise(function(e,t){h(o,l).then(function(t){var r=null==t?void 0:t.data;window.sid=ee(),r.contentType="linearchannel",r.channelId=null==o?void 0:o.channelId;var l=Te(r,n);M(r),l&&i?(Me(n,l),a.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)}}(),Ue=function(){var e=n(t.mark(function e(n,o,i){var l,a,s,c,v,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return c=e.sent,(G()||null)&&J(o),v=0,m=0,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(s=a.watchHistory)&&void 0!==s&&s.enable&&_(o,c).then(function(e){var n,t,o,i,r,l;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,t){T(o,c).then(function(o){var i,l,a,s,c,p,f,I,E,g,T=null==o?void 0:o.data,h=(null==T||null===(i=T.video)||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;M(o.data);var y=(null==T||null===(a=T.ads)||void 0===a||null===(s=a.preRoll)||void 0===s||null===(c=s.adTags)||void 0===c||null===(p=c.web)||void 0===p?void 0:p.active)&&(null==T||null===(f=T.ads)||void 0===f||null===(I=f.preRoll)||void 0===I||null===(E=I.adTags)||void 0===E||null===(g=E.web)||void 0===g?void 0:g.url);y&&Pe(n,y,T);var w=Te(T,n);if(w){var _,b,O,D,S,P,L,R,V,W,F,C,A,N,U=(null==T||null===(_=T.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==T||null===(O=T.video)||void 0===O||null===(D=O.gist)||void 0===D||null===(S=D.imageGist)||void 0===S?void 0:S.r16x9),j=r(n);if(j.poster(U),Me(n,w),j.on("loadstart",function(){h&&e({status:!0,msg:"Video Loaded",response:T})}),j.on("loadeddata",function(){De(),e({status:!0,msg:"Video Loaded",response:T})}),j.one("play",function(){v&&m<95&&setTimeout(function(){j.currentTime(v)},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==T||null===(P=T.video)||void 0===P||null===(L=P.contentDetails)||void 0===L||null===(R=L.closedCaptions)||void 0===R?void 0:R.length)>0||(null==T||null===(V=T.video)||void 0===V||null===(W=V.closedCaptions)||void 0===W?void 0:W.length)>0)F=((null==T||null===(C=T.video)||void 0===C||null===(A=C.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==T||null===(N=T.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),u(n,F);else d(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,o)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),je=function(e,n,t){var o=r(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},ke=function(e){var n=r(e);if(Be(),s(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Be=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()},Me=function(e,n){var t=r(e);t&&t.src(n)},xe=function(n,t,o,i){var r,l,a,u,d,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Oe(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Le(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},He=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{y as A,de as B,K as C,H as D,je as E,Re as F,Ve as G,Ce as H,Ue as I,Ne as J,ke as K,D as L,O as M,k as N,L as O,S as P,v as Q,ue as R,Y as S,Ae as T,z as U,b as V,X as W,J as X,ce as a,G as b,se as c,ae as d,x as e,Te as f,ne as g,De as h,Oe as i,M as j,q as k,Me as l,We as m,Ee as n,He as o,le as p,Pe as q,Fe as r,w as s,be as t,B as u,T as v,_ as w,xe as x,j as y,h as z};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{S as n,b as r,e as i}from"./generic-7e22e260.js";import{s as a}from"./autoNextVideo-44e6d7e6.js";import{e as o}from"./icons-c139587c.js";import{p as l,t as u}from"./skin-16f83185.js";import s from"@babel/runtime/helpers/typeof";import c from"video.js";import d from"@babel/runtime/helpers/asyncToGenerator";import p from"@babel/runtime/regenerator";import m from"@babel/runtime/helpers/defineProperty";import v from"@babel/runtime/helpers/slicedToArray";var f,g,h,b,y=[],x=!1,w=function(i,a){var u;if(x=!1,null!=a&&null!==(u=a.series)&&void 0!==u&&u.enable){var s;y=[];var c=r();null==c||c.map(function(t){var n;return(n=y).push.apply(n,e(t.episodes))}),null==a||null===(s=a.series)||void 0===s||s.cb}else{var d,p;y=(null==a||null===(d=a.relatedVideos)||void 0===d?void 0:d.content)||[],null==a||null===(p=a.relatedVideos)||void 0===p||p.cb}var m=t(i);m.on("timeupdate",function(){var e,t;if(!x){var r=Math.floor(m.currentTime()),i=m.duration(),a=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=y)||void 0===t?void 0:t.length)-1?a&&(a.style.visibility="visible"):a&&(a.style.visibility="hidden")}});var v,f=y.filter(function(e,t){return t==n()});if((null==f?void 0:f.length)>0)if(null!==(v=document.getElementsByClassName("next-ep-preview"))&&void 0!==v&&v[0]){var g,h,b,w,A,N,k,j,C,O,T,I;(null===(g=document.getElementsByClassName("next-ep-preview"))||void 0===g?void 0:g[0]).style.visibility="hidden";var B=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],L=null===(b=document.getElementsByClassName("next-ep-img"))||void 0===b?void 0:b[0],S=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],M=null===(A=f[0])||void 0===A?void 0:A.title;(null===(N=M)||void 0===N?void 0:N.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),L.src=(null===(k=f[0])||void 0===k||null===(j=k.gist)||void 0===j||null===(C=j.imageGist)||void 0===C?void 0:C.r16x9)||(null==f||null===(O=f[0])||void 0===O?void 0:O.img)||(null===(T=window)||void 0===T||null===(I=T.customData)||void 0===I?void 0:I.fallbackImage),S.onclick=function(){return E(i)}}else{var P,R,D,$,X,F,U,_,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var G=document.createElement("div");G.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var V=document.createElement("div");V.className="next-ep-close",V.onclick=function(){q.style.visibility="hidden",x=!0},V.appendChild(l(o())),G.append(W),G.append(V);var z=null===(P=f[0])||void 0===P?void 0:P.title,H=document.createElement("img");H.className="next-ep-img",H.src=(null===(R=f[0])||void 0===R||null===(D=R.gist)||void 0===D||null===($=D.imageGist)||void 0===$?void 0:$.r16x9)||(null==f||null===(X=f[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(U=F.customData)||void 0===U?void 0:U.fallbackImage);var Q=document.createElement("div");Q.className="next-ep-title",(null===(_=z)||void 0===_?void 0:_.length)>60&&(z=z.substr(0,60)+"..."),Q.textContent="".concat(z);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(H),Y.append(Q),Y.onclick=function(){return E(i)},q.append(G),q.append(Y)}},E=function(e,r){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=n();a(l,e,y)}};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}f={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},g=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},h=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},b=function e(t){return"HTML"!==t.nodeName&&"static"===h(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(e){var t,n,r,i,a,o,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=g({},f,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",g(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",function(e){o=i.duration()}),i.on("loadedmetadata",function(e){o=i.duration()}),(a=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=b(a.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=b(a.el()).getBoundingClientRect().left+v,i=Math.floor((s-a.el().offsetLeft)/a.width()*o),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&&g(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=h(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+m-p:s<m&&(s=m),t.style.left=s+"px"},a.on("mousemove",l),a.on("touchmove",l),a.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},a.on("mouseout",u),a.on("touchcancel",u),a.on("touchend",u),i.on("userinactive",u)});var k="my-player";function j(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 C(){return(C=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function O(e,t){return T.apply(this,arguments)}function T(){return(T=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",j(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function I(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=t(k);if(i&&a){var o=i.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*a.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return C.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function B(e){return L.apply(this,arguments)}function L(){return(L=d(p.mark(function e(t){var n,r,i,a;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=N(N({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},m(u,"left","-60px"),m(u,"border","1px solid transparent"),m(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",u(function(e){return I(e,n,r)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u(function(e){return I(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var S=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.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:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function M(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return R.apply(this,arguments)}function R(){return(R=d(p.mark(function e(n,r){var a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,P,R,X,F,U,_,q,G,W,V,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,me,ve;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,a=t(r),o=n.split("/"),l=o.findIndex(function(e){return"dash"===e.toLowerCase()}),u=M(-1!==l?o.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==a?void 0:a.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],P=S.getAttribute("value"),R=null==P?void 0:P.split("x"),X=v(R,2),F=X[0],U=X[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),q=(_?B/_:B)/(F*U),G=L.getAttribute("id"),W=Math.round(b/q),V=Math.ceil(W/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(V))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<V;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:q,layout:P,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",G)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),ae=N.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=D(ce),w=0;w<se;w++)ve=me?$(me,w+de):ce,pe.push({duration:oe,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function D(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function $(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 X(e){return F.apply(this,arguments)}function F(){return(F=d(p.mark(function e(n){var r,i,a,o,l,u,s,c,d,m,v,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(a=i.player)||void 0===a?void 0:a.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,O(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return m=(null==d?void 0:d[0])||null,v=m.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,S(f,v);case 12:return g=e.sent,e.next=15,B(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,P(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,B(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function U(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",a.append(o),r.el().appendChild(a),r.on("useractive",function(){a.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||a.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}}export{w as a,U as b,X as i};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{S as n,b as r,e as i}from"./generic-63e4557c.js";import{s as a}from"./autoNextVideo-cfe8aa87.js";import{e as o}from"./icons-c139587c.js";import{p as l,t as u}from"./skin-16f83185.js";import s from"@babel/runtime/helpers/typeof";import c from"video.js";import d from"@babel/runtime/helpers/asyncToGenerator";import p from"@babel/runtime/regenerator";import m from"@babel/runtime/helpers/defineProperty";import v from"@babel/runtime/helpers/slicedToArray";var f,g,h,b,y=[],x=!1,w=function(i,a){var u;if(x=!1,null!=a&&null!==(u=a.series)&&void 0!==u&&u.enable){var s;y=[];var c=r();null==c||c.map(function(t){var n;return(n=y).push.apply(n,e(t.episodes))}),null==a||null===(s=a.series)||void 0===s||s.cb}else{var d,p;y=(null==a||null===(d=a.relatedVideos)||void 0===d?void 0:d.content)||[],null==a||null===(p=a.relatedVideos)||void 0===p||p.cb}var m=t(i);m.on("timeupdate",function(){var e,t;if(!x){var r=Math.floor(m.currentTime()),i=m.duration(),a=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=y)||void 0===t?void 0:t.length)-1?a&&(a.style.visibility="visible"):a&&(a.style.visibility="hidden")}});var v,f=y.filter(function(e,t){return t==n()});if((null==f?void 0:f.length)>0)if(null!==(v=document.getElementsByClassName("next-ep-preview"))&&void 0!==v&&v[0]){var g,h,b,w,A,N,k,j,C,O,T,I;(null===(g=document.getElementsByClassName("next-ep-preview"))||void 0===g?void 0:g[0]).style.visibility="hidden";var B=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],L=null===(b=document.getElementsByClassName("next-ep-img"))||void 0===b?void 0:b[0],S=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],M=null===(A=f[0])||void 0===A?void 0:A.title;(null===(N=M)||void 0===N?void 0:N.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),L.src=(null===(k=f[0])||void 0===k||null===(j=k.gist)||void 0===j||null===(C=j.imageGist)||void 0===C?void 0:C.r16x9)||(null==f||null===(O=f[0])||void 0===O?void 0:O.img)||(null===(T=window)||void 0===T||null===(I=T.customData)||void 0===I?void 0:I.fallbackImage),S.onclick=function(){return E(i)}}else{var P,R,D,$,X,F,U,_,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var G=document.createElement("div");G.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var V=document.createElement("div");V.className="next-ep-close",V.onclick=function(){q.style.visibility="hidden",x=!0},V.appendChild(l(o())),G.append(W),G.append(V);var z=null===(P=f[0])||void 0===P?void 0:P.title,H=document.createElement("img");H.className="next-ep-img",H.src=(null===(R=f[0])||void 0===R||null===(D=R.gist)||void 0===D||null===($=D.imageGist)||void 0===$?void 0:$.r16x9)||(null==f||null===(X=f[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(U=F.customData)||void 0===U?void 0:U.fallbackImage);var Q=document.createElement("div");Q.className="next-ep-title",(null===(_=z)||void 0===_?void 0:_.length)>60&&(z=z.substr(0,60)+"..."),Q.textContent="".concat(z);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(H),Y.append(Q),Y.onclick=function(){return E(i)},q.append(G),q.append(Y)}},E=function(e,r){var i=t(e),o=Math.floor(i.currentTime());if(Math.floor(i.duration())!=o){i.pause(e);var l=n();a(l,e,y)}};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}f={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},g=function e(){var t,n,r,i,a;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(a in i=t[r])i.hasOwnProperty(a)&&("object"===s(i[a])?n[a]=e(n[a],i[a]):n[a]=i[a]);return n},h=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},b=function e(t){return"HTML"!==t.nodeName&&"static"===h(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(e){var t,n,r,i,a,o,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=g({},f,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",g(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",function(e){o=i.duration()}),i.on("loadedmetadata",function(e){o=i.duration()}),(a=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=b(a.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=b(a.el()).getBoundingClientRect().left+v,i=Math.floor((s-a.el().offsetLeft)/a.width()*o),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&&g(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=h(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+m-p:s<m&&(s=m),t.style.left=s+"px"},a.on("mousemove",l),a.on("touchmove",l),a.on("pointerdown",function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)}),u=function(e){t.style.left="-1000px"},a.on("mouseout",u),a.on("touchcancel",u),a.on("touchend",u),i.on("userinactive",u)});var k="my-player";function j(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 C(){return(C=d(p.mark(function e(t){var n,r,i,a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,a=t.layout.split("x").map(Number),o=v(a,2),l=o[0],u=o[1],s=i.width/u,c=i.height/l,d=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function O(e,t){return T.apply(this,arguments)}function T(){return(T=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",j(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function I(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=t(k);if(i&&a){var o=i.getBoundingClientRect(),l=(e.clientX-o.left)/o.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var o=Math.floor((i+a)/2),l=t[o];if(l===e)return l;l<e?i=o+1:a=o-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[a])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*a.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return C.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function B(e){return L.apply(this,arguments)}function L(){return(L=d(p.mark(function e(t){var n,r,i,a;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),a=i[0]*i[1],o=e.duration,l=0;l<a;l++){var u,s=Math.round((t*a+l)*o);n[s]=N(N({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},m(u,"left","-60px"),m(u,"border","1px solid transparent"),m(u,"borderRadius","4px"),u)})}}),r=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",u(function(e){return I(e,n,r)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u(function(e){return I(e,n,r)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var S=function(){var e=d(p.mark(function e(t,n){var r,i,a,o,l,u,s,c;return p.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:i=e.sent,a=i.split("\n").map(function(e){return e.trim()}),o=[],l=null,u=0;case 10:if(!(u<(null==a?void 0:a.length))){e.next=27;break}if(!(s=a[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,o.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function M(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return R.apply(this,arguments)}function R(){return(R=d(p.mark(function e(n,r){var a,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,P,R,X,F,U,_,q,G,W,V,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,ae,oe,le,ue,se,ce,de,pe,me,ve;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,a=t(r),o=n.split("/"),l=o.findIndex(function(e){return"dash"===e.toLowerCase()}),u=M(-1!==l?o.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==a?void 0:a.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],P=S.getAttribute("value"),R=null==P?void 0:P.split("x"),X=v(R,2),F=X[0],U=X[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),q=(_?B/_:B)/(F*U),G=L.getAttribute("id"),W=Math.round(b/q),V=Math.ceil(W/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(V))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<V;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:q,layout:P,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",G)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),ae=N.getAttribute("timescale"),oe=(ae?ie/ae:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/oe),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=D(ce),w=0;w<se;w++)ve=me?$(me,w+de):ce,pe.push({duration:oe,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function D(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function $(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 X(e){return F.apply(this,arguments)}function F(){return(F=d(p.mark(function e(n){var r,i,a,o,l,u,s,c,d,m,v,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(a=i.player)||void 0===a?void 0:a.getSource():c,null===(o=c)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,O(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return m=(null==d?void 0:d[0])||null,v=m.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,S(f,v);case 12:return g=e.sent,e.next=15,B(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,P(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,B(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function U(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(i),o.alt="Provider Image",a.append(o),r.el().appendChild(a),r.on("useractive",function(){a.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||a.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}}export{w as a,U as b,X as i};