@viewlift/player-backup 2.0.300-backup → 2.0.301-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 (207) hide show
  1. package/cjs/autoNextVideo-19386762.js +1 -0
  2. package/cjs/{autoNextVideo-5bd449e1.js → autoNextVideo-6cab8d20.js} +1 -1
  3. package/cjs/browser-77c57718.js +1 -0
  4. package/cjs/bundle.css +269 -269
  5. package/cjs/{caption-settings-544fd444.js → caption-settings-058ad013.js} +1 -1
  6. package/cjs/{captions-5f9611f1.js → captions-d98c49d6.js} +1 -1
  7. package/cjs/{features-0ed32b63.js → features-2cdc4e39.js} +1 -1
  8. package/cjs/{features-12e05d18.js → features-d42cd8c1.js} +1 -1
  9. package/cjs/features-f7498f6e.js +1 -0
  10. package/cjs/generic-5b90c727.js +1 -0
  11. package/cjs/generic-9239e4ef.js +1 -0
  12. package/cjs/index-004fc85d.js +1 -0
  13. package/cjs/{index-e8be489f.js → index-1c0aa450.js} +1 -1
  14. package/cjs/{index-0cb8083b.js → index-50e69a99.js} +1 -1
  15. package/cjs/{index-5698f530.js → index-5daec8dc.js} +1 -1
  16. package/cjs/index-63575bc4.js +1 -0
  17. package/cjs/{index-8a1caccc.js → index-81c8f4a1.js} +1 -1
  18. package/cjs/index-955b603e.js +1 -0
  19. package/cjs/index-add7cff5.js +1 -0
  20. package/cjs/index-ce95deae.js +1 -0
  21. package/cjs/index-ff74dc4f.js +1 -0
  22. package/cjs/index.js +1 -1
  23. package/cjs/{multicamv2-cff7b8b7.js → multicamv2-1af47226.js} +1 -1
  24. package/cjs/{multicamv2-0834e44d.js → multicamv2-1bdf2c52.js} +1 -1
  25. package/cjs/{multicamv2-25c95b47.js → multicamv2-56120328.js} +1 -1
  26. package/cjs/{multicamv2-e6f27f98.js → multicamv2-b1a591f5.js} +1 -1
  27. package/cjs/{nextEpisodeButton-74e8a0df.js → nextEpisodeButton-290b490f.js} +1 -1
  28. package/cjs/{nextEpisodeButton-8a0fd7c1.js → nextEpisodeButton-f6da5f9e.js} +1 -1
  29. package/cjs/{playlist-415e42ad.js → playlist-25247b47.js} +1 -1
  30. package/cjs/playlist-7b61a3c6.js +1 -0
  31. package/cjs/relatedVideosManager-88017db2.js +1 -0
  32. package/cjs/{renditions-6f165ef5.js → renditions-6554142b.js} +1 -1
  33. package/cjs/{resolution-dbd4c97b.js → resolution-4c007d14.js} +1 -1
  34. package/cjs/{resolution-19103db5.js → resolution-c33a67fb.js} +1 -1
  35. package/cjs/{series-1e91f9ac.js → series-20fe0127.js} +1 -1
  36. package/cjs/{series-5286e1c3.js → series-c6abeb2a.js} +1 -1
  37. package/cjs/{series-v2-12c69b00.js → series-v2-370da4d6.js} +1 -1
  38. package/cjs/series-v2-4d05ebf8.js +1 -0
  39. package/cjs/series-v2-5ccc7a93.js +1 -0
  40. package/cjs/{series-v2-bfaacb8c.js → series-v2-a347f3f7.js} +1 -1
  41. package/cjs/{settings-icon-f75ddcd4.js → settings-icon-0dcc3788.js} +1 -1
  42. package/cjs/{settings-icon-43534947.js → settings-icon-1efd3e23.js} +1 -1
  43. package/cjs/{skin-475c6efe.js → skin-00029c75.js} +1 -1
  44. package/cjs/{skin-54cd0769.js → skin-034c0b96.js} +1 -1
  45. package/cjs/{skin-37723483.js → skin-0a5108bb.js} +1 -1
  46. package/cjs/{skin-0ee0edad.js → skin-12b4d86a.js} +1 -1
  47. package/cjs/{skin-5cbcd61c.js → skin-15813134.js} +1 -1
  48. package/cjs/{skin-1e1a7fb4.js → skin-1f5cd68e.js} +1 -1
  49. package/cjs/{skin-94c8c63c.js → skin-35bae058.js} +1 -1
  50. package/cjs/skin-41b0c02d.js +1 -0
  51. package/cjs/{skin-3f5c6c6e.js → skin-47343a57.js} +1 -1
  52. package/cjs/{skin-227021f2.js → skin-56d77491.js} +1 -1
  53. package/cjs/skin-5d92ab3f.js +1 -0
  54. package/cjs/skin-71dbfc33.js +1 -0
  55. package/cjs/skin-7556b856.js +1 -0
  56. package/cjs/skin-83a765a8.js +1 -0
  57. package/cjs/skin-89ad761c.js +1 -0
  58. package/cjs/{skin-013d66cd.js → skin-9d79794a.js} +1 -1
  59. package/cjs/skin-a25a2457.js +1 -0
  60. package/cjs/{skin-f8d5ccde.js → skin-a904ce92.js} +1 -1
  61. package/cjs/skin-ac3c64df.js +1 -0
  62. package/cjs/skin-ba07e8dc.js +1 -0
  63. package/cjs/skin-c08b2d3f.js +1 -0
  64. package/cjs/skin-c72adb59.js +1 -0
  65. package/cjs/skin-cebece82.js +1 -0
  66. package/cjs/skin-dd9ff331.js +1 -0
  67. package/cjs/{skin-ac3f9750.js → skin-dfd8c833.js} +1 -1
  68. package/cjs/{skin-c97f0eea.js → skin-e0cf4554.js} +1 -1
  69. package/cjs/{skin-fa783fc1.js → skin-ed8bad19.js} +1 -1
  70. package/cjs/skin-f26ba21b.js +1 -0
  71. package/cjs/skin-f3a5fe3d.js +1 -0
  72. package/cjs/skin-f70eedce.js +1 -0
  73. package/cjs/skin-fa940389.js +1 -0
  74. package/cjs/{util-b4bf1579.js → util-9e6f986e.js} +1 -1
  75. package/cjs/videoSelector-24f40272.js +1 -0
  76. package/cjs/videoSelector-95e64eba.js +1 -0
  77. package/cjs/videoSelector-ab05bccb.js +1 -0
  78. package/cjs/{videoSelector-4e9061bb.js → videoSelector-d96b4516.js} +1 -1
  79. package/cjs/videoSelector-f49496de.js +1 -0
  80. package/cjs/{videoSelector-23532d3c.js → videoSelector-fac5fff5.js} +1 -1
  81. package/esm/autoNextVideo-379bbdc2.js +1 -0
  82. package/esm/autoNextVideo-be06e737.js +1 -0
  83. package/esm/browser-d4613b36.js +1 -0
  84. package/esm/bundle.css +269 -269
  85. package/esm/{caption-settings-cfb1368b.js → caption-settings-a9b6581e.js} +1 -1
  86. package/esm/{captions-2b4caf69.js → captions-9659ee8f.js} +1 -1
  87. package/esm/{features-f476e191.js → features-4a5d71b3.js} +1 -1
  88. package/esm/{features-ce3dd24e.js → features-93f642aa.js} +1 -1
  89. package/esm/features-dbc6b07e.js +1 -0
  90. package/esm/generic-5fc25fa4.js +1 -0
  91. package/esm/generic-b3643a73.js +1 -0
  92. package/esm/{index-8d6239c3.js → index-10a24e6e.js} +1 -1
  93. package/esm/{index-6665f3a3.js → index-311464f3.js} +1 -1
  94. package/esm/index-32ca07d6.js +1 -0
  95. package/esm/index-4e64ac09.js +1 -0
  96. package/esm/index-8566dca0.js +1 -0
  97. package/esm/index-ac572236.js +1 -0
  98. package/esm/index-ae4cf675.js +1 -0
  99. package/esm/{index-7f9c8eec.js → index-b62e0f74.js} +1 -1
  100. package/esm/index-c9e6b4b1.js +1 -0
  101. package/esm/index-d83589e3.js +1 -0
  102. package/esm/index.js +1 -1
  103. package/esm/{multicamv2-6604d8ad.js → multicamv2-85a146f1.js} +1 -1
  104. package/esm/{multicamv2-1279caf9.js → multicamv2-a74f52dc.js} +1 -1
  105. package/esm/{multicamv2-15bfaa1d.js → multicamv2-a84ce8b3.js} +1 -1
  106. package/esm/{multicamv2-3812939e.js → multicamv2-de90d28f.js} +1 -1
  107. package/esm/{nextEpisodeButton-3eceb957.js → nextEpisodeButton-4d4f981f.js} +1 -1
  108. package/esm/{nextEpisodeButton-406f2d70.js → nextEpisodeButton-bffd417f.js} +1 -1
  109. package/esm/playlist-100ecdfe.js +1 -0
  110. package/esm/{playlist-5b825b06.js → playlist-de8dcaf0.js} +1 -1
  111. package/esm/relatedVideosManager-33634c11.js +1 -0
  112. package/esm/{renditions-19f0b3a9.js → renditions-4eddc06a.js} +1 -1
  113. package/esm/{resolution-879fc9c0.js → resolution-46076e4a.js} +1 -1
  114. package/esm/{resolution-8cbda37b.js → resolution-5926bb20.js} +1 -1
  115. package/esm/{series-22cb40d1.js → series-8ef8fdfa.js} +1 -1
  116. package/esm/{series-991c6b60.js → series-a6e346df.js} +1 -1
  117. package/esm/series-v2-551f67e8.js +1 -0
  118. package/esm/{series-v2-64cfce61.js → series-v2-58f8f89a.js} +1 -1
  119. package/esm/series-v2-76f5001b.js +1 -0
  120. package/esm/{series-v2-59d533b4.js → series-v2-8e6a3475.js} +1 -1
  121. package/esm/{settings-icon-851014b6.js → settings-icon-60394554.js} +1 -1
  122. package/esm/{settings-icon-d7dfe9a5.js → settings-icon-c4e124b8.js} +1 -1
  123. package/esm/skin-07c5b42b.js +1 -0
  124. package/esm/skin-0b038d52.js +1 -0
  125. package/esm/{skin-a45c710d.js → skin-132a3fbe.js} +1 -1
  126. package/esm/skin-1c1aa7a5.js +1 -0
  127. package/esm/{skin-fed5e057.js → skin-30c770e0.js} +1 -1
  128. package/esm/skin-41718675.js +1 -0
  129. package/esm/{skin-b58c0902.js → skin-4280c73d.js} +1 -1
  130. package/esm/skin-4312bdbe.js +1 -0
  131. package/esm/{skin-e25c6ce2.js → skin-4f5a0ac7.js} +1 -1
  132. package/esm/skin-5aa3c707.js +1 -0
  133. package/esm/{skin-2803a6e0.js → skin-5fd8f1a1.js} +1 -1
  134. package/esm/{skin-55f1cc14.js → skin-80a68255.js} +1 -1
  135. package/esm/skin-80e062bd.js +1 -0
  136. package/esm/skin-876554ba.js +1 -0
  137. package/esm/skin-882d6b96.js +1 -0
  138. package/esm/skin-900c1bca.js +1 -0
  139. package/esm/skin-97dd73c4.js +1 -0
  140. package/esm/skin-9921582e.js +1 -0
  141. package/esm/{skin-4b9ab1d9.js → skin-a6c3353b.js} +1 -1
  142. package/esm/{skin-dcc8d218.js → skin-ab1ca6e2.js} +1 -1
  143. package/{cjs/skin-621e7720.js → esm/skin-ae76c8c8.js} +1 -1
  144. package/esm/skin-bc21a783.js +1 -0
  145. package/{cjs/skin-79fa9c1d.js → esm/skin-c081d535.js} +1 -1
  146. package/esm/skin-d8398bf5.js +1 -0
  147. package/esm/skin-dbb8c692.js +1 -0
  148. package/esm/skin-dddf388c.js +1 -0
  149. package/esm/skin-e2592aa4.js +1 -0
  150. package/esm/{skin-c79a9a01.js → skin-e4073063.js} +1 -1
  151. package/esm/skin-f9ec12e3.js +1 -0
  152. package/esm/{skin-8bcdb1ff.js → skin-fdbbacca.js} +1 -1
  153. package/esm/{skin-5dedeb72.js → skin-fdc5aef1.js} +1 -1
  154. package/esm/util-8d51abc3.js +1 -0
  155. package/esm/videoSelector-11ca5611.js +1 -0
  156. package/esm/videoSelector-13ae5477.js +1 -0
  157. package/esm/videoSelector-38875a2f.js +1 -0
  158. package/esm/{videoSelector-11dff17a.js → videoSelector-65842ebe.js} +1 -1
  159. package/esm/{videoSelector-3df8173e.js → videoSelector-6ca1f79b.js} +1 -1
  160. package/esm/videoSelector-93246044.js +1 -0
  161. package/package.json +1 -4
  162. package/cjs/autoNextVideo-fd60262d.js +0 -1
  163. package/cjs/caption-settings-5efc7591.js +0 -1
  164. package/cjs/captions-80f6eb66.js +0 -1
  165. package/cjs/generic-c66535a6.js +0 -1
  166. package/cjs/generic-ccfc8514.js +0 -1
  167. package/cjs/index-467ad153.js +0 -1
  168. package/cjs/index-b6608461.js +0 -1
  169. package/cjs/playlist-2093b46a.js +0 -1
  170. package/cjs/renditions-d28715a3.js +0 -1
  171. package/cjs/series-v2-8dabeb63.js +0 -1
  172. package/cjs/series-v2-e4df211a.js +0 -1
  173. package/cjs/skin-16ae23af.js +0 -1
  174. package/cjs/skin-354f0a37.js +0 -1
  175. package/cjs/skin-adc603f8.js +0 -1
  176. package/cjs/skin-f9bdaa28.js +0 -1
  177. package/cjs/util-54e01671.js +0 -1
  178. package/cjs/videoSelector-72f75918.js +0 -1
  179. package/cjs/videoSelector-e93dfeda.js +0 -1
  180. package/esm/autoNextVideo-5a58fda1.js +0 -1
  181. package/esm/autoNextVideo-66977b2f.js +0 -1
  182. package/esm/caption-settings-106547c2.js +0 -1
  183. package/esm/captions-89897207.js +0 -1
  184. package/esm/generic-585e9a5b.js +0 -1
  185. package/esm/generic-7f2d1f91.js +0 -1
  186. package/esm/helpers/drmErrorDetection.d.ts +0 -6
  187. package/esm/icons-699e8cf0.js +0 -1
  188. package/esm/index-0b88f09f.js +0 -1
  189. package/esm/index-68a708c9.js +0 -1
  190. package/esm/index-bb7166ff.js +0 -1
  191. package/esm/playlist-2ccec51c.js +0 -1
  192. package/esm/renditions-ee4e8582.js +0 -1
  193. package/esm/series-v2-5ef2d921.js +0 -1
  194. package/esm/series-v2-bf3a1b5a.js +0 -1
  195. package/esm/skin-0abde216.js +0 -1
  196. package/esm/skin-2bf3a2e2.js +0 -1
  197. package/esm/skin-30bb7f84.js +0 -1
  198. package/esm/skin-3d3bb91f.js +0 -1
  199. package/esm/skin-4d3a08d2.js +0 -1
  200. package/esm/skin-4f84b841.js +0 -1
  201. package/esm/skin-70f86676.js +0 -1
  202. package/esm/skin-971b1051.js +0 -1
  203. package/esm/skin-a9fb0c5e.js +0 -1
  204. package/esm/util-36d2ab03.js +0 -1
  205. package/esm/util-907fe226.js +0 -1
  206. package/esm/videoSelector-03b3ffcb.js +0 -1
  207. package/esm/videoSelector-bc53c149.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/get"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),l=require("./icons-eb807ef0.js"),d=require("./generic-c66535a6.js"),s=require("./skin-16ae23af.js"),c=require("./autoNextVideo-5bd449e1.js"),u=require("./localisation-56e0a999.js"),v=require("./relatedVideosManager-eeeaf32c.js");function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-b4bf1579.js");var p=a.getComponent("Component"),h=function(){n(y,p);var h,b,f=(h=y,b=m(),function(){var e,t=r(h);if(b){var i=r(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var i,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(o=f.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(i=r.related)||void 0===i?void 0:i.cb)||null,o.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o._unsubRelated=v.relatedVideosManager.subscribe(function(e){var t;o.videos=(null==e?void 0:e.content)||o.videos,o.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:o.cb,c.updateContent(o.videos),o._refreshList()}),o}return t(y,[{key:"_buildVideoItem",value:function(e){var t,i,n,o,r,l=this,c=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d.setVideoIdx(e+1);for(var t=a.dom.$$(".recommended"),i=0;i<t.length;i++)t[i].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),d.load(l.playerId,l.videos[e].id).then(function(e){l.cb&&l.cb(e)}).catch(function(e){l.cb&&l.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(i=t[e])||void 0===i?void 0:i.img)||(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var m=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(r=this.videos[e])||void 0===r?void 0:r.title)||"")});return a.dom.appendContent(c,u),a.dom.appendContent(c,m),c}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,o){var a=i(r(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(y,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l.EpisodesSvg())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-fcdf11eb.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),i=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=i.classList)&&void 0!==n&&n.contains("hidden")?(s.closeOpenDrawers(),i.classList.remove("hidden"),t.classList.add("open"),i.style.right="0px",s.setUpdatedElHeight(e.playerId,i)):(i.classList.add("hidden"),t.classList.remove("open"),i.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height");i.style.height="".concat(o),a.dom.appendContent(t,i),n.style.overflow="hidden",this.addFunctionality(i),s.detectOrientationChange(this.playerId,i)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,i=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),o=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),i.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),v=a.dom.createEl("div",{className:"video-container"}),m=function(e){var i,n,o,r,l,u=a.dom.createEl("div",{className:"video -".concat(e)}),m=a.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){d.setVideoIdx(e+1);for(var i=a.dom.$$(".recommended"),n=0;n<i.length;n++)i[n].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),d.load(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(i=t.videos)||void 0===i||null===(n=i[e])||void 0===n?void 0:n.img)||(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r?void 0:r.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(u,m),a.dom.appendContent(u,h),a.dom.appendContent(v,u),a.dom.appendContent(c,v)},p=0;p<this.videos.length;p++)m(p);a.dom.appendContent(n,o),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),s.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=h;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/get"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),l=require("./icons-eb807ef0.js"),d=require("./generic-9239e4ef.js"),s=require("./skin-e0cf4554.js"),c=require("./autoNextVideo-6cab8d20.js"),u=require("./localisation-56e0a999.js"),v=require("./relatedVideosManager-eeeaf32c.js");function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-9e6f986e.js");var p=a.getComponent("Component"),h=function(){n(y,p);var h,b,f=(h=y,b=m(),function(){var e,t=r(h);if(b){var i=r(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var i,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(o=f.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(i=r.related)||void 0===i?void 0:i.cb)||null,o.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o._unsubRelated=v.relatedVideosManager.subscribe(function(e){var t;o.videos=(null==e?void 0:e.content)||o.videos,o.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:o.cb,c.updateContent(o.videos),o._refreshList()}),o}return t(y,[{key:"_buildVideoItem",value:function(e){var t,i,n,o,r,l=this,c=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d.setVideoIdx(e+1);for(var t=a.dom.$$(".recommended"),i=0;i<t.length;i++)t[i].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),d.load(l.playerId,l.videos[e].id).then(function(e){l.cb&&l.cb(e)}).catch(function(e){l.cb&&l.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(i=t[e])||void 0===i?void 0:i.img)||(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var m=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(r=this.videos[e])||void 0===r?void 0:r.title)||"")});return a.dom.appendContent(c,u),a.dom.appendContent(c,m),c}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,o){var a=i(r(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(y,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l.EpisodesSvg())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-fcdf11eb.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),i=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=i.classList)&&void 0!==n&&n.contains("hidden")?(s.closeOpenDrawers(),i.classList.remove("hidden"),t.classList.add("open"),i.style.right="0px",s.setUpdatedElHeight(e.playerId,i)):(i.classList.add("hidden"),t.classList.remove("open"),i.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height");i.style.height="".concat(o),a.dom.appendContent(t,i),n.style.overflow="hidden",this.addFunctionality(i),s.detectOrientationChange(this.playerId,i)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,i=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),o=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),i.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),v=a.dom.createEl("div",{className:"video-container"}),m=function(e){var i,n,o,r,l,u=a.dom.createEl("div",{className:"video -".concat(e)}),m=a.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){d.setVideoIdx(e+1);for(var i=a.dom.$$(".recommended"),n=0;n<i.length;n++)i[n].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),d.load(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(i=t.videos)||void 0===i||null===(n=i[e])||void 0===n?void 0:n.img)||(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r?void 0:r.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(u,m),a.dom.appendContent(u,h),a.dom.appendContent(v,u),a.dom.appendContent(c,v)},p=0;p<this.videos.length;p++)m(p);a.dom.appendContent(n,o),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),s.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=h;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/get"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),l=require("./icons-eb807ef0.js"),d=require("./generic-9239e4ef.js"),s=require("./skin-e0cf4554.js"),c=require("./autoNextVideo-6cab8d20.js"),u=require("./localisation-56e0a999.js"),v=require("./relatedVideosManager-88017db2.js");function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-9e6f986e.js");var p=a.getComponent("Component"),h=function(){n(y,p);var h,b,f=(h=y,b=m(),function(){var e,t=r(h);if(b){var i=r(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var i,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(o=f.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(i=r.related)||void 0===i?void 0:i.cb)||null,o.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o._unsubRelated=v.relatedVideosManager.subscribe(function(e){var t;o.videos=(null==e?void 0:e.content)||o.videos,o.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:o.cb,c.updateContent(o.videos),o._refreshList()}),o}return t(y,[{key:"_buildVideoItem",value:function(e){var t,i,n,o,r,l=this,c=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d.setVideoIdx(e+1);for(var t=a.dom.$$(".recommended"),i=0;i<t.length;i++)t[i].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),d.load(l.playerId,l.videos[e].id).then(function(e){l.cb&&l.cb(e)}).catch(function(e){l.cb&&l.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(i=t[e])||void 0===i?void 0:i.img)||(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var m=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(r=this.videos[e])||void 0===r?void 0:r.title)||"")});return a.dom.appendContent(c,u),a.dom.appendContent(c,m),c}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,o){var a=i(r(1&o?e.prototype:e),t,n);return 2&o&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(y,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l.EpisodesSvg())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-fcdf11eb.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),i=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=i.classList)&&void 0!==n&&n.contains("hidden")?(s.closeOpenDrawers(),i.classList.remove("hidden"),t.classList.add("open"),i.style.right="0px",s.setUpdatedElHeight(e.playerId,i)):(i.classList.add("hidden"),t.classList.remove("open"),i.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height");i.style.height="".concat(o),a.dom.appendContent(t,i),n.style.overflow="hidden",this.addFunctionality(i),s.detectOrientationChange(this.playerId,i)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,i=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),o=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),i.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),v=a.dom.createEl("div",{className:"video-container"}),m=function(e){var i,n,o,r,l,u=a.dom.createEl("div",{className:"video -".concat(e)}),m=a.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){d.setVideoIdx(e+1);for(var i=a.dom.$$(".recommended"),n=0;n<i.length;n++)i[n].style.border="none";s.highlightVideo_DEFAULTV2_TEMP(e),d.load(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(i=t.videos)||void 0===i||null===(n=i[e])||void 0===n?void 0:n.img)||(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r?void 0:r.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(u,m),a.dom.appendContent(u,h),a.dom.appendContent(v,u),a.dom.appendContent(c,v)},p=0;p<this.videos.length;p++)m(p);a.dom.appendContent(n,o),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),s.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=h;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/get"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),d=require("./icons-eb807ef0.js"),s=require("./generic-c66535a6.js"),r=require("./skin-16ae23af.js"),c=require("./autoNextVideo-5bd449e1.js"),u=require("./localisation-56e0a999.js"),v=require("./relatedVideosManager-eeeaf32c.js");function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-5f9611f1.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-b4bf1579.js");var p=a.getComponent("Component"),h=function(){o(f,p);var h,y,b=(h=f,y=m(),function(){var e,t=l(h);if(y){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function f(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),(i=b.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(s.setVideoIdx(0),c.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=v.relatedVideosManager.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,c.updateContent(i.videos),i._refreshList()}),i}return t(f,[{key:"_buildVideoItem",value:function(e){var t,n,o,i,l,d,s,c,u,v=this,m=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&v.loadVideoAssetById(e)},p.onclick=function(){v.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(r.impolicy16x9(null==this||null===(t=this.videos)||void 0===t||null===(n=t[e])||void 0===n?void 0:n.img)||r.impolicy16x9(null===(o=window)||void 0===o||null===(i=o.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(c=s.title)||void 0===c?void 0:c.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(u=this.videos[e])||void 0===u?void 0:u.title)||"")});return a.dom.appendContent(m,p),a.dom.appendContent(m,y),m}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,o,i){var a=n(l(1&i?e.prototype:e),t,o);return 2&i&&"function"==typeof a?function(e){return a.apply(o,e)}:a}(f,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(d.PlaylistIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),a.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;s.setVideoIdx(e+1);for(var n=a.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),s.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(d.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),s=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),v=function(e){var n,o,i,l,d,u,v,m,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(d=l.appcmsMain)||void 0===d||null===(u=d.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,b),a.dom.appendContent(c,p),a.dom.appendContent(s,c)},m=0;m<this.videos.length;m++)v(m);a.dom.appendContent(o,l),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),f}();exports.default=h;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/get"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),d=require("./icons-eb807ef0.js"),s=require("./generic-9239e4ef.js"),r=require("./skin-e0cf4554.js"),c=require("./autoNextVideo-6cab8d20.js"),u=require("./localisation-56e0a999.js"),v=require("./relatedVideosManager-eeeaf32c.js");function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-d98c49d6.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-9e6f986e.js");var p=a.getComponent("Component"),h=function(){o(f,p);var h,y,b=(h=f,y=m(),function(){var e,t=l(h);if(y){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function f(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),(i=b.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(s.setVideoIdx(0),c.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=v.relatedVideosManager.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,c.updateContent(i.videos),i._refreshList()}),i}return t(f,[{key:"_buildVideoItem",value:function(e){var t,n,o,i,l,d,s,c,u,v=this,m=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&v.loadVideoAssetById(e)},p.onclick=function(){v.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(r.impolicy16x9(null==this||null===(t=this.videos)||void 0===t||null===(n=t[e])||void 0===n?void 0:n.img)||r.impolicy16x9(null===(o=window)||void 0===o||null===(i=o.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(c=s.title)||void 0===c?void 0:c.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(u=this.videos[e])||void 0===u?void 0:u.title)||"")});return a.dom.appendContent(m,p),a.dom.appendContent(m,y),m}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,o,i){var a=n(l(1&i?e.prototype:e),t,o);return 2&i&&"function"==typeof a?function(e){return a.apply(o,e)}:a}(f,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(d.PlaylistIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),a.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;s.setVideoIdx(e+1);for(var n=a.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),s.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(d.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),s=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),v=function(e){var n,o,i,l,d,u,v,m,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(d=l.appcmsMain)||void 0===d||null===(u=d.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,b),a.dom.appendContent(c,p),a.dom.appendContent(s,c)},m=0;m<this.videos.length;m++)v(m);a.dom.appendContent(o,l),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),f}();exports.default=h;
@@ -0,0 +1 @@
1
+ import{h as e,$ as n,M as t,_ as o,a0 as r}from"./generic-b3643a73.js";import{b as s,a as i}from"./index-8566dca0.js";import{g as u,h as a}from"./skin-e2592aa4.js";var l,d=0,c=0,v=new Set(["NOT_AIRED","VIDEO_NOT_AVAILABLE","CONTENT_NOT_AVAILABLE"]),f=function(e){return(null==e?void 0:e.response)||e},p=function(e,n){return e&&null!=n&&n.gist&&(e.response=e.response||{},e.response.video=e.response.video||{},e.response.video.gist=n.gist),e},h=function(e){var n,t,o=f(e),r=null==o||null===(n=o.response)||void 0===n?void 0:n.data;return 403===(null==o||null===(t=o.response)||void 0===t?void 0:t.status)||(!!(null!=r&&r.scheduleStartDate&&Number(r.scheduleStartDate)>Date.now())||!(null==r||!r.errorCode||!v.has(r.errorCode)))},g=function(e,n){clearTimeout(d);var t=f(n);i(e,t,null);var o=u(e);o&&!o.paused()&&o.pause()},m=function(e,n,o){var r=o[e];if(function(e){var n,t=null==e||null===(n=e.gist)||void 0===n?void 0:n.scheduleStartDate;return t&&Number(t)>Date.now()}(r))return Promise.reject(function(e){var n,t,o;return{response:{data:{errorMessage:null!=e&&null!==(n=e.gist)&&void 0!==n&&n.scheduleStartDate?"Coming soon":"Content not available",scheduleStartDate:null==e||null===(t=e.gist)||void 0===t?void 0:t.scheduleStartDate,scheduleEndDate:null==e||null===(o=e.gist)||void 0===o?void 0:o.scheduleEndDate,gist:null==e?void 0:e.gist}}}}(r));if(!u(n)){var s={status:!1,msg:"Player not initialised for next episode load",response:{playerId:n,episode:r}};return console.error("[autoNextVideo] player not found before trying next episode load",s),Promise.reject(s)}return t(n,r.id)},D=[],T=function(e){D=e||[]},N=function(t){clearTimeout(d),D=(null==t?void 0:t.content)||[],l=null==t?void 0:t.cb;var i=t.playerId;s(i,function(){var t=u(i);0!==(null==t?void 0:t.currentTime())&&((c=o())>D.length-1||(r(c+1),m(c,i,D).then(function(n){a(c,i),e(n.response),c++,E(n)}).catch(function(e){E(p(e,D[idx])),a(c,i),h(e)?g(i,e):(c++,d=setTimeout(function(){n(i)&&A(c,i,D)},5e3))})))})},A=function e(n,t,o,s){c=n,n>o.length-1||(r(c+1),m(n,t,o).then(function(e){a(c,t),c++,E(e)}).catch(function(r){E(p(r,o[n])),h(r)?g(t,r):setTimeout(function(){a(c,t),c++,e(c,t,o)},5e3)}))},E=function(e){l&&l(e)};export{N as a,A as s,T as u};
@@ -0,0 +1 @@
1
+ import{M as n,h as t,$ as i,_ as o,a0 as a}from"./generic-5fc25fa4.js";import{a as c}from"./util-8d51abc3.js";import{g as e,h as s}from"./skin-e2592aa4.js";var u,r=0,f=0,l=[],m=function(n){l=n||[]},h=function(m){clearTimeout(r),l=(null==m?void 0:m.content)||[],u=null==m?void 0:m.cb;var h=m.playerId;c(h,function(){var c=e(h);0!==(null==c?void 0:c.currentTime())&&((f=o())>l.length-1||(a(f+1),n(h,l[f].id).then(function(n){s(f,h),t(n.response),f++,p(n)}).catch(function(n){p(n),s(f,h),f++,r=setTimeout(function(){i(h)&&d(f,h,l)},5e3)})))})},d=function t(i,o,c,e){f=i,i>c.length-1||(a(f+1),n(o,c[i].id).then(function(n){s(f,o),f++,p(n)}).catch(function(n){p(n),setTimeout(function(){s(f,o),f++,t(f,o,c)},5e3)}))},p=function(n){u&&u(n)};export{h as a,d as s,m as u};
@@ -0,0 +1 @@
1
+ var e=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},n=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};export{e as d,n as i};