@viewlift/player-backup 2.0.308-backup → 2.0.309-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/bundle.css +923 -923
- package/cjs/{index-2258865d.js → index-81cea859.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{skin-dc2d057c.js → skin-5ccb7ec2.js} +1 -1
- package/esm/bundle.css +923 -923
- package/esm/{index-a0c37b30.js → index-27f21ff2.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{skin-6bb4d7b8.js → skin-dbb8e53c.js} +1 -1
- package/package.json +29 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{c as e,g as n,a as t,b as r,d as o,e as i,s as l,f as a,l as u,h as s,v as c,i as d,j as v,k as f,m as p,t as m,n as h,o as g,p as y,q as b,r as w,u as k,w as S,x as T,y as I,z as E,A as D,B as O,C as j,D as C,E as P,F as x,G as _,H as A,I as R,J as L,K as N,L as M,M as U,N as B,O as F,P as H,Q as V,R as z,S as q,T as G,U as W,V as K,W as Y,X as $,Y as J,Z as X,_ as Q,$ as Z,a0 as ee,a1 as ne}from"./generic-abae2ca9.js";import te from"@babel/runtime/helpers/defineProperty";import re from"@babel/runtime/helpers/asyncToGenerator";import oe from"@babel/runtime/regenerator";import ie from"video.js";import le from"@babel/runtime/helpers/classCallCheck";import ae from"@babel/runtime/helpers/createClass";import ue from"@babel/runtime/helpers/get";import se from"@babel/runtime/helpers/inherits";import ce from"@babel/runtime/helpers/possibleConstructorReturn";import de from"@babel/runtime/helpers/getPrototypeOf";import{h as ve,a as fe,s as pe,o as me,g as he,b as ge,c as ye,d as be,p as we,e as ke}from"./index-7a33fd81.js";import{g as Se,d as Te,s as Ie,a as Ee,e as De}from"./captions-75f20905.js";import{g as Oe}from"./renditions-620d93b3.js";import{playSelectedResolution as je}from"./resolution-2ee017b4.js";import{g as Ce,i as Pe,t as xe,p as _e,a as Ae}from"./skin-3653c5b3.js";import{d as Re}from"./browser-de5f6a74.js";import{s as Le}from"./localisation-0bf399a1.js";import Ne from"@babel/runtime/helpers/typeof";import"@viewlift/comscore/index.js";import Me from"@babel/runtime/helpers/toConsumableArray";import{createSSETransport as Ue}from"@viewlift/sse";import{r as Be}from"./relatedVideosManager-8dd9aa24.js";function Fe(e,n,t,r){var o=ue(de(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function He(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(He=function(){return!!e})()}var Ve=ie.getComponent("TextTrackSettings"),ze=ie.dom,qe=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],Ge=qe.map(function(e){return e.value}),We="16",Ke="vlp-caption-font-size-px",Ye="vlp-caption-font-size-style",$e=".vjs-font-percent > select",Je=function(e){return-1!==Ge.indexOf(e)?e:We},Xe=null;Ve?(Xe=function(){se(r,Ve);var e,n,t=(e=r,n=He(),function(){var t,r=de(e);if(n){var o=de(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return ce(this,t)});function r(e,n){var o;return le(this,r),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return ae(r,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$($e);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);qe.forEach(function(n){e.appendChild(ze.createEl("option",{value:n.value,textContent:n.label}))}),e.value=We}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$($e);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=Je(e);if("undefined"!=typeof document){var t=document.getElementById(Ye);t||((t=document.createElement("style")).id=Ye,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(Ke)}catch(e){}var n=Je(e),t=this.$($e);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=Fe(r,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(Fe(r,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$($e);e&&(e.value=We),this.applyFontSize_(We)}}},{key:"saveSettings",value:function(){if(Fe(r,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$($e);if(e)try{window.localStorage.setItem(Ke,Je(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){Fe(r,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),r}(),ie.registerComponent("TextTrackSettings",Xe)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var Qe=function(e){return new Promise(function(n,t){if(Ze(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},Ze=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},en=function(e,n,t){var r=Ce(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),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,"'")})},nn=function(e){var n=Ce(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},tn=function(){var e=re(oe.mark(function e(n){var t,r,o,i,l;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ce(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,Qe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(ie),e.finish(13);case 16:(l=ie.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(o=window)&&void 0!==o&&o.cast?null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==Re()?null==r||r.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),rn=function(e,n){var t=Ce(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,i,l,a=this.el(),u=ie.dom.getPointerPosition(a,n).x;ie.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(s),s&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*u,d.seek()}})};var on=function(){var e=re(oe.mark(function e(){return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Qe("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)}}(),ln=function(){var n=re(oe.mark(function n(){return oe.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),an=function(){var e=re(oe.mark(function e(){return oe.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){ie.getPlugin("eme")||ie.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),un=function(){var e=re(oe.mark(function e(){var n;return oe.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(ie),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)}}(),sn=function(){var e=re(oe.mark(function e(){return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),cn=function(){var e=re(oe.mark(function e(){return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-e31d9fb5.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)}}(),dn=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){Qe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(ie)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(ie)})},loadAdsLibrary:on,loadEMELibrary:an,loadMuxPlugin:un,loadDvrSeekbar:sn,loadContribDash:cn,loadComscorePlugin:ln});function vn(e){return fn.apply(this,arguments)}function fn(){return(fn=re(oe.mark(function e(n){var t;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,on();case 3:t&&"Safari"==Re()&&Promise.resolve().then(function(){return dn}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function pn(e){return mn.apply(this,arguments)}function mn(){return(mn=re(oe.mark(function e(n){var t,r,o,i,l,a,u,s,c,d;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=Ce(n.playerId),e.next=3,ln();case 3:d.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,applicationName:(null==n||null===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(i=window)||void 0===i?void 0:i.siteName)||null,implementationId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(u=n.comscore)||void 0===u?void 0:u.debug)||!1,persistentLabels:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function hn(e,n){return gn.apply(this,arguments)}function gn(){return(gn=re(oe.mark(function e(n,t){var r,o,i,l,a,u,s,c,d,v,f,p,m,h;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==t?void 0:t.contentType)||"video",v=null==t||null===(r=t[d])||void 0===r?void 0:r.drmEnabled,null==t||null===(o=t[d])||void 0===o||null===(i=o.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(l=t[d])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.dash)||null,p=(null==n||null===(s=n.comscore)||void 0===s?void 0:s.enable)||!1,m=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([v?"Safari"==Re()?an():"caliente"!=(null===(h=window)||void 0===h?void 0:h.siteName)?cn():an():"Safari"!=Re()&&f?cn():null,p?pn(n):null,m?un():null,tn(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function yn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function bn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yn(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var wn=new Set,kn=null,Sn=function(e,t,o,i){var l,a,u,s,c,d,v,f={},p=(null==e?void 0:e.contentType)||"video";f["c3.cm.id"]=(null===(l=e[p])||void 0===l?void 0:l.id)||"Null",f["c3.cm.contentType"]=Cn(e),f[null==o||null===(a=o.Constants)||void 0===a?void 0:a.IS_LIVE]=!(null==e||!e.linearchannel),f[null==o||null===(u=o.Constants)||void 0===u?void 0:u.STREAM_URL]=t.currentSrc(),f[null==o||null===(s=o.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===n()?"NULL":n(),f["c3.cm.categoryType"]=Dn(e),f["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"}}(),f.DRMEnabled=(null===(c=e[p])||void 0===c?void 0:c.drmEnabled)||"None",f.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",f[o.Constants.DEFAULT_RESOURCE]="AKAMAI",f["c3.cm.brand"]="NULL",f.CDVREnabled=On(e),f["c3.cm.genreList"]=In(e),f["c3.cm.genre"]=Tn(e),f["c3.cm.channel"]=En(e,i);var m=_n(r(),e);return f=bn(bn({},f),m)},Tn=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},In=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"},En=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(r=((null==e||null===(t=e[o])||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===r?void 0:r.title)||"NULL"},Dn=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"},On=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},jn=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},Cn=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Pn,xn,_n=function(e,n){var r,i,l,a,u,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return s;var c=o(),d=t();return s["c3.cm.seriesName"]=(null==n||null===(r=n.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",s["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",s["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(u=a[d-1])||void 0===u?void 0:u.title)||"Null",s["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",s},An=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"}},Rn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ln=function(){var e=re(oe.mark(function e(n,t){var r,o,l,a,u,s,c,d,v,f,p,m;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(null==t?void 0:t.convivaConfig)||{},o=r.trackConvivaPlayerEvent,l=r.paymentHandler,a=r.tveProvider,u=r.enable,s=r.appName,d=(c=t||{}).token,v=c.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=Ce(n),"function"==typeof(p=o)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(m=e.sent){e.next=13;break}return e.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=An(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var e,n;kn&&kn!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),wn.clear(),kn=f.currentSrc();var r=Rn(f.currentType()),o=i(),u=Sn(o,f,m,v);u[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",u[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=jn(o,t),u.authToken=d||"NULL",u.streamType=r,u.D2CType=l||"NONE",u.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",u["c3.cm.affiliate"]=a||"NULL",Nn.setData(u),p("contentInfo",u)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){wn.has(f.currentSrc())||(wn.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){wn.has(f.currentSrc())&&wn.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==wn||wn.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Nn=(Pn={},{setData:function(e){Pn=bn(bn({},Pn),e)},getData:function(){return Pn}}),Mn=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-72fa8635.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-40c87ff8.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-e65f563d.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-997b3f54.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-4af91c1f.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-f3073421.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-ed831985.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-d8b7899d.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t?import("./skin-eb636f22.js").then(function(t){t.initialiseSkin(e,n)}):"CN_NEWS"==t&&import("./skin-6bb4d7b8.js").then(function(t){t.initialiseSkin(e,n)})};function Un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Bn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Un(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Un(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Fn=[],Hn=0,Vn=null;function zn(){xn=null,Fn=[],Hn=0,Vn=null}function qn(e,n,t){var r,o,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(r=n.watchHistory)||void 0===r||r.apiVersion;var d=null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(u=n.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,h=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),y={};m?function(e,n,t){var r=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),o=Gn(r),l=(new Date).getTime(),a=i(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Bn(Bn({},e),{},te({},n,u[n]))},{}),c=o.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===xn});c<0?o.push(Bn(Bn({content:s},e),{},{addedDate:l,updateDate:l})):o[c]=Bn(Bn(Bn({},o[c]),e),{},{updateDate:l});localStorage.setItem("".concat(r),JSON.stringify(o))}(y={completed:c,watchedTime:h,watchedPercentage:g},d,n.siteOwner):(y=Bn(Bn({videoId:xn,watchedTime:h,watchedPercentage:g,doneWatching:c,profileId:d},Vn&&{seriesId:Vn}),p&&{originalObjectId:p}),l(y).then(function(e){}).catch(function(e){})),Hn=v+t}function Gn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Wn(e,n,t){var r=Gn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var Kn=!1,Yn=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[o])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!Kn){var i=$n(e,"videoAssets","secondaryVideoAssets"),l=a(i,n);return l&&u(n,l),Kn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function $n(e,n,t){if(Array.isArray(e))return e.map(function(e){return $n(e,n,t)});if(null!==e&&"object"===Ne(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=$n(e[o],n,t)}),r}return e}function Jn(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 Xn(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)?Xn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 Xn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Qn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Zn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qn(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var et=function(e,n,t,r){var o,l,a,u,m,h=r.res,g=r.sres,y=Ce(e),b=(null==h?void 0:h.contentType)||"video",w=(null==h||null===(o=h[b])||void 0===o?void 0:o.drmEnabled)||!1,k=!(null==h||null===(l=h[b])||void 0===l||null===(a=l.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===b,S=(null==h||null===(u=h[b])||void 0===u||null===(m=u.liveDetails)||void 0===m?void 0:m.isDvrEnabled)||!1;s(h),c.set(h),y&&(y.on("loadstart",function(){k?t.resolve({status:!0,msg:"Video Loaded",response:h}):t.resolve(Zn({status:!0,msg:"Player Initialised"},g?{seriesResponse:g,response:h}:{response:h}))}),y.on("loadeddata",function(){var t,r,o,l,a=Se(e);if(null==a||a.map(function(n){return Te(e,n.id)}),S&&"Safari"===Re())try{var u;null==y||null===(u=y.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&en(e,sessionStorage.getItem("volume")||"100");var s=i();if(d(n),v(),null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.isExternal){var c=Zn(Zn({},n),h);!function(e,n){var t,r,o;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&"function"==typeof(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.cb)){var i,l,a,u=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,s=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.completionThreshold)||95,c=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,d=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(d=t,t>0){var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==d){d=t;var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s||!1})}}),e.on("ended",function(){c({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(y,c)}else if(null!=n&&n.watchHistory&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var f,p,m=Zn(Zn({},n),h);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Vn=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Fn=[],Hn=0,xn=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=Ce(e);a&&(a.on("dispose",zn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Fn.includes(Hn)||(e!=Hn||e<l?e>Hn&&(Hn=e+l):(Fn.push(e),qn(a,n,l)))}}),a.one("ended",function(){qn(a,n,l,!0)}))}(e,m,null==s||null===(f=s.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=y&&y.mux){var g,b,w,k,T,I,E=(null===(g=i())||void 0===g?void 0:g.video)||(null==h?void 0:h.video),D=null==E?void 0:E.gist,O={env_key:null==n||null===(b=n.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==E||null===(k=E.series)||void 0===k?void 0:k.title,video_stream_type:null!=E&&null!==(T=E.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==n||null===(I=n.analytics)||void 0===I?void 0:I.userId};y.mux({debug:!1,data:O})}}),y.textTracks().on("change",function(n){var t=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];Ie(e),y.trigger("subtitlechanged",t)}),y.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,h=p.getMediaSession(),g=h.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){k&&Yn(h,e)}),y.on("error",function(){var n,r;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&k)?Yn(h,e):(f(e,(null==y||null===(n=y.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==y||null===(r=y.error())||void 0===r?void 0:r.message)||"Some error occured",response:h}))}),y.one("play",function(){var e,t,r,o,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(r=t.appcmsMain)||void 0===r||null===(o=r.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,u,s,c=null===(a=i())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,d=p(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){y.currentTime(f)},0)}else{var h,g,b,w,k,S,T,I=null!==(h=null==n?void 0:n.watchHistoryResumeTime)&&void 0!==h?h:null==n||null===(g=n.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(b=null!==(w=null==n?void 0:n.watchedPercentage)&&void 0!==w?w:null==n||null===(k=n.watchHistory)||void 0===k?void 0:k.watchedPercentage)&&void 0!==b?b:0,D=null!==(S=null==n||null===(T=n.watchHistory)||void 0===T?void 0:T.completionThreshold)&&void 0!==S?S:95;I&&E<D&&setTimeout(function(){y.currentTime(I)},0)}if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(k){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var e,n=(null==y||null===(e=y.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==Ne(y.dash)){var t,r,o,i=null==y||null===(t=y.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=Jn(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=Jn(n);try{for(d.s();!(s=d.n()).done;){var v,f,p,m=s.value;("Chrome"==Re()||"Edge"==Re()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!w))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1")?y.audioTracks().removeTrack(m):c.push(m)}}catch(e){d.e(e)}finally{d.f()}for(var h=c.find(function(e){return"main"===e.kind}),g=h||c.find(function(e){return e.enabled})||c[0],b=0,k=c;b<k.length;b++){var S=k[b];S.enabled=S===g}}}))};function nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function tt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nt(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rt(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 ot(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)?ot(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 ot(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var it={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0};function lt(e,n,t){T(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n})}function at(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var o=n[r[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var i=null==e?void 0:e.keySystemOptions;if(Array.isArray(i)){var l,a=rt(i);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function ut(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return at("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function st(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor(function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=I(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(E(r)){var o=D(e,null);O(o)||lt(t,r,o)}}catch(e){}return Promise.resolve(e)}),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter(function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()}),"function"==typeof n.on&&n.on("public_licenseRequestComplete",function(t){try{var r,o,i,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(o=t.error)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.responseCode)&&void 0!==r?r:D(null,t.error);lt((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||ut(e)||"","license",a)}catch(e){}}))}var ct=!1,dt=null,vt=new Set;function ft(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,vt.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,vt.delete(e),function(){if(ct&&!(vt.size>0)){var e=null==ie?void 0:ie.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof dt&&e.removeHook("beforeinitialize",dt),ct=!1,dt=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function pt(e){if(e){ft(e),function(){if(!ct){var e=null==ie?void 0:ie.Html5DashJS;e&&"function"==typeof e.hook&&(dt=function(e,n){null!=e&&e.__vlDrmDashEnabled&&st(e,n)},ct=!0,e.hook("beforeinitialize",dt))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!S(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;lt(ut(e),"license",null)}catch(e){}}))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse(function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),o=I(r,null==e?void 0:e.type);if(!E(o))return;var i=D(t,n);O(i)&&!n||lt(r,o,i)}catch(e){}}))}(e),st(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",function(){setTimeout(n,0)})}}var mt=function(e,n,t,r){var o,i,l,s,c,d,v,p,S,T,I,E,D,O,j,C,P,x,_,A,R,L,N,M,U,B,F,H,V,z,q,G,W,K,Y,$,J,X,Q=n.res,Z=void 0===Q?null:Q,ee=n.sres,ne=void 0===ee?null:ee,le=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=it[r]?it[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ae=le.playerDebug,ue=le.logLevel,se=le.dashLogLevel;ae&&(console.log("[PLAYER DEBUG] config:",t),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var ce=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],de=(null===(o=Z)||void 0===o?void 0:o.contentType)||"video",ve=Pe(null===(i=Z)||void 0===i||null===(l=i[de])||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.videoImageUrl)||Pe(null===(c=Z)||void 0===c||null===(d=c[de])||void 0===d||null===(v=d.gist)||void 0===v||null===(p=v.imageGist)||void 0===p?void 0:p.r16x9),fe=(null===(S=Z)||void 0===S||null===(T=S[de])||void 0===T||null===(I=T.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,pe=!(null===(E=Z)||void 0===E||null===(D=E[de])||void 0===D||null===(O=D.streamingInfo)||void 0===O||!O.isLiveStream)||"linearchannel"===de,me=(null===(j=Z)||void 0===j||null===(C=j.ads)||void 0===C||null===(P=C.preRoll)||void 0===P||null===(x=P.adTags)||void 0===x||null===(_=x.web)||void 0===_?void 0:_.active)&&(null===(A=Z)||void 0===A||null===(R=A.ads)||void 0===R||null===(L=R.preRoll)||void 0===L||null===(N=L.adTags)||void 0===N||null===(M=N.web)||void 0===M?void 0:M.url);Z=tt(tt({},Z),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var he=(null==t||null===(U=t.customData)||void 0===U?void 0:U.ads)||{},ge=(null===(B=Z)||void 0===B||null===(F=B[de])||void 0===F?void 0:F.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==he?void 0:he.vodAdSticherProvider)||!1,ye=!(null===(H=Z)||void 0===H||null===(V=H[de])||void 0===V||!V.isSSAIEnabled)&&"TRANSMIT"==(null==he?void 0:he.liveAdSticherProvider)&&!(null==he||!he.liveAdClientSideTracking),be=(null==t?void 0:t.latency)||6,we=(null==t?void 0:t.skin_settings)||{},ke=(J={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==we?void 0:we.pictureInPictureToggle)||!1},playbackRates:null!=we&&we.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==t.skin,liveui:fe},te(J,"autoplay",null==t?void 0:t.autoplay),te(J,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!me),te(J,"loop",(null==t?void 0:t.loop)||!1),te(J,"audioPosterMode",null==t?void 0:t.audioPosterMode),te(J,"html5",tt(tt({dash:tt(tt({},!ie.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:tt(tt({},((null==t?void 0:t.debugConfig)&&(null==t||null===(z=t.debugConfig)||void 0===z?void 0:z.enable)||ae)&&{debug:{logLevel:se}}),{},{streaming:{delay:{liveDelay:be},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:tt({},"IE"==Re()&&{enableStallFix:!0,stallSeek:1}),abr:tt(tt(tt(tt({},(null==t?void 0:t.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==t?void 0:t.initialBandwidth)/1e3}}),(null==t?void 0:t.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==t?void 0:t.maxBitrate)/1e3}}),(null==t?void 0:t.minBitrate)&&{minBitrate:{audio:-1,video:(null==t?void 0:t.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:tt(tt(tt({},(null==t?void 0:t.initialBandwidth)&&{bandwidth:t.initialBandwidth}),{},{liveRangeSafeTimeDelta:be,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==t||!t.initialBandwidth},(null==t||null===(q=t.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(G=null==t?void 0:t.enableLowInitialPlaylist)&&void 0!==G&&G},((null==t?void 0:t.debugConfig)&&(null==t||null===(W=t.debugConfig)||void 0===W?void 0:W.enable)||ae)&&{debug:!0}),debug:(null==t?void 0:t.debugConfig)&&(null==t||null===(K=t.debugConfig)||void 0===K?void 0:K.enable)||ae||!1,nativeTextTracks:"Safari"==Re()},0==(null==t||null===(Y=t.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===($=t.customData)||void 0===$?void 0:$.nativeVideoTracks)&&{nativeVideoTracks:!1})),te(J,"poster",ve),te(J,"techOrder",ce),te(J,"chromecast",{requestCustomDataFn:function(n){var r,o,i=Ce(e),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var r,o,i,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,h,g,y,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==T?void 0:T.url)||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(g=h[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=I;var E=(null==T?void 0:T.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"]);p.licenseToken=E}var D=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=D;var O=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=O;var j=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=j;var C=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,l);return tt(tt({},a),{},{transmitTrackingUrl:m.get()||null,convivaMetaData:tt({customerKey:(null==t||null===(r=t.convivaConfig)||void 0===r?void 0:r.customerKey)||null,debug:(null==t||null===(o=t.convivaConfig)||void 0===o?void 0:o.debug)||!1},Nn.getData())})},modifyLoadRequestFn:function(n){var t,r,o,i,l,a=Ce(e),u=(null==a?void 0:a.currentSource())||{};!(null===(t=Z)||void 0===t||null===(r=t[de])||void 0===r||null===(o=r.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),J);if(!ie.getPlayers()[e]){(null!=t&&t.debugConfig&&null!=t&&null!==(X=t.debugConfig)&&void 0!==X&&X.enable||ae)&&ie.log.level(ue||"debug");var Se=ie(e,ke,function(){var n=re(oe.mark(function n(){var o,i,l,s,c,d,v,p,m,S,T,I,E,D,O,j,C,P,x,_,A,R;return oe.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return pt(Se),console.log(Se),console.log(ie.VERSION),console.log(ie.getPlugins()),n.next=6,hn(t,Z);case 6:if(null!=t&&t.debugConfig&&null!=t&&null!==(o=t.debugConfig)&&void 0!==o&&o.enable||ae){try{ie.log.level(ue||"debug")}catch(e){}(E=function(){try{var e,n,t;null==Se||null===(e=Se.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:se}})}catch(e){}})(),Se.one("loadedmetadata",E)}if(D=null===(i=Z)||void 0===i||null===(l=i[de])||void 0===l||null===(s=l.liveDetails)||void 0===s?void 0:s.startOverTime,pe&&r.resolve(tt({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),y(e,{analyticsCb:null==t?void 0:t.analyticsCb,analyticsEventParams:null==t?void 0:t.analyticsEventParams,userId:null==t?void 0:t.userId}),Ln(e,t),/Android/i.test(navigator.userAgent)&&(ie.options.vhs.overrideNative=!0),fe&&rn(e,D),!me||null!=t&&null!==(c=t.customData)&&void 0!==c&&c.disableAds||b(e,me,Z),O=a(Z,e),console.log(O),ae&&(console.log("[PLAYER DEBUG] source:",O),console.log("[PLAYER DEBUG] videojs options:",ke)),null!=t&&t.nearestClusterUrl&&(O=w(O,t.nearestClusterUrl)),!ge){n.next=24;break}return n.next=21,k(e,Z);case 21:O=n.sent,n.next=28;break;case 24:if(!ye){n.next=28;break}return n.next=27,g(O,Z,e);case 27:O=n.sent;case 28:Se&&(Se.__vlDrmLicenseUrl=at(O)),O?u(e,O):(r.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),f(e,"Incompatible / Missing Source")),((null===(d=Z)||void 0===d||null===(v=d[de])||void 0===v||null===(p=v.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(S=Z)||void 0===S||null===(T=S[de])||void 0===T||null===(I=T.closedCaptions)||void 0===I?void 0:I.length)>0)&&(R=(null===(C=Z)||void 0===C||null===(P=C[de])||void 0===P||null===(x=P.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(_=Z)||void 0===_||null===(A=_[de])||void 0===A?void 0:A.closedCaptions),j=R.filter(function(e){return"VTT"===e.format}),Ee(e,j)),null!=t&&t.disableControls?h(e):Mn(e,tt(tt(tt({},t),ke),{},{liveVideo:pe,isDvrEnabled:fe,res:Z,sres:ne})),et(e,tt(tt(tt({},t),ke),{},{liveVideo:pe}),r,{res:Z,sres:ne});case 33:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function ht(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function gt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ht(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ht(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var yt=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=bt(e);mt(o,{res:i},e,{resolve:t,reject:r})},bt=function(e){var n,t,r,o,i,l,a,u,s,c,d,v,f,p=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,h=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,g=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.url)||null,y=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,b=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],w=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,k=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],S=(null==e||null===(c=e.customData)||void 0===c||null===(d=c.ads)||void 0===d?void 0:d.isSSAIEnabled)||!1,T=null==e?void 0:e.token,I=j(T);null==I||I.site;var E=null==I?void 0:I.siteId,D=(null==e||null===(v=e.customData)||void 0===v||null===(f=v.comscore)||void 0===f?void 0:f.video)||null,O=gt(gt({id:"".concat(E,"_external")},!h&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:gt(gt(gt(gt(gt({drmEnabled:h,streamingInfo:gt(gt({videoAssets:gt(gt({},w&&{drmProvider:w}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==p?void 0:p.isDvrEnabled)&&{isLiveStream:!0}),(null==D?void 0:D.isLiveStream)&&{isLiveStream:null==D?void 0:D.isLiveStream})},S&&{isSSAIEnabled:S}),{},{metadata:k,liveDetails:{isDvrEnabled:null==p?void 0:p.isDvrEnabled},gist:gt(gt(gt({},y&&{videoImageUrl:y}),(null==D?void 0:D.videoId)&&{id:null==D?void 0:D.videoId}),(null==D?void 0:D.videoTitle)&&{title:null==D?void 0:D.videoTitle}),contentDetails:gt({},(null==b?void 0:b.length)>0&&{closedCaptions:Me(b)})},(null==D?void 0:D.runtime)&&{runtime:null==D?void 0:D.runtime}),(null==D?void 0:D.publishDate)&&{publishDate:null==D?void 0:D.publishDate}),(null==D?void 0:D.platform)&&{platform:null==D?void 0:D.platform}),(null==D?void 0:D.series)&&{series:null==D?void 0:D.series}),ads:{preRoll:{adTags:{web:gt(gt({},g&&{active:!0}),g&&{url:g})}}}});return D&&(null!=D&&D.isDvrEnabled&&(O.video.liveDetails=gt(gt({},O.video.liveDetails),{},{isDvrEnabled:null==D?void 0:D.isDvrEnabled})),null!=D&&D.metadata&&(O.video.metadata=[].concat(Me(O.video.metadata),Me(null==D?void 0:D.metadata)))),O};function wt(e,n){return kt.apply(this,arguments)}function kt(){return(kt=re(oe.mark(function e(n,t){var r,o,i,l,a,u,c,d,v;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,c=!(null==n||!n.anonymousId),e.next=6,_();case 6:d=e.sent,v=!1===(null==n||null===(r=n.customData)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.isSSAIEnabled),C(a,d,v).then(function(e){var t,r,o,v,f,p,m,h,g,y,b;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,s(null==e?void 0:e.data);var w=null==e||null===(v=e.data)||void 0===v||null===(f=v.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.scheduleEndDate,k=null==e||null===(m=e.data)||void 0===m||null===(h=m.video)||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.scheduleStartDate;ve(u,{scheduleEndDate:w,scheduleStartDate:k});var S=null==e?void 0:e.data;if(null!=n&&null!==(y=n.watchHistory)&&void 0!==y&&y.isExternal)S.contentType="video",mt(u,{res:S},n,{resolve:i,reject:l});else if(null!=n&&n.watchHistory&&null!=n&&null!==(b=n.watchHistory)&&void 0!==b&&b.enable&&!c){var T;if((null===(T=n.watchHistory)||void 0===T?void 0:T.saveOffline)||!1){var I,E,D,O=Wn((null===(I=n.watchHistory)||void 0===I?void 0:I.profileId)||"",a,null==n?void 0:n.siteOwner);if(O&&O.length)n.watchHistoryResumeTime=(null===(E=O[0])||void 0===E?void 0:E.watchedTime)||null,n.watchedPercentage=(null===(D=O[0])||void 0===D?void 0:D.watchedPercentage)||null;S.contentType="video",mt(u,{res:S},n,{resolve:i,reject:l})}else P(a,d).then(function(e){var t,r,o,i,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(){}).finally(function(){mt(u,{res:S},n,{resolve:i,reject:l})})}else mt(u,{res:S},n,{resolve:i,reject:l})}).catch(function(e){var t,r,o=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,i=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;o&&fe(u,e,i),x(e,u,l,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function St(e,n){return Tt.apply(this,arguments)}function Tt(){return(Tt=re(oe.mark(function e(n,t){var r,o,i,l,a,u,s,c;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,_();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,c=!1===(null==n||null===(r=n.customData)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.isSSAIEnabled),A(s,a,c).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,mt(u,{res:t},n,{resolve:i,reject:l})}).catch(function(e){x(e,u,l,videoId)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function It(e,n){return Et.apply(this,arguments)}function Et(){return(Et=re(oe.mark(function e(n,t){var r,o,i,l,a,u,c;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,i=t.reject,e.next=3,_();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,N.set(parseInt(u)),c=null==n||null===(r=n.series)||void 0===r?void 0:r.id,R(c,l).then(function(e){var t,r,u,d=e.data,v=e.data.seasons;M(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(u=r[0])||void 0===u?void 0:u.id);L(c,l),C(f,l).then(function(e){var t,r,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,s(e.data),mt(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:o,reject:i})}).catch(function(e){x(e,a,i,videoId)})}).catch(function(e){x(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Dt,Ot=(Dt=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n:[];return Dt.set(e,t),t},get:function(e){return Dt.get(e)||[]},remove:function(e){Dt.delete(e)}});function jt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ct(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 Pt(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)?Pt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 Pt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var xt=function(e){var n=Date.parse(null==e?void 0:e.eventStartUtc),t=Number.isFinite(n)?n/1e3:0;return{start:t+(Number(null==e?void 0:e.startTime)||0),end:t+(Number(null==e?void 0:e.endTime)||0)}},_t=function(e){var n;try{var t,r,o=null==e||null===(t=e.liveTracker)||void 0===t||null===(r=t.seekableEnd)||void 0===r?void 0:r.call(t);if(Number.isFinite(o))return o}catch(e){}var i=null==e||null===(n=e.seekable)||void 0===n?void 0:n.call(e);return i&&i.length?i.end(i.length-1):NaN};function At(e){var n=null,t=null,r="none",o=function(o){var i=Ce(e);if(!i)return null;if("pdt"===r&&null!=n)return t+(o-n);var l=_t(i);return Number.isFinite(l)?l-(Date.now()/1e3-o):null},i=function(){var n=Ce(e),t=n&&n.seekable();return t&&t.length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}};return{refreshAnchor:function(){var o=Ce(e);if(o){var i=function(e){try{var n=e.tech(!0),t=n&&n.vhs,r=t&&t.playlists,o=r&&"function"==typeof r.media&&r.media();return o&&o.segments||null}catch(e){return null}}(o),l=o.currentTime()||0;if(i&&i.length){var a,u=null,s=1/0,c=Ct(i);try{for(c.s();!(a=c.n()).done;){var d=a.value;if(d&&"number"==typeof d.programDateTime&&"number"==typeof d.start&&Number.isFinite(d.start)){var v=Math.abs(d.start-l);v<s&&(s=v,u=d)}}}catch(e){c.e(e)}finally{c.f()}if(u)return n=u.programDateTime/1e3,t=u.start,void(r="pdt")}n=null,t=null,r="now"}},anchorInfo:function(){return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jt(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({anchorPdtSec:n,anchorPlayerT:t,source:r},i())},chapterToPlayerTime:function(e){return o(xt(e).start)},chapterStartPercent:function(e){return function(e){var n=i(),t=n.start,r=n.end;if(!(r>t))return null;var l=o(e);return null==l||l<t||l>r?null:(l-t)/(r-t)*100}(xt(e).start)},playerTimeToChapterIndex:function(o,i){var l=function(o){var i=Ce(e);if(!i)return null;if("pdt"===r&&null!=n)return n+(o-t);var l=_t(i);return Number.isFinite(l)?Date.now()/1e3-(l-o):null}(o);if(null==l)return-1;for(var a=-1,u=0;u<i.length;u++){var s=xt(i[u]),c=s.start,d=s.end,v=Math.max(d,c+.001);l>=c&&l<v&&(a=u)}return a},windowBounds:i}}function Rt(e){return"livedvr"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).timeMode?At(e):function(e){var n=function(e){return Number(null==e?void 0:e.startTime)||0},t=function(e){var t=Number(null==e?void 0:e.endTime);return Number.isFinite(t)?t:n(e)};return{chapterToPlayerTime:function(e){return n(e)},chapterStartPercent:function(t){var r=Ce(e),o=r&&r.duration();if(!Number.isFinite(o)||o<=0)return null;var i,l=n(t);return l<0||l>o?null:100*((i=l/o)<0?0:i>1?1:i)},playerTimeToChapterIndex:function(e,r){for(var o=-1,i=0;i<r.length;i++){var l=n(r[i]),a=Math.max(t(r[i]),l+.001);e>=l&&e<a&&(o=i)}return o},windowBounds:function(){var n=Ce(e),t=n&&n.duration();return{start:0,end:Number.isFinite(t)?t:0}},refreshAnchor:function(){},anchorInfo:function(){return{source:"vod"}}}}(e)}var Lt="chapter-change",Nt="chapter-click",Mt="chapters-updated";function Ut(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ce(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Bt(e){var n=Ce(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(Lt,e)},onChapterClick:function(e){return t(Nt,e)},onChaptersUpdated:function(e){return t(Mt,e)}}}var Ft="vjs-chapter-marker",Ht="vjs-chapter-preview",Vt=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function zt(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,i=void 0===o?{}:o,l=n.seek,a=Ce(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=function(){return!0===(null==i?void 0:i.enable)},v=function(n,t){var o=Ce(e),i=Vt(o);if(i){var l=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=Ht;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(i);l._time.textContent=function(e){try{var n=r.chapterToPlayerTime(e);if(null==n||!Number.isFinite(n))return"";if("vod"===("function"==typeof r.anchorInfo?r.anchorInfo():{}).source)return ie.formatTime(n,n);var t=(r.windowBounds()||{}).end;if(!Number.isFinite(t))return"";var o=Math.max(0,t-n);return"-".concat(ie.formatTime(o,o))}catch(e){return""}}(n),l._label.textContent=(null==n?void 0:n.label)||"",l.classList.add("vjs-chapter-preview--visible");var a="function"==typeof(null==o?void 0:o.el)?o.el():null;a&&a.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var o="function"==typeof(null==t?void 0:t.el)?t.el():null;if(o){var i=o.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=i.left+8+u,d=i.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(l,i,o,t)}},f=function(){s&&s.classList.remove("vjs-chapter-preview--visible");var n=Ce(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},p=function(n){var t=document.createElement("div");t.className=Ft,t.dataset.segmentId=String(n.segmentId);var o=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=_e(n);r&&t.appendChild(r)}else{var o=document.createElement("img");o.src=n,o.alt="",t.appendChild(o)}return t}(n);return o&&t.appendChild(o),t.addEventListener("click",function(t){t.stopPropagation(),"function"==typeof l&&l(n.segmentId),Ut(e,Nt,{chapter:n})}),t.addEventListener("mouseenter",function(){var e=r.chapterStartPercent(n);null!=e&&v(n,e)}),t.addEventListener("mouseleave",f),t},m=function(){d()&&0!==u.size&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=u.get(String(e.segmentId));if(n){var t=r.chapterStartPercent(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}}))},h=0,g=function(n){u.forEach(function(e){return e.classList.remove("".concat(Ft,"--active"))});var r=t.get(e),o=n>=0?r[n]:null;if(o){var i=u.get(String(o.segmentId));i&&i.classList.add("".concat(Ft,"--active"))}},y=function(){var n=Ce(e);if(n){var o=t.get(e),i=r.playerTimeToChapterIndex(n.currentTime()||0,o);-1===i&&Date.now()<h||i!==c&&(c=i,g(i),Ut(e,Lt,{chapter:i>=0?o[i]:null}))}},b=xe(function(){m(),y()},1e3),w=function(){m(),y()};a.on("timeupdate",b),a.on("seeked",w);var k=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",m),k=!0)}catch(e){}var S=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(S=setInterval(m,500));return{render:function(){var n=Ce(e),o=Vt(n);o&&(o.querySelectorAll(".".concat(Ft)).forEach(function(e){return e.remove()}),u.clear(),d()&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=p(e);o.appendChild(n),u.set(String(e.segmentId),n)}),m(),g(c),y()))},reposition:m,destroy:function(){try{a.off("timeupdate",b),a.off("seeked",w),k&&a.liveTracker.off("liveedgechange",m)}catch(e){}S&&(clearInterval(S),S=null);var n=Vt(Ce(e));n&&n.querySelectorAll(".".concat(Ft,", .").concat(Ht)).forEach(function(e){return e.remove()}),u.clear(),s=null},setActiveBySegment:function(n){var r=t.get(e),o=r.findIndex(function(e){return String(e.segmentId)===String(n)});o<0||(h=Date.now()+1500,o!==c&&(c=o,g(o),Ut(e,Lt,{chapter:r[o]})))}}}var qt=new Map,Gt=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Wt=function(e){var n=qt.get(e);if(n)return n;n={mapper:Rt(e,{timeMode:"vod"}),markers:null,chaptersConfig:{},timeMode:"vod"},qt.set(e,n);var t=Ce(e);return t&&t.on("dispose",function(){return Zt(e)}),n},Kt=function(e){var n=qt.get(e),t=function(e){var n=qt.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=Ce(e);return t&&Gt(t)?(n.markers=zt(e,{store:Ot,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return Qt(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function Yt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,o=n.timeMode,i=void 0===o?"vod":o;n.res;var l=n.chaptersConfig,a=void 0===l?{}:l,u=Ce(e);if(!u)return!1;Array.isArray(r)&&r.length&&Ot.set(e,r);var s=qt.get(e);null!=s&&s.markers&&s.markers.destroy();var c={mapper:Rt(e,{timeMode:i}),markers:null,chaptersConfig:a||{},timeMode:i,disposed:!1};qt.set(e,c);var d=function(){c.disposed||Kt(e)};return u.one("loadeddata",d),Gt(u)&&d(),u.on("dispose",function(){return Zt(e)}),!0}function $t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Wt(e),Ot.set(e,n),Kt(e),Ut(e,Mt,{chapters:Ot.get(e)}),!0}function Jt(e){return Ot.get(e)}function Xt(e){Ot.set(e,[]);var n=qt.get(e);return null!=n&&n.markers&&n.markers.render(),Ut(e,Mt,{chapters:[]}),!0}function Qt(e,n){var t,r,o=Ce(e),i=Wt(e);if(!o)return!1;var l=Ot.get(e).find(function(e){return e.segmentId===n});if(!l)return!1;i.mapper.refreshAnchor();var a=i.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=i.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),o.currentTime(a),null===(t=i.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Zt(e){var n=qt.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),qt.delete(e),Ot.remove(e)}var er,nr=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var a=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,o=e.debug,l=void 0!==o&&o;return Ue({site:n,sseBaseUrl:t,getToken:_,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;l&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,o,a,u,s,c,d,v;if(l&&console.log("SSE Message:",e),(null===(n=i())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(o=e.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var f=1e3*(null==e||null===(a=e.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),p=1e3*(null==e||null===(c=e.payload)||void 0===c||null===(d=c.states)||void 0===d||null===(v=d.end)||void 0===v?void 0:v.endDateTime);f&&p&&(console.log("Setting schedule timer",f,p),pe.set({startDateTime:f,endDateTime:p}))}},onReconnectAttempt:function(e){l&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;l&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){l&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){l&&console.error("SSE Error:",e,n)},onClose:function(){l&&console.log("SSE Closed")}})}({site:t,sseBaseUrl:r,sseEndpoint:o,debug:void 0!==l&&l});return a._sseBaseUrl=r,a._site=t,a._sseEndpoint=o,a}};function tr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function rr(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tr(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function or(){return{loadVideoInstantly:U,onTimeUpdate:me,getVideoDuration:he,onVideoEnded:ge,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=re(oe.mark(function n(t,r){var o,i,l,a,u,s,c,d,v,f,p,m,h,g,y,b,w,k,S,T,I,E,D,O,j,P,_,A,R,L,N,M;return oe.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!z(null==e?void 0:e.playerId)){n.next=3;break}return t({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(S=(null==e?void 0:e.videoSourceUrl)||!1,T=null==e?void 0:e.asat,I=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,E=null==e?void 0:e.videoId,D=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,O=(null==e?void 0:e.streamingInfo)||!1,window.videoId=E,j=null==e?void 0:e.token,!Q(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",j),Z().set(null==e?void 0:e.refreshToken),j&&!ee(j)){n.next=17;break}return r({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 17:er=JSON.parse(atob(j.split(".")[1]));case 18:return window.siteName=null===(l=er)||void 0===l?void 0:l.site,window.siteId=null===(a=er)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(u=er)||void 0===u||!u.anonymousId),e.siteOwner=(null===(s=er)||void 0===s?void 0:s.site)||null,e.userId=(null===(c=er)||void 0===c?void 0:c.userId)||null,$((null===(d=er)||void 0===d?void 0:d.userId)||(null===(v=er)||void 0===v?void 0:v.anonymousId)||null),window.watchHistory=e.watchHistory||null,P=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable?null:null==e?void 0:e.chromecastReceiverId,_=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(A=null==e?void 0:e.errors)&&(window.customErrors=A),window.customData=null==e?void 0:e.customData,Le(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),J.set(e.apiBaseUrl),null!=e&&e.skin&&!Ae(e.skin)||(e.skin="VL_ONE"),X.setConfig(e),Be.reset(),Be.set(null==e?void 0:e.relatedVideos),n.next=39,vn(e);case 39:_&&Qe("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then(function(){return ne(_)}).catch(function(e){}),(R=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(P)))&&R.addEventListener("contextmenu",function(e){return e.preventDefault()}),(L=nr({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(y=e.sse)||void 0===y?void 0:y.siteName,sseBaseUrl:null==e||null===(b=e.sse)||void 0===b?void 0:b.sseBaseUrl,sseEndpoint:null==e||null===(w=e.sse)||void 0===w?void 0:w.sseEndpoint,debug:null==e||null===(k=e.sse)||void 0===k?void 0:k.debug}))&&!L.isConnectionActive()&&L.connect(),S?(M={directPlaybackUrl:S,id:N="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},T?C(N,j).then(function(n){var o=(null==n?void 0:n.data)||{};mt(P,{res:rr(rr({},o),M)},e,{resolve:t,reject:r})}).catch(function(e){x(e,P,r,N)}):mt(P,{res:M},e,{resolve:t,reject:r})):O?yt(e,{resolve:t,reject:r}):D?It(e,{resolve:t,reject:r}):I?St(e,{resolve:t,reject:r}):wt(e,{resolve:t,reject:r});case 45:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:Oe,skip:B,getPlayer:Ce,play:F,pause:H,detectBrowser:Re,rewind:V,loadVideo:u,seekToTimeStamp:ye,isPlayerInitialised:z,load:q,authenticateLC:G,dispose:W,enableCaptions:De,disableCaptions:Te,getCaptions:Se,playSelectedResolution:je,getSource:a,setVolume:en,getVolume:nn,disableControls:h,setPlaybackSpeed:be,getEntitlementData:K,getSsaiEvents:Y,playerEvents:we,onReplay:ke,relatedVideosManager:Be,setChapters:$t,getChapters:Jt,clearChapters:Xt,seekToChapter:Qt,getChapterEvents:Bt}}export{or as V,Yt as i};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{c as e,g as n,a as t,b as r,d as o,e as i,s as l,f as a,l as u,h as s,v as c,i as d,j as v,k as f,m as p,t as m,n as h,o as g,p as y,q as b,r as w,u as k,w as S,x as T,y as I,z as E,A as D,B as O,C as j,D as C,E as P,F as x,G as _,H as A,I as R,J as L,K as N,L as M,M as U,N as B,O as F,P as H,Q as V,R as z,S as q,T as G,U as W,V as K,W as Y,X as $,Y as J,Z as X,_ as Q,$ as Z,a0 as ee,a1 as ne}from"./generic-abae2ca9.js";import te from"@babel/runtime/helpers/defineProperty";import re from"@babel/runtime/helpers/asyncToGenerator";import oe from"@babel/runtime/regenerator";import ie from"video.js";import le from"@babel/runtime/helpers/classCallCheck";import ae from"@babel/runtime/helpers/createClass";import ue from"@babel/runtime/helpers/get";import se from"@babel/runtime/helpers/inherits";import ce from"@babel/runtime/helpers/possibleConstructorReturn";import de from"@babel/runtime/helpers/getPrototypeOf";import{h as ve,a as fe,s as pe,o as me,g as he,b as ge,c as ye,d as be,p as we,e as ke}from"./index-7a33fd81.js";import{g as Se,d as Te,s as Ie,a as Ee,e as De}from"./captions-75f20905.js";import{g as Oe}from"./renditions-620d93b3.js";import{playSelectedResolution as je}from"./resolution-2ee017b4.js";import{g as Ce,i as Pe,t as xe,p as _e,a as Ae}from"./skin-3653c5b3.js";import{d as Re}from"./browser-de5f6a74.js";import{s as Le}from"./localisation-0bf399a1.js";import Ne from"@babel/runtime/helpers/typeof";import"@viewlift/comscore/index.js";import Me from"@babel/runtime/helpers/toConsumableArray";import{createSSETransport as Ue}from"@viewlift/sse";import{r as Be}from"./relatedVideosManager-8dd9aa24.js";function Fe(e,n,t,r){var o=ue(de(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function He(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(He=function(){return!!e})()}var Ve=ie.getComponent("TextTrackSettings"),ze=ie.dom,qe=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],Ge=qe.map(function(e){return e.value}),We="16",Ke="vlp-caption-font-size-px",Ye="vlp-caption-font-size-style",$e=".vjs-font-percent > select",Je=function(e){return-1!==Ge.indexOf(e)?e:We},Xe=null;Ve?(Xe=function(){se(r,Ve);var e,n,t=(e=r,n=He(),function(){var t,r=de(e);if(n){var o=de(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return ce(this,t)});function r(e,n){var o;return le(this,r),(o=t.call(this,e,n)).customUiReady_=!0,o.applyCustomFontSizeUI_(),o}return ae(r,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$($e);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);qe.forEach(function(n){e.appendChild(ze.createEl("option",{value:n.value,textContent:n.label}))}),e.value=We}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$($e);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=Je(e);if("undefined"!=typeof document){var t=document.getElementById(Ye);t||((t=document.createElement("style")).id=Ye,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(Ke)}catch(e){}var n=Je(e),t=this.$($e);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=Fe(r,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(Fe(r,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$($e);e&&(e.value=We),this.applyFontSize_(We)}}},{key:"saveSettings",value:function(){if(Fe(r,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$($e);if(e)try{window.localStorage.setItem(Ke,Je(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){Fe(r,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),r}(),ie.registerComponent("TextTrackSettings",Xe)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var Qe=function(e){return new Promise(function(n,t){if(Ze(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},Ze=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},en=function(e,n,t){var r=Ce(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),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,"'")})},nn=function(e){var n=Ce(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},tn=function(){var e=re(oe.mark(function e(n){var t,r,o,i,l;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Ce(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,Qe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(ie),e.finish(13);case 16:(l=ie.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(o=window)&&void 0!==o&&o.cast?null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==r||r.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==Re()?null==r||r.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),rn=function(e,n){var t=Ce(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,i,l,a=this.el(),u=ie.dom.getPointerPosition(a,n).x;ie.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(s),s&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*u,d.seek()}})};var on=function(){var e=re(oe.mark(function e(){return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Qe("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)}}(),ln=function(){var n=re(oe.mark(function n(){return oe.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),an=function(){var e=re(oe.mark(function e(){return oe.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){ie.getPlugin("eme")||ie.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),un=function(){var e=re(oe.mark(function e(){var n;return oe.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(ie),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)}}(),sn=function(){var e=re(oe.mark(function e(){return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),cn=function(){var e=re(oe.mark(function e(){return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-e31d9fb5.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)}}(),dn=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){Qe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(ie)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(ie)})},loadAdsLibrary:on,loadEMELibrary:an,loadMuxPlugin:un,loadDvrSeekbar:sn,loadContribDash:cn,loadComscorePlugin:ln});function vn(e){return fn.apply(this,arguments)}function fn(){return(fn=re(oe.mark(function e(n){var t;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,on();case 3:t&&"Safari"==Re()&&Promise.resolve().then(function(){return dn}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function pn(e){return mn.apply(this,arguments)}function mn(){return(mn=re(oe.mark(function e(n){var t,r,o,i,l,a,u,s,c,d;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=Ce(n.playerId),e.next=3,ln();case 3:d.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,applicationName:(null==n||null===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(i=window)||void 0===i?void 0:i.siteName)||null,implementationId:null==n||null===(l=n.comscore)||void 0===l?void 0:l.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(u=n.comscore)||void 0===u?void 0:u.debug)||!1,persistentLabels:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function hn(e,n){return gn.apply(this,arguments)}function gn(){return(gn=re(oe.mark(function e(n,t){var r,o,i,l,a,u,s,c,d,v,f,p,m,h;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==t?void 0:t.contentType)||"video",v=null==t||null===(r=t[d])||void 0===r?void 0:r.drmEnabled,null==t||null===(o=t[d])||void 0===o||null===(i=o.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==t||null===(l=t[d])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.dash)||null,p=(null==n||null===(s=n.comscore)||void 0===s?void 0:s.enable)||!1,m=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([v?"Safari"==Re()?an():"caliente"!=(null===(h=window)||void 0===h?void 0:h.siteName)?cn():an():"Safari"!=Re()&&f?cn():null,p?pn(n):null,m?un():null,tn(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function yn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function bn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?yn(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):yn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var wn=new Set,kn=null,Sn=function(e,t,o,i){var l,a,u,s,c,d,v,f={},p=(null==e?void 0:e.contentType)||"video";f["c3.cm.id"]=(null===(l=e[p])||void 0===l?void 0:l.id)||"Null",f["c3.cm.contentType"]=Cn(e),f[null==o||null===(a=o.Constants)||void 0===a?void 0:a.IS_LIVE]=!(null==e||!e.linearchannel),f[null==o||null===(u=o.Constants)||void 0===u?void 0:u.STREAM_URL]=t.currentSrc(),f[null==o||null===(s=o.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===n()?"NULL":n(),f["c3.cm.categoryType"]=Dn(e),f["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"}}(),f.DRMEnabled=(null===(c=e[p])||void 0===c?void 0:c.drmEnabled)||"None",f.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(v=d.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",f[o.Constants.DEFAULT_RESOURCE]="AKAMAI",f["c3.cm.brand"]="NULL",f.CDVREnabled=On(e),f["c3.cm.genreList"]=In(e),f["c3.cm.genre"]=Tn(e),f["c3.cm.channel"]=En(e,i);var m=_n(r(),e);return f=bn(bn({},f),m)},Tn=function(e){var n,t,r,o=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[o])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},In=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"},En=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(r=((null==e||null===(t=e[o])||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===r?void 0:r.title)||"NULL"},Dn=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"},On=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},jn=function(e,n){var t,r,o=(n||{}).epg;if(o&&null!=o&&o.enable&&null!=o&&o.programTitle)return o.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},Cn=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Pn,xn,_n=function(e,n){var r,i,l,a,u,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return s;var c=o(),d=t();return s["c3.cm.seriesName"]=(null==n||null===(r=n.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",s["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",s["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(u=a[d-1])||void 0===u?void 0:u.title)||"Null",s["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",s},An=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"}},Rn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ln=function(){var e=re(oe.mark(function e(n,t){var r,o,l,a,u,s,c,d,v,f,p,m;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(null==t?void 0:t.convivaConfig)||{},o=r.trackConvivaPlayerEvent,l=r.paymentHandler,a=r.tveProvider,u=r.enable,s=r.appName,d=(c=t||{}).token,v=c.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=Ce(n),"function"==typeof(p=o)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(m=e.sent){e.next=13;break}return e.abrupt("return");case 13:f.ready(function(){var e=f.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=An(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var e,n;kn&&kn!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),wn.clear(),kn=f.currentSrc();var r=Rn(f.currentType()),o=i(),u=Sn(o,f,m,v);u[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",u[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=jn(o,t),u.authToken=d||"NULL",u.streamType=r,u.D2CType=l||"NONE",u.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",u["c3.cm.affiliate"]=a||"NULL",Nn.setData(u),p("contentInfo",u)}),f.on("loadedmetadata",function(){var e,n=f.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),f.on("play",function(){wn.has(f.currentSrc())||(wn.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){wn.has(f.currentSrc())&&wn.delete(f.currentSrc()),p("playbackEnded")}),f.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:f,adsLoader:null==e?void 0:e.adsLoader})}),f.on("dispose",function(){null==wn||wn.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Nn=(Pn={},{setData:function(e){Pn=bn(bn({},Pn),e)},getData:function(){return Pn}}),Mn=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-72fa8635.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-40c87ff8.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-e65f563d.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-997b3f54.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-4af91c1f.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-f3073421.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-ed831985.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-d8b7899d.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t?import("./skin-eb636f22.js").then(function(t){t.initialiseSkin(e,n)}):"CN_NEWS"==t&&import("./skin-dbb8e53c.js").then(function(t){t.initialiseSkin(e,n)})};function Un(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Bn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Un(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Un(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Fn=[],Hn=0,Vn=null;function zn(){xn=null,Fn=[],Hn=0,Vn=null}function qn(e,n,t){var r,o,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(r=n.watchHistory)||void 0===r||r.apiVersion;var d=null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(u=n.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,h=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),y={};m?function(e,n,t){var r=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),o=Gn(r),l=(new Date).getTime(),a=i(),u=(null==a?void 0:a.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Bn(Bn({},e),{},te({},n,u[n]))},{}),c=o.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===xn});c<0?o.push(Bn(Bn({content:s},e),{},{addedDate:l,updateDate:l})):o[c]=Bn(Bn(Bn({},o[c]),e),{},{updateDate:l});localStorage.setItem("".concat(r),JSON.stringify(o))}(y={completed:c,watchedTime:h,watchedPercentage:g},d,n.siteOwner):(y=Bn(Bn({videoId:xn,watchedTime:h,watchedPercentage:g,doneWatching:c,profileId:d},Vn&&{seriesId:Vn}),p&&{originalObjectId:p}),l(y).then(function(e){}).catch(function(e){})),Hn=v+t}function Gn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Wn(e,n,t){var r=Gn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return r&&Array.isArray(r)&&(o=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),o}var Kn=!1,Yn=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[o])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!Kn){var i=$n(e,"videoAssets","secondaryVideoAssets"),l=a(i,n);return l&&u(n,l),Kn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function $n(e,n,t){if(Array.isArray(e))return e.map(function(e){return $n(e,n,t)});if(null!==e&&"object"===Ne(e)){var r={};return Object.keys(e).forEach(function(o){o===n&&void 0!==e[t]?r[o]=e[t]:o===t&&void 0!==e[n]?r[o]=e[n]:r[o]=$n(e[o],n,t)}),r}return e}function Jn(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 Xn(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)?Xn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 Xn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Qn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Zn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qn(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var et=function(e,n,t,r){var o,l,a,u,m,h=r.res,g=r.sres,y=Ce(e),b=(null==h?void 0:h.contentType)||"video",w=(null==h||null===(o=h[b])||void 0===o?void 0:o.drmEnabled)||!1,k=!(null==h||null===(l=h[b])||void 0===l||null===(a=l.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===b,S=(null==h||null===(u=h[b])||void 0===u||null===(m=u.liveDetails)||void 0===m?void 0:m.isDvrEnabled)||!1;s(h),c.set(h),y&&(y.on("loadstart",function(){k?t.resolve({status:!0,msg:"Video Loaded",response:h}):t.resolve(Zn({status:!0,msg:"Player Initialised"},g?{seriesResponse:g,response:h}:{response:h}))}),y.on("loadeddata",function(){var t,r,o,l,a=Se(e);if(null==a||a.map(function(n){return Te(e,n.id)}),S&&"Safari"===Re())try{var u;null==y||null===(u=y.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&en(e,sessionStorage.getItem("volume")||"100");var s=i();if(d(n),v(),null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.isExternal){var c=Zn(Zn({},n),h);!function(e,n){var t,r,o;if(null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&"function"==typeof(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.cb)){var i,l,a,u=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,s=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.completionThreshold)||95,c=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.cb,d=-1;e.on("seeked",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(d=t,t>0){var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s})}}),e.on("timeupdate",function(){var n=Math.floor(e.currentTime()),t=n-n%u;if(n%u===0&&t!==d){d=t;var r=Math.floor(n/e.duration()*100);c({watchedTime:n,watchedPercentage:r,doneWatching:r>=s||!1})}}),e.on("ended",function(){c({watchedTime:Math.floor(e.duration()),watchedPercentage:100,doneWatching:!0})})}}(y,c)}else if(null!=n&&n.watchHistory&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var f,p,m=Zn(Zn({},n),h);!function(e,n,t){var r,o,i;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Vn=null==n||null===(o=n.series)||void 0===o?void 0:o.id),Fn=[],Hn=0,xn=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=Ce(e);a&&(a.on("dispose",zn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Fn.includes(Hn)||(e!=Hn||e<l?e>Hn&&(Hn=e+l):(Fn.push(e),qn(a,n,l)))}}),a.one("ended",function(){qn(a,n,l,!0)}))}(e,m,null==s||null===(f=s.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=y&&y.mux){var g,b,w,k,T,I,E=(null===(g=i())||void 0===g?void 0:g.video)||(null==h?void 0:h.video),D=null==E?void 0:E.gist,O={env_key:null==n||null===(b=n.analytics)||void 0===b?void 0:b.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==D?void 0:D.id,video_title:null==D?void 0:D.title,video_series:null==E||null===(k=E.series)||void 0===k?void 0:k.title,video_stream_type:null!=E&&null!==(T=E.streamingInfo)&&void 0!==T&&T.isLiveStream?"live":"video",viewer_user_id:null==n||null===(I=n.analytics)||void 0===I?void 0:I.userId};y.mux({debug:!1,data:O})}}),y.textTracks().on("change",function(n){var t=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];Ie(e),y.trigger("subtitlechanged",t)}),y.on("subtitlechanged",function(e,n){var t,r,o,i,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(i=o.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,h=p.getMediaSession(),g=h.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){k&&Yn(h,e)}),y.on("error",function(){var n,r;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&k)?Yn(h,e):(f(e,(null==y||null===(n=y.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==y||null===(r=y.error())||void 0===r?void 0:r.message)||"Some error occured",response:h}))}),y.one("play",function(){var e,t,r,o,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(r=t.appcmsMain)||void 0===r||null===(o=r.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,u,s,c=null===(a=i())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,d=p(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){y.currentTime(f)},0)}else{var h,g,b,w,k,S,T,I=null!==(h=null==n?void 0:n.watchHistoryResumeTime)&&void 0!==h?h:null==n||null===(g=n.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(b=null!==(w=null==n?void 0:n.watchedPercentage)&&void 0!==w?w:null==n||null===(k=n.watchHistory)||void 0===k?void 0:k.watchedPercentage)&&void 0!==b?b:0,D=null!==(S=null==n||null===(T=n.watchHistory)||void 0===T?void 0:T.completionThreshold)&&void 0!==S?S:95;I&&E<D&&setTimeout(function(){y.currentTime(I)},0)}if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(k){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var e,n=(null==y||null===(e=y.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==Ne(y.dash)){var t,r,o,i=null==y||null===(t=y.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=Jn(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],d=Jn(n);try{for(d.s();!(s=d.n()).done;){var v,f,p,m=s.value;("Chrome"==Re()||"Edge"==Re()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!w))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1")?y.audioTracks().removeTrack(m):c.push(m)}}catch(e){d.e(e)}finally{d.f()}for(var h=c.find(function(e){return"main"===e.kind}),g=h||c.find(function(e){return e.enabled})||c[0],b=0,k=c;b<k.length;b++){var S=k[b];S.enabled=S===g}}}))};function nt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function tt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nt(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rt(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 ot(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)?ot(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 ot(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var it={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0};function lt(e,n,t){T(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n})}function at(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var o=n[r[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var i=null==e?void 0:e.keySystemOptions;if(Array.isArray(i)){var l,a=rt(i);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function ut(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return at("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function st(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor(function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=I(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(E(r)){var o=D(e,null);O(o)||lt(t,r,o)}}catch(e){}return Promise.resolve(e)}),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter(function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()}),"function"==typeof n.on&&n.on("public_licenseRequestComplete",function(t){try{var r,o,i,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(o=t.error)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.responseCode)&&void 0!==r?r:D(null,t.error);lt((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||ut(e)||"","license",a)}catch(e){}}))}var ct=!1,dt=null,vt=new Set;function ft(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,vt.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,vt.delete(e),function(){if(ct&&!(vt.size>0)){var e=null==ie?void 0:ie.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof dt&&e.removeHook("beforeinitialize",dt),ct=!1,dt=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function pt(e){if(e){ft(e),function(){if(!ct){var e=null==ie?void 0:ie.Html5DashJS;e&&"function"==typeof e.hook&&(dt=function(e,n){null!=e&&e.__vlDrmDashEnabled&&st(e,n)},ct=!0,e.hook("beforeinitialize",dt))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!S(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;lt(ut(e),"license",null)}catch(e){}}))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse(function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),o=I(r,null==e?void 0:e.type);if(!E(o))return;var i=D(t,n);O(i)&&!n||lt(r,o,i)}catch(e){}}))}(e),st(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",function(){setTimeout(n,0)})}}var mt=function(e,n,t,r){var o,i,l,s,c,d,v,p,S,T,I,E,D,O,j,C,P,x,_,A,R,L,N,M,U,B,F,H,V,z,q,G,W,K,Y,$,J,X,Q=n.res,Z=void 0===Q?null:Q,ee=n.sres,ne=void 0===ee?null:ee,le=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=it[r]?it[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ae=le.playerDebug,ue=le.logLevel,se=le.dashLogLevel;ae&&(console.log("[PLAYER DEBUG] config:",t),console.log("[PLAYER DEBUG] entitlement (res):",Z),ne&&console.log("[PLAYER DEBUG] series response (sres):",ne));var ce=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],de=(null===(o=Z)||void 0===o?void 0:o.contentType)||"video",ve=Pe(null===(i=Z)||void 0===i||null===(l=i[de])||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.videoImageUrl)||Pe(null===(c=Z)||void 0===c||null===(d=c[de])||void 0===d||null===(v=d.gist)||void 0===v||null===(p=v.imageGist)||void 0===p?void 0:p.r16x9),fe=(null===(S=Z)||void 0===S||null===(T=S[de])||void 0===T||null===(I=T.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,pe=!(null===(E=Z)||void 0===E||null===(D=E[de])||void 0===D||null===(O=D.streamingInfo)||void 0===O||!O.isLiveStream)||"linearchannel"===de,me=(null===(j=Z)||void 0===j||null===(C=j.ads)||void 0===C||null===(P=C.preRoll)||void 0===P||null===(x=P.adTags)||void 0===x||null===(_=x.web)||void 0===_?void 0:_.active)&&(null===(A=Z)||void 0===A||null===(R=A.ads)||void 0===R||null===(L=R.preRoll)||void 0===L||null===(N=L.adTags)||void 0===N||null===(M=N.web)||void 0===M?void 0:M.url);Z=tt(tt({},Z),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var he=(null==t||null===(U=t.customData)||void 0===U?void 0:U.ads)||{},ge=(null===(B=Z)||void 0===B||null===(F=B[de])||void 0===F?void 0:F.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==he?void 0:he.vodAdSticherProvider)||!1,ye=!(null===(H=Z)||void 0===H||null===(V=H[de])||void 0===V||!V.isSSAIEnabled)&&"TRANSMIT"==(null==he?void 0:he.liveAdSticherProvider)&&!(null==he||!he.liveAdClientSideTracking),be=(null==t?void 0:t.latency)||6,we=(null==t?void 0:t.skin_settings)||{},ke=null,Se=(J={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==we?void 0:we.pictureInPictureToggle)||!1},playbackRates:null!=we&&we.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==t.skin,liveui:fe},te(J,"autoplay",null==t?void 0:t.autoplay),te(J,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!me),te(J,"loop",(null==t?void 0:t.loop)||!1),te(J,"audioPosterMode",null==t?void 0:t.audioPosterMode),te(J,"html5",tt(tt({dash:tt(tt({},!ie.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:tt(tt({},((null==t?void 0:t.debugConfig)&&(null==t||null===(z=t.debugConfig)||void 0===z?void 0:z.enable)||ae)&&{debug:{logLevel:se}}),{},{streaming:{delay:{liveDelay:be},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:tt({},"IE"==Re()&&{enableStallFix:!0,stallSeek:1}),abr:tt(tt(tt(tt({},(null==t?void 0:t.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==t?void 0:t.initialBandwidth)/1e3}}),(null==t?void 0:t.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==t?void 0:t.maxBitrate)/1e3}}),(null==t?void 0:t.minBitrate)&&{minBitrate:{audio:-1,video:(null==t?void 0:t.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:tt(tt(tt({},(null==t?void 0:t.initialBandwidth)&&{bandwidth:t.initialBandwidth}),{},{liveRangeSafeTimeDelta:be,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==t||!t.initialBandwidth},(null==t||null===(q=t.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(G=null==t?void 0:t.enableLowInitialPlaylist)&&void 0!==G&&G},((null==t?void 0:t.debugConfig)&&(null==t||null===(W=t.debugConfig)||void 0===W?void 0:W.enable)||ae)&&{debug:!0}),debug:(null==t?void 0:t.debugConfig)&&(null==t||null===(K=t.debugConfig)||void 0===K?void 0:K.enable)||ae||!1,nativeTextTracks:"Safari"==Re()},0==(null==t||null===(Y=t.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===($=t.customData)||void 0===$?void 0:$.nativeVideoTracks)&&{nativeVideoTracks:!1})),te(J,"poster",ve),te(J,"techOrder",ce),te(J,"chromecast",{requestCustomDataFn:function(n){var r,o,i=Ce(e),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var r,o,i,l,a,u,s,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,h,g,y,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==T?void 0:T.url)||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(g=h[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=I;var E=(null==T?void 0:T.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"]);p.licenseToken=E}var D=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=D;var O=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=O;var j=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=j;var C=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=C,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,n,l),u=l.find(function(e){return"showing"===e.mode})||null;return ke=u?{language:u.language||u.lang||null,label:u.label||null}:null,tt(tt({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:m.get()||null,convivaMetaData:tt({customerKey:(null==t||null===(r=t.convivaConfig)||void 0===r?void 0:r.customerKey)||null,debug:(null==t||null===(o=t.convivaConfig)||void 0===o?void 0:o.debug)||!1},Nn.getData())})},modifyLoadRequestFn:function(n){var t,r,o,i,l,a=Ce(e),u=(null==a?void 0:a.currentSource())||{};!(null===(t=Z)||void 0===t||null===(r=t[de])||void 0===r||null===(o=r.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),J);if(!ie.getPlayers()[e]){(null!=t&&t.debugConfig&&null!=t&&null!==(X=t.debugConfig)&&void 0!==X&&X.enable||ae)&&ie.log.level(ue||"debug");var Te=ie(e,Se,function(){var n=re(oe.mark(function n(){var o,i,l,s,c,d,v,p,m,S,T,I,E,D,O,j,C,P,x,_,A,R;return oe.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return pt(Te),console.log(Te),console.log(ie.VERSION),console.log(ie.getPlugins()),n.next=6,hn(t,Z);case 6:if(null!=t&&t.debugConfig&&null!=t&&null!==(o=t.debugConfig)&&void 0!==o&&o.enable||ae){try{ie.log.level(ue||"debug")}catch(e){}(E=function(){try{var e,n,t;null==Te||null===(e=Te.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:se}})}catch(e){}})(),Te.one("loadedmetadata",E)}if(D=null===(i=Z)||void 0===i||null===(l=i[de])||void 0===l||null===(s=l.liveDetails)||void 0===s?void 0:s.startOverTime,pe&&r.resolve(tt({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Z}:{response:Z})),y(e,{analyticsCb:null==t?void 0:t.analyticsCb,analyticsEventParams:null==t?void 0:t.analyticsEventParams,userId:null==t?void 0:t.userId}),Ln(e,t),Te.on("chromecastConnected",function(){var e=Te.textTracks().tracks_.find(function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode}),n=e?{language:e.language||null,label:e.label||null}:null,t=function(){var e=n||ke;if(e){var t=Te.textTracks().tracks_.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}),r=t.find(function(n){return e.language&&n.language===e.language})||t.find(function(n){return e.label&&n.label===e.label})||t[0];r&&"showing"!==r.mode&&(r.mode="showing")}};Te.one("loadeddata",function(){return setTimeout(t,0)}),setTimeout(t,1500)}),/Android/i.test(navigator.userAgent)&&(ie.options.vhs.overrideNative=!0),fe&&rn(e,D),!me||null!=t&&null!==(c=t.customData)&&void 0!==c&&c.disableAds||b(e,me,Z),O=a(Z,e),console.log(O),ae&&(console.log("[PLAYER DEBUG] source:",O),console.log("[PLAYER DEBUG] videojs options:",Se)),null!=t&&t.nearestClusterUrl&&(O=w(O,t.nearestClusterUrl)),!ge){n.next=25;break}return n.next=22,k(e,Z);case 22:O=n.sent,n.next=29;break;case 25:if(!ye){n.next=29;break}return n.next=28,g(O,Z,e);case 28:O=n.sent;case 29:Te&&(Te.__vlDrmLicenseUrl=at(O)),O?u(e,O):(r.reject({status:!1,msg:"Incompatible / Missing Source",response:Z}),f(e,"Incompatible / Missing Source")),((null===(d=Z)||void 0===d||null===(v=d[de])||void 0===v||null===(p=v.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(S=Z)||void 0===S||null===(T=S[de])||void 0===T||null===(I=T.closedCaptions)||void 0===I?void 0:I.length)>0)&&(R=(null===(C=Z)||void 0===C||null===(P=C[de])||void 0===P||null===(x=P.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(_=Z)||void 0===_||null===(A=_[de])||void 0===A?void 0:A.closedCaptions),j=R.filter(function(e){return"VTT"===e.format}),Ee(e,j)),null!=t&&t.disableControls?h(e):Mn(e,tt(tt(tt({},t),Se),{},{liveVideo:pe,isDvrEnabled:fe,res:Z,sres:ne})),et(e,tt(tt(tt({},t),Se),{},{liveVideo:pe}),r,{res:Z,sres:ne});case 34:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function ht(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function gt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ht(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ht(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var yt=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=bt(e);mt(o,{res:i},e,{resolve:t,reject:r})},bt=function(e){var n,t,r,o,i,l,a,u,s,c,d,v,f,p=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,h=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,g=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.url)||null,y=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,b=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],w=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,k=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],S=(null==e||null===(c=e.customData)||void 0===c||null===(d=c.ads)||void 0===d?void 0:d.isSSAIEnabled)||!1,T=null==e?void 0:e.token,I=j(T);null==I||I.site;var E=null==I?void 0:I.siteId,D=(null==e||null===(v=e.customData)||void 0===v||null===(f=v.comscore)||void 0===f?void 0:f.video)||null,O=gt(gt({id:"".concat(E,"_external")},!h&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:gt(gt(gt(gt(gt({drmEnabled:h,streamingInfo:gt(gt({videoAssets:gt(gt({},w&&{drmProvider:w}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==p?void 0:p.isDvrEnabled)&&{isLiveStream:!0}),(null==D?void 0:D.isLiveStream)&&{isLiveStream:null==D?void 0:D.isLiveStream})},S&&{isSSAIEnabled:S}),{},{metadata:k,liveDetails:{isDvrEnabled:null==p?void 0:p.isDvrEnabled},gist:gt(gt(gt({},y&&{videoImageUrl:y}),(null==D?void 0:D.videoId)&&{id:null==D?void 0:D.videoId}),(null==D?void 0:D.videoTitle)&&{title:null==D?void 0:D.videoTitle}),contentDetails:gt({},(null==b?void 0:b.length)>0&&{closedCaptions:Me(b)})},(null==D?void 0:D.runtime)&&{runtime:null==D?void 0:D.runtime}),(null==D?void 0:D.publishDate)&&{publishDate:null==D?void 0:D.publishDate}),(null==D?void 0:D.platform)&&{platform:null==D?void 0:D.platform}),(null==D?void 0:D.series)&&{series:null==D?void 0:D.series}),ads:{preRoll:{adTags:{web:gt(gt({},g&&{active:!0}),g&&{url:g})}}}});return D&&(null!=D&&D.isDvrEnabled&&(O.video.liveDetails=gt(gt({},O.video.liveDetails),{},{isDvrEnabled:null==D?void 0:D.isDvrEnabled})),null!=D&&D.metadata&&(O.video.metadata=[].concat(Me(O.video.metadata),Me(null==D?void 0:D.metadata)))),O};function wt(e,n){return kt.apply(this,arguments)}function kt(){return(kt=re(oe.mark(function e(n,t){var r,o,i,l,a,u,c,d,v;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,c=!(null==n||!n.anonymousId),e.next=6,_();case 6:d=e.sent,v=!1===(null==n||null===(r=n.customData)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.isSSAIEnabled),C(a,d,v).then(function(e){var t,r,o,v,f,p,m,h,g,y,b;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,s(null==e?void 0:e.data);var w=null==e||null===(v=e.data)||void 0===v||null===(f=v.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.scheduleEndDate,k=null==e||null===(m=e.data)||void 0===m||null===(h=m.video)||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.scheduleStartDate;ve(u,{scheduleEndDate:w,scheduleStartDate:k});var S=null==e?void 0:e.data;if(null!=n&&null!==(y=n.watchHistory)&&void 0!==y&&y.isExternal)S.contentType="video",mt(u,{res:S},n,{resolve:i,reject:l});else if(null!=n&&n.watchHistory&&null!=n&&null!==(b=n.watchHistory)&&void 0!==b&&b.enable&&!c){var T;if((null===(T=n.watchHistory)||void 0===T?void 0:T.saveOffline)||!1){var I,E,D,O=Wn((null===(I=n.watchHistory)||void 0===I?void 0:I.profileId)||"",a,null==n?void 0:n.siteOwner);if(O&&O.length)n.watchHistoryResumeTime=(null===(E=O[0])||void 0===E?void 0:E.watchedTime)||null,n.watchedPercentage=(null===(D=O[0])||void 0===D?void 0:D.watchedPercentage)||null;S.contentType="video",mt(u,{res:S},n,{resolve:i,reject:l})}else P(a,d).then(function(e){var t,r,o,i,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(){}).finally(function(){mt(u,{res:S},n,{resolve:i,reject:l})})}else mt(u,{res:S},n,{resolve:i,reject:l})}).catch(function(e){var t,r,o=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,i=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;o&&fe(u,e,i),x(e,u,l,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function St(e,n){return Tt.apply(this,arguments)}function Tt(){return(Tt=re(oe.mark(function e(n,t){var r,o,i,l,a,u,s,c;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,_();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,c=!1===(null==n||null===(r=n.customData)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.isSSAIEnabled),A(s,a,c).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,mt(u,{res:t},n,{resolve:i,reject:l})}).catch(function(e){x(e,u,l,videoId)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function It(e,n){return Et.apply(this,arguments)}function Et(){return(Et=re(oe.mark(function e(n,t){var r,o,i,l,a,u,c;return oe.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,i=t.reject,e.next=3,_();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,N.set(parseInt(u)),c=null==n||null===(r=n.series)||void 0===r?void 0:r.id,R(c,l).then(function(e){var t,r,u,d=e.data,v=e.data.seasons;M(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(u=r[0])||void 0===u?void 0:u.id);L(c,l),C(f,l).then(function(e){var t,r,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,s(e.data),mt(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:o,reject:i})}).catch(function(e){x(e,a,i,videoId)})}).catch(function(e){x(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Dt,Ot=(Dt=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n:[];return Dt.set(e,t),t},get:function(e){return Dt.get(e)||[]},remove:function(e){Dt.delete(e)}});function jt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ct(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 Pt(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)?Pt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 Pt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var xt=function(e){var n=Date.parse(null==e?void 0:e.eventStartUtc),t=Number.isFinite(n)?n/1e3:0;return{start:t+(Number(null==e?void 0:e.startTime)||0),end:t+(Number(null==e?void 0:e.endTime)||0)}},_t=function(e){var n;try{var t,r,o=null==e||null===(t=e.liveTracker)||void 0===t||null===(r=t.seekableEnd)||void 0===r?void 0:r.call(t);if(Number.isFinite(o))return o}catch(e){}var i=null==e||null===(n=e.seekable)||void 0===n?void 0:n.call(e);return i&&i.length?i.end(i.length-1):NaN};function At(e){var n=null,t=null,r="none",o=function(o){var i=Ce(e);if(!i)return null;if("pdt"===r&&null!=n)return t+(o-n);var l=_t(i);return Number.isFinite(l)?l-(Date.now()/1e3-o):null},i=function(){var n=Ce(e),t=n&&n.seekable();return t&&t.length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}};return{refreshAnchor:function(){var o=Ce(e);if(o){var i=function(e){try{var n=e.tech(!0),t=n&&n.vhs,r=t&&t.playlists,o=r&&"function"==typeof r.media&&r.media();return o&&o.segments||null}catch(e){return null}}(o),l=o.currentTime()||0;if(i&&i.length){var a,u=null,s=1/0,c=Ct(i);try{for(c.s();!(a=c.n()).done;){var d=a.value;if(d&&"number"==typeof d.programDateTime&&"number"==typeof d.start&&Number.isFinite(d.start)){var v=Math.abs(d.start-l);v<s&&(s=v,u=d)}}}catch(e){c.e(e)}finally{c.f()}if(u)return n=u.programDateTime/1e3,t=u.start,void(r="pdt")}n=null,t=null,r="now"}},anchorInfo:function(){return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?jt(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):jt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({anchorPdtSec:n,anchorPlayerT:t,source:r},i())},chapterToPlayerTime:function(e){return o(xt(e).start)},chapterStartPercent:function(e){return function(e){var n=i(),t=n.start,r=n.end;if(!(r>t))return null;var l=o(e);return null==l||l<t||l>r?null:(l-t)/(r-t)*100}(xt(e).start)},playerTimeToChapterIndex:function(o,i){var l=function(o){var i=Ce(e);if(!i)return null;if("pdt"===r&&null!=n)return n+(o-t);var l=_t(i);return Number.isFinite(l)?Date.now()/1e3-(l-o):null}(o);if(null==l)return-1;for(var a=-1,u=0;u<i.length;u++){var s=xt(i[u]),c=s.start,d=s.end,v=Math.max(d,c+.001);l>=c&&l<v&&(a=u)}return a},windowBounds:i}}function Rt(e){return"livedvr"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).timeMode?At(e):function(e){var n=function(e){return Number(null==e?void 0:e.startTime)||0},t=function(e){var t=Number(null==e?void 0:e.endTime);return Number.isFinite(t)?t:n(e)};return{chapterToPlayerTime:function(e){return n(e)},chapterStartPercent:function(t){var r=Ce(e),o=r&&r.duration();if(!Number.isFinite(o)||o<=0)return null;var i,l=n(t);return l<0||l>o?null:100*((i=l/o)<0?0:i>1?1:i)},playerTimeToChapterIndex:function(e,r){for(var o=-1,i=0;i<r.length;i++){var l=n(r[i]),a=Math.max(t(r[i]),l+.001);e>=l&&e<a&&(o=i)}return o},windowBounds:function(){var n=Ce(e),t=n&&n.duration();return{start:0,end:Number.isFinite(t)?t:0}},refreshAnchor:function(){},anchorInfo:function(){return{source:"vod"}}}}(e)}var Lt="chapter-change",Nt="chapter-click",Mt="chapters-updated";function Ut(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Ce(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Bt(e){var n=Ce(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(Lt,e)},onChapterClick:function(e){return t(Nt,e)},onChaptersUpdated:function(e){return t(Mt,e)}}}var Ft="vjs-chapter-marker",Ht="vjs-chapter-preview",Vt=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function zt(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,i=void 0===o?{}:o,l=n.seek,a=Ce(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=function(){return!0===(null==i?void 0:i.enable)},v=function(n,t){var o=Ce(e),i=Vt(o);if(i){var l=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=Ht;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(i);l._time.textContent=function(e){try{var n=r.chapterToPlayerTime(e);if(null==n||!Number.isFinite(n))return"";if("vod"===("function"==typeof r.anchorInfo?r.anchorInfo():{}).source)return ie.formatTime(n,n);var t=(r.windowBounds()||{}).end;if(!Number.isFinite(t))return"";var o=Math.max(0,t-n);return"-".concat(ie.formatTime(o,o))}catch(e){return""}}(n),l._label.textContent=(null==n?void 0:n.label)||"",l.classList.add("vjs-chapter-preview--visible");var a="function"==typeof(null==o?void 0:o.el)?o.el():null;a&&a.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var o="function"==typeof(null==t?void 0:t.el)?t.el():null;if(o){var i=o.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=i.left+8+u,d=i.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(l,i,o,t)}},f=function(){s&&s.classList.remove("vjs-chapter-preview--visible");var n=Ce(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},p=function(n){var t=document.createElement("div");t.className=Ft,t.dataset.segmentId=String(n.segmentId);var o=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=_e(n);r&&t.appendChild(r)}else{var o=document.createElement("img");o.src=n,o.alt="",t.appendChild(o)}return t}(n);return o&&t.appendChild(o),t.addEventListener("click",function(t){t.stopPropagation(),"function"==typeof l&&l(n.segmentId),Ut(e,Nt,{chapter:n})}),t.addEventListener("mouseenter",function(){var e=r.chapterStartPercent(n);null!=e&&v(n,e)}),t.addEventListener("mouseleave",f),t},m=function(){d()&&0!==u.size&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=u.get(String(e.segmentId));if(n){var t=r.chapterStartPercent(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}}))},h=0,g=function(n){u.forEach(function(e){return e.classList.remove("".concat(Ft,"--active"))});var r=t.get(e),o=n>=0?r[n]:null;if(o){var i=u.get(String(o.segmentId));i&&i.classList.add("".concat(Ft,"--active"))}},y=function(){var n=Ce(e);if(n){var o=t.get(e),i=r.playerTimeToChapterIndex(n.currentTime()||0,o);-1===i&&Date.now()<h||i!==c&&(c=i,g(i),Ut(e,Lt,{chapter:i>=0?o[i]:null}))}},b=xe(function(){m(),y()},1e3),w=function(){m(),y()};a.on("timeupdate",b),a.on("seeked",w);var k=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",m),k=!0)}catch(e){}var S=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(S=setInterval(m,500));return{render:function(){var n=Ce(e),o=Vt(n);o&&(o.querySelectorAll(".".concat(Ft)).forEach(function(e){return e.remove()}),u.clear(),d()&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=p(e);o.appendChild(n),u.set(String(e.segmentId),n)}),m(),g(c),y()))},reposition:m,destroy:function(){try{a.off("timeupdate",b),a.off("seeked",w),k&&a.liveTracker.off("liveedgechange",m)}catch(e){}S&&(clearInterval(S),S=null);var n=Vt(Ce(e));n&&n.querySelectorAll(".".concat(Ft,", .").concat(Ht)).forEach(function(e){return e.remove()}),u.clear(),s=null},setActiveBySegment:function(n){var r=t.get(e),o=r.findIndex(function(e){return String(e.segmentId)===String(n)});o<0||(h=Date.now()+1500,o!==c&&(c=o,g(o),Ut(e,Lt,{chapter:r[o]})))}}}var qt=new Map,Gt=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Wt=function(e){var n=qt.get(e);if(n)return n;n={mapper:Rt(e,{timeMode:"vod"}),markers:null,chaptersConfig:{},timeMode:"vod"},qt.set(e,n);var t=Ce(e);return t&&t.on("dispose",function(){return Zt(e)}),n},Kt=function(e){var n=qt.get(e),t=function(e){var n=qt.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=Ce(e);return t&&Gt(t)?(n.markers=zt(e,{store:Ot,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return Qt(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function Yt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,o=n.timeMode,i=void 0===o?"vod":o;n.res;var l=n.chaptersConfig,a=void 0===l?{}:l,u=Ce(e);if(!u)return!1;Array.isArray(r)&&r.length&&Ot.set(e,r);var s=qt.get(e);null!=s&&s.markers&&s.markers.destroy();var c={mapper:Rt(e,{timeMode:i}),markers:null,chaptersConfig:a||{},timeMode:i,disposed:!1};qt.set(e,c);var d=function(){c.disposed||Kt(e)};return u.one("loadeddata",d),Gt(u)&&d(),u.on("dispose",function(){return Zt(e)}),!0}function $t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Wt(e),Ot.set(e,n),Kt(e),Ut(e,Mt,{chapters:Ot.get(e)}),!0}function Jt(e){return Ot.get(e)}function Xt(e){Ot.set(e,[]);var n=qt.get(e);return null!=n&&n.markers&&n.markers.render(),Ut(e,Mt,{chapters:[]}),!0}function Qt(e,n){var t,r,o=Ce(e),i=Wt(e);if(!o)return!1;var l=Ot.get(e).find(function(e){return e.segmentId===n});if(!l)return!1;i.mapper.refreshAnchor();var a=i.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=i.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),o.currentTime(a),null===(t=i.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Zt(e){var n=qt.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),qt.delete(e),Ot.remove(e)}var er,nr=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,o=e.sseEndpoint,l=e.debug;if(n){var a=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,o=e.debug,l=void 0!==o&&o;return Ue({site:n,sseBaseUrl:t,getToken:_,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;l&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,o,a,u,s,c,d,v;if(l&&console.log("SSE Message:",e),(null===(n=i())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(o=e.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var f=1e3*(null==e||null===(a=e.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),p=1e3*(null==e||null===(c=e.payload)||void 0===c||null===(d=c.states)||void 0===d||null===(v=d.end)||void 0===v?void 0:v.endDateTime);f&&p&&(console.log("Setting schedule timer",f,p),pe.set({startDateTime:f,endDateTime:p}))}},onReconnectAttempt:function(e){l&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;l&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){l&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){l&&console.error("SSE Error:",e,n)},onClose:function(){l&&console.log("SSE Closed")}})}({site:t,sseBaseUrl:r,sseEndpoint:o,debug:void 0!==l&&l});return a._sseBaseUrl=r,a._site=t,a._sseEndpoint=o,a}};function tr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function rr(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?tr(Object(t),!0).forEach(function(n){te(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function or(){return{loadVideoInstantly:U,onTimeUpdate:me,getVideoDuration:he,onVideoEnded:ge,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=re(oe.mark(function n(t,r){var o,i,l,a,u,s,c,d,v,f,p,m,h,g,y,b,w,k,S,T,I,E,D,O,j,P,_,A,R,L,N,M;return oe.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!z(null==e?void 0:e.playerId)){n.next=3;break}return t({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(S=(null==e?void 0:e.videoSourceUrl)||!1,T=null==e?void 0:e.asat,I=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,E=null==e?void 0:e.videoId,D=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,O=(null==e?void 0:e.streamingInfo)||!1,window.videoId=E,j=null==e?void 0:e.token,!Q(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",j),Z().set(null==e?void 0:e.refreshToken),j&&!ee(j)){n.next=17;break}return r({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 17:er=JSON.parse(atob(j.split(".")[1]));case 18:return window.siteName=null===(l=er)||void 0===l?void 0:l.site,window.siteId=null===(a=er)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(u=er)||void 0===u||!u.anonymousId),e.siteOwner=(null===(s=er)||void 0===s?void 0:s.site)||null,e.userId=(null===(c=er)||void 0===c?void 0:c.userId)||null,$((null===(d=er)||void 0===d?void 0:d.userId)||(null===(v=er)||void 0===v?void 0:v.anonymousId)||null),window.watchHistory=e.watchHistory||null,P=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable?null:null==e?void 0:e.chromecastReceiverId,_=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(A=null==e?void 0:e.errors)&&(window.customErrors=A),window.customData=null==e?void 0:e.customData,Le(null==e||null===(m=e.customData)||void 0===m?void 0:m.localisation),J.set(e.apiBaseUrl),null!=e&&e.skin&&!Ae(e.skin)||(e.skin="VL_ONE"),X.setConfig(e),Be.reset(),Be.set(null==e?void 0:e.relatedVideos),n.next=39,vn(e);case 39:_&&Qe("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then(function(){return ne(_)}).catch(function(e){}),(R=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(P)))&&R.addEventListener("contextmenu",function(e){return e.preventDefault()}),(L=nr({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(y=e.sse)||void 0===y?void 0:y.siteName,sseBaseUrl:null==e||null===(b=e.sse)||void 0===b?void 0:b.sseBaseUrl,sseEndpoint:null==e||null===(w=e.sse)||void 0===w?void 0:w.sseEndpoint,debug:null==e||null===(k=e.sse)||void 0===k?void 0:k.debug}))&&!L.isConnectionActive()&&L.connect(),S?(M={directPlaybackUrl:S,id:N="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},T?C(N,j).then(function(n){var o=(null==n?void 0:n.data)||{};mt(P,{res:rr(rr({},o),M)},e,{resolve:t,reject:r})}).catch(function(e){x(e,P,r,N)}):mt(P,{res:M},e,{resolve:t,reject:r})):O?yt(e,{resolve:t,reject:r}):D?It(e,{resolve:t,reject:r}):I?St(e,{resolve:t,reject:r}):wt(e,{resolve:t,reject:r});case 45:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:Oe,skip:B,getPlayer:Ce,play:F,pause:H,detectBrowser:Re,rewind:V,loadVideo:u,seekToTimeStamp:ye,isPlayerInitialised:z,load:q,authenticateLC:G,dispose:W,enableCaptions:De,disableCaptions:Te,getCaptions:Se,playSelectedResolution:je,getSource:a,setVolume:en,getVolume:nn,disableControls:h,setPlaybackSpeed:be,getEntitlementData:K,getSsaiEvents:Y,playerEvents:we,onReplay:ke,relatedVideosManager:Be,setChapters:$t,getChapters:Jt,clearChapters:Xt,seekToChapter:Qt,getChapterEvents:Bt}}export{or as V,Yt as i};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import"./generic-abae2ca9.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-
|
|
1
|
+
import"video.js/dist/video-js.min.css";import"./generic-abae2ca9.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-27f21ff2.js";import"./index-7a33fd81.js";import"./captions-75f20905.js";import"./renditions-620d93b3.js";import"./resolution-2ee017b4.js";import"./skin-3653c5b3.js";import"./browser-de5f6a74.js";import"./localisation-0bf399a1.js";import"./relatedVideosManager-8dd9aa24.js";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/get";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"@viewlift/sse";import"@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,p as e,e as i}from"./skin-3653c5b3.js";import{i as n}from"./index-a0c37b30.js";import{Z as o}from"./generic-abae2ca9.js";import{e as r}from"./features-fdad18aa.js";import{g as t}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/get";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./index-7a33fd81.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-75f20905.js";import"./renditions-620d93b3.js";import"./resolution-2ee017b4.js";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-de5f6a74.js";import"@viewlift/comscore/index.js";import"@viewlift/sse";import"./relatedVideosManager-8dd9aa24.js";import"axios";import"md5";import"js-cookie";var a='<svg xmlns="http://www.w3.org/2000/svg" style="display:none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',s='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';function u(u,v){l(u).addClass("skin_cn_news"),function(n,o){var r,s,u,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(a),null!==(r=c.el().firstChild)&&void 0!==r?r:null),null===(s=c.controlBar)||void 0===s||s.removeChild("VolumePanel"),null===(u=c.controlBar)||void 0===u||u.addChild("VolumePanel",{inline:!0},1),!(null!==(v=c.controlBar)&&void 0!==v&&v.getChild("PictureInPictureToggle"))){var d,C,p=null===(d=c.controlBar)||void 0===d?void 0:d.getChild("FullscreenToggle"),m=p?c.controlBar.children().indexOf(p):void 0;null===(C=c.controlBar)||void 0===C||C.addChild("PictureInPictureToggle",{},m)}(function(l){var e,n,o,r=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PlayToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!r)return;var t=i(r,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",function(){return t.setAttributeNS(null,"href","#vjs-icon-pause")}),l.on("pause",function(){return t.setAttributeNS(null,"href","#vjs-icon-play")})})(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,r=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!r)return;var t=i(r,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",function(){var e=l.muted()||0===l.volume();t.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")})}(c),function(l){var e,n,o,r=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PictureInPictureToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!r)return;i(r,"#vjs-icon-pip")}(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,r=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!r)return;i(r,"#vjs-icon-captions");var t=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var r=e[n];if(("captions"===r.kind||"subtitles"===r.kind)&&"showing"===r.mode){i=!0;break}}o.classList.toggle("vjs-cc-on",i)};t(),l.textTracks().on("change",t)}(c),function(l){var e,n,o,r=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!r)return;var t=i(r,"#vjs-icon-fullscreen");l.on("fullscreenchange",function(){null==t||t.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}(c),function(l,e){var i,n=null==l||null===(i=l.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var o,r,a=n.el().querySelector(".vjs-seek-to-live-text"),s=t("liveText")||"LIVE",u=t("goLiveText")||"GO LIVE",v=function(){var e,i;a&&(a.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?s:u)};v(),l.on("timeupdate",v),null===(o=l.liveTracker)||void 0===o||null===(r=o.on)||void 0===r||r.call(o,"liveedgechange",v),n.on("click",function(){if(l.paused())try{l.play()}catch(l){}})}if(null!=e&&e.liveVideo&&null!=e&&e.liveui&&l.liveTracker){var c=function(){return function(l){var e,i,n,o,r=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!r)return;var t=r.querySelector(".vjs-remaining-time-display");null!==(n=l.liveTracker)&&void 0!==n&&null!==(o=n.atLiveEdge)&&void 0!==o&&o.call(n)?r.style.display="none":(r.style.display="flex",t&&(t.innerText=(a=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),s=Math.floor(a/3600),u=Math.floor(a%3600/60),v=Math.floor(a%60),c=function(l){return String(l).padStart(2,"0")},0===s?"".concat(c(u),":").concat(c(v)):"".concat(c(s),":").concat(c(u),":").concat(c(v)))));var a,s,u,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,o)}(u,v),function(e,i){var t,a,u,v,c,d,C=(null==i?void 0:i.liveVideo)||!1,p=(null==i||null===(t=i.res)||void 0===t?void 0:t.contentType)||"video",m=(null==i||null===(a=i.res)||void 0===a||null===(u=a[p])||void 0===u||null===(v=u.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,h=C&&m?"livedvr":"vod";(null!=i&&i.liveui||m)&&r(e,"CN_NEWS",s);var f=o.getConfig();if(null!=f&&null!==(c=f.chaptersConfig)&&void 0!==c&&c.enable||null!=f&&null!==(d=f.chapters)&&void 0!==d&&d.length){var g;!function(e,i){var n,o=null===(n=l(e))||void 0===n?void 0:n.el();if(!o||!i)return;var r=function(l,e){null!=e&&""!==e&&o.style.setProperty(l,e)};r("--vl-chapter-color",i.markerColor),r("--vl-chapter-active",i.markerActiveColor),r("--vl-chapter-hover",i.markerHoverColor),r("--vl-chapter-size",null!=i.markerSize?"".concat(i.markerSize,"px"):null),r("--vl-chapter-opacity",null!=i.markerOpacity?String(i.markerOpacity):null),r("--vl-chapter-tooltip",i.tooltipColor)}(e,null==f||null===(g=f.chaptersConfig)||void 0===g?void 0:g.style),n(e,{chapters:(null==f?void 0:f.chapters)||[],timeMode:h,res:null==i?void 0:i.res,chaptersConfig:(null==f?void 0:f.chaptersConfig)||{}})}}(u,v)}export{u as initialiseSkin};
|
|
1
|
+
import{g as l,p as e,e as i}from"./skin-3653c5b3.js";import{i as n}from"./index-27f21ff2.js";import{Z as o}from"./generic-abae2ca9.js";import{e as r}from"./features-fdad18aa.js";import{g as t}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/get";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./index-7a33fd81.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-75f20905.js";import"./renditions-620d93b3.js";import"./resolution-2ee017b4.js";import"@babel/runtime/helpers/assertThisInitialized";import"./browser-de5f6a74.js";import"@viewlift/comscore/index.js";import"@viewlift/sse";import"./relatedVideosManager-8dd9aa24.js";import"axios";import"md5";import"js-cookie";var a='<svg xmlns="http://www.w3.org/2000/svg" style="display:none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',s='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';function u(u,v){l(u).addClass("skin_cn_news"),function(n,o){var r,s,u,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(a),null!==(r=c.el().firstChild)&&void 0!==r?r:null),null===(s=c.controlBar)||void 0===s||s.removeChild("VolumePanel"),null===(u=c.controlBar)||void 0===u||u.addChild("VolumePanel",{inline:!0},1),!(null!==(v=c.controlBar)&&void 0!==v&&v.getChild("PictureInPictureToggle"))){var d,C,p=null===(d=c.controlBar)||void 0===d?void 0:d.getChild("FullscreenToggle"),m=p?c.controlBar.children().indexOf(p):void 0;null===(C=c.controlBar)||void 0===C||C.addChild("PictureInPictureToggle",{},m)}(function(l){var e,n,o,r=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PlayToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!r)return;var t=i(r,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",function(){return t.setAttributeNS(null,"href","#vjs-icon-pause")}),l.on("pause",function(){return t.setAttributeNS(null,"href","#vjs-icon-play")})})(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,r=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!r)return;var t=i(r,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",function(){var e=l.muted()||0===l.volume();t.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")})}(c),function(l){var e,n,o,r=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PictureInPictureToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!r)return;i(r,"#vjs-icon-pip")}(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,r=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!r)return;i(r,"#vjs-icon-captions");var t=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var r=e[n];if(("captions"===r.kind||"subtitles"===r.kind)&&"showing"===r.mode){i=!0;break}}o.classList.toggle("vjs-cc-on",i)};t(),l.textTracks().on("change",t)}(c),function(l){var e,n,o,r=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!r)return;var t=i(r,"#vjs-icon-fullscreen");l.on("fullscreenchange",function(){null==t||t.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}(c),function(l,e){var i,n=null==l||null===(i=l.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var o,r,a=n.el().querySelector(".vjs-seek-to-live-text"),s=t("liveText")||"LIVE",u=t("goLiveText")||"GO LIVE",v=function(){var e,i;a&&(a.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?s:u)};v(),l.on("timeupdate",v),null===(o=l.liveTracker)||void 0===o||null===(r=o.on)||void 0===r||r.call(o,"liveedgechange",v),n.on("click",function(){if(l.paused())try{l.play()}catch(l){}})}if(null!=e&&e.liveVideo&&null!=e&&e.liveui&&l.liveTracker){var c=function(){return function(l){var e,i,n,o,r=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!r)return;var t=r.querySelector(".vjs-remaining-time-display");null!==(n=l.liveTracker)&&void 0!==n&&null!==(o=n.atLiveEdge)&&void 0!==o&&o.call(n)?r.style.display="none":(r.style.display="flex",t&&(t.innerText=(a=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),s=Math.floor(a/3600),u=Math.floor(a%3600/60),v=Math.floor(a%60),c=function(l){return String(l).padStart(2,"0")},0===s?"".concat(c(u),":").concat(c(v)):"".concat(c(s),":").concat(c(u),":").concat(c(v)))));var a,s,u,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,o)}(u,v),function(e,i){var t,a,u,v,c,d,C=(null==i?void 0:i.liveVideo)||!1,p=(null==i||null===(t=i.res)||void 0===t?void 0:t.contentType)||"video",m=(null==i||null===(a=i.res)||void 0===a||null===(u=a[p])||void 0===u||null===(v=u.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,h=C&&m?"livedvr":"vod";(null!=i&&i.liveui||m)&&r(e,"CN_NEWS",s);var f=o.getConfig();if(null!=f&&null!==(c=f.chaptersConfig)&&void 0!==c&&c.enable||null!=f&&null!==(d=f.chapters)&&void 0!==d&&d.length){var g;!function(e,i){var n,o=null===(n=l(e))||void 0===n?void 0:n.el();if(!o||!i)return;var r=function(l,e){null!=e&&""!==e&&o.style.setProperty(l,e)};r("--vl-chapter-color",i.markerColor),r("--vl-chapter-active",i.markerActiveColor),r("--vl-chapter-hover",i.markerHoverColor),r("--vl-chapter-size",null!=i.markerSize?"".concat(i.markerSize,"px"):null),r("--vl-chapter-opacity",null!=i.markerOpacity?String(i.markerOpacity):null),r("--vl-chapter-tooltip",i.tooltipColor)}(e,null==f||null===(g=f.chaptersConfig)||void 0===g?void 0:g.style),n(e,{chapters:(null==f?void 0:f.chapters)||[],timeMode:h,res:null==i?void 0:i.res,chaptersConfig:(null==f?void 0:f.chaptersConfig)||{}})}}(u,v)}export{u as initialiseSkin};
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
2
|
+
"name": "@viewlift/player-backup",
|
|
3
|
+
"version": "2.0.309-backup",
|
|
4
|
+
"main": "dist/bundle.cjs.js",
|
|
5
|
+
"types": "dist/@viewlift/player/esm/index.d.ts",
|
|
6
|
+
"amdName": "_playerCore",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"prepublishOnly": "release-assistant"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@silvermine/videojs-airplay": "^1.3.0",
|
|
12
|
+
"@silvermine/videojs-chromecast": "^1.4.1",
|
|
13
|
+
"@viewlift/sse": "^0.0.3",
|
|
14
|
+
"broadcast-channel": "^7.3.0",
|
|
15
|
+
"@viewlift/comscore": "^1.0.18",
|
|
16
|
+
"axios": "^1.2.3",
|
|
17
|
+
"md5": "^2.3.0",
|
|
18
|
+
"ima": "npm:videojs-ima@2.2.0",
|
|
19
|
+
"js-cookie": "^3.0.5",
|
|
20
|
+
"jwt-decode": "^4.0.0",
|
|
21
|
+
"video.js": "8.22.0",
|
|
22
|
+
"videojs-contrib-ads": "7.5.2",
|
|
23
|
+
"videojs-contrib-eme": "5.5.1",
|
|
24
|
+
"videojs-mux": "^4.21.7",
|
|
25
|
+
"videojs-contrib-quality-menu": "^1.0.3"
|
|
26
|
+
},
|
|
27
|
+
"overrides": {
|
|
28
|
+
"min-document": "^2.19.1"
|
|
29
|
+
}
|
|
30
|
+
}
|