@viewlift/player-backup 2.0.206-backup → 2.0.208-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-ea81b1f4.js → autoNextVideo-4a59e3a1.js} +1 -1
- package/cjs/bundle.css +448 -448
- package/cjs/{features-7878533f.js → features-5f92bf1b.js} +1 -1
- package/cjs/{generic-923160fd.js → generic-82357fa8.js} +1 -1
- package/cjs/{index-a792959a.js → index-442d2c0a.js} +1 -1
- package/cjs/{index-153b7203.js → index-856a71d1.js} +1 -1
- package/cjs/{index-8a9c25bb.js → index-ecaec4f5.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-ca3c10b2.js → multicamv2-a439410a.js} +1 -1
- package/cjs/{multicamv2-5b54452a.js → multicamv2-cb3e1ce9.js} +1 -1
- package/cjs/{nextEpisodeButton-b7a7a907.js → nextEpisodeButton-a9e2e181.js} +1 -1
- package/cjs/{playlist-c20c64f1.js → playlist-c2e5bb96.js} +1 -1
- package/cjs/{series-e7d2a353.js → series-60e160b8.js} +1 -1
- package/cjs/{series-v2-f00d02ab.js → series-v2-b6715b3c.js} +1 -1
- package/cjs/{series-v2-92e8f5a9.js → series-v2-c6f17fef.js} +1 -1
- package/cjs/{skin-d5d4ccea.js → skin-33bdf91d.js} +1 -1
- package/cjs/{skin-db33fcff.js → skin-3b99aa6d.js} +1 -1
- package/cjs/{skin-5435286d.js → skin-5972e125.js} +1 -1
- package/cjs/{skin-c06ff1c8.js → skin-5a5f9f06.js} +1 -1
- package/cjs/{skin-d0a9df1c.js → skin-8acc727d.js} +1 -1
- package/cjs/{skin-26de3085.js → skin-8f3d874a.js} +1 -1
- package/cjs/{skin-2ba328a4.js → skin-a1ce9ae5.js} +1 -1
- package/cjs/{skin-0bf9fb6b.js → skin-b43f0323.js} +1 -1
- package/cjs/{skin-90aa6c9c.js → skin-ffb2e11b.js} +1 -1
- package/cjs/{util-4c4c0ff1.js → util-474e412e.js} +1 -1
- package/cjs/{videoSelector-d7e9a0bd.js → videoSelector-29366db4.js} +1 -1
- package/cjs/{videoSelector-bede65dd.js → videoSelector-f6abcc17.js} +1 -1
- package/esm/{autoNextVideo-07e6c2d6.js → autoNextVideo-e0e550b3.js} +1 -1
- package/esm/bundle.css +448 -448
- package/esm/{features-3f26ef6e.js → features-be5b8430.js} +1 -1
- package/esm/{generic-307cf701.js → generic-1a51f2ab.js} +1 -1
- package/esm/{index-a78e7ae8.js → index-80a242b0.js} +1 -1
- package/esm/{index-93f13388.js → index-992745e4.js} +1 -1
- package/esm/{index-5ea757fb.js → index-daa9de90.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-abedba74.js → multicamv2-a33313ca.js} +1 -1
- package/esm/{multicamv2-da685c73.js → multicamv2-db44c0d1.js} +1 -1
- package/esm/{nextEpisodeButton-ca6917eb.js → nextEpisodeButton-56f99aba.js} +1 -1
- package/esm/{playlist-62019709.js → playlist-cd2486a4.js} +1 -1
- package/esm/{series-c036ad6a.js → series-a6703f8c.js} +1 -1
- package/esm/{series-v2-9d281e4c.js → series-v2-1e833c7a.js} +1 -1
- package/esm/{series-v2-123a3f36.js → series-v2-c5fe70ec.js} +1 -1
- package/esm/{skin-831a579b.js → skin-1b4041e2.js} +1 -1
- package/esm/{skin-e4fd3381.js → skin-3547f390.js} +1 -1
- package/esm/{skin-feb5f134.js → skin-3bd4b76f.js} +1 -1
- package/esm/{skin-31a0882a.js → skin-6501bcf0.js} +1 -1
- package/esm/{skin-e5082af0.js → skin-9441bcf5.js} +1 -1
- package/esm/{skin-9f9c1ff4.js → skin-aefe5ff3.js} +1 -1
- package/esm/{skin-aa7dd324.js → skin-d82f3374.js} +1 -1
- package/esm/{skin-5a5d4f1b.js → skin-d9b0d2f7.js} +1 -1
- package/esm/{skin-977073db.js → skin-f4d262de.js} +1 -1
- package/esm/{util-e30d090e.js → util-6d0199e8.js} +1 -1
- package/esm/{videoSelector-e5823691.js → videoSelector-baf82909.js} +1 -1
- package/esm/{videoSelector-a9362fc3.js → videoSelector-e93cbca6.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-923160fd.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),r=require("video.js"),i=require("./util-4c4c0ff1.js"),l=require("./captions-68e263dd.js"),a=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),s=require("./player_instance-fcf6a8fb.js"),d=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-5802821b.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),f=require("./helper-dbf2fb22.js"),m=require("@babel/runtime/helpers/toConsumableArray"),g=require("@babel/runtime/helpers/slicedToArray"),y=function(e){return new Promise(function(n,t){if(h(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)}})},h=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},b=function(e,n,t){var o=s.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),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,"'")})},w=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var n=t(o.mark(function n(t){var i,l,a,u,d;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=s.getPlayer(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),console.log("Error",n.t0);case 10:if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(r),(d=r.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e.detectBrowser()?null==a||a.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}},n,null,[[2,7]])}));return function(e){return n.apply(this,arguments)}}(),S=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=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===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var I=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),y("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)}}(),O=function(){var n=t(o.mark(function n(){return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),P=function(){var e=t(o.mark(function e(){return o.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){r.getPlugin("eme")||r.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),T=function(){var e=t(o.mark(function e(){var n;return o.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(r),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)}}(),D=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-96485ab1.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)}}(),E=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-4bac123d.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)}}(),C=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(r)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(r)})},loadAdsLibrary:I,loadEMELibrary:P,loadMuxPlugin:T,loadDvrSeekbar:D,loadContribDash:E,loadComscorePlugin:O});function j(e){return x.apply(this,arguments)}function x(){return(x=t(o.mark(function n(t){var r,i,l;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=(null==t?void 0:t.airplay)||!1,n.next=3,I();case 3:r&&"Safari"==e.detectBrowser()?Promise.resolve().then(function(){return C}).then(function(e){e.importAirplay()}):(l=(null===(i=document)||void 0===i?void 0:i.getElementById(null==t?void 0:t.playerId))||null)&&l.setAttribute("x-webkit-airplay","deny");case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function R(e){return L.apply(this,arguments)}function L(){return(L=t(o.mark(function e(n){var t,r,i,l,a,u;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=s.getPlayer(n.playerId),e.next=3,O();case 3:u.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(r=n.comscore)||void 0===r?void 0:r.endpoint,implementationId:null==n||null===(i=n.comscore)||void 0===i?void 0:i.implementationId,projectId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.projectId,debug:(null==n||null===(a=n.comscore)||void 0===a?void 0:a.debug)||!1});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return N.apply(this,arguments)}function N(){return(N=t(o.mark(function n(t,r){var i,l,a,u,s,d,c,v,p,f,m,g,y,h;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return p=(null==r?void 0:r.contentType)||"video",f=null==r||null===(i=r[p])||void 0===i?void 0:i.drmEnabled,null==r||null===(l=r[p])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==t||t.showPositiveSeekbar,m=(null==r||null===(u=r[p])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.dash)||null,g=(null==t||null===(c=t.comscore)||void 0===c?void 0:c.enable)||!1,y=!(null==t||null===(v=t.analytics)||void 0===v||!v.muxKey),n.prev=7,n.next=10,Promise.allSettled([f?"Safari"==e.detectBrowser()?P():"caliente"!=(null===(h=window)||void 0===h?void 0:h.siteName)?E():P():"Safari"!=e.detectBrowser()&&m?E():null,g?R(t):null,y?T():null,k(t)]);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(7),console.log("Error",n.t0);case 15:case"end":return n.stop()}},n,null,[[7,12]])}))).apply(this,arguments)}function M(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 V(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?M(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):M(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var B=new Set,_=null,H=function(n,t,o,r){var i,l,a,u,s,d,v,p={},f=(null==n?void 0:n.contentType)||"video";p["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",p["c3.cm.contentType"]=Y(n),p[null==o||null===(l=o.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),p[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),p[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),p["c3.cm.categoryType"]=W(n),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===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(d=n[f])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[o.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=G(n),p["c3.cm.genreList"]=U(n),p["c3.cm.genre"]=q(n),p["c3.cm.channel"]=F(n,r);var m=X(c.getCurrentSeries(),n);return p=V(V({},p),m)},q=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},U=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"},F=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null===(o=((null==e||null===(t=e[r])||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"},W=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"},G=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},K=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Y=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var J,z,X=function(n,t){var o,r,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(o=t.video)||void 0===o||null===(r=o.series)||void 0===r?void 0:r.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Q=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"}},$=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Z=function(){var e=t(o.mark(function e(n,t){var r,i,l,a,u,d,v,p,f,m,g,y;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(null==t?void 0:t.convivaConfig)||{},i=r.trackConvivaPlayerEvent,l=r.paymentHandler,a=r.tveProvider,u=r.enable,d=r.appName,p=(v=t||{}).token,f=v.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(m=s.getPlayer(n),"function"==typeof(g=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g("getConvivaObject");case 10:if(y=e.sent){e.next=13;break}return e.abrupt("return");case 13:m.ready(function(){var e=m.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Q(t.keySystem);g("contentInfo",{DRMEnabled:o})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),m.on("loadstart",function(){var e,n;_&&_!==m.currentSrc()&&g("playbackEnded"),g("setPlayer",m),B.clear(),_=m.currentSrc();var o=$(m.currentType()),r=c.getCurrentVideo(),i=H(r,m,y,f);i[null==y||null===(e=y.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",i[null==y||null===(n=y.Constants)||void 0===n?void 0:n.ASSET_NAME]=K(r,t),i.authToken=p||"NULL",i.streamType=o,i.D2CType=l||"NONE",i.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",i["c3.cm.affiliate"]=a||"NULL",ee.setData(i),g("contentInfo",i)}),m.on("loadedmetadata",function(){var e,n=m.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),m.on("play",function(){B.has(m.currentSrc())||(B.add(m.currentSrc()),g("playbackStarted",null))}),m.on("ended",function(){B.has(m.currentSrc())&&B.delete(m.currentSrc()),g("playbackEnded")}),m.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:m,adsLoader:null==e?void 0:e.adsLoader})}),m.on("dispose",function(){null==B||B.clear(),g("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),ee=(J={},{setData:function(e){J=V(V({},J),e)},getData:function(){return J}}),ne=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-db33fcff.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-2ba328a4.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-d5d4ccea.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-5435286d.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-d0a9df1c.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-26de3085.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-90aa6c9c.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-c06ff1c8.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-0bf9fb6b.js")}).then(function(t){t.initialiseSkin(e,n)})};function te(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 oe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?te(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var re=[],ie=0,le=null;function ae(){console.log("Cleaning up watch history data"),z=null,re=[],ie=0,le=null}function ue(t,o,r){var i,l,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(i=o.watchHistory)||void 0===i||i.apiVersion;var v=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,p=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var m=(null==o||null===(u=o.video)||void 0===u?void 0:u.originalObjectId)||null,g=(null==o||null===(s=o.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,y=Math.floor(t.currentTime()),h=d?100:Math.floor(p/f*100),b={};g?function(e,t,o){var r=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),i=se(r),l=(new Date).getTime(),a=c.getCurrentVideo(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return oe(oe({},e),{},n({},t,u[t]))},{}),d=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===z});d<0?i.push(oe(oe({content:s},e),{},{addedDate:l,updateDate:l})):i[d]=oe(oe(oe({},i[d]),e),{},{updateDate:l});localStorage.setItem("".concat(r),JSON.stringify(i))}(b={completed:d,watchedTime:y,watchedPercentage:h},v,o.siteOwner):(b=oe(oe({videoId:z,watchedTime:y,watchedPercentage:h,doneWatching:d,profileId:v},le&&{seriesId:le}),m&&{originalObjectId:m}),e.saveWatchHistory(b).then(function(e){}).catch(function(e){})),ie=p+r}function se(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function de(e,n,t){var o=se(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var ce=!1,ve=function(n,t){var o,r,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[i])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!ce){var l=pe(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ce=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function pe(e,n,t){if(Array.isArray(e))return e.map(function(e){return pe(e,n,t)});if(null!==e&&"object"===v(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=pe(e[r],n,t)}),o}return e}function fe(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 me(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)?me(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function me(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 ge(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 ye(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ge(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var he=function(n,t,o,r){var i,a,u,d,p,f=r.res,m=r.sres,g=s.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",h=(null==f||null===(i=f[y])||void 0===i?void 0:i.drmEnabled)||!1,w=(null==f||null===(a=f[y])||void 0===a||null===(u=a.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,k=(null==f||null===(d=f[y])||void 0===d||null===(p=d.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(f),c.videoReplayTracker.set(f),g&&(g.on("loadstart",function(){w?o.resolve({status:!0,msg:"Video Loaded",response:f}):o.resolve(ye({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:f}:{response:f}))}),g.on("loadeddata",function(){var o,r,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),k&&"Safari"===e.detectBrowser())try{var u;null==g||null===(u=g.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==g||!g.muted())&&b(n,sessionStorage.getItem("volume")||"100");var d=c.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var v,p,m=ye(ye({},t),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(le=null==n||null===(r=n.series)||void 0===r?void 0:r.id),re=[],ie=0,z=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=s.getPlayer(e);a&&(a.on("dispose",ae),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());re.includes(ie)||(e!=ie||e<l?e>ie&&(ie=e+l):(re.push(e),ue(a,n,l)))}}),a.one("ended",function(){ue(a,n,l,!0)}))}(n,m,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=g&&g.mux){var y,h,w,S,I,O,P=(null===(y=c.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),T=null==P?void 0:P.gist,D={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(I=P.streamingInfo)&&void 0!==I&&I.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};g.mux({debug:!1,data:D})}}),g.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];g.trigger("subtitlechanged",n)}),g.on("subtitlechanged",function(e,n){var t,o,r,i,l,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===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.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)}}),g.tech_.on("retryplaylist",function(){w&&ve(f,n)}),g.on("error",function(){var t,r;(console.log("ERROR",g.error(),g.error().code),4===g.error().code&&w)?ve(f,n):(e.handleError(n,(null==g||null===(t=g.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==g||null===(r=g.error())||void 0===r?void 0:r.message)||"Some error occured",response:f}))}),g.one("play",function(){var e,n,o,r,i;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},p=v.t,f=v.p;p&&f<95&&setTimeout(function(){g.currentTime(p)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){g.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=g&&g.dvrSeekbar)try{g.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),g.on("volumechange",function(){var e=100*g.volume().toFixed(2);g.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),g.on("chromecastDisconnected",function(){if(w){g.currentSource();for(var e=g.textTracks(),n=e.length-1;n>=0;n--)g.removeRemoteTextTrack(e[n])}}),g.one("loadeddata",function(){var n,t=(null==g||null===(n=g.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.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"==v(g.dash)){var o,r,i,l=null==g||null===(o=g.dash)||void 0===o||null===(r=o.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=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")}),u=fe(t);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var d,c=fe(t);try{for(c.s();!(d=c.n()).done;){var p,f,m,y=d.value;if(("Chrome"==e.detectBrowser()||"Edge"==e.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(f=p.userAgent)&&void 0!==f&&f.includes("Macintosh")||!h))&&null!=y&&null!==(m=y.label)&&void 0!==m&&m.includes("5.1"))g.audioTracks().removeTrack(y);else{if("main"==y.kind){y.enabled=!0;break}y.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function be(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function we(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function ke(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).filter(function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n}).map(function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}})}function Se(e,n){var t=s.getPlayer(e);if(t){var o=n.dvrConfig,r=void 0===o?{}:o,i=n.videoId;n.epg;var l=r.playLive,a=r.playFromBegining,u=r.programs;c.setCurrentEpgPrograms(u),t.on("loadeddata",function(){f.checkDvrStartOverEnabled(n)?a?f.playFromBeginningHandler(t,n):l?f.playLiveOrResumeHandler(t,i):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,r=n.videoId,i=n.epg,l=o.buttonConfig,a=void 0===l?{}:l,u=a.watchLive;a.resume;var s=a.startFromBegining,d=r;if(i&&null!=i&&i.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!f.getWatchedTime(d),m=document.querySelector(".vjs-dvr-btn-overlay");m||((m=document.createElement("div")).className="vjs-dvr-btn-overlay");var g=f.getCurrentProgramThumbnail(n);g&&(m.style.backgroundImage="url(".concat(g,")"),m.style.backgroundPosition="center center",m.style.backgroundRepeat="no-repeat",m.style.backgroundSize="cover");m.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,r=t.resume,i=t.startFromBegining,l=n?(null==r?void 0:r.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(l,"</button>"),u='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==i?void 0:i.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}(o,v),m.style.display="flex",e.el().appendChild(m),f.pauseAndHideControl(e),Ie("watch-live-resume-btn",u,function(){f.showControl(e,m),f.playLiveOrResumeHandler(e,d)}),Ie("watch-begining-btn",s,function(){f.showControl(e,m),f.playFromBeginningHandler(e,n)})}(t,n),f.handleLiveStartOverBtn({player:t,showWatchLive:!0,showStartOver:!0})):f.removeDvrStartOver(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),r=!1,i=e.seekable(),l=i.start(0),a=i.end(i.length-1)-l,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",function(){r=!0}),e.on("seeked",function(){r=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}f.saveWatchedTime(s,o),f.getProgramStartTime(e,n),f.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})}),e.on("timeupdate",function(){if(!r){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(f.saveWatchedTime(s,t),o=t,function(e,n){ke(n).forEach(function(t){var o=t.id,r=t.title,i=t.time,l=document.getElementById(o);if(l){var a=Math.min(i/n*100,99.5);l.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=be(o,r,Math.min(i/n*100,99.5));u.appendChild(s)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function Ie(e,n,t){var o,r,i=document.getElementById(e);i&&(r=n,(o=i)&&(o.style.color="".concat((null==r?void 0:r.textColor)||"#000"),o.style.backgroundColor="".concat((null==r?void 0:r.backGroundColor)||"#DCF95B")),i.addEventListener("click",t))}function Oe(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 Pe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Te=function(i,a,d,c){var v,p,f,m,g,y,h,b,w,k,I,O,P,T,D,E,C,j,x,R,L,N,M,V,B,_,H,q,U,F,W,G,K,Y,J,z,X,Q=a.res,$=void 0===Q?null:Q,te=a.sres,oe=void 0===te?null:te,re=null!=d&&d.chromecastReceiverId?["chromecast","html5"]:["html5"],ie=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",le=u.impolicy16x9(null===(p=$)||void 0===p||null===(f=p[ie])||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(g=$)||void 0===g||null===(y=g[ie])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),ae=(null===(w=$)||void 0===w||null===(k=w[ie])||void 0===k||null===(I=k.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,ue=(null===(O=$)||void 0===O||null===(P=O[ie])||void 0===P||null===(T=P.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,se=(null===(D=$)||void 0===D||null===(E=D.ads)||void 0===E||null===(C=E.preRoll)||void 0===C||null===(j=C.adTags)||void 0===j||null===(x=j.web)||void 0===x?void 0:x.active)&&(null===(R=$)||void 0===R||null===(L=R.ads)||void 0===L||null===(N=L.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(V=M.web)||void 0===V?void 0:V.url);$=Pe(Pe({},$),{},{audioAssetSource:null==d?void 0:d.audioAssetSource});var de=(null==d||null===(B=d.customData)||void 0===B?void 0:B.ads)||{},ce=(null===(_=$)||void 0===_||null===(H=_[ie])||void 0===H?void 0:H.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==de?void 0:de.vodAdSticherProvider)||!1,ve=(null==d?void 0:d.latency)||6,pe=(null==d?void 0:d.skin_settings)||{};null==d||d.dvrConfig;var fe=(z={enableSmoothSeeking:!0,controls:0!=(null==d?void 0:d.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==d?void 0:d.muted)||!1,autoplay:(null==d?void 0:d.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==pe?void 0:pe.pictureInPictureToggle)||!1},playbackRates:null!=pe&&pe.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==d.skin,liveui:ae},n(z,"autoplay",null==d?void 0:d.autoplay),n(z,"normalizeAutoplay",(null==d?void 0:d.autoplay)&&!se),n(z,"loop",(null==d?void 0:d.loop)||!1),n(z,"audioPosterMode",null==d?void 0:d.audioPosterMode),n(z,"html5",Pe(Pe({dash:Pe(Pe(Pe({},!r.browser.IS_SAFARI&&{useTTML:!0}),(null==d?void 0:d.debugConfig)&&(null==d||null===(q=d.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=d&&null!==(U=d.debugConfig)&&void 0!==U&&U.logLevel?null==d||null===(F=d.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ve},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:Pe(Pe({},(null==d?void 0:d.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==d?void 0:d.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!1,droppedFramesRule:!0}})}}}),vhs:Pe(Pe(Pe({},(null==d?void 0:d.initialBandwidth)&&{bandwidth:d.initialBandwidth}),{},{liveRangeSafeTimeDelta:ve,useDevicePixelRatio:!0,experimentalLLHLS:(null==d?void 0:d.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==d||null===(W=d.customData)||void 0===W?void 0:W.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(G=null==d?void 0:d.enableLowInitialPlaylist)||void 0===G||G}),debug:(null==d?void 0:d.debugConfig)&&(null==d||null===(K=d.debugConfig)||void 0===K?void 0:K.enable)||!1,nativeTextTracks:"Safari"==e.detectBrowser()},0==(null==d||null===(Y=d.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==d||null===(J=d.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(z,"poster",le),n(z,"techOrder",re),n(z,"chromecast",{requestCustomDataFn:function(e){var n,t,o=s.getPlayer(i),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),l=function(e,n,t){var o,r,i,l,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,S;f.isDrmEnabled=!0;var I=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(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=O;var P=(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===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);f.licenseToken=P}var T=(null==e||null===(o=e[p])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";f.contentType=T;var D=null==e||null===(i=e[p])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;f.duration=D;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 C=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=C,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}($,e,r);return Pe(Pe({},l),{},{convivaMetaData:Pe({customerKey:(null==d||null===(n=d.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==d||null===(t=d.convivaConfig)||void 0===t?void 0:t.debug)||!1},ee.getData())})},modifyLoadRequestFn:function(e){var n,t,o,r,l,a=s.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[ie])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(r=o.videoAssets)||void 0===r?void 0:r.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),z);if(!r.getPlayers()[i]){null!=d&&d.debugConfig&&null!=d&&null!==(X=d.debugConfig)&&void 0!==X&&X.enable&&r.log.level("debug");var me=r(i,fe,function(){var n=t(o.mark(function n(){var t,a,u,s,v,p,f,m,g,y,h,b,w,k,I,O,P,T,D,E,C;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(me),console.log(r.VERSION),console.log(r.getPlugins()),n.next=5,A(d,$);case 5:if(w=null===(t=$)||void 0===t||null===(a=t[ie])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,ue&&c.resolve(Pe({status:!0,msg:"Player Initialised"},oe?{seriesResponse:oe,response:$}:{response:$})),ae&&null!=d&&null!==(s=d.dvrConfig)&&void 0!==s&&s.enable&&Se(i,Pe(Pe({},d),{},{isDvrEnabled:ae})),e.inititateBeacon(i,null==d?void 0:d.analyticsCb,null==d?void 0:d.customData),Z(i,d),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),ae&&S(i,w),!se||null!=d&&null!==(v=d.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(i,se,$),k=e.getSource($,i),console.log(k),null!=d&&d.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,d.nearestClusterUrl)),!ce){n.next=21;break}return n.next=20,e.getSGAIEnabledSource(i,$);case 20:k=n.sent;case 21:k?e.loadVideo(i,k):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=$)||void 0===p||null===(f=p[ie])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=$)||void 0===y||null===(h=y[ie])||void 0===h||null===(b=h.closedCaptions)||void 0===b?void 0:b.length)>0)&&(C=(null===(O=$)||void 0===O||null===(P=O[ie])||void 0===P||null===(T=P.contentDetails)||void 0===T?void 0:T.closedCaptions)||(null===(D=$)||void 0===D||null===(E=D[ie])||void 0===E?void 0:E.closedCaptions),I=C.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),l.addCaptions(i,I)),null!=d&&d.disableControls?e.disableControls(i):ne(i,Pe(Pe(Pe({},d),fe),{},{liveVideo:ue,isDvrEnabled:ae,res:$,sres:oe})),he(i,Pe(Pe(Pe({},d),fe),{},{liveVideo:ue}),c,{res:$,sres:oe});case 25:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function De(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 Ee(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Ce=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=je(e);Te(r,{res:i},e,{resolve:t,reject:o})},je=function(n){var t,o,r,i,l,a,u,s,d,c,v,p=null==n?void 0:n.streamingInfo,f=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,g=(null==n||null===(o=n.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,y=(null==n||null===(r=n.streamingInfo)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.url)||null,h=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,b=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],w=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,k=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],S=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,I=null==n?void 0:n.token,O=e.getDecodedToken(I);null==O||O.site;var P=null==O?void 0:O.siteId;return Ee(Ee({id:"".concat(P,"_external")},!g&&{directPlaybackUrl:null==f?void 0:f.url}),{},{video:Ee(Ee({drmEnabled:g,streamingInfo:Ee({videoAssets:Ee(Ee({},w&&{drmProvider:w}),{},{widevine:null==f?void 0:f.widevine,fairPlay:null==f?void 0:f.fairPlay,playReady:null==f?void 0:f.playReady})},(null==p?void 0:p.isDvrEnabled)&&{isLiveStream:!0})},S&&{isSSAIEnabled:S}),{},{metadata:k,liveDetails:{isDvrEnabled:null==p?void 0:p.isDvrEnabled},gist:Ee({},h&&{videoImageUrl:h}),contentDetails:Ee({},(null==b?void 0:b.length)>0&&{closedCaptions:m(b)})}),ads:{preRoll:{adTags:{web:Ee(Ee({},y&&{active:!0}),y&&{url:y})}}}})},xe=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)),r=o>0&&t>4?o:0,i=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[i>0&&r>0?i:0,r,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},Re=function(e){var n,t=g(e,8),o=t[0],r=t[1],i=t[2],l=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):r>=1?" ".concat(r," month"):i>=1?" ".concat(i," week"):l>=1?" ".concat(l," 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 Le(e,n,t,o){if(e){var r=function(){var r=e-Date.now();if(r/1e3<=0)return clearInterval(i),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var l=xe(r,e);null==n||n([].concat(m(l),[o]))};r();var i=setInterval(r,1e3);return i}}var Ae,Ne=function(e,n,t){var o,r,i,l,a,u,s,c,v,p=null==n||null===(o=n.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,f=(null==n||null===(i=n.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.errorMessage)||(null==n?void 0:n.message)||null,m=Date.now(),g=null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,y=m-(null==n||null===(s=n.response)||void 0===s||null===(c=s.data)||void 0===c?void 0:c.scheduleEndDate);if(m-g<0?v=d.getLocalisation("eventNotStarted")||f||"Game starts in":(y>0||"VIDEO_NOT_EXISTS"==p)&&(v=d.getLocalisation("eventEnded")||f||"Game has ended"),document.getElementsByClassName("error-container")[0]){var h=document.getElementsByClassName("error-message")[0];h&&(h.textContent="".concat(v));var b=document.getElementsByClassName("error-timer-message")[0];b&&Le(Math.abs(g),Re,t,b)}else{var w=document.getElementById(e).parentElement;if(w){var k=document.createElement("div");k.className="error-container";var S=document.createElement("div");S.className="error-message";var I=document.createElement("div");I.className="error-timer-message",S.textContent="".concat(v),k.appendChild(S),k.appendChild(I),w.append(k),Le(Math.abs(g),Re,t,I)}}};function Me(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=t(o.mark(function n(t,r){var i,l,a,u,s,d,v,p,f;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.resolve,u=r.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:p=n.sent,f=!1===(null==t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,p,f).then(function(n){var o,r,i,l;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(r=o.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(null==n?void 0:n.data);var f,m=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.enable&&!v)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var g,y,h,b=de((null===(g=t.watchHistory)||void 0===g?void 0:g.profileId)||"",s,null==t?void 0:t.siteOwner);if(b&&b.length)t.watchHistoryResumeTime=(null===(y=b[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(h=b[0])||void 0===h?void 0:h.watchedPercentage)||null;m.contentType="video",Te(d,{res:m},t,{resolve:a,reject:u})}else e.getVideoInfo(s,p).then(function(e){var n,o,r,i,l,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,m.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Te(d,{res:m},t,{resolve:a,reject:u})});else Te(d,{res:m},t,{resolve:a,reject:u})}).catch(function(n){var o,r,i=(null==t||null===(o=t.event)||void 0===o?void 0:o.showScheduleTimer)||!1,l=(null==t||null===(r=t.event)||void 0===r?void 0:r.onCountdownComplete)||null;i&&Ne(d,n,l),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Be(e,n){return _e.apply(this,arguments)}function _e(){return(_e=t(o.mark(function n(t,r){var i,l,a,u,s,d,c,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.resolve,u=r.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Te(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function He(e,n){return qe.apply(this,arguments)}function qe(){return(qe=t(o.mark(function n(t,r){var i,l,a,u,s,d,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=r.resolve,a=r.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(d)),v=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(v,u).then(function(n){var o,r,i,d=n.data,p=n.data.seasons;c.setCurrentSeries(p);var f=videoId||(null==p||null===(o=p[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(v,u),e.getVideoDetails(f,u).then(function(e){var n,o,r;window.contentType=null==e||null===(n=e.data)||void 0===n||null===(o=n.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,c.setCurrentVideo(e.data),Te(s,{res:null==e?void 0:e.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ue(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 Fe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ue(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=t(o.mark(function t(r,i){var l,a,s,c,v,p,f,m,g,h,b,w,k,S,I,O,P,T,D,E,C,x,R,L,A;return o.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(k=(null==n?void 0:n.videoSourceUrl)||!1,S=null==n?void 0:n.asat,I=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,O=null==n?void 0:n.videoId,P=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,T=(null==n?void 0:n.streamingInfo)||!1,window.videoId=O,D=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",D),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),D&&!e.isTokenExpired(D)){t.next=16;break}return i({status:!1,msg:"".concat(D?"Token is expired !":"Missing Authorization Token"),response:{token:D}}),t.abrupt("return");case 16:Ae=JSON.parse(atob(D.split(".")[1]));case 17:return window.siteName=null===(s=Ae)||void 0===s?void 0:s.site,window.siteId=null===(c=Ae)||void 0===c?void 0:c.siteId,n.isAnonymousUser=!(null===(v=Ae)||void 0===v||!v.anonymousId),n.siteOwner=(null===(p=Ae)||void 0===p?void 0:p.site)||null,n.userId=(null===(f=Ae)||void 0===f?void 0:f.userId)||null,window.sessionStorage.setItem("uid",null===(m=Ae)||void 0===m?void 0:m.userId),window.watchHistory=n.watchHistory||null,E=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,C=(null==n||null===(h=n.analytics)||void 0===h?void 0:h.gaId)||null,(x=null==n?void 0:n.errors)&&(window.customErrors=x),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=35,j(n);case 35:C&&y("https://www.googletagmanager.com/gtag/js?id=".concat(C)).then(function(){return e.runGtag(C)}).catch(function(e){}),(R=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(E)))&&R.addEventListener("contextmenu",function(e){return e.preventDefault()}),k?(A={directPlaybackUrl:k,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},S?e.getVideoDetails(L,D).then(function(e){var t=(null==e?void 0:e.data)||{};Te(E,{res:Fe(Fe({},t),A)},n,{resolve:r,reject:i})}).catch(function(n){e.initiateErrorHandling(n,E,i,L)}):Te(E,{res:A},n,{resolve:r,reject:i})):T?Ce(n,{resolve:r,reject:i}):P?He(n,{resolve:r,reject:i}):I?Be(n,{resolve:r,reject:i}):Me(n,{resolve:r,reject:i});case 39:case"end":return t.stop()}},t)}));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:a.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:e.adsQueuePointManager,getSsaiEvents:e.getSsaiEvents,playerEvents:i.playerEvents,onReplay:i.onReplay,isBehindLive:e.isBehindLive}},exports.initiateMarker=function(e){var n=s.getPlayer(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var r=t.start(0),i=t.end(t.length-1)-r;we(),ke(i).forEach(function(e){var n=e.id,t=e.title,r=e.time,l=be(n,t,Math.min(r/i*100,99.5));o.appendChild(l)})}},exports.removeMarkers=we;
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-82357fa8.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),r=require("video.js"),i=require("./util-474e412e.js"),l=require("./captions-68e263dd.js"),a=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),s=require("./player_instance-fcf6a8fb.js"),d=require("./localisation-56e0a999.js"),c=require("./currentVideoInfo-5802821b.js"),v=require("@babel/runtime/helpers/typeof"),p=require("./icons-2609dbe4.js"),f=require("./helper-dbf2fb22.js"),m=require("@babel/runtime/helpers/toConsumableArray"),g=require("@babel/runtime/helpers/slicedToArray"),y=function(e){return new Promise(function(n,t){if(h(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)}})},h=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},b=function(e,n,t){var o=s.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),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,"'")})},w=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},k=function(){var n=t(o.mark(function n(t){var i,l,a,u,d;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=s.getPlayer(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),console.log("Error",n.t0);case 10:if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(r),(d=r.getTech("chromecast"))&&!d.prototype.seeking&&(d.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e.detectBrowser()?null==a||a.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}},n,null,[[2,7]])}));return function(e){return n.apply(this,arguments)}}(),S=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=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===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*s,v.seek()}})};var I=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),y("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)}}(),O=function(){var n=t(o.mark(function n(){return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),P=function(){var e=t(o.mark(function e(){return o.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){r.getPlugin("eme")||r.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),T=function(){var e=t(o.mark(function e(){var n;return o.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(r),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)}}(),D=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-96485ab1.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)}}(),E=function(){var e=t(o.mark(function e(){return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-4bac123d.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)}}(),C=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){y("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(r)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(r)})},loadAdsLibrary:I,loadEMELibrary:P,loadMuxPlugin:T,loadDvrSeekbar:D,loadContribDash:E,loadComscorePlugin:O});function j(e){return x.apply(this,arguments)}function x(){return(x=t(o.mark(function n(t){var r,i,l;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=(null==t?void 0:t.airplay)||!1,n.next=3,I();case 3:r&&"Safari"==e.detectBrowser()?Promise.resolve().then(function(){return C}).then(function(e){e.importAirplay()}):(l=(null===(i=document)||void 0===i?void 0:i.getElementById(null==t?void 0:t.playerId))||null)&&l.setAttribute("x-webkit-airplay","deny");case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function R(e){return L.apply(this,arguments)}function L(){return(L=t(o.mark(function e(n){var t,r,i,l,a,u;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=s.getPlayer(n.playerId),e.next=3,O();case 3:u.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(r=n.comscore)||void 0===r?void 0:r.endpoint,implementationId:null==n||null===(i=n.comscore)||void 0===i?void 0:i.implementationId,projectId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.projectId,debug:(null==n||null===(a=n.comscore)||void 0===a?void 0:a.debug)||!1});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e,n){return N.apply(this,arguments)}function N(){return(N=t(o.mark(function n(t,r){var i,l,a,u,s,d,c,v,p,f,m,g,y,h;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return p=(null==r?void 0:r.contentType)||"video",f=null==r||null===(i=r[p])||void 0===i?void 0:i.drmEnabled,null==r||null===(l=r[p])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==t||t.showPositiveSeekbar,m=(null==r||null===(u=r[p])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.dash)||null,g=(null==t||null===(c=t.comscore)||void 0===c?void 0:c.enable)||!1,y=!(null==t||null===(v=t.analytics)||void 0===v||!v.muxKey),n.prev=7,n.next=10,Promise.allSettled([f?"Safari"==e.detectBrowser()?P():"caliente"!=(null===(h=window)||void 0===h?void 0:h.siteName)?E():P():"Safari"!=e.detectBrowser()&&m?E():null,g?R(t):null,y?T():null,k(t)]);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(7),console.log("Error",n.t0);case 15:case"end":return n.stop()}},n,null,[[7,12]])}))).apply(this,arguments)}function M(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 V(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?M(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):M(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var B=new Set,_=null,H=function(n,t,o,r){var i,l,a,u,s,d,v,p={},f=(null==n?void 0:n.contentType)||"video";p["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",p["c3.cm.contentType"]=Y(n),p[null==o||null===(l=o.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),p[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),p[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),p["c3.cm.categoryType"]=W(n),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===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(d=n[f])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[o.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=G(n),p["c3.cm.genreList"]=U(n),p["c3.cm.genre"]=q(n),p["c3.cm.channel"]=F(n,r);var m=X(c.getCurrentSeries(),n);return p=V(V({},p),m)},q=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},U=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"},F=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null===(o=((null==e||null===(t=e[r])||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"},W=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"},G=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},K=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Y=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var J,z,X=function(n,t){var o,r,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(o=t.video)||void 0===o||null===(r=o.series)||void 0===r?void 0:r.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(i=n[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Q=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"}},$=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Z=function(){var e=t(o.mark(function e(n,t){var r,i,l,a,u,d,v,p,f,m,g,y;return o.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(null==t?void 0:t.convivaConfig)||{},i=r.trackConvivaPlayerEvent,l=r.paymentHandler,a=r.tveProvider,u=r.enable,d=r.appName,p=(v=t||{}).token,f=v.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(m=s.getPlayer(n),"function"==typeof(g=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,g("getConvivaObject");case 10:if(y=e.sent){e.next=13;break}return e.abrupt("return");case 13:m.ready(function(){var e=m.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Q(t.keySystem);g("contentInfo",{DRMEnabled:o})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),m.on("loadstart",function(){var e,n;_&&_!==m.currentSrc()&&g("playbackEnded"),g("setPlayer",m),B.clear(),_=m.currentSrc();var o=$(m.currentType()),r=c.getCurrentVideo(),i=H(r,m,y,f);i[null==y||null===(e=y.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",i[null==y||null===(n=y.Constants)||void 0===n?void 0:n.ASSET_NAME]=K(r,t),i.authToken=p||"NULL",i.streamType=o,i.D2CType=l||"NONE",i.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",i["c3.cm.affiliate"]=a||"NULL",ee.setData(i),g("contentInfo",i)}),m.on("loadedmetadata",function(){var e,n=m.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),m.on("play",function(){B.has(m.currentSrc())||(B.add(m.currentSrc()),g("playbackStarted",null))}),m.on("ended",function(){B.has(m.currentSrc())&&B.delete(m.currentSrc()),g("playbackEnded")}),m.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:m,adsLoader:null==e?void 0:e.adsLoader})}),m.on("dispose",function(){null==B||B.clear(),g("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),ee=(J={},{setData:function(e){J=V(V({},J),e)},getData:function(){return J}}),ne=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-3b99aa6d.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-a1ce9ae5.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-33bdf91d.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-5972e125.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-8acc727d.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-8f3d874a.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-ffb2e11b.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-5a5f9f06.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&Promise.resolve().then(function(){return require("./skin-b43f0323.js")}).then(function(t){t.initialiseSkin(e,n)})};function te(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 oe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?te(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var re=[],ie=0,le=null;function ae(){console.log("Cleaning up watch history data"),z=null,re=[],ie=0,le=null}function ue(t,o,r){var i,l,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(i=o.watchHistory)||void 0===i||i.apiVersion;var v=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,p=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var m=(null==o||null===(u=o.video)||void 0===u?void 0:u.originalObjectId)||null,g=(null==o||null===(s=o.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,y=Math.floor(t.currentTime()),h=d?100:Math.floor(p/f*100),b={};g?function(e,t,o){var r=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),i=se(r),l=(new Date).getTime(),a=c.getCurrentVideo(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return oe(oe({},e),{},n({},t,u[t]))},{}),d=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===z});d<0?i.push(oe(oe({content:s},e),{},{addedDate:l,updateDate:l})):i[d]=oe(oe(oe({},i[d]),e),{},{updateDate:l});localStorage.setItem("".concat(r),JSON.stringify(i))}(b={completed:d,watchedTime:y,watchedPercentage:h},v,o.siteOwner):(b=oe(oe({videoId:z,watchedTime:y,watchedPercentage:h,doneWatching:d,profileId:v},le&&{seriesId:le}),m&&{originalObjectId:m}),e.saveWatchHistory(b).then(function(e){}).catch(function(e){})),ie=p+r}function se(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function de(e,n,t){var o=se(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var ce=!1,ve=function(n,t){var o,r,i=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[i])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!ce){var l=pe(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ce=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function pe(e,n,t){if(Array.isArray(e))return e.map(function(e){return pe(e,n,t)});if(null!==e&&"object"===v(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=pe(e[r],n,t)}),o}return e}function fe(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 me(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)?me(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function me(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 ge(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 ye(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ge(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var he=function(n,t,o,r){var i,a,u,d,p,f=r.res,m=r.sres,g=s.getPlayer(n),y=(null==f?void 0:f.contentType)||"video",h=(null==f||null===(i=f[y])||void 0===i?void 0:i.drmEnabled)||!1,w=(null==f||null===(a=f[y])||void 0===a||null===(u=a.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,k=(null==f||null===(d=f[y])||void 0===d||null===(p=d.liveDetails)||void 0===p?void 0:p.isDvrEnabled)||!1;c.setCurrentVideo(f),c.videoReplayTracker.set(f),g&&(g.on("loadstart",function(){w?o.resolve({status:!0,msg:"Video Loaded",response:f}):o.resolve(ye({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:f}:{response:f}))}),g.on("loadeddata",function(){var o,r,i,a=l.getCaptions(n);if(null==a||a.map(function(e){return l.disableCaptions(n,e.id)}),k&&"Safari"===e.detectBrowser())try{var u;null==g||null===(u=g.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==g||!g.muted())&&b(n,sessionStorage.getItem("volume")||"100");var d=c.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var v,p,m=ye(ye({},t),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(le=null==n||null===(r=n.series)||void 0===r?void 0:r.id),re=[],ie=0,z=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=s.getPlayer(e);a&&(a.on("dispose",ae),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());re.includes(ie)||(e!=ie||e<l?e>ie&&(ie=e+l):(re.push(e),ue(a,n,l)))}}),a.one("ended",function(){ue(a,n,l,!0)}))}(n,m,null==d||null===(v=d.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(i=t.analytics)&&void 0!==i&&i.muxKey&&null!=g&&g.mux){var y,h,w,S,I,O,P=(null===(y=c.getCurrentVideo())||void 0===y?void 0:y.video)||(null==f?void 0:f.video),T=null==P?void 0:P.gist,D={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==P||null===(S=P.series)||void 0===S?void 0:S.title,video_stream_type:null!=P&&null!==(I=P.streamingInfo)&&void 0!==I&&I.isLiveStream?"live":"video",viewer_user_id:null==t||null===(O=t.analytics)||void 0===O?void 0:O.userId};g.mux({debug:!1,data:D})}}),g.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];g.trigger("subtitlechanged",n)}),g.on("subtitlechanged",function(e,n){var t,o,r,i,l,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===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.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)}}),g.tech_.on("retryplaylist",function(){w&&ve(f,n)}),g.on("error",function(){var t,r;(console.log("ERROR",g.error(),g.error().code),4===g.error().code&&w)?ve(f,n):(e.handleError(n,(null==g||null===(t=g.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==g||null===(r=g.error())||void 0===r?void 0:r.message)||"Some error occured",response:f}))}),g.one("play",function(){var e,n,o,r,i;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=c.getCurrentVideo())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=c.getSeriesWatchMap(),v=(null==d?void 0:d.get(s))||{t:0,p:0},p=v.t,f=v.p;p&&f<95&&setTimeout(function(){g.currentTime(p)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){g.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=g&&g.dvrSeekbar)try{g.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),g.on("volumechange",function(){var e=100*g.volume().toFixed(2);g.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),g.on("chromecastDisconnected",function(){if(w){g.currentSource();for(var e=g.textTracks(),n=e.length-1;n>=0;n--)g.removeRemoteTextTrack(e[n])}}),g.one("loadeddata",function(){var n,t=(null==g||null===(n=g.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.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"==v(g.dash)){var o,r,i,l=null==g||null===(o=g.dash)||void 0===o||null===(r=o.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=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")}),u=fe(t);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var d,c=fe(t);try{for(c.s();!(d=c.n()).done;){var p,f,m,y=d.value;if(("Chrome"==e.detectBrowser()||"Edge"==e.detectBrowser()&&(null!==(p=navigator)&&void 0!==p&&null!==(f=p.userAgent)&&void 0!==f&&f.includes("Macintosh")||!h))&&null!=y&&null!==(m=y.label)&&void 0!==m&&m.includes("5.1"))g.audioTracks().removeTrack(y);else{if("main"==y.kind){y.enabled=!0;break}y.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function be(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function we(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function ke(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(c.getCurrentEpgPrograms()||[]).filter(function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n}).map(function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}})}function Se(e,n){var t=s.getPlayer(e);if(t){var o=n.dvrConfig,r=void 0===o?{}:o,i=n.videoId;n.epg;var l=r.playLive,a=r.playFromBegining,u=r.programs;c.setCurrentEpgPrograms(u),t.on("loadeddata",function(){f.checkDvrStartOverEnabled(n)?a?f.playFromBeginningHandler(t,n):l?f.playLiveOrResumeHandler(t,i):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,r=n.videoId,i=n.epg,l=o.buttonConfig,a=void 0===l?{}:l,u=a.watchLive;a.resume;var s=a.startFromBegining,d=r;if(i&&null!=i&&i.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!f.getWatchedTime(d),m=document.querySelector(".vjs-dvr-btn-overlay");m||((m=document.createElement("div")).className="vjs-dvr-btn-overlay");var g=f.getCurrentProgramThumbnail(n);g&&(m.style.backgroundImage="url(".concat(g,")"),m.style.backgroundPosition="center center",m.style.backgroundRepeat="no-repeat",m.style.backgroundSize="cover");m.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,r=t.resume,i=t.startFromBegining,l=n?(null==r?void 0:r.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(p.watchLiveIcon2()," ").concat(l,"</button>"),u='<button id="watch-begining-btn">'.concat(p.startLiveIcon()," ").concat((null==i?void 0:i.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(u,"</div>")}(o,v),m.style.display="flex",e.el().appendChild(m),f.pauseAndHideControl(e),Ie("watch-live-resume-btn",u,function(){f.showControl(e,m),f.playLiveOrResumeHandler(e,d)}),Ie("watch-begining-btn",s,function(){f.showControl(e,m),f.playFromBeginningHandler(e,n)})}(t,n),f.handleLiveStartOverBtn({player:t,showWatchLive:!0,showStartOver:!0})):f.removeDvrStartOver(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),r=!1,i=e.seekable(),l=i.start(0),a=i.end(i.length-1)-l,u=JSON.parse(sessionStorage.getItem("epgConfig")),s=t,d=!0;if(u&&null!=u&&u.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==u?void 0:u.programId),s=null==u?void 0:u.programId}e.on("seeking",function(){r=!0}),e.on("seeked",function(){r=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;s="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}f.saveWatchedTime(s,o),f.getProgramStartTime(e,n),f.handleLiveStartOverBtn({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})}),e.on("timeupdate",function(){if(!r){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");s="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(f.saveWatchedTime(s,t),o=t,function(e,n){ke(n).forEach(function(t){var o=t.id,r=t.title,i=t.time,l=document.getElementById(o);if(l){var a=Math.min(i/n*100,99.5);l.style.left="".concat(a,"%")}else{var u=e.controlBar.progressControl.seekBar.el(),s=be(o,r,Math.min(i/n*100,99.5));u.appendChild(s)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function Ie(e,n,t){var o,r,i=document.getElementById(e);i&&(r=n,(o=i)&&(o.style.color="".concat((null==r?void 0:r.textColor)||"#000"),o.style.backgroundColor="".concat((null==r?void 0:r.backGroundColor)||"#DCF95B")),i.addEventListener("click",t))}function Oe(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 Pe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Te=function(i,a,d,c){var v,p,f,m,g,y,h,b,w,k,I,O,P,T,D,E,C,j,x,R,L,N,M,V,B,_,H,q,U,F,W,G,K,Y,J,z,X,Q=a.res,$=void 0===Q?null:Q,te=a.sres,oe=void 0===te?null:te,re=null!=d&&d.chromecastReceiverId?["chromecast","html5"]:["html5"],ie=(null===(v=$)||void 0===v?void 0:v.contentType)||"video",le=u.impolicy16x9(null===(p=$)||void 0===p||null===(f=p[ie])||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(g=$)||void 0===g||null===(y=g[ie])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),ae=(null===(w=$)||void 0===w||null===(k=w[ie])||void 0===k||null===(I=k.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,ue=(null===(O=$)||void 0===O||null===(P=O[ie])||void 0===P||null===(T=P.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,se=(null===(D=$)||void 0===D||null===(E=D.ads)||void 0===E||null===(C=E.preRoll)||void 0===C||null===(j=C.adTags)||void 0===j||null===(x=j.web)||void 0===x?void 0:x.active)&&(null===(R=$)||void 0===R||null===(L=R.ads)||void 0===L||null===(N=L.preRoll)||void 0===N||null===(M=N.adTags)||void 0===M||null===(V=M.web)||void 0===V?void 0:V.url);$=Pe(Pe({},$),{},{audioAssetSource:null==d?void 0:d.audioAssetSource});var de=(null==d||null===(B=d.customData)||void 0===B?void 0:B.ads)||{},ce=(null===(_=$)||void 0===_||null===(H=_[ie])||void 0===H?void 0:H.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==de?void 0:de.vodAdSticherProvider)||!1,ve=(null==d?void 0:d.latency)||6,pe=(null==d?void 0:d.skin_settings)||{};null==d||d.dvrConfig;var fe=(z={enableSmoothSeeking:!0,controls:0!=(null==d?void 0:d.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==d?void 0:d.muted)||!1,autoplay:(null==d?void 0:d.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==pe?void 0:pe.pictureInPictureToggle)||!1},playbackRates:null!=pe&&pe.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==d.skin,liveui:ae},n(z,"autoplay",null==d?void 0:d.autoplay),n(z,"normalizeAutoplay",(null==d?void 0:d.autoplay)&&!se),n(z,"loop",(null==d?void 0:d.loop)||!1),n(z,"audioPosterMode",null==d?void 0:d.audioPosterMode),n(z,"html5",Pe(Pe({dash:Pe(Pe(Pe({},!r.browser.IS_SAFARI&&{useTTML:!0}),(null==d?void 0:d.debugConfig)&&(null==d||null===(q=d.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=d&&null!==(U=d.debugConfig)&&void 0!==U&&U.logLevel?null==d||null===(F=d.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ve},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:Pe(Pe({},(null==d?void 0:d.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==d?void 0:d.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}})}}}),vhs:Pe(Pe(Pe({},(null==d?void 0:d.initialBandwidth)&&{bandwidth:d.initialBandwidth}),{},{liveRangeSafeTimeDelta:ve,useDevicePixelRatio:!0,experimentalLLHLS:(null==d?void 0:d.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==d||null===(W=d.customData)||void 0===W?void 0:W.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(G=null==d?void 0:d.enableLowInitialPlaylist)||void 0===G||G}),debug:(null==d?void 0:d.debugConfig)&&(null==d||null===(K=d.debugConfig)||void 0===K?void 0:K.enable)||!1,nativeTextTracks:"Safari"==e.detectBrowser()},0==(null==d||null===(Y=d.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==d||null===(J=d.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(z,"poster",le),n(z,"techOrder",re),n(z,"chromecast",{requestCustomDataFn:function(e){var n,t,o=s.getPlayer(i),r=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),l=function(e,n,t){var o,r,i,l,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,S;f.isDrmEnabled=!0;var I=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(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=O;var P=(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===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);f.licenseToken=P}var T=(null==e||null===(o=e[p])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";f.contentType=T;var D=null==e||null===(i=e[p])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;f.duration=D;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 C=null==e||null===(s=e[p])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=C,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}($,e,r);return Pe(Pe({},l),{},{convivaMetaData:Pe({customerKey:(null==d||null===(n=d.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==d||null===(t=d.convivaConfig)||void 0===t?void 0:t.debug)||!1},ee.getData())})},modifyLoadRequestFn:function(e){var n,t,o,r,l,a=s.getPlayer(i),u=(null==a?void 0:a.currentSource())||{};!(null===(n=$)||void 0===n||null===(t=n[ie])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(r=o.videoAssets)||void 0===r?void 0:r.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),z);if(!r.getPlayers()[i]){null!=d&&d.debugConfig&&null!=d&&null!==(X=d.debugConfig)&&void 0!==X&&X.enable&&r.log.level("debug");var me=r(i,fe,function(){var n=t(o.mark(function n(){var t,a,u,s,v,p,f,m,g,y,h,b,w,k,I,O,P,T,D,E,C;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(me),console.log(r.VERSION),console.log(r.getPlugins()),n.next=5,A(d,$);case 5:if(w=null===(t=$)||void 0===t||null===(a=t[ie])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,ue&&c.resolve(Pe({status:!0,msg:"Player Initialised"},oe?{seriesResponse:oe,response:$}:{response:$})),ae&&null!=d&&null!==(s=d.dvrConfig)&&void 0!==s&&s.enable&&Se(i,Pe(Pe({},d),{},{isDvrEnabled:ae})),e.inititateBeacon(i,null==d?void 0:d.analyticsCb,null==d?void 0:d.customData),Z(i,d),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),ae&&S(i,w),!se||null!=d&&null!==(v=d.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(i,se,$),k=e.getSource($,i),console.log(k),null!=d&&d.nearestClusterUrl&&(k=e.getUpdatedClusterSource(k,d.nearestClusterUrl)),!ce){n.next=21;break}return n.next=20,e.getSGAIEnabledSource(i,$);case 20:k=n.sent;case 21:k?e.loadVideo(i,k):(c.reject({status:!1,msg:"Incompatible / Missing Source",response:$}),e.handleError(i,"Incompatible / Missing Source")),((null===(p=$)||void 0===p||null===(f=p[ie])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=$)||void 0===y||null===(h=y[ie])||void 0===h||null===(b=h.closedCaptions)||void 0===b?void 0:b.length)>0)&&(C=(null===(O=$)||void 0===O||null===(P=O[ie])||void 0===P||null===(T=P.contentDetails)||void 0===T?void 0:T.closedCaptions)||(null===(D=$)||void 0===D||null===(E=D[ie])||void 0===E?void 0:E.closedCaptions),I=C.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),l.addCaptions(i,I)),null!=d&&d.disableControls?e.disableControls(i):ne(i,Pe(Pe(Pe({},d),fe),{},{liveVideo:ue,isDvrEnabled:ae,res:$,sres:oe})),he(i,Pe(Pe(Pe({},d),fe),{},{liveVideo:ue}),c,{res:$,sres:oe});case 25:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function De(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 Ee(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}var Ce=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=je(e);Te(r,{res:i},e,{resolve:t,reject:o})},je=function(n){var t,o,r,i,l,a,u,s,d,c,v,p=null==n?void 0:n.streamingInfo,f=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,g=(null==n||null===(o=n.streamingInfo)||void 0===o?void 0:o.isDrmEnabled)||null,y=(null==n||null===(r=n.streamingInfo)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.url)||null,h=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,b=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],w=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,k=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],S=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,I=null==n?void 0:n.token,O=e.getDecodedToken(I);null==O||O.site;var P=null==O?void 0:O.siteId;return Ee(Ee({id:"".concat(P,"_external")},!g&&{directPlaybackUrl:null==f?void 0:f.url}),{},{video:Ee(Ee({drmEnabled:g,streamingInfo:Ee({videoAssets:Ee(Ee({},w&&{drmProvider:w}),{},{widevine:null==f?void 0:f.widevine,fairPlay:null==f?void 0:f.fairPlay,playReady:null==f?void 0:f.playReady})},(null==p?void 0:p.isDvrEnabled)&&{isLiveStream:!0})},S&&{isSSAIEnabled:S}),{},{metadata:k,liveDetails:{isDvrEnabled:null==p?void 0:p.isDvrEnabled},gist:Ee({},h&&{videoImageUrl:h}),contentDetails:Ee({},(null==b?void 0:b.length)>0&&{closedCaptions:m(b)})}),ads:{preRoll:{adTags:{web:Ee(Ee({},y&&{active:!0}),y&&{url:y})}}}})},xe=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)),r=o>0&&t>4?o:0,i=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[i>0&&r>0?i:0,r,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},Re=function(e){var n,t=g(e,8),o=t[0],r=t[1],i=t[2],l=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):r>=1?" ".concat(r," month"):i>=1?" ".concat(i," week"):l>=1?" ".concat(l," 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 Le(e,n,t,o){if(e){var r=function(){var r=e-Date.now();if(r/1e3<=0)return clearInterval(i),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var l=xe(r,e);null==n||n([].concat(m(l),[o]))};r();var i=setInterval(r,1e3);return i}}var Ae,Ne=function(e,n,t){var o,r,i,l,a,u,s,c,v,p=null==n||null===(o=n.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,f=(null==n||null===(i=n.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.errorMessage)||(null==n?void 0:n.message)||null,m=Date.now(),g=null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,y=m-(null==n||null===(s=n.response)||void 0===s||null===(c=s.data)||void 0===c?void 0:c.scheduleEndDate);if(m-g<0?v=d.getLocalisation("eventNotStarted")||f||"Game starts in":(y>0||"VIDEO_NOT_EXISTS"==p)&&(v=d.getLocalisation("eventEnded")||f||"Game has ended"),document.getElementsByClassName("error-container")[0]){var h=document.getElementsByClassName("error-message")[0];h&&(h.textContent="".concat(v));var b=document.getElementsByClassName("error-timer-message")[0];b&&Le(Math.abs(g),Re,t,b)}else{var w=document.getElementById(e).parentElement;if(w){var k=document.createElement("div");k.className="error-container";var S=document.createElement("div");S.className="error-message";var I=document.createElement("div");I.className="error-timer-message",S.textContent="".concat(v),k.appendChild(S),k.appendChild(I),w.append(k),Le(Math.abs(g),Re,t,I)}}};function Me(e,n){return Ve.apply(this,arguments)}function Ve(){return(Ve=t(o.mark(function n(t,r){var i,l,a,u,s,d,v,p,f;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.resolve,u=r.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,v=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:p=n.sent,f=!1===(null==t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,p,f).then(function(n){var o,r,i,l;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(r=o.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType,c.setCurrentVideo(null==n?void 0:n.data);var f,m=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.enable&&!v)if((null===(f=t.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var g,y,h,b=de((null===(g=t.watchHistory)||void 0===g?void 0:g.profileId)||"",s,null==t?void 0:t.siteOwner);if(b&&b.length)t.watchHistoryResumeTime=(null===(y=b[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(h=b[0])||void 0===h?void 0:h.watchedPercentage)||null;m.contentType="video",Te(d,{res:m},t,{resolve:a,reject:u})}else e.getVideoInfo(s,p).then(function(e){var n,o,r,i,l,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,m.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Te(d,{res:m},t,{resolve:a,reject:u})});else Te(d,{res:m},t,{resolve:a,reject:u})}).catch(function(n){var o,r,i=(null==t||null===(o=t.event)||void 0===o?void 0:o.showScheduleTimer)||!1,l=(null==t||null===(r=t.event)||void 0===r?void 0:r.onCountdownComplete)||null;i&&Ne(d,n,l),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Be(e,n){return _e.apply(this,arguments)}function _e(){return(_e=t(o.mark(function n(t,r){var i,l,a,u,s,d,c,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.resolve,u=r.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(i=t.customData)||void 0===i||null===(l=i.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Te(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function He(e,n){return qe.apply(this,arguments)}function qe(){return(qe=t(o.mark(function n(t,r){var i,l,a,u,s,d,v;return o.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=r.resolve,a=r.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,c.seasonIdxManager.set(parseInt(d)),v=null==t||null===(i=t.series)||void 0===i?void 0:i.id,e.getSeriesDetails(v,u).then(function(n){var o,r,i,d=n.data,p=n.data.seasons;c.setCurrentSeries(p);var f=videoId||(null==p||null===(o=p[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id);e.createSeriesWatchMap(v,u),e.getVideoDetails(f,u).then(function(e){var n,o,r;window.contentType=null==e||null===(n=e.data)||void 0===n||null===(o=n.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,c.setCurrentVideo(e.data),Te(s,{res:null==e?void 0:e.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ue(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 Fe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ue(Object(o)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:i.onTimeUpdate,getVideoDuration:i.getVideoDuration,onVideoEnded:i.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=t(o.mark(function t(r,i){var l,a,s,c,v,p,f,m,g,h,b,w,k,S,I,O,P,T,D,E,C,x,R,L,A;return o.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(k=(null==n?void 0:n.videoSourceUrl)||!1,S=null==n?void 0:n.asat,I=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,O=null==n?void 0:n.videoId,P=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,T=(null==n?void 0:n.streamingInfo)||!1,window.videoId=O,D=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",D),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),D&&!e.isTokenExpired(D)){t.next=16;break}return i({status:!1,msg:"".concat(D?"Token is expired !":"Missing Authorization Token"),response:{token:D}}),t.abrupt("return");case 16:Ae=JSON.parse(atob(D.split(".")[1]));case 17:return window.siteName=null===(s=Ae)||void 0===s?void 0:s.site,window.siteId=null===(c=Ae)||void 0===c?void 0:c.siteId,n.isAnonymousUser=!(null===(v=Ae)||void 0===v||!v.anonymousId),n.siteOwner=(null===(p=Ae)||void 0===p?void 0:p.site)||null,n.userId=(null===(f=Ae)||void 0===f?void 0:f.userId)||null,window.sessionStorage.setItem("uid",null===(m=Ae)||void 0===m?void 0:m.userId),window.watchHistory=n.watchHistory||null,E=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,C=(null==n||null===(h=n.analytics)||void 0===h?void 0:h.gaId)||null,(x=null==n?void 0:n.errors)&&(window.customErrors=x),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=35,j(n);case 35:C&&y("https://www.googletagmanager.com/gtag/js?id=".concat(C)).then(function(){return e.runGtag(C)}).catch(function(e){}),(R=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(E)))&&R.addEventListener("contextmenu",function(e){return e.preventDefault()}),k?(A={directPlaybackUrl:k,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},S?e.getVideoDetails(L,D).then(function(e){var t=(null==e?void 0:e.data)||{};Te(E,{res:Fe(Fe({},t),A)},n,{resolve:r,reject:i})}).catch(function(n){e.initiateErrorHandling(n,E,i,L)}):Te(E,{res:A},n,{resolve:r,reject:i})):T?Ce(n,{resolve:r,reject:i}):P?He(n,{resolve:r,reject:i}):I?Be(n,{resolve:r,reject:i}):Me(n,{resolve:r,reject:i});case 39:case"end":return t.stop()}},t)}));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:i.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:a.playSelectedResolution,getSource:e.getSource,setVolume:b,getVolume:w,disableControls:e.disableControls,setPlaybackSpeed:i.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,adsQueuePointManager:e.adsQueuePointManager,getSsaiEvents:e.getSsaiEvents,playerEvents:i.playerEvents,onReplay:i.onReplay,isBehindLive:e.isBehindLive}},exports.initiateMarker=function(e){var n=s.getPlayer(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var r=t.start(0),i=t.end(t.length-1)-r;we(),ke(i).forEach(function(e){var n=e.id,t=e.title,r=e.time,l=be(n,t,Math.min(r/i*100,99.5));o.appendChild(l)})}},exports.removeMarkers=we;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./player_instance-fcf6a8fb.js"),r=require("./currentVideoInfo-5802821b.js"),a=require("./autoNextVideo-
|
|
1
|
+
"use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./player_instance-fcf6a8fb.js"),r=require("./currentVideoInfo-5802821b.js"),a=require("./autoNextVideo-4a59e3a1.js"),d=require("./icons-2609dbe4.js"),s=require("./skin-eeec7a85.js"),u=require("@babel/runtime/helpers/typeof"),c=require("video.js"),v=[],m=!1,p=function(e,t){var n=l.getPlayer(e),o=Math.floor(n.currentTime());if(Math.floor(n.duration())!=o){n.pause(e);var i=r.getVideoIdx();a.switchToNext(i,e,v)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===u(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},o=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(i){var l,r,a,d,s,u,c,v;function m(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",m),v()}r=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",a=document.createElement("img"),l.appendChild(a),a.src=r[0].src,a.className="vjs-thumbnail",t(a.style,r[0].style),a.style.left||a.style.right||(a.onload=function(){a.style.left=-a.naturalWidth/2+"px"}),u=d.duration(),d.on("durationchange",function(e){u=d.duration()}),d.on("loadedmetadata",function(e){u=d.duration()}),(s=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,v,m,p,f,g,h,y;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=o(s.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),v=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,v-=o(s.el()).getBoundingClientRect().left+h,i=Math.floor((v-s.el().offsetLeft)/s.width()*u),r)i>d&&(c=Math.max(c,d));(m=r[c]).src&&a.src!=m.src&&(a.src=m.src),m.style&&a.style!=m.style&&t(a.style,m.style),v+(g=function(e,t){var o;return t?parseFloat(t):"auto"!==(o=n(e)("clip"))&&"inherit"!==o&&4===(o=o.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(o[1])-parseFloat(o[3]):0}(a,m.width||r[0].width)/2)>f?v-=v+g-f:v<g&&(v=g),l.style.left=v+"px"},s.on("mousemove",c),s.on("touchmove",c),s.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",m)}),v=function(e){l.style.left="-1000px"},s.on("mouseout",v),s.on("touchcancel",v),s.on("touchend",v),d.on("userinactive",v)}),exports.addNextEpPreview=function(e,t){var n;if(m=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o;v=[];var a=r.getCurrentSeries();null==a||a.map(function(e){var t;return(t=v).push.apply(t,i(e.episodes))}),null==t||null===(o=t.series)||void 0===o||o.cb}else{var u,c;v=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(c=t.relatedVideos)||void 0===c||c.cb}var f=l.getPlayer(e);f.on("timeupdate",function(){var e,t;if(!m){var n=Math.floor(f.currentTime()),o=f.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&r.getVideoIdx()<=(null===(t=v)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var g,h=v.filter(function(e,t){return t==r.getVideoIdx()});if((null==h?void 0:h.length)>0)if(null!==(g=document.getElementsByClassName("next-ep-preview"))&&void 0!==g&&g[0]){var y,x,A,w,E,C,b,N,B,L,P,I;(null===(y=document.getElementsByClassName("next-ep-preview"))||void 0===y?void 0:y[0]).style.visibility="hidden";var j=null===(x=document.getElementsByClassName("next-ep-title"))||void 0===x?void 0:x[0],k=null===(A=document.getElementsByClassName("next-ep-img"))||void 0===A?void 0:A[0],q=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],T=null===(E=h[0])||void 0===E?void 0:E.title;(null===(C=T)||void 0===C?void 0:C.length)>60&&(T=T.substr(0,60)+"..."),j.textContent="".concat(T),k.src=(null===(b=h[0])||void 0===b||null===(N=b.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null==h||null===(L=h[0])||void 0===L?void 0:L.img)||(null===(P=window)||void 0===P||null===(I=P.customData)||void 0===I?void 0:I.fallbackImage),q.onclick=function(){return p(e)}}else{var V,O,S,M,X,F,R,D,G=document.createElement("div");G.className="next-ep-preview",G.style.visibility="hidden",document.getElementById(e).append(G);var H=document.createElement("div");H.className="next-heading-wrapper";var _=document.createElement("div");_.className="next-ep-header",_.textContent="Next up";var K=document.createElement("div");K.className="next-ep-close",K.onclick=function(){G.style.visibility="hidden",m=!0},K.appendChild(s.parseSvgString(d.crossIconSvg())),H.append(_),H.append(K);var Q=null===(V=h[0])||void 0===V?void 0:V.title,U=document.createElement("img");U.className="next-ep-img",U.src=(null===(O=h[0])||void 0===O||null===(S=O.gist)||void 0===S||null===(M=S.imageGist)||void 0===M?void 0:M.r16x9)||(null==h||null===(X=h[0])||void 0===X?void 0:X.img)||(null===(F=window)||void 0===F||null===(R=F.customData)||void 0===R?void 0:R.fallbackImage);var W=document.createElement("div");W.className="next-ep-title",(null===(D=Q)||void 0===D?void 0:D.length)>60&&(Q=Q.substr(0,60)+"..."),W.textContent="".concat(Q);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(U),Y.append(W),Y.onclick=s.debounce(function(){null==G||G.remove(),m=!0,p(e)},400),G.append(H),G.append(Y)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),o=null==t?void 0:t.tvProviderLogoUrl;if(o){var i=document.createElement("div");i.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(o),r.alt="Provider Image",i.append(r),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./index-
|
|
1
|
+
"use strict";require("./index-856a71d1.js");var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("./player_instance-fcf6a8fb.js"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),a=require("./currentVideoInfo-5802821b.js"),u=require("./skin-eeec7a85.js");function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(t.mark(function e(r){var n,a,u,o,s,l,c,p,d,f,m,b,g,v,h,x,y,w,k,j,E,N,T,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return a=e.sent,e.next=11,createImageBitmap(a);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=i(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,f=[],m=0;m<l;m++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,m*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),f.push({uri:v,duration:r.duration}),r._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=i(h,2),y=x[0],w=x[1],k=[],j=0;j<y*w;j++)k.push({uri:null===(E=window)||void 0===E||null===(N=E.app_data)||void 0===N||null===(T=N.appcmsMain)||void 0===T||null===(A=T.images)||void 0===A?void 0:A.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return f.apply(this,arguments)}function f(){return(f=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function m(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=r.getPlayer(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),n),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark(function e(r){var a,o,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={},r.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),u=i(r,2),o=u[0]*u[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);a[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},n(p,"left","-60px"),n(p,"border","1px solid transparent"),n(p,"borderRadius","4px"),p)})}}),o=Object.keys(a).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",u.throttle(function(e){return m(e,a,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",u.throttle(function(e){return m(e,a,o)},500))}),e.abrupt("return",a);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var r=e(t.mark(function e(r,n){var a,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return a=e.sent,e.next=5,a.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=i(t,2),n=r[0],a=r[1];n&&a&&(l[n.trim().toLowerCase()]=a.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark(function e(n,u){var o,s,c,p,d,f,m,b,g,v,x,y,j,E,N,T,A,I,O,S,P,M,q,R,$,B,L,D,C,U,X,_,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,fe,me;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u,o=r.getPlayer(u),s=n.split("/"),c=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=a.getCurrentVideo())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),j=(null==x||null===(m=x.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||p+"/",E=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<E.length)){e.next=72;break}if(("image"!==(T=E[N]).getAttribute("contentType")||"image/png"!==T.getAttribute("mimeType"))&&"image/jpeg"!==T.getAttribute("mimeType")){e.next=69;break}if(I=T.getElementsByTagName("SegmentTemplate")[0],O=null===(A=I.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!I||!O){e.next=48;break}if(M=O.getElementsByTagName("S"),q=parseInt(null===(S=M[0])||void 0===S?void 0:S.getAttribute("t")),R=parseInt(null===(P=M[0])||void 0===P?void 0:P.getAttribute("d")),$=T.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],L=B.getAttribute("value"),D=null==L?void 0:L.split("x"),C=i(D,2),U=C[0],X=C[1],!I){e.next=46;break}if(I.getAttribute("media"),_=I.getAttribute("timescale"),F=(_?R/_:R)/(U*X),W=$.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(U*X)),V=I.getAttribute("media"),parseInt(I.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:L,uri:K+J.replace("$Time$",q+N*R).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=T.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=i(ee,2),re=te[0],ne=te[1],!I){e.next=69;break}if(I.getAttribute("media"),ie=I.getAttribute("duration"),ae=I.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=Q.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=I.getAttribute("media"),pe=parseInt(I.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=w(ce),N=0;N<le;N++)me=fe?k(fe,N+pe):ce,de.push({duration:ue,layout:Z,uri:j+me.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function j(){return(j=e(t.mark(function e(n){var i,a,u,o,s,l,c,p,f,m,g,h,y,w,k,j;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=r.getPlayer(n),c=l.currentSource(),p=c.src,p=null!==(i=p)&&void 0!==i&&i.includes("blob")?null===(a=window)||void 0===a||null===(u=a.player)||void 0===u?void 0:u.getSource():p,null===(o=p)||void 0===o||!o.includes("m3u8")){e.next=19;break}return e.next=6,d(p,n);case 6:if(!((null==(f=e.sent)?void 0:f.length)>0)){e.next=17;break}return m=(null==f?void 0:f[0])||null,g=m.uri,h=p.substring(0,p.lastIndexOf("/"))+"/",e.next=12,v(h,g);case 12:return y=e.sent,e.next=15,b(y);case 15:w=e.sent,l.thumbnails(w);case 17:e.next=28;break;case 19:if(null===(s=p)||void 0===s||!s.includes("mpd")){e.next=28;break}return e.next=22,x(p,n);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,b(k);case 26:j=e.sent,l.thumbnails(j);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.initiateTrickplay=function(e){return j.apply(this,arguments)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("./generic-82357fa8.js"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js");var e=require("./index-442d2c0a.js");require("./util-474e412e.js"),require("./captions-68e263dd.js"),require("./resolution-9c4872ec.js"),require("./skin-eeec7a85.js"),require("./localisation-56e0a999.js"),require("./player_instance-fcf6a8fb.js"),require("axios"),require("js-cookie"),require("./currentVideoInfo-5802821b.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./icons-2609dbe4.js"),require("./helper-dbf2fb22.js"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-2609dbe4.js"),o=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-2609dbe4.js"),o=require("./generic-82357fa8.js"),l=require("./skin-eeec7a85.js"),c=require("./player_instance-fcf6a8fb.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./currentVideoInfo-5802821b.js"),require("./captions-68e263dd.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var u=s.getComponent("Component"),m=function(){r(v,u);var m,p,h=(m=v,p=d(),function(){var e,t=a(m);if(p){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function v(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=h.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{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(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-7a86b517.js")}).then(function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var l=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",o.load(t.playerId,t.streams[e].id).then(function(e){o.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,l),s.dom.appendContent(e,n),s.dom.appendContent(e,d),c.getPlayer(this.playerId).on("fullscreenchange",function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")})}}]),v}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-2609dbe4.js"),o=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),i=require("./icons-2609dbe4.js"),o=require("./generic-82357fa8.js"),l=require("./skin-eeec7a85.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./currentVideoInfo-5802821b.js"),require("./captions-68e263dd.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var d=s.getComponent("Component"),u=function(){r(v,d);var u,m,p=(u=v,m=c(),function(){var e,t=n(u);if(m){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=p.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{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(i.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./multicamv2-1efdbdb9.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 a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),p=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i.SelectedStream())});m==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",o.load(t.playerId,t.streams[e].id).then(function(e){o.play(t.playerId),console.log(e)}).catch(function(e){console.log(e)})},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)p(v);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-2609dbe4.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-2609dbe4.js"),s=require("./generic-82357fa8.js"),a=require("./currentVideoInfo-5802821b.js"),d=require("./skin-eeec7a85.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-68e263dd.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var c=o.getComponent("Component"),p=function(){t(p,c);var s,a,d=(s=p,a=u(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=d.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),v=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){a.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=d.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var u=o.dom.$(".next-eps-description"),c=d.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=c&&c.firstChild;)null==u||u.appendChild(c.firstChild)};exports.default=p,exports.initaliseFunctionality=function(e,n){var t=v(e,n.video.gist.id),r=f(e[t],n.video.gist.id),i=m(e[t],r);h(i.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-2609dbe4.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-2609dbe4.js"),s=require("./generic-82357fa8.js"),c=require("./currentVideoInfo-5802821b.js"),d=require("./autoNextVideo-4a59e3a1.js"),u=require("./skin-eeec7a85.js"),p=require("./player_instance-fcf6a8fb.js");function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("./captions-68e263dd.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-474e412e.js");var v=o.getComponent("Component"),y=function(){l(f,v);var y,h,b=(y=f,h=m(),function(){var e,t=a(y);if(h){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function f(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,f),(a=b.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&d.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(f,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(r.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(u.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var d=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),r=o.dom.createEl("div",{className:"playlist-section",index:t}),d=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),p=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(r,d),o.dom.appendContent(r,p),o.dom.appendContent(a,r),o.dom.appendContent(u,a);var m=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),y=o.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(m,y),o.dom.appendContent(m,v),o.dom.appendContent(a,m),o.dom.appendContent(u,a),m.onclick=function(e){e.stopPropagation(),c.setVideoIdx(t+1),s.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},r.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==r||null===(l=r.classList)||void 0===l||l.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);o.dom.appendContent(i,a),o.dom.appendContent(i,d),o.dom.appendContent(t,i),o.dom.appendContent(t,u),p.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),f}();exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-82357fa8.js"),u=require("./icons-2609dbe4.js"),p=require("./currentVideoInfo-5802821b.js"),v=require("./skin-eeec7a85.js");require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-68e263dd.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js");var h=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var m,g=c.getComponent("Component"),b=function(){s(d,g);var e,l,c=(e=d,l=f(),function(){var i,t=a(e);if(l){var n=a(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),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,m=s.playerId,q(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(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function y(){return(y=e(l.mark(function e(i,t,n,s){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(m),h(m),d.load(m,t).then(function(e){p.setCurrentVideo(e.response),d.play(m)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function q(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=v.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=q,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=v.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),p=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.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,u[i],u)}),p[i].addEventListener("click",function(){return function(e,i,t,n){return y.apply(this,arguments)}(i,m[i].id,t,u)}),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)},exports.seriesModule=b;
|