@viewlift/player-backup 2.0.271-backup → 2.0.272-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.
- package/cjs/{autoNextVideo-f6948193.js → autoNextVideo-d1bc37e9.js} +1 -1
- package/cjs/bundle.css +773 -773
- package/cjs/{features-96f82a11.js → features-ac06de4d.js} +1 -1
- package/cjs/generic-853f89bd.js +1 -0
- package/cjs/{index-f84db362.js → index-3ab7e3cb.js} +1 -1
- package/cjs/{index-9334bcfb.js → index-cbd8333d.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-a91630a3.js → multicamv2-7a5e0da3.js} +1 -1
- package/cjs/{multicamv2-567c42aa.js → multicamv2-ff275d29.js} +1 -1
- package/cjs/{nextEpisodeButton-f8dbf122.js → nextEpisodeButton-43dfe981.js} +1 -1
- package/cjs/{playlist-859e992e.js → playlist-356ff361.js} +1 -1
- package/cjs/{series-e4c15432.js → series-fdd93923.js} +1 -1
- package/cjs/{series-v2-3a4b4de8.js → series-v2-13fa8a68.js} +1 -1
- package/cjs/{series-v2-30127cc1.js → series-v2-d47e2c65.js} +1 -1
- package/cjs/skin-25eba125.js +1 -0
- package/cjs/{skin-bebf8ab8.js → skin-4b695a83.js} +1 -1
- package/cjs/{skin-663efe23.js → skin-5af20e5f.js} +1 -1
- package/cjs/{skin-d449945c.js → skin-859c65bd.js} +1 -1
- package/cjs/skin-8919623f.js +1 -0
- package/cjs/{skin-b4033ee3.js → skin-93eaf0b9.js} +1 -1
- package/cjs/{skin-d53f493c.js → skin-a56fc816.js} +1 -1
- package/cjs/{skin-45fa1017.js → skin-dd1150d3.js} +1 -1
- package/cjs/{skin-eb76b6c2.js → skin-e6c74bca.js} +1 -1
- package/cjs/{util-8494ff95.js → util-0552a53e.js} +1 -1
- package/cjs/{videoSelector-a2fb671d.js → videoSelector-ab53b5ca.js} +1 -1
- package/cjs/{videoSelector-6b5a8b9d.js → videoSelector-f0356447.js} +1 -1
- package/esm/{autoNextVideo-5edbb399.js → autoNextVideo-e8df1a63.js} +1 -1
- package/esm/bundle.css +773 -773
- package/esm/components/transmit/constants.d.ts +42 -0
- package/esm/components/transmit/index.d.ts +9 -0
- package/esm/components/transmit/session.d.ts +4 -0
- package/esm/components/transmit/transmitAd.d.ts +26 -0
- package/esm/components/transmit/transmitAdManager.d.ts +66 -0
- package/esm/components/transmit/utils.d.ts +2 -0
- package/esm/{features-c86717cb.js → features-cb3674ee.js} +1 -1
- package/esm/generic-6bd18e7c.js +1 -0
- package/esm/{index-1a2804e4.js → index-0c364075.js} +1 -1
- package/esm/{index-12f33a04.js → index-5bab022d.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-107925a8.js → multicamv2-7f7a8900.js} +1 -1
- package/esm/{multicamv2-8b3b63f8.js → multicamv2-e1099dc7.js} +1 -1
- package/esm/{nextEpisodeButton-9340ef4c.js → nextEpisodeButton-2ce1e3df.js} +1 -1
- package/esm/{playlist-aa0ab582.js → playlist-74219367.js} +1 -1
- package/esm/{series-7e9b8ad9.js → series-715a9f84.js} +1 -1
- package/esm/{series-v2-2a5e43be.js → series-v2-1cb33a14.js} +1 -1
- package/esm/{series-v2-534909ec.js → series-v2-d3355275.js} +1 -1
- package/esm/skin-0f0b158c.js +1 -0
- package/esm/{skin-22491664.js → skin-4770cb4a.js} +1 -1
- package/esm/skin-adec58f3.js +1 -0
- package/esm/skin-b4b45ad3.js +1 -0
- package/esm/{skin-d7b5d047.js → skin-d32b190c.js} +1 -1
- package/esm/skin-d6db5c40.js +1 -0
- package/esm/skin-e659efe9.js +1 -0
- package/esm/skin-ea3284a6.js +1 -0
- package/esm/{skin-b2696d32.js → skin-eb3c788b.js} +1 -1
- package/esm/{util-5b0950d3.js → util-a0ce1bd0.js} +1 -1
- package/esm/{videoSelector-1aeef366.js → videoSelector-42263fa9.js} +1 -1
- package/esm/{videoSelector-06052b84.js → videoSelector-560bf4de.js} +1 -1
- package/package.json +2 -5
- package/cjs/generic-b88d9902.js +0 -1
- package/cjs/skin-01e8b937.js +0 -1
- package/cjs/skin-5bfadcc7.js +0 -1
- package/esm/generic-7018a35f.js +0 -1
- package/esm/skin-063713b5.js +0 -1
- package/esm/skin-3563964e.js +0 -1
- package/esm/skin-35cb85a4.js +0 -1
- package/esm/skin-5d9d338d.js +0 -1
- package/esm/skin-d5be7e2e.js +0 -1
- package/esm/skin-fc386a0b.js +0 -1
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{c as e,g as n,a as t,b as o,d as i,e as l,s as r,f as a,l as u,h as s,v as d,i as c,j as v,k as p,m as f,n as m,o as g,p as y,q as h,r as b,t as w,u as k,w as O,x as I,y as S,z as j,A as D,B as E,C as T,D as P,E as x,F as C,G as A,H as R,I as N,J as L,K as M,L as _,M as V,N as B,O as U,P as H,Q as F,R as K,S as G,T as Y,U as z}from"./generic-7018a35f.js";import q from"@babel/runtime/helpers/defineProperty";import J from"@babel/runtime/helpers/asyncToGenerator";import W from"@babel/runtime/regenerator";import X from"video.js";import{o as Q,g as $,a as Z,s as ee,b as ne,p as te,c as oe}from"./util-5b0950d3.js";import{g as ie,d as le,a as re,e as ae}from"./captions-2b4caf69.js";import{g as ue}from"./renditions-19f0b3a9.js";import{playSelectedResolution as se}from"./resolution-56c85eaf.js";import{g as de,i as ce,a as ve}from"./skin-4f84b841.js";import{d as pe}from"./browser-d4613b36.js";import{g as fe,s as me}from"./localisation-0bf399a1.js";import ge from"@babel/runtime/helpers/typeof";import ye from"@babel/runtime/helpers/toConsumableArray";import he from"@babel/runtime/helpers/slicedToArray";import"axios";import"md5";import"js-cookie";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";var be=function(e){return new Promise(function(n,t){if(we(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},we=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ke=function(e,n,t){var o=de(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Oe=function(e){var n=de(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Ie=function(){var e=J(W.mark(function e(n){var t,o,i,l,r;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=de(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return l=e.sent,e.prev=5,e.next=8,be("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,l.default(X),e.finish(13);case 16:(r=X.getTech("chromecast"))&&!r.prototype.seeking&&(r.prototype.seeking=function(){}),null!==(i=window)&&void 0!==i&&i.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==pe()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),Se=function(e,n){var t=de(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,r,a=this.el(),u=X.dom.getPointerPosition(a,n).x;X.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(s),s&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*u,c.seek()}})};var je=function(){var e=J(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),be("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),De=function(){var n=J(W.mark(function n(){return W.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),Ee=function(){var e=J(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){X.getPlugin("eme")||X.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=J(W.mark(function e(){var n;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(X),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=J(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=J(W.mark(function e(){return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-1a1bf509.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Ce=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){be("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(X)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(X)})},loadAdsLibrary:je,loadEMELibrary:Ee,loadMuxPlugin:Te,loadDvrSeekbar:Pe,loadContribDash:xe,loadComscorePlugin:De});function Ae(e){return Re.apply(this,arguments)}function Re(){return(Re=J(W.mark(function e(n){var t;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,je();case 3:t&&"Safari"==pe()&&Promise.resolve().then(function(){return Ce}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ne(e){return Le.apply(this,arguments)}function Le(){return(Le=J(W.mark(function e(n){var t,o,i,l,r,a,u,s,d,c;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=de(n.playerId),e.next=3,De();case 3:c.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(u=n.comscore)||void 0===u?void 0:u.debug)||!1,persistentLabels:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Me(e,n){return _e.apply(this,arguments)}function _e(){return(_e=J(W.mark(function e(n,t){var o,i,l,r,a,u,s,d,c,v,p,f,m,g;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(r=t[c])||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.dash)||null,f=(null==n||null===(s=n.comscore)||void 0===s?void 0:s.enable)||!1,m=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([v?"Safari"==pe()?Ee():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?xe():Ee():"Safari"!=pe()&&p?xe():null,f?Ne(n):null,m?Te():null,Ie(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function Ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ve(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ve(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ue=new Set,He=null,Fe=function(e,t,i,l){var r,a,u,s,d,c,v,p={},f=(null==e?void 0:e.contentType)||"video";p["c3.cm.id"]=(null===(r=e[f])||void 0===r?void 0:r.id)||"Null",p["c3.cm.contentType"]=We(e),p[null==i||null===(a=i.Constants)||void 0===a?void 0:a.IS_LIVE]=!(null==e||!e.linearchannel),p[null==i||null===(u=i.Constants)||void 0===u?void 0:u.STREAM_URL]=t.currentSrc(),p[null==i||null===(s=i.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===n()?"NULL":n(),p["c3.cm.categoryType"]=ze(e),p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.DRMEnabled=(null===(d=e[f])||void 0===d?void 0:d.drmEnabled)||"None",p.DAIStream=null!==(c=e[f])&&void 0!==c&&null!==(v=c.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[i.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=qe(e),p["c3.cm.genreList"]=Ge(e),p["c3.cm.genre"]=Ke(e),p["c3.cm.channel"]=Ye(e,l);var m=$e(o(),e);return p=Be(Be({},p),m)},Ke=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Ge=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Ye=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(o=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===o?void 0:o.title)||"NULL"},ze=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},qe=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Je=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},We=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Xe,Qe,$e=function(e,n){var o,l,r,a,u,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return s;var d=i(),c=t();return s["c3.cm.seriesName"]=(null==n||null===(o=n.video)||void 0===o||null===(l=o.series)||void 0===l?void 0:l.title)||"Null",s["c3.cm.seasonNumber"]=(null==d?void 0:d.toString())||"Null",s["c3.cm.showTitle"]=(null==e||null===(r=e[d-1])||void 0===r||null===(a=r.episodes)||void 0===a||null===(u=a[c-1])||void 0===u?void 0:u.title)||"Null",s["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",s},Ze=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},en=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},nn=function(){var e=J(W.mark(function e(n,t){var o,i,r,a,u,s,d,c,v,p,f,m;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,r=o.paymentHandler,a=o.tveProvider,u=o.enable,s=o.appName,c=(d=t||{}).token,v=d.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(p=de(n),"function"==typeof(f=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(m=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready(function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ze(t.keySystem);f("contentInfo",{DRMEnabled:o})}else f("contentInfo",{DRMEnabled:"None"})}),n||f("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var e,n;He&&He!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),Ue.clear(),He=p.currentSrc();var o=en(p.currentType()),i=l(),u=Fe(i,p,m,v);u[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",u[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=Je(i,t),u.authToken=c||"NULL",u.streamType=o,u.D2CType=r||"NONE",u.subscriberType=a?"MVPD":"FREE"!==r?"D2C":"FREE",u["c3.cm.affiliate"]=a||"NULL",tn.setData(u),f("contentInfo",u)}),p.on("loadedmetadata",function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})}),p.on("play",function(){Ue.has(p.currentSrc())||(Ue.add(p.currentSrc()),f("playbackStarted",null))}),p.on("ended",function(){Ue.has(p.currentSrc())&&Ue.delete(p.currentSrc()),f("playbackEnded")}),p.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})}),p.on("dispose",function(){null==Ue||Ue.clear(),f("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),tn=(Xe={},{setData:function(e){Xe=Be(Be({},Xe),e)},getData:function(){return Xe}}),on=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-d7b5d047.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-063713b5.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-b2696d32.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-22491664.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-3563964e.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-d5be7e2e.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-5d9d338d.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-fc386a0b.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&import("./skin-35cb85a4.js").then(function(t){t.initialiseSkin(e,n)})};function ln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function rn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ln(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var an=[],un=0,sn=null;function dn(){Qe=null,an=[],un=0,sn=null}function cn(e,n,t){var o,i,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var c=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,v=Math.floor(e.currentTime()),p=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var f=(null==n||null===(u=n.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(e.currentTime()),y=d?100:Math.floor(v/p*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=vn(o),r=(new Date).getTime(),a=l(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return rn(rn({},e),{},q({},n,u[n]))},{}),d=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Qe});d<0?i.push(rn(rn({content:s},e),{},{addedDate:r,updateDate:r})):i[d]=rn(rn(rn({},i[d]),e),{},{updateDate:r});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:d,watchedTime:g,watchedPercentage:y},c,n.siteOwner):(h=rn(rn({videoId:Qe,watchedTime:g,watchedPercentage:y,doneWatching:d,profileId:c},sn&&{seriesId:sn}),f&&{originalObjectId:f}),r(h).then(function(e){}).catch(function(e){})),un=v+t}function vn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function pn(e,n,t){var o=vn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var fn=!1,mn=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!fn){var l=gn(e,"videoAssets","secondaryVideoAssets"),r=a(l,n);return r&&u(n,r),fn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function gn(e,n,t){if(Array.isArray(e))return e.map(function(e){return gn(e,n,t)});if(null!==e&&"object"===ge(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=gn(e[i],n,t)}),o}return e}function yn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return hn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?hn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function hn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function wn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var kn=function(e,n,t,o){var i,r,a,u,m,g=o.res,y=o.sres,h=de(e),b=(null==g?void 0:g.contentType)||"video",w=(null==g||null===(i=g[b])||void 0===i?void 0:i.drmEnabled)||!1,k=(null==g||null===(r=g[b])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,O=(null==g||null===(u=g[b])||void 0===u||null===(m=u.liveDetails)||void 0===m?void 0:m.isDvrEnabled)||!1;s(g),d.set(g),h&&(h.on("loadstart",function(){k?t.resolve({status:!0,msg:"Video Loaded",response:g}):t.resolve(wn({status:!0,msg:"Player Initialised"},y?{seriesResponse:y,response:g}:{response:g}))}),h.on("loadeddata",function(){var t,o,i,r=ie(e);if(null==r||r.map(function(n){return le(e,n.id)}),O&&"Safari"===pe())try{var a;null==h||null===(a=h.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==h||!h.muted())&&ke(e,sessionStorage.getItem("volume")||"100");var u=l();if(c(n),v(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var s,d,p=wn(wn({},n),g);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(sn=null==n||null===(i=n.series)||void 0===i?void 0:i.id),an=[],un=0,Qe=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=de(e);a&&(a.on("dispose",dn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());an.includes(un)||(e!=un||e<r?e>un&&(un=e+r):(an.push(e),cn(a,n,r)))}}),a.one("ended",function(){cn(a,n,r,!0)}))}(e,p,null==u||null===(s=u.video)||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=h&&h.mux){var f,m,y,b,w,k,I=(null===(f=l())||void 0===f?void 0:f.video)||(null==g?void 0:g.video),S=null==I?void 0:I.gist,j={env_key:null==n||null===(m=n.analytics)||void 0===m?void 0:m.muxKey,player_name:"vl-web-player",player_version:null===(y=window)||void 0===y?void 0:y.vl_player_version,video_id:null==S?void 0:S.id,video_title:null==S?void 0:S.title,video_series:null==I||null===(b=I.series)||void 0===b?void 0:b.title,video_stream_type:null!=I&&null!==(w=I.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};h.mux({debug:!1,data:j})}}),h.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];h.trigger("subtitlechanged",n)}),h.on("subtitlechanged",function(e,n){var t,o,i,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),h.tech_.on("retryplaylist",function(){k&&mn(g,e)}),h.on("error",function(){var n,o;(console.log("ERROR",h.error(),h.error().code),4===h.error().code&&k)?mn(g,e):(p(e,(null==h||null===(n=h.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==h||null===(o=h.error())||void 0===o?void 0:o.message)||"Some error occured",response:g}))}),h.one("play",function(){var e,t,o,i,r;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable){var a,u,s,d=null===(a=l())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=f(),v=(null==c?void 0:c.get(d))||{t:0,p:0},p=v.t,m=v.p;p&&m<95&&setTimeout(function(){h.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){h.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=h&&h.dvrSeekbar)try{h.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),h.on("volumechange",function(){var e=100*h.volume().toFixed(2);h.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),h.on("chromecastDisconnected",function(){if(k){h.currentSource();for(var e=h.textTracks(),n=e.length-1;n>=0;n--)h.removeRemoteTextTrack(e[n])}}),h.one("loadeddata",function(){var e,n=(null==h||null===(e=h.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ge(h.dash)){var t,o,i,l=null==h||null===(t=h.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=yn(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=yn(n);try{for(d.s();!(s=d.n()).done;){var c,v,p,f=s.value;if(("Chrome"==pe()||"Edge"==pe()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!w))&&null!=f&&null!==(p=f.label)&&void 0!==p&&p.includes("5.1"))h.audioTracks().removeTrack(f);else{if("main"==f.kind){f.enabled=!0;break}f.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function On(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function In(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?On(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):On(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Sn=function(e,n,t,o){var i,l,r,s,d,c,v,f,w,k,O,I,S,j,D,E,T,P,x,C,A,R,N,L,M,_,V,B,U,H,F,K,G,Y,z,Q,$,Z=n.res,ee=void 0===Z?null:Z,ne=n.sres,te=void 0===ne?null:ne,oe=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],ie=(null===(i=ee)||void 0===i?void 0:i.contentType)||"video",le=ce(null===(l=ee)||void 0===l||null===(r=l[ie])||void 0===r||null===(s=r.gist)||void 0===s?void 0:s.videoImageUrl)||ce(null===(d=ee)||void 0===d||null===(c=d[ie])||void 0===c||null===(v=c.gist)||void 0===v||null===(f=v.imageGist)||void 0===f?void 0:f.r16x9),ae=(null===(w=ee)||void 0===w||null===(k=w[ie])||void 0===k||null===(O=k.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,ue=(null===(I=ee)||void 0===I||null===(S=I[ie])||void 0===S||null===(j=S.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,se=(null===(D=ee)||void 0===D||null===(E=D.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(P=T.adTags)||void 0===P||null===(x=P.web)||void 0===x?void 0:x.active)&&(null===(C=ee)||void 0===C||null===(A=C.ads)||void 0===A||null===(R=A.preRoll)||void 0===R||null===(N=R.adTags)||void 0===N||null===(L=N.web)||void 0===L?void 0:L.url);ee=In(In({},ee),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ve=(null==t||null===(M=t.customData)||void 0===M?void 0:M.ads)||{},fe=(null===(_=ee)||void 0===_||null===(V=_[ie])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ve?void 0:ve.vodAdSticherProvider)||!1,me=(null==t?void 0:t.latency)||6,ge=(null==t?void 0:t.skin_settings)||{},ye=(Q={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==t.skin,liveui:ae},q(Q,"autoplay",null==t?void 0:t.autoplay),q(Q,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!se),q(Q,"loop",(null==t?void 0:t.loop)||!1),q(Q,"audioPosterMode",null==t?void 0:t.audioPosterMode),q(Q,"html5",In(In({dash:In(In(In({},!X.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(B=t.debugConfig)||void 0===B?void 0:B.enable)&&{debug:!0,logLevel:null!=t&&null!==(U=t.debugConfig)&&void 0!==U&&U.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:In({},"IE"==pe()&&{enableStallFix:!0,stallSeek:1}),abr:In(In(In(In({},(null==t?void 0:t.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==t?void 0:t.initialBandwidth)/1e3}}),(null==t?void 0:t.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==t?void 0:t.maxBitrate)/1e3}}),(null==t?void 0:t.minBitrate)&&{minBitrate:{audio:-1,video:(null==t?void 0:t.minBitrate)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0}})}}}),vhs:In(In(In({},(null==t?void 0:t.initialBandwidth)&&{bandwidth:t.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==t||!t.initialBandwidth},(null==t||null===(F=t.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(K=null==t?void 0:t.enableLowInitialPlaylist)&&void 0!==K&&K}),debug:(null==t?void 0:t.debugConfig)&&(null==t||null===(G=t.debugConfig)||void 0===G?void 0:G.enable)||!1,nativeTextTracks:"Safari"==pe()},0==(null==t||null===(Y=t.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(z=t.customData)||void 0===z?void 0:z.nativeVideoTracks)&&{nativeVideoTracks:!1})),q(Q,"poster",le),q(Q,"techOrder",oe),q(Q,"chromecast",{requestCustomDataFn:function(n){var o,i,l=de(e),r=((null==l?void 0:l.textTracksJson_)||l.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,i,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,y,h,b,w,k,O;f.isDrmEnabled=!0;var I=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==I?void 0:I.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);f.licenseUrl=S;var j=(null==I?void 0:I.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);f.licenseToken=j}var D=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=D;var E=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=E;var T=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=T;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=P,f.subTitles=t,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}(ee,n,r);return In(In({},a),{},{convivaMetaData:In({customerKey:(null==t||null===(o=t.convivaConfig)||void 0===o?void 0:o.customerKey)||null,debug:(null==t||null===(i=t.convivaConfig)||void 0===i?void 0:i.debug)||!1},tn.getData())})},modifyLoadRequestFn:function(n){var t,o,i,l,r,a=de(e),u=(null==a?void 0:a.currentSource())||{};!(null===(t=ee)||void 0===t||null===(o=t[ie])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),Q);if(!X.getPlayers()[e]){null!=t&&t.debugConfig&&null!=t&&null!==($=t.debugConfig)&&void 0!==$&&$.enable&&X.log.level("debug");var he=X(e,ye,function(){var n=J(W.mark(function n(){var i,l,r,s,d,c,v,f,w,k,O,I,S,j,D,E,T,P,x,C;return W.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(he),console.log(X.VERSION),console.log(X.getPlugins()),n.next=5,Me(t,ee);case 5:if(I=null===(i=ee)||void 0===i||null===(l=i[ie])||void 0===l||null===(r=l.liveDetails)||void 0===r?void 0:r.startOverTime,ue&&o.resolve(In({status:!0,msg:"Player Initialised"},te?{seriesResponse:te,response:ee}:{response:ee})),g(e,{analyticsCb:null==t?void 0:t.analyticsCb,analyticsEventParams:null==t?void 0:t.analyticsEventParams,userId:null==t?void 0:t.userId}),nn(e,t),/Android/i.test(navigator.userAgent)&&(X.options.vhs.overrideNative=!0),ae&&Se(e,I),!se||null!=t&&null!==(s=t.customData)&&void 0!==s&&s.disableAds||y(e,se,ee),S=a(ee,e),console.log(S),null!=t&&t.nearestClusterUrl&&(S=h(S,t.nearestClusterUrl)),!fe){n.next=19;break}return n.next=18,b(e,ee);case 18:S=n.sent;case 19:S?u(e,S):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:ee}),p(e,"Incompatible / Missing Source")),((null===(d=ee)||void 0===d||null===(c=d[ie])||void 0===c||null===(v=c.contentDetails)||void 0===v||null===(f=v.closedCaptions)||void 0===f?void 0:f.length)>0||(null===(w=ee)||void 0===w||null===(k=w[ie])||void 0===k||null===(O=k.closedCaptions)||void 0===O?void 0:O.length)>0)&&(C=(null===(D=ee)||void 0===D||null===(E=D[ie])||void 0===E||null===(T=E.contentDetails)||void 0===T?void 0:T.closedCaptions)||(null===(P=ee)||void 0===P||null===(x=P[ie])||void 0===x?void 0:x.closedCaptions),j=C.filter(function(e){return"VTT"===e.format}),re(e,j)),null!=t&&t.disableControls?m(e):on(e,In(In(In({},t),ye),{},{liveVideo:ue,isDvrEnabled:ae,res:ee,sres:te})),kn(e,In(In(In({},t),ye),{},{liveVideo:ue}),o,{res:ee,sres:te});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function jn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Dn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var En=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=Tn(e);Sn(i,{res:l},e,{resolve:t,reject:o})},Tn=function(e){var n,t,o,i,l,r,a,u,s,d,c,v,p,f=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,g=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,y=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,h=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,b=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],k=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,O=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],I=(null==e||null===(d=e.customData)||void 0===d||null===(c=d.ads)||void 0===c?void 0:c.isSSAIEnabled)||!1,S=null==e?void 0:e.token,j=w(S);null==j||j.site;var D=null==j?void 0:j.siteId,E=(null==e||null===(v=e.customData)||void 0===v||null===(p=v.comscore)||void 0===p?void 0:p.video)||null,T=Dn(Dn({id:"".concat(D,"_external")},!g&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:Dn(Dn(Dn(Dn(Dn({drmEnabled:g,streamingInfo:Dn(Dn({videoAssets:Dn(Dn({},k&&{drmProvider:k}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==f?void 0:f.isDvrEnabled)&&{isLiveStream:!0}),(null==E?void 0:E.isLiveStream)&&{isLiveStream:null==E?void 0:E.isLiveStream})},I&&{isSSAIEnabled:I}),{},{metadata:O,liveDetails:{isDvrEnabled:null==f?void 0:f.isDvrEnabled},gist:Dn(Dn(Dn({},h&&{videoImageUrl:h}),(null==E?void 0:E.videoId)&&{id:null==E?void 0:E.videoId}),(null==E?void 0:E.videoTitle)&&{title:null==E?void 0:E.videoTitle}),contentDetails:Dn({},(null==b?void 0:b.length)>0&&{closedCaptions:ye(b)})},(null==E?void 0:E.runtime)&&{runtime:null==E?void 0:E.runtime}),(null==E?void 0:E.publishDate)&&{publishDate:null==E?void 0:E.publishDate}),(null==E?void 0:E.platform)&&{platform:null==E?void 0:E.platform}),(null==E?void 0:E.series)&&{series:null==E?void 0:E.series}),ads:{preRoll:{adTags:{web:Dn(Dn({},y&&{active:!0}),y&&{url:y})}}}});return E&&(null!=E&&E.isDvrEnabled&&(T.video.liveDetails=Dn(Dn({},T.video.liveDetails),{},{isDvrEnabled:null==E?void 0:E.isDvrEnabled})),null!=E&&E.metadata&&(T.video.metadata=[].concat(ye(T.video.metadata),ye(null==E?void 0:E.metadata)))),T},Pn=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},xn=function(e){var n,t=he(e,8),o=t[0],i=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n),console.log("Time left:",n)};function Cn(e,n,t,o){if(e){var i=function(){var i=e-Date.now();if(i/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var r=Pn(i,e);null==n||n([].concat(ye(r),[o]))};i();var l=setInterval(i,1e3);return l}}var An,Rn=function(e,n,t){var o,i,l,r,a,u,s,d,c,v=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,p=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null,f=Date.now(),m=null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,g=f-(null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate);if(f-m<0?c=fe("eventNotStarted")||p||"Game starts in":(g>0||"VIDEO_NOT_EXISTS"==v)&&(c=fe("eventEnded")||p||"Game has ended"),document.getElementsByClassName("error-container")[0]){var y=document.getElementsByClassName("error-message")[0];y&&(y.textContent="".concat(c));var h=document.getElementsByClassName("error-timer-message")[0];h&&Cn(Math.abs(m),xn,t,h)}else{var b=document.getElementById(e).parentElement;if(b){var w=document.createElement("div");w.className="error-container";var k=document.createElement("div");k.className="error-message";var O=document.createElement("div");O.className="error-timer-message",k.textContent="".concat(c),w.appendChild(k),w.appendChild(O),b.append(w),Cn(Math.abs(m),xn,t,O)}}};function Nn(e,n){return Ln.apply(this,arguments)}function Ln(){return(Ln=J(W.mark(function e(n,t){var o,i,l,r,a,u,d,c,v;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,d=!(null==n||!n.anonymousId),e.next=6,S();case 6:c=e.sent,v=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),k(a,c,v).then(function(e){var t,o,i,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,s(null==e?void 0:e.data);var p,f=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!d)if((null===(p=n.watchHistory)||void 0===p?void 0:p.saveOffline)||!1){var m,g,y,h=pn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,n.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;f.contentType="video",Sn(u,{res:f},n,{resolve:l,reject:r})}else O(a,c).then(function(e){var t,o,i,l,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,f.contentType="video"}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}).finally(function(){Sn(u,{res:f},n,{resolve:l,reject:r})});else Sn(u,{res:f},n,{resolve:l,reject:r})}).catch(function(e){var t,o,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,l=(null==n||null===(o=n.event)||void 0===o?void 0:o.onCountdownComplete)||null;i&&Rn(u,e,l),I(e,u,r,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Mn(e,n){return _n.apply(this,arguments)}function _n(){return(_n=J(W.mark(function e(n,t){var o,i,l,r,a,u,s,d;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,e.next=3,S();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),j(s,a,d).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Sn(u,{res:t},n,{resolve:l,reject:r})}).catch(function(e){I(e,u,r,videoId)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vn(e,n){return Bn.apply(this,arguments)}function Bn(){return(Bn=J(W.mark(function e(n,t){var o,i,l,r,a,u,d;return W.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,S();case 3:r=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,T.set(parseInt(u)),d=null==n||null===(o=n.series)||void 0===o?void 0:o.id,D(d,r).then(function(e){var t,o,u,c=e.data,v=e.data.seasons;P(v);var p=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);E(d,r),k(p,r).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,s(e.data),Sn(a,{res:null==e?void 0:e.data,sres:c},n,{resolve:i,reject:l})}).catch(function(e){I(e,a,l,videoId)})}).catch(function(e){I(e,a,l)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Hn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Un(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Un(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Fn(){return{loadVideoInstantly:x,onTimeUpdate:Q,getVideoDuration:$,onVideoEnded:Z,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=J(W.mark(function n(t,o){var i,l,r,a,u,s,d,c,v,p,f,m,g,y,h,b,w,O,S,j,D,E,T,P,x,C;return W.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!L(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(y=(null==e?void 0:e.videoSourceUrl)||!1,h=null==e?void 0:e.asat,b=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,w=null==e?void 0:e.videoId,O=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,S=(null==e?void 0:e.streamingInfo)||!1,window.videoId=w,j=null==e?void 0:e.token,!K(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",j),G().set(null==e?void 0:e.refreshToken),j&&!Y(j)){n.next=16;break}return o({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 16:An=JSON.parse(atob(j.split(".")[1]));case 17:return window.siteName=null===(r=An)||void 0===r?void 0:r.site,window.siteId=null===(a=An)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(u=An)||void 0===u||!u.anonymousId),e.siteOwner=(null===(s=An)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=An)||void 0===d?void 0:d.userId)||null,H((null===(c=An)||void 0===c?void 0:c.userId)||(null===(v=An)||void 0===v?void 0:v.anonymousId)||null),window.watchHistory=e.watchHistory||null,D=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,E=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,me(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),F.set(e.apiBaseUrl),null!=e&&e.skin&&!ve(e.skin)||(e.skin="VL_ONE"),n.next=35,Ae(e);case 35:E&&be("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then(function(){return z(E)}).catch(function(e){}),(P=null===(g=document)||void 0===g?void 0:g.getElementById("".concat(D)))&&P.addEventListener("contextmenu",function(e){return e.preventDefault()}),y?(C={directPlaybackUrl:y,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},h?k(x,j).then(function(n){var i=(null==n?void 0:n.data)||{};Sn(D,{res:Hn(Hn({},i),C)},e,{resolve:t,reject:o})}).catch(function(e){I(e,D,o,x)}):Sn(D,{res:C},e,{resolve:t,reject:o})):S?En(e,{resolve:t,reject:o}):O?Vn(e,{resolve:t,reject:o}):b?Mn(e,{resolve:t,reject:o}):Nn(e,{resolve:t,reject:o});case 39:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ue,skip:C,getPlayer:de,play:A,pause:R,detectBrowser:pe,rewind:N,loadVideo:u,seekToTimeStamp:ee,isPlayerInitialised:L,load:M,authenticateLC:_,dispose:V,enableCaptions:ae,disableCaptions:le,getCaptions:ie,playSelectedResolution:se,getSource:a,setVolume:ke,getVolume:Oe,disableControls:m,setPlaybackSpeed:ne,getEntitlementData:B,getSsaiEvents:U,playerEvents:te,onReplay:oe}}export{Fn as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{t as e,r as n,c as t,g as o,a as i,b as l,d as r,e as a,s as u,f as s,l as d,h as c,v,i as p,j as f,k as m,m as g,n as h,o as y,p as b,q as w,u as k,w as O,x as j,y as S,z as I,A as D,B as T,C as E,D as P,E as x,F as C,G as A,H as R,I as N,J as L,K as M,L as _,M as V,N as U,O as B,P as H,Q as F,R as G,S as K,T as z,U as Y,V as q,W}from"./generic-6bd18e7c.js";import J from"@babel/runtime/helpers/defineProperty";import X from"@babel/runtime/helpers/asyncToGenerator";import Q from"@babel/runtime/regenerator";import $ from"video.js";import{o as Z,g as ee,a as ne,s as te,b as oe,p as ie,c as le}from"./util-a0ce1bd0.js";import{g as re,d as ae,a as ue,e as se}from"./captions-2b4caf69.js";import{g as de}from"./renditions-19f0b3a9.js";import{playSelectedResolution as ce}from"./resolution-56c85eaf.js";import{g as ve,i as pe,a as fe}from"./skin-4f84b841.js";import{d as me}from"./browser-d4613b36.js";import{g as ge,s as he}from"./localisation-0bf399a1.js";import ye from"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@viewlift/comscore/index.js";import be from"@babel/runtime/helpers/toConsumableArray";import we from"@babel/runtime/helpers/slicedToArray";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";var ke=function(e){return new Promise(function(n,t){if(Oe(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},Oe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};function je(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?je(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ie={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function De(e){if(null==e||!e.src)return null;var n=(e.type||"").toLowerCase(),t=String(e.src).toLowerCase();return"application/dash+xml"===n||t.includes(".mpd")?"dash":"application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n||t.includes(".m3u8")?"hls":null}function Te(e,n,t){return Ee.apply(this,arguments)}function Ee(){return(Ee=X(Q.mark(function t(o,i,l){var r,a,u,s,d,c,v,p,f,m,g;return Q.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=De(o)){t.next=3;break}return t.abrupt("return",o);case 3:return a=n(o.src,l,i),u=a.replace(r,Ie[r]),console.log("[Transmit] session init →",u),t.prev=6,t.next=9,fetch(u,{method:"GET",redirect:"follow"});case 9:return s=t.sent,t.next=12,s.json();case 12:if(d=t.sent,console.log("[Transmit] session response",d),c="dash"===r?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,v=null==d?void 0:d.trackingUrl,c&&v){t.next=18;break}return t.abrupt("return",o);case 18:return p=new URL(u),f=p.hostname,m="https://".concat(f).concat(c),g="https://".concat(f).concat(v),e.set(g),console.log("[Transmit] session ready",{manifestUrl:m,trackingUrl:g}),t.abrupt("return",Se(Se({},o),{},{src:m}));case 26:return t.prev=26,t.t0=t.catch(6),console.warn("[Transmit] session init failed",t.t0),t.abrupt("return",o);case 30:case"end":return t.stop()}},t,null,[[6,26]])}))).apply(this,arguments)}var Pe=function(e,n,t){var o=ve(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},xe=function(e){var n=ve(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Ce=function(){var e=X(Q.mark(function e(n){var t,o,i,l,r;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=ve(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return l=e.sent,e.prev=5,e.next=8,ke("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,l.default($),e.finish(13);case 16:(r=$.getTech("chromecast"))&&!r.prototype.seeking&&(r.prototype.seeking=function(){}),null!==(i=window)&&void 0!==i&&i.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==me()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),Ae=function(e,n){var t=ve(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,r,a=this.el(),u=$.dom.getPointerPosition(a,n).x;$.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(s),s&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*u,c.seek()}})};var Re=function(){var e=X(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ke("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ne=function(){var e=X(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then(function(e){t.set(e)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Le=function(){var e=X(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){$.getPlugin("eme")||$.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=X(Q.mark(function e(){var n;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register($),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),_e=function(){var e=X(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Ve=function(){var e=X(Q.mark(function e(){return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-1a1bf509.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Ue=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){ke("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default($)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default($)})},loadAdsLibrary:Re,loadEMELibrary:Le,loadMuxPlugin:Me,loadDvrSeekbar:_e,loadContribDash:Ve,loadComscorePlugin:Ne});function Be(e){return He.apply(this,arguments)}function He(){return(He=X(Q.mark(function e(n){var t;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,Re();case 3:t&&"Safari"==me()&&Promise.resolve().then(function(){return Ue}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Fe(e){return Ge.apply(this,arguments)}function Ge(){return(Ge=X(Q.mark(function e(n){var t,o,i,l,r,a,u,s,d,c;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=ve(n.playerId),e.next=3,Ne();case 3:c.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(u=n.comscore)||void 0===u?void 0:u.debug)||!1,persistentLabels:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ke(e,n){return ze.apply(this,arguments)}function ze(){return(ze=X(Q.mark(function e(n,t){var o,i,l,r,a,u,s,d,c,v,p,f,m,g;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=(null==t?void 0:t.contentType)||"video",v=null==t||null===(o=t[c])||void 0===o?void 0:o.drmEnabled,null==t||null===(i=t[c])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(r=t[c])||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.dash)||null,f=(null==n||null===(s=n.comscore)||void 0===s?void 0:s.enable)||!1,m=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([v?"Safari"==me()?Le():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?Ve():Le():"Safari"!=me()&&p?Ve():null,f?Fe(n):null,m?Me():null,Ce(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function Ye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ye(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ye(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var We=new Set,Je=null,Xe=function(e,n,t,i){var r,a,u,s,d,c,v,p={},f=(null==e?void 0:e.contentType)||"video";p["c3.cm.id"]=(null===(r=e[f])||void 0===r?void 0:r.id)||"Null",p["c3.cm.contentType"]=on(e),p[null==t||null===(a=t.Constants)||void 0===a?void 0:a.IS_LIVE]=!(null==e||!e.linearchannel),p[null==t||null===(u=t.Constants)||void 0===u?void 0:u.STREAM_URL]=n.currentSrc(),p[null==t||null===(s=t.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===o()?"NULL":o(),p["c3.cm.categoryType"]=en(e),p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.DRMEnabled=(null===(d=e[f])||void 0===d?void 0:d.drmEnabled)||"None",p.DAIStream=null!==(c=e[f])&&void 0!==c&&null!==(v=c.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[t.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=nn(e),p["c3.cm.genreList"]=$e(e),p["c3.cm.genre"]=Qe(e),p["c3.cm.channel"]=Ze(e,i);var m=an(l(),e);return p=qe(qe({},p),m)},Qe=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},$e=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Ze=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(o=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===o?void 0:o.title)||"NULL"},en=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},nn=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},tn=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},on=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ln,rn,an=function(e,n){var t,o,l,a,u,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return s;var d=r(),c=i();return s["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",s["c3.cm.seasonNumber"]=(null==d?void 0:d.toString())||"Null",s["c3.cm.showTitle"]=(null==e||null===(l=e[d-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(u=a[c-1])||void 0===u?void 0:u.title)||"Null",s["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",s},un=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},sn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},dn=function(){var e=X(Q.mark(function e(n,t){var o,i,l,r,u,s,d,c,v,p,f,m;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,r=o.tveProvider,u=o.enable,s=o.appName,c=(d=t||{}).token,v=d.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(p=ve(n),"function"==typeof(f=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(m=e.sent){e.next=13;break}return e.abrupt("return");case 13:p.ready(function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=un(t.keySystem);f("contentInfo",{DRMEnabled:o})}else f("contentInfo",{DRMEnabled:"None"})}),n||f("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var e,n;Je&&Je!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),We.clear(),Je=p.currentSrc();var o=sn(p.currentType()),i=a(),u=Xe(i,p,m,v);u[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",u[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=tn(i,t),u.authToken=c||"NULL",u.streamType=o,u.D2CType=l||"NONE",u.subscriberType=r?"MVPD":"FREE"!==l?"D2C":"FREE",u["c3.cm.affiliate"]=r||"NULL",cn.setData(u),f("contentInfo",u)}),p.on("loadedmetadata",function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})}),p.on("play",function(){We.has(p.currentSrc())||(We.add(p.currentSrc()),f("playbackStarted",null))}),p.on("ended",function(){We.has(p.currentSrc())&&We.delete(p.currentSrc()),f("playbackEnded")}),p.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})}),p.on("dispose",function(){null==We||We.clear(),f("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),cn=(ln={},{setData:function(e){ln=qe(qe({},ln),e)},getData:function(){return ln}}),vn=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-d32b190c.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-adec58f3.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-eb3c788b.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-4770cb4a.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-d6db5c40.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-b4b45ad3.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-0f0b158c.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-ea3284a6.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&import("./skin-e659efe9.js").then(function(t){t.initialiseSkin(e,n)})};function pn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function fn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?pn(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):pn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var mn=[],gn=0,hn=null;function yn(){rn=null,mn=[],gn=0,hn=null}function bn(e,n,t){var o,i,l,r,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var c=null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.profileId,v=Math.floor(e.currentTime()),p=Math.floor(e.duration());null==n||null===(l=n.watchHistory)||void 0===l||l.xapiKey;var f=(null==n||null===(r=n.video)||void 0===r?void 0:r.originalObjectId)||null,m=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(e.currentTime()),h=d?100:Math.floor(v/p*100),y={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=wn(o),l=(new Date).getTime(),r=a(),u=(null==r?void 0:r.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return fn(fn({},e),{},J({},n,u[n]))},{}),d=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===rn});d<0?i.push(fn(fn({content:s},e),{},{addedDate:l,updateDate:l})):i[d]=fn(fn(fn({},i[d]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,n.siteOwner):(y=fn(fn({videoId:rn,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},hn&&{seriesId:hn}),f&&{originalObjectId:f}),u(y).then(function(e){}).catch(function(e){})),gn=v+t}function wn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function kn(e,n,t){var o=wn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var On=!1,jn=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!On){var l=Sn(e,"videoAssets","secondaryVideoAssets"),r=s(l,n);return r&&d(n,r),On=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Sn(e,n,t){if(Array.isArray(e))return e.map(function(e){return Sn(e,n,t)});if(null!==e&&"object"===ye(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=Sn(e[i],n,t)}),o}return e}function In(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Dn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Dn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function Tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function En(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Tn(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Tn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Pn=function(e,n,t,o){var i,l,r,u,s,d=o.res,h=o.sres,y=ve(e),b=(null==d?void 0:d.contentType)||"video",w=(null==d||null===(i=d[b])||void 0===i?void 0:i.drmEnabled)||!1,k=(null==d||null===(l=d[b])||void 0===l||null===(r=l.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1,O=(null==d||null===(u=d[b])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;c(d),v.set(d),y&&(y.on("loadstart",function(){k?t.resolve({status:!0,msg:"Video Loaded",response:d}):t.resolve(En({status:!0,msg:"Player Initialised"},h?{seriesResponse:h,response:d}:{response:d}))}),y.on("loadeddata",function(){var t,o,i,l=re(e);if(null==l||l.map(function(n){return ae(e,n.id)}),O&&"Safari"===me())try{var r;null==y||null===(r=y.liveTracker)||void 0===r||r.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&Pe(e,sessionStorage.getItem("volume")||"100");var u=a();if(p(n),f(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var s,c,v=En(En({},n),d);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(hn=null==n||null===(i=n.series)||void 0===i?void 0:i.id),mn=[],gn=0,rn=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=ve(e);a&&(a.on("dispose",yn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());mn.includes(gn)||(e!=gn||e<r?e>gn&&(gn=e+r):(mn.push(e),bn(a,n,r)))}}),a.one("ended",function(){bn(a,n,r,!0)}))}(e,v,null==u||null===(s=u.video)||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=y&&y.mux){var m,g,h,b,w,k,j=(null===(m=a())||void 0===m?void 0:m.video)||(null==d?void 0:d.video),S=null==j?void 0:j.gist,I={env_key:null==n||null===(g=n.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==S?void 0:S.id,video_title:null==S?void 0:S.title,video_series:null==j||null===(b=j.series)||void 0===b?void 0:b.title,video_stream_type:null!=j&&null!==(w=j.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};y.mux({debug:!1,data:I})}}),y.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];y.trigger("subtitlechanged",n)}),y.on("subtitlechanged",function(e,n){var t,o,i,l,r,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){k&&jn(d,e)}),y.on("error",function(){var n,o;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&k)?jn(d,e):(m(e,(null==y||null===(n=y.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==y||null===(o=y.error())||void 0===o?void 0:o.message)||"Some error occured",response:d}))}),y.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var r,u,s,d=null===(r=a())||void 0===r||null===(u=r.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=g(),v=(null==c?void 0:c.get(d))||{t:0,p:0},p=v.t,f=v.p;p&&f<95&&setTimeout(function(){y.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){y.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(k){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var e,n=(null==y||null===(e=y.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ye(y.dash)){var t,o,i,l=null==y||null===(t=y.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),r=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=In(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(r&&(null==u?void 0:u.id)=="dash-audio-".concat(r.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=In(n);try{for(d.s();!(s=d.n()).done;){var c,v,p,f=s.value;if(("Chrome"==me()||"Edge"==me()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!w))&&null!=f&&null!==(p=f.label)&&void 0!==p&&p.includes("5.1"))y.audioTracks().removeTrack(f);else{if("main"==f.kind){f.enabled=!0;break}f.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function xn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Cn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xn(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var An=function(n,t,o,i){var l,r,a,u,c,v,p,f,g,O,j,S,I,D,T,E,P,x,C,A,R,N,L,M,_,V,U,B,H,F,G,K,z,Y,q,W,Z,ee,ne,te=t.res,oe=void 0===te?null:te,ie=t.sres,le=void 0===ie?null:ie,re=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(l=oe)||void 0===l?void 0:l.contentType)||"video",se=pe(null===(r=oe)||void 0===r||null===(a=r[ae])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.videoImageUrl)||pe(null===(c=oe)||void 0===c||null===(v=c[ae])||void 0===v||null===(p=v.gist)||void 0===p||null===(f=p.imageGist)||void 0===f?void 0:f.r16x9),de=(null===(g=oe)||void 0===g||null===(O=g[ae])||void 0===O||null===(j=O.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,ce=(null===(S=oe)||void 0===S||null===(I=S[ae])||void 0===I||null===(D=I.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,fe=(null===(T=oe)||void 0===T||null===(E=T.ads)||void 0===E||null===(P=E.preRoll)||void 0===P||null===(x=P.adTags)||void 0===x||null===(C=x.web)||void 0===C?void 0:C.active)&&(null===(A=oe)||void 0===A||null===(R=A.ads)||void 0===R||null===(N=R.preRoll)||void 0===N||null===(L=N.adTags)||void 0===L||null===(M=L.web)||void 0===M?void 0:M.url);oe=Cn(Cn({},oe),{},{audioAssetSource:null==o?void 0:o.audioAssetSource});var ge=(null==o||null===(_=o.customData)||void 0===_?void 0:_.ads)||{},he=(null===(V=oe)||void 0===V||null===(U=V[ae])||void 0===U?void 0:U.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ge?void 0:ge.vodAdSticherProvider)||!1,ye=!(null===(B=oe)||void 0===B||null===(H=B[ae])||void 0===H||!H.isSSAIEnabled)&&"TRANSMIT"==(null==ge?void 0:ge.liveAdSticherProvider)&&!(null==ge||!ge.liveAdClientSideTracking),be=(null==o?void 0:o.latency)||6,we=(null==o?void 0:o.skin_settings)||{},ke=(ee={enableSmoothSeeking:!0,controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==we?void 0:we.pictureInPictureToggle)||!1},playbackRates:null!=we&&we.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==o.skin,liveui:de},J(ee,"autoplay",null==o?void 0:o.autoplay),J(ee,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!fe),J(ee,"loop",(null==o?void 0:o.loop)||!1),J(ee,"audioPosterMode",null==o?void 0:o.audioPosterMode),J(ee,"html5",Cn(Cn({dash:Cn(Cn(Cn({},!$.browser.IS_SAFARI&&{useTTML:!0}),(null==o?void 0:o.debugConfig)&&(null==o||null===(F=o.debugConfig)||void 0===F?void 0:F.enable)&&{debug:!0,logLevel:null!=o&&null!==(G=o.debugConfig)&&void 0!==G&&G.logLevel?null==o||null===(K=o.debugConfig)||void 0===K?void 0:K.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:be},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Cn({},"IE"==me()&&{enableStallFix:!0,stallSeek:1}),abr:Cn(Cn({},(null==o?void 0:o.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==o?void 0:o.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0}})}}}),vhs:Cn(Cn(Cn({},(null==o?void 0:o.initialBandwidth)&&{bandwidth:o.initialBandwidth}),{},{liveRangeSafeTimeDelta:be,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==o||!o.initialBandwidth},(null==o||null===(z=o.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(Y=null==o?void 0:o.enableLowInitialPlaylist)&&void 0!==Y&&Y}),debug:(null==o?void 0:o.debugConfig)&&(null==o||null===(q=o.debugConfig)||void 0===q?void 0:q.enable)||!1,nativeTextTracks:"Safari"==me()},0==(null==o||null===(W=o.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===(Z=o.customData)||void 0===Z?void 0:Z.nativeVideoTracks)&&{nativeVideoTracks:!1})),J(ee,"poster",se),J(ee,"techOrder",re),J(ee,"chromecast",{requestCustomDataFn:function(t){var i,l,r=ve(n),a=((null==r?void 0:r.textTracksJson_)||r.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var o,i,l,r,a,u,s,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,O;f.isDrmEnabled=!0;var j=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==j?void 0:j.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=S;var I=(null==j?void 0:j.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);f.licenseToken=I}var D=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=D;var T=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=T;var E=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=E;var P=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=P,f.subTitles=t,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}(oe,t,a);return Cn(Cn({},u),{},{transmitTrackingUrl:e.get()||null,convivaMetaData:Cn({customerKey:(null==o||null===(i=o.convivaConfig)||void 0===i?void 0:i.customerKey)||null,debug:(null==o||null===(l=o.convivaConfig)||void 0===l?void 0:l.debug)||!1},cn.getData())})},modifyLoadRequestFn:function(e){var t,o,i,l,r,a=ve(n),u=(null==a?void 0:a.currentSource())||{};!(null===(t=oe)||void 0===t||null===(o=t[ae])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(r=u.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ee);if(!$.getPlayers()[n]){null!=o&&o.debugConfig&&null!=o&&null!==(ne=o.debugConfig)&&void 0!==ne&&ne.enable&&$.log.level("debug");var Oe=$(n,ke,function(){var e=X(Q.mark(function e(){var t,l,r,a,u,c,v,p,f,g,O,j,S,I,D,T,E,P,x,C;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(Oe),console.log($.VERSION),console.log($.getPlugins()),e.next=5,Ke(o,oe);case 5:if(j=null===(t=oe)||void 0===t||null===(l=t[ae])||void 0===l||null===(r=l.liveDetails)||void 0===r?void 0:r.startOverTime,ce&&i.resolve(Cn({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:oe}:{response:oe})),y(n,{analyticsCb:null==o?void 0:o.analyticsCb,analyticsEventParams:null==o?void 0:o.analyticsEventParams,userId:null==o?void 0:o.userId}),dn(n,o),/Android/i.test(navigator.userAgent)&&($.options.vhs.overrideNative=!0),de&&Ae(n,j),!fe||null!=o&&null!==(a=o.customData)&&void 0!==a&&a.disableAds||b(n,fe,oe),S=s(oe,n),console.log(S),null!=o&&o.nearestClusterUrl&&(S=w(S,o.nearestClusterUrl)),!he){e.next=21;break}return e.next=18,k(n,oe);case 18:S=e.sent,e.next=25;break;case 21:if(!ye){e.next=25;break}return e.next=24,Te(S,oe,n);case 24:S=e.sent;case 25:S?d(n,S):(i.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),m(n,"Incompatible / Missing Source")),((null===(u=oe)||void 0===u||null===(c=u[ae])||void 0===c||null===(v=c.contentDetails)||void 0===v||null===(p=v.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(f=oe)||void 0===f||null===(g=f[ae])||void 0===g||null===(O=g.closedCaptions)||void 0===O?void 0:O.length)>0)&&(C=(null===(D=oe)||void 0===D||null===(T=D[ae])||void 0===T||null===(E=T.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(P=oe)||void 0===P||null===(x=P[ae])||void 0===x?void 0:x.closedCaptions),I=C.filter(function(e){return"VTT"===e.format}),ue(n,I)),null!=o&&o.disableControls?h(n):vn(n,Cn(Cn(Cn({},o),ke),{},{liveVideo:ce,isDvrEnabled:de,res:oe,sres:le})),Pn(n,Cn(Cn(Cn({},o),ke),{},{liveVideo:ce}),i,{res:oe,sres:le});case 29:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}};function Rn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rn(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ln=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=Mn(e);An(i,{res:l},e,{resolve:t,reject:o})},Mn=function(e){var n,t,o,i,l,r,a,u,s,d,c,v,p,f=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,g=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,h=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,y=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,b=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],w=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,k=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],j=(null==e||null===(d=e.customData)||void 0===d||null===(c=d.ads)||void 0===c?void 0:c.isSSAIEnabled)||!1,S=null==e?void 0:e.token,I=O(S);null==I||I.site;var D=null==I?void 0:I.siteId,T=(null==e||null===(v=e.customData)||void 0===v||null===(p=v.comscore)||void 0===p?void 0:p.video)||null,E=Nn(Nn({id:"".concat(D,"_external")},!g&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:Nn(Nn(Nn(Nn(Nn({drmEnabled:g,streamingInfo:Nn(Nn({videoAssets:Nn(Nn({},w&&{drmProvider:w}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==f?void 0:f.isDvrEnabled)&&{isLiveStream:!0}),(null==T?void 0:T.isLiveStream)&&{isLiveStream:null==T?void 0:T.isLiveStream})},j&&{isSSAIEnabled:j}),{},{metadata:k,liveDetails:{isDvrEnabled:null==f?void 0:f.isDvrEnabled},gist:Nn(Nn(Nn({},y&&{videoImageUrl:y}),(null==T?void 0:T.videoId)&&{id:null==T?void 0:T.videoId}),(null==T?void 0:T.videoTitle)&&{title:null==T?void 0:T.videoTitle}),contentDetails:Nn({},(null==b?void 0:b.length)>0&&{closedCaptions:be(b)})},(null==T?void 0:T.runtime)&&{runtime:null==T?void 0:T.runtime}),(null==T?void 0:T.publishDate)&&{publishDate:null==T?void 0:T.publishDate}),(null==T?void 0:T.platform)&&{platform:null==T?void 0:T.platform}),(null==T?void 0:T.series)&&{series:null==T?void 0:T.series}),ads:{preRoll:{adTags:{web:Nn(Nn({},h&&{active:!0}),h&&{url:h})}}}});return T&&(null!=T&&T.isDvrEnabled&&(E.video.liveDetails=Nn(Nn({},E.video.liveDetails),{},{isDvrEnabled:null==T?void 0:T.isDvrEnabled})),null!=T&&T.metadata&&(E.video.metadata=[].concat(be(E.video.metadata),be(null==T?void 0:T.metadata)))),E},_n=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},Vn=function(e){var n,t=we(e,8),o=t[0],i=t[1],l=t[2],r=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n),console.log("Time left:",n)};function Un(e,n,t,o){if(e){var i=function(){var i=e-Date.now();if(i/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var r=_n(i,e);null==n||n([].concat(be(r),[o]))};i();var l=setInterval(i,1e3);return l}}var Bn,Hn=function(e,n,t){var o,i,l,r,a,u,s,d,c,v=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,p=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null,f=Date.now(),m=null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,g=f-(null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate);if(f-m<0?c=ge("eventNotStarted")||p||"Game starts in":(g>0||"VIDEO_NOT_EXISTS"==v)&&(c=ge("eventEnded")||p||"Game has ended"),document.getElementsByClassName("error-container")[0]){var h=document.getElementsByClassName("error-message")[0];h&&(h.textContent="".concat(c));var y=document.getElementsByClassName("error-timer-message")[0];y&&Un(Math.abs(m),Vn,t,y)}else{var b=document.getElementById(e).parentElement;if(b){var w=document.createElement("div");w.className="error-container";var k=document.createElement("div");k.className="error-message";var O=document.createElement("div");O.className="error-timer-message",k.textContent="".concat(c),w.appendChild(k),w.appendChild(O),b.append(w),Un(Math.abs(m),Vn,t,O)}}};function Fn(e,n){return Gn.apply(this,arguments)}function Gn(){return(Gn=X(Q.mark(function e(n,t){var o,i,l,r,a,u,s,d,v;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,D();case 6:d=e.sent,v=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),j(a,d,v).then(function(e){var t,o,i,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,c(null==e?void 0:e.data);var p,f=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(p=n.watchHistory)||void 0===p?void 0:p.saveOffline)||!1){var m,g,h,y=kn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==n?void 0:n.siteOwner);if(y&&y.length)n.watchHistoryResumeTime=(null===(g=y[0])||void 0===g?void 0:g.watchedTime)||null,n.watchedPercentage=(null===(h=y[0])||void 0===h?void 0:h.watchedPercentage)||null;f.contentType="video",An(u,{res:f},n,{resolve:l,reject:r})}else S(a,d).then(function(e){var t,o,i,l,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,f.contentType="video"}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}).finally(function(){An(u,{res:f},n,{resolve:l,reject:r})});else An(u,{res:f},n,{resolve:l,reject:r})}).catch(function(e){var t,o,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,l=(null==n||null===(o=n.event)||void 0===o?void 0:o.onCountdownComplete)||null;i&&Hn(u,e,l),I(e,u,r,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Kn(e,n){return zn.apply(this,arguments)}function zn(){return(zn=X(Q.mark(function e(n,t){var o,i,l,r,a,u,s,d;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,e.next=3,D();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),T(s,a,d).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,An(u,{res:t},n,{resolve:l,reject:r})}).catch(function(e){I(e,u,r,videoId)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Yn(e,n){return qn.apply(this,arguments)}function qn(){return(qn=X(Q.mark(function e(n,t){var o,i,l,r,a,u,s;return Q.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,D();case 3:r=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,x.set(parseInt(u)),s=null==n||null===(o=n.series)||void 0===o?void 0:o.id,E(s,r).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;C(v);var p=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);P(s,r),j(p,r).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,c(e.data),An(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:i,reject:l})}).catch(function(e){I(e,a,l,videoId)})}).catch(function(e){I(e,a,l)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Jn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wn(Object(t),!0).forEach(function(n){J(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Xn(){return{loadVideoInstantly:A,onTimeUpdate:Z,getVideoDuration:ee,onVideoEnded:ne,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=X(Q.mark(function n(t,o){var i,l,r,a,u,s,d,c,v,p,f,m,g,h,y,b,w,k,O,S,D,T,E,P,x,C;return Q.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!_(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(h=(null==e?void 0:e.videoSourceUrl)||!1,y=null==e?void 0:e.asat,b=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,w=null==e?void 0:e.videoId,k=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,O=(null==e?void 0:e.streamingInfo)||!1,window.videoId=w,S=null==e?void 0:e.token,!z(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",S),Y().set(null==e?void 0:e.refreshToken),S&&!q(S)){n.next=16;break}return o({status:!1,msg:"".concat(S?"Token is expired !":"Missing Authorization Token"),response:{token:S}}),n.abrupt("return");case 16:Bn=JSON.parse(atob(S.split(".")[1]));case 17:return window.siteName=null===(r=Bn)||void 0===r?void 0:r.site,window.siteId=null===(a=Bn)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(u=Bn)||void 0===u||!u.anonymousId),e.siteOwner=(null===(s=Bn)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=Bn)||void 0===d?void 0:d.userId)||null,G((null===(c=Bn)||void 0===c?void 0:c.userId)||(null===(v=Bn)||void 0===v?void 0:v.anonymousId)||null),window.watchHistory=e.watchHistory||null,D=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,T=(null==e||null===(f=e.analytics)||void 0===f?void 0:f.gaId)||null,(E=null==e?void 0:e.errors)&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,he(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),K.set(e.apiBaseUrl),null!=e&&e.skin&&!fe(e.skin)||(e.skin="VL_ONE"),n.next=35,Be(e);case 35:T&&ke("https://www.googletagmanager.com/gtag/js?id=".concat(T)).then(function(){return W(T)}).catch(function(e){}),(P=null===(g=document)||void 0===g?void 0:g.getElementById("".concat(D)))&&P.addEventListener("contextmenu",function(e){return e.preventDefault()}),h?(C={directPlaybackUrl:h,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},y?j(x,S).then(function(n){var i=(null==n?void 0:n.data)||{};An(D,{res:Jn(Jn({},i),C)},e,{resolve:t,reject:o})}).catch(function(e){I(e,D,o,x)}):An(D,{res:C},e,{resolve:t,reject:o})):O?Ln(e,{resolve:t,reject:o}):k?Yn(e,{resolve:t,reject:o}):b?Kn(e,{resolve:t,reject:o}):Fn(e,{resolve:t,reject:o});case 39:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:de,skip:R,getPlayer:ve,play:N,pause:L,detectBrowser:me,rewind:M,loadVideo:d,seekToTimeStamp:te,isPlayerInitialised:_,load:V,authenticateLC:U,dispose:B,enableCaptions:se,disableCaptions:ae,getCaptions:re,playSelectedResolution:ce,getSource:s,setVolume:Pe,getVolume:xe,disableControls:h,setPlaybackSpeed:oe,getEntitlementData:H,getSsaiEvents:F,playerEvents:ie,onReplay:le}}export{Xn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{i as n,e as i,j as l}from"./icons-699e8cf0.js";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{i as n,e as i,j as l}from"./icons-699e8cf0.js";import{M as c,I as m}from"./generic-6bd18e7c.js";import{j as d,s as p,l as u}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){r(g,h);var f,y,b=(f=g,y=v(),function(){var e,t=a(f);if(y){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function g(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(r=b.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(g,[{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(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.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,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var o;null!==(o=r.classList)&&void 0!==o&&o.contains("hidden")?(d(),r.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var a=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(a,"px"),o.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=function(e){var r,o,a,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},h=0;h<this.streams.length;h++)v(h);s.dom.appendContent(o,a),s.dom.appendContent(o,n),s.dom.appendContent(e,o),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,e as i,j as l}from"./icons-699e8cf0.js";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,e as i,j as l}from"./icons-699e8cf0.js";import{M as c,I as m}from"./generic-6bd18e7c.js";import{j as d,g as p}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}var h=n.getComponent("Component"),v=function(){r(b,h);var v,f,y=(v=b,f=u(),function(){var e,t=a(v);if(f){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function b(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(r=y.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(b,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.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=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),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 o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.style.overflow="hidden",n.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=n.dom.createEl("div",{className:"stream-selector-head"}),a=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),u=n.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,o=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(o.classList.add("selected"),o.style.border="4px solid #D2393B"),o.onclick=function(){for(var r=n.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");o.classList.add("selected"),o.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then(function(e){m(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},o.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",o.append(a),n.dom.appendContent(u,o),n.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);n.dom.appendContent(o,a),n.dom.appendContent(o,s),n.dom.appendContent(e,o),n.dom.appendContent(e,d),p(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")})}}]),b}();export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-699e8cf0.js";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-699e8cf0.js";import{M as s,h as a}from"./generic-6bd18e7c.js";import{f as d}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}var c=r.getComponent("Component"),m=function(){n(m,c);var s,a,d=(s=m,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function m(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(m,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then(function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),t.addEventListener("mouseover",function(){r.dom.removeClass(t,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")}),t.addEventListener("mouseout",function(){r.dom.addClass(t,"nextepisode-hidden")})}}]),m}(),u=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach(function(e,o){e.gist.id===t&&(n=o)}),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then(function(e){a(e.response)})};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),c=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=c&&c.firstChild;)null==p||p.appendChild(c.firstChild)};export{m as default,u as initaliseFunctionality};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-699e8cf0.js";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-699e8cf0.js";import{M as c,$ as d}from"./generic-6bd18e7c.js";import{a as p}from"./autoNextVideo-e8df1a63.js";import{j as m,g as u}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-a0ce1bd0.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){n(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var o,n,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(o=a.playlist)||void 0===o?void 0:o.content,i.cb=(null==a||null===(n=a.playlist)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return o(g,[{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())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.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 o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),o.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var o=this,n=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var n,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=o.videos[t])||void 0===n?void 0:n.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(o.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=o.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(o.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(o.playerId,o.videos[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},s.onclick=function(t){var o,n,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(o=s.classList)&&void 0!==o&&o.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(n=s.classList)||void 0===n||n.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(o.playerId);if(e){var n=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px")}})}}]),g}();export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{a3 as d,J as p,M as u,h as v,I as m}from"./generic-6bd18e7c.js";import{E as f}from"./icons-699e8cf0.js";import{f as h}from"./skin-4f84b841.js";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){s(d,C);var e,l,c=(e=d,l=b(),function(){var i,t=o(e);if(l){var n=o(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),a(n(t),"seriesData",[]),t.seriesData=s.seriesData,y=s.playerId,j(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function L(){return(L=e(l.mark(function e(i,t,n,s){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:p(y),g(y),u(y,t).then(function(e){v(e.response),m(y)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=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!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach(function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,p[i],p)}),u[i].addEventListener("click",function(){return function(e,i,t,n){return L.apply(this,arguments)}(i,f[i].id,t,p)}),e.episodes[i].id==m&&p[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function j(e,i){for(var t='<div class="hover-div"></div>\n '.concat(f(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{j as customSeasonList,k as handleSeasonChange,w as seriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-699e8cf0.js";import{m as u,a1 as m,a2 as v,K as p,b as h,C as f}from"./generic-7018a35f.js";import{j as b,s as y,p as C,l as g,g as E,i as N}from"./skin-4f84b841.js";import{a as k}from"./autoNextVideo-5edbb399.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-5b0950d3.js";function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}var I=a.getComponent("Component"),S=function(){n(B,I);var S,L,w=(S=B,L=x(),function(){var e,t=l(S);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function B(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,B),(d=w.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,b,y=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),m(C),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),k({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(B,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.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,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,d,c;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===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(N(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),B}();export{S as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-699e8cf0.js";import{m as u,a4 as m,a5 as v,M as p,b as h,E as f}from"./generic-6bd18e7c.js";import{j as b,s as y,p as C,l as g,g as E,i as N}from"./skin-4f84b841.js";import{a as k}from"./autoNextVideo-e8df1a63.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-a0ce1bd0.js";function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}var I=a.getComponent("Component"),S=function(){n(B,I);var S,L,w=(S=B,L=x(),function(){var e,t=l(S);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function B(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,B),(d=w.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,b,y=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),m(C),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),k({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(B,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.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,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,d,c;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===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(N(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),B}();export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-699e8cf0.js";import{m,
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-699e8cf0.js";import{m,a4 as u,a5 as p,b as v,E as h,M as f}from"./generic-6bd18e7c.js";import{j as C,p as y,g}from"./skin-4f84b841.js";import{a as b}from"./autoNextVideo-e8df1a63.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-a0ce1bd0.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(){n(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(o){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,o,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=m(),null!==(a=s(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var v,h,f,C,y=null==c||null===(v=c.sres)||void 0===v?void 0:v.seasons,g=[];y.map(function(t){g.push.apply(g,e(t.episodes))}),u(g),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:g,cb:d.cb,series:null==c?void 0:c.sres})}return d}return o(L,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.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,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var s=document.getElementById(this.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(n,"px"),a.dom.appendContent(t,o),s.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),s=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var s=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(s,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=y(d());n.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(s,n),a.dom.appendContent(s,i),a.dom.appendContent(e,s),a.dom.appendContent(e,l),g(this.playerId).on("fullscreenchange",function(){var o=document.getElementById(t.playerId);if(o){var s=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;g(this.playerId);for(var t=v(),o=a.dom.createEl("div",{className:"season-container"}),s=function(s){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(s));var l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(n=t[s])||void 0===n?void 0:n.title;var r=a.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==s&&(r.checked=!0),r.onclick=function(t){h.set(s),e.showSeasonDetails(s)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(o,i)},n=0;n<t.length;n++)s(n);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var s=this;t=t.map(function(e){var t,o,n,i,l;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===(o=e.gist)||void 0===o||null===(n=o.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}});for(var n=function(n){var i,l,r,d,c,m,u,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:n}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),y=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,y),a.dom.appendContent(v,h),a.dom.appendContent(o,v);var g=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(m=c.customData)||void 0===m?void 0:m.fallbackImage)),E.alt="".concat(null===(u=t[n])||void 0===u?void 0:u.title),a.dom.appendContent(g,E),a.dom.appendContent(g,N),a.dom.appendContent(v,g),a.dom.appendContent(o,v),g.onclick=function(e){var o;e.stopPropagation(),p(null===(o=t[n])||void 0===o?void 0:o.id),f(s.playerId,t[n].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},h.onclick=function(t){var o,s,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(s=l.classList)||void 0===s||s.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var o=v()[e].episodes;this.getSeasonDetailsContainer(o,t);var s=a.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var n=y(c());s.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as l,r as i,d as e,e as n,j as o,k as t,l as s,m as r}from"./features-cb3674ee.js";import{f as a}from"./icons-699e8cf0.js";import{g as d,p as u,e as v}from"./skin-4f84b841.js";import{g as C}from"./renditions-19f0b3a9.js";import{a as c,b as p}from"./index-0c364075.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{a0 as h,a1 as m,e as f,a2 as y,m as b}from"./generic-6bd18e7c.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-e8df1a63.js";import"./util-a0ce1bd0.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@viewlift/comscore/index.js";function L(L,g){d(L).addClass("skin_news"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,s,r,a,d;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e),!(null!=e&&null!==(t=e.series)&&void 0!==t&&t.enable||null!==(s=window)&&void 0!==s&&null!==(r=s.app_data)&&void 0!==r&&null!==(a=r.appcmsMain)&&void 0!==a&&null!==(d=a.features)&&void 0!==d&&d.auto_play)||null!=e&&e.liveVideo||c(i,e)})}(L,g),function(l,i){var e,n,o,t,s,r,a,C,c,p,h,m,f,y,b,L,g,B,w=d(l);if(null!=i&&i.liveVideo){var j,E,V,x,M,k,S=null===(j=w.controlBar)||void 0===j||null===(E=j.getChild("TimeDivider"))||void 0===E?void 0:E.el(),T=null===(V=w.controlBar)||void 0===V||null===(x=V.getChild("CurrentTimeDisplay"))||void 0===x?void 0:x.el(),Z=null===(M=w.controlBar)||void 0===M||null===(k=M.getChild("DurationDisplay"))||void 0===k?void 0:k.el();S&&(S.style.display="none"),T&&(T.style.display="none"),Z&&(Z.style.display="none")}var A=null===(e=w.controlBar)||void 0===e?void 0:e.getChild("ProgressControl"),H=null===(n=w.controlBar)||void 0===n||null===(o=n.getChild("SeekToLive"))||void 0===o?void 0:o.el();H&&(H.onclick=function(){if(w.paused())try{w.play()}catch(l){console.log(l)}});var _=document.createElement("div");_.className="custom-spaced-progress-bar",A&&_.append(A.el());null===(t=w.controlBar)||void 0===t||null===(s=t.el())||void 0===s||s.append(_);var N='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';w.el().insertBefore(u(N),null!==(r=w.el().firstChild)&&void 0!==r?r:null);var P=(null==w||null===(a=w.controlBar)||void 0===a||null===(C=a.getChild("PlayToggle"))||void 0===C||null===(c=C.el())||void 0===c?void 0:c.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var D=v(P,w.paused()?"#vjs-icon-play":"#vjs-icon-pause");w.on("pause",function(){return D.setAttributeNS(null,"href","#vjs-icon-play")}),w.on("play",function(){return D.setAttributeNS(null,"href","#vjs-icon-pause")})}var I=(null==w||null===(p=w.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(I){I.style.height="24px",I.style.width="24px";var q=v(I,"#vjs-icon-fullscreen");w.on("fullscreenchange",function(){var l=w.isFullscreen_;null==q||q.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var O=(null==w||null===(f=w.controlBar)||void 0===f||null===(y=f.getChild("VolumePanel"))||void 0===y?void 0:y.el())||null;if(O){var R=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");R.classList.add("vjs-svg-icon"),R.style.height="24px",R.style.width="24px";var F=v(R,w.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");w.on("volumechange",function(l){var i=w.volume();console.log(i,w.muted()),0==i||w.muted()?F.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?F.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?F.setAttributeNS(null,"href","#vjs-icon-volume2"):F.setAttributeNS(null,"href","#vjs-icon-volume3")})}var G=(null==w||null===(b=w.controlBar)||void 0===b||null===(L=b.getChild("PictureInPictureToggle"))||void 0===L?void 0:L.el())||null;if(G){var z=null==G?void 0:G.querySelector(".vjs-icon-placeholder");z.style.height="25px",z.style.width="25px";var J=v(z,"#vjs-icon-pip");w.on("enterpictureinpicture",function(){J.setAttributeNS(null,"href","#vjs-icon-pip")})}var K=(null==w||null===(g=w.controlBar)||void 0===g||null===(B=g.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(K){var Q=K.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");Q.classList.add("vjs-svg-icon"),Q.style.height="29px",Q.style.width="29px";var U=v(Q,"#vjs-icon-caps");U.setAttributeNS(null,"href","#vjs-icon-captions-off"),w.textTracks().on("change",function(l){for(var i=w.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?U.setAttributeNS(null,"href","#vjs-icon-captions"):U.setAttributeNS(null,"href","#vjs-icon-captions-off")})}w&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(w.liveTracker.on("liveedgechange",function(){Y(w)}),w.on("timeupdate",function(){Y(w)}));function W(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function X(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function Y(l){var i,e,n=l.liveTracker.atLiveEdge(),o=X(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var s=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",s&&(s.innerText=W(o)))}}}(L,g),function(l,d){var u,v,C,c,p,L,g,B,w,j,E=(null==d?void 0:d.liveVideo)||!1,V=(null==d||null===(u=d.res)||void 0===u?void 0:u.contentType)||"video",x=(null==d||null===(v=d.res)||void 0===v||null===(C=v[V])||void 0===C?void 0:C.isSSAIEnabled)||!1,M=(null==d?void 0:d.skin_settings)||{};null==M||M.slowMoBtn;var k=(null==d||null===(c=d.customData)||void 0===c?void 0:c.ads)||{};i(l),null!=M&&M.skipBtn&&0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=M&&M.rewindBtn&&(0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)||1==(null==d?void 0:d.liveui))&&n(l,"VL_ONE",a());(null==d||null===(p=d.relatedVideos)||void 0===p||null===(L=p.content)||void 0===L?void 0:L.length)>0&&o(l,null==d?void 0:d.relatedVideos);(null==d||null===(g=d.streams)||void 0===g?void 0:g.length)>1&&t(l,null==d?void 0:d.streams);(null==d||null===(B=d.playlist)||void 0===B||null===(w=B.content)||void 0===w?void 0:w.length)>0&&s(l,null==d?void 0:d.playlist);null!=d&&null!==(j=d.series)&&void 0!==j&&j.enable&&r(l,d);if(x&&E&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&null!=k&&k.liveAdClientSideTracking)h(l,d);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&x)if(E)m(l);else{var S,T=null;if(null!=d&&null!==(S=d.series)&&void 0!==S&&S.enable){var Z,A,H,_,N,P=null===(Z=f())||void 0===Z||null===(A=Z.video)||void 0===A||null===(H=A.gist)||void 0===H?void 0:H.id,D=b(),I=(null==D?void 0:D.get(P))||{t:0,p:0},q=I.t,O=I.p;"function"==typeof(null===(_=window)||void 0===_||null===(N=_.watchHistory)||void 0===N?void 0:N.cb)&&window.watchHistory.cb({watchedTime:q}),O<95&&(T=q)}else{var R=d.watchHistoryResumeTime;d.watchedPercentage<95&&(T=R)}y(l,T)}}(L,g),p(L,g)}export{L as initialiseSkin};
|