@viewlift/player-backup 1.0.19 → 1.0.21

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 (80) hide show
  1. package/cjs/{autoNextVideo-9bf5e059.js → autoNextVideo-56b33d9e.js} +1 -1
  2. package/cjs/bundle.css +4 -17
  3. package/cjs/caption-settings-d6c88aed.js +1 -0
  4. package/cjs/chromett-f925fb6c.js +1 -0
  5. package/cjs/features-df8e9920.js +1 -0
  6. package/cjs/generic-e7a63618.js +1 -0
  7. package/cjs/icons-0f7b3404.js +1 -0
  8. package/cjs/index.js +1 -1
  9. package/cjs/{keyboardShortcuts-80a22655.js → keyboardShortcuts-464a2d8b.js} +1 -1
  10. package/cjs/{multicam-6d196749.js → multicam-c53f0d53.js} +1 -1
  11. package/cjs/{multicamv2-ecd4b647.js → multicamv2-24183e0b.js} +1 -1
  12. package/cjs/{mwebPotraitTray-07e029bb.js → mwebPotraitTray-a4b25327.js} +1 -1
  13. package/cjs/nextEpisodeButton-49890fcf.js +1 -0
  14. package/cjs/{playlist-67cc4404.js → playlist-121b2ae3.js} +1 -1
  15. package/cjs/{renditions-6ed6d272.js → renditions-8db1b641.js} +1 -1
  16. package/cjs/resolution-563a1ba0.js +1 -0
  17. package/cjs/series-90feed57.js +1 -0
  18. package/cjs/series-v2-c174a244.js +1 -0
  19. package/cjs/settings-icon-0aa0abe9.js +1 -0
  20. package/cjs/skin-0c3657a9.js +1 -0
  21. package/cjs/skin-1fcb10e7.js +1 -0
  22. package/cjs/{skin-737212fd.js → skin-4c8c6e23.js} +1 -1
  23. package/cjs/{skin-d1a173ec.js → skin-80b6248c.js} +1 -1
  24. package/cjs/{skin-3119a431.js → skin-85b7e33c.js} +1 -1
  25. package/cjs/skin-ad02ae20.js +1 -0
  26. package/cjs/{util-b78b59cd.js → util-77826b59.js} +1 -1
  27. package/cjs/{videoSelector-15d71e4c.js → videoSelector-1333afb7.js} +1 -1
  28. package/esm/{autoNextVideo-a0ab10df.js → autoNextVideo-359b4578.js} +1 -1
  29. package/esm/bundle.css +4 -17
  30. package/esm/caption-settings-20586b62.js +1 -0
  31. package/esm/chromett-a3cbb2e1.js +1 -0
  32. package/esm/features-3a0c4853.js +1 -0
  33. package/esm/generic-9fe79484.js +1 -0
  34. package/esm/icons-c2efba97.js +1 -0
  35. package/esm/index.js +1 -1
  36. package/esm/{keyboardShortcuts-740d7aab.js → keyboardShortcuts-dbb4d620.js} +1 -1
  37. package/esm/{multicam-1a2e2f8d.js → multicam-5c88ebcb.js} +1 -1
  38. package/esm/{multicamv2-11d4e4de.js → multicamv2-961f6e0d.js} +1 -1
  39. package/esm/{mwebPotraitTray-0e573723.js → mwebPotraitTray-1d16253e.js} +1 -1
  40. package/esm/nextEpisodeButton-879a381b.js +1 -0
  41. package/esm/playlist-080a0b3f.js +1 -0
  42. package/esm/{renditions-7612f0f0.js → renditions-b6ca6ed3.js} +1 -1
  43. package/esm/resolution-dcd52ff1.js +1 -0
  44. package/esm/series-3e2753ad.js +1 -0
  45. package/esm/series-v2-1607b372.js +1 -0
  46. package/esm/settings-icon-8003580c.js +1 -0
  47. package/esm/skin-163fdcdd.js +1 -0
  48. package/esm/{skin-9a498834.js → skin-185d9364.js} +1 -1
  49. package/esm/skin-4a285a68.js +1 -0
  50. package/esm/{skin-b05f744c.js → skin-7d48d134.js} +1 -1
  51. package/esm/{skin-a041f17c.js → skin-d8917b4d.js} +1 -1
  52. package/esm/skin-f91e6b8a.js +1 -0
  53. package/esm/{util-3c535313.js → util-72c30630.js} +1 -1
  54. package/esm/{videoSelector-e94a7bc2.js → videoSelector-679e4f04.js} +1 -1
  55. package/package.json +1 -1
  56. package/cjs/caption-settings-82f2cfb7.js +0 -1
  57. package/cjs/features-45567aab.js +0 -1
  58. package/cjs/generic-3e926f51.js +0 -1
  59. package/cjs/icons-51594f89.js +0 -1
  60. package/cjs/nextEpisodeButton-9594213c.js +0 -1
  61. package/cjs/resolution-0c7f6847.js +0 -1
  62. package/cjs/series-9917b221.js +0 -1
  63. package/cjs/series-v2-82201c89.js +0 -1
  64. package/cjs/settings-icon-c88b790b.js +0 -1
  65. package/cjs/skin-0dbbb750.js +0 -1
  66. package/cjs/skin-84083352.js +0 -1
  67. package/cjs/skin-b5e383d4.js +0 -1
  68. package/esm/caption-settings-e43e5804.js +0 -1
  69. package/esm/features-a7caf132.js +0 -1
  70. package/esm/generic-de24d0d1.js +0 -1
  71. package/esm/icons-f5378bf3.js +0 -1
  72. package/esm/nextEpisodeButton-4316ed73.js +0 -1
  73. package/esm/playlist-54e8bfb2.js +0 -1
  74. package/esm/resolution-88cfa577.js +0 -1
  75. package/esm/series-fa7ef197.js +0 -1
  76. package/esm/series-v2-8917e79a.js +0 -1
  77. package/esm/settings-icon-ece1e270.js +0 -1
  78. package/esm/skin-166870ac.js +0 -1
  79. package/esm/skin-665ec17e.js +0 -1
  80. package/esm/skin-de0c2ebb.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-0f7b3404.js"),s=require("./generic-e7a63618.js"),c=require("./renditions-8db1b641.js"),d=require("./resolution-563a1ba0.js"),u=require("./skin-ad02ae20.js");function p(e){var t=m();return function(){var n,a=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return i(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/assertThisInitialized");var v=r.getComponent("Component"),h=function(i){a(m,v);var o=p(m);function m(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,m),(n=o.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l.SettingsSvgV2())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./settings-icon-e6a8feee.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(u.closeOpenDrawers(),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 n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),i=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var o=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:"Settings"}),c=r.dom.createEl("div",{className:"settings-selector-content"}),d=r.dom.createEl("div",{className:"settings-container"}),u=this.createVideoQualityContainer();r.dom.appendContent(d,u);var p=this.createAudioQualityContainer();r.dom.appendContent(d,p),r.dom.appendContent(a,i),r.dom.appendContent(a,o),r.dom.appendContent(e,a),r.dom.appendContent(e,c),r.dom.appendContent(c,d),s.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createAudioQualityContainer",value:function(){var e=s.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=r.dom.createEl("div",{className:"audio-language-container"}),a=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:"Audio Language"});r.dom.appendContent(n,a);for(var i=function(e){var a,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(n,i)},o=0;o<t.length;o++)i(o);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=r.dom.createEl("div",{className:"video-quality-container"}),a=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:"Video Quality"});r.dom.appendContent(n,a);var i=[].concat(e(c.getRenditions(this.playerId)),[{height:"Auto"}]);d.playSelectedResolution(this.playerId,"raw",!0);for(var o=function(e){var a,o,l,s=document.createElement("label");s.className="video-quality-holder",s.setAttribute("for","quality".concat(e));var c=document.createElement("div");c.className="video-quality - ".concat(e);var p=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),m=document.createTextNode(p);if(c.appendChild(m),(null==i||null===(l=i[e])||void 0===l?void 0:l.height)>=720)for(var v=u.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=v&&v.firstChild;)c.appendChild(v.firstChild);var h=r.dom.createEl("input",{className:"radio - ".concat(e),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});h.setAttribute("type","radio"),h.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?d.playSelectedResolution(t.playerId,a,!0):d.playSelectedResolution(t.playerId,a)},r.dom.appendContent(s,h),r.dom.appendContent(s,c),r.dom.appendContent(n,s)},l=0;l<i.length;l++)o(l);return n}}]),m}();exports.default=h;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./features-df8e9920.js"),t=require("./icons-0f7b3404.js"),l=require("./generic-e7a63618.js"),i=require("./skin-ad02ae20.js"),n=require("./renditions-8db1b641.js"),o=require("@babel/runtime/helpers/toConsumableArray"),r=require("./autoNextVideo-56b33d9e.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("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-77826b59.js");var a=l.getCurrentSeries(),d=[];null==a||a.map((function(e){return d.push.apply(d,o(e.episodes))}));var u=function(e,t){var i;null==t||null===(i=t.series)||void 0===i||i.cb;var n=l.getPlayer(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),i=n.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-t<=10&&l.getVideoIdx()<=(null==d?void 0:d.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=d.filter((function(e,t){return t==l.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var a,u,v,c,m,p,g,h,f,y,C;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var b=null===(u=document.getElementsByClassName("next-ep-title"))||void 0===u?void 0:u[0],x=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],j=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],w=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=w)||void 0===p?void 0:p.length)>60&&(w=w.substr(0,60)+"..."),b.textContent="".concat(w),x.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(C=y.customData)||void 0===C?void 0:C.fallbackImage),j.onclick=function(){return s(e)}}else{var q,E,N,B,V,S,k,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(q=r[0])||void 0===q?void 0:q.title,R=document.createElement("img");R.className="next-ep-img",R.src=(null===(E=r[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(S=V.customData)||void 0===S?void 0:S.fallbackImage);var O=document.createElement("div");O.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),O.textContent="".concat(M);var T=document.createElement("div");T.className="next-ep-content",T.append(R),T.append(O),T.onclick=function(){return s(e)},P.append(I),P.append(T)}},s=function(e,t){var i=l.getPlayer(e),n=Math.floor(i.currentTime());if(Math.floor(i.duration())!=n){i.pause(e);var o=l.getVideoIdx();r.switchToNext(o,e,d,sessionStorage.getItem("token"))}};function v(t,i){var o=l.getPlayer(t);o.on("loadeddata",(function(){var r,a,d;(null===(r=n.getRenditions(t))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(t,i),(null===(a=l.getCaptions(t))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(t,i),null!=i&&null!==(d=i.series)&&void 0!==d&&d.enable&&u(t,i),function(e,t){var l,i=Math.floor(e/60),n=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];n&&(n.style.marginRight=i>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");t&&o.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",n&&(n.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var l,i,n,o;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}exports.initialiseSkin=function(n,o){!function(){"Chrome"==l.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-921d35a8.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),v(n,o),function(e,n){var o=l.getPlayer(e);o.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MinimizeSvg(window.controlsColor))),o.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var r=document.getElementsByClassName("vjs-time-control");n.liveVideo&&(r[0].style.display="none")}(n,o),function(l,i){var n,o,r,a,d,u;0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)&&e.addSkipButton(l,"defaultV2",t.SkipSvgV2());(0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)||1==(null==i?void 0:i.liveui))&&e.addRewindButton(l,"defaultV2",t.RewindSvgV2());i.liveVideo||e.addSlowMotion(l);(null==i||null===(n=i.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);(null==i||null===(r=i.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);(null==i||null===(a=i.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(l,null==i?void 0:i.playlist);null!=i&&null!==(u=i.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(l,i)}(n,o),function(e,t){var i=l.getPlayer(e),n=null==t?void 0:t.tvProviderLogoUrl;if(!n)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(n),r.alt="Provider Image",o.append(r),i.el().appendChild(o),i.on("useractive",(function(){o.classList.remove("vjs-fade")})),i.on("userinactive",(function(){i.paused()||o.classList.add("vjs-fade")})),i.on("fullscreenchange",(function(){i.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(n,o)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./generic-e7a63618.js"),r=require("./renditions-8db1b641.js"),i=require("./features-df8e9920.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),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("./skin-ad02ae20.js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-f225a42e.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var e;(null===(e=r.getRenditions(t))||void 0===e?void 0:e.length)>0&&i.addSettingsButtonV2(t,n)}))}(t,n)};
@@ -1 +1 @@
1
- "use strict";var e=require("./features-45567aab.js"),r=require("./keyboardShortcuts-80a22655.js"),t=require("./icons-51594f89.js"),i=require("./generic-3e926f51.js"),n=require("./skin-84083352.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("./renditions-6ed6d272.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(s,o){r.initialiseKeyboardEvents(s,o),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,i){0==i.liveVideo&&0==i.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==i.liveVideo&&0==i.liveui||1==i.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(s,o),function(r,n){var s=i.getPlayer(r),o=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-9594213c.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,i.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var t;o&&(e.addSeriesModule(r,null==n||null===(t=n.sres)||void 0===t?void 0:t.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(s,o),function(e,r){var s=i.getPlayer(e),o=document.getElementsByClassName("vjs-current-time")[0],l=document.getElementsByClassName("vjs-duration")[0],a=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(o&&(o.style.display="none"),l&&(l.style.display="none"),a&&(a.style.display="none"));s.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),s.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var u=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(t.NewCaptionsSvg()));var d=document.createElement("div");d.classList.add("caption-header"),u.querySelector(".vjs-menu-content").insertBefore(d,u.querySelector(".vjs-menu-item"))}(s,o)};
1
+ "use strict";var e=require("./features-df8e9920.js"),r=require("./keyboardShortcuts-464a2d8b.js"),t=require("./icons-0f7b3404.js"),i=require("./generic-e7a63618.js"),n=require("./skin-ad02ae20.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("./renditions-8db1b641.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(s,o){r.initialiseKeyboardEvents(s,o),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,i){0==i.liveVideo&&0==i.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==i.liveVideo&&0==i.liveui||1==i.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(s,o),function(r,n){var s=i.getPlayer(r),o=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-49890fcf.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,i.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var t;o&&(e.addSeriesModule(r,null==n||null===(t=n.sres)||void 0===t?void 0:t.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(s,o),function(e,r){var s=i.getPlayer(e),o=document.getElementsByClassName("vjs-current-time")[0],l=document.getElementsByClassName("vjs-duration")[0],a=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(o&&(o.style.display="none"),l&&(l.style.display="none"),a&&(a.style.display="none"));s.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),s.controlBar.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var u=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(t.NewCaptionsSvg()));var d=document.createElement("div");d.classList.add("caption-header"),u.querySelector(".vjs-menu-content").insertBefore(d,u.querySelector(".vjs-menu-item"))}(s,o)};
@@ -1 +1 @@
1
- "use strict";var e,t=require("./features-45567aab.js"),n=require("./icons-51594f89.js"),r=require("./generic-3e926f51.js"),s=require("./skin-84083352.js"),o=require("@babel/runtime/helpers/defineProperty"),i=require("./keyboardShortcuts-80a22655.js");function l(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 a(e,i){var a=r.getPlayer(e);a.one("play",(function(){null!=i&&i.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},i)),null!=i&&i.airplay&&"Safari"==r.detectBrowser()&&a.addChild("airPlayButton"),null!=i&&i.chromecastReceiverId&&a.addChild("chromecastButton"),a.addChild("FullscreenToggle"),a.getChild("FullscreenToggle").el().appendChild(s.createIconMarkup(n.MinimizeSvg(window.controlsColor))),a.getChild("FullscreenToggle").el().appendChild(s.createIconMarkup(n.MaximizeSvg(window.controlsColor))),u(e)})),a.on("loadedmetadata",(function(){window.endFirstFrame(a),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),a.one("loadedmetadata",(function(){var n;null!=i&&i.streams&&(null==i||null===(n=i.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,i)}))}function u(t){var n=r.getPlayer(t);d(),n.on("pause",(function(){clearTimeout(e),c()})),n.on("play",(function(){d()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){c(),n.paused()||d()})),s.addEventListener("touchstart",(function(){c(),d()})),s.addEventListener("mousemove",(function(){c(),n.paused()||d()}))}function c(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function d(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}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("./renditions-6ed6d272.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=u,exports.initialiseSkin=function(e,o){var l;i.initialiseKeyboardEvents(e,o),(null==(l=o)||!l.liveui)&&(null==l||!l.liveVideo)||null!=l&&l.liveui&&null!=l&&l.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,n){t.addSlowMotion(e)}(e),function(e,t){var o=r.getPlayer(e),i=o.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(s.createIconMarkup(n.NewCaptionsSvg()));var l=document.createElement("div");l.classList.add("caption-header"),i.querySelector(".vjs-menu-content").insertBefore(l,i.querySelector(".vjs-menu-item"));var a=document.createElement("div");if(a.innerText="Captions",a.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(a),"Safari"==r.detectBrowser()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,o),a(e,o)};
1
+ "use strict";var e,t=require("./features-df8e9920.js"),n=require("./icons-0f7b3404.js"),r=require("./generic-e7a63618.js"),s=require("./skin-ad02ae20.js"),o=require("@babel/runtime/helpers/defineProperty"),i=require("./keyboardShortcuts-464a2d8b.js");function l(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 a(e,i){var a=r.getPlayer(e);a.one("play",(function(){null!=i&&i.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},i)),null!=i&&i.airplay&&"Safari"==r.detectBrowser()&&a.addChild("airPlayButton"),null!=i&&i.chromecastReceiverId&&a.addChild("chromecastButton"),a.addChild("FullscreenToggle"),a.getChild("FullscreenToggle").el().appendChild(s.createIconMarkup(n.MinimizeSvg(window.controlsColor))),a.getChild("FullscreenToggle").el().appendChild(s.createIconMarkup(n.MaximizeSvg(window.controlsColor))),u(e)})),a.on("loadedmetadata",(function(){window.endFirstFrame(a),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),a.one("loadedmetadata",(function(){var n;null!=i&&i.streams&&(null==i||null===(n=i.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,i)}))}function u(t){var n=r.getPlayer(t);d(),n.on("pause",(function(){clearTimeout(e),c()})),n.on("play",(function(){d()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){c(),n.paused()||d()})),s.addEventListener("touchstart",(function(){c(),d()})),s.addEventListener("mousemove",(function(){c(),n.paused()||d()}))}function c(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function d(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}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("./renditions-8db1b641.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=u,exports.initialiseSkin=function(e,o){var l;i.initialiseKeyboardEvents(e,o),(null==(l=o)||!l.liveui)&&(null==l||!l.liveVideo)||null!=l&&l.liveui&&null!=l&&l.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,n){t.addSlowMotion(e)}(e),function(e,t){var o=r.getPlayer(e),i=o.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(s.createIconMarkup(n.NewCaptionsSvg()));var l=document.createElement("div");l.classList.add("caption-header"),i.querySelector(".vjs-menu-content").insertBefore(l,i.querySelector(".vjs-menu-item"));var a=document.createElement("div");if(a.innerText="Captions",a.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(a),"Safari"==r.detectBrowser()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,o),a(e,o)};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-3e926f51.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){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)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
1
+ "use strict";var e=require("./generic-e7a63618.js");require("@babel/runtime/helpers/defineProperty"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){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)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),r=function(e){var r=(new DOMParser).parseFromString(e,"image/svg+xml");return null==r?void 0:r.querySelector("svg")};exports.closeOpenDrawers=function(){var r=e(document.getElementsByClassName("vjs-control vjs-button open"));null==r||r.map((function(e){var r,t;null==e||null===(r=e.childNodes)||void 0===r||null===(t=r[0])||void 0===t||t.click()}))},exports.createIconMarkup=function(e){return r(e)},exports.highlightVideo=function(r){e(document.querySelectorAll("[video-idx]")).map((function(e){var t=e.getAttribute("video-idx");e.style.border=t==r?"2px solid white":"none"}))},exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.parseHtmlString=function(e){var r=(new DOMParser).parseFromString(e,"text/html");return null==r?void 0:r.querySelector("body")},exports.parseSvgString=r;
@@ -1 +1 @@
1
- "use strict";var t=require("./generic-3e926f51.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
1
+ "use strict";var t=require("./generic-e7a63618.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
@@ -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"),r=require("video.js"),a=require("./icons-51594f89.js"),l=require("./generic-3e926f51.js"),c=require("./skin-84083352.js"),s=require("./autoNextVideo-9bf5e059.js");function d(e){var t=u();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}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("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-b78b59cd.js");var v=r.getComponent("Component"),m=function(o){n(u,v);var i=d(u);function u(t){var n,o,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&s.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(u,[{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.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(c.closeOpenDrawers(),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 n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.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,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.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:"Recommended"}),d=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";c.highlightVideo(e),l.load(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 a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var s=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(n=t.videos[e])||void 0===n?void 0:n.title)||"")});r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(u,o),r.dom.appendContent(d,u)},m=0;m<this.videos.length;m++)v(m);r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(e,o),r.dom.appendContent(e,d),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}}]),u}();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"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-0f7b3404.js"),l=require("./generic-e7a63618.js"),c=require("./skin-ad02ae20.js"),s=require("./autoNextVideo-56b33d9e.js");function d(e){var t=u();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}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("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-77826b59.js");var v=r.getComponent("Component"),m=function(o){n(u,v);var i=d(u);function u(t){var n,o,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&s.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(u,[{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.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(c.closeOpenDrawers(),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 n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.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,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.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:"Recommended"}),d=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";c.highlightVideo(e),l.load(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 a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var s=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(n=t.videos[e])||void 0===n?void 0:n.title)||"")});r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(u,o),r.dom.appendContent(d,u)},m=0;m<this.videos.length;m++)v(m);r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(e,o),r.dom.appendContent(e,d),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}}]),u}();exports.default=m;
@@ -1 +1 @@
1
- import{g as n,o as t,b as o,I as e,H as i,J as a}from"./generic-de24d0d1.js";import{a as s}from"./util-3c535313.js";import{h as c}from"./skin-665ec17e.js";var r,u=0,f=0,l=function(l){clearTimeout(u);var v=null==l?void 0:l.content;r=null==l?void 0:l.cb;var d=l.playerId,g=sessionStorage.getItem("token");s(d,(function(){var s=n(d);0!==(null==s?void 0:s.currentTime())&&((f=i())>v.length-1||t(d,v[f].id,g).then((function(n){c(f),o(n.response),f++,a(f),h(n)})).catch((function(n){h(n),c(f),f++,a(f),u=setTimeout((function(){e(d)&&m(f,d,v,g)}),5e3)})))}))},m=function n(o,e,i,s,r){f=o,o>i.length-1||t(e,i[o].id,s).then((function(n){c(f),f++,a(f),h(n)})).catch((function(t){h(t),setTimeout((function(){c(f),f++,a(f),n(f,e,i,s)}),5e3)}))},h=function(n){r&&r(n)};export{l as a,m as s};
1
+ import{g as n,o as t,b as o,I as e,H as i,J as a}from"./generic-9fe79484.js";import{a as s}from"./util-72c30630.js";import{h as c}from"./skin-163fdcdd.js";var r,u=0,f=0,l=function(l){clearTimeout(u);var v=null==l?void 0:l.content;r=null==l?void 0:l.cb;var d=l.playerId,g=sessionStorage.getItem("token");s(d,(function(){var s=n(d);0!==(null==s?void 0:s.currentTime())&&((f=i())>v.length-1||t(d,v[f].id,g).then((function(n){c(f),o(n.response),f++,a(f),h(n)})).catch((function(n){h(n),c(f),f++,a(f),u=setTimeout((function(){e(d)&&m(f,d,v,g)}),5e3)})))}))},m=function n(o,e,i,s,r){f=o,o>i.length-1||t(e,i[o].id,s).then((function(n){c(f),f++,a(f),h(n)})).catch((function(t){h(t),setTimeout((function(){c(f),f++,a(f),n(f,e,i,s)}),5e3)}))},h=function(n){r&&r(n)};export{l as a,m as s};
package/esm/bundle.css CHANGED
@@ -1,19 +1,4 @@
1
1
 
2
- video::-webkit-media-text-track-container {
3
- display: none !important;
4
- visibility: hidden !important;
5
- }
6
-
7
- video::-webkit-media-text-track-background {
8
- display: none !important;
9
- visibility: hidden !important;
10
- }
11
-
12
- video::-webkit-media-text-track-display {
13
- display: none !important;
14
- visibility: hidden !important;
15
- }
16
-
17
2
 
18
3
 
19
4
 
@@ -149,6 +134,8 @@ video::-webkit-media-text-track-display {
149
134
  .widget-selector-content #sr-widget{
150
135
  padding: 0 18px;
151
136
  }
137
+
138
+
152
139
  .vjs-poster {
153
140
  display: inline-block;
154
141
  vertical-align: middle;
@@ -656,8 +643,8 @@ button.vjs-big-play-button {
656
643
  background: url('https://player.viewlift.com/images/ic_airplay_white_24px.svg') center center no-repeat;
657
644
  background-size: contain;
658
645
  display: inline-block;
659
- width: 15px;
660
- height: 15px;
646
+ width: 18px;
647
+ height: 18px;
661
648
  }
662
649
 
663
650
  .video-js .vjs-airplay-button:hover {
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-c2efba97.js";import{v as l,u as s,g as d,t as p}from"./generic-9fe79484.js";import{b as m}from"./skin-163fdcdd.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=v();return function(){var n,i=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return a(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var f=i.getComponent("Component"),h=function(a){n(v,f);var o=u(v);function v(t){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(n=o.call(this,t,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return t(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-2e47813b.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=l(this.playerId);null==t||t.map((function(t){return s(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(m(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px"):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);a.style.height="".concat(o,"px"),i.dom.appendContent(n,a),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(a)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=i.dom.createEl("div",{className:"caption-selector-head"}),o=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(c())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var r=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),p=this.createLanguageContanier();i.dom.appendContent(s,p);var m=this.createFontSizeContainer();i.dom.appendContent(s,m),i.dom.appendContent(a,o),i.dom.appendContent(a,r),i.dom.appendContent(e,a),i.dom.appendContent(e,l),i.dom.appendContent(l,s),d(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){l(e.playerId).map((function(t){return s(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),d=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){p(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},m=0;m<c.length;m++)d(m);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),v}();export{h as default};
@@ -0,0 +1 @@
1
+ var i="video::-webkit-media-text-track-container {\n display: none !important;\n visibility: hidden !important;\n}\n\nvideo::-webkit-media-text-track-background {\n display: none !important;\n visibility: hidden !important;\n}\n\nvideo::-webkit-media-text-track-display {\n display: none !important;\n visibility: hidden !important;\n}";export{i as default};
@@ -0,0 +1 @@
1
+ import t from"@babel/runtime/helpers/defineProperty";import e 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{g as a,r as s,j as c}from"./generic-9fe79484.js";import{g as d}from"./renditions-b6ca6ed3.js";import{p as u}from"./skin-163fdcdd.js";function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){var e=h();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}var f=function(t){var o=function(t){r(i,t);var o=p(i);function i(t,n){var r;e(this,i);var l=(r=o.call(this,t,n)).el_;return l.classList.add("vjs-slowmo-button"),l.innerHTML="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(t);l.getChild("controlBar").addChild("myButton",{},2)},g=function(t,o,l){var a=function(o){r(a,o);var i=p(a);function a(t,n){var r;e(this,a);var o=(r=i.call(this,t,n)).el_;o.classList.add("vjs-rewind-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(t,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(t).getChild("controlBar").addChild("myButton",{},1)},v=function(t,o,l){var a=function(o){r(a,o);var i=p(a);function a(t,n){var r;e(this,a);var o=(r=i.call(this,t,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){c(t,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(t).getChild("controlBar").addChild("myButton",{},1)},y=function(t,e){import("./multicam-5c88ebcb.js").then((function(n){var r=n.default,o=e.streams,l=a(t);i.registerComponent("multicamModule",r),l.getChild("controlBar").addChild("multicamModule",{playerId:t,streams:o,config:e},l.controlBar.children().length)}));var n=document.querySelector(".vjs-control-bar");n&&"live"==(null==e?void 0:e.skin)&&(n.style.background="transparent")},C=function(t,e,n){import("./resolution-dcd52ff1.js").then((function(r){var o=r.default;document.getElementById(t).getElementsByClassName("container")[0]&&document.getElementById(t).getElementsByClassName("container")[0].remove();var l=a(t),s=d(t);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:t,skin:e,icon:n,renditions:s},l.controlBar.children().length-4))}))},B=function(t,e,n){import("./nextEpisodeButton-879a381b.js").then((function(r){var o=r.default,l=a(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:t,res:e},l.controlBar.children().length-5)}))},b=function(t,e){import("./mwebPotraitTray-1d16253e.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("mwebPotraitTray",r),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:t,config:e},0)}))},j=function(t,e,n){import("./series-3e2753ad.js").then((function(r){var o=r.seriesModule,l=a(t);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:t,seriesData:e},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(t){s[t].addEventListener("click",(function(){e[t]&&r.handleSeasonChange(e[t],t,l,n)}))},d=0;d<s.length;d++)c(d)}))},k=function(t,e){import("./videoSelector-679e4f04.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:t,related:e},o.controlBar.children().length-3)}))},O=function(t,e){import("./caption-settings-20586b62.js").then((function(n){var r,o,l,s,c=n.default,d=a(t);i.registerComponent("captionSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(t))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("captionSelector",{playerId:t,options:e},d.controlBar.children().length-3)}))},S=function(t,e){import("./settings-icon-8003580c.js").then((function(n){var r,o,l,s,c=n.default,d=a(t);i.registerComponent("settingsSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(t))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("settingsSelector",{playerId:t,options:e},d.controlBar.children().length-3)}))},E=function(t,e){import("./playlist-080a0b3f.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:t,playlist:e},o.controlBar.children().length-3)}))},I=function(e,n){import("./series-v2-1607b372.js").then((function(r){var o=r.default,l=a(e);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({playerId:e},n),l.controlBar.children().length-3)}))},M=function(t,e){import("./multicamv2-961f6e0d.js").then((function(n){var r=n.default,o=a(t);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:t,streams:e},o.controlBar.children().length-4)}))},P=function(t,e){var n=a(t).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(e,"></iframe>")});n.append(r)};export{y as a,C as b,b as c,f as d,j as e,B as f,v as g,g as h,S as i,O as j,P as k,k as l,M as m,E as n,I as o};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"video.js";import n from"axios";import"js-cookie";import o from"ua-parser-js";var 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 a(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 l={name:"@viewlift/player-backup",version:"1.0.21",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:T(),params:a({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":l.version},withCredentials:!0})},s=function(e,t){var o,i,r=JSON.parse(atob(t.split(".")[1])),a=(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:y()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},u=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:f(),method:"POST",headers:{Authorization:t,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r=a({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:E(),method:"POST",headers:{Authorization:t},data:r,params:a({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},c=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 a,l,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return n({method:"GET",url:p(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return n({method:"GET",url:g(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},v=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:I(),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:m(i),headers:{Authorization:e.token}})},m=function(e){return y()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV2,"/").concat(e)},I=function(){return y()+"".concat(null==i?void 0:i.getSeriesWatchHistoryV1)},p=function(e){return y()+"".concat(null==i?void 0:i.getVideoInfoV1,"/").concat(e)},g=function(e,t){return y()+"".concat(null==i?void 0:i.getVideoInfoV2,"/").concat(t,"/").concat(e)},f=function(){return y()+"".concat(null==i?void 0:i.saveWatchHistoryV1)},E=function(){return y()+"".concat(null==i?void 0:i.saveWatchHistoryV2)},T=function(){return y()+"".concat(null==i?void 0:i.getVideoDetails)},y=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==i?void 0:i.apiBaseUrl)},w=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},h=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var 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)}},_=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var O=function(){var e,t,n,o;return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.onlyPlayReadyDRM||navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(n=window.navigator)||void 0===n||null===(o=n.userAgentData)||void 0===o?void 0:o.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 D(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 b(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?D(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):D(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=o(navigator.userAgent);var V,L,S,W,C,F=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},R=function(e){var t=A(e,"video.tags",[]),n=A(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},A=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},P=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},N=function(){var e,t,n,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,I=arguments.length>2?arguments[2]:void 0,p=null==I||null===(e=I.video)||void 0===e?void 0:e.metadata,g=ce(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),T=Math.trunc(f.getPropertyValue("width").slice(0,-2)),y=A(I,"video.gist.id",""),w=b(b({},k(p)),{},{VIEWLIFT_WIDTH:T,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:F(T,E),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:A(I,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:A(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:A(I,"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:R(I),VIEWLIFT_MEDIA_ID:y,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(A(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:y,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+A(I,"video.gist.permalink","")),VIEWLIFT_COPPA:A(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:A(null===(l=window)||void 0===l||null===(d=l.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*A(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:A(I,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:y,VIEWLIFT_CONTENT_TITLE:A(I,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:A(I,"video.series[0].gist.title",A(I,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:A(I,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:A(I,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:A(I,"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 h in w){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,w[h])}return v},k=function(e){var t,n,o,i,r,a,l={},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===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||u?(P()?s?l=b(b({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=b(b({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=b(b({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=b(b({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=b(b({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=b(b({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=P()?b(b({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):b(b({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=b(b({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=P()?b(b({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):b(b({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},j=function(e,t){var n,o,i,r,a,l,d,s,u,c,v,m=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,I=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,p=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1;null==e||null===(d=e.video)||void 0===d||null===(s=d.liveDetails)||void 0===s||s.isDvrEnabled;var g=(null==e||null===(u=e.video)||void 0===u||null===(c=u.streamingInfo)||void 0===c||null===(v=c.videoAssets)||void 0===v?void 0:v.dash)||!1;if(m){var f=x(I,t);return f.src=N(f.src,t,e),f}if("Safari"!==O()&&g)return B(I);if(p){var E=U(I);return E.src=N(E.src,t,e),E}if(null!=I&&I.mpeg){var T=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return T.src=N(T.src,t,e),T}return null},B=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},U=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},x=function(e,n){var o=e.fairPlay,i=e.widevine,r=e.playReady,a=O(),l=ce(n);if("Safari"===a){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 a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};t.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(o);try{l.eme()}catch(e){console.log("EME ERROR :",e)}return d}if("Chrome"===a||"Firefox"===a){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}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u}};var M=function(e){L=e},H=function(){return L},z=function(e){V=e},G=function(){return V},Y=function(){return S},J=function(e){S=e},K=function(e){C=e},q=function(){return C},X=function(e){W=new Map,e.map((function(e,t){W.set(e.id,t)}))},Z=function(e){if(W){var t=W.get(e);J(t+1)}},Q=function(e,t){for(var n=ce(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=t||(i.mode="showing")}},$=function(e,t){for(var n=ce(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},ee=function(e){var t,n=ce(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})))||[]},te=function(e,t){var n=ce(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})}))},ne=!1,oe=function(e,t,n){var o=N(t,e,n),i=ce(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=ce(e);if(null!==r.el_){ne=!0;var a={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(),ne&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.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 ie(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 re=function(e){t(e).play()},ae=function(e){t(e).pause()},le=function(e,n){var o=t(e),i=o.currentTime()+n;o.currentTime(i)},de=function(e,n){var o=t(e),i=o.currentTime(),r=i<=n?0:i-n;o.currentTime(r)},se=function(e){return!!t.getPlayer("".concat(e))},ue=function(e){return t(e).paused()},ce=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},ve=function(e,t,n){var o,i,r;Z(t);var a=0,l=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&&c(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)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,l=(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,I,p,g=null==t?void 0:t.data,f=(null==g||null===(n=g.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;M(t.data);var E=(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===(I=m.adTags)||void 0===I||null===(p=I.web)||void 0===p?void 0:p.url);E&&oe(e,E,g);var T=j(g,e);if(T){var y,w,O,D,b,V,L,S,W,C,F,R,A,P,N=(null==g||null===(y=g.video)||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||(null==g||null===(O=g.video)||void 0===O||null===(D=O.gist)||void 0===D||null===(b=D.imageGist)||void 0===b?void 0:b.r16x9),k=ce(e);if(k.poster(N),ge(e,T),k.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:g})})),k.on("loadeddata",(function(){_(),o({status:!0,msg:"Video Loaded",response:g})})),k.one("play",(function(){a&&l<95&&setTimeout((function(){k.currentTime(a)}),0)})),k.one("error",(function(){var e;i({status:!1,msg:(null==k||null===(e=k.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)F=((null==g||null===(R=g.video)||void 0===R||null===(A=R.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==g||null===(P=g.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),te(e,F);else!function(e){var t=ce(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else h(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){fe(n,e,i,t)}))}))},me=function(e,t,n){var o=ce(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)}))}))},Ie=function(e){var t=ce(e);if(pe(),window.onresize=null,window.onfocus=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},pe=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()},ge=function(e,t){ce(e).src(t)},fe=function(t,n,o,i){var r,a,l,d,s,u,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);se(n)&&h(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?ie(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ie(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}))},Ee=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")};export{d as A,fe as B,c as C,oe as D,te as E,z as F,G,Y as H,ue as I,J,X as K,Z as L,H as a,M as b,_ as c,O as d,q as e,v as f,ce as g,h,K as i,le as j,ae as k,me as l,ge as m,se as n,ve as o,re as p,Ie as q,de as r,u as s,Q as t,$ as u,ee as v,j as w,Ee as x,w as y,s as z};
@@ -0,0 +1 @@
1
+ var n=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-minimize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M40.397 37.511h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.004-9.004z' />\n <path fill='").concat(n||"white","' d='M24.443 26.763h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.003 9.004z' />\n </svg>")},C=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-maximize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M43.369 45.938h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.004 9.004z' />\n <path fill='").concat(n||"white","' d='M21.969 18.834h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.003-9.003z' />\n </svg>")},e=function(n){return'<svg style="width:16px" class=\'rewindbtn\' viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.88817 16.9913L7.72176 18.5762C9.58746 18.8613 11.4677 18.5376 13.1023 17.6161C17.1941 15.3094 18.4803 9.98978 15.9732 5.74243C13.47 1.50156 8.13865 -0.0590307 4.03665 2.25351C3.35173 2.64307 2.7379 3.12124 2.20384 3.67698L3.34087 4.82569C3.77642 4.37247 4.27773 3.98196 4.83679 3.66398C8.20452 1.76539 12.5901 3.04913 14.644 6.5288C16.6894 9.99402 15.6429 14.3223 12.3046 16.2043C10.9636 16.9602 9.42195 17.2257 7.88817 16.9913Z" fill=\''.concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.10742 0.462205L0.56205 5.24366L6.06202 5.79492L3.10742 0.462205Z" fill=\'').concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.80172 14.1769C10.1682 14.1769 10.5096 14.1082 10.8258 13.9708C11.142 13.8333 11.416 13.6241 11.6479 13.343C11.8798 13.0619 12.0615 12.7059 12.1928 12.275C12.3242 11.8441 12.3898 11.3368 12.3898 10.753C12.3898 10.1661 12.3242 9.65803 12.1928 9.22868C12.0615 8.79934 11.8798 8.44413 11.6479 8.16305C11.416 7.88197 11.142 7.6727 10.8258 7.53525C10.5096 7.3978 10.1682 7.32907 9.80172 7.32907C9.43524 7.32907 9.09551 7.3978 8.78254 7.53525C8.46956 7.6727 8.19794 7.88197 7.96767 8.16305C7.7374 8.44413 7.5574 8.79934 7.42767 9.22868C7.29794 9.65803 7.23308 10.1661 7.23308 10.753C7.23308 11.3368 7.29794 11.8441 7.42767 12.275C7.5574 12.7059 7.7374 13.0619 7.96767 13.343C8.19794 13.6241 8.46956 13.8333 8.78254 13.9708C9.09551 14.1082 9.43524 14.1769 9.80172 14.1769ZM6.54713 14.1028V13.2457H5.28226V7.39394H4.2947L2.14929 9.13139L2.52875 9.62714C2.5547 9.66112 2.59443 9.69123 2.64794 9.71749C2.70145 9.74374 2.76064 9.75687 2.82551 9.75687C2.86767 9.75687 2.91064 9.75069 2.95443 9.73834C2.99821 9.72598 3.04118 9.70282 3.08335 9.66884L4.09524 8.86266C4.08551 9.02946 4.08064 9.18853 4.08064 9.33988V13.2457H2.65524V14.1028H6.54713ZM9.30308 13.1136C9.46362 13.1893 9.62983 13.2271 9.80172 13.2271C9.97686 13.2271 10.1455 13.1893 10.3077 13.1136C10.4698 13.038 10.6133 12.9059 10.7382 12.7175C10.8631 12.5291 10.9628 12.2758 11.0374 11.9576C11.112 11.6395 11.1493 11.238 11.1493 10.753C11.1493 10.2681 11.112 9.86652 11.0374 9.54838C10.9628 9.23023 10.8631 8.97695 10.7382 8.78853C10.6133 8.60011 10.4698 8.46807 10.3077 8.39239C10.1455 8.31672 9.97686 8.27888 9.80172 8.27888C9.62983 8.27888 9.46362 8.31672 9.30308 8.39239C9.14254 8.46807 9.00064 8.60011 8.8774 8.78853C8.75416 8.97695 8.65605 9.23023 8.58308 9.54838C8.5101 9.86652 8.47362 10.2681 8.47362 10.753C8.47362 11.238 8.5101 11.6395 8.58308 11.9576C8.65605 12.2758 8.75416 12.5291 8.8774 12.7175C9.00064 12.9059 9.14254 13.038 9.30308 13.1136Z" fill=\'').concat(window.color||"white","' />\n </svg>")},i=function(){return'<svg class=\'rewindbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.22363 9.43675L3.152 11.3434L5.08151 9.43675M2.91616 10.8667C2.88115 10.5537 2.86319 10.2356 2.86319 9.91341C2.86319 5.17486 6.74945 1.3335 11.5434 1.3335C16.3374 1.3335 20.2236 5.17486 20.2236 9.91341C20.2236 14.652 16.3374 18.4933 11.5434 18.4933C8.8166 18.4933 6.38346 17.2505 4.79212 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M9.92694 13.0831V6.80067H8.94318C8.58633 7.20106 7.97871 7.53473 7.37109 7.64912V8.66918C7.68937 8.64058 8.22947 8.52618 8.51881 8.39272V13.0831H9.92694Z" fill="white"/>\n <path d="M13.6545 6.6958C11.8316 6.6958 11.1951 8.23065 11.1951 9.94664C11.1951 11.6817 11.7641 13.1975 13.6255 13.1975C15.5159 13.1975 16.0656 11.634 16.0656 9.9085C16.0656 8.12579 15.4291 6.6958 13.6545 6.6958ZM13.6545 7.78259C14.4839 7.78259 14.6382 8.69778 14.6382 9.91804C14.6382 11.1478 14.5225 12.1107 13.6448 12.1107C12.7479 12.1107 12.6128 11.0811 12.6128 9.92757C12.6128 8.57385 12.8443 7.78259 13.6545 7.78259Z" fill="white"/>\n </svg>'},t=function(){return'<svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M17.7273 13.7273C17.6063 14.0015 17.5702 14.3056 17.6236 14.6005C17.6771 14.8954 17.8177 15.1676 18.0273 15.3818L18.0818 15.4364C18.2509 15.6052 18.385 15.8057 18.4765 16.0265C18.568 16.2472 18.6151 16.4838 18.6151 16.7227C18.6151 16.9617 18.568 17.1983 18.4765 17.419C18.385 17.6397 18.2509 17.8402 18.0818 18.0091C17.913 18.1781 17.7124 18.3122 17.4917 18.4037C17.271 18.4952 17.0344 18.5423 16.7955 18.5423C16.5565 18.5423 16.3199 18.4952 16.0992 18.4037C15.8785 18.3122 15.678 18.1781 15.5091 18.0091L15.4545 17.9545C15.2403 17.745 14.9682 17.6044 14.6733 17.5509C14.3784 17.4974 14.0742 17.5335 13.8 17.6545C13.5311 17.7698 13.3018 17.9611 13.1403 18.205C12.9788 18.4489 12.8921 18.7347 12.8909 19.0273V19.1818C12.8909 19.664 12.6994 20.1265 12.3584 20.4675C12.0174 20.8084 11.5549 21 11.0727 21C10.5905 21 10.1281 20.8084 9.78708 20.4675C9.4461 20.1265 9.25455 19.664 9.25455 19.1818V19.1C9.24751 18.7991 9.15011 18.5073 8.97501 18.2625C8.79991 18.0176 8.55521 17.8312 8.27273 17.7273C7.99853 17.6063 7.69437 17.5702 7.39947 17.6236C7.10456 17.6771 6.83244 17.8177 6.61818 18.0273L6.56364 18.0818C6.39478 18.2509 6.19425 18.385 5.97353 18.4765C5.7528 18.568 5.51621 18.6151 5.27727 18.6151C5.03834 18.6151 4.80174 18.568 4.58102 18.4765C4.36029 18.385 4.15977 18.2509 3.99091 18.0818C3.82186 17.913 3.68775 17.7124 3.59626 17.4917C3.50476 17.271 3.45766 17.0344 3.45766 16.7955C3.45766 16.5565 3.50476 16.3199 3.59626 16.0992C3.68775 15.8785 3.82186 15.678 3.99091 15.5091L4.04545 15.4545C4.25503 15.2403 4.39562 14.9682 4.4491 14.6733C4.50257 14.3784 4.46647 14.0742 4.34545 13.8C4.23022 13.5311 4.03887 13.3018 3.79497 13.1403C3.55107 12.9788 3.26526 12.8921 2.97273 12.8909H2.81818C2.33597 12.8909 1.87351 12.6994 1.53253 12.3584C1.19156 12.0174 1 11.5549 1 11.0727C1 10.5905 1.19156 10.1281 1.53253 9.78708C1.87351 9.4461 2.33597 9.25455 2.81818 9.25455H2.9C3.2009 9.24751 3.49273 9.15011 3.73754 8.97501C3.98236 8.79991 4.16883 8.55521 4.27273 8.27273C4.39374 7.99853 4.42984 7.69437 4.37637 7.39947C4.3229 7.10456 4.18231 6.83244 3.97273 6.61818L3.91818 6.56364C3.74913 6.39478 3.61503 6.19425 3.52353 5.97353C3.43203 5.7528 3.38493 5.51621 3.38493 5.27727C3.38493 5.03834 3.43203 4.80174 3.52353 4.58102C3.61503 4.36029 3.74913 4.15977 3.91818 3.99091C4.08704 3.82186 4.28757 3.68775 4.50829 3.59626C4.72901 3.50476 4.96561 3.45766 5.20455 3.45766C5.44348 3.45766 5.68008 3.50476 5.9008 3.59626C6.12152 3.68775 6.32205 3.82186 6.49091 3.99091L6.54545 4.04545C6.75971 4.25503 7.03183 4.39562 7.32674 4.4491C7.62164 4.50257 7.9258 4.46647 8.2 4.34545H8.27273C8.54161 4.23022 8.77093 4.03887 8.93245 3.79497C9.09397 3.55107 9.18065 3.26526 9.18182 2.97273V2.81818C9.18182 2.33597 9.37338 1.87351 9.71435 1.53253C10.0553 1.19156 10.5178 1 11 1C11.4822 1 11.9447 1.19156 12.2856 1.53253C12.6266 1.87351 12.8182 2.33597 12.8182 2.81818V2.9C12.8193 3.19253 12.906 3.47834 13.0676 3.72224C13.2291 3.96614 13.4584 4.15749 13.7273 4.27273C14.0015 4.39374 14.3056 4.42984 14.6005 4.37637C14.8954 4.3229 15.1676 4.18231 15.3818 3.97273L15.4364 3.91818C15.6052 3.74913 15.8057 3.61503 16.0265 3.52353C16.2472 3.43203 16.4838 3.38493 16.7227 3.38493C16.9617 3.38493 17.1983 3.43203 17.419 3.52353C17.6397 3.61503 17.8402 3.74913 18.0091 3.91818C18.1781 4.08704 18.3122 4.28757 18.4037 4.50829C18.4952 4.72901 18.5423 4.96561 18.5423 5.20455C18.5423 5.44348 18.4952 5.68008 18.4037 5.9008C18.3122 6.12152 18.1781 6.32205 18.0091 6.49091L17.9545 6.54545C17.745 6.75971 17.6044 7.03183 17.5509 7.32674C17.4974 7.62164 17.5335 7.9258 17.6545 8.2V8.27273C17.7698 8.54161 17.9611 8.77093 18.205 8.93245C18.4489 9.09397 18.7347 9.18065 19.0273 9.18182H19.1818C19.664 9.18182 20.1265 9.37338 20.4675 9.71435C20.8084 10.0553 21 10.5178 21 11C21 11.4822 20.8084 11.9447 20.4675 12.2856C20.1265 12.6266 19.664 12.8182 19.1818 12.8182H19.1C18.8075 12.8193 18.5217 12.906 18.2778 13.0676C18.0339 13.2291 17.8425 13.4584 17.7273 13.7273Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},l=function(){return'<svg class=\'selected-stream\' width="35" height="33" viewBox="0 0 35 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_319_60943)">\n <path d="M0 0H35V33H0V0Z" fill="#D2393B"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8689 17.6541L22.3039 11.2898C22.6966 10.9014 23.3372 10.9054 23.7299 11.2937C24.1225 11.6821 24.1265 12.3157 23.7338 12.704L16.6345 19.7253C16.6189 19.743 16.6026 19.7604 16.5856 19.7772C16.5158 19.8463 16.4381 19.9032 16.3554 19.9479C15.9716 20.1587 15.4758 20.1009 15.1503 19.779C15.126 19.755 15.1032 19.73 15.0819 19.7042L12.2919 16.9449C11.8992 16.5565 11.9032 15.9229 12.2958 15.5346C12.6885 15.1462 13.3291 15.1423 13.7218 15.5306L15.8689 17.6541Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_319_60943">\n <path d="M0 0H35V33H8C3.58172 33 0 29.4183 0 25V0Z" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '},o=function(){return'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7275 8.7189V11.2811L18.0174 11.7913C17.8497 12.5312 17.558 13.2374 17.1546 13.88L18.71 16.1626L16.8874 17.9721L14.6149 16.43C13.9694 16.8283 13.2636 17.1194 12.5249 17.2919L12.0143 20H9.43828L8.92846 17.2919C8.18971 17.1194 7.48385 16.8284 6.8384 16.43L4.56591 17.9721L2.74302 16.1626L4.28649 13.88C3.88787 13.2349 3.5965 12.5296 3.42371 11.7913L0.727539 11.2811V8.7189L3.42371 8.1968C3.59774 7.4568 3.89356 6.75083 4.29909 6.10771L2.74337 3.837L4.56626 2.02785L6.83875 3.57C7.48173 3.16673 8.18841 2.8752 8.92881 2.70777L9.43863 0H12.0147L12.5252 2.70777C13.2656 2.87529 13.9723 3.16682 14.6153 3.57L16.8878 2.02785L18.7103 3.837L17.1549 6.11996C17.5582 6.75838 17.85 7.46066 18.0177 8.1968L20.7275 8.7189ZM5.19864 10.0057C5.2018 13.0538 7.67684 15.5222 10.7268 15.5191C12.1916 15.5176 13.5957 14.9347 14.6304 13.8985C15.665 12.8624 16.2454 11.4579 16.2438 9.99405C16.2405 6.94597 13.7654 4.47766 10.7154 4.48088C7.6654 4.4841 5.19548 6.95764 5.19864 10.0057Z" fill="white"/>\n </svg>'},w=function(n){return'<svg style="width:16px" class=\'skipbtn\' viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99586 16.9937L10.1623 18.5786C8.29657 18.8638 6.41631 18.54 4.78178 17.6185C0.689955 15.3118 -0.596286 9.9922 1.9108 5.74486C4.41407 1.50398 9.74539 -0.0566045 13.8474 2.25594C14.5323 2.64549 15.1461 3.12366 15.6802 3.6794L14.5432 4.82812C14.1076 4.3749 13.6063 3.98438 13.0472 3.66641C9.67952 1.76782 5.29397 3.05156 3.24002 6.53123C1.1946 9.99645 2.24115 14.3247 5.57947 16.2067C6.92039 16.9626 8.46208 17.2281 9.99586 16.9937Z" fill=\''.concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7766 0.464616L17.322 5.24607L11.822 5.79733L14.7766 0.464616Z" fill=\'').concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.0245 14.115C13.391 14.115 13.7323 14.0463 14.0486 13.9088C14.3648 13.7714 14.6388 13.5621 14.8707 13.281C15.1026 13 15.2842 12.644 15.4156 12.2131C15.5469 11.7822 15.6126 11.2749 15.6126 10.6911C15.6126 10.1042 15.5469 9.59609 15.4156 9.16675C15.2842 8.73741 15.1026 8.38219 14.8707 8.10111C14.6388 7.82003 14.3648 7.61076 14.0486 7.47331C13.7323 7.33586 13.391 7.26714 13.0245 7.26714C12.658 7.26714 12.3183 7.33586 12.0053 7.47331C11.6923 7.61076 11.4207 7.82003 11.1904 8.10111C10.9602 8.38219 10.7802 8.73741 10.6504 9.16675C10.5207 9.59609 10.4559 10.1042 10.4559 10.6911C10.4559 11.2749 10.5207 11.7822 10.6504 12.2131C10.7802 12.644 10.9602 13 11.1904 13.281C11.4207 13.5621 11.6923 13.7714 12.0053 13.9088C12.3183 14.0463 12.658 14.115 13.0245 14.115ZM9.76991 14.0409V13.1837H8.50504V7.332H7.51748L5.37207 9.06945L5.75153 9.56521C5.77748 9.59918 5.81721 9.6293 5.87072 9.65555C5.92423 9.68181 5.98342 9.69493 6.04829 9.69493C6.09045 9.69493 6.13342 9.68876 6.17721 9.6764C6.22099 9.66405 6.26396 9.64088 6.30612 9.6069L7.31802 8.80073C7.30829 8.96752 7.30342 9.1266 7.30342 9.27795V13.1837H5.87802V14.0409H9.76991ZM12.5259 13.0517C12.6864 13.1274 12.8526 13.1652 13.0245 13.1652C13.1996 13.1652 13.3683 13.1274 13.5304 13.0517C13.6926 12.976 13.8361 12.844 13.961 12.6556C14.0859 12.4671 14.1856 12.2139 14.2602 11.8957C14.3348 11.5776 14.3721 11.176 14.3721 10.6911C14.3721 10.2061 14.3348 9.80459 14.2602 9.48644C14.1856 9.16829 14.0859 8.91501 13.961 8.7266C13.8361 8.53818 13.6926 8.40613 13.5304 8.33046C13.3683 8.25478 13.1996 8.21694 13.0245 8.21694C12.8526 8.21694 12.6864 8.25478 12.5259 8.33046C12.3653 8.40613 12.2234 8.53818 12.1002 8.7266C11.9769 8.91501 11.8788 9.16829 11.8059 9.48644C11.7329 9.80459 11.6964 10.2061 11.6964 10.6911C11.6964 11.176 11.7329 11.5776 11.8059 11.8957C11.8788 12.2139 11.9769 12.4671 12.1002 12.6556C12.2234 12.844 12.3653 12.976 12.5259 13.0517Z" fill=\'').concat(window.color?window.color:"white","' />\n </svg>")},h=function(){return'<svg class=\'skipbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.7236 9.43675L17.7953 11.3434L15.8658 9.43675M18.0311 10.8667C18.0661 10.5537 18.0841 10.2356 18.0841 9.91341C18.0841 5.17486 14.1978 1.3335 9.40386 1.3335C4.6099 1.3335 0.723633 5.17486 0.723633 9.91341C0.723633 14.652 4.6099 18.4933 9.40386 18.4933C12.1307 18.4933 14.5638 17.2505 16.1551 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M7.80584 13.0831V6.80067H6.82209C6.46523 7.20106 5.85762 7.53473 5.25 7.64912V8.66918C5.56828 8.64058 6.10838 8.52618 6.39772 8.39272V13.0831H7.80584Z" fill="white"/>\n <path d="M11.5334 6.6958C9.71052 6.6958 9.07397 8.23065 9.07397 9.94664C9.07397 11.6817 9.64301 13.1975 11.5044 13.1975C13.3948 13.1975 13.9445 11.634 13.9445 9.9085C13.9445 8.12579 13.308 6.6958 11.5334 6.6958ZM11.5334 7.78259C12.3628 7.78259 12.5171 8.69778 12.5171 9.91804C12.5171 11.1478 12.4014 12.1107 11.5237 12.1107C10.6268 12.1107 10.4917 11.0811 10.4917 9.92757C10.4917 8.57385 10.7232 7.78259 11.5334 7.78259Z" fill="white"/>\n </svg>'},d=function(){return'<svg class=\'icon icon-episodes\' width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 11.7368C1 11.3299 1.32989 11 1.73684 11H16.2632C16.6701 11 17 11.3299 17 11.7368V21.2632C17 21.6701 16.6701 22 16.2632 22H1.73684C1.3299 22 1 21.6701 1 21.2632V11.7368Z" fill="white"/>\n <path d="M5 8H19.2632C19.6701 8 20 8.3299 20 8.73684V18" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8 4H22.2632C22.6701 4 23 4.3299 23 4.73684V13" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},r=function(){return'<svg width="18" height="16" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 6.5H10M5 10H13M7.68375 16H14.2C15.8802 16 16.7202 16 17.362 15.673C17.9265 15.3854 18.3854 14.9265 18.673 14.362C19 13.7202 19 12.8802 19 11.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V18.3355C1 18.8684 1 19.1348 1.10923 19.2716C1.20422 19.3906 1.34827 19.4599 1.50054 19.4597C1.67563 19.4595 1.88367 19.2931 2.29976 18.9602L4.68521 17.0518C5.17252 16.662 5.41617 16.4671 5.68749 16.3285C5.9282 16.2055 6.18443 16.1156 6.44921 16.0613C6.74767 16 7.0597 16 7.68375 16Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},s=function(){return'<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4541 15.8369V2H0.454102V15.8369H11.992L17.7874 18V15.8369H20.4541ZM2.4541 4H18.4541V13.8614H15.9182L15.9179 15L11.9664 13.8614H2.4541V4Z" fill="white"/>\n <rect x="3.4541" y="6" width="9" height="2" fill="white"/>\n <rect x="14.4541" y="6" width="3" height="2" fill="white"/>\n <rect x="8.4541" y="10" width="9" height="2" fill="white"/>\n <rect x="3.4541" y="10" width="3" height="2" fill="white"/>\n </svg>\n '},c=function(n){return'<svg className=\'icon-play-next\' width="16" height="16" viewBox="0 0 25 25" fill='.concat(n,' xmlns="http://www.w3.org/2000/svg">\n <path d="M14.8837 9.99984L0 0V20L14.8837 9.99984Z" fill=').concat(n,' />\n <rect x="18" width="2" height="20" fill=').concat(n," />\n </svg>")},v=function(){return'<svg width="19" height="20" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.273985 2.30391C-0.124672 1.74341 -0.0882695 0.933084 0.383092 0.418212C0.893733 -0.139565 1.72148 -0.13938 2.23191 0.418626L9.25 8.09082L16.2681 0.418626C16.7785 -0.13938 17.6063 -0.139565 18.1169 0.418212C18.5883 0.933084 18.6247 1.74341 18.226 2.30391L18.1173 2.43852L11.1987 10.0029L18.1169 17.5611C18.5883 18.0759 18.6247 18.8863 18.226 19.4468L18.1173 19.5814C17.6461 20.0965 16.9046 20.1362 16.3916 19.7006L16.2685 19.5818L9.25 11.9155L2.23153 19.5818L2.10835 19.7006C1.59542 20.1362 0.853882 20.0965 0.382714 19.5814L0.273985 19.4468C-0.124672 18.8863 -0.0882694 18.0759 0.383092 17.5611L7.30134 10.0029L0.382714 2.43852L0.273985 2.30391Z" fill="white"/>\n </svg>\n \n '},a=function(){return'<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01316 12.1667L0.25 10.5V15.5L3.01316 14.25V18H15.25V8H3.01316V12.1667ZM7.67057 10.7216C7.53806 10.6283 7.35547 10.7231 7.35547 10.8852V15.1146C7.35547 15.2766 7.53806 15.3714 7.67057 15.2781L10.6757 13.1634C10.7889 13.0838 10.7889 12.916 10.6757 12.8363L7.67057 10.7216Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 2H20.25H21.25V3V10H20.25V3H7.25V2ZM17.25 5H4.25V6H17.25V13H18.25V6V5H17.25Z" fill="white"/>\n </svg>\n '},g=function(){return'<svg width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6169 0.418212C11.0883 0.933084 11.1247 1.74341 10.726 2.30391L10.6173 2.43852L3.69866 10.0029L10.6169 17.5611C11.0883 18.0759 11.1247 18.8863 10.726 19.4468L10.6173 19.5814C10.1461 20.0965 9.40458 20.1362 8.89165 19.7006L8.76847 19.5818L0 10.0039L8.76809 0.418626C9.27852 -0.13938 10.1063 -0.139565 10.6169 0.418212Z" fill="white"/>\n </svg>\n '};export{g as B,s as C,d as E,n as M,r as N,c as P,e as R,t as S,C as a,w as b,h as c,i as d,v as e,o as f,a as g,l as h};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import n from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/regenerator";import o from"video.js";import{d as r,g as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as O,q as P,t as I,u as k,v as j,w as E,x as S,y as D,z as A,A as R,B as F,C,D as B,E as M,F as _}from"./generic-de24d0d1.js";import{o as x,g as H,a as N,s as L,b as V}from"./util-3c535313.js";import{g as U}from"./renditions-7612f0f0.js";import{playSelectedResolution as W}from"./resolution-88cfa577.js";import{i as q}from"./skin-665ec17e.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function z(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function G(e,t){z("event",e,t)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function K(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?J(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Y(){var e=window.sessionStorage.getItem("uid");return e||(e=Q(),window.sessionStorage.setItem("uid",e),e)}function X(){var e=sessionStorage.getItem("token"),t=JSON.parse(atob(e.split(".")[1]));return null!=t&&t.anonymousId?"guest-user":null==t?void 0:t.userId}window.initialise=function(e){window.sid=Q(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());G(r?"FAILED_TO_START":"DROPPED_STREAM",K({pfm:window.platform,uid:Y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),G("PLAY",K({pfm:window.platform,uid:Y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))G("BUFFERING",K({pfm:window.platform,uid:Y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,G("FIRST_FRAME",K({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,l;G("AD_REQUEST",K({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),G("AD_IMPRESSION",K({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Z(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var Z=function(e,t,n){return e>=t&&e<=n};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window.fireEvent=function(e){var n,i,o,r,l,a,s,d,u,c,v=[K(K(K({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params),{},{uid:Y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:X(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];t({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var te,ne,ie=function(e,t){var n=l(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,i,r,l,a,s=this.el(),d=o.dom.getPointerPosition(s,t).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(r=i.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var re=[],le=0,ae=null;function se(t,n,i){var o,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ne=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==ne?m={videoId:te,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==ne&&(m=function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?oe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):oe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({videoId:te,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},ae&&{seriesId:ae})),a(m,n.token,ne).then((function(e){})).catch((function(e){})),le=u+i}var de=function(e,t,n){var i=l(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var o=parseFloat(t)/100;i.volume(o),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ue=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var ve=function(t,n,i,o){var r,a,m=o.res,f=o.sres,w=l(t),p=(null==m||null===(r=m.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){p&&i.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var o;(null==w||!w.muted())&&de(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),i.resolve(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&!n.isAnonymousUser)&&function(e,t,n){var i,o;null!=t&&t.series&&(ae=null==t||null===(i=t.series)||void 0===i?void 0:i.id),re=[],le=0,te=n;var r=(null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());re.includes(le)||(e==le?(re.push(e),se(a,t,r)):e>le&&(le=e+r))})),a.on("ended",(function(){se(a,t,r,!0)})))}(t,n,null==d||null===(r=d.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),w.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",t)})),w.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,n;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),i.reject({status:!1,msg:(null==w||null===(n=w.error())||void 0===n?void 0:n.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,i,o,r=null===(t=u())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},me=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-9a498834.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-a041f17c.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-b05f744c.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-166870ac.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n&&import("./skin-de0c2ebb.js").then((function(n){n.initialiseSkin(e,t)}))},fe=function(e){return new Promise((function(t,n){if(we(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!1,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},we=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},pe=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var he,ge=function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){fe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(o)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(o)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),fe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:ge,loadEMELibrary:ye});function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Oe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Te(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Pe=function(t,a,s,u){var c,v,m,f,w,p,h,g,y,T,O,P,I,k,j,D,A,R,F,C,_,x,H,N=a.res,L=void 0===N?null:N,V=a.sres,U=void 0===V?null:V;console.log(o.browser.IS_SAFARI);var W=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,q=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==W&&"NOT_CONNECTED"!==W?["html5","chromecast"]:["chromecast","html5"]:["html5"],z=null==L||null===(p=L.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.videoImageUrl,G=(null==L||null===(g=L.video)||void 0===g||null===(y=g.liveDetails)||void 0===y?void 0:y.isDvrEnabled)||!1,J=function(e){var t,n={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(n={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==r()&&(n=ee(ee({},n),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-6}})),n}(s),K=(null==L||null===(T=L.video)||void 0===T||null===(O=T.streamingInfo)||void 0===O?void 0:O.isLiveStream)||!1,Q=(null==s?void 0:s.drmLibrary)||!1,Y=(null==L||null===(P=L.ads)||void 0===P||null===(I=P.preRoll)||void 0===I||null===(k=I.adTags)||void 0===k||null===(j=k.web)||void 0===j?void 0:j.active)&&(null==L||null===(D=L.ads)||void 0===D||null===(A=D.preRoll)||void 0===A||null===(R=A.adTags)||void 0===R||null===(F=R.web)||void 0===F?void 0:F.url),X=(H={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:G},e(H,"autoplay",null==s?void 0:s.autoplay),e(H,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!Y),e(H,"loop",(null==s?void 0:s.loop)||!1),e(H,"html5",Oe(Oe({dash:Oe(Oe({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||3},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:Oe(Oe({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(C=s.customData)||void 0===C?void 0:C.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(_=s.customData)||void 0===_?void 0:_.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(x=s.customData)||void 0===x?void 0:x.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(H,"poster",z),e(H,"techOrder",q),e(H,"chromecast",{requestCustomDataFn:function(e){var n=l(t);console.log(n.textTracksJson_);var i=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(i=e.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(L,e,i)}}),e(H,"plugins",J),H),Z=o(t,X,function(){var e=n(i.mark((function e(){var n,l,a,c,v,m,f,w,p,h,g,y,T,O,P,I,k;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(K&&u.resolve(Oe({status:!0,msg:"Player Initialised"},U?{seriesResponse:U,response:L}:{response:L})),window.initialise(Z),window.firstFrame(Z),"white"!==window.controlsColor&&pe(window.controlsColor,Z),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),h=null==L||null===(n=L.video)||void 0===n?void 0:n.drmEnabled,g=null==L||null===(l=L.video)||void 0===l||null===(a=l.liveDetails)||void 0===a?void 0:a.startOverTime,!h&&!Q){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,ye();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([ye(),ge()]);case 15:G&&ie(t,g),!Y||null!=s&&null!==(c=s.customData)&&void 0!==c&&c.disableAds||B(t,Y,L),(y=E(L,t))?b(t,y):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:L}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==L||null===(v=L.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(f=m.closedCaptions)||void 0===f?void 0:f.length)>0||(null==L||null===(w=L.video)||void 0===w||null===(p=w.closedCaptions)||void 0===p?void 0:p.length)>0)&&(k=(null==L||null===(O=L.video)||void 0===O||null===(P=O.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==L||null===(I=L.video)||void 0===I?void 0:I.closedCaptions),T=k.filter((function(e){return"VTT"===e.format})),M(t,T)),null!=s&&s.disableControls?S(t):me(t,Oe(Oe(Oe({},s),X),{},{liveVideo:K,isDvrEnabled:G,res:L,sres:U})),ve(t,Oe(Oe(Oe({},s),X),{},{liveVideo:K}),u,{res:L,sres:U});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Ie(){return{loadVideoInstantly:w,onTimeUpdate:x,getVideoDuration:H,onVideoEnded:N,init:function(e){return new Promise((function(t,n){var i,o,l,a,s,d,u,v,w;if(!T(null==e?void 0:e.playerId)){var p=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1;window.videoId=p;var g=null==e?void 0:e.token;if(g&&!D(g)){he=JSON.parse(atob(g.split(".")[1])),window.siteId=null===(o=he)||void 0===o?void 0:o.siteId,window.siteName=null===(l=he)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=he)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=he)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=he)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(u=he)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",g);var y=null==e?void 0:e.playerId,b=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,P=null==e?void 0:e.apiBaseUrl,I=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,k=null==e?void 0:e.errors;k&&(window.customErrors=k),window.customData=null==e?void 0:e.customData,P&&(window.playerEntitlementUrl=P),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!q(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return be})).then((function(e){e.importIMA()})),!b||null!=e&&e.series||Promise.resolve().then((function(){return be})).then((function(e){e.importChromecast()})),O&&"Safari"==r()&&Promise.resolve().then((function(){return be})).then((function(e){e.importAirplay()})),I&&fe("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then((function(){return e=I,window.dataLayer=window.dataLayer||[],z("js",new Date),void z("config",e);var e})).catch((function(e){}));var j=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(y));if(j&&j.addEventListener("contextmenu",(function(e){return e.preventDefault()})),h){var E,S=null==e||null===(E=e.series)||void 0===E?void 0:E.id;A(S,g).then((function(i){var o,r,l,a=i.data,s=i.data.seasons;_(s);var d=p||(null==s||null===(o=s[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(n)})).catch((function(e){return console.log(e)}))}(S,g),R(d,g).then((function(i){var o,r,l;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Pe(y,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))})).catch((function(e){F(e,y,n)}))}else R(p,g).then((function(i){var o,r,l,a;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?C(p,g).then((function(i){var o,r,l,a,d,u;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,Pe(y,{res:s},e,{resolve:t,reject:n})})).catch((function(i){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Pe(y,{res:s},e,{resolve:t,reject:n})})):Pe(y,{res:s},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))}else n({status:!1,msg:"".concat(g?"Token is expired !":"Missing Authorization Token"),response:{token:g}})}}))},getRenditions:U,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:L,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:I,disableCaptions:k,getCaptions:j,playSelectedResolution:W,getSource:E,setVolume:de,getVolume:ue,disableControls:S,setPlaybackSpeed:V}}export{Ie as default};
1
+ import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import n from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/regenerator";import o from"video.js";import{d as r,g as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as O,q as P,t as k,u as I,v as j,w as E,x as S,y as D,z as A,A as R,B as F,C,D as B,E as M,F as _}from"./generic-9fe79484.js";import{o as x,g as H,a as N,s as L,b as V}from"./util-72c30630.js";import{g as U}from"./renditions-b6ca6ed3.js";import{playSelectedResolution as W}from"./resolution-dcd52ff1.js";import{i as q}from"./skin-163fdcdd.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function z(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function G(e,t){z("event",e,t)}function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function K(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?J(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Y(){var e=window.sessionStorage.getItem("uid");return e||(e=Q(),window.sessionStorage.setItem("uid",e),e)}function X(){var e=sessionStorage.getItem("token"),t=JSON.parse(atob(e.split(".")[1]));return null!=t&&t.anonymousId?"guest-user":null==t?void 0:t.userId}window.initialise=function(e){window.sid=Q(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());G(r?"FAILED_TO_START":"DROPPED_STREAM",K({pfm:window.platform,uid:Y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),G("PLAY",K({pfm:window.platform,uid:Y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))G("BUFFERING",K({pfm:window.platform,uid:Y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,G("FIRST_FRAME",K({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,l;G("AD_REQUEST",K({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),G("AD_IMPRESSION",K({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Z(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var Z=function(e,t,n){return e>=t&&e<=n};function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window.fireEvent=function(e){var n,i,o,r,l,a,s,d,u,c,v=[K(K(K({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params),{},{uid:Y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:X(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];t({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var te,ne,ie=function(e,t){var n=l(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,i,r,l,a,s=this.el(),d=o.dom.getPointerPosition(s,t).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(r=i.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var re=[],le=0,ae=null;function se(t,n,i){var o,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ne=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==ne?m={videoId:te,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==ne&&(m=function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?oe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):oe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({videoId:te,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},ae&&{seriesId:ae})),a(m,n.token,ne).then((function(e){})).catch((function(e){})),le=u+i}var de=function(e,t,n){var i=l(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var o=parseFloat(t)/100;i.volume(o),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ue=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var ve=function(t,n,i,o){var r,a,m=o.res,f=o.sres,w=l(t),p=(null==m||null===(r=m.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){p&&i.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var o;(null==w||!w.muted())&&de(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),i.resolve(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&!n.isAnonymousUser)&&function(e,t,n){var i,o;null!=t&&t.series&&(ae=null==t||null===(i=t.series)||void 0===i?void 0:i.id),re=[],le=0,te=n;var r=(null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());re.includes(le)||(e==le?(re.push(e),se(a,t,r)):e>le&&(le=e+r))})),a.on("ended",(function(){se(a,t,r,!0)})))}(t,n,null==d||null===(r=d.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),p&&(window.onfocus=function(){try{var e;null==w||null===(e=w.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}}),w.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",t)})),w.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,n;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),i.reject({status:!1,msg:(null==w||null===(n=w.error())||void 0===n?void 0:n.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,i,o,r=null===(t=u())||void 0===t||null===(i=t.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},me=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-185d9364.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-d8917b4d.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-7d48d134.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-f91e6b8a.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n&&import("./skin-4a285a68.js").then((function(n){n.initialiseSkin(e,t)}))},fe=function(e){return new Promise((function(t,n){if(we(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!1,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},we=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},pe=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var he,ge=function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){fe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(o)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(o)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),fe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:ge,loadEMELibrary:ye});function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Oe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Te(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Pe=function(t,a,s,u){var c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C,_,x,H,N,L,V,U=a.res,W=void 0===U?null:U,q=a.sres,z=void 0===q?null:q,G=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,J=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==G&&"NOT_CONNECTED"!==G?["html5","chromecast"]:["chromecast","html5"]:["html5"],K=(null==W||null===(p=W.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.videoImageUrl)||(null==W||null===(g=W.video)||void 0===g||null===(y=g.gist)||void 0===y||null===(T=y.imageGist)||void 0===T?void 0:T.r16x9),Q=(null==W||null===(O=W.video)||void 0===O||null===(P=O.liveDetails)||void 0===P?void 0:P.isDvrEnabled)||!1,Y=function(e){var t,n={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(n={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==r()&&(n=ee(ee({},n),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),n}(s),X=(null==W||null===(k=W.video)||void 0===k||null===(I=k.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,Z=(null==s?void 0:s.drmLibrary)||!1,$=(null==W||null===(j=W.ads)||void 0===j||null===(D=j.preRoll)||void 0===D||null===(A=D.adTags)||void 0===A||null===(R=A.web)||void 0===R?void 0:R.active)&&(null==W||null===(F=W.ads)||void 0===F||null===(C=F.preRoll)||void 0===C||null===(_=C.adTags)||void 0===_||null===(x=_.web)||void 0===x?void 0:x.url),te=(V={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:Q},e(V,"autoplay",null==s?void 0:s.autoplay),e(V,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!$),e(V,"loop",(null==s?void 0:s.loop)||!1),e(V,"audioPosterMode",null==s?void 0:s.audioOnlyMode),e(V,"html5",Oe(Oe({dash:Oe(Oe({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||3},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:Oe(Oe({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(H=s.customData)||void 0===H?void 0:H.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(N=s.customData)||void 0===N?void 0:N.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(L=s.customData)||void 0===L?void 0:L.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(V,"poster",K),e(V,"techOrder",J),e(V,"chromecast",{requestCustomDataFn:function(e){var n=l(t);console.log(n.textTracksJson_);var i=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(i=e.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";m.contentType=p;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(W,e,i)}}),e(V,"plugins",Y),V),ne=o(t,te,function(){var e=n(i.mark((function e(){var n,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(X&&u.resolve(Oe({status:!0,msg:"Player Initialised"},z?{seriesResponse:z,response:W}:{response:W})),window.initialise(ne),window.firstFrame(ne),"white"!==window.controlsColor&&pe(window.controlsColor,ne),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),h=null==W||null===(n=W.video)||void 0===n?void 0:n.drmEnabled,g=null==W||null===(l=W.video)||void 0===l||null===(a=l.liveDetails)||void 0===a?void 0:a.startOverTime,!h&&!Z){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,ye();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([ye(),ge()]);case 15:Q&&ie(t,g),!$||null!=s&&null!==(c=s.customData)&&void 0!==c&&c.disableAds||B(t,$,W),(y=E(W,t))?b(t,y):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:W}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==W||null===(v=W.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(f=m.closedCaptions)||void 0===f?void 0:f.length)>0||(null==W||null===(w=W.video)||void 0===w||null===(p=w.closedCaptions)||void 0===p?void 0:p.length)>0)&&(I=(null==W||null===(O=W.video)||void 0===O||null===(P=O.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==W||null===(k=W.video)||void 0===k?void 0:k.closedCaptions),T=I.filter((function(e){return"VTT"===e.format})),M(t,T)),null!=s&&s.disableControls?S(t):me(t,Oe(Oe(Oe({},s),te),{},{liveVideo:X,isDvrEnabled:Q,res:W,sres:z})),ve(t,Oe(Oe(Oe({},s),te),{},{liveVideo:X}),u,{res:W,sres:z});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function ke(){return{loadVideoInstantly:w,onTimeUpdate:x,getVideoDuration:H,onVideoEnded:N,init:function(e){return new Promise((function(t,n){var i,o,l,a,s,d,u,v,w;if(!T(null==e?void 0:e.playerId)){var p=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1;window.videoId=p;var g=null==e?void 0:e.token;if(g&&!D(g)){he=JSON.parse(atob(g.split(".")[1])),window.siteId=null===(o=he)||void 0===o?void 0:o.siteId,window.siteName=null===(l=he)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=he)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=he)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=he)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(u=he)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",g);var y=null==e?void 0:e.playerId,b=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,P=null==e?void 0:e.apiBaseUrl,k=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,I=null==e?void 0:e.errors;I&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,P&&(window.playerEntitlementUrl=P),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!q(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return be})).then((function(e){e.importIMA()})),!b||null!=e&&e.series||Promise.resolve().then((function(){return be})).then((function(e){e.importChromecast()})),O&&"Safari"==r()&&Promise.resolve().then((function(){return be})).then((function(e){e.importAirplay()})),k&&fe("https://www.googletagmanager.com/gtag/js?id=".concat(k)).then((function(){return e=k,window.dataLayer=window.dataLayer||[],z("js",new Date),void z("config",e);var e})).catch((function(e){}));var j=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(y));if(j&&j.addEventListener("contextmenu",(function(e){return e.preventDefault()})),h){var E,S=null==e||null===(E=e.series)||void 0===E?void 0:E.id;A(S,g).then((function(i){var o,r,l,a=i.data,s=i.data.seasons;_(s);var d=p||(null==s||null===(o=s[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(n)})).catch((function(e){return console.log(e)}))}(S,g),R(d,g).then((function(i){var o,r,l;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Pe(y,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))})).catch((function(e){F(e,y,n)}))}else R(p,g).then((function(i){var o,r,l,a;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?C(p,g).then((function(i){var o,r,l,a,d,u;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,Pe(y,{res:s},e,{resolve:t,reject:n})})).catch((function(i){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Pe(y,{res:s},e,{resolve:t,reject:n})})):Pe(y,{res:s},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))}else n({status:!1,msg:"".concat(g?"Token is expired !":"Missing Authorization Token"),response:{token:g}})}}))},getRenditions:U,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:L,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:W,getSource:E,setVolume:de,getVolume:ue,disableControls:S,setPlaybackSpeed:V}}export{ke as default};
@@ -1 +1 @@
1
- import{g as e,j as r,r as t}from"./generic-de24d0d1.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
1
+ import{g as e,j as r,r as t}from"./generic-9fe79484.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{o as c,p as u}from"./generic-de24d0d1.js";import"axios";import"js-cookie";import"ua-parser-js";function d(e){var t=m();return function(){var i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var p=s.getComponent("Component"),v=function(o){l(m,p);var n=d(m);function m(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),l=n.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),p=m.getPropertyValue("height"),v=m.getPropertyValue("width"),f=p.slice(0,-2);v.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(s=r.config)||void 0===s||!s.liveVideo)||null!==(a=i(l))&&void 0!==a&&null!==(c=a.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(d=u.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(m,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,s=this,a=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==a||null===(n=a.classList)||void 0===n||n.add("".concat(this.config.skin)):null==a||null===(r=a.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(a,this.playerId),window.onresize=function(){s.multicamCssPositioning(a,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,o);var n=sessionStorage.getItem("token");return o.addEventListener("click",(function(t){a(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id,n).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),m}();export{v as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{o as c,p as u}from"./generic-9fe79484.js";import"axios";import"js-cookie";import"ua-parser-js";function d(e){var t=m();return function(){var i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var p=s.getComponent("Component"),v=function(o){l(m,p);var n=d(m);function m(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),l=n.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),p=m.getPropertyValue("height"),v=m.getPropertyValue("width"),f=p.slice(0,-2);v.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(s=r.config)||void 0===s||!s.liveVideo)||null!==(a=i(l))&&void 0!==a&&null!==(c=a.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(d=u.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(m,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,s=this,a=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==a||null===(n=a.classList)||void 0===n||n.add("".concat(this.config.skin)):null==a||null===(r=a.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(a,this.playerId),window.onresize=function(){s.multicamCssPositioning(a,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,o);var n=sessionStorage.getItem("token");return o.addEventListener("click",(function(t){a(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id,n).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),m}();export{v as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as s,e as l,h as i}from"./icons-f5378bf3.js";import{g as c,o as d,p as m}from"./generic-de24d0d1.js";import{a as p}from"./skin-665ec17e.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=h();return function(){var a,r=o(e);if(t){var s=o(this).constructor;a=Reflect.construct(r,arguments,s)}else a=r.apply(this,arguments);return n(this,a)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=r.getComponent("Component"),f=function(n){a(h,v);var o=u(h);function h(t){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(a=o.call(this,t,n)).playerId=n.playerId,a.seriesData=n.sres,a.streams=n.streams,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a}return t(h,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"stream-container hidden"});r.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(p(),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 a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",r.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),n=r.dom.createEl("div",{className:"stream-selector-head"}),o=r.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),p=r.dom.createEl("div",{className:"stream-selector-content"}),u=r.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,n=r.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var a=r.dom.$$(".stream"),o=0;o<a.length;o++)a[o].style.border="none",a[o].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),o.alt="No Thumbnail Available",n.append(o),r.dom.appendContent(u,n),r.dom.appendContent(p,u)},v=0;v<this.streams.length;v++)h(v);r.dom.appendContent(n,o),r.dom.appendContent(n,s),r.dom.appendContent(e,n),r.dom.appendContent(e,p),c(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),h}();export{f as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as s,e as l,h as i}from"./icons-c2efba97.js";import{g as c,o as d,p as m}from"./generic-9fe79484.js";import{b as p}from"./skin-163fdcdd.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=h();return function(){var a,r=o(e);if(t){var s=o(this).constructor;a=Reflect.construct(r,arguments,s)}else a=r.apply(this,arguments);return n(this,a)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=r.getComponent("Component"),f=function(n){a(h,v);var o=u(h);function h(t){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(a=o.call(this,t,n)).playerId=n.playerId,a.seriesData=n.sres,a.streams=n.streams,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a}return t(h,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"stream-container hidden"});r.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(p(),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 a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",r.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),n=r.dom.createEl("div",{className:"stream-selector-head"}),o=r.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),p=r.dom.createEl("div",{className:"stream-selector-content"}),u=r.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,n=r.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var a=r.dom.$$(".stream"),o=0;o<a.length;o++)a[o].style.border="none",a[o].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),o.alt="No Thumbnail Available",n.append(o),r.dom.appendContent(u,n),r.dom.appendContent(p,u)},v=0;v<this.streams.length;v++)h(v);r.dom.appendContent(n,o),r.dom.appendContent(n,s),r.dom.appendContent(e,n),r.dom.appendContent(e,p),c(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),h}();export{f as default};