@viewlift/player-backup 1.0.26-backup → 1.0.28-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 (50) hide show
  1. package/cjs/{autoNextVideo-1bc5151b.js → autoNextVideo-2de28585.js} +1 -1
  2. package/cjs/bundle.css +4 -4
  3. package/cjs/{caption-settings-3ac346d5.js → caption-settings-492c5f4d.js} +1 -1
  4. package/cjs/{features-f9595ee3.js → features-bf40511f.js} +1 -1
  5. package/cjs/generic-61a04b56.js +1 -0
  6. package/cjs/index.js +1 -1
  7. package/cjs/{keyboardShortcuts-d09370d2.js → keyboardShortcuts-55e7f705.js} +1 -1
  8. package/cjs/{multicam-890ff54b.js → multicam-d9245db6.js} +1 -1
  9. package/cjs/{multicamv2-f5852c90.js → multicamv2-78e4b78e.js} +1 -1
  10. package/cjs/{mwebPotraitTray-929daa84.js → mwebPotraitTray-1a51be7a.js} +1 -1
  11. package/cjs/{nextEpisodeButton-01dc596e.js → nextEpisodeButton-2886746a.js} +1 -1
  12. package/cjs/{playlist-d1dffc8b.js → playlist-9d39bc7f.js} +1 -1
  13. package/cjs/{renditions-26d2d63b.js → renditions-78da9f6e.js} +1 -1
  14. package/cjs/{resolution-e303df24.js → resolution-37caaa39.js} +1 -1
  15. package/cjs/{series-8cb0fbcc.js → series-c81c6b47.js} +1 -1
  16. package/cjs/{series-v2-b403701a.js → series-v2-ff110911.js} +1 -1
  17. package/cjs/{settings-icon-cfc84629.js → settings-icon-44caaec2.js} +1 -1
  18. package/cjs/{skin-02820c58.js → skin-12412566.js} +1 -1
  19. package/cjs/{skin-d5a30cd0.js → skin-1a7bf74c.js} +1 -1
  20. package/cjs/{skin-f1cef0f8.js → skin-2aef6803.js} +1 -1
  21. package/cjs/{skin-3b34ed08.js → skin-853c858e.js} +1 -1
  22. package/cjs/{skin-addb2069.js → skin-bb596642.js} +1 -1
  23. package/cjs/{util-0dbc1940.js → util-1999a9e1.js} +1 -1
  24. package/cjs/{videoSelector-a64fbe11.js → videoSelector-910fffaf.js} +1 -1
  25. package/esm/{autoNextVideo-81f976b3.js → autoNextVideo-7c28ffd7.js} +1 -1
  26. package/esm/bundle.css +4 -4
  27. package/esm/{caption-settings-9e96a1a6.js → caption-settings-e120cf24.js} +1 -1
  28. package/esm/{features-31f521e5.js → features-e4412ca1.js} +1 -1
  29. package/esm/{generic-f3b08872.js → generic-20cda696.js} +1 -1
  30. package/esm/index.js +1 -1
  31. package/esm/{keyboardShortcuts-5bc2bd8b.js → keyboardShortcuts-2888741f.js} +1 -1
  32. package/esm/{multicam-b7433592.js → multicam-513d2b08.js} +1 -1
  33. package/esm/{multicamv2-d8980e3c.js → multicamv2-1a937a02.js} +1 -1
  34. package/esm/{mwebPotraitTray-b635b5ff.js → mwebPotraitTray-65b13d2c.js} +1 -1
  35. package/esm/{nextEpisodeButton-a6a1aac9.js → nextEpisodeButton-d97c9a52.js} +1 -1
  36. package/esm/{playlist-e0263f3b.js → playlist-42685a48.js} +1 -1
  37. package/esm/{renditions-5db592e1.js → renditions-1f5c2515.js} +1 -1
  38. package/esm/{resolution-a5f9717d.js → resolution-9986273e.js} +1 -1
  39. package/esm/{series-81766318.js → series-82605a0f.js} +1 -1
  40. package/esm/{series-v2-fddbb3a7.js → series-v2-f5b6c034.js} +1 -1
  41. package/esm/{settings-icon-430546b1.js → settings-icon-e49bb8fc.js} +1 -1
  42. package/esm/{skin-a08cb600.js → skin-0f991954.js} +1 -1
  43. package/esm/{skin-1ee7df35.js → skin-3b092cca.js} +1 -1
  44. package/esm/{skin-7d0d3fcd.js → skin-6ad39183.js} +1 -1
  45. package/esm/{skin-81e3dbbe.js → skin-8d7a0329.js} +1 -1
  46. package/esm/{skin-c3d19023.js → skin-f2e5daa3.js} +1 -1
  47. package/esm/{util-3fbdea6d.js → util-b58da0b7.js} +1 -1
  48. package/esm/{videoSelector-5bc9473c.js → videoSelector-84193520.js} +1 -1
  49. package/package.json +1 -1
  50. package/cjs/generic-05343c4d.js +0 -1
@@ -1 +1 @@
1
- import{g as t}from"./generic-f3b08872.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
1
+ import{g as t}from"./generic-20cda696.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as l,e as r}from"./icons-c2efba97.js";import{g as d,o as c,J as s}from"./generic-f3b08872.js";import{d as m,h as u}from"./skin-793f68b7.js";import{a as p}from"./autoNextVideo-81f976b3.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-3fbdea6d.js";function v(e){var t=h();return function(){var o,a=i(e);if(t){var l=i(this).constructor;o=Reflect.construct(a,arguments,l)}else o=a.apply(this,arguments);return n(this,o)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var f=a.getComponent("Component"),y=function(n){o(h,f);var i=v(h);function h(t){var o,n,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(a=i.call(this,t,l)).playerId=l.playerId,a.seriesData=l.sres,a.videos=l.related.content,a.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=l.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(s(0),p({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(h,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),m=a.dom.createEl("div",{className:"video-selector-content"}),p=a.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n,i,l,r,d=a.dom.createEl("div",{className:"video -".concat(e)}),v=a.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){s(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";u(e),c(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.fallbackImage)),h.alt="No Thumbnail Available",v.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(r=t.videos[e])||void 0===r?void 0:r.title)||"")});a.dom.appendContent(d,v),a.dom.appendContent(d,f),a.dom.appendContent(p,d),a.dom.appendContent(m,p)},h=0;h<this.videos.length;h++)v(h);a.dom.appendContent(n,i),a.dom.appendContent(n,l),a.dom.appendContent(e,n),a.dom.appendContent(e,m),d(this.playerId).on("fullscreenchange",(function(){var o=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}))}}]),h}();export{y as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as l,e as r}from"./icons-c2efba97.js";import{g as d,o as c,J as s}from"./generic-20cda696.js";import{d as m,h as u}from"./skin-793f68b7.js";import{a as p}from"./autoNextVideo-7c28ffd7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-b58da0b7.js";function v(e){var t=h();return function(){var o,a=i(e);if(t){var l=i(this).constructor;o=Reflect.construct(a,arguments,l)}else o=a.apply(this,arguments);return n(this,o)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var f=a.getComponent("Component"),y=function(n){o(h,f);var i=v(h);function h(t){var o,n,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(a=i.call(this,t,l)).playerId=l.playerId,a.seriesData=l.sres,a.videos=l.related.content,a.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=l.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(s(0),p({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(h,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),m=a.dom.createEl("div",{className:"video-selector-content"}),p=a.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n,i,l,r,d=a.dom.createEl("div",{className:"video -".concat(e)}),v=a.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){s(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";u(e),c(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.fallbackImage)),h.alt="No Thumbnail Available",v.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(r=t.videos[e])||void 0===r?void 0:r.title)||"")});a.dom.appendContent(d,v),a.dom.appendContent(d,f),a.dom.appendContent(p,d),a.dom.appendContent(m,p)},h=0;h<this.videos.length;h++)v(h);a.dom.appendContent(n,i),a.dom.appendContent(n,l),a.dom.appendContent(e,n),a.dom.appendContent(e,m),d(this.playerId).on("fullscreenchange",(function(){var o=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}))}}]),h}();export{y as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "1.0.26-backup",
3
+ "version": "1.0.28-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "amdName": "_playerCore",
6
6
  "dependencies": {
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("video.js"),n=require("axios");require("js-cookie");var o=require("ua-parser-js"),i={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"};function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var a={name:"@viewlift/player-backup",version:"1.0.26-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.0","videojs-ima":"^2.1.0"}},d=function(e,t){var o,i,r,d;return null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):n({url:g(),params:l({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(d=r.customData)||void 0===d?void 0:d.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":a.version},withCredentials:!0})},s=function(e,t){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return n({method:"GET",url:v(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var p=window.contentType;return n({method:"GET",url:m(e,p),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},u=function(e){return E()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV2,"/").concat(e)},c=function(){return E()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV1)},v=function(e){return E()+"".concat(null==i?void 0:i.getVideoInfoV1,"/").concat(e)},m=function(e,t){return E()+"".concat(null==i?void 0:i.getVideoInfoV2,"/").concat(t,"/").concat(e)},p=function(){return E()+"".concat(null==i?void 0:i.saveWatchHistoryV1)},I=function(){return E()+"".concat(null==i?void 0:i.saveWatchHistoryV2)},g=function(){return E()+"".concat(null==i?void 0:i.getVideoDetails)},E=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==i?void 0:i.apiBaseUrl)},f=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},T=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var y=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?w(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=o(navigator.userAgent);var _,O,b,D,V,L=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},S=function(e){var t=W(e,"video.tags",[]),n=W(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},W=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},C=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},x=function(){var e,t,n,o,i,r,l,a,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,I=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,g=q(m);if(!v.includes("VIEWLIFT_"))return v;var E=window.getComputedStyle(document.getElementById(m),null),f=Math.trunc(E.getPropertyValue("height").slice(0,-2)),T=Math.trunc(E.getPropertyValue("width").slice(0,-2)),y=W(p,"video.gist.id",""),w=h(h({},A(I)),{},{VIEWLIFT_WIDTH:T,VIEWLIFT_HEIGHT:f,VIEWLIFT_SIZE:L(T,f),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===(t=window)||void 0===t?void 0:t.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:W(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:W(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:W(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(n=g.options_)||void 0===n?void 0:n.autoplay)||1,VIEWLIFT_MUTE:(null==g||null===(o=g.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:S(p),VIEWLIFT_MEDIA_ID:y,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(W(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:y,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+W(p,"video.gist.permalink","")),VIEWLIFT_COPPA:W(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:W(null===(a=window)||void 0===a||null===(d=a.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*W(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:W(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:y,VIEWLIFT_CONTENT_TITLE:W(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:W(p,"video.series[0].gist.title",W(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:W(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:W(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:W(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var _ in w){var O=new RegExp("\\b("+_+")\\b","g");v=v.replace(O,w[_])}return v},A=function(e){var t,n,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(C()?s?a=h(h({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=h(h({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=h(h({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=h(h({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=h(h({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=h(h({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=C()?h(h({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):h(h({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=h(h({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=C()?h(h({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):h(h({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},F=function(e,t){var n,o,i,r,l,a,d,s,u,c,v,m,p,I=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,g=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e.video)||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,f=(null==e||null===(a=e.video)||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e.video)||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e.video)||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.audioAssetSource&&null!=E&&E.hls)return R(E);if(I){var w=N(g,t);return w.src=x(w.src,t,e),w}if("Safari"!==y()&&T)return P(g);if(f){var h=R(g);return h.src=x(h.src,t,e),h}if(null!=g&&g.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return _.src=x(_.src,t,e),_}return null},P=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},R=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},N=function(e,n){var o=e.fairPlay,i=e.widevine,r=e.playReady,l=y(),a=q(n);if("Safari"===l){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};t.xhr(i,(function(e,t,n){console.log(e),e&&o(e),o(null,new Uint8Array(n))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(n,o,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}};t.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(o);try{a.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s={src:i.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s};var k=function(e){O=e},j=function(e){b=e},B=function(e){if(D){var t=D.get(e);j(t+1)}},U=function(e,t){var n=q(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},M=!1,H=function(e,t,n){var o=x(t,e,n),i=q(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=q(e);if(null!==r.el_){M=!0;var l={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),M&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.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"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))};function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var G=function(e){return!!t.getPlayer("".concat(e))},q=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},Y=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()},J=function(e,t){q(e).src(t)},K=function(t,n,o,i){var r,l,a,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);G(n)&&f(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?z(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):z(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.addCaptions=U,exports.clearError=T,exports.createIdxMapping=function(e){D=new Map,e.map((function(e,t){D.set(e.id,t)}))},exports.detectBrowser=y,exports.disableCaptions=function(e,t){for(var n=q(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=q(e);if(Y(),window.onresize=null,window.onfocus=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){for(var n=q(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=t||(i.mode="showing")}},exports.getCaptions=function(e){var t,n=q(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=function(){return _},exports.getCurrentVideo=function(){return O},exports.getPlayer=q,exports.getSeriesDetails=function(e,t){var o,i,r=JSON.parse(atob(t.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})})):n({url:E()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,o;if("v1"==((null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return n({method:"GET",url:c(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return n({method:"GET",url:u(i),headers:{Authorization:e.token}})},exports.getSeriesWatchMap=function(){return V},exports.getSource=F,exports.getVideoDetails=d,exports.getVideoIdx=function(){return b},exports.getVideoInfo=s,exports.handleError=f,exports.initialiseAdvertisement=H,exports.initiateErrorHandling=K,exports.isPaused=function(e){return t(e).paused()},exports.isPlayerInitialised=G,exports.isTokenExpired=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},exports.load=function(e,t,n){var o,i,r;B(t);var l=0,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&s(t,n).then((function(e){var t,n,o,i,r,d;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,a=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedPercentage)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){d(t,n).then((function(t){var n,r,d,s,u,c,v,m,p,I,g=null==t?void 0:t.data,E=(null==g||null===(n=g.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;k(t.data);var y=(null==g||null===(d=g.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(I=p.web)||void 0===I?void 0:I.url);y&&H(e,y,g);var w=F(g,e);if(w){var h,_,O,b,D,V,L,S,W,C,x,A,P,R,N=(null==g||null===(h=g.video)||void 0===h||null===(_=h.gist)||void 0===_?void 0:_.videoImageUrl)||(null==g||null===(O=g.video)||void 0===O||null===(b=O.gist)||void 0===b||null===(D=b.imageGist)||void 0===D?void 0:D.r16x9),j=q(e);if(j.poster(N),J(e,w),j.on("loadstart",(function(){E&&o({status:!0,msg:"Video Loaded",response:g})})),j.on("loadeddata",(function(){T(),o({status:!0,msg:"Video Loaded",response:g})})),j.one("play",(function(){l&&a<95&&setTimeout((function(){j.currentTime(l)}),0)})),j.one("error",(function(){var e;i({status:!1,msg:(null==j||null===(e=j.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(V=g.video)||void 0===V||null===(L=V.contentDetails)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0||(null==g||null===(W=g.video)||void 0===W||null===(C=W.closedCaptions)||void 0===C?void 0:C.length)>0)x=((null==g||null===(A=g.video)||void 0===A||null===(P=A.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==g||null===(R=g.video)||void 0===R?void 0:R.closedCaptions)).filter((function(e){return"VTT"===e.format})),U(e,x);else!function(e){var t=q(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else f(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){K(n,e,i,t)}))}))},exports.loadVideo=J,exports.loadVideoInstantly=function(e,t,n){var o=q(e);return o.src(t),new Promise((function(e,t){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){t(e).pause()},exports.play=function(e){t(e).play()},exports.rewind=function(e,n){var o=t(e),i=o.currentTime(),r=i<=n?0:i-n;o.currentTime(r)},exports.saveWatchHistory=function(e,t,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return n({url:p(),method:"POST",headers:{Authorization:t,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r=l({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return n({url:I(),method:"POST",headers:{Authorization:t},data:r,params:l({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},exports.setCurrentSeries=function(e){_=e},exports.setCurrentVideo=k,exports.setSeriesWatchMap=function(e){V=e},exports.setVideoIdx=j,exports.setVideoIdxById=B,exports.skip=function(e,n){var o=t(e),i=o.currentTime()+n;o.currentTime(i)};