@viewlift/player-backup 1.0.119-backup → 1.0.120-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 (95) hide show
  1. package/cjs/{bundle.css → assets/bundle-132a4452.css} +59 -17
  2. package/cjs/autoNextVideo-29d9f469.js +1 -0
  3. package/cjs/caption-settings-b70eab43.js +1 -0
  4. package/cjs/features-6ea4b885.js +1 -0
  5. package/cjs/index-cedeb8d3.js +1 -0
  6. package/cjs/index.js +1 -1
  7. package/cjs/keyboardShortcuts-474dc551.js +1 -0
  8. package/cjs/multicam-9b597ba1.js +1 -0
  9. package/cjs/multicamv2-60597a5d.js +1 -0
  10. package/cjs/mwebPotraitTray-5edcb6d8.js +1 -0
  11. package/cjs/nextEpisodeButton-e87ebb93.js +1 -0
  12. package/cjs/playlist-b97acf8c.js +1 -0
  13. package/cjs/series-e7ff61bb.js +1 -0
  14. package/cjs/series-v2-42b4ec8d.js +1 -0
  15. package/cjs/{series-v2-70137d8c.js → series-v2-fd7485a5.js} +1 -1
  16. package/cjs/settings-icon-6412b88b.js +1 -0
  17. package/cjs/skin-09534036.js +1 -0
  18. package/cjs/skin-5f856fdd.js +1 -0
  19. package/cjs/skin-8f244f99.js +1 -0
  20. package/cjs/skin-b1a8ce10.js +1 -0
  21. package/cjs/skin-d952d567.js +1 -0
  22. package/cjs/skin-f5db00b3.js +1 -0
  23. package/cjs/videoSelector-5919534a.js +1 -0
  24. package/esm/{bundle.css → assets/bundle-132a4452.css} +59 -17
  25. package/esm/autoNextVideo-adfbcb3d.js +1 -0
  26. package/esm/caption-settings-59314d69.js +1 -0
  27. package/esm/features-0850f778.js +1 -0
  28. package/esm/index-ae2ba424.js +1 -0
  29. package/esm/index.js +1 -1
  30. package/esm/keyboardShortcuts-5789c691.js +1 -0
  31. package/esm/multicam-3effe00b.js +1 -0
  32. package/esm/multicamv2-62cfa047.js +1 -0
  33. package/esm/mwebPotraitTray-c07b69fd.js +1 -0
  34. package/esm/nextEpisodeButton-7bb49225.js +1 -0
  35. package/esm/playlist-dcd1aedb.js +1 -0
  36. package/esm/series-e88c6368.js +1 -0
  37. package/esm/series-v2-26a229fb.js +1 -0
  38. package/esm/{series-v2-0727ee8c.js → series-v2-4cdbf9b1.js} +1 -1
  39. package/esm/settings-icon-c6a27295.js +1 -0
  40. package/esm/skin-11672afa.js +1 -0
  41. package/esm/skin-18b88d9a.js +1 -0
  42. package/esm/skin-3d6c4c12.js +1 -0
  43. package/esm/skin-65dd93b2.js +1 -0
  44. package/esm/skin-66ac8234.js +1 -0
  45. package/esm/skin-8104c990.js +1 -0
  46. package/esm/videoSelector-648555c7.js +1 -0
  47. package/package.json +1 -1
  48. package/cjs/autoNextVideo-483e9153.js +0 -1
  49. package/cjs/caption-settings-b41710bf.js +0 -1
  50. package/cjs/features-658c8a46.js +0 -1
  51. package/cjs/generic-a2a5ad78.js +0 -1
  52. package/cjs/keyboardShortcuts-664f0a09.js +0 -1
  53. package/cjs/localisation-56e0a999.js +0 -1
  54. package/cjs/multicam-28ad2186.js +0 -1
  55. package/cjs/multicamv2-aa481861.js +0 -1
  56. package/cjs/mwebPotraitTray-65dfc2de.js +0 -1
  57. package/cjs/nextEpisodeButton-c4f3d621.js +0 -1
  58. package/cjs/playlist-91a68d26.js +0 -1
  59. package/cjs/renditions-e00ec925.js +0 -1
  60. package/cjs/resolution-65c490cf.js +0 -1
  61. package/cjs/series-232bf4fd.js +0 -1
  62. package/cjs/series-v2-09adb1a4.js +0 -1
  63. package/cjs/settings-icon-93d87559.js +0 -1
  64. package/cjs/skin-0c1c1fc7.js +0 -1
  65. package/cjs/skin-142a2c5d.js +0 -1
  66. package/cjs/skin-ba9b4442.js +0 -1
  67. package/cjs/skin-ce922912.js +0 -1
  68. package/cjs/skin-f027a4a1.js +0 -1
  69. package/cjs/skin-f46e9286.js +0 -1
  70. package/cjs/util-abb0e4bb.js +0 -1
  71. package/cjs/videoSelector-80449ebf.js +0 -1
  72. package/esm/autoNextVideo-72386267.js +0 -1
  73. package/esm/caption-settings-10a68378.js +0 -1
  74. package/esm/features-26a449bf.js +0 -1
  75. package/esm/generic-d42b8a76.js +0 -1
  76. package/esm/keyboardShortcuts-9bad5b1e.js +0 -1
  77. package/esm/localisation-0bf399a1.js +0 -1
  78. package/esm/multicam-a3a95813.js +0 -1
  79. package/esm/multicamv2-9e651919.js +0 -1
  80. package/esm/mwebPotraitTray-a0a61627.js +0 -1
  81. package/esm/nextEpisodeButton-ba2c9e06.js +0 -1
  82. package/esm/playlist-2531b9e6.js +0 -1
  83. package/esm/renditions-a3821a38.js +0 -1
  84. package/esm/resolution-b1c446fc.js +0 -1
  85. package/esm/series-07624a74.js +0 -1
  86. package/esm/series-v2-624e4fd2.js +0 -1
  87. package/esm/settings-icon-bcc0a21c.js +0 -1
  88. package/esm/skin-002752e0.js +0 -1
  89. package/esm/skin-0707520b.js +0 -1
  90. package/esm/skin-25101c84.js +0 -1
  91. package/esm/skin-41dbf549.js +0 -1
  92. package/esm/skin-76d61ddb.js +0 -1
  93. package/esm/skin-ff917e75.js +0 -1
  94. package/esm/util-a8fb05bb.js +0 -1
  95. package/esm/videoSelector-accf5414.js +0 -1
@@ -1,20 +1,3 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
1
  .widget-selection{
19
2
  display: flex;
20
3
  align-items: center;
@@ -135,7 +118,66 @@
135
118
  .widget-selector-content #sr-widget{
136
119
  padding: 0 18px;
137
120
  }
121
+ /* nextep */
122
+ .next-ep-preview{
123
+ position: absolute;
124
+ height: min-content;
125
+ width: 300px;
126
+ bottom: 16%;
127
+ right: 1.5%;
128
+ padding: 13px;
129
+ border-radius: 4px;
130
+ background: rgba(0, 0, 0, 0.75);
131
+ }
132
+ .next-ep-img{
133
+ width: 185px;
134
+ height: 95px;
135
+
136
+ }
137
+ .next-ep-img-container{
138
+ width: 100%;
139
+ height: 100%;
140
+ }
141
+ .next-ep-header{
142
+ text-align: left;
143
+ font-weight: bold;
144
+ font-size: 18px;
145
+ margin-bottom: 8px;
146
+ }
147
+
148
+ .next-ep-title{
149
+ font-size: 15px;
150
+ margin-left: 8px;
151
+
152
+ }
138
153
 
154
+ .next-ep-content{
155
+ display: flex;
156
+ align-items: center;
157
+ }
158
+ .next-ep-content:hover{
159
+ cursor: pointer;
160
+ }
161
+
162
+ @media (max-width:600px){
163
+ .next-ep-preview{
164
+ width: 170px;
165
+ right: 2.5%;
166
+ padding: 6px;
167
+ bottom: 56px;
168
+ }
169
+ .next-ep-header{
170
+ font-size: 12px;
171
+ }
172
+ .next-ep-img {
173
+ width: 100px;
174
+ height: 60px;
175
+ }
176
+ .next-ep-title {
177
+ font-size: 9px;
178
+ margin-left: 8px;
179
+ }
180
+ }
139
181
  /* a wrapper element that tracks the mouse vertically */
140
182
  .vjs-thumbnail-holder {
141
183
  position: absolute;
@@ -0,0 +1 @@
1
+ "use strict";var e,t=require("./index-cedeb8d3.js"),i=0,n=0,o=function(e,i,u,c){n=e,e>u.length-1||(t.setVideoIdx(n+1),t.load(i,u[e].id).then((function(e){t.highlightVideo(n),n++,d(e)})).catch((function(e){d(e),setTimeout((function(){t.highlightVideo(n),n++,o(n,i,u)}),5e3)})))},d=function(t){e&&e(t)};exports._switchToNext=o,exports.autoPlayNext=function(u){clearTimeout(i);var c=null==u?void 0:u.content;e=null==u?void 0:u.cb;var h=u.playerId;t.onVideoEnded(h,(function(){var e=t.getPlayer(h);0!==(null==e?void 0:e.currentTime())&&((n=t.getVideoIdx())>c.length-1||(t.setVideoIdx(n+1),t.load(h,c[n].id).then((function(e){t.highlightVideo(n),t.setCurrentVideo(e.response),n++,d(e)})).catch((function(e){d(e),t.highlightVideo(n),n++,i=setTimeout((function(){t.isPaused(h)&&o(n,h,c)}),5e3)}))))}))};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),i=require("video.js"),r=require("./icons-515b2da0.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator");var c=require("./index-cedeb8d3.js");function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}require("video.js/dist/video-js.min.css"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/typeof");var s=i.getComponent("Component"),d=function(){function d(t){var o,i,r,c,s,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),r=this,s=[t,p],c=a(c=d),(i=n(r,l()?Reflect.construct(c,s||[],a(r).constructor):c.apply(r,s))).playerId=p.playerId,i.seriesData=p.sres,i.currentVideoData=p.res,i.initialiseStructure(),i.loadCSS(),null===(o=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.style)||void 0===o||o.setProperty("display","none","important"),i}return o(d,s),t(d,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.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=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.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 r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.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=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,l),i.dom.appendContent(l,s),c.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.style)||void 0===n||n.setProperty("display","none","important")),c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.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 r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.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"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}])}();exports.default=d;
@@ -0,0 +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/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/inherits"),i=require("video.js"),a=require("./index-cedeb8d3.js");function s(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,t,r){return t=o(t),n(e,u()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-b70eab43.js")})).then((function(r){var n,o=r.default,l=a.getPlayer(e);i.registerComponent("captionSelector",o),null===(n=document)||void 0===n||null===(n=n.getElementById(e))||void 0===n||null===(n=n.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===n||null===(n=n[0])||void 0===n||n.remove(),l&&l.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},l.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-60597a5d.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-9b597ba1.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-5edcb6d8.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-e87ebb93.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-b97acf8c.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("./index-cedeb8d3.js")})).then((function(e){return e.resolution})).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),s=a.getRenditions(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:s},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,n,o){var s=function(n){function i(e,r){var n;t(this,i);var l=(n=d(this,i,[e,r])).el_;l.classList.add("vjs-rewind-button");var s=a.parseSvgString(o);return l.append(s),n}return l(i,n),r(i,[{key:"handleClick",value:function(){a.rewind(e,10)}}])}(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-e7ff61bb.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"),d=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},u=0;u<s.length;u++)d(u)}))},exports.addSeriesSelectorV2=function(t,r){Promise.resolve().then((function(){return require("./series-v2-42b4ec8d.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?s(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(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-6412b88b.js")})).then((function(r){var n,o=r.default,l=a.getPlayer(e);i.registerComponent("settingsSelector",o),null===(n=document)||void 0===n||null===(n=n.getElementById(e))||void 0===n||null===(n=n.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===n||null===(n=n[0])||void 0===n||n.remove(),l&&l.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},l.controlBar.children().length-3)}))},exports.addSkipButton=function(e,n,o){var s=function(n){function i(e,r){var n;t(this,i);var l=(n=d(this,i,[e,r])).el_;l.classList.add("vjs-skip-button");var s=a.parseSvgString(o);return l.append(s),n}return l(i,n),r(i,[{key:"handleClick",value:function(){a.skip(e,10)}}])}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var n=function(e){function n(e,r){var o;t(this,n);var l=(o=d(this,n,[e,r])).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=a.getLocalisation("slowMoText")||"Slow Mo",o}return l(n,e),r(n,[{key:"handleClick",value:function(){1==o.playbackRate()?(o.playbackRate(.5),this.el().style.background="darkgray"):(o.playbackRate(1),this.el().style.background="none")}}])}(i.getComponent("Button"));i.registerComponent("MyButton",n);var o=i(e);o.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-5919534a.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";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("axios"),o=require("video.js"),r=require("js-cookie"),l=require("ua-parser-js"),a=require("@babel/runtime/helpers/toConsumableArray"),d=require("@babel/runtime/helpers/typeof"),s=require("@babel/runtime/helpers/classCallCheck"),u=require("@babel/runtime/helpers/createClass"),c=require("@babel/runtime/helpers/possibleConstructorReturn"),v=require("@babel/runtime/helpers/getPrototypeOf"),m=require("@babel/runtime/helpers/inherits"),p={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function f(){var e;null===(e=window)||void 0===e||null===(e=e.dataLayer)||void 0===e||e.push(arguments)}function h(e,t){f("event",e,t)}function w(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?w(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var y={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=y.version;var I=function(e,t){var n,o;return null!==(n=window)&&void 0!==n&&null!==(n=n.customData)&&void 0!==n&&n.overrideEntitlementResponse?new Promise((function(e,t){var n;return e({data:null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n?void 0:n.overrideEntitlementResponse})})):i({url:x(),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(o=o.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":y.version},withCredentials:!0})},T=function(e,t){var n,o;return null!==(n=window)&&void 0!==n&&null!==(n=n.customData)&&void 0!==n&&n.overrideEntitlementResponse?new Promise((function(e,t){var n;return e({data:null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n?void 0:n.overrideEntitlementResponse})})):i({url:R()+p.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(o=window)||void 0===o||null===(o=o.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},E=function(){var e=t(n.mark((function e(t,o){var r,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return l={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",i({url:C(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:P(),method:"POST",headers:{Authorization:r},data:g({},t),params:g({},(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)}}(),b=function(e,t){var n,o=(null===(n=window)||void 0===n||null===(n=n.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1";if("v1"==o){var r,l=JSON.parse(atob(t.split(".")[1])),a=(null==l?void 0:l.site)||null;return i({method:"GET",url:k(e),params:{site:a},headers:{Authorization:t,"x-api-key":null===(r=window)||void 0===r||null===(r=r.watchHistory)||void 0===r?void 0:r.xApiKey},timeout:15e3})}if("v2"==o){var d;JSON.parse(atob(t.split(".")[1]));var s=window.contentType;return i({method:"GET",url:D(e,s),headers:{Authorization:t,"x-api-key":null===(d=window)||void 0===d||null===(d=d.watchHistory)||void 0===d?void 0:d.xApiKey},timeout:15e3})}},O=function(e){var t;if("v1"==((null===(t=window)||void 0===t||null===(t=t.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:_(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var n=e.videoId;return i({method:"GET",url:S(n),headers:{Authorization:e.token},timeout:15e3})},S=function(e){return R()+"".concat(null==p?void 0:p.getSeriesWatchHistoryV2,"/").concat(e)},_=function(){return R()+"".concat(null==p?void 0:p.getSeriesWatchHistoryV1)},k=function(e){return R()+"".concat(null==p?void 0:p.getVideoInfoV1,"/").concat(e)},D=function(e,t){return R()+"".concat(null==p?void 0:p.getVideoInfoV2,"/").concat(t,"/").concat(e)},C=function(){return R()+"".concat(null==p?void 0:p.saveWatchHistoryV1)},P=function(){return R()+"".concat(null==p?void 0:p.saveWatchHistoryV2)},x=function(){var e,t,n=R()+"".concat(null==p?void 0:p.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(e=e.customData)&&void 0!==e&&e.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(t=t.customData)||void 0===t?void 0:t.overrideEntitlementBaseUrl)+"/video/status":n},R=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==p?void 0:p.apiBaseUrl)},A=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},F=null;function L(){return{set:function(e){e&&(F=e)},get:function(){return F}}}var V,j,N,B,H,W,M=function(){var e=t(n.mark((function e(){var t,o,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L().get(),o=R(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/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)}}(),U=null,q=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"))||!A(t)){e.next=6;break}return U||(U=M().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&&L().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){U=null}))),e.abrupt("return",U);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(e,t,n){return i({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},G=function(e){j=e},K=function(){return j},Y=function(){return V},J=function(e){N=e},X=function(){return H},$=function(e){if(B){var t=B.get(e);J(t+1)}},Q=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});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 ee(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 te=function(){var e,t,n,i=K();return"linearchannel"==((null==i?void 0:i.contentType)||"video")?null==i||null===(e=i.linearchannel)||void 0===e||null===(e=e.channels)||void 0===e||null===(e=e.find((function(e){return(null==e?void 0:e.id)===(null==i?void 0:i.channelId)})))||void 0===e||null===(e=e.content)||void 0===e?void 0:e.id:(null==i||null===(t=i.video)||void 0===t||null===(t=t.gist)||void 0===t?void 0:t.id)||(null==i||null===(n=i.video)||void 0===n?void 0:n.id)};function ne(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ie(){var e=window.sessionStorage.getItem("uid");return e||(e=ne(),window.sessionStorage.setItem("uid",e),e)}function oe(){return re.apply(this,arguments)}function re(){return re=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,q();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)}))),re.apply(this,arguments)}window.initialise=function(e){window.sid=ne(),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=Math.floor(e.currentTime());h(i?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:ie(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n||null===(n=n.beacon)||void 0===n?void 0:n.params)),fireEvent({eventName:t===i?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),h("PLAY",ee({pfm:window.platform,uid:ie(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(t=t.customData)||void 0===t||null===(t=t.beacon)||void 0===t?void 0:t.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;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(t=t.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n;if(t.el_){var i,o=e+.1;if(+o.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(n=n.className)&&void 0!==n&&n.includes("vjs-waiting"))h("BUFFERING",ee({pfm:window.platform,uid:ie(),vid:te(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(i=window)||void 0===i||null===(i=i.customData)||void 0===i||null===(i=i.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return o}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,h("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ie(),vid:te()},null===(t=window)||void 0===t||null===(t=t.customData)||void 0===t||null===(t=t.beacon)||void 0===t?void 0:t.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;h("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ie(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(t=t.customData)||void 0===t||null===(t=t.beacon)||void 0===t?void 0:t.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),h("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ie(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n||null===(n=n.beacon)||void 0===n?void 0:n.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(le(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var le=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var o,r,l,a,d;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=ee,e.t1=ee,e.t2=ee({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(o=o.customData)||void 0===o||null===(o=o.beacon)||void 0===o?void 0:o.params),e.t3={},e.t4=ie(),e.t5=te(),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,oe();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===(r=window)||void 0===r||null===(r=r.customData)||void 0===r||null===(r=r.beacon)||void 0===r?void 0:r.params,e.t31=(0,e.t0)(e.t29,e.t30),a=[e.t31],e.next=37,q();case 37:d=e.sent,i({url:(null===(l=window)||void 0===l||null===(l=l.customData)||void 0===l||null===(l=l.beacon)||void 0===l?void 0:l.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:d},contentType:"application/x-www-form-urlencoded",dataType:"text",data:a}).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 ae=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)}}},de=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=function(){var e;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(e=e.userAgentData)||void 0===e?void 0:e.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ue=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ve(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=l(navigator.userAgent);var me=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=fe(e,"video.tags",[]),n=fe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},fe=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},he=function(){var e,t,n,i,o,l,a,d,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",u=arguments.length>1?arguments[1]:void 0,c=arguments.length>2?arguments[2]:void 0,v=(null==c?void 0:c.contentType)||"video",m=null==c||null===(e=c[v])||void 0===e?void 0:e.metadata,p=Ge(u);if(!s.includes("VIEWLIFT_"))return s;var f=window.getComputedStyle(document.getElementById(u),null),h=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),g="linearchannel"===v?null==c||null===(t=c.linearchannel)||void 0===t||null===(t=t.channels)||void 0===t||null===(t=t.find((function(e){return(null==e?void 0:e.id)===(null==c?void 0:c.channelId)})))||void 0===t||null===(t=t.content)||void 0===t?void 0:t.id:fe(c,"video.gist.id",""),y=ve(ve({},ye(m)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:h,VIEWLIFT_SIZE:me(w,h),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===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:fe(c,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:fe(c,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:fe(c,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==p||null===(i=p.options_)||void 0===i?void 0:i.autoplay)||1,VIEWLIFT_MUTE:(null==p||null===(o=p.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(c),VIEWLIFT_MEDIA_ID:g,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(fe(c,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:g,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+fe(c,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:fe(null===(l=window)||void 0===l||null===(l=l.app_data)||void 0===l||null===(l=l.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:fe(null===(a=window)||void 0===a||null===(a=a.app_data)||void 0===a||null===(a=a.site)||void 0===a?void 0:a.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*fe(c,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:fe(c,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:g,VIEWLIFT_CONTENT_TITLE:fe(c,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:fe(c,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:fe(c,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ge(),VIEWLIFT_SEASON_NUMBER:we(),VIEWLIFT_CONTENT_TAGS:pe(c)},null===(d=window)||void 0===d||null===(d=d.customData)||void 0===d?void 0:d.macros);for(var I in y){var T=new RegExp(I,"g");s=s.replace(T,y[I])}return s},we=function(){var e=Q.get();return e>=0?e+1:1},ge=function(){var e,t,n=Y(),i=K(),o=null==i||null===(e=i.video)||void 0===e?void 0:e.id,r=Q.get(),l=null==n||null===(t=n[r])||void 0===t||null===(t=t.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===o}));return l>=0?l+1:1},ye=function(e){var t,n,i={},o=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){o.set(e.name,e.value)})));var r=(null===(t=window)||void 0===t||null===(t=t.customData)||void 0===t||null===(t=t.subscription)||void 0===t?void 0:t.SVOD)||!1,l=(null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n||null===(n=n.subscription)||void 0===n?void 0:n.TVE)||!1;return r||l?(ue()?r?i=ve(ve({},i),{},{VIEWLIFT_CSID:o.get("csid.mweb.dtc")||""}):l&&(i=ve(ve({},i),{},{VIEWLIFT_CSID:o.get("csid.mweb.tve")||""})):r?i=ve(ve({},i),{},{VIEWLIFT_CSID:o.get("csid.web.dtc")||""}):l&&(i=ve(ve({},i),{},{VIEWLIFT_CSID:o.get("csid.web.tve")||""})),r?i=ve(ve({},i),{},{VIEWLIFT_SFID:o.get("sfid.dtc")||""}):l&&(i=ve(ve({},i),{},{VIEWLIFT_SFID:o.get("sfid.tve")||""})),i=ue()?ve(ve({},i),{},{VIEWLIFT_PROF:o.get("prof.mweb")||""}):ve(ve({},i),{},{VIEWLIFT_PROF:o.get("prof.web")||""})):(i=ve(ve({},i),{},{VIEWLIFT_SFID:o.get("sfid.dtc")||""}),i=ue()?ve(ve({},i),{},{VIEWLIFT_CSID:o.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:o.get("prof.mweb")||""}):ve(ve({},i),{},{VIEWLIFT_CSID:o.get("csid.web.dtc")||"",VIEWLIFT_PROF:o.get("prof.web")||""})),i},Ie=function(e,t){var n,i,o,r,l,a,d=(null==e?void 0:e.contentType)||"video",s=null==e||null===(n=e[d])||void 0===n?void 0:n.drmEnabled,u=null==e||null===(i=e[d])||void 0===i||null===(i=i.streamingInfo)||void 0===i?void 0:i.videoAssets,c=null==e||null===(o=e[d])||void 0===o||null===(o=o.streamingInfo)||void 0===o?void 0:o.audioAssets,v=(null==e||null===(r=e[d])||void 0===r||null===(r=r.streamingInfo)||void 0===r||null===(r=r.videoAssets)||void 0===r?void 0:r.hls)||!1;null==e||null===(l=e[d])||void 0===l||null===(l=l.liveDetails)||void 0===l||l.isDvrEnabled;var m=(null==e||null===(a=e[d])||void 0===a||null===(a=a.streamingInfo)||void 0===a||null===(a=a.videoAssets)||void 0===a?void 0:a.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=c&&c.hls)return Ee(c);if(s){var p=be(u,t);return p.src=he(p.src,t,e),p}if("Safari"!==se()&&m)return Te(u);if(v){var f=Ee(u);return f.src=he(f.src,t,e),f}if(null!=u&&u.mpeg){var h=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(u);return h.src=he(h.src,t,e),h}return null},Te=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},Ee=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},be=function(e,t){var n=e.fairPlay,i=e.widevine,r=e.playReady,l=se();if(Ge(t),"Safari"===l){var a=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(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,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return Oe(t),a}var d,s={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Oe(t),s.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(s.keySystemOptions=[],s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),s.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),s};var Oe=function(e){var t=Ge(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},Se=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}},_e=function(e,t){var n;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.style)||void 0===n||n.setProperty("display","flex"));for(var i=Ge(e).textTracks(),o=0;o<i.length;o++){var r=i[o];"subtitles"!==r.kind&&"captions"!==r.kind||r.id!=t||(r.mode="showing")}},ke=function(e,t){for(var n=Ge(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},De=function(e){var t,n=Ge(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})))||[]},Ce=function(e){var t=Ge(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},Pe=function(e,t){var n=Ge(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})}))},xe=!1,Re=function(e,t,n){var i=he(t,e,n),o=Ge(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i=Ge(e);if(null!==i.el_){xe=!0;var o={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),xe&&null!==i.el_&&("function"==typeof i.ima?i.ima(o):setTimeout((function(){i.ima.setContentWithAdTag(null,t,!0),i.ima.requestAds()}),1e3));var r=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&r.hasAttribute("controls")&&r.removeAttribute("controls");var l="click",a=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(a=!0,l="touchend"),i.one(l,(function(){a&&i.ima.initializeAdDisplayContainer()}));var d=(null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n||null===(n=n.ads)||void 0===n?void 0:n.adEventHandler)||null;i.one("ads-ad-started",(function(){d&&d({status:"STARTED",msg:"Advertisement Started"})})),i.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){d&&d({status:"ENDED",msg:"Advertisement Ended"})}))})),i.on("adserror",(function(e){d&&d({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ae=["live","carousel","V2","defaultV2","multiplayer","minimalist"],Fe=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Le=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ve="",je=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 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}var Be,He,We=function(e){o(e).play()},Me=function(e){o(e).pause()},Ue=function(e,t){var n=o(e),i=n.currentTime()+t;n.currentTime(i)},qe=function(e,t){var n=o(e),i=n.currentTime(),r=i<=t?0:i-t;n.currentTime(r)},ze=function(e){return!!o.getPlayer("".concat(e))},Ge=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},Ke=function(){var e=t(n.mark((function e(t,i){var o,r,l,a=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.length>2&&void 0!==a[2]&&a[2],e.next=3,q();case 3:return r=e.sent,l=Ge(t),e.abrupt("return",new Promise((function(e,n){T(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=ne(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Ie(r,t);G(r),a&&o?(Qe(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ye=function(){var e=t(n.mark((function e(t,i,o){var r,l,a,d,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q();case 2:return a=e.sent,(Y()||null)&&$(i),d=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(l=l.watchHistory)&&void 0!==l&&l.enable&&b(i,a).then((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(t=t.watchHistory)&&void 0!==t&&t.cb&&(null===(n=window)||void 0===n||null===(n=n.watchHistory)||void 0===n||n.cb(null==e?void 0:e.data)),d=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,s=(null==e||null===(o=e.data)||void 0===o?void 0:o.watchedPercentage)||null})).catch((function(e){var t,n;null!==(t=window)&&void 0!==t&&null!==(t=t.watchHistory)&&void 0!==t&&t.cb&&(null===(n=window)||void 0===n||null===(n=n.watchHistory)||void 0===n||n.cb(e))})),e.abrupt("return",new Promise((function(e,n){I(i,a).then((function(i){var o,r,l,a=null==i?void 0:i.data,u=(null==a||null===(o=a.video)||void 0===o||null===(o=o.streamingInfo)||void 0===o?void 0:o.isLiveStream)||!1;G(i.data);var c=(null==a||null===(r=a.ads)||void 0===r||null===(r=r.preRoll)||void 0===r||null===(r=r.adTags)||void 0===r||null===(r=r.web)||void 0===r?void 0:r.active)&&(null==a||null===(l=a.ads)||void 0===l||null===(l=l.preRoll)||void 0===l||null===(l=l.adTags)||void 0===l||null===(l=l.web)||void 0===l?void 0:l.url);c&&Re(t,c,a);var v=Ie(a,t);if(v){var m,p,f,h,w,g,y,I=(null==a||null===(m=a.video)||void 0===m||null===(m=m.gist)||void 0===m?void 0:m.videoImageUrl)||(null==a||null===(p=a.video)||void 0===p||null===(p=p.gist)||void 0===p||null===(p=p.imageGist)||void 0===p?void 0:p.r16x9),T=Ge(t);if(T.poster(I),Qe(t,v),T.on("loadstart",(function(){u&&e({status:!0,msg:"Video Loaded",response:a})})),T.on("loadeddata",(function(){de(),e({status:!0,msg:"Video Loaded",response:a})})),T.one("play",(function(){d&&s<95&&setTimeout((function(){T.currentTime(d)}),0)})),T.one("error",(function(){var e;n({status:!1,msg:(null==T||null===(e=T.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==a||null===(f=a.video)||void 0===f||null===(f=f.contentDetails)||void 0===f||null===(f=f.closedCaptions)||void 0===f?void 0:f.length)>0||(null==a||null===(h=a.video)||void 0===h||null===(h=h.closedCaptions)||void 0===h?void 0:h.length)>0)w=((null==a||null===(g=a.video)||void 0===g||null===(g=g.contentDetails)||void 0===g?void 0:g.closedCaptions)||(null==a||null===(y=a.video)||void 0===y?void 0:y.closedCaptions)).filter((function(e){return"VTT"===e.format})),Pe(t,w);else Ce(t)}else ae(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Ze(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Je=function(e,t,n){var i=Ge(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)}))}))},Xe=function(e){var t=Ge(e);if($e(),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()}},$e=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()},Qe=function(e,t){var n=Ge(e);n&&n.src(t)},Ze=function(t,n,i,o){var r,l,a,d,s=null==t||null===(r=t.response)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.errorCode,u=(null==t||null===(l=t.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.errorMessage)||(null==t?void 0:t.message);ze(n)&&ae(n,(null===(a=window)||void 0===a?void 0:a.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[s])||"".concat(u)),i&&i(function(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}({status:!1,response:t,msg:"".concat(u)},o&&{videoId:o}))},et=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")},tt=function(e){return new Promise((function(t,n){if(nt(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)}}))},nt=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},it=function(){var e=t(n.mark((function e(t){var i,r,l,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ge(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,tt("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(o),e.finish(13);case 16:null!==(l=window)&&void 0!==l&&l.cast?null==r||r.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=t&&t.airplay&&"Safari"==se()?null==r||r.airPlay({addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),ot=function(e,t){var n=Ge(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,i=this.el(),r=o.dom.getPointerPosition(i,t).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var l=window.cast&&window.cast.framework&&window.cast.framework.CastSession,a=null===(n=window)||void 0===n||null===(n=n.cast)||void 0===n||null===(n=n.framework)||void 0===n||null===(n=n.CastContext)||void 0===n||null===(n=n.getInstance())||void 0===n?void 0:n.S;if(console.log(l),l&&"CONNECTED"===a){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),s=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=s*r,d.seek()}}))};function rt(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 lt(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?rt(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):rt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var at=[],dt=0,st=null;function ut(t,n,i){var o,r,l,a,d,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];He=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var u=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,c=Math.floor(t.currentTime()),v=Math.floor(t.duration()),m=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(d=n.watchHistory)||void 0===d?void 0:d.saveOffline)||!1,h=Math.floor(t.currentTime()),w=s?100:Math.floor(c/v*100),g={};f?function(t,n,i){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(i),r=ct(o),l=(new Date).getTime(),a=K(),d=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(t,n){return lt(lt({},t),{},e({},n,d[n]))}),{}),u=r.findIndex((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===Be}));u<0?r.push(lt(lt({content:s},t),{},{addedDate:l,updateDate:l})):r[u]=lt(lt(lt({},r[u]),t),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(r))}(g={completed:s,watchedTime:h,watchedPercentage:w},u,n.siteOwner):("v1"==He?g={videoId:Be,watchedTime:h,watchedPercentage:w,siteOwner:n.siteOwner,userId:n.userId,xApiKey:m}:"v2"==He&&(g=lt(lt({videoId:Be,watchedTime:h,watchedPercentage:w,doneWatching:s,profileId:u},st&&{seriesId:st}),p&&{originalObjectId:p})),E(g,He).then((function(e){})).catch((function(e){}))),dt=c+i}function ct(e){var t=[];return e&&(t=JSON.parse(localStorage.getItem("".concat(e))||"[]")),t}var vt=function(e,t,n){var i=Ge(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var o=parseFloat(t)/100;i.volume(o),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},mt=function(e){var t=Ge(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},pt=!1,ft=function(e,t){var n,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(n=e[i])||void 0===n||null===(n=n.streamingInfo)||void 0===n?void 0:n.secondaryVideoAssets)||null)&&!pt){var o=ht(e,"videoAssets","secondaryVideoAssets"),r=Ie(o,t);return r&&Qe(t,r),pt=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ht(e,t,n){if(Array.isArray(e))return e.map((function(e){return ht(e,t,n)}));if(null!==e&&"object"===d(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]=ht(e[o],t,n)})),i}return e}function wt(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 gt(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?wt(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):wt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var yt=function(e,t,n,i){var o,r=i.res,l=i.sres,a=Ge(e),d=(null==r?void 0:r.contentType)||"video",s=(null==r||null===(o=r[d])||void 0===o||null===(o=o.streamingInfo)||void 0===o?void 0:o.isLiveStream)||!1;G(r),a&&(a.on("loadstart",(function(){s&&n.resolve({status:!0,msg:"Video Loaded",response:r})})),a.on("loadeddata",(function(){var i,o;(null==a||!a.muted())&&vt(e,sessionStorage.getItem("volume")||"100");var d=K();if(de(),n.resolve(gt({status:!0,msg:"Player Initialised"},l?{seriesResponse:l,response:r}:{response:r})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var s,u=gt(gt({},t),r);!function(e,t,n){var i,o,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(st=null==t||null===(o=t.series)||void 0===o?void 0:o.id),at=[],dt=0,Be=n;var l=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,a=Ge(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());at.includes(dt)||(e==dt?(at.push(e),ut(a,t,l)):e>dt&&(dt=e+l))})),a.one("ended",(function(){ut(a,t,l,!0)})))}(e,u,null==d||null===(s=d.video)||void 0===s||null===(s=s.gist)||void 0===s?void 0:s.id)}})),a.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];a.trigger("subtitlechanged",t)})),a.on("subtitlechanged",(function(e,t){var n,i,o=window.cast&&window.cast.framework&&window.cast.framework.CastSession,r=null===(n=window)||void 0===n||null===(n=n.cast)||void 0===n||null===(n=n.framework)||void 0===n||null===(n=n.CastContext)||void 0===n||null===(n=n.getInstance())||void 0===n?void 0:n.S,l=null===(i=window)||void 0===i||null===(i=i.cast)||void 0===i||null===(i=i.framework)||void 0===i||null===(i=i.CastContext)||void 0===i||null===(i=i.getInstance())||void 0===i?void 0:i.getCurrentSession();if(o&&"CONNECTED"===r){var a,d=l.getMediaSession(),s=d.media.tracks.filter((function(e){return"TEXT"==e.type}));a=t?new chrome.cast.media.EditTracksInfoRequest([s[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),d.editTracksInfo(a)}})),a.on("loadedmetadata",(function(){window.endFirstFrame(a)})),a.tech_.on("retryplaylist",(function(){s&&ft(r,e)})),a.on("error",(function(){var t,i;4===a.error().code&&s?ft(r,e):(ae(e,(null==a||null===(t=a.error())||void 0===t?void 0:t.message)||"Some error occured"),n.reject({status:!1,msg:(null==a||null===(i=a.error())||void 0===i?void 0:i.message)||"Some error occured",response:r}))})),a.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i=null===(n=K())||void 0===n||null===(n=n.video)||void 0===n||null===(n=n.gist)||void 0===n?void 0:n.id,o=X().get(i)||{t:0,p:0},r=o.t,l=o.p;r&&l<95&&setTimeout((function(){a.currentTime(r)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){a.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),a.on("volumechange",(function(){var e=100*a.volume().toFixed(2);a.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),a.on("chromecastDisconnected",(function(){if(s){a.currentSource();for(var e=a.textTracks(),t=e.length-1;t>=0;t--)a.removeRemoteTextTrack(e[t])}})))},It=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-b1a8ce10.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-09534036.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-f5db00b3.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?Promise.resolve().then((function(){return require("./skin-8f244f99.js")})).then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n?Promise.resolve().then((function(){return require("./skin-d952d567.js")})).then((function(n){n.initialiseSkin(e,t)})):"minimalist"==n&&Promise.resolve().then((function(){return require("./skin-5f856fdd.js")})).then((function(n){n.initaliseSkin(e,t)}))},Tt=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)},Et=function(e,t,n){var i=Ge(e);i?t>=0&&t<=i.duration()?(n({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),i.currentTime(t)):n({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):n("Cannot find player with id: '".concat(e,"'"))},bt=function(e,t){var n=Ge(e);if(!n)return"Cannot find player with id: '".concat(e,"'");try{return n.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(e){return"Error: ".concat(e)}},Ot=function(e,t){var n=Ge(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},St=function(e,t){var n=Ge(e);n?n.on("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},_t=function(e){var t=Ge(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")},kt=function(e){var t,n=Ge(e),i=[];if((null==n||null===(t=n.tech_)||void 0===t?void 0:t.vhs)||!1){var o,r=null==n||null===(o=n.tech_)||void 0===o||null===(o=o.vhs)||void 0===o?void 0:o.representations();(null==r?void 0:r.length)>0&&(i=null==r?void 0:r.sort((function(e,t){return(null==e?void 0:e.height)==(null==t?void 0:t.height)?(null==t?void 0:t.bandwidth)-(null==e?void 0:e.bandwidth):(null==t?void 0:t.height)-(null==e?void 0:e.height)})))}else{var l,a=null==n||null===(l=n.dash)||void 0===l||null===(l=l.mediaPlayer)||void 0===l?void 0:l.getBitrateInfoListFor("video");(null==a?void 0:a.length)>0&&(i=null==a?void 0:a.sort((function(e,t){return t.height-e.height})))}return i};function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dt=function(){return!!e})()}var Ct=o.getComponent("Component"),Pt=function(){function t(n){var i,r,l,d,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(this,t),r=this,d=[n,u],l=v(l=t),i=c(r,Dt()?Reflect.construct(l,d||[],v(r).constructor):l.apply(r,d)),e(i,"masterRenditions",[]),e(i,"addCustomFont",(function(e){var t=o.dom.createEl("div",{className:"font hideCustomFonts"}),n=o.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});o.dom.appendContent(t,n);var r=o.dom.createEl("div",{className:"font-options"});r.style.fontSize="12px",i.fontSizeOptions.map((function(e,t){var n=o.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;i.changeFontSize(t)})),o.dom.appendContent(r,n)})),o.dom.appendContent(t,r),o.dom.appendContent(e,t)})),e(i,"resetRenditions",(function(){a(document.getElementsByClassName("rendition")).map((function(e){o.dom.removeClass(e,"selected")}))})),i.playerId=null==u?void 0:u.playerId,i.skin=null==u?void 0:u.skin,i.icon=null==u?void 0:u.icon,i.masterRenditions=[],i.fontSizeOptions=[10,12,14],i.createRenditions(u.renditions),window.height=null,i}return m(t,Ct),u(t,[{key:"toggleContentOnHover",value:function(e,t){var n=o.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){o.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){o.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){o.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){o.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=o.dom.$(".renditions",this.contentEl()),n=o.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=o.dom.$(".setting-icon",this.el()),r=Fe(this.icon);if(i.append(r),"live"===this.skin){var l=document.createTextNode(" Settings");i.appendChild(l)}var a=o.dom.createEl("div",{className:"content hidden"}),d=o.dom.createEl("div",{innerHTML:"Quality",className:"title"}),s=o.dom.createEl("div",{className:"resolution"});o.dom.appendContent(s,d),this.toggleContentOnHover(n,a);var u=o.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,r,l=o.dom.createEl("div",{className:"relative"}),a=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(r=e.playlist)||void 0===r?void 0:r.attributes.BANDWIDTH))/1048576).toFixed(1),d="".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>":"");d="".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 s=o.dom.createEl("p",{innerHTML:d,className:"rendition",res:e.height,bandwidth:e.bandwidth});o.dom.appendContent(l,s),o.dom.appendContent(u,l),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,xt(t.playerId,e.target),o.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",u),"Safari"!=se()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=o.dom.createEl("div",{className:"relative"}),r=(e.bitrate/1e6).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>":"");window.enableResolutionsBitrate&&(l="".concat(e.height,"p @ ").concat(r,"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 a=o.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});o.dom.appendContent(i,a),o.dom.appendContent(u,i),a.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,xt(t.playerId,e.target),o.dom.addClass(a,"selected"))}))})),this.addAutoRendition("drm",u)),o.dom.appendContent(s,u),o.dom.appendContent(a,s),o.dom.appendContent(n,a)}},{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=e.activeCues[0];if(console.log((null==n||null===(t=n.value)||void 0===t||null===(t=t.resolution)||void 0===t?void 0:t.height)+"p"),n&&document.querySelector(".auto.selected")){var o,r,l,a;if(null!=n&&null!==(o=n.value)&&void 0!==o&&null!==(o=o.resolution)&&void 0!==o&&o.height&&i!==(null==n||null===(r=n.value)||void 0===r||null===(r=r.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==n||null===(a=n.value)||void 0===a||null===(a=a.resolution)||void 0===a?void 0:a.height,"p");i=null==n||null===(l=n.value)||void 0===l||null===(l=l.resolution)||void 0===l?void 0:l.height}}))}},{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"container"}),t=o.dom.createEl("div",{className:"setting-icon"});return o.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,r,l=null===(i=this.player_)||void 0===i||null===(i=i.tech_)||void 0===i?void 0:i.vhs.selectPlaylist().attributes.RESOLUTION.height,a=null===(r=this.player_)||void 0===r||null===(r=r.tech_)||void 0===r?void 0:r.vhs.selectPlaylist().attributes.BANDWIDTH,d=o.dom.createEl("div",{className:"relative"}),s=o.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:a,res:l});s.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),o.dom.addClass(s,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,xt(n.playerId,null,!0))})),o.dom.appendContent(d,s),o.dom.appendContent(t,d)}else{var u=o.dom.createEl("div",{className:"relative"}),c=o.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});c.addEventListener("click",(function(e){n.resetRenditions(),o.dom.addClass(c,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,xt(n.playerId,null,!0)})),o.dom.appendContent(u,c),o.dom.appendContent(t,u)}}}])}(),xt=function(e,t,n){var i,r=Ge(e),l=null==t?void 0:t.bandwidth;if((null==r||null===(i=r.tech_)||void 0===i?void 0:i.vhs)||!1){r.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===l?e.enabled(!0):e.enabled(!1)})),r.handleTechPlaying_();var a=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(a)}),100);var d=o.dom.$(".content");d&&o.dom.addClass(d,"hidden")}else{var s=null==t?void 0:t.qualityIndex;if(n){var u;null==r||null===(u=r.dash)||void 0===u||null===(u=u.mediaPlayer)||void 0===u||u.resetSettings()}else{var c,v;null==r||null===(c=r.dash)||void 0===c||null===(c=c.mediaPlayer)||void 0===c||c.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(v=r.dash)||void 0===v||null===(v=v.mediaPlayer)||void 0===v||v.setQualityFor("video",s,!0);var m=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(m)}),100);var p=o.dom.$(".content");p&&o.dom.addClass(p,"hidden")}}},Rt=Object.freeze({__proto__:null,default:Pt,playSelectedResolution:xt});var At,Ft=function(){var e=t(n.mark((function e(){return n.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)}}(),Lt=function(){var e=t(n.mark((function e(){return n.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)}}(),Vt=Object.freeze({__proto__:null,importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(o)}))},importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){tt("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(o)})).catch((function(e){console.log(e)}))}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),tt("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Ft,loadEMELibrary:Lt}),jt=function(e,t){var n=new Map;O({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),H=n})).catch((function(e){return console.log(e)}))},Nt={};function Bt(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 Ht(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Bt(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Bt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Wt=function(i,r,l,a){var d,s,u,c,v,m,p,f,h,w,g,y=r.res,I=void 0===y?null:y,T=r.sres,E=void 0===T?null:T;null===(d=window)||void 0===d||null===(d=d.cast)||void 0===d||null===(d=d.framework)||void 0===d||null===(d=d.CastContext)||void 0===d||null===(d=d.getInstance())||void 0===d||d.S;var b=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],O=(null===(s=I)||void 0===s?void 0:s.contentType)||"video",S=Le(null===(u=I)||void 0===u||null===(u=u[O])||void 0===u||null===(u=u.gist)||void 0===u?void 0:u.videoImageUrl)||Le(null===(c=I)||void 0===c||null===(c=c[O])||void 0===c||null===(c=c.gist)||void 0===c||null===(c=c.imageGist)||void 0===c?void 0:c.r16x9),_=(null===(v=I)||void 0===v||null===(v=v[O])||void 0===v||null===(v=v.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,k=(null===(m=I)||void 0===m||null===(m=m[O])||void 0===m||null===(m=m.streamingInfo)||void 0===m?void 0:m.isLiveStream)||!1,D=(null==l?void 0:l.drmLibrary)||!1,C=(null===(p=I)||void 0===p||null===(p=p.ads)||void 0===p||null===(p=p.preRoll)||void 0===p||null===(p=p.adTags)||void 0===p||null===(p=p.web)||void 0===p?void 0:p.active)&&(null===(f=I)||void 0===f||null===(f=f.ads)||void 0===f||null===(f=f.preRoll)||void 0===f||null===(f=f.adTags)||void 0===f||null===(f=f.web)||void 0===f?void 0:f.url);I=Ht(Ht({},I),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var P=e(e(e(e(e(e(e(e({controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:("default"==l.skin||"defaultV2"==l.skin||"live"==(null==l?void 0:l.skin))&&{inline:!1},fullscreenToggle:"default"==l.skin||"defaultV2"==l.skin,audioTrackButton:!1,pictureInPictureToggle:(l.skin,!1)},muteToggle:"multiplayer"==l.skin,liveui:_},"autoplay",null==l?void 0:l.autoplay),"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!C),"loop",(null==l?void 0:l.loop)||!1),"audioPosterMode",null==l?void 0:l.audioPosterMode),"html5",Ht(Ht({dash:Ht(Ht({},!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==l?void 0:l.dash),vhs:Ht(Ht({experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==l||null===(h=l.customData)||void 0===h?void 0:h.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==l?void 0:l.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==l?void 0:l.experimentalBufferBasedABR)||!1})},0==(null==l||null===(w=l.customData)||void 0===w?void 0:w.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(g=l.customData)||void 0===g?void 0:g.nativeVideoTracks)&&{nativeVideoTracks:!1})),"poster",S),"techOrder",b),"chromecast",{requestCustomDataFn:function(e){var t=Ge(i),n=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,d=(null==e?void 0:e.contentType)||"video",s={};if(e&&null!=e&&e[d]&&null!=e&&e[d].drmEnabled){s.isDrmEnabled=!0;var u=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;s.licenseUrl=u;var c=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];s.licenseToken=c}var v=(null==e||null===(i=e[d])||void 0===i||null===(i=i.gist)||void 0===i?void 0:i.contentType)||"VIDEO";s.contentType=v;var m=null==e||null===(o=e[d])||void 0===o||null===(o=o.gist)||void 0===o?void 0:o.runtime;s.duration=m;var p=null==e||null===(r=e[d])||void 0===r||null===(r=r.gist)||void 0===r?void 0:r.title;s.mediaTitle=p;var f=null==e||null===(l=e[d])||void 0===l||null===(l=l.gist)||void 0===l?void 0:l.videoImageUrl;return s.mediaImage=f,s.subTitles=n,s.DVR=(null==e||null===(a=e[d])||void 0===a||null===(a=a.liveDetails)||void 0===a?void 0:a.isDvrEnabled)||!1,console.log(s),s}(I,e,n)}});if(!o.getPlayers()[i])var x=o(i,P,function(){var e=t(n.mark((function e(){var t,r,d,s,u,c,v,m,p,f,h,w,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,it(l);case 2:if(k&&a.resolve(Ht({status:!0,msg:"Player Initialised"},E?{seriesResponse:E,response:I}:{response:I})),window.initialise(x),window.firstFrame(x),"white"!==window.controlsColor&&Tt(window.controlsColor,x),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),c=null===(t=I)||void 0===t||null===(t=t[O])||void 0===t?void 0:t.drmEnabled,v=null===(r=I)||void 0===r||null===(r=r[O])||void 0===r||null===(r=r.liveDetails)||void 0===r?void 0:r.startOverTime,!c&&!D){e.next=22;break}if("Safari"!==se()){e.next=15;break}return e.next=13,Lt();case 13:e.next=22;break;case 15:if("caliente"!=(null===(m=window)||void 0===m?void 0:m.siteName)){e.next=20;break}return e.next=18,Lt();case 18:e.next=22;break;case 20:return e.next=22,Ft();case 22:if(null==l||!l.videoSourceUrl){e.next=25;break}return e.next=25,Ft();case 25:_&&ot(i,v),!C||null!=l&&null!==(d=l.customData)&&void 0!==d&&d.disableAds||Re(i,C,I),p=Ie(I,i),null!=l&&l.nearestClusterUrl&&(p=Se(p,l.nearestClusterUrl)),p?Qe(i,p):(a.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:I}),ae(i,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(s=I)||void 0===s||null===(s=s[O])||void 0===s||null===(s=s.contentDetails)||void 0===s||null===(s=s.closedCaptions)||void 0===s?void 0:s.length)>0||(null===(u=I)||void 0===u||null===(u=u[O])||void 0===u||null===(u=u.closedCaptions)||void 0===u?void 0:u.length)>0)&&(g=(null===(h=I)||void 0===h||null===(h=h[O])||void 0===h||null===(h=h.contentDetails)||void 0===h?void 0:h.closedCaptions)||(null===(w=I)||void 0===w||null===(w=w[O])||void 0===w?void 0:w.closedCaptions),f=g.filter((function(e){return"VTT"===e.format})),Pe(i,f)),null!=l&&l.disableControls?et(i):It(i,Ht(Ht(Ht({},l),P),{},{liveVideo:k,isDvrEnabled:_,res:I,sres:E})),yt(i,Ht(Ht(Ht({},l),P),{},{liveVideo:k}),a,{res:I,sres:E});case 33:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};exports.VLPlayerCore=function(){return{loadVideoInstantly:Je,onTimeUpdate:Ot,getVideoDuration:_t,onVideoEnded:St,init:function(e){return new Promise((function(t,n){var o,r,l,a,d,s,u,c,v,m,p;if(!ze(null==e?void 0:e.playerId)){var h=(null==e?void 0:e.videoSourceUrl)||!1,w=null==e?void 0:e.asat,g=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,y=null==e?void 0:e.videoId,E=(null==e||null===(r=e.series)||void 0===r?void 0:r.enable)||!1;window.videoId=y;var O=null==e?void 0:e.token;if(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}(e)){if(L().set(null==e?void 0:e.refreshToken),!O||A(O))return void n({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}});At=JSON.parse(atob(O.split(".")[1]))}window.siteId=null===(l=At)||void 0===l?void 0:l.siteId,window.siteName=null===(a=At)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(d=At)||void 0===d||!d.anonymousId),e.siteOwner=(null===(s=At)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=At)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=At)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",O);var S=null==e?void 0:e.playerId;e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId;var _,k,D=null==e?void 0:e.airplay,C=null==e?void 0:e.apiBaseUrl,P=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,x=null==e?void 0:e.errors;x&&(window.customErrors=x),window.customData=null==e?void 0:e.customData,_=null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation,Nt=_,C&&(window.playerEntitlementUrl=C),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&(k=e.skin,Ae.includes(k))||(e.skin="defaultV2"),Promise.resolve().then((function(){return Vt})).then((function(e){e.importIMA()})),D&&"Safari"==se()&&Promise.resolve().then((function(){return Vt})).then((function(e){e.importAirplay()})),P&&tt("https://www.googletagmanager.com/gtag/js?id=".concat(P)).then((function(){return e=P,window.dataLayer=window.dataLayer||[],f("js",new Date),void f("config",e);var e})).catch((function(e){}));var F=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(S));if(F&&F.addEventListener("contextmenu",(function(e){return e.preventDefault()})),h){var j="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",N={directPlaybackUrl:h,id:j};w?I(j,O).then((function(i){Wt(S,{res:Ht(Ht({},i),N)},e,{resolve:t,reject:n})})).catch((function(e){Ze(e,S,n,j)})):Wt(S,{res:N},e,{resolve:t,reject:n})}else if(E){var B,H=sessionStorage.getItem("season-idx")||0;Q.set(parseInt(H));var W=null==e||null===(B=e.series)||void 0===B?void 0:B.id;(function(e,t){var n,o=JSON.parse(atob(t.split(".")[1])),r=(null==o?void 0:o.site)||null;return o&&o.countryCode,null!==(n=window)&&void 0!==n&&null!==(n=n.customData)&&void 0!==n&&n.seriesData?new Promise((function(e,t){var n;return e({data:null===(n=window)||void 0===n||null===(n=n.customData)||void 0===n?void 0:n.seriesData})})):i({url:R()+"/v3/content/series/".concat(e),params:{site:r},method:"GET",headers:{Authorization:t}})})(W,O).then((function(i){var o,r=i.data,l=i.data.seasons;V=l;var a=y||(null==l||null===(o=l[0])||void 0===o||null===(o=o.episodes)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.id);jt(W,O),I(a,O).then((function(i){var o;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(o=o.video)||void 0===o||null===(o=o.gist)||void 0===o?void 0:o.contentType,G(i.data),Wt(S,{res:null==i?void 0:i.data,sres:r},e,{resolve:t,reject:n})})).catch((function(e){Ze(e,S,n,y)}))})).catch((function(e){Ze(e,S,n)}))}else if(g){var M=null==e?void 0:e.epg;T(M,O).then((function(i){var o=null==i?void 0:i.data;o.contentType="linearchannel",o.channelId=null==M?void 0:M.channelId,Wt(S,{res:o},e,{resolve:t,reject:n})})).catch((function(e){Ze(e,S,n,y)}))}else I(y,O).then((function(i){var o,r;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(o=o.video)||void 0===o||null===(o=o.gist)||void 0===o?void 0:o.contentType,G(null==i?void 0:i.data);var l,a=null==i?void 0:i.data;if(null!=e&&e.watchHistory&&null!=e&&null!==(r=e.watchHistory)&&void 0!==r&&r.enable)if((null===(l=e.watchHistory)||void 0===l?void 0:l.saveOffline)||!1){var d,s,u,c=function(e,t,n){var i=ct(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===(d=e.watchHistory)||void 0===d?void 0:d.profileId)||"",y,null==e?void 0:e.siteOwner);if(c&&c.length)e.watchHistoryResumeTime=(null===(s=c[0])||void 0===s?void 0:s.watchedTime)||null,e.watchedPercentage=(null===(u=c[0])||void 0===u?void 0:u.watchedPercentage)||null;a.contentType="video",Wt(S,{res:a},e,{resolve:t,reject:n})}else b(y,O).then((function(i){var o,r,l,d;null!==(o=window)&&void 0!==o&&null!==(o=o.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(r=r.watchHistory)||void 0===r||r.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(l=i.data)||void 0===l?void 0:l.watchedTime)||null,e.watchedPercentage=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedPercentage)||null,a.contentType="video",Wt(S,{res:a},e,{resolve:t,reject:n})})).catch((function(i){var o,r;null!==(o=window)&&void 0!==o&&null!==(o=o.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(r=r.watchHistory)||void 0===r||r.cb(i)),Wt(S,{res:a},e,{resolve:t,reject:n})}));else Wt(S,{res:a},e,{resolve:t,reject:n})})).catch((function(e){Ze(e,S,n,y)}))}}))},getRenditions:kt,skip:Ue,getPlayer:Ge,play:We,pause:Me,detectBrowser:se,rewind:qe,loadVideo:Qe,seekToTimeStamp:Et,isPlayerInitialised:ze,load:Ye,authenticateLC:Ke,dispose:Xe,enableCaptions:_e,disableCaptions:ke,getCaptions:De,playSelectedResolution:xt,getSource:Ie,setVolume:vt,getVolume:mt,disableControls:et,setPlaybackSpeed:bt,getEntitlementData:z}},exports.closeOpenDrawers=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t;null==e||null===(t=e.childNodes)||void 0===t||null===(t=t[0])||void 0===t||t.click()}))},exports.createIconMarkup=function(e){return Fe(e)},exports.createIdxMapping=function(e){B=new Map,e.map((function(e,t){B.set(e.id,t)}))},exports.detectBrowser=se,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&&Ve!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Ve=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},exports.disableCaptions=ke,exports.enableCaptions=_e,exports.getCaptions=De,exports.getCurrentSeries=Y,exports.getCurrentVideo=K,exports.getLocalisation=function(e){var t;return(null===(t=Nt)||void 0===t?void 0:t[e])||""},exports.getPlayer=Ge,exports.getRenditions=kt,exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=X,exports.getVideoIdx=function(){return N},exports.handleDrawerResizing=function(e,t){var n,i=Ge(e),o=Ge(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){je(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){je(e,t)}),50)}))},exports.highlightVideo=function(e){a(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.isMobile=ue,exports.isPaused=function(e){return o(e).paused()},exports.load=Ye,exports.onVideoEnded=St,exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=Fe,exports.pause=Me,exports.play=We,exports.playSelectedResolution=xt,exports.removeCaptions=Ce,exports.resolution=Rt,exports.rewind=qe,exports.seasonIdxManager=Q,exports.setCurrentVideo=G,exports.setUpdatedElHeight=je,exports.setVideoIdx=J,exports.setVideoIdxById=$,exports.skip=Ue;
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("./index-cedeb8d3.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits"),module.exports=e.VLPlayerCore;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./index-cedeb8d3.js");exports.initialiseKeyboardEvents=function(r,t){var i,u=e.getPlayer(r),l=null==u||null===(i=u.controlBar)||void 0===i||null===(i=i.playToggle)||void 0===i?void 0:i.el_,n=document.getElementsByTagName("video")[0];n&&n.addEventListener("keydown",(function(i){switch(i.key){case" ":return i.preventDefault(),n&&n.focus(),void(l&&l.click());case"m":case"M":return i.preventDefault(),n&&n.focus(),void(u.muted()?u.muted(!1):u.muted(!0));case"f":i.preventDefault(),n&&n.focus();var o=document.querySelector(".vjs-fullscreen-control");return void(o&&o.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(),n&&n.focus(),void e.rewind(r,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return i.preventDefault(),n&&n.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/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/defineProperty"),o=require("video.js"),s=require("./loader-393b838a.js"),u=require("./index-cedeb8d3.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/typeof");var c=o.getComponent("Component"),d=function(){function d(t){var r,o,s,u,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),o=this,u=[t,c],s=l(s=d),r=i(o,a()?Reflect.construct(s,u||[],l(o).constructor):s.apply(o,u)),n(r,"multicamCssPositioning",(function(e,t){var i=document.getElementById(t);if(i){var l,n,o,s,u=window.getComputedStyle(i,null),a=u.getPropertyValue("height"),c=u.getPropertyValue("width"),d=a.slice(0,-2);if(c.slice(0,-2)-135<=135)e.style.bottom="290px",e.style.height="352px";else"live"==r.config.skin&&(null===(l=r)||void 0===l||null===(l=l.config)||void 0===l||!l.liveui)&&(null===(n=r)||void 0===n||null===(n=n.config)||void 0===n||!n.liveVideo)||null!==(o=r)&&void 0!==o&&null!==(o=o.config)&&void 0!==o&&o.liveui&&null!==(s=r)&&void 0!==s&&null!==(s=s.config)&&void 0!==s&&s.liveVideo?(e.style.bottom="".concat(d-135,"px"),e.style.height="".concat(d-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(d-105,"px"))}})),r.playerId=c.playerId,r.streams=null==c?void 0:c.streams,r.config=null==c?void 0:c.config,r.createUI(null==c?void 0:c.streams),r}return r(d,c),t(d,[{key:"createEl",value:function(){return o.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,r,n,o,s=this,u=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==u||null===(n=u.classList)||void 0===n||n.add("".concat(this.config.skin)):null==u||null===(o=u.classList)||void 0===o||o.add("default"),this.loadCSS();for(var a=0;a<e.length;a++)this.createTile(e[a],a);this.multicamCssPositioning(u,this.playerId),window.onresize=function(){s.multicamCssPositioning(u,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),r=o.dom.createEl("div",{className:"tile ".concat(t)});return 0==t&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(e.img,")"),o.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)}))}}])}();exports.default=d;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/inherits"),s=require("video.js"),o=require("./icons-515b2da0.js"),l=require("./index-cedeb8d3.js");function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}require("video.js/dist/video-js.min.css"),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"),require("@babel/runtime/helpers/typeof");var c=s.getComponent("Component"),d=function(){function d(t){var a,s,o,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),s=this,l=[t,c],o=n(o=d),(a=r(s,i()?Reflect.construct(o,l||[],n(s).constructor):o.apply(s,l))).playerId=c.playerId,a.seriesData=c.sres,a.streams=c.streams,a.currentVideoData=c.res,a.initialiseStructure(),a.loadCSS(),a}return a(d,c),t(d,[{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")}))}}])}();exports.default=d;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),n=require("@babel/runtime/helpers/inherits"),o=require("video.js"),s=require("./loader-393b838a.js"),i=require("./index-cedeb8d3.js");function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}require("video.js/dist/video-js.min.css"),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"),require("@babel/runtime/helpers/typeof");var c=o.getComponent("Component"),d=function(){function d(t){var n,o,s,i,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),o=this,i=[t,c],s=r(s=d),(n=l(o,a()?Reflect.construct(s,i||[],r(o).constructor):s.apply(o,i))).playerId=c.playerId,n.config=c.config,n.createUI(null==c?void 0:c.config.streams),n}return n(d,c),t(d,[{key:"createEl",value:function(){return o.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,r,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===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(r=this.config)&&void 0!==r&&r.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 l=this,r=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(l.playerId),l.removeSelectedTile();var r=document.getElementsByClassName("".concat(t.srcElement.className))[0];r&&(r.style.border="2px solid red"),i.load(l.playerId,e.id).then((function(e){i.play(l.playerId)}))})),r}},{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"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),r=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==l||l.classList.add("hide-controls"),null==r||r.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!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}])}();exports.default=d;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),o=require("video.js"),l=require("./icons-515b2da0.js"),s=require("./index-cedeb8d3.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("video.js/dist/video-js.min.css"),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"),require("@babel/runtime/helpers/typeof");var a=o.getComponent("Component"),u=function(){function s(n){var r,o,l,a,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),o=this,a=[n,u],l=i(l=s),(r=t(o,d()?Reflect.construct(l,a||[],i(o).constructor):l.apply(o,a))).playerId=u.playerId,r.seriesData=u.sres,r.currentVideoData=u.res,r.initialiseStructure(),r.loadCSS(),r}return r(s,a),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"}),i=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),r=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(i,r),o.dom.appendContent(i,l),o.dom.appendContent(n,t),o.dom.appendContent(n,i),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")}))}}])}(),c=function(e,n){for(var t=-1,i=0;i<e.length;i++)for(var r=0;r<e[i].episodes.length;r++)if(e[i].episodes[r].id===n){t=i;break}return t},p=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,i=n-1>=0?n-1:t-1,r=(n+1)%t,o=t>1?e.episodes[i]:null,l=t>1?e.episodes[r]:null;return i===r&&(0===i?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:i,nextEpIdx:r}},v=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,i){e.gist.id===n&&(t=i)})),t):null},m=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 i=o.dom.$(".next-eps-image"),r=s.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==r?void 0:r.firstChild;null==i||i.append(l);for(var d=o.dom.$(".next-eps-description"),a=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!=a&&a.firstChild;)null==d||d.appendChild(a.firstChild)};exports.default=u,exports.initaliseFunctionality=function(e,n){var t=c(e,n.video.gist.id),i=v(e[t],n.video.gist.id),r=p(e[t],i);m(r.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/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),a=require("video.js"),s=require("./icons-515b2da0.js"),r=require("./index-cedeb8d3.js"),d=require("./autoNextVideo-29d9f469.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("video.js/dist/video-js.min.css"),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/typeof");var u=a.getComponent("Component"),p=function(){function p(e){var n,o,a,s,r,u,m,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,p),r=this,m=[e,v],u=i(u=p),(s=l(r,c()?Reflect.construct(u,m||[],i(r).constructor):u.apply(r,m))).playerId=v.playerId,s.seriesData=v.sres,s.videos=null==v||null===(n=v.playlist)||void 0===n?void 0:n.content,s.cb=(null==v||null===(o=v.playlist)||void 0===o?void 0:o.cb)||null,s.autoNext=(null==v||null===(a=v.playlist)||void 0===a?void 0:a.autoNext)||!1,s.currentVideoData=v.res,s.initialiseStructure(),s.loadCSS(),s.autoNext&&d.autoPlayNext({playerId:s.playerId,content:s.videos,cb:s.cb}),s}return o(p,u),n(p,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return a.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=a.dom.createEl("div",{className:"selection-container hidden"});a.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"),a.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=a.dom.createEl("div",{className:"playlist-selector-head"}),o=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});o.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var d=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),c=a.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,i,o=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),d=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),u=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,d),a.dom.appendContent(s,u),a.dom.appendContent(o,s),a.dom.appendContent(c,o);var p=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=a.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(p,v),a.dom.appendContent(p,m),a.dom.appendContent(o,p),a.dom.appendContent(c,o),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,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(o.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"),o.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);a.dom.appendContent(i,o),a.dom.appendContent(i,d),a.dom.appendContent(t,i),a.dom.appendContent(t,c),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")}}))}}])}();exports.default=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"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),l=require("video.js"),d=require("./index-cedeb8d3.js"),c=require("./loader-393b838a.js"),u=require("./icons-515b2da0.js");function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}require("video.js/dist/video-js.min.css"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/typeof");var v,h=l.getComponent("Component"),f=function(){function e(t){var r,o,l,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,e),o=this,d=[t,c],l=n(l=e),r=s(o,p()?Reflect.construct(l,d||[],n(o).constructor):l.apply(o,d)),a(r,"seriesData",[]),r.seriesData=c.seriesData,v=c.playerId,g(r.el(),r.seriesData),r.loadCSS(),r}return r(e,h),t(e,[{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)}))}}])}();function m(){return(m=e(o.mark((function e(i,t,s,n){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(v),c.showLoader(v),d.load(v,t).then((function(e){d.setCurrentVideo(e.response),d.play(v)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.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 s=d.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=g,exports.handleSeasonChange=function(e,i,t,s){var n=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){}))}(s),n.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")}(n,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach((function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,s){return m.apply(this,arguments)}(i,f[i].id,t,u)})),e.episodes[i].id==h&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=f;
@@ -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/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),r=require("video.js"),l=require("./icons-515b2da0.js"),a=require("./index-cedeb8d3.js"),d=require("./autoNextVideo-29d9f469.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("video.js/dist/video-js.min.css"),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/typeof");var u=r.getComponent("Component"),v=function(){function v(n){var o,r,l,u,p,m,h,g,f,C=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,v),h=this,f=[n,C],g=i(g=v),(m=s(h,c()?Reflect.construct(g,f||[],i(h).constructor):g.apply(h,f))).playerId=C.playerId,m.seriesData=C.sres,m.videos=null==C||null===(o=C.sres)||void 0===o?void 0:o.seasons,m.currentVideoData=C.res,m.initialiseStructure(),m.loadCSS(),m.selectedSeason=0,m.cb=null==C||null===(r=C.series)||void 0===r?void 0:r.cb,m.autoPlayNext=(null==C||null===(l=C.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),m.watchMap=a.getSeriesWatchMap(),null!==(u=m)&&void 0!==u&&u.autoPlayNext&&null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable){var y,b,S=null==C||null===(y=C.sres)||void 0===y?void 0:y.seasons,N=[];S.map((function(t){N.push.apply(N,e(t.episodes))})),a.createIdxMapping(N),a.setVideoIdxById(null===(b=m.options_)||void 0===b||null===(b=b.res)||void 0===b||null===(b=b.video)||void 0===b?void 0:b.id),d.autoPlayNext({playerId:m.playerId,content:N,cb:m.cb,series:null==C?void 0:C.sres})}return m}return o(v,u),n(v,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(l.EpisodesSvg())});return r.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")?(a.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=r.dom.createEl("div",{className:"series-selection-container hidden"});r.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"),r.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=r.dom.createEl("div",{className:"series-selector-head"}),i=r.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(l.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=r.dom.$(".series-selector-content",t.el());for(r.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(r.dom.appendContent(s,o),r.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var d=a.parseSvgString(l.crossIconSvg());i.appendChild(d)}};var o=r.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),d=r.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();r.dom.appendContent(d,c),r.dom.appendContent(s,i),r.dom.appendContent(s,o),r.dom.appendContent(e,s),r.dom.appendContent(e,d),a.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;a.getPlayer(this.playerId);for(var t=a.getCurrentSeries(),n=r.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 l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var d=r.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});d.setAttribute("type","radio"),e.selectedSeason==s&&(d.checked=!0),d.onclick=function(t){a.seasonIdxManager.set(s),e.showSeasonDetails(s)},r.dom.appendContent(o,d),r.dom.appendContent(o,l),r.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;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===(n=n.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(i=i.get(null==e?void 0:e.id))||void 0===i?void 0:i.p)||0}}));for(var i=function(i){var o,l,d,c,u,v,p=r.dom.createEl("div",{className:"series-container"}),m=r.dom.createEl("div",{className:"series-section",index:i}),h=r.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),g=r.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});r.dom.appendContent(m,h),r.dom.appendContent(m,g),r.dom.appendContent(p,m),r.dom.appendContent(n,p);var f=r.dom.createEl("div",{className:"series-section-expanded hidden"}),C=(null===(l=t[i])||void 0===l?void 0:l.description)||"";(null===(d=C)||void 0===d?void 0:d.length)>170&&(C=C.substr(0,170)+"...");var y=r.dom.createEl("div",{className:"series-description",innerHTML:"".concat(C||"")}),b=r.dom.createEl("img",{className:"series-image"});b.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(u=u.customData)||void 0===u?void 0:u.fallbackImage)),b.alt="".concat(null===(v=t[i])||void 0===v?void 0:v.title),r.dom.appendContent(f,b),r.dom.appendContent(f,y),r.dom.appendContent(p,f),r.dom.appendContent(n,p),f.onclick=function(e){var n;e.stopPropagation(),a.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),a.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)}))},m.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")?(p.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"),p.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=r.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=a.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=r.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=a.parseSvgString(l.BackIcon());s.appendChild(i),r.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}])}();exports.default=v;
@@ -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";
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),r=require("video.js"),l=require("./icons-515b2da0.js"),d=require("./index-cedeb8d3.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}require("video.js/dist/video-js.min.css"),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/typeof");var c=r.getComponent("Component"),u=function(){function u(e){var n,o,r,l,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),o=this,l=[e,d],r=i(r=u),(n=a(o,s()?Reflect.construct(r,l||[],i(o).constructor):r.apply(o,l))).playerId=d.playerId,n.seriesData=d.sres,n.currentVideoData=d.res,n.initialiseStructure(),n.loadCSS(),n.resolutionBitrateMap,n}return o(u,c),n(u,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(n){var a=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(n,a||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),a=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!n||!a)&&n>a}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l.SettingsSvgV2())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./settings-icon-8d364c01.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var a;null!==(a=n.classList)&&void 0!==a&&a.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var i=window.getComputedStyle(a,null).getPropertyValue("height");n.style.height="".concat(i),r.dom.appendContent(t,n),a.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=r.dom.createEl("div",{className:"settings-selector-head"}),a=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:d.getLocalisation("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),s=r.dom.createEl("div",{className:"settings-container"}),c=this.createVideoQualityContainer();r.dom.appendContent(s,c);var u=this.createAudioQualityContainer();r.dom.appendContent(s,u),r.dom.appendContent(n,a),r.dom.appendContent(n,i),r.dom.appendContent(e,n),r.dom.appendContent(e,o),r.dom.appendContent(o,s),d.handleDrawerResizing(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=d.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=r.dom.createEl("div",{className:"audio-language-container"}),a=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:d.getLocalisation("audioLanguageText")||"Audio Language"});r.dom.appendContent(n,a);for(var i=function(e){var a,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(n,i)},o=0;o<t.length;o++)i(o);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=r.dom.createEl("div",{className:"video-quality-container"}),a=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:d.getLocalisation("videoQualityText")||"Video Quality"});r.dom.appendContent(n,a);var i=[].concat(e(d.getRenditions(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),d.playSelectedResolution(this.playerId,"raw",!0);for(var o=function(e){var a,o,s,c=document.createElement("label"),u=document.createElement("div"),p=document.createElement("div");p.className="video-quality-bitrate-label",u.className="video-quality-holder",c.className="video-quality-label-container",c.setAttribute("for","quality".concat(e));var v=document.createElement("div");v.className="video-quality - ".concat(e);var h=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),m=document.createTextNode(h),g="".concat(t.isEnhancedBitrate(i[e])?d.getLocalisation("enhancedBitrateLabel")||"Enhanced Bitrate":""),y=document.createTextNode(g);if(p.appendChild(y),v.appendChild(m),(null==i||null===(s=i[e])||void 0===s?void 0:s.height)>=720)for(var f=d.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=f&&f.firstChild;)v.appendChild(f.firstChild);var C=r.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});C.setAttribute("type","radio"),C.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?d.playSelectedResolution(t.playerId,a,!0):d.playSelectedResolution(t.playerId,a)};var b=document.createElement("span");b.className=g?"check-mark center":"check-mark";var q=d.parseSvgString(l.TickMarkIcon());b.appendChild(q),u.appendChild(C),u.appendChild(b),u.appendChild(v),r.dom.appendContent(c,u),c.appendChild(p),r.dom.appendContent(n,c)},s=0;s<i.length;s++)o(s);return n}}])}();exports.default=u;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./features-6ea4b885.js"),r=require("./keyboardShortcuts-474dc551.js"),i=require("./icons-515b2da0.js"),t=require("./index-cedeb8d3.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits"),require("video.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/typeof"),exports.initialiseSkin=function(n,s){r.initialiseKeyboardEvents(n,s),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,t){0==t.liveVideo&&0==t.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(n,s),function(r,n){var s=t.getPlayer(r),l=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",i.SettingsSvg()),l&&Promise.resolve().then((function(){return require("./nextEpisodeButton-e87ebb93.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,t.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var i;l&&(e.addSeriesModule(r,null==n||null===(i=n.sres)||void 0===i?void 0:i.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(n,s),function(e,r){var n,s,l=t.getPlayer(e),o=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],a=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(o&&(o.style.display="none"),u&&(u.style.display="none"),a&&(a.style.display="none"));null===(n=l.controlBar.getChild("FullscreenToggle"))||void 0===n||null===(n=n.el())||void 0===n||n.appendChild(t.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(s=l.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(s=s.el())||void 0===s||s.appendChild(t.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var d=l.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(t.createIconMarkup(i.NewCaptionsSvg()));var c=document.createElement("div");c.classList.add("caption-header"),d.querySelector(".vjs-menu-content").insertBefore(c,d.querySelector(".vjs-menu-item"))}(n,s)};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./index-cedeb8d3.js");require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("video.js"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("@babel/runtime/helpers/inherits");var r=function(r){var i=e.getPlayer(r),t=document.getElementById("".concat(r));t&&t.addEventListener("touchstart",(function(){i.paused()?e.play(r):e.pause(r)}))},i=function(r){var i=e.getPlayer(r);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){i(e),r(e)};