@viewlift/player-backup 1.0.119-backup → 1.0.121-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/cjs/autoNextVideo-e1767094.js +1 -0
  2. package/cjs/bundle.css +60 -0
  3. package/cjs/caption-settings-95ee84ba.js +1 -0
  4. package/cjs/{features-658c8a46.js → features-f75cd4d7.js} +1 -1
  5. package/cjs/generic-cc7d7e07.js +1 -0
  6. package/cjs/index.js +1 -1
  7. package/cjs/{keyboardShortcuts-664f0a09.js → keyboardShortcuts-32e2f8f8.js} +1 -1
  8. package/cjs/multicam-5c3b676c.js +1 -0
  9. package/cjs/multicamv2-b35484f8.js +1 -0
  10. package/cjs/mwebPotraitTray-36cdb29f.js +1 -0
  11. package/cjs/nextEpisodeButton-28fcd961.js +1 -0
  12. package/cjs/playlist-9da30b66.js +1 -0
  13. package/cjs/{renditions-e00ec925.js → renditions-679b535a.js} +1 -1
  14. package/cjs/resolution-eceef15a.js +1 -0
  15. package/cjs/series-e724b1cc.js +1 -0
  16. package/cjs/series-v2-f1e98e62.js +1 -0
  17. package/cjs/{series-v2-70137d8c.js → series-v2-fd7485a5.js} +1 -1
  18. package/cjs/settings-icon-6dad65b6.js +1 -0
  19. package/cjs/{skin-f46e9286.js → skin-0f6301d7.js} +1 -1
  20. package/cjs/{skin-f027a4a1.js → skin-47d8300b.js} +1 -1
  21. package/cjs/{skin-142a2c5d.js → skin-4f2bca89.js} +1 -1
  22. package/cjs/skin-88550a4e.js +1 -0
  23. package/cjs/{skin-ce922912.js → skin-d13755a0.js} +1 -1
  24. package/cjs/{skin-ba9b4442.js → skin-edb064e8.js} +1 -1
  25. package/cjs/{util-abb0e4bb.js → util-b1efcc6f.js} +1 -1
  26. package/cjs/videoSelector-26c84724.js +1 -0
  27. package/esm/autoNextVideo-db6283b1.js +1 -0
  28. package/esm/bundle.css +60 -0
  29. package/esm/caption-settings-7336f73a.js +1 -0
  30. package/esm/{features-26a449bf.js → features-250dfa7a.js} +1 -1
  31. package/esm/generic-ff184c2f.js +1 -0
  32. package/esm/index.js +1 -1
  33. package/esm/{keyboardShortcuts-9bad5b1e.js → keyboardShortcuts-4b3b8afa.js} +1 -1
  34. package/esm/multicam-e5b32469.js +1 -0
  35. package/esm/multicamv2-5e33b343.js +1 -0
  36. package/esm/mwebPotraitTray-4a697d2a.js +1 -0
  37. package/esm/nextEpisodeButton-b2820628.js +1 -0
  38. package/esm/playlist-688d8355.js +1 -0
  39. package/esm/{renditions-a3821a38.js → renditions-090502aa.js} +1 -1
  40. package/esm/resolution-ba31e85b.js +1 -0
  41. package/esm/series-e68a0fbd.js +1 -0
  42. package/esm/series-v2-2243c975.js +1 -0
  43. package/esm/{series-v2-0727ee8c.js → series-v2-4cdbf9b1.js} +1 -1
  44. package/esm/settings-icon-c4fd8e69.js +1 -0
  45. package/esm/{skin-76d61ddb.js → skin-26b3c430.js} +1 -1
  46. package/esm/{skin-25101c84.js → skin-5f9fe2f6.js} +1 -1
  47. package/esm/{skin-002752e0.js → skin-6ab207d5.js} +1 -1
  48. package/esm/{skin-0707520b.js → skin-87568757.js} +1 -1
  49. package/esm/skin-d3ab50f7.js +1 -0
  50. package/esm/{skin-ff917e75.js → skin-fd6c2622.js} +1 -1
  51. package/esm/{util-a8fb05bb.js → util-ad1895db.js} +1 -1
  52. package/esm/videoSelector-d7110cde.js +1 -0
  53. package/package.json +1 -1
  54. package/cjs/autoNextVideo-483e9153.js +0 -1
  55. package/cjs/caption-settings-b41710bf.js +0 -1
  56. package/cjs/generic-a2a5ad78.js +0 -1
  57. package/cjs/multicam-28ad2186.js +0 -1
  58. package/cjs/multicamv2-aa481861.js +0 -1
  59. package/cjs/mwebPotraitTray-65dfc2de.js +0 -1
  60. package/cjs/nextEpisodeButton-c4f3d621.js +0 -1
  61. package/cjs/playlist-91a68d26.js +0 -1
  62. package/cjs/resolution-65c490cf.js +0 -1
  63. package/cjs/series-232bf4fd.js +0 -1
  64. package/cjs/series-v2-09adb1a4.js +0 -1
  65. package/cjs/settings-icon-93d87559.js +0 -1
  66. package/cjs/skin-0c1c1fc7.js +0 -1
  67. package/cjs/videoSelector-80449ebf.js +0 -1
  68. package/esm/autoNextVideo-72386267.js +0 -1
  69. package/esm/caption-settings-10a68378.js +0 -1
  70. package/esm/generic-d42b8a76.js +0 -1
  71. package/esm/multicam-a3a95813.js +0 -1
  72. package/esm/multicamv2-9e651919.js +0 -1
  73. package/esm/mwebPotraitTray-a0a61627.js +0 -1
  74. package/esm/nextEpisodeButton-ba2c9e06.js +0 -1
  75. package/esm/playlist-2531b9e6.js +0 -1
  76. package/esm/resolution-b1c446fc.js +0 -1
  77. package/esm/series-07624a74.js +0 -1
  78. package/esm/series-v2-624e4fd2.js +0 -1
  79. package/esm/settings-icon-bcc0a21c.js +0 -1
  80. package/esm/skin-41dbf549.js +0 -1
  81. package/esm/videoSelector-accf5414.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e,i=require("./generic-cc7d7e07.js"),t=require("./util-b1efcc6f.js"),n=0,o=0,u=function e(t,n,u,c){o=t,t>u.length-1||(i.setVideoIdx(o+1),i.load(n,u[t].id).then((function(e){i.highlightVideo(o),o++,d(e)})).catch((function(t){d(t),setTimeout((function(){i.highlightVideo(o),o++,e(o,n,u)}),5e3)})))},d=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(n);var r=null==c?void 0:c.content;e=null==c?void 0:c.cb;var h=c.playerId;t.onVideoEnded(h,(function(){var e=i.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((o=i.getVideoIdx())>r.length-1||(i.setVideoIdx(o+1),i.load(h,r[o].id).then((function(e){i.highlightVideo(o),i.setCurrentVideo(e.response),o++,d(e)})).catch((function(e){d(e),i.highlightVideo(o),o++,n=setTimeout((function(){i.isPaused(h)&&u(o,h,r)}),5e3)}))))}))},exports.switchToNext=u;
package/cjs/bundle.css CHANGED
@@ -15,6 +15,7 @@
15
15
 
16
16
 
17
17
 
18
+
18
19
  .widget-selection{
19
20
  display: flex;
20
21
  align-items: center;
@@ -135,7 +136,66 @@
135
136
  .widget-selector-content #sr-widget{
136
137
  padding: 0 18px;
137
138
  }
139
+ /* nextep */
140
+ .next-ep-preview{
141
+ position: absolute;
142
+ height: min-content;
143
+ width: 300px;
144
+ bottom: 16%;
145
+ right: 1.5%;
146
+ padding: 13px;
147
+ border-radius: 4px;
148
+ background: rgba(0, 0, 0, 0.75);
149
+ }
150
+ .next-ep-img{
151
+ width: 185px;
152
+ height: 95px;
153
+
154
+ }
155
+ .next-ep-img-container{
156
+ width: 100%;
157
+ height: 100%;
158
+ }
159
+ .next-ep-header{
160
+ text-align: left;
161
+ font-weight: bold;
162
+ font-size: 18px;
163
+ margin-bottom: 8px;
164
+ }
165
+
166
+ .next-ep-title{
167
+ font-size: 15px;
168
+ margin-left: 8px;
169
+
170
+ }
138
171
 
172
+ .next-ep-content{
173
+ display: flex;
174
+ align-items: center;
175
+ }
176
+ .next-ep-content:hover{
177
+ cursor: pointer;
178
+ }
179
+
180
+ @media (max-width:600px){
181
+ .next-ep-preview{
182
+ width: 170px;
183
+ right: 2.5%;
184
+ padding: 6px;
185
+ bottom: 56px;
186
+ }
187
+ .next-ep-header{
188
+ font-size: 12px;
189
+ }
190
+ .next-ep-img {
191
+ width: 100px;
192
+ height: 60px;
193
+ }
194
+ .next-ep-title {
195
+ font-size: 9px;
196
+ margin-left: 8px;
197
+ }
198
+ }
139
199
  /* a wrapper element that tracks the mouse vertically */
140
200
  .vjs-thumbnail-holder {
141
201
  position: absolute;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),i=require("./icons-515b2da0.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator");var c=require("./generic-cc7d7e07.js");function l(e){var t=s();return function(){var n,r=o(e);if(t){var i=o(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return a(this,n)}}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var d=r.getComponent("Component"),u=function(a){n(s,d);var o=l(s);function s(t){var n,a,r,i,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(i=o.call(this,t,c)).playerId=c.playerId,i.seriesData=c.sres,i.currentVideoData=c.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(r=a.style)||void 0===r||r.setProperty("display","none","important"),i}return t(s,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(i.CaptionsSvgV2())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./caption-settings-34ca0188.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=c.getCaptions(this.playerId);null==t||t.map((function(t){return c.disableCaptions(e.playerId,t.id)}));var n=this.el(),a=r.dom.createEl("div",{className:"caption-selection-container hidden"});r.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",c.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(i),r.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),c.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=r.dom.createEl("div",{className:"caption-selector-head"}),a=r.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=r.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),l=r.dom.createEl("div",{className:"caption-selector-content"}),s=r.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();r.dom.appendContent(s,d),r.dom.appendContent(n,a),r.dom.appendContent(n,o),r.dom.appendContent(e,n),r.dom.appendContent(e,l),r.dom.appendContent(l,s),c.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=r.dom.createEl("div",{className:"caption-language-container"}),n=r.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});r.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 i=r.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});i.setAttribute("type","radio"),i.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},r.dom.appendContent(a,i),r.dom.appendContent(a,o),r.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var i=document.createElement("div");i.className="caption - ".concat(n),i.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=r.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),r.dom.appendContent(o,s),r.dom.appendContent(o,i),r.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=r.dom.createEl("div",{className:"caption-font-container"}),t=r.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});r.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,i=document.createElement("label");i.className="caption-font-holder",i.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=r.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)}},r.dom.appendContent(i,l),r.dom.appendContent(i,c),r.dom.appendContent(e,i)}return e}}]),s}();exports.default=u;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-a2a5ad78.js"),s=require("./renditions-e00ec925.js"),u=require("./localisation-56e0a999.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){var t=p();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-b41710bf.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("captionSelector",u),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||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(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-aa481861.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamView=function(e,t){Promise.resolve().then((function(){return require("./multicam-28ad2186.js")})).then((function(r){var n=r.default,o=t.streams,l=a.getPlayer(e);i.registerComponent("multicamModule",n),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var r=document.querySelector(".vjs-control-bar");r&&"live"==(null==t?void 0:t.skin)&&(r.style.background="transparent")},exports.addMwebPotraitTrayModule=function(e,t){Promise.resolve().then((function(){return require("./mwebPotraitTray-65dfc2de.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("mwebPotraitTray",n),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-c4f3d621.js")})).then((function(n){var o=n.default,l=a.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=a.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-91a68d26.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-65c490cf.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),u=s.getRenditions(e);(null==u?void 0:u.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:u},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var u=a.parseSvgString(l);return o.append(u),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-232bf4fd.js")})).then((function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),u=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<s.length;c++)u(c)}))},exports.addSeriesSelectorV2=function(t,r){Promise.resolve().then((function(){return require("./series-v2-09adb1a4.js")})).then((function(n){var o=n.default,l=a.getPlayer(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({playerId:t},r),l.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-93d87559.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("settingsSelector",u),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||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(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var u=a.parseSvgString(l);return o.append(u),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=d(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-80449ebf.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-cc7d7e07.js"),s=require("./renditions-679b535a.js"),u=require("./localisation-56e0a999.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){var t=p();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-95ee84ba.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("captionSelector",u),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||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(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-b35484f8.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamView=function(e,t){Promise.resolve().then((function(){return require("./multicam-5c3b676c.js")})).then((function(r){var n=r.default,o=t.streams,l=a.getPlayer(e);i.registerComponent("multicamModule",n),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var r=document.querySelector(".vjs-control-bar");r&&"live"==(null==t?void 0:t.skin)&&(r.style.background="transparent")},exports.addMwebPotraitTrayModule=function(e,t){Promise.resolve().then((function(){return require("./mwebPotraitTray-36cdb29f.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("mwebPotraitTray",n),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-28fcd961.js")})).then((function(n){var o=n.default,l=a.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=a.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-9da30b66.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-eceef15a.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),u=s.getRenditions(e);(null==u?void 0:u.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:u},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var u=a.parseSvgString(l);return o.append(u),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-e724b1cc.js")})).then((function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),u=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<s.length;c++)u(c)}))},exports.addSeriesSelectorV2=function(t,r){Promise.resolve().then((function(){return require("./series-v2-f1e98e62.js")})).then((function(n){var o=n.default,l=a.getPlayer(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({playerId:t},r),l.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-6dad65b6.js")})).then((function(r){var n,o,l,s,u=r.default,c=a.getPlayer(e);i.registerComponent("settingsSelector",u),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||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(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var u=a.parseSvgString(l);return o.append(u),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=d(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-26c84724.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("js-cookie"),a=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),d={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e,t){u("event",e,t)}function c(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 v(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?c(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var m={name:"@viewlift/player",version:"1.0.118",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.1","videojs-ima":"^2.1.0"}};window.vl_player_version=m.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:_(),params:v({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":m.version},withCredentials:!0})},f=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:O()+d.getLinearChannelDetails,params:v(v(v(v(v({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},w=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:y(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:b(),method:"POST",headers:{Authorization:r},data:v({},t),params:v({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),g=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:E(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:T(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},I=function(e){return O()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},h=function(){return O()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},E=function(e){return O()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},T=function(e,t){return O()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},y=function(){return O()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},b=function(){return O()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},_=function(){var e,t,n,i,o=O()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},O=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},D=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},x=null;function S(){return{set:function(e){e&&(x=e)},get:function(){return x}}}var F,P,V,A,C,L,R=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S().get(),i=O(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),W=null,N=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!D(t)){e.next=6;break}return W||(W=R().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&S().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){W=null}))),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(e){P=e},B=function(){return P},M=function(){return F},j=function(e){V=e},H=function(e){if(A){var t=A.get(e);j(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function z(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 G(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?z(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var q=function(){var e,t,n,i,o,r,a,l=B();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function J(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function X(){return K.apply(this,arguments)}function K(){return(K=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=Y(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());s(r?"FAILED_TO_START":"DROPPED_STREAM",G({pfm:window.platform,uid:J(),vid:q(),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),s("PLAY",G({pfm:window.platform,uid:J(),vid:q(),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(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))s("BUFFERING",G({pfm:window.platform,uid:J(),vid:q(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,s("FIRST_FRAME",G({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),vid:q()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;s("AD_REQUEST",G({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),vid:q(),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}),s("AD_IMPRESSION",G({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:J(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:q()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(Q(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var Q=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=G,e.t1=G,e.t2=G({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=J(),e.t5=q(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=20,X();case 20:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,N();case 37:p=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:p},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var Z=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},$=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ee=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},te=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ne(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 ie(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ne(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ne(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var oe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},re=function(e){var t=ae(e,"video.tags",[]),n=ae(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},ae=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},le=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,p,f,w,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,h=arguments.length>2?arguments[2]:void 0,E=(null==h?void 0:h.contentType)||"video",T=null==h||null===(e=h[E])||void 0===e?void 0:e.metadata,y=De(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===E?null==h||null===(t=h.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==h?void 0:h.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:ae(h,"video.gist.id",""),x=ie(ie({},se(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:oe(O,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ae(h,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:re(h),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ae(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+ae(h,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ae(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:ae(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(p=m.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ae(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:ae(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:ae(h,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ae(h,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ue(),VIEWLIFT_SEASON_NUMBER:de(),VIEWLIFT_CONTENT_TAGS:re(h)},null===(f=window)||void 0===f||null===(w=f.customData)||void 0===w?void 0:w.macros);for(var S in x){var F=new RegExp(S,"g");g=g.replace(F,x[S])}return g},de=function(){var e=U.get();return e>=0?e+1:1},ue=function(){var e,t,n,i=M(),o=B(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=U.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},se=function(e){var t,n,i,o,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 u=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(te()?u?l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=te()?ie(ie({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):ie(ie({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=ie(ie({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=te()?ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):ie(ie({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},ce=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[f])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[f])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return me(I);if(w){var T=pe(g,t);return T.src=le(T.src,t,e),T}if("Safari"!==ee()&&E)return ve(g);if(h){var y=me(g);return y.src=le(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=le(b.src,t,e),b}return null},ve=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},me=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},pe=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=ee();if(De(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return fe(t),l}var d,u={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(fe(t),u.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),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 fe=function(e){var t=De(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},we=function(e){var t=De(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},ge=function(e,t){var n=De(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})}))},Ie=!1,he=function(e,t,n){var i=le(t,e,n),o=De(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=De(e);if(null!==r.el_){Ie=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Ie&&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",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ee=["live","carousel","V2","defaultV2","multiplayer","minimalist"],Te=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},ye="",be=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Oe=function(e){return!!i.getPlayer("".concat(e))},De=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},xe=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,N();case 3:return r=e.sent,a=De(t),e.abrupt("return",new Promise((function(e,n){f(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=Y(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ce(r,t);k(r),l&&o?(Pe(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Se=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N();case 2:return d=e.sent,(M()||null)&&H(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&g(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,p,f,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;k(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);I&&he(t,I,w);var h=ce(w,t);if(h){var E,T,y,b,_,O,D,x,S,F,P,V,A,C,L=(null==w||null===(E=w.video)||void 0===E||null===(T=E.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),R=De(t);if(R.poster(L),Pe(t,h),R.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),R.on("loadeddata",(function(){$(),e({status:!0,msg:"Video Loaded",response:w})})),R.one("play",(function(){u&&s<95&&setTimeout((function(){R.currentTime(u)}),0)})),R.one("error",(function(){var e;n({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(x=D.closedCaptions)||void 0===x?void 0:x.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(F=S.closedCaptions)||void 0===F?void 0:F.length)>0)P=((null==w||null===(V=w.video)||void 0===V||null===(A=V.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null==w||null===(C=w.video)||void 0===C?void 0:C.closedCaptions)).filter((function(e){return"VTT"===e.format})),ge(t,P);else we(t)}else Z(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Ve(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Fe=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()},Pe=function(e,t){var n=De(e);n&&n.src(t)},Ve=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Oe(n)&&Z(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.addCaptions=ge,exports.authenticateLC=xe,exports.clearError=$,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},exports.createIconMarkup=function(e){return Te(e)},exports.createIdxMapping=function(e){A=new Map,e.map((function(e,t){A.set(e.id,t)}))},exports.detectBrowser=ee,exports.detectOrientationChange=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&ye!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),ye=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},exports.disableCaptions=function(e,t){for(var n=De(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=De(e);if(Fe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=De(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},exports.getCaptions=function(e){var t,n=De(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=M,exports.getCurrentVideo=B,exports.getEntitlementData=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getLinearChannelDetails=f,exports.getPlayer=De,exports.getSeriesDetails=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:O()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return o({method:"GET",url:h(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:I(i),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return C},exports.getSource=ce,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getVideoDetails=p,exports.getVideoIdx=function(){return V},exports.getVideoInfo=g,exports.handleDrawerResizing=function(e,t){var n,i=De(e),o=De(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){be(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){be(e,t)}),50)}))},exports.handleError=Z,exports.highlightVideo=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.impolicy16x9=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},exports.initialiseAdvertisement=he,exports.initiateErrorHandling=Ve,exports.isMobile=te,exports.isNotAValidSkin=function(e){return!Ee.includes(e)},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=Oe,exports.isTokenExpired=D,exports.load=Se,exports.loadVideo=Pe,exports.loadVideoInstantly=function(e,t,n){var i=De(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=Te,exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=S,exports.removeCaptions=we,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)},exports.saveWatchHistory=w,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=k,exports.setSeriesWatchMap=function(e){C=e},exports.setUpdatedElHeight=be,exports.setVideoIdx=j,exports.setVideoIdxById=H,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
package/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-a2a5ad78.js"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("@babel/runtime/helpers/typeof"),l=require("./util-abb0e4bb.js"),a=require("./renditions-e00ec925.js"),s=require("./resolution-65c490cf.js"),u=require("./localisation-56e0a999.js");require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var d,c,v=function(e){return new Promise((function(t,n){if(p(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},p=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},f=function(){var n=t(i.mark((function t(n){var r,l,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=e.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null==n||!n.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return s=t.sent,t.prev=5,t.next=8,v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,s.default(o),t.finish(13);case 16:null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=n&&n.airplay&&"Safari"==e.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return n.apply(this,arguments)}}(),m=function(t,n){var i=e.getPlayer(t);i&&n&&i.controlBar&&i.controlBar.progressControl.seekBar.on("click",(function(e){var n,i,r,l,a,s=this.el(),u=o.dom.getPointerPosition(s,e).x;o.getPlayer(t).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=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(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function h(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 g(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var y=[],w=0,b=null;function k(t,i,o){var r,l,a,s,u,v=arguments.length>3&&void 0!==arguments[3]&&arguments[3];c=(null==i||null===(r=i.watchHistory)||void 0===r?void 0:r.apiVersion)||"v1";var p=null==i||null===(l=i.watchHistory)||void 0===l?void 0:l.profileId,f=Math.floor(t.currentTime()),m=Math.floor(t.duration()),h=null==i||null===(a=i.watchHistory)||void 0===a?void 0:a.xapiKey,y=(null==i||null===(s=i.video)||void 0===s?void 0:s.originalObjectId)||null,k=(null==i||null===(u=i.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,I=Math.floor(t.currentTime()),j=v?100:Math.floor(f/m*100),S={};k?function(t,i,o){var r=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,t){return g(g({},e),{},n({},t,u[t]))}),{}),v=l.findIndex((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===d}));v<0?l.push(g(g({content:c},t),{},{addedDate:a,updateDate:a})):l[v]=g(g(g({},l[v]),t),{},{updateDate:a});localStorage.setItem("".concat(r),JSON.stringify(l))}(S={completed:v,watchedTime:I,watchedPercentage:j},p,i.siteOwner):("v1"==c?S={videoId:d,watchedTime:I,watchedPercentage:j,siteOwner:i.siteOwner,userId:i.userId,xApiKey:h}:"v2"==c&&(S=g(g({videoId:d,watchedTime:I,watchedPercentage:j,doneWatching:v,profileId:p},b&&{seriesId:b}),y&&{originalObjectId:y})),e.saveWatchHistory(S,c).then((function(e){})).catch((function(e){}))),w=f+o}function P(e){var t=[];return e&&(t=JSON.parse(localStorage.getItem("".concat(e))||"[]")),t}var I=function(t,n,i){var o=e.getPlayer(t);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),i&&i({status:!0,msg:"Volume set to ".concat(n,"%")})}else i&&i({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else i({status:!1,msg:"Cannot find player with id: '".concat(t,"'")})},j=function(t){var n=e.getPlayer(t);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(t,"'")},S=!1,T=function(t,n){var i,o,r=(null==t?void 0:t.contentType)||"video";if(((null==t||null===(i=t[r])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!S){var l=O(t,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,n);return a&&e.loadVideo(n,a),S=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function O(e,t,n){if(Array.isArray(e))return e.map((function(e){return O(e,t,n)}));if(null!==e&&"object"===r(e)){var i={};return Object.keys(e).forEach((function(o){o===t&&void 0!==e[n]?i[o]=e[n]:o===n&&void 0!==e[t]?i[o]=e[t]:i[o]=O(e[o],t,n)})),i}return e}function C(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 D(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?C(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var x=function(t,n,i,o){var r,l,a=o.res,s=o.sres,u=e.getPlayer(t),c=(null==a?void 0:a.contentType)||"video",v=(null==a||null===(r=a[c])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;e.setCurrentVideo(a),u&&(u.on("loadstart",(function(){v&&i.resolve({status:!0,msg:"Video Loaded",response:a})})),u.on("loadeddata",(function(){var o,r;(null==u||!u.muted())&&I(t,sessionStorage.getItem("volume")||"100");var l=e.getCurrentVideo();if(e.clearError(),i.resolve(D({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:a}:{response:a})),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&(!n.isAnonymousUser||null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.saveOffline)){var c,v,p=D(D({},n),a);!function(t,n,i){var o,r,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(b=null==n||null===(r=n.series)||void 0===r?void 0:r.id),y=[],w=0,d=i;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=e.getPlayer(t);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());y.includes(w)||(e==w?(y.push(e),k(s,n,a)):e>w&&(w=e+a))})),s.one("ended",(function(){k(s,n,a,!0)})))}(t,p,null==l||null===(c=l.video)||void 0===c||null===(v=c.gist)||void 0===v?void 0:v.id)}})),u.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",t)})),u.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,h=f.getMediaSession(),g=h.media.tracks.filter((function(e){return"TEXT"==e.type}));m=t?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(m)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.tech_.on("retryplaylist",(function(){v&&T(a,t)})),u.on("error",(function(){var n,o;4===u.error().code&&v?T(a,t):(e.handleError(t,(null==u||null===(n=u.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==u||null===(o=u.error())||void 0===o?void 0:o.message)||"Some error occured"}))})),u.one("play",(function(){var t;if(null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable){var i,o,r,l=null===(i=e.getCurrentVideo())||void 0===i||null===(o=i.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap().get(l)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){u.currentTime(s)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(v){u.currentSource();for(var e=u.textTracks(),t=e.length-1;t>=0;t--)u.removeRemoteTextTrack(e[t])}})))},V=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-f46e9286.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-ce922912.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-f027a4a1.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?Promise.resolve().then((function(){return require("./skin-0c1c1fc7.js")})).then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n?Promise.resolve().then((function(){return require("./skin-ba9b4442.js")})).then((function(n){n.initialiseSkin(e,t)})):"minimalist"==n&&Promise.resolve().then((function(){return require("./skin-142a2c5d.js")})).then((function(n){n.initaliseSkin(e,t)}))},E=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 R,A=function(){var e=t(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)}}(),q=function(){var e=t(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").then((function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){v("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"),v("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:A,loadEMELibrary:q});function H(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 L(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var _=function(r,l,a,s){var u,d,c,v,p,h,g,y,w,b,k,P,I,j,S,T,O,C,D,R,B,H,_,M,U,N,F,z,W,G,J,K,X,Y=l.res,Q=void 0===Y?null:Y,Z=l.sres,$=void 0===Z?null:Z;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(p=v.getInstance())||void 0===p||p.S;var ee=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(h=Q)||void 0===h?void 0:h.contentType)||"video",ne=e.impolicy16x9(null===(g=Q)||void 0===g||null===(y=g[te])||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||e.impolicy16x9(null===(b=Q)||void 0===b||null===(k=b[te])||void 0===k||null===(P=k.gist)||void 0===P||null===(I=P.imageGist)||void 0===I?void 0:I.r16x9),ie=(null===(j=Q)||void 0===j||null===(S=j[te])||void 0===S||null===(T=S.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,oe=(null===(O=Q)||void 0===O||null===(C=O[te])||void 0===C||null===(D=C.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,re=(null==a?void 0:a.drmLibrary)||!1,le=(null===(R=Q)||void 0===R||null===(B=R.ads)||void 0===B||null===(H=B.preRoll)||void 0===H||null===(_=H.adTags)||void 0===_||null===(M=_.web)||void 0===M?void 0:M.active)&&(null===(U=Q)||void 0===U||null===(N=U.ads)||void 0===N||null===(F=N.preRoll)||void 0===F||null===(z=F.adTags)||void 0===z||null===(W=z.web)||void 0===W?void 0:W.url);Q=L(L({},Q),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ae=(X={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,audioTrackButton:!1,pictureInPictureToggle:(a.skin,!1)},muteToggle:"multiplayer"==a.skin,liveui:ie},n(X,"autoplay",null==a?void 0:a.autoplay),n(X,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!le),n(X,"loop",(null==a?void 0:a.loop)||!1),n(X,"audioPosterMode",null==a?void 0:a.audioPosterMode),n(X,"html5",L(L({dash:L(L({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}},null==a?void 0:a.dash),vhs:L(L({experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==a||null===(G=a.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==a?void 0:a.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==a?void 0:a.experimentalBufferBasedABR)||!1})},0==(null==a||null===(J=a.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(K=a.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(X,"poster",ne),n(X,"techOrder",ee),n(X,"chromecast",{requestCustomDataFn:function(t){var n=e.getPlayer(r),i=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){f.isDrmEnabled=!0;var m=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;f.licenseUrl=m;var h=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];f.licenseToken=h}var g=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=g;var y=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=y;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=b,f.subTitles=n,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Q,t,i)}}),X);if(!o.getPlayers()[r])var se=o(r,ae,function(){var n=t(i.mark((function t(){var n,l,u,d,c,v,p,h,g,y,w,b,k,P,I,j,S,T,O,C,D,R,B,H;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f(a);case 2:if(oe&&s.resolve(L({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:Q}:{response:Q})),window.initialise(se),window.firstFrame(se),"white"!==window.controlsColor&&E(window.controlsColor,se),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),P=null===(n=Q)||void 0===n||null===(l=n[te])||void 0===l?void 0:l.drmEnabled,I=null===(u=Q)||void 0===u||null===(d=u[te])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,!P&&!re){t.next=22;break}if("Safari"!==e.detectBrowser()){t.next=15;break}return t.next=13,q();case 13:t.next=22;break;case 15:if("caliente"!=(null===(j=window)||void 0===j?void 0:j.siteName)){t.next=20;break}return t.next=18,q();case 18:t.next=22;break;case 20:return t.next=22,A();case 22:if(null==a||!a.videoSourceUrl){t.next=25;break}return t.next=25,A();case 25:ie&&m(r,I),!le||null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(r,le,Q),S=e.getSource(Q,r),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),S?e.loadVideo(r,S):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Q}),e.handleError(r,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Q)||void 0===p||null===(h=p[te])||void 0===h||null===(g=h.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(w=Q)||void 0===w||null===(b=w[te])||void 0===b||null===(k=b.closedCaptions)||void 0===k?void 0:k.length)>0)&&(H=(null===(O=Q)||void 0===O||null===(C=O[te])||void 0===C||null===(D=C.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(R=Q)||void 0===R||null===(B=R[te])||void 0===B?void 0:B.closedCaptions),T=H.filter((function(e){return"VTT"===e.format})),e.addCaptions(r,T)),null!=a&&a.disableControls?e.disableControls(r):V(r,L(L(L({},a),ae),{},{liveVideo:oe,isDvrEnabled:ie,res:Q,sres:$})),x(r,L(L(L({},a),ae),{},{liveVideo:oe}),s,{res:Q,sres:$});case 33:case"end":return t.stop()}}),t)})));return function(){return n.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(t){return new Promise((function(n,i){var o,r,l,a,s,d,c,p,f,m,h;if(!e.isPlayerInitialised(null==t?void 0:t.playerId)){var g=(null==t?void 0:t.videoSourceUrl)||!1,y=null==t?void 0:t.asat,w=(null==t||null===(o=t.epg)||void 0===o?void 0:o.enable)||!1,b=null==t?void 0:t.videoId,k=(null==t||null===(r=t.series)||void 0===r?void 0:r.enable)||!1;window.videoId=b;var I=null==t?void 0:t.token;if(e.token_authentication_enabled(t)){if(e.refreshTokenManager().set(null==t?void 0:t.refreshToken),!I||e.isTokenExpired(I))return void i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}});R=JSON.parse(atob(I.split(".")[1]))}window.siteId=null===(l=R)||void 0===l?void 0:l.siteId,window.siteName=null===(a=R)||void 0===a?void 0:a.site,t.isAnonymousUser=!(null===(s=R)||void 0===s||!s.anonymousId),t.siteOwner=(null===(d=R)||void 0===d?void 0:d.site)||null,t.userId=(null===(c=R)||void 0===c?void 0:c.userId)||null,window.sessionStorage.setItem("uid",null===(p=R)||void 0===p?void 0:p.userId),window.watchHistory=t.watchHistory||null,sessionStorage.setItem("vlp_token",I);var j=null==t?void 0:t.playerId;t.chromecastReceiverId=null!=t&&t.series?null:null==t?void 0:t.chromecastReceiverId;var S=null==t?void 0:t.airplay,T=null==t?void 0:t.apiBaseUrl,O=(null==t||null===(f=t.analytics)||void 0===f?void 0:f.gaId)||null,C=null==t?void 0:t.errors;C&&(window.customErrors=C),window.customData=null==t?void 0:t.customData,u.setLocalisation(null==t||null===(m=t.customData)||void 0===m?void 0:m.localisation),T&&(window.playerEntitlementUrl=T),window.controlsColor=(null==t?void 0:t.controlsColor)||"white",null!=t&&t.skin&&!e.isNotAValidSkin(t.skin)||(t.skin="defaultV2"),Promise.resolve().then((function(){return B})).then((function(e){e.importIMA()})),S&&"Safari"==e.detectBrowser()&&Promise.resolve().then((function(){return B})).then((function(e){e.importAirplay()})),O&&v("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then((function(){return e.runGtag(O)})).catch((function(e){}));var D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j));if(D&&D.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",V={directPlaybackUrl:g,id:x};y?e.getVideoDetails(x,I).then((function(e){_(j,{res:L(L({},e),V)},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,x)})):_(j,{res:V},t,{resolve:n,reject:i})}else if(k){var E,A=sessionStorage.getItem("season-idx")||0;e.seasonIdxManager.set(parseInt(A));var q=null==t||null===(E=t.series)||void 0===E?void 0:E.id;e.getSeriesDetails(q,I).then((function(o){var r,l,a,s=o.data,u=o.data.seasons;e.setCurrentSeries(u);var d=b||(null==u||null===(r=u[0])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(t,n){var i=new Map;e.getSeriesWatchHistory({videoId:t,token:n}).then((function(t){t.data.map((function(e){i.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),e.setSeriesWatchMap(i)})).catch((function(e){return console.log(e)}))}(q,I),e.getVideoDetails(d,I).then((function(o){var r,l,a;window.contentType=null==o||null===(r=o.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(o.data),_(j,{res:null==o?void 0:o.data,sres:s},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,b)}))})).catch((function(t){e.initiateErrorHandling(t,j,i)}))}else if(w){var H=null==t?void 0:t.epg;e.getLinearChannelDetails(H,I).then((function(e){var o=null==e?void 0:e.data;o.contentType="linearchannel",o.channelId=null==H?void 0:H.channelId,_(j,{res:o},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,b)}))}else e.getVideoDetails(b,I).then((function(o){var r,l,a,s;window.contentType=null==o||null===(r=o.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(null==o?void 0:o.data);var u,d=null==o?void 0:o.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(s=t.watchHistory)&&void 0!==s&&s.enable)if((null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,f=function(e,t,n){var i=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(n)),o=[];return i&&Array.isArray(i)&&(o=i.filter((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===t}))),o}((null===(c=t.watchHistory)||void 0===c?void 0:c.profileId)||"",b,null==t?void 0:t.siteOwner);if(f&&f.length)t.watchHistoryResumeTime=(null===(v=f[0])||void 0===v?void 0:v.watchedTime)||null,t.watchedPercentage=(null===(p=f[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",_(j,{res:d},t,{resolve:n,reject:i})}else e.getVideoInfo(b,I).then((function(e){var o,r,l,a,s,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==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,t.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",_(j,{res:d},t,{resolve:n,reject:i})})).catch((function(e){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(e)),_(j,{res:d},t,{resolve:n,reject:i})}));else _(j,{res:d},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,b)}))}}))},getRenditions:a.getRenditions,skip:e.skip,getPlayer:e.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:e.enableCaptions,disableCaptions:e.disableCaptions,getCaptions:e.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:I,getVolume:j,disableControls:e.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
1
+ "use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-cc7d7e07.js"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("@babel/runtime/helpers/typeof"),l=require("./util-b1efcc6f.js"),a=require("./renditions-679b535a.js"),s=require("./resolution-eceef15a.js"),u=require("./localisation-56e0a999.js");require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var d,c,v=function(e){return new Promise((function(t,n){if(p(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},p=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},f=function(){var n=t(i.mark((function t(n){var r,l,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=e.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null==n||!n.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return s=t.sent,t.prev=5,t.next=8,v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,s.default(o),t.finish(13);case 16:null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=n&&n.airplay&&"Safari"==e.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"default"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return n.apply(this,arguments)}}(),m=function(t,n){var i=e.getPlayer(t);i&&n&&i.controlBar&&i.controlBar.progressControl.seekBar.on("click",(function(e){var n,i,r,l,a,s=this.el(),u=o.dom.getPointerPosition(s,e).x;o.getPlayer(t).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=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(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function h(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 g(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var y=[],w=0,b=null;function k(t,n,i){var o,r,l,a,s,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];c=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var v=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,p=Math.floor(t.currentTime()),f=Math.floor(t.duration()),m=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,h=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,y=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,k=Math.floor(t.currentTime()),P=u?100:Math.floor(p/f*100),j={};y?I(j={completed:u,watchedTime:k,watchedPercentage:P},v,n.siteOwner):("v1"==c?j={videoId:d,watchedTime:k,watchedPercentage:P,siteOwner:n.siteOwner,userId:n.userId,xApiKey:m}:"v2"==c&&(j=g(g({videoId:d,watchedTime:k,watchedPercentage:P,doneWatching:u,profileId:v},b&&{seriesId:b}),h&&{originalObjectId:h})),e.saveWatchHistory(j,c).then((function(e){})).catch((function(e){}))),w=p+i}function P(e){var t=[];return e&&(t=JSON.parse(localStorage.getItem("".concat(e))||"[]")),t}function I(t,i,o){var r=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,t){return g(g({},e),{},n({},t,u[t]))}),{}),v=l.findIndex((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===d}));v<0?l.push(g(g({content:c},t),{},{addedDate:a,updateDate:a})):l[v]=g(g(g({},l[v]),t),{},{updateDate:a}),localStorage.setItem("".concat(r),JSON.stringify(l))}var j=function(t,n,i){var o=e.getPlayer(t);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),i&&i({status:!0,msg:"Volume set to ".concat(n,"%")})}else i&&i({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else i({status:!1,msg:"Cannot find player with id: '".concat(t,"'")})},S=function(t){var n=e.getPlayer(t);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(t,"'")},T=!1,O=function(t,n){var i,o,r=(null==t?void 0:t.contentType)||"video";if(((null==t||null===(i=t[r])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!T){var l=C(t,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,n);return a&&e.loadVideo(n,a),T=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function C(e,t,n){if(Array.isArray(e))return e.map((function(e){return C(e,t,n)}));if(null!==e&&"object"===r(e)){var i={};return Object.keys(e).forEach((function(o){o===t&&void 0!==e[n]?i[o]=e[n]:o===n&&void 0!==e[t]?i[o]=e[t]:i[o]=C(e[o],t,n)})),i}return e}function D(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 x(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?D(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):D(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var V=function(t,n,i,o){var r,l,a=o.res,s=o.sres,u=e.getPlayer(t),c=(null==a?void 0:a.contentType)||"video",v=(null==a||null===(r=a[c])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;e.setCurrentVideo(a),u&&(u.on("loadstart",(function(){v&&i.resolve({status:!0,msg:"Video Loaded",response:a})})),u.on("loadeddata",(function(){var o,r;(null==u||!u.muted())&&j(t,sessionStorage.getItem("volume")||"100");var l=e.getCurrentVideo();if(e.clearError(),i.resolve(x({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:a}:{response:a})),null!=n&&n.watchHistory&&null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.enable&&(!n.isAnonymousUser||null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.saveOffline)){var c,v,p=x(x({},n),a);!function(t,n,i){var o,r,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(b=null==n||null===(r=n.series)||void 0===r?void 0:r.id),y=[],w=0,d=i;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=e.getPlayer(t);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());y.includes(w)||(e==w?(y.push(e),k(s,n,a)):e>w&&(w=e+a))})),s.one("ended",(function(){k(s,n,a,!0)})))}(t,p,null==l||null===(c=l.video)||void 0===c||null===(v=c.gist)||void 0===v?void 0:v.id)}})),u.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",t)})),u.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,h=f.getMediaSession(),g=h.media.tracks.filter((function(e){return"TEXT"==e.type}));m=t?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(m)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.tech_.on("retryplaylist",(function(){v&&O(a,t)})),u.on("error",(function(){var n,o;4===u.error().code&&v?O(a,t):(e.handleError(t,(null==u||null===(n=u.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==u||null===(o=u.error())||void 0===o?void 0:o.message)||"Some error occured",response:a}))})),u.one("play",(function(){var t;if(null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable){var i,o,r,l=null===(i=e.getCurrentVideo())||void 0===i||null===(o=i.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap().get(l)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){u.currentTime(s)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(v){u.currentSource();for(var e=u.textTracks(),t=e.length-1;t>=0;t--)u.removeRemoteTextTrack(e[t])}})))},E=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-0f6301d7.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-d13755a0.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-47d8300b.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?Promise.resolve().then((function(){return require("./skin-88550a4e.js")})).then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n?Promise.resolve().then((function(){return require("./skin-edb064e8.js")})).then((function(n){n.initialiseSkin(e,t)})):"minimalist"==n&&Promise.resolve().then((function(){return require("./skin-4f2bca89.js")})).then((function(n){n.initaliseSkin(e,t)}))},R=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 A,q=function(){var e=t(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)}}(),B=function(){var e=t(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").then((function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){v("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"),v("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:q,loadEMELibrary:B});function L(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 _(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?L(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var M=function(r,l,a,s){var u,d,c,v,p,h,g,y,w,b,k,P,I,j,S,T,O,C,D,x,A,H,L,M,U,N,F,z,W,G,J,K,X,Y=l.res,Q=void 0===Y?null:Y,Z=l.sres,$=void 0===Z?null:Z;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(p=v.getInstance())||void 0===p||p.S;var ee=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(h=Q)||void 0===h?void 0:h.contentType)||"video",ne=e.impolicy16x9(null===(g=Q)||void 0===g||null===(y=g[te])||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||e.impolicy16x9(null===(b=Q)||void 0===b||null===(k=b[te])||void 0===k||null===(P=k.gist)||void 0===P||null===(I=P.imageGist)||void 0===I?void 0:I.r16x9),ie=(null===(j=Q)||void 0===j||null===(S=j[te])||void 0===S||null===(T=S.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,oe=(null===(O=Q)||void 0===O||null===(C=O[te])||void 0===C||null===(D=C.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,re=(null==a?void 0:a.drmLibrary)||!1,le=(null===(x=Q)||void 0===x||null===(A=x.ads)||void 0===A||null===(H=A.preRoll)||void 0===H||null===(L=H.adTags)||void 0===L||null===(M=L.web)||void 0===M?void 0:M.active)&&(null===(U=Q)||void 0===U||null===(N=U.ads)||void 0===N||null===(F=N.preRoll)||void 0===F||null===(z=F.adTags)||void 0===z||null===(W=z.web)||void 0===W?void 0:W.url);Q=_(_({},Q),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ae=(X={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,audioTrackButton:!1,pictureInPictureToggle:(a.skin,!1)},muteToggle:"multiplayer"==a.skin,liveui:ie},n(X,"autoplay",null==a?void 0:a.autoplay),n(X,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!le),n(X,"loop",(null==a?void 0:a.loop)||!1),n(X,"audioPosterMode",null==a?void 0:a.audioPosterMode),n(X,"html5",_(_({dash:_(_({},!o.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}},null==a?void 0:a.dash),vhs:_(_({experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==a||null===(G=a.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==a?void 0:a.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==a?void 0:a.experimentalBufferBasedABR)||!1})},0==(null==a||null===(J=a.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(K=a.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(X,"poster",ne),n(X,"techOrder",ee),n(X,"chromecast",{requestCustomDataFn:function(t){var n=e.getPlayer(r),i=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){f.isDrmEnabled=!0;var m=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;f.licenseUrl=m;var h=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];f.licenseToken=h}var g=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=g;var y=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=y;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=b,f.subTitles=n,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Q,t,i)}}),X);if(!o.getPlayers()[r])var se=o(r,ae,function(){var n=t(i.mark((function t(){var n,l,u,d,c,v,p,h,g,y,w,b,k,P,I,j,S,T,O,C,D,x,A,H;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f(a);case 2:if(oe&&s.resolve(_({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:Q}:{response:Q})),window.initialise(se),window.firstFrame(se),"white"!==window.controlsColor&&R(window.controlsColor,se),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),P=null===(n=Q)||void 0===n||null===(l=n[te])||void 0===l?void 0:l.drmEnabled,I=null===(u=Q)||void 0===u||null===(d=u[te])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,!P&&!re){t.next=22;break}if("Safari"!==e.detectBrowser()){t.next=15;break}return t.next=13,B();case 13:t.next=22;break;case 15:if("caliente"!=(null===(j=window)||void 0===j?void 0:j.siteName)){t.next=20;break}return t.next=18,B();case 18:t.next=22;break;case 20:return t.next=22,q();case 22:if(null==a||!a.videoSourceUrl){t.next=25;break}return t.next=25,q();case 25:ie&&m(r,I),!le||null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(r,le,Q),S=e.getSource(Q,r),null!=a&&a.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,a.nearestClusterUrl)),S?e.loadVideo(r,S):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Q}),e.handleError(r,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Q)||void 0===p||null===(h=p[te])||void 0===h||null===(g=h.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(w=Q)||void 0===w||null===(b=w[te])||void 0===b||null===(k=b.closedCaptions)||void 0===k?void 0:k.length)>0)&&(H=(null===(O=Q)||void 0===O||null===(C=O[te])||void 0===C||null===(D=C.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(x=Q)||void 0===x||null===(A=x[te])||void 0===A?void 0:A.closedCaptions),T=H.filter((function(e){return"VTT"===e.format})),e.addCaptions(r,T)),null!=a&&a.disableControls?e.disableControls(r):E(r,_(_(_({},a),ae),{},{liveVideo:oe,isDvrEnabled:ie,res:Q,sres:$})),V(r,_(_(_({},a),ae),{},{liveVideo:oe}),s,{res:Q,sres:$});case 33:case"end":return t.stop()}}),t)})));return function(){return n.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(t){return new Promise((function(n,i){var o,r,l,a,s,d,c,p,f,m,h;if(!e.isPlayerInitialised(null==t?void 0:t.playerId)){var g=(null==t?void 0:t.videoSourceUrl)||!1,y=null==t?void 0:t.asat,w=(null==t||null===(o=t.epg)||void 0===o?void 0:o.enable)||!1,b=null==t?void 0:t.videoId,k=(null==t||null===(r=t.series)||void 0===r?void 0:r.enable)||!1;window.videoId=b;var I=null==t?void 0:t.token;if(e.token_authentication_enabled(t)){if(e.refreshTokenManager().set(null==t?void 0:t.refreshToken),!I||e.isTokenExpired(I))return void i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}});A=JSON.parse(atob(I.split(".")[1]))}window.siteId=null===(l=A)||void 0===l?void 0:l.siteId,window.siteName=null===(a=A)||void 0===a?void 0:a.site,t.isAnonymousUser=!(null===(s=A)||void 0===s||!s.anonymousId),t.siteOwner=(null===(d=A)||void 0===d?void 0:d.site)||null,t.userId=(null===(c=A)||void 0===c?void 0:c.userId)||null,window.sessionStorage.setItem("uid",null===(p=A)||void 0===p?void 0:p.userId),window.watchHistory=t.watchHistory||null,sessionStorage.setItem("vlp_token",I);var j=null==t?void 0:t.playerId;t.chromecastReceiverId=null!=t&&t.series?null:null==t?void 0:t.chromecastReceiverId;var S=null==t?void 0:t.airplay,T=null==t?void 0:t.apiBaseUrl,O=(null==t||null===(f=t.analytics)||void 0===f?void 0:f.gaId)||null,C=null==t?void 0:t.errors;C&&(window.customErrors=C),window.customData=null==t?void 0:t.customData,u.setLocalisation(null==t||null===(m=t.customData)||void 0===m?void 0:m.localisation),T&&(window.playerEntitlementUrl=T),window.controlsColor=(null==t?void 0:t.controlsColor)||"white",null!=t&&t.skin&&!e.isNotAValidSkin(t.skin)||(t.skin="defaultV2"),Promise.resolve().then((function(){return H})).then((function(e){e.importIMA()})),S&&"Safari"==e.detectBrowser()&&Promise.resolve().then((function(){return H})).then((function(e){e.importAirplay()})),O&&v("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then((function(){return e.runGtag(O)})).catch((function(e){}));var D=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j));if(D&&D.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",V={directPlaybackUrl:g,id:x};y?e.getVideoDetails(x,I).then((function(e){M(j,{res:_(_({},e),V)},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,x)})):M(j,{res:V},t,{resolve:n,reject:i})}else if(k){var E,R=sessionStorage.getItem("season-idx")||0;e.seasonIdxManager.set(parseInt(R));var q=null==t||null===(E=t.series)||void 0===E?void 0:E.id;e.getSeriesDetails(q,I).then((function(o){var r,l,a,s=o.data,u=o.data.seasons;e.setCurrentSeries(u);var d=b||(null==u||null===(r=u[0])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(t,n){var i=new Map;e.getSeriesWatchHistory({videoId:t,token:n}).then((function(t){t.data.map((function(e){i.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),e.setSeriesWatchMap(i)})).catch((function(e){return console.log(e)}))}(q,I),e.getVideoDetails(d,I).then((function(o){var r,l,a;window.contentType=null==o||null===(r=o.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(o.data),M(j,{res:null==o?void 0:o.data,sres:s},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,b)}))})).catch((function(t){e.initiateErrorHandling(t,j,i)}))}else if(w){var B=null==t?void 0:t.epg;e.getLinearChannelDetails(B,I).then((function(e){var o=null==e?void 0:e.data;o.contentType="linearchannel",o.channelId=null==B?void 0:B.channelId,M(j,{res:o},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,b)}))}else e.getVideoDetails(b,I).then((function(o){var r,l,a,s;window.contentType=null==o||null===(r=o.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(null==o?void 0:o.data);var u,d=null==o?void 0:o.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(s=t.watchHistory)&&void 0!==s&&s.enable)if((null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,f=function(e,t,n){var i=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(n)),o=[];return i&&Array.isArray(i)&&(o=i.filter((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===t}))),o}((null===(c=t.watchHistory)||void 0===c?void 0:c.profileId)||"",b,null==t?void 0:t.siteOwner);if(f&&f.length)t.watchHistoryResumeTime=(null===(v=f[0])||void 0===v?void 0:v.watchedTime)||null,t.watchedPercentage=(null===(p=f[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",M(j,{res:d},t,{resolve:n,reject:i})}else e.getVideoInfo(b,I).then((function(e){var o,r,l,a,s,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==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,t.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",M(j,{res:d},t,{resolve:n,reject:i})})).catch((function(e){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(e)),M(j,{res:d},t,{resolve:n,reject:i})}));else M(j,{res:d},t,{resolve:n,reject:i})})).catch((function(t){e.initiateErrorHandling(t,j,i,b)}))}}))},getRenditions:a.getRenditions,skip:e.skip,getPlayer:e.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:e.enableCaptions,disableCaptions:e.disableCaptions,getCaptions:e.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:j,getVolume:S,disableControls:e.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-a2a5ad78.js");exports.initialiseKeyboardEvents=function(r,t){var i,u,l=e.getPlayer(r),n=null==l||null===(i=l.controlBar)||void 0===i||null===(u=i.playToggle)||void 0===u?void 0:u.el_,o=document.getElementsByTagName("video")[0];o&&o.addEventListener("keydown",(function(i){switch(i.key){case" ":return i.preventDefault(),o&&o.focus(),void(n&&n.click());case"m":case"M":return i.preventDefault(),o&&o.focus(),void(l.muted()?l.muted(!1):l.muted(!0));case"f":i.preventDefault(),o&&o.focus();var u=document.querySelector(".vjs-fullscreen-control");return void(u&&u.click());case"F":i.preventDefault();var c=document.querySelector(".vjs-fullscreen-control");return void(c&&c.click());case"ArrowLeft":if((1==t.liveVideo||1==t.liveui)&&0==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.rewind(r,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.skip(r,10);default:return}}))};
1
+ "use strict";var e=require("./generic-cc7d7e07.js");exports.initialiseKeyboardEvents=function(r,t){var i,u,l=e.getPlayer(r),n=null==l||null===(i=l.controlBar)||void 0===i||null===(u=i.playToggle)||void 0===u?void 0:u.el_,o=document.getElementsByTagName("video")[0];o&&o.addEventListener("keydown",(function(i){switch(i.key){case" ":return i.preventDefault(),o&&o.focus(),void(n&&n.click());case"m":case"M":return i.preventDefault(),o&&o.focus(),void(l.muted()?l.muted(!1):l.muted(!0));case"f":i.preventDefault(),o&&o.focus();var u=document.querySelector(".vjs-fullscreen-control");return void(u&&u.click());case"F":i.preventDefault();var c=document.querySelector(".vjs-fullscreen-control");return void(c&&c.click());case"ArrowLeft":if((1==t.liveVideo||1==t.liveui)&&0==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.rewind(r,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.skip(r,10);default:return}}))};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),l=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),a=require("video.js"),s=require("./loader-393b838a.js"),u=require("./generic-cc7d7e07.js");function c(e){var t=d();return function(){var i,l=n(e);if(t){var o=n(this).constructor;i=Reflect.construct(l,arguments,o)}else i=l.apply(this,arguments);return r(this,i)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var v=a.getComponent("Component"),m=function(r){l(d,v);var n=c(d);function d(t){var l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),l=n.call(this,t,r),o(i(l),"multicamCssPositioning",(function(e,t){var r=document.getElementById(t);if(r){var n,o,a,s,u,c,d,v,m=window.getComputedStyle(r,null),h=m.getPropertyValue("height"),f=m.getPropertyValue("width"),p=h.slice(0,-2);if(f.slice(0,-2)-135<=135)e.style.bottom="290px",e.style.height="352px";else"live"==l.config.skin&&(null===(n=i(l))||void 0===n||null===(o=n.config)||void 0===o||!o.liveui)&&(null===(a=i(l))||void 0===a||null===(s=a.config)||void 0===s||!s.liveVideo)||null!==(u=i(l))&&void 0!==u&&null!==(c=u.config)&&void 0!==c&&c.liveui&&null!==(d=i(l))&&void 0!==d&&null!==(v=d.config)&&void 0!==v&&v.liveVideo?(e.style.bottom="".concat(p-135,"px"),e.style.height="".concat(p-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(p-105,"px"))}})),l.playerId=r.playerId,l.streams=null==r?void 0:r.streams,l.config=null==r?void 0:r.config,l.createUI(null==r?void 0:r.streams),l}return t(d,[{key:"createEl",value:function(){return a.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,r,n,o,a=this,s=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===(r=this.config)||void 0===r?void 0:r.liveVideo)?null==s||null===(n=s.classList)||void 0===n||n.add("".concat(this.config.skin)):null==s||null===(o=s.classList)||void 0===o||o.add("default"),this.loadCSS();for(var u=0;u<e.length;u++)this.createTile(e[u],u);this.multicamCssPositioning(s,this.playerId),window.onresize=function(){a.multicamCssPositioning(s,a.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(),r=a.dom.createEl("div",{className:"tile ".concat(t)});return 0==t&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(e.img,")"),a.dom.appendContent(l,r),r.addEventListener("click",(function(t){s.showLoader(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),u.load(i.playerId,e.id).then((function(e){u.play(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(){Promise.resolve().then((function(){return require("./multicam-a41fe4a6.js")})).then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),d}();exports.default=m;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-515b2da0.js"),l=require("./generic-cc7d7e07.js");function i(e){var t=c();return function(){var r,s=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return n(this,r)}}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(n){r(c,d);var a=i(c);function c(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(r=a.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(c,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-76d8530b.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=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.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 r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var i=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=s.dom.createEl("div",{className:"stream-selector-content"}),d=s.dom.createEl("div",{className:"stream-tray"}),u=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then((function(e){l.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(d,n),s.dom.appendContent(c,d)},m=0;m<this.streams.length;m++)u(m);s.dom.appendContent(n,a),s.dom.appendContent(n,i),s.dom.appendContent(e,n),s.dom.appendContent(e,c),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),c}();exports.default=u;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./loader-393b838a.js"),i=require("./generic-cc7d7e07.js");function a(e){var t=c();return function(){var r,o=n(e);if(t){var s=n(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return l(this,r)}}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var d=o.getComponent("Component"),u=function(l){r(c,d);var n=a(c);function c(t){var r,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(r=n.call(this,t,l)).playerId=l.playerId,r.config=l.config,r.createUI(null==l?void 0:l.config.streams),r}return t(c,[{key:"createEl",value:function(){return o.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,r,l,n,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(r=this.config)||void 0===r?void 0:r.liveVideo)||!(null!=this&&null!==(l=this.config)&&void 0!==l&&l.liveui)&&!(null!=this&&null!==(n=this.config)&&void 0!==n&&n.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var v=o.dom.createEl("div",{className:"broadcast"});v.innerHTML="Broadcasts";var m=o.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==m||null===(a=m.classList)||void 0===a||a.add("dvr"):null==m||null===(c=m.classList)||void 0===c||c.add("nondvr"),m.style.width="".concat(window.innerWidth-50,"px");var h=o.dom.createEl("div",{className:"tilecontainer-potrait"});o.dom.appendContent(d,v),o.dom.appendContent(d,m),o.dom.appendContent(m,h),v.addEventListener("click",(function(){null!=m&&m.classList.contains("hideMWebTray")?(m.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==m||m.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var p=0;p<e.length;p++)this.createTile(e[p],p)}},{key:"createTile",value:function(e,t){var r=this,l=this.el(),n=o.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(n.style.border="2px solid red"),n.style.backgroundImage="url(".concat(e.img,")");var a=o.dom.$(".tilecontainer-potrait",this.contentEl());return o.dom.appendContent(a,n),n.addEventListener("click",(function(t){s.showLoader(r.playerId),r.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),i.load(r.playerId,e.id).then((function(e){i.play(r.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./mwebPotrait-3c11d7cf.js")})).then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),r=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),l=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),n=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==r||r.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==n||n.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),c}();exports.default=u;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-515b2da0.js"),s=require("./generic-cc7d7e07.js");function a(e){var n=d();return function(){var t,o=i(e);if(n){var l=i(this).constructor;t=Reflect.construct(o,arguments,l)}else t=o.apply(this,arguments);return r(this,t)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var u=o.getComponent("Component"),c=function(r){t(s,u);var i=a(s);function s(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(t=i.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(s,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./nextEpisodeButton-b6e6586f.js")})).then((function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),n.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")})),n.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")}))}}]),s}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach((function(e,r){e.gist.id===n&&(t=r)})),t):null},f=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then((function(e){s.setCurrentVideo(e.response)}))};var r=o.dom.$(".next-eps-image"),i=s.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var a=o.dom.$(".next-eps-description"),d=s.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=d&&d.firstChild;)null==a||a.appendChild(d.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);f(i.nextEp)};
@@ -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"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-515b2da0.js"),r=require("./generic-cc7d7e07.js"),c=require("./autoNextVideo-e1767094.js");function d(e){var t=u();return function(){var n,l=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(l,arguments,o)}else n=l.apply(this,arguments);return i(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("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-b1efcc6f.js");var p=o.getComponent("Component"),v=function(i){l(u,p);var a=d(u);function u(e){var n,l,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),(o=a.call(this,e,s)).playerId=s.playerId,o.seriesData=s.sres,o.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,o.cb=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.cb)||null,o.autoNext=(null==s||null===(i=s.playlist)||void 0===i?void 0:i.autoNext)||!1,o.currentVideoData=s.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&c.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb}),o}return n(u,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./playlist-df87ca90.js")})).then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(r.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=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=o.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),u=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,u),o.dom.appendContent(a,s),o.dom.appendContent(d,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),m=o.dom.createEl("div",{className:"playlist-image"});m.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,m),o.dom.appendContent(p,v),o.dom.appendContent(a,p),o.dom.appendContent(d,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,d),r.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}}))}}]),u}();exports.default=v;
@@ -1 +1 @@
1
- "use strict";var l=require("./generic-a2a5ad78.js");exports.getRenditions=function(i){var n,e=l.getPlayer(i),t=[];if((null==e||null===(n=e.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==e||null===(o=e.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(t=null==u?void 0:u.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var v,r,h=null==e||null===(v=e.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(t=null==h?void 0:h.sort((function(l,i){return i.height-l.height})))}return t};
1
+ "use strict";var l=require("./generic-cc7d7e07.js");exports.getRenditions=function(i){var n,e=l.getPlayer(i),t=[];if((null==e||null===(n=e.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==e||null===(o=e.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(t=null==u?void 0:u.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var v,r,h=null==e||null===(v=e.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(t=null==h?void 0:h.sort((function(l,i){return i.height-l.height})))}return t};
@@ -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"),i=require("@babel/runtime/helpers/assertThisInitialized"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/defineProperty"),r=require("video.js"),s=require("./generic-cc7d7e07.js");function c(e){var t=u();return function(){var n,i=d(e);if(t){var a=d(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.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/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js");var h=r.getComponent("Component"),v=function(o){a(u,h);var d=c(u);function u(n){var a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),a=d.call(this,n,o),l(i(a),"masterRenditions",[]),l(i(a),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",a.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;a.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(a),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),a.playerId=null==o?void 0:o.playerId,a.skin=null==o?void 0:o.skin,a.icon=null==o?void 0:o.icon,a.masterRenditions=[],a.fontSizeOptions=[10,12,14],a.createRenditions(o.renditions),window.height=null,a}return n(u,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),a=s.parseSvgString(this.icon);if(i.append(a),"live"===this.skin){var o=document.createTextNode(" Settings");i.appendChild(o)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),c=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(c,l),this.toggleContentOnHover(n,d);var u=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,a,o=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(a=e.playlist)||void 0===a?void 0:a.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(o,s),r.dom.appendContent(u,o),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,p(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",u),"Safari"!=s.detectBrowser()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),a=(e.bitrate/1e6).toFixed(1),o="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(o="".concat(e.height,"p @ ").concat(a,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:o,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(u,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,p(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",u)),r.dom.appendContent(c,u),r.dom.appendContent(d,c),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t,n,a=e.activeCues[0];if(console.log((null==a||null===(t=a.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),a&&document.querySelector(".auto.selected")){var o,d,l,r,s,c,u,h;if(null!=a&&null!==(o=a.value)&&void 0!==o&&null!==(d=o.resolution)&&void 0!==d&&d.height&&i!==(null==a||null===(l=a.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==a||null===(u=a.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==a||null===(s=a.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,a,o,d,l=null===(i=this.player_)||void 0===i||null===(a=i.tech_)||void 0===a?void 0:a.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(o=this.player_)||void 0===o||null===(d=o.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,p(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),v=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});v.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(v,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,p(n.playerId,null,!0)})),r.dom.appendContent(h,v),r.dom.appendContent(t,h)}}}]),u}(),p=function(e,t,n){var i,a=s.getPlayer(e),o=null==t?void 0:t.bandwidth;if((null==a||null===(i=a.tech_)||void 0===i?void 0:i.vhs)||!1){a.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===o?e.enabled(!0):e.enabled(!1)})),a.handleTechPlaying_();var d=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==a||null===(u=a.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var v,p,m,g;null==a||null===(v=a.dash)||void 0===v||null===(p=v.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==a||null===(m=a.dash)||void 0===m||null===(g=m.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(f)}),100);var w=r.dom.$(".content");w&&r.dom.addClass(w,"hidden")}}};exports.default=v,exports.playSelectedResolution=p;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-cc7d7e07.js"),u=require("./loader-393b838a.js"),p=require("./icons-515b2da0.js");function v(e){var i=h();return function(){var t,n=a(e);if(i){var s=a(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return r(this,t)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var f,m=c.getComponent("Component"),g=function(e){s(a,m);var r=v(a);function a(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,a),t=r.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,f=s.playerId;var l=t.el();return y(l,t.seriesData),t.loadCSS(),t}return t(a,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-9c237975.js")})).then((function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)}))}}]),a}();function b(){return(b=e(l.mark((function e(i,t,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),u.showLoader(f),d.load(f,t).then((function(e){d.setCurrentVideo(e.response),d.play(f)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(p.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=d.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=d.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then((function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map((function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),p=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),h=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)}));for(var m=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,n){return b.apply(this,arguments)}(i,f[i].id,t,u)})),e.episodes[i].id==h&&u[i].classList.add("highlight-active-eps")},g=0;g<c.length;g++)m(g)},exports.seriesModule=g;
@@ -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"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-515b2da0.js"),d=require("./generic-cc7d7e07.js"),c=require("./autoNextVideo-e1767094.js");function u(e){var t=v();return function(){var n,s=r(e);if(t){var i=r(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-b1efcc6f.js");var p=l.getComponent("Component"),m=function(o){i(v,p);var r=u(v);function v(n){var i,o,l,a,u,p,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,v),(p=r.call(this,n,m)).playerId=m.playerId,p.seriesData=m.sres,p.videos=null==m||null===(i=m.sres)||void 0===i?void 0:i.seasons,p.currentVideoData=m.res,p.initialiseStructure(),p.loadCSS(),p.selectedSeason=0,p.cb=null==m||null===(o=m.series)||void 0===o?void 0:o.cb,p.autoPlayNext=(null==m||null===(l=m.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),p.watchMap=d.getSeriesWatchMap(),null!==(a=s(p))&&void 0!==a&&a.autoPlayNext&&null!=m&&null!==(u=m.series)&&void 0!==u&&u.enable){var h,g,f,C,y=null==m||null===(h=m.sres)||void 0===h?void 0:h.seasons,b=[];y.map((function(t){b.push.apply(b,e(t.episodes))})),d.createIdxMapping(b),d.setVideoIdxById(null===(g=p.options_)||void 0===g||null===(f=g.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),c.autoPlayNext({playerId:p.playerId,content:b,cb:p.cb,series:null==m?void 0:m.sres})}return p}return n(v,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-fd7485a5.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(d.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=d.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();l.dom.appendContent(r,c),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),d.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;d.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}}));for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=d.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),v}();exports.default=m;
@@ -1 +1 @@
1
- "use strict";exports.default=".series-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.series-selector-icon {\n cursor: pointer;\n}\n\n.series-selection-container {\n position: absolute;\n width: 350px;\n bottom: 0px;\n right: -350px;\n background: #00000080 !important;\n z-index: -1;\n transition: right 200ms ease-out;\n}\n\n.series-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n margin-bottom:4px;\n padding: 8px 12px;\n}\n\n.series-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.series-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.series-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.series-selector-cross-icon {\n cursor: pointer;\n}\n\n.series-selector-back-icon {\n cursor: pointer;\n}\n\n.series-selector-content {\n height: 74%;\n overflow: scroll;\n}\n\n.series-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.series-selector-content {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n\n.series-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n}\n\n.recommended {\n height: 175px;\n width: 309px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.video {\n margin-bottom: 12px;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n\n}\n\n.recommended:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 15px;\n padding: 7px;\n}\n\n\n.series-selector-content{\n padding: 0 18px;\n}\n\n.series-section{\n height: 3rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n width: 100%;\n}\n\n.series-section-expanded{\n width: 100%;\n display: flex;\n transition: 300ms ease-in;\n}\n.series-section-expanded.hidden{\n visibility: hidden ;\n max-height: 0;\n}\n\n.series-title{\n font-size: 12px;\n font-weight: 800;\n text-align: start;\n pointer-events: none;\n width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.series-title:hover{\n cursor: pointer;\n}\n.series-description{\n pointer-events: none;\n width: 50%;\n padding-left: 10px;\n text-align: start;\n max-height: 90px;\n overflow: hidden;\n}\n.series-image{\n width: 160px;\n height: 90px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n\n.video-js .series-progress-bar {\n max-width: 100px;\n height: 3px;\n background-color: #7777777e;\n display: flex;\n width: 100%;\n}\n.video-js .series-progress-bar-value {\n background-color: white;\n height: 2px;\n margin: 0;\n}\n\n.series-section-expanded:hover{\n cursor: pointer;\n}\n\n\n.season-container-title {\n margin-left: 10px;\n font-size: 16px;\n text-align: left;\n font-weight: 600;\n margin-bottom: 10px;\n}\n\n.season-container {\n width: 100%;\n margin-bottom: 30px;\n}\n\n.season-holder {\n display: flex;\n width: 90%;\n height: 2.5rem;\n padding: 10px 10px;\n margin-bottom: 10px;\n margin-left: 6px;\n}\n\n.season-holder>input {\n margin: 1px 4px;\n visibility: hidden;\n}\n\n.season-holder>input[type='radio']:checked {\n background: black;\n}\n\n.season-selected {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.season-holder:hover {\n cursor: pointer;\n}\n.season {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-left: 4px;\n}\n\n@media (max-width:600px){\n .series-selection{\n display: none;\n }\n}\n\n/* nextep */\n.next-ep-preview{\n position: absolute;\n height: min-content;\n width: 300px;\n bottom: 16%;\n right: 1.5%;\n padding: 13px;\n border-radius: 4px;\n background: rgba(0, 0, 0, 0.75);\n}\n.next-ep-img{\n width: 185px;\n height: 95px;\n \n}\n.next-ep-img-container{\n width: 100%;\n height: 100%;\n}\n.next-ep-header{\n text-align: left;\n font-weight: bold;\n font-size: 18px;\n margin-bottom: 8px;\n}\n\n.next-ep-title{\n font-size: 15px;\n margin-left: 8px;\n\n}\n\n.next-ep-content{\n display: flex;\n align-items: center;\n}\n.next-ep-content:hover{\n cursor: pointer;\n}\n\n@media (max-width:600px){\n .next-ep-preview{\n width: 170px;\n right: 2.5%;\n padding: 6px;\n bottom: 56px;\n }\n .next-ep-header{\n font-size: 12px;\n }\n .next-ep-img {\n width: 100px;\n height: 60px;\n }\n .next-ep-title {\n font-size: 9px;\n margin-left: 8px;\n }\n}";
1
+ "use strict";exports.default=".series-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.series-selector-icon {\n cursor: pointer;\n}\n\n.series-selection-container {\n position: absolute;\n width: 350px;\n bottom: 0px;\n right: -350px;\n background: #00000080 !important;\n z-index: -1;\n transition: right 200ms ease-out;\n}\n\n.series-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n margin-bottom:4px;\n padding: 8px 12px;\n}\n\n.series-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.series-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.series-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.series-selector-cross-icon {\n cursor: pointer;\n}\n\n.series-selector-back-icon {\n cursor: pointer;\n}\n\n.series-selector-content {\n height: 74%;\n overflow: scroll;\n}\n\n.series-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.series-selector-content {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n\n.series-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n}\n\n.recommended {\n height: 175px;\n width: 309px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.video {\n margin-bottom: 12px;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n\n}\n\n.recommended:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 15px;\n padding: 7px;\n}\n\n\n.series-selector-content{\n padding: 0 18px;\n}\n\n.series-section{\n height: 3rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n width: 100%;\n}\n\n.series-section-expanded{\n width: 100%;\n display: flex;\n transition: 300ms ease-in;\n}\n.series-section-expanded.hidden{\n visibility: hidden ;\n max-height: 0;\n}\n\n.series-title{\n font-size: 12px;\n font-weight: 800;\n text-align: start;\n pointer-events: none;\n width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.series-title:hover{\n cursor: pointer;\n}\n.series-description{\n pointer-events: none;\n width: 50%;\n padding-left: 10px;\n text-align: start;\n max-height: 90px;\n overflow: hidden;\n}\n.series-image{\n width: 160px;\n height: 90px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n\n.video-js .series-progress-bar {\n max-width: 100px;\n height: 3px;\n background-color: #7777777e;\n display: flex;\n width: 100%;\n}\n.video-js .series-progress-bar-value {\n background-color: white;\n height: 2px;\n margin: 0;\n}\n\n.series-section-expanded:hover{\n cursor: pointer;\n}\n\n\n.season-container-title {\n margin-left: 10px;\n font-size: 16px;\n text-align: left;\n font-weight: 600;\n margin-bottom: 10px;\n}\n\n.season-container {\n width: 100%;\n margin-bottom: 30px;\n}\n\n.season-holder {\n display: flex;\n width: 90%;\n height: 2.5rem;\n padding: 10px 10px;\n margin-bottom: 10px;\n margin-left: 6px;\n}\n\n.season-holder>input {\n margin: 1px 4px;\n visibility: hidden;\n}\n\n.season-holder>input[type='radio']:checked {\n background: black;\n}\n\n.season-selected {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.season-holder:hover {\n cursor: pointer;\n}\n.season {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-left: 4px;\n}\n\n@media (max-width:600px){\n .series-selection{\n display: none;\n }\n}\n";