@viewlift/player-backup 2.0.119-backup → 2.0.120-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/bundle.css +33 -33
- package/cjs/{index-c6124c2a.js → index-08d3c4b6.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{skin-ec8cb4ba.js → skin-f14e4493.js} +1 -1
- package/cjs/{skin-12adbfdb.js → skin-f5457a27.js} +1 -1
- package/esm/bundle.css +33 -33
- package/esm/{index-b8fa8e61.js → index-710a5238.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{skin-5ff2a543.js → skin-bde50aaa.js} +1 -1
- package/esm/{skin-8dbcb656.js → skin-efae74e7.js} +1 -1
- package/package.json +1 -1
package/cjs/bundle.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
6
7
|
height: 0.7em;
|
|
7
8
|
position: absolute;
|
|
@@ -216,7 +217,6 @@
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
|
|
219
|
-
|
|
220
220
|
/* CSS for videojs-dvr-seekbar */
|
|
221
221
|
|
|
222
222
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -598,38 +598,6 @@
|
|
|
598
598
|
text-align: center;
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
-
/* a wrapper element that tracks the mouse vertically */
|
|
602
|
-
.vjs-thumbnail-holder {
|
|
603
|
-
position: absolute;
|
|
604
|
-
left: -1000px;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/* the thumbnail image itself */
|
|
608
|
-
.vjs-thumbnail {
|
|
609
|
-
position: absolute;
|
|
610
|
-
left: 0;
|
|
611
|
-
bottom: 1.3em;
|
|
612
|
-
opacity: 0;
|
|
613
|
-
transition: opacity .2s ease;
|
|
614
|
-
-webkit-transition: opacity .2s ease;
|
|
615
|
-
-moz-transition: opacity .2s ease;
|
|
616
|
-
-mz-transition: opacity .2s ease;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/* fade in the thumbnail when hovering over the progress bar */
|
|
620
|
-
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
621
|
-
.vjs-progress-control:hover .vjs-thumbnail,
|
|
622
|
-
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
623
|
-
.vjs-progress-control:active .vjs-thumbnail {
|
|
624
|
-
opacity: 1;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/* ... but hide the thumbnail when hovering directly over it */
|
|
628
|
-
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
629
|
-
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
630
|
-
opacity: 0;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
601
|
.video-js.vjs-quality-menu {
|
|
634
602
|
display: block;
|
|
635
603
|
}
|
|
@@ -700,6 +668,38 @@
|
|
|
700
668
|
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
701
669
|
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
702
670
|
}
|
|
671
|
+
/* a wrapper element that tracks the mouse vertically */
|
|
672
|
+
.vjs-thumbnail-holder {
|
|
673
|
+
position: absolute;
|
|
674
|
+
left: -1000px;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* the thumbnail image itself */
|
|
678
|
+
.vjs-thumbnail {
|
|
679
|
+
position: absolute;
|
|
680
|
+
left: 0;
|
|
681
|
+
bottom: 1.3em;
|
|
682
|
+
opacity: 0;
|
|
683
|
+
transition: opacity .2s ease;
|
|
684
|
+
-webkit-transition: opacity .2s ease;
|
|
685
|
+
-moz-transition: opacity .2s ease;
|
|
686
|
+
-mz-transition: opacity .2s ease;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/* fade in the thumbnail when hovering over the progress bar */
|
|
690
|
+
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
691
|
+
.vjs-progress-control:hover .vjs-thumbnail,
|
|
692
|
+
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
693
|
+
.vjs-progress-control:active .vjs-thumbnail {
|
|
694
|
+
opacity: 1;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/* ... but hide the thumbnail when hovering directly over it */
|
|
698
|
+
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
699
|
+
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
700
|
+
opacity: 0;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
703
|
.vjs-poster {
|
|
704
704
|
display: inline-block;
|
|
705
705
|
vertical-align: middle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator");require("axios");var r=require("./generic-bfd81e0e.js"),o=require("./player_instance-fcf6a8fb.js"),i=require("video.js"),l=require("./util-a3ed1133.js"),a=require("./captions-bf891620.js"),u=require("./resolution-9c4872ec.js"),s=require("./skin-9e714900.js"),c=require("./localisation-56e0a999.js"),d=require("@babel/runtime/helpers/typeof"),v=require("@babel/runtime/helpers/toConsumableArray"),f=require("@babel/runtime/helpers/slicedToArray"),p=require("./index-de801167.js"),m=function(e){return new Promise(function(n,t){if(g(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)}})},g=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},y=function(e,n,t){var r=o.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},h=function(e){var n=o.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},b=function(){var e=n(t.mark(function e(n){var l,a,u,s,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,m("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,s.default(i),e.finish(13);case 16:(c=i.getTech("chromecast"))&&!c.prototype.seeking&&(c.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.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.airplay&&"Safari"==r.detectBrowser()?null==a||a.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)}}(),w=function(e,n){var t=o.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var k=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("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)}}(),S=function(){var e=n(t.mark(function e(){return t.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){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=n(t.mark(function e(){var n;return t.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(i),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)}}(),P=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.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)}}(),I=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-ced4b564.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)}}(),T=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(i)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(i)})},loadAdsLibrary:k,loadEMELibrary:S,loadMuxPlugin:O,loadDvrSeekbar:P,loadContribDash:I});function j(e){return E.apply(this,arguments)}function E(){return(E=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(null==n?void 0:n.airplay)||!1,e.next=3,k();case 3:o&&"Safari"==r.detectBrowser()&&Promise.resolve().then(function(){return T}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(e,n){return C.apply(this,arguments)}function C(){return(C=n(t.mark(function e(n,o){var i,l,a,u,s,c,d,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==o?void 0:o.contentType)||"video",v=null==o||null===(i=o[d])||void 0===i?void 0:i.drmEnabled,null==o||null===(l=o[d])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==o||null===(u=o[d])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(c=s.videoAssets)||void 0===c?void 0:c.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==r.detectBrowser()?S():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?I():S():"Safari"!=r.detectBrowser()&&f?I():null,b(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function x(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 A(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var L=new Set,R=null,N=function(e,n,t){var o,i,l,a,u,s,c,d={},v=(null==e?void 0:e.contentType)||"video";d["c3.cm.id"]=(null===(o=e[v])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=q(e),d[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),d[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc(),d[null==t||null===(a=t.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===r.getUserId()?"NULL":r.getUserId(),d["c3.cm.categoryType"]=B(e),d["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"}}(),d.DRMEnabled=(null===(u=e[v])||void 0===u?void 0:u.drmEnabled)||"None",d.DAIStream=null!==(s=e[v])&&void 0!==s&&null!==(c=s.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[t.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=U(e),d["c3.cm.genreList"]=V(e),d["c3.cm.genre"]=M(e),d["c3.cm.channel"]=_(e);var f=G(r.getCurrentSeries(),e);return d=A(A({},d),f)},M=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"},V=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"},_=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},B=function(e){return(null==e?void 0:e.contentType)||"null"},U=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"},H=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)},q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var F,Q,G=function(e,n){var t,o,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var s=r.getSeasonNumber(),c=r.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(i=e[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},K=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"}},W=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},z=function(){var e=n(t.mark(function e(n,i){var l,a,u,s,c,d,v,f,p,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=(null==i?void 0:i.convivaConfig)||{},a=l.trackConvivaPlayerEvent,u=l.paymentHandler,s=l.tveProvider,c=l.enable,d=l.appName,v=(i||{}).token,c){e.next=4;break}return e.abrupt("return");case 4:if(f=o.getPlayer(n),"function"==typeof(p=a)){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=K(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var e,n;R&&R!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),L.clear(),R=f.currentSrc();var t=W(f.currentType()),o=r.getCurrentVideo(),l=N(o,f,m);l[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=H(o,i),l.authToken=v||"NULL",l.streamType=t,l.D2CType=u||"NONE",l.subscriberType=s||(u?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",J.setData(l),p("contentInfo",l)}),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(){L.has(f.currentSrc())||(L.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){L.has(f.currentSrc())&&L.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==L||L.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),J=(F={},{setData:function(e){F=A(A({},F),e)},getData:function(){return F}}),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-ec8cb4ba.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-19f5ee87.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-e6d5161d.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-5b2feda8.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-4849e82b.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-12adbfdb.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(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 $(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var Z=[],ee=0,ne=null;function te(n,t,o){var i,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(i=t.watchHistory)||void 0===i||i.apiVersion;var d=null==t||null===(l=t.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(n.currentTime()),f=Math.floor(n.duration());null==t||null===(a=t.watchHistory)||void 0===a||a.xapiKey;var p=(null==t||null===(u=t.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==t||null===(s=t.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(n.currentTime()),y=c?100:Math.floor(v/f*100),h={};m?function(n,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),u=r.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(n,t){return $($({},n),{},e({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Q});d<0?l.push($($({content:c},n),{},{addedDate:a,updateDate:a})):l[d]=$($($({},l[d]),n),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:g,watchedPercentage:y},d,t.siteOwner):(h=$($({videoId:Q,watchedTime:g,watchedPercentage:y,doneWatching:c,profileId:d},ne&&{seriesId:ne}),p&&{originalObjectId:p}),r.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(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 ie=!1,le=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(e,"videoAssets","secondaryVideoAssets"),a=r.getSource(l,n);return a&&r.loadVideo(n,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===d(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]=ae(e[o],n,t)}),r}return e}function ue(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 se(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)?se(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 se(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 ce(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 de(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var ve=function(e,n,t,i){var l,u,s,c,v=i.res,f=i.sres,p=o.getPlayer(e),m=(null==v?void 0:v.contentType)||"video",g=(null==v?void 0:v[m].drmEnabled)||!1,h=(null==v||null===(l=v[m])||void 0===l||null===(u=l.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,b=(null==v||null===(s=v[m])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;r.setCurrentVideo(v),p&&(p.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:v}):t.resolve(de({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))}),p.on("loadeddata",function(){var t,i,l,u=a.getCaptions(e);if(null==u||u.map(function(n){return a.disableCaptions(e,n.id)}),b&&"Safari"===r.detectBrowser())try{var s;null==p||null===(s=p.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&y(e,sessionStorage.getItem("volume")||"100");var c=r.getCurrentVideo();if(r.clearError(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.saveOffline)){var d,f,m=de(de({},n),v);!function(e,n,t){var r,i,l;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(i=n.series)||void 0===i?void 0:i.id),Z=[],ee=0,Q=t;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,u=o.getPlayer(e);u&&(u.on("timeupdate",function(){if(!u.seeking()){var e=Math.floor(u.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(u,n,a)):e>ee&&(ee=e+a))}}),u.one("ended",function(){te(u,n,a,!0)}))}(e,m,null==c||null===(d=c.video)||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=p&&p.mux){var g,h,w,k,S,O,P=(null===(g=r.getCurrentVideo())||void 0===g?void 0:g.video)||(null==v?void 0:v.video),I=null==P?void 0:P.gist,T={env_key:null==n||null===(h=n.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==P||null===(k=P.series)||void 0===k?void 0:k.title,video_stream_type:null!=P&&null!==(S=P.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==n||null===(O=n.analytics)||void 0===O?void 0:O.userId};p.mux({debug:!1,data:T})}}),p.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];p.trigger("subtitlechanged",n)}),p.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,g=p.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){h&&le(v,e)}),p.on("error",function(){var n,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&h)?le(v,e):(r.handleError(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:v}))}),p.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,u,s,c=null===(a=r.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,d=r.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(h){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.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"==d(p.dash)){var t,o,i,l=null==p||null===(t=p.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),a=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),u=ue(n);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var c,v=ue(n);try{for(v.s();!(c=v.n()).done;){var f,m,y,h=c.value;if(("Chrome"==r.detectBrowser()||"Edge"==r.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(m=f.userAgent)&&void 0!==m&&m.includes("Macintosh")||!g))&&null!=h&&null!==(y=h.label)&&void 0!==y&&y.includes("5.1"))p.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){v.e(e)}finally{v.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ge="ssai-adImpression",ye="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ge,firstQuartile:ye,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Oe(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,i=Se[r];i&&t.trigger(i,n)}function Pe(e){var n=o.getPlayer(e);if(!n)return console.error("[SSAI] 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{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ge,e)},adFirstQuartile:function(e){return t(ye,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Ie(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 Te(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}function je(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 Ee(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)?Ee(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 Ee(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 De,Ce,xe=(De="",{set:function(e){e&&(De=e)},get:function(){return De}}),Ae=(Ce=null,{set:function(e){Ce=e},get position(){return Ce}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return Re=n(t.mark(function e(n,i){var l,a,u,s,c,d,v,p,m,g,y,h,b,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.getPlayer(n),l=r.getSource(i,n),a=l.src,u=a.replace("/dash/","/session/").replace("master","session"),u=r.replaceMacros(u,n,i),s=Ne(u),c=f(s,2),d=c[0],v=c[1],u=new URL(u.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=f(e,2),t=n[0],r=n[1];u.searchParams.set(t,r)}),e.prev=8,e.next=11,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Te({},d)})});case 11:return p=e.sent,e.next=14,p.json();case 14:return m=e.sent,g="https://"+new URL(u).hostname,y=m.trackingUrl,h=m.manifestUrl,b=g+y,w=g+h,xe.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=w,e.abrupt("return",l);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",l);case 29:case"end":return e.stop()}},e,null,[[8,26]])})),Re.apply(this,arguments)}function Ne(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var r,o=je(t.split("&"));try{for(o.s();!(r=o.n()).done;){var i=r.value.split("="),l=f(i,2),a=l[0],u=l[1];n[decodeURIComponent(a)]=decodeURIComponent(u||"")}}catch(e){o.e(e)}finally{o.f()}for(var s={},c={},d=0,v=Object.entries(n);d<v.length;d++){var p=f(v[d],2),m=p[0],g=p[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=g;else c[m]=g}return[s,c]}var Me,Ve=(Me=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Me=Array.isArray(e)?v(e):Me},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Me),v(Me)}});function _e(){return _e=n(t.mark(function e(i,l){var a,u,c,d,f,p,m,g,y,h,b,w,k,S,O,P,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:I=function(e,n,t,r,l,a){var u=o.getPlayer(i);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,c=je(t);try{var d=function(){var t,o,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,g=d.durationInSeconds,y=p||0,h=f,b=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(c=o.ads)||void 0===c?void 0:c.adEventHandler)||null,w="".concat(y,"_").concat(v),k=O.get("pod-".concat(l))||[];if(console.warn(e,y,"map:",v,"condition1:",e>=y,"map:",O),e>=y&&!k.includes(w)){k.push(w),O.set("pod-".concat(l),k);try{P(v,n,h,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var S=Ae.position;Ae.set(null),setTimeout(function(){null!=S&&(u.currentTime(S),a())},500)}if("function"==typeof b)try{var I,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:g,ad:null==n||null===(I=n.ads)||void 0===I?void 0:I[r],adIndex:r};b({adsData:T}),Oe(i,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(c.s();!(s=c.n()).done;)d()}catch(e){c.e(e)}finally{c.f()}}},P=function(e,n,t,r){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},S=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ae.set(l),f=xe.get(),(p=o.getPlayer(i)).one("loadeddata",function(){f&&k(f)}),m=new Map,g=new Map,y=-1,h=(null===(a=document)||void 0===a||null===(u=a.getElementsByClassName("tvProviderImage"))||void 0===u?void 0:u[0])||null,b=(null==p||null===(c=p.controlBar)||void 0===c?void 0:c.getChild("videoSelector"))||null,w=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,k=function(){var e=n(t.mark(function e(n){var a,u,c,d,f,p,k,O,P,T,j,E,D,C,x,A,L;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return D=function(e){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",D),0===e.button&&T()},E=function(e){},j=function(){var e,n=k.currentTime(),t=null,r=je(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){k.currentTime(t+2.2)},100))},T=function(){var e,n=k.currentTime(),t=null,r=je(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!m.has(i)||n>=i&&n<=u)&&(t=i,m.set(i,!0),g.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){k.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:d=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",d),f=d.avails,p=[],k=o.getPlayer(i),O=k.controlBar.progressControl,P=O.seekBar.el(),f.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!u&&l&&(k.currentTime(l),j()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,r=k.duration();if(!(n>r||Array.isArray(t)&&0==(null==t?void 0:t.length))){var o=n/r*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",P.appendChild(i)}}),k.on("timeupdate",s.throttle(function(){var e=k.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),pe.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),O.el().style.visibility="hidden";for(var u=e-o,s=0,c=0,d=0;d<l.length;d++){var f,y=null==l||null===(f=l[d])||void 0===f?void 0:f.durationInSeconds;if(u<s+y){c=d;break}s+=y}l[c];var k=Math.max(0,i-u),P=Math.round(k);C.style.display="block",L.textContent="".concat(c+1," of ").concat(l.length," • ").concat(S(P));var T=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,v(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&T.push(null==t?void 0:t.podSlotImpressionBeacon),I(e,t,T,c,r,j),"break"}g.delete(o)},r=0;r<p.length;r++){if("break"===t())break}n||(C.style.display="none",O.el().style.visibility="visible",b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){pe.enabled&&"ArrowRight"==e.key&&(T(),r.skip(i,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",E),document.addEventListener("pointerup",D))}),(C=document.createElement("div")).className="ssai-ad-container",(x=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",x.append(A),(L=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(x),C.append(L),k.el().appendChild(C);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),O=new Map;case 16:case"end":return e.stop()}},e)})),_e.apply(this,arguments)}function Be(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 Ue(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var He=function(l,u,c,d){var v,f,m,g,y,h,b,k,S,O,P,I,T,j,E,C,x,A,L,R,N,M,V,_,B,U,H,q,F,Q,G,K,W,Y,$,Z,ee,ne,te=u.res,re=void 0===te?null:te,oe=u.sres,ie=void 0===oe?null:oe,le=null!=c&&c.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(v=re)||void 0===v?void 0:v.contentType)||"video",ue=s.impolicy16x9(null===(f=re)||void 0===f||null===(m=f[ae])||void 0===m||null===(g=m.gist)||void 0===g?void 0:g.videoImageUrl)||s.impolicy16x9(null===(y=re)||void 0===y||null===(h=y[ae])||void 0===h||null===(b=h.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),se=(null===(S=re)||void 0===S||null===(O=S[ae])||void 0===O||null===(P=O.liveDetails)||void 0===P?void 0:P.isDvrEnabled)||!1,ce=(null===(I=re)||void 0===I||null===(T=I[ae])||void 0===T||null===(j=T.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,de=(null===(E=re)||void 0===E||null===(C=E.ads)||void 0===C||null===(x=C.preRoll)||void 0===x||null===(A=x.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.active)&&(null===(R=re)||void 0===R||null===(N=R.ads)||void 0===N||null===(M=N.preRoll)||void 0===M||null===(V=M.adTags)||void 0===V||null===(_=V.web)||void 0===_?void 0:_.url),fe=(null===(B=re=Ue(Ue({},re),{},{audioAssetSource:null==c?void 0:c.audioAssetSource}))||void 0===B||null===(U=B[ae])||void 0===U?void 0:U.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(q=H.app_data)||void 0===q||null===(F=q.appcmsMain)||void 0===F||null===(Q=F.adsConfig)||void 0===Q?void 0:Q.vodAdSticherProvider)||!1,pe=(null==c?void 0:c.latency)||6,me=(null==c?void 0:c.skin_settings)||{},ge=(null==c?void 0:c.dvrConfig)||{enable:!1},ye=(ne={enableSmoothSeeking:!0,controls:0!=(null==c?void 0:c.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==c?void 0:c.muted)||!1,autoplay:(null==c?void 0:c.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==me?void 0:me.pictureInPictureToggle)||!1},playbackRates:null!=me&&me.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==c.skin,liveui:se},e(ne,"autoplay",null==c?void 0:c.autoplay),e(ne,"normalizeAutoplay",(null==c?void 0:c.autoplay)&&!de),e(ne,"loop",(null==c?void 0:c.loop)||!1),e(ne,"audioPosterMode",null==c?void 0:c.audioPosterMode),e(ne,"html5",Ue(Ue({dash:Ue(Ue(Ue({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==c?void 0:c.debugConfig)&&(null==c||null===(G=c.debugConfig)||void 0===G?void 0:G.enable)&&{debug:!0,logLevel:null!=c&&null!==(K=c.debugConfig)&&void 0!==K&&K.logLevel?null==c||null===(W=c.debugConfig)||void 0===W?void 0:W.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:pe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Ue(Ue({liveRangeSafeTimeDelta:pe,useDevicePixelRatio:!0,experimentalLLHLS:(null==c?void 0:c.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==c||null===(Y=c.customData)||void 0===Y?void 0:Y.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===($=null==c?void 0:c.enableLowInitialPlaylist)||void 0===$||$}),debug:!0,nativeTextTracks:"Safari"==r.detectBrowser()},0==(null==c||null===(Z=c.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==c||null===(ee=c.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",ue),e(ne,"techOrder",le),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,r=o.getPlayer(l),i=((null==r?void 0:r.textTracksJson_)||r.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,g,y,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,P=(null==O?void 0:O.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=P;var I=(null==O?void 0:O.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=I}var T=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=T;var j=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=j;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var D=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,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}(re,e,i);return Ue(Ue({},a),{},{convivaMetaData:Ue({customerKey:(null==c||null===(n=c.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==c||null===(t=c.convivaConfig)||void 0===t?void 0:t.debug)||!1},J.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,a,u=o.getPlayer(l),s=(null==u?void 0:u.currentSource())||{};!(null===(n=re)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(a=s.src)&&void 0!==a&&a.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!i.getPlayers()[l]){i.log.level("debug");var he=i(l,ye,function(){var e=n(t.mark(function e(){var n,o,u,s,v,f,m,g,y,h,b,k,S,O,P,I,T,j,E,C,x,A,L;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(i.VERSION),console.log(i.getPlugins()),e.next=5,D(c,re);case 5:if(k=null===(n=re)||void 0===n||null===(o=n[ae])||void 0===o||null===(u=o.liveDetails)||void 0===u?void 0:u.startOverTime,ce&&d.resolve(Ue({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:re}:{response:re})),S={},null!=ge&&ge.enable&&se&&(S.playFromBegining=ge.playFromBegining,S.playLive=ge.playLive,P=null==c||null===(O=c.epg)||void 0===O?void 0:O.programSubType,"linearchannel"===ae?"LIVE"===(null==P?void 0:P.toUpperCase())&&p.addDvrOverlay(l,c):p.addDvrOverlay(l,c)),r.inititateBeacon(l,null==c?void 0:c.analyticsCb,S),z(l,c),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),se&&w(l,k),!de||null!=c&&null!==(s=c.customData)&&void 0!==s&&s.disableAds||r.initialiseAdvertisement(l,de,re),I=r.getSource(re,l),console.log(I),null!=c&&c.nearestClusterUrl&&(I=r.getUpdatedClusterSource(I,c.nearestClusterUrl)),!fe){e.next=21;break}return e.next=20,Le(l,re);case 20:I=e.sent;case 21:I?r.loadVideo(l,I):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:re}),r.handleError(l,"Incompatible / Missing Source")),((null===(v=re)||void 0===v||null===(f=v[ae])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=re)||void 0===y||null===(h=y[ae])||void 0===h||null===(b=h.closedCaptions)||void 0===b?void 0:b.length)>0)&&(L=(null===(j=re)||void 0===j||null===(E=j[ae])||void 0===E||null===(C=E.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(x=re)||void 0===x||null===(A=x[ae])||void 0===A?void 0:A.closedCaptions),T=L.filter(function(e){return"VTT"===e.format}),a.addCaptions(l,T)),null!=c&&c.disableControls?r.disableControls(l):X(l,Ue(Ue(Ue({},c),ye),{},{liveVideo:ce,isDvrEnabled:se,res:re,sres:ie})),ve(l,Ue(Ue(Ue({},c),ye),{},{liveVideo:ce}),d,{res:re,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}},qe={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Fe(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 Qe(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var Ge,Ke=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=We(e);He(o,{res:i},e,{resolve:t,reject:r})},We=function(e){var n,t,o,i,l,a,u,s,c=null==e?void 0:e.streamingInfo,d=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,f=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,p=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,m=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,g=(null==e||null===(a=e.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==e||null===(u=e.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==e?void 0:e.token,b=r.getDecodedToken(h),w=null==b?void 0:b.site;return Qe(Qe({id:null==qe?void 0:qe[w]},!f&&{directPlaybackUrl:null==d?void 0:d.url}),{},{video:{drmEnabled:f,streamingInfo:{videoAssets:Qe(Qe({},y&&{drmProvider:y}),{},{widevine:null==d?void 0:d.widevine,fairPlay:null==d?void 0:d.fairPlay,playReady:null==d?void 0:d.playReady})},liveDetails:{isDvrEnabled:null==c?void 0:c.isDvrEnabled},gist:Qe({},m&&{videoImageUrl:m}),contentDetails:Qe({},(null==g?void 0:g.length)>0&&{closedCaptions:v(g)})},ads:{preRoll:{adTags:{web:Qe(Qe({},p&&{active:!0}),p&&{url:p})}}}})};function ze(e,n){return Je.apply(this,arguments)}function Je(){return(Je=n(t.mark(function e(n,o){var i,l,a,u,s,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,l=o.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,r.getToken();case 6:c=e.sent,r.getVideoDetails(a,c).then(function(e){var t,o,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(d=o.gist)||void 0===d?void 0:d.contentType,r.setCurrentVideo(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,g,y,h=oe((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,n.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;p.contentType="video",He(u,{res:p},n,{resolve:i,reject:l})}else r.getVideoInfo(a,c).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,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){He(u,{res:p},n,{resolve:i,reject:l})});else He(u,{res:p},n,{resolve:i,reject:l})}).catch(function(e){r.initiateErrorHandling(e,u,l,a)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Xe(e,n){return Ye.apply(this,arguments)}function Ye(){return(Ye=n(t.mark(function e(n,o){var i,l,a,u,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,l=o.reject,e.next=3,r.getToken();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,r.getLinearChannelDetails(s,a).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,He(u,{res:t},n,{resolve:i,reject:l})}).catch(function(e){r.initiateErrorHandling(e,u,l,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $e(e,n){return Ze.apply(this,arguments)}function Ze(){return(Ze=n(t.mark(function e(n,o){var i,l,a,u,s,c,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=o.resolve,a=o.reject,e.next=3,r.getToken();case 3:u=e.sent,s=null==n?void 0:n.playerId,c=sessionStorage.getItem("season-idx")||0,r.seasonIdxManager.set(parseInt(c)),d=null==n||null===(i=n.series)||void 0===i?void 0:i.id,r.getSeriesDetails(d,u).then(function(e){var t,o,i,c=e.data,v=e.data.seasons;r.setCurrentSeries(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);r.createSeriesWatchMap(d,u),r.getVideoDetails(f,u).then(function(e){var t,o,i;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,r.setCurrentVideo(e.data),He(s,{res:null==e?void 0:e.data,sres:c},n,{resolve:l,reject:a})}).catch(function(e){r.initiateErrorHandling(e,s,a,videoId)})}).catch(function(e){r.initiateErrorHandling(e,s,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function en(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 nn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}exports.VLPlayerCore=function(){return{loadVideoInstantly:r.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(t.mark(function n(o,i){var l,a,u,d,v,f,p,g,y,h,b,w,k,S,O,P,I,T,E,D,C,x,A;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!r.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(b=(null==e?void 0:e.videoSourceUrl)||!1,w=null==e?void 0:e.asat,k=(null==e||null===(l=e.epg)||void 0===l?void 0:l.enable)||!1,S=null==e?void 0:e.videoId,O=(null==e||null===(a=e.series)||void 0===a?void 0:a.enable)||!1,P=(null==e?void 0:e.streamingInfo)||!1,window.videoId=S,I=null==e?void 0:e.token,!r.token_authentication_enabled(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",I),r.refreshTokenManager().set(null==e?void 0:e.refreshToken),I&&!r.isTokenExpired(I)){n.next=16;break}return i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}}),n.abrupt("return");case 16:Ge=JSON.parse(atob(I.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(u=Ge)||void 0===u||!u.anonymousId),e.siteOwner=(null===(d=Ge)||void 0===d?void 0:d.site)||null,e.userId=(null===(v=Ge)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Ge)||void 0===f?void 0:f.userId),window.watchHistory=e.watchHistory||null,T=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,E=(null==e||null===(g=e.analytics)||void 0===g?void 0:g.gaId)||null,(D=null==e?void 0:e.errors)&&(window.customErrors=D),window.customData=null==e?void 0:e.customData,c.setLocalisation(null==e||null===(y=e.customData)||void 0===y?void 0:y.localisation),r.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!s.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),n.next=33,j(e);case 33:E&&m("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then(function(){return r.runGtag(E)}).catch(function(e){}),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(T)))&&C.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(A={directPlaybackUrl:b,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?r.getVideoDetails(x,I).then(function(n){var t=(null==n?void 0:n.data)||{};He(T,{res:nn(nn({},t),A)},e,{resolve:o,reject:i})}).catch(function(e){r.initiateErrorHandling(e,T,i,x)}):He(T,{res:A},e,{resolve:o,reject:i})):P?Ke(e,{resolve:o,reject:i}):O?$e(e,{resolve:o,reject:i}):k?Xe(e,{resolve:o,reject:i}):ze(e,{resolve:o,reject:i});case 37:case"end":return n.stop()}},n)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:u.getRenditions,skip:r.skip,getPlayer:o.getPlayer,play:r.play,pause:r.pause,detectBrowser:r.detectBrowser,rewind:r.rewind,loadVideo:r.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:r.isPlayerInitialised,load:r.load,authenticateLC:r.authenticateLC,dispose:r.dispose,enableCaptions:a.enableCaptions,disableCaptions:a.disableCaptions,getCaptions:a.getCaptions,playSelectedResolution:u.playSelectedResolution,getSource:r.getSource,setVolume:y,getVolume:h,disableControls:r.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:r.getEntitlementData,adsQueuePointManager:Ve,getSsaiEvents:Pe,playerEvents:l.playerEvents}},exports.initialiseKeyboardEvents=function(e,n){var t,i,l,a=o.getPlayer(e),u=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(l=document)||void 0===l||l.addEventListener("keydown",function(t){var o,i,l,c,d,v,f,p,m;if(pe.enabled&&"input"!=t.target.localName){var g=t.key,y=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==s||s.focus()),g){case" ":null==u||u.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":y&&!1===n.liveui||r.rewind(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(c=l.appcmsMain)||void 0===c||null===(d=c.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;y||r.skip(e,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return _e.apply(this,arguments)};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator");require("axios");var r=require("./generic-bfd81e0e.js"),o=require("./player_instance-fcf6a8fb.js"),i=require("video.js"),l=require("./util-a3ed1133.js"),a=require("./captions-bf891620.js"),u=require("./resolution-9c4872ec.js"),s=require("./skin-9e714900.js"),c=require("./localisation-56e0a999.js"),d=require("@babel/runtime/helpers/typeof"),v=require("@babel/runtime/helpers/toConsumableArray"),f=require("@babel/runtime/helpers/slicedToArray"),p=require("./index-de801167.js"),m=function(e){return new Promise(function(n,t){if(g(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)}})},g=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},y=function(e,n,t){var r=o.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},h=function(e){var n=o.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},b=function(){var e=n(t.mark(function e(n){var l,a,u,s,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,m("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,s.default(i),e.finish(13);case 16:(c=i.getTech("chromecast"))&&!c.prototype.seeking&&(c.prototype.seeking=function(){}),null!==(u=window)&&void 0!==u&&u.cast?null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.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.airplay&&"Safari"==r.detectBrowser()?null==a||a.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)}}(),w=function(e,n){var t=o.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var k=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),m("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)}}(),S=function(){var e=n(t.mark(function e(){return t.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){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),O=function(){var e=n(t.mark(function e(){var n;return t.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(i),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)}}(),P=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.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)}}(),I=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-ced4b564.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)}}(),T=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){m("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(i)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(i)})},loadAdsLibrary:k,loadEMELibrary:S,loadMuxPlugin:O,loadDvrSeekbar:P,loadContribDash:I});function j(e){return E.apply(this,arguments)}function E(){return(E=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(null==n?void 0:n.airplay)||!1,e.next=3,k();case 3:o&&"Safari"==r.detectBrowser()&&Promise.resolve().then(function(){return T}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function D(e,n){return C.apply(this,arguments)}function C(){return(C=n(t.mark(function e(n,o){var i,l,a,u,s,c,d,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==o?void 0:o.contentType)||"video",v=null==o||null===(i=o[d])||void 0===i?void 0:i.drmEnabled,null==o||null===(l=o[d])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==o||null===(u=o[d])||void 0===u||null===(s=u.streamingInfo)||void 0===s||null===(c=s.videoAssets)||void 0===c?void 0:c.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==r.detectBrowser()?S():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?I():S():"Safari"!=r.detectBrowser()&&f?I():null,b(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function x(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 A(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var L=new Set,R=null,N=function(e,n,t){var o,i,l,a,u,s,c,d={},v=(null==e?void 0:e.contentType)||"video";d["c3.cm.id"]=(null===(o=e[v])||void 0===o?void 0:o.id)||"Null",d["c3.cm.contentType"]=q(e),d[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),d[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc(),d[null==t||null===(a=t.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===r.getUserId()?"NULL":r.getUserId(),d["c3.cm.categoryType"]=B(e),d["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"}}(),d.DRMEnabled=(null===(u=e[v])||void 0===u?void 0:u.drmEnabled)||"None",d.DAIStream=null!==(s=e[v])&&void 0!==s&&null!==(c=s.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[t.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=U(e),d["c3.cm.genreList"]=V(e),d["c3.cm.genre"]=M(e),d["c3.cm.channel"]=_(e);var f=G(r.getCurrentSeries(),e);return d=A(A({},d),f)},M=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"},V=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"},_=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},B=function(e){return(null==e?void 0:e.contentType)||"null"},U=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"},H=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)},q=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var F,Q,G=function(e,n){var t,o,i,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var s=r.getSeasonNumber(),c=r.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(i=e[s-1])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},K=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"}},W=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},z=function(){var e=n(t.mark(function e(n,i){var l,a,u,s,c,d,v,f,p,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=(null==i?void 0:i.convivaConfig)||{},a=l.trackConvivaPlayerEvent,u=l.paymentHandler,s=l.tveProvider,c=l.enable,d=l.appName,v=(i||{}).token,c){e.next=4;break}return e.abrupt("return");case 4:if(f=o.getPlayer(n),"function"==typeof(p=a)){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=K(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),f.on("loadstart",function(){var e,n;R&&R!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),L.clear(),R=f.currentSrc();var t=W(f.currentType()),o=r.getCurrentVideo(),l=N(o,f,m);l[null==m||null===(e=m.Constants)||void 0===e?void 0:e.PLAYER_NAME]=d||"WEB",l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.ASSET_NAME]=H(o,i),l.authToken=v||"NULL",l.streamType=t,l.D2CType=u||"NONE",l.subscriberType=s||(u?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",J.setData(l),p("contentInfo",l)}),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(){L.has(f.currentSrc())||(L.add(f.currentSrc()),p("playbackStarted",null))}),f.on("ended",function(){L.has(f.currentSrc())&&L.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==L||L.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),J=(F={},{setData:function(e){F=A(A({},F),e)},getData:function(){return F}}),X=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-f14e4493.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-19f5ee87.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-e6d5161d.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-5b2feda8.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-4849e82b.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&Promise.resolve().then(function(){return require("./skin-f5457a27.js")}).then(function(t){t.initialiseSkin(e,n)})};function Y(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 $(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var Z=[],ee=0,ne=null;function te(n,t,o){var i,l,a,u,s,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(i=t.watchHistory)||void 0===i||i.apiVersion;var d=null==t||null===(l=t.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(n.currentTime()),f=Math.floor(n.duration());null==t||null===(a=t.watchHistory)||void 0===a||a.xapiKey;var p=(null==t||null===(u=t.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==t||null===(s=t.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(n.currentTime()),y=c?100:Math.floor(v/f*100),h={};m?function(n,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),l=re(i),a=(new Date).getTime(),u=r.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(n,t){return $($({},n),{},e({},t,s[t]))},{}),d=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Q});d<0?l.push($($({content:c},n),{},{addedDate:a,updateDate:a})):l[d]=$($($({},l[d]),n),{},{updateDate:a});localStorage.setItem("".concat(i),JSON.stringify(l))}(h={completed:c,watchedTime:g,watchedPercentage:y},d,t.siteOwner):(h=$($({videoId:Q,watchedTime:g,watchedPercentage:y,doneWatching:c,profileId:d},ne&&{seriesId:ne}),p&&{originalObjectId:p}),r.saveWatchHistory(h).then(function(e){}).catch(function(e){})),ee=v+o}function re(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function oe(e,n,t){var r=re(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 ie=!1,le=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[i])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ie){var l=ae(e,"videoAssets","secondaryVideoAssets"),a=r.getSource(l,n);return a&&r.loadVideo(n,a),ie=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ae(e,n,t){if(Array.isArray(e))return e.map(function(e){return ae(e,n,t)});if(null!==e&&"object"===d(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]=ae(e[o],n,t)}),r}return e}function ue(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 se(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)?se(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 se(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 ce(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 de(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var ve=function(e,n,t,i){var l,u,s,c,v=i.res,f=i.sres,p=o.getPlayer(e),m=(null==v?void 0:v.contentType)||"video",g=(null==v?void 0:v[m].drmEnabled)||!1,h=(null==v||null===(l=v[m])||void 0===l||null===(u=l.streamingInfo)||void 0===u?void 0:u.isLiveStream)||!1,b=(null==v||null===(s=v[m])||void 0===s||null===(c=s.liveDetails)||void 0===c?void 0:c.isDvrEnabled)||!1;r.setCurrentVideo(v),p&&(p.on("loadstart",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:v}):t.resolve(de({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))}),p.on("loadeddata",function(){var t,i,l,u=a.getCaptions(e);if(null==u||u.map(function(n){return a.disableCaptions(e,n.id)}),b&&"Safari"===r.detectBrowser())try{var s;null==p||null===(s=p.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==p||!p.muted())&&y(e,sessionStorage.getItem("volume")||"100");var c=r.getCurrentVideo();if(r.clearError(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.saveOffline)){var d,f,m=de(de({},n),v);!function(e,n,t){var r,i,l;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(ne=null==n||null===(i=n.series)||void 0===i?void 0:i.id),Z=[],ee=0,Q=t;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,u=o.getPlayer(e);u&&(u.on("timeupdate",function(){if(!u.seeking()){var e=Math.floor(u.currentTime());Z.includes(ee)||(e==ee?(Z.push(e),te(u,n,a)):e>ee&&(ee=e+a))}}),u.one("ended",function(){te(u,n,a,!0)}))}(e,m,null==c||null===(d=c.video)||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.id)}if(null!=n&&null!==(l=n.analytics)&&void 0!==l&&l.muxKey&&null!=p&&p.mux){var g,h,w,k,S,O,P=(null===(g=r.getCurrentVideo())||void 0===g?void 0:g.video)||(null==v?void 0:v.video),I=null==P?void 0:P.gist,T={env_key:null==n||null===(h=n.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(w=window)||void 0===w?void 0:w.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==P||null===(k=P.series)||void 0===k?void 0:k.title,video_stream_type:null!=P&&null!==(S=P.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==n||null===(O=n.analytics)||void 0===O?void 0:O.userId};p.mux({debug:!1,data:T})}}),p.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];p.trigger("subtitlechanged",n)}),p.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,g=p.getMediaSession(),y=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),p.tech_.on("retryplaylist",function(){h&&le(v,e)}),p.on("error",function(){var n,o;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&h)?le(v,e):(r.handleError(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==p||null===(o=p.error())||void 0===o?void 0:o.message)||"Some error occured",response:v}))}),p.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,u,s,c=null===(a=r.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,d=r.getSeriesWatchMap(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,m=v.p;f&&m<95&&setTimeout(function(){p.currentTime(f)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){p.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=p&&p.dvrSeekbar)try{p.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),p.on("volumechange",function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),p.on("chromecastDisconnected",function(){if(h){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}}),p.one("loadeddata",function(){var e,n=(null==p||null===(e=p.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"==d(p.dash)){var t,o,i,l=null==p||null===(t=p.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),a=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),u=ue(n);try{for(u.s();!(i=u.n()).done;){var s=i.value;if(a&&(null==s?void 0:s.id)=="dash-audio-".concat(a.index)){s.enabled=!0;break}}}catch(e){u.e(e)}finally{u.f()}}else{var c,v=ue(n);try{for(v.s();!(c=v.n()).done;){var f,m,y,h=c.value;if(("Chrome"==r.detectBrowser()||"Edge"==r.detectBrowser()&&(null!==(f=navigator)&&void 0!==f&&null!==(m=f.userAgent)&&void 0!==m&&m.includes("Macintosh")||!g))&&null!=h&&null!==(y=h.label)&&void 0!==y&&y.includes("5.1"))p.audioTracks().removeTrack(h);else{if("main"==h.kind){h.enabled=!0;break}h.enabled=!1}}}catch(e){v.e(e)}finally{v.f()}}}))};var fe,pe=(fe=!0,{enable:function(){fe=!0},disable:function(){fe=!1},get enabled(){return fe}}),me="ssai-breakStart",ge="ssai-adImpression",ye="ssai-firstQuartile",he="ssai-midpoint",be="ssai-thirdQuartile",we="ssai-complete",ke="ssai-breakEnd",Se={breakStart:me,impression:ge,firstQuartile:ye,midpoint:he,thirdQuartile:be,complete:we,breakEnd:ke};function Oe(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var r=n.eventType,i=Se[r];i&&t.trigger(i,n)}function Pe(e){var n=o.getPlayer(e);if(!n)return console.error("[SSAI] 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{adBreakStart:function(e){return t(me,e)},adImpression:function(e){return t(ge,e)},adFirstQuartile:function(e){return t(ye,e)},adMidpoint:function(e){return t(he,e)},adThirdQuartile:function(e){return t(be,e)},adComplete:function(e){return t(we,e)},adBreakEnd:function(e){return t(ke,e)}}}function Ie(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 Te(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}function je(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 Ee(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)?Ee(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 Ee(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 De,Ce,xe=(De="",{set:function(e){e&&(De=e)},get:function(){return De}}),Ae=(Ce=null,{set:function(e){Ce=e},get position(){return Ce}});function Le(e,n){return Re.apply(this,arguments)}function Re(){return Re=n(t.mark(function e(n,i){var l,a,u,s,c,d,v,p,m,g,y,h,b,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.getPlayer(n),l=r.getSource(i,n),a=l.src,u=a.replace("/dash/","/session/").replace("/master/","session"),u=r.replaceMacros(u,n,i),s=Ne(u),c=f(s,2),d=c[0],v=c[1],u=new URL(u.split("?")[0]),Object.keys(v).length>0&&Object.entries(v).forEach(function(e){var n=f(e,2),t=n[0],r=n[1];u.searchParams.set(t,r)}),e.prev=8,e.next=11,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Te({},d)})});case 11:return p=e.sent,e.next=14,p.json();case 14:return m=e.sent,g="https://"+new URL(u).hostname,y=m.trackingUrl,h=m.manifestUrl,b=g+y,w=g+h,xe.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=w,e.abrupt("return",l);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",l);case 29:case"end":return e.stop()}},e,null,[[8,26]])})),Re.apply(this,arguments)}function Ne(e){var n={};if(!e.split("?")[1])return[{},{}];var t,r=new URL(e,window.location.origin),o=je((null==r?void 0:r.searchParams)||[]);try{for(o.s();!(t=o.n()).done;){var i=f(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){o.e(e)}finally{o.f()}for(var u={},s={},c=0,d=Object.entries(n);c<d.length;c++){var v=f(d[c],2),p=v[0],m=v[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else s[p]=m}return[u,s]}var Me,Ve=(Me=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Me=Array.isArray(e)?v(e):Me},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Me),v(Me)}});function _e(){return _e=n(t.mark(function e(i,l){var a,u,c,d,f,p,m,g,y,h,b,w,k,S,O,P,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:I=function(e,n,t,r,l,a){var u=o.getPlayer(i);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,c=je(t);try{var d=function(){var t,o,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,g=d.durationInSeconds,y=p||0,h=f,b=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(c=o.ads)||void 0===c?void 0:c.adEventHandler)||null,w="".concat(y,"_").concat(v),k=O.get("pod-".concat(l))||[];if(console.warn(e,y,"map:",v,"condition1:",e>=y,"map:",O),e>=y&&!k.includes(w)){k.push(w),O.set("pod-".concat(l),k);try{P(v,n,h,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var S=Ae.position;Ae.set(null),setTimeout(function(){null!=S&&(u.currentTime(S),a())},500)}if("function"==typeof b)try{var I,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:g,ad:null==n||null===(I=n.ads)||void 0===I?void 0:I[r],adIndex:r};b({adsData:T}),Oe(i,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(c.s();!(s=c.n()).done;)d()}catch(e){c.e(e)}finally{c.f()}}},P=function(e,n,t,r){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(r.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},S=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ae.set(l),f=xe.get(),(p=o.getPlayer(i)).one("loadeddata",function(){f&&k(f)}),m=new Map,g=new Map,y=-1,h=(null===(a=document)||void 0===a||null===(u=a.getElementsByClassName("tvProviderImage"))||void 0===u?void 0:u[0])||null,b=(null==p||null===(c=p.controlBar)||void 0===c?void 0:c.getChild("videoSelector"))||null,w=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,k=function(){var e=n(t.mark(function e(n){var a,u,c,d,f,p,k,O,P,T,j,E,D,C,x,A,L;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return D=function(e){document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",D),0===e.button&&T()},E=function(e){},j=function(){var e,n=k.currentTime(),t=null,r=je(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=(o.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,m.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){k.currentTime(t+2.2)},100))},T=function(){var e,n=k.currentTime(),t=null,r=je(p);try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.startTimeInSeconds,l=o.durationInSeconds,a=o.ads,u=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>u||n>i)&&!m.has(i)||n>=i&&n<=u)&&(t=i,m.set(i,!0),g.set(i,!0))}}catch(e){r.e(e)}finally{r.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){k.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:d=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",d),f=d.avails,p=[],k=o.getPlayer(i),O=k.controlBar.progressControl,P=O.seekBar.el(),f.map(function(e,n){var t,r,o;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(o=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===o?void 0:o[0])||[]})}),!u&&l&&(k.currentTime(l),j()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,r=k.duration();if(!(n>r||Array.isArray(t)&&0==(null==t?void 0:t.length))){var o=n/r*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(o,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(o,"%"),i.style.pointerEvents="none",P.appendChild(i)}}),k.on("timeupdate",s.throttle(function(){var e=k.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[r],o=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=o+i;if(e>=o-1.2&&e<=a+1.2){e>=o&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&m.set(o,!0),pe.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),O.el().style.visibility="hidden";for(var u=e-o,s=0,c=0,d=0;d<l.length;d++){var f,y=null==l||null===(f=l[d])||void 0===f?void 0:f.durationInSeconds;if(u<s+y){c=d;break}s+=y}l[c];var k=Math.max(0,i-u),P=Math.round(k);C.style.display="block",L.textContent="".concat(c+1," of ").concat(l.length," • ").concat(S(P));var T=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,v(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&T.push(null==t?void 0:t.podSlotImpressionBeacon),I(e,t,T,c,r,j),"break"}g.delete(o)},r=0;r<p.length;r++){if("break"===t())break}n||(C.style.display="none",O.el().style.visibility="visible",b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),pe.enable())}},1e3)),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){pe.enabled&&"ArrowRight"==e.key&&(T(),r.skip(i,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",E),document.addEventListener("pointerup",D))}),(C=document.createElement("div")).className="ssai-ad-container",(x=document.createElement("div")).className="sponsored-adbox",(A=document.createElement("div")).className="sponsored-text",A.textContent="Sponsored Ad",x.append(A),(L=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",C.append(x),C.append(L),k.el().appendChild(C);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),O=new Map;case 16:case"end":return e.stop()}},e)})),_e.apply(this,arguments)}function Be(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 Ue(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var He=function(l,u,c,d){var v,f,m,g,y,h,b,k,S,O,P,I,T,j,E,C,x,A,L,R,N,M,V,_,B,U,H,q,F,Q,G,K,W,Y,$,Z,ee,ne,te=u.res,re=void 0===te?null:te,oe=u.sres,ie=void 0===oe?null:oe,le=null!=c&&c.chromecastReceiverId?["chromecast","html5"]:["html5"],ae=(null===(v=re)||void 0===v?void 0:v.contentType)||"video",ue=s.impolicy16x9(null===(f=re)||void 0===f||null===(m=f[ae])||void 0===m||null===(g=m.gist)||void 0===g?void 0:g.videoImageUrl)||s.impolicy16x9(null===(y=re)||void 0===y||null===(h=y[ae])||void 0===h||null===(b=h.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),se=(null===(S=re)||void 0===S||null===(O=S[ae])||void 0===O||null===(P=O.liveDetails)||void 0===P?void 0:P.isDvrEnabled)||!1,ce=(null===(I=re)||void 0===I||null===(T=I[ae])||void 0===T||null===(j=T.streamingInfo)||void 0===j?void 0:j.isLiveStream)||!1,de=(null===(E=re)||void 0===E||null===(C=E.ads)||void 0===C||null===(x=C.preRoll)||void 0===x||null===(A=x.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.active)&&(null===(R=re)||void 0===R||null===(N=R.ads)||void 0===N||null===(M=N.preRoll)||void 0===M||null===(V=M.adTags)||void 0===V||null===(_=V.web)||void 0===_?void 0:_.url),fe=(null===(B=re=Ue(Ue({},re),{},{audioAssetSource:null==c?void 0:c.audioAssetSource}))||void 0===B||null===(U=B[ae])||void 0===U?void 0:U.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(q=H.app_data)||void 0===q||null===(F=q.appcmsMain)||void 0===F||null===(Q=F.adsConfig)||void 0===Q?void 0:Q.vodAdSticherProvider)||!1,pe=(null==c?void 0:c.latency)||6,me=(null==c?void 0:c.skin_settings)||{},ge=(null==c?void 0:c.dvrConfig)||{enable:!1},ye=(ne={enableSmoothSeeking:!0,controls:0!=(null==c?void 0:c.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==c?void 0:c.muted)||!1,autoplay:(null==c?void 0:c.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==me?void 0:me.pictureInPictureToggle)||!1},playbackRates:null!=me&&me.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==c.skin,liveui:se},e(ne,"autoplay",null==c?void 0:c.autoplay),e(ne,"normalizeAutoplay",(null==c?void 0:c.autoplay)&&!de),e(ne,"loop",(null==c?void 0:c.loop)||!1),e(ne,"audioPosterMode",null==c?void 0:c.audioPosterMode),e(ne,"html5",Ue(Ue({dash:Ue(Ue(Ue({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==c?void 0:c.debugConfig)&&(null==c||null===(G=c.debugConfig)||void 0===G?void 0:G.enable)&&{debug:!0,logLevel:null!=c&&null!==(K=c.debugConfig)&&void 0!==K&&K.logLevel?null==c||null===(W=c.debugConfig)||void 0===W?void 0:W.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:pe},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Ue(Ue({liveRangeSafeTimeDelta:pe,useDevicePixelRatio:!0,experimentalLLHLS:(null==c?void 0:c.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==c||null===(Y=c.customData)||void 0===Y?void 0:Y.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===($=null==c?void 0:c.enableLowInitialPlaylist)||void 0===$||$}),debug:!0,nativeTextTracks:"Safari"==r.detectBrowser()},0==(null==c||null===(Z=c.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==c||null===(ee=c.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",ue),e(ne,"techOrder",le),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,r=o.getPlayer(l),i=((null==r?void 0:r.textTracksJson_)||r.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,g,y,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,P=(null==O?void 0:O.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(y=g[0])||void 0===y||null===(h=y.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=P;var I=(null==O?void 0:O.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=I}var T=(null==e||null===(r=e[f])||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType)||"VIDEO";p.contentType=T;var j=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=j;var E=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=E;var D=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,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}(re,e,i);return Ue(Ue({},a),{},{convivaMetaData:Ue({customerKey:(null==c||null===(n=c.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==c||null===(t=c.convivaConfig)||void 0===t?void 0:t.debug)||!1},J.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,a,u=o.getPlayer(l),s=(null==u?void 0:u.currentSource())||{};!(null===(n=re)||void 0===n||null===(t=n[ae])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(a=s.src)&&void 0!==a&&a.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!i.getPlayers()[l]){i.log.level("debug");var he=i(l,ye,function(){var e=n(t.mark(function e(){var n,o,u,s,v,f,m,g,y,h,b,k,S,O,P,I,T,j,E,C,x,A,L;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(he),console.log(i.VERSION),console.log(i.getPlugins()),e.next=5,D(c,re);case 5:if(k=null===(n=re)||void 0===n||null===(o=n[ae])||void 0===o||null===(u=o.liveDetails)||void 0===u?void 0:u.startOverTime,ce&&d.resolve(Ue({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:re}:{response:re})),S={},null!=ge&&ge.enable&&se&&(S.playFromBegining=ge.playFromBegining,S.playLive=ge.playLive,P=null==c||null===(O=c.epg)||void 0===O?void 0:O.programSubType,"linearchannel"===ae?"LIVE"===(null==P?void 0:P.toUpperCase())&&p.addDvrOverlay(l,c):p.addDvrOverlay(l,c)),r.inititateBeacon(l,null==c?void 0:c.analyticsCb,S),z(l,c),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),se&&w(l,k),!de||null!=c&&null!==(s=c.customData)&&void 0!==s&&s.disableAds||r.initialiseAdvertisement(l,de,re),I=r.getSource(re,l),console.log(I),null!=c&&c.nearestClusterUrl&&(I=r.getUpdatedClusterSource(I,c.nearestClusterUrl)),!fe){e.next=21;break}return e.next=20,Le(l,re);case 20:I=e.sent;case 21:I?r.loadVideo(l,I):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:re}),r.handleError(l,"Incompatible / Missing Source")),((null===(v=re)||void 0===v||null===(f=v[ae])||void 0===f||null===(m=f.contentDetails)||void 0===m||null===(g=m.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=re)||void 0===y||null===(h=y[ae])||void 0===h||null===(b=h.closedCaptions)||void 0===b?void 0:b.length)>0)&&(L=(null===(j=re)||void 0===j||null===(E=j[ae])||void 0===E||null===(C=E.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(x=re)||void 0===x||null===(A=x[ae])||void 0===A?void 0:A.closedCaptions),T=L.filter(function(e){return"VTT"===e.format}),a.addCaptions(l,T)),null!=c&&c.disableControls?r.disableControls(l):X(l,Ue(Ue(Ue({},c),ye),{},{liveVideo:ce,isDvrEnabled:se,res:re,sres:ie})),ve(l,Ue(Ue(Ue({},c),ye),{},{liveVideo:ce}),d,{res:re,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}},qe={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Fe(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 Qe(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}var Ge,Ke=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=We(e);He(o,{res:i},e,{resolve:t,reject:r})},We=function(e){var n,t,o,i,l,a,u,s,c=null==e?void 0:e.streamingInfo,d=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,f=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,p=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,m=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,g=(null==e||null===(a=e.streamingInfo)||void 0===a?void 0:a.subtitles)||[],y=(null==e||null===(u=e.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,h=null==e?void 0:e.token,b=r.getDecodedToken(h),w=null==b?void 0:b.site;return Qe(Qe({id:null==qe?void 0:qe[w]},!f&&{directPlaybackUrl:null==d?void 0:d.url}),{},{video:{drmEnabled:f,streamingInfo:{videoAssets:Qe(Qe({},y&&{drmProvider:y}),{},{widevine:null==d?void 0:d.widevine,fairPlay:null==d?void 0:d.fairPlay,playReady:null==d?void 0:d.playReady})},liveDetails:{isDvrEnabled:null==c?void 0:c.isDvrEnabled},gist:Qe({},m&&{videoImageUrl:m}),contentDetails:Qe({},(null==g?void 0:g.length)>0&&{closedCaptions:v(g)})},ads:{preRoll:{adTags:{web:Qe(Qe({},p&&{active:!0}),p&&{url:p})}}}})};function ze(e,n){return Je.apply(this,arguments)}function Je(){return(Je=n(t.mark(function e(n,o){var i,l,a,u,s,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,l=o.reject,a=null==n?void 0:n.videoId,u=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,r.getToken();case 6:c=e.sent,r.getVideoDetails(a,c).then(function(e){var t,o,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(d=o.gist)||void 0===d?void 0:d.contentType,r.setCurrentVideo(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,g,y,h=oe((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,n.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;p.contentType="video",He(u,{res:p},n,{resolve:i,reject:l})}else r.getVideoInfo(a,c).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,p.contentType="video"}).catch(function(e){var n,t,r,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(e))}).finally(function(){He(u,{res:p},n,{resolve:i,reject:l})});else He(u,{res:p},n,{resolve:i,reject:l})}).catch(function(e){r.initiateErrorHandling(e,u,l,a)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Xe(e,n){return Ye.apply(this,arguments)}function Ye(){return(Ye=n(t.mark(function e(n,o){var i,l,a,u,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,l=o.reject,e.next=3,r.getToken();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,r.getLinearChannelDetails(s,a).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,He(u,{res:t},n,{resolve:i,reject:l})}).catch(function(e){r.initiateErrorHandling(e,u,l,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $e(e,n){return Ze.apply(this,arguments)}function Ze(){return(Ze=n(t.mark(function e(n,o){var i,l,a,u,s,c,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=o.resolve,a=o.reject,e.next=3,r.getToken();case 3:u=e.sent,s=null==n?void 0:n.playerId,c=sessionStorage.getItem("season-idx")||0,r.seasonIdxManager.set(parseInt(c)),d=null==n||null===(i=n.series)||void 0===i?void 0:i.id,r.getSeriesDetails(d,u).then(function(e){var t,o,i,c=e.data,v=e.data.seasons;r.setCurrentSeries(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.id);r.createSeriesWatchMap(d,u),r.getVideoDetails(f,u).then(function(e){var t,o,i;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,r.setCurrentVideo(e.data),He(s,{res:null==e?void 0:e.data,sres:c},n,{resolve:l,reject:a})}).catch(function(e){r.initiateErrorHandling(e,s,a,videoId)})}).catch(function(e){r.initiateErrorHandling(e,s,a)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function en(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 nn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}exports.VLPlayerCore=function(){return{loadVideoInstantly:r.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(t.mark(function n(o,i){var l,a,u,d,v,f,p,g,y,h,b,w,k,S,O,P,I,T,E,D,C,x,A;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!r.isPlayerInitialised(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(b=(null==e?void 0:e.videoSourceUrl)||!1,w=null==e?void 0:e.asat,k=(null==e||null===(l=e.epg)||void 0===l?void 0:l.enable)||!1,S=null==e?void 0:e.videoId,O=(null==e||null===(a=e.series)||void 0===a?void 0:a.enable)||!1,P=(null==e?void 0:e.streamingInfo)||!1,window.videoId=S,I=null==e?void 0:e.token,!r.token_authentication_enabled(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",I),r.refreshTokenManager().set(null==e?void 0:e.refreshToken),I&&!r.isTokenExpired(I)){n.next=16;break}return i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}}),n.abrupt("return");case 16:Ge=JSON.parse(atob(I.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(u=Ge)||void 0===u||!u.anonymousId),e.siteOwner=(null===(d=Ge)||void 0===d?void 0:d.site)||null,e.userId=(null===(v=Ge)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(f=Ge)||void 0===f?void 0:f.userId),window.watchHistory=e.watchHistory||null,T=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable?null:null==e?void 0:e.chromecastReceiverId,E=(null==e||null===(g=e.analytics)||void 0===g?void 0:g.gaId)||null,(D=null==e?void 0:e.errors)&&(window.customErrors=D),window.customData=null==e?void 0:e.customData,c.setLocalisation(null==e||null===(y=e.customData)||void 0===y?void 0:y.localisation),r.baseUrlManager.set(e.apiBaseUrl),null!=e&&e.skin&&!s.isNotAValidSkin(e.skin)||(e.skin="VL_ONE"),n.next=33,j(e);case 33:E&&m("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then(function(){return r.runGtag(E)}).catch(function(e){}),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(T)))&&C.addEventListener("contextmenu",function(e){return e.preventDefault()}),b?(A={directPlaybackUrl:b,id:x="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?r.getVideoDetails(x,I).then(function(n){var t=(null==n?void 0:n.data)||{};He(T,{res:nn(nn({},t),A)},e,{resolve:o,reject:i})}).catch(function(e){r.initiateErrorHandling(e,T,i,x)}):He(T,{res:A},e,{resolve:o,reject:i})):P?Ke(e,{resolve:o,reject:i}):O?$e(e,{resolve:o,reject:i}):k?Xe(e,{resolve:o,reject:i}):ze(e,{resolve:o,reject:i});case 37:case"end":return n.stop()}},n)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:u.getRenditions,skip:r.skip,getPlayer:o.getPlayer,play:r.play,pause:r.pause,detectBrowser:r.detectBrowser,rewind:r.rewind,loadVideo:r.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:r.isPlayerInitialised,load:r.load,authenticateLC:r.authenticateLC,dispose:r.dispose,enableCaptions:a.enableCaptions,disableCaptions:a.disableCaptions,getCaptions:a.getCaptions,playSelectedResolution:u.playSelectedResolution,getSource:r.getSource,setVolume:y,getVolume:h,disableControls:r.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:r.getEntitlementData,adsQueuePointManager:Ve,getSsaiEvents:Pe,playerEvents:l.playerEvents}},exports.initialiseKeyboardEvents=function(e,n){var t,i,l,a=o.getPlayer(e),u=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(l=document)||void 0===l||l.addEventListener("keydown",function(t){var o,i,l,c,d,v,f,p,m;if(pe.enabled&&"input"!=t.target.localName){var g=t.key,y=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==s||s.focus()),g){case" ":null==u||u.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":y&&!1===n.liveui||r.rewind(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(c=l.appcmsMain)||void 0===c||null===(d=c.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(v=window)&&void 0!==v&&null!==(f=v.app_data)&&void 0!==f&&null!==(p=f.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;y||r.skip(e,10)}}},!0)},exports.setupAdvertisementMarkers=function(e,n){return _e.apply(this,arguments)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./generic-bfd81e0e.js"),require("./player_instance-fcf6a8fb.js"),require("video.js");var e=require("./index-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./generic-bfd81e0e.js"),require("./player_instance-fcf6a8fb.js"),require("video.js");var e=require("./index-08d3c4b6.js");require("./util-a3ed1133.js"),require("./captions-bf891620.js"),require("./resolution-9c4872ec.js"),require("./skin-9e714900.js"),require("./localisation-56e0a999.js"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("./index-de801167.js"),require("./icons-79591410.js"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-e3fdf1e7.js"),r=require("./index-
|
|
1
|
+
"use strict";var e=require("./features-e3fdf1e7.js"),r=require("./index-08d3c4b6.js"),i=require("./icons-79591410.js"),n=require("./player_instance-fcf6a8fb.js"),t=require("./skin-9e714900.js"),s=require("./generic-bfd81e0e.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./util-a3ed1133.js"),require("@babel/runtime/helpers/typeof"),require("./captions-bf891620.js"),require("@babel/runtime/helpers/slicedToArray"),require("./index-de801167.js"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(l,o){n.getPlayer(l).addClass("skin_default"),r.initialiseKeyboardEvents(l,o),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(l,o),function(r,t){var l=n.getPlayer(r),o=(null==t?void 0:t.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-f7d4f8e9.js")}).then(function(e){e.initaliseFunctionality(t.sres.seasons,s.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==t||null===(i=t.sres)||void 0===i?void 0:i.seasons,t),e.addNextEpisodeButton(t.sres,t.res,r))})}(l,o),function(e,r){var s,l,o,u,a=n.getPlayer(e),d=document.getElementsByClassName("vjs-current-time")[0],c=document.getElementsByClassName("vjs-duration")[0],m=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(d&&(d.style.display="none"),c&&(c.style.display="none"),m&&(m.style.display="none"));null===(s=a.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(l=s.el())||void 0===l||l.appendChild(t.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(o=a.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(u=o.el())||void 0===u||u.appendChild(t.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var p=a.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(t.createIconMarkup(i.NewCaptionsSvg()));var v=document.createElement("div");v.classList.add("caption-header"),p.querySelector(".vjs-menu-content").insertBefore(v,p.querySelector(".vjs-menu-item"))}(l,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-e3fdf1e7.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("./index-a5c150cc.js"),l=require("./generic-bfd81e0e.js");require("videojs-contrib-quality-menu");var n=require("video.js"),t=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/regenerator"),o=require("./index-
|
|
1
|
+
"use strict";var e=require("./features-e3fdf1e7.js"),r=require("./player_instance-fcf6a8fb.js"),i=require("./index-a5c150cc.js"),l=require("./generic-bfd81e0e.js");require("videojs-contrib-quality-menu");var n=require("video.js"),t=require("@babel/runtime/helpers/asyncToGenerator"),a=require("@babel/runtime/regenerator"),o=require("./index-08d3c4b6.js"),u=require("./icons-79591410.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./skin-9e714900.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-30f8c89c.js"),require("./util-a3ed1133.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bf891620.js"),require("video.js/dist/video-js.min.css"),require("./index-de801167.js");var d={markerStyle:{width:"5px","background-color":"red"},markerTip:{display:!1,text:function(e){return e.title},time:function(e){return e.time}},onMarkerClick:function(e){},markers:[],duration:0};function s(){return(s=t(a.mark(function e(i,l){var n,t,o,u,d,s;return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=r.getPlayer(i),(t=n.seekable())&&t.length>0&&(o=t.start(0),u=t.end(t.length-1),d=u-o,n.markers({markerStyle:{width:"4px","background-color":"#576478"},markerTip:{display:!1},duration:d||0}),n.markers.initializeMarker(),s=v(l,d),n.markers.add(s));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function v(e,r){var i=(new Date).getTime(),l=new Date(i-1e3*r).getTime();return e.filter(function(e){var r=new Date(e.formatted_startdate).getTime();return r>=l&&r<=i}).map(function(e){var r=new Date(e.formatted_startdate).getTime()-l;return{key:e.programId,title:e.title,time:r/1e3}})}function c(n,t){var a=r.getPlayer(n);a&&(a.on("loadeddata",function(){var e,o,u,d,v,c,p,m,y,k=(null==t||null===(e=t.dvrConfig)||void 0===e?void 0:e.programs)||[];a.qualityLevels()&&a.qualityLevels().length&&function(e){var i=r.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(v=d.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play)||null!=t&&t.liveVideo||i.addNextEpPreview(n,t),null!=t&&t.liveVideo||l.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||i.initiateTrickplay(n);var g=(null==t||null===(p=t.epg)||void 0===p?void 0:p.programSubType)||"";null!=t&&null!==(m=t.dvrConfig)&&void 0!==m&&m.enable&&null!=t&&t.isDvrEnabled&&null!=t&&null!==(y=t.epg)&&void 0!==y&&y.enable&&"LIVE"===(null==g?void 0:g.toUpperCase())&&k&&k.length&&function(e,r){s.apply(this,arguments)}(n,k)}),a.one("play",function(){var r,i,l,t;null!==(r=window)&&void 0!==r&&null!==(i=r.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(n,null===(l=window)||void 0===l||null===(t=l.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}n.registerPlugin("markers",function(e){var r=n.mergeOptions(d,e),i={},l=[],t=this,a=null;function o(){l.sort(function(e,i){return r.markerTip.time(e)-r.markerTip.time(i)})}function u(e){e.forEach(function(e){t.el().querySelector(".vjs-progress-holder").appendChild(function(e){var l=n.dom.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":r.markerTip.time(e)});return v(e,l),l.addEventListener("click",function(l){var n=!1;if("function"==typeof r.onMarkerClick&&(n=!1===r.onMarkerClick(e)),!n){var a=this.getAttribute("data-marker-key");t.currentTime(r.markerTip.time(i[a]))}}),r.markerTip.display&&function(e){e.addEventListener("mouseover",function(){var l=i[e.getAttribute("data-marker-key")];a&&(r.markerTip.html?a.querySelector(".vjs-tip-inner").innerHTML=r.markerTip.html(l):a.querySelector(".vjs-tip-inner").innerText=r.markerTip.text(l),a.style.left=s(l)+"%",a.style.visibility="visible")}),e.addEventListener("mouseout",function(){a&&(a.style.visibility="hidden")})}(l),l}(e)),i[e.key]=e,l.push(e)}),o()}function s(e){return r.markerTip.time(e)/r.duration*100}function v(e,i){i.className="vjs-marker ".concat(e.class||""),Object.keys(r.markerStyle).forEach(function(e){i.style[e]=r.markerStyle[e]});var l=e.time/r.duration;(l<0||l>1)&&(i.style.display="none");var n=s(e);n>=99.5&&(n=99.5),i.style.left=n+"%"}t.markers={getMarkers:function(){return l},initializeMarker:function(){a=n.dom.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),t.el().querySelector(".vjs-progress-holder").appendChild(a)},add:function(e){u(e)},update:function(e,i){!function(e,i){e.forEach(function(e){var l=t.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),n=r.markerTip.time(e);l?(i||l.getAttribute("data-marker-time")!==n)&&(v(e,l),l.setAttribute("data-marker-time",n)):u([e])}),o()}(e,i)}}});var p=function(e,i){var l,t,a,o,u,d,s,v,c,p,m,y,k=r.getPlayer(e),g=(null==i?void 0:i.theme)||{},b=n.dom.$(".vjs-play-progress"),f=n.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");f&&(f.style.color="".concat(null===(l=window)||void 0===l||null===(t=l.app_data)||void 0===t||null===(a=t.appcmsMain)||void 0===a||null===(o=a.brand)||void 0===o||null===(u=o.cta)||void 0===u||null===(d=u.primary)||void 0===d?void 0:d.backgroundColor)),b&&(b.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(y=m.primary)||void 0===y?void 0:y.backgroundColor));var h=k.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&b&&(b.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&h&&(h.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&f&&(f.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?h.el().style.borderRadius=".3em":h.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(n,t){r.getPlayer(n).addClass("skin_vlone"),c(n,t),function(r,n){var t,a,d,s,v,c,p,m,y,k,g,b,f,h,q,j=(null==n||null===(t=n.res)||void 0===t||null===(a=t.video)||void 0===a?void 0:a.isSSAIEnabled)||!1,T=l.getSource(null==n?void 0:n.res,r)||{};T.src;var w=(null==n?void 0:n.skin_settings)||{};null!=w&&w.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(r,"VL_ONE",u.SkipSvgV2());(null!=w&&w.rewindBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(r,"VL_ONE",u.RewindSvgV2());(null==n||null===(d=n.relatedVideos)||void 0===d||null===(s=d.content)||void 0===s?void 0:s.length)>0&&e.addVideoSelector(r,null==n?void 0:n.relatedVideos);null!=n&&null!==(v=n.series)&&void 0!==v&&v.enable&&e.addSeriesSelectorV2(r,n);(null==n||null===(c=n.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector(r,null==n?void 0:n.streams);if(i.addTVProviderImage(r,n),o.initialiseKeyboardEvents(r,n),"MEDIA_TAILOR"==(null===(p=window)||void 0===p||null===(m=p.app_data)||void 0===m||null===(y=m.appcmsMain)||void 0===y||null===(k=y.adsConfig)||void 0===k?void 0:k.vodAdSticherProvider)&&null!==(g=window)&&void 0!==g&&null!==(b=g.app_data)&&void 0!==b&&null!==(f=b.appcmsMain)&&void 0!==f&&null!==(h=f.adsConfig)&&void 0!==h&&h.vodAdClientSideTracking&&j){var C,S=null;if(null!=n&&null!==(C=n.series)&&void 0!==C&&C.enable){var B,M,E,V=null===(B=l.getCurrentVideo())||void 0===B||null===(M=B.video)||void 0===M||null===(E=M.gist)||void 0===E?void 0:E.id,L=l.getSeriesWatchMap(),_=(null==L?void 0:L.get(V))||{t:0,p:0},x=_.t;_.p<95&&(S=x)}else{var P=n.watchHistoryResumeTime;n.watchedPercentage<95&&(S=P)}o.setupAdvertisementMarkers(r,S)}if(null!=n&&null!==(q=n.dvrConfig)&&void 0!==q&&q.enable&&null!=n&&n.isDvrEnabled){var A,D,O=(null==n||null===(A=n.epg)||void 0===A?void 0:A.programSubType)||"";null!=n&&null!==(D=n.epg)&&void 0!==D&&D.enable?"LIVE"===(null==O?void 0:O.toUpperCase())&&(e.addStartFromBeginningButton(r,n),e.addWatchLiveButton(r,n)):(e.addStartFromBeginningButton(r,n),e.addWatchLiveButton(r,n))}}(n,t),p(n,t)};
|
package/esm/bundle.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
6
7
|
height: 0.7em;
|
|
7
8
|
position: absolute;
|
|
@@ -216,7 +217,6 @@
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
|
|
219
|
-
|
|
220
220
|
/* CSS for videojs-dvr-seekbar */
|
|
221
221
|
|
|
222
222
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -598,38 +598,6 @@
|
|
|
598
598
|
text-align: center;
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
-
/* a wrapper element that tracks the mouse vertically */
|
|
602
|
-
.vjs-thumbnail-holder {
|
|
603
|
-
position: absolute;
|
|
604
|
-
left: -1000px;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/* the thumbnail image itself */
|
|
608
|
-
.vjs-thumbnail {
|
|
609
|
-
position: absolute;
|
|
610
|
-
left: 0;
|
|
611
|
-
bottom: 1.3em;
|
|
612
|
-
opacity: 0;
|
|
613
|
-
transition: opacity .2s ease;
|
|
614
|
-
-webkit-transition: opacity .2s ease;
|
|
615
|
-
-moz-transition: opacity .2s ease;
|
|
616
|
-
-mz-transition: opacity .2s ease;
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/* fade in the thumbnail when hovering over the progress bar */
|
|
620
|
-
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
621
|
-
.vjs-progress-control:hover .vjs-thumbnail,
|
|
622
|
-
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
623
|
-
.vjs-progress-control:active .vjs-thumbnail {
|
|
624
|
-
opacity: 1;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
/* ... but hide the thumbnail when hovering directly over it */
|
|
628
|
-
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
629
|
-
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
630
|
-
opacity: 0;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
601
|
.video-js.vjs-quality-menu {
|
|
634
602
|
display: block;
|
|
635
603
|
}
|
|
@@ -700,6 +668,38 @@
|
|
|
700
668
|
-webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
701
669
|
animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
|
|
702
670
|
}
|
|
671
|
+
/* a wrapper element that tracks the mouse vertically */
|
|
672
|
+
.vjs-thumbnail-holder {
|
|
673
|
+
position: absolute;
|
|
674
|
+
left: -1000px;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
/* the thumbnail image itself */
|
|
678
|
+
.vjs-thumbnail {
|
|
679
|
+
position: absolute;
|
|
680
|
+
left: 0;
|
|
681
|
+
bottom: 1.3em;
|
|
682
|
+
opacity: 0;
|
|
683
|
+
transition: opacity .2s ease;
|
|
684
|
+
-webkit-transition: opacity .2s ease;
|
|
685
|
+
-moz-transition: opacity .2s ease;
|
|
686
|
+
-mz-transition: opacity .2s ease;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/* fade in the thumbnail when hovering over the progress bar */
|
|
690
|
+
/* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
|
|
691
|
+
.vjs-progress-control:hover .vjs-thumbnail,
|
|
692
|
+
.vjs-progress-control.fake-active .vjs-thumbnail,
|
|
693
|
+
.vjs-progress-control:active .vjs-thumbnail {
|
|
694
|
+
opacity: 1;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/* ... but hide the thumbnail when hovering directly over it */
|
|
698
|
+
.vjs-progress-control:hover .vjs-thumbnail:hover,
|
|
699
|
+
.vjs-progress-control:active .vjs-thumbnail:active {
|
|
700
|
+
opacity: 0;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
703
|
.vjs-poster {
|
|
704
704
|
display: inline-block;
|
|
705
705
|
vertical-align: middle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import"axios";import{d as o,g as r,a as i,b as l,c as a,e as s,s as u,f as c,l as d,h as v,i as f,j as p,k as m,m as y,r as g,n as h,o as b,p as w,q as k,t as S,u as O,v as I,w as j,x as T,y as E,z as P,A as D,B as A,C as x,D as C,E as L,F as R,G as N,H as M,I as _,J as U,K as V,L as B,M as H,N as F,O as Q,P as G,Q as K}from"./generic-dd89c778.js";import{g as q}from"./player_instance-34118a5b.js";import z from"video.js";import{o as J,g as W,a as X,s as Y,b as $,p as Z}from"./util-28923483.js";import{g as ee,d as ne,a as te,e as oe}from"./captions-b619441b.js";import{g as re,p as ie}from"./resolution-62be852a.js";import{t as le,i as ae,a as se}from"./skin-16f83185.js";import{s as ue}from"./localisation-0bf399a1.js";import ce from"@babel/runtime/helpers/typeof";import de from"@babel/runtime/helpers/toConsumableArray";import ve from"@babel/runtime/helpers/slicedToArray";import{a as fe}from"./index-a012aae4.js";var pe=function(e){return new Promise(function(n,t){if(me(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ye=function(e,n,t){var o=q(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ge=function(e){var n=q(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},he=function(){var e=n(t.mark(function e(n){var r,i,l,a,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=q(null==n?void 0:n.playerId),null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(z),e.finish(13);case 16:(s=z.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.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.airplay&&"Safari"==o()?null==i||i.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)}}(),be=function(e,n){var t=q(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=z.dom.getPointerPosition(a,n).x;z.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"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*s,d.seek()}})};var we=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),pe("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)}}(),ke=function(){var e=n(t.mark(function e(){return t.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){z.getPlugin("eme")||z.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=n(t.mark(function e(){var n;return t.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(z),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)}}(),Oe=function(){var e=n(t.mark(function e(){return t.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)}}(),Ie=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-2dcf13b7.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)}}(),je=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(z)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(z)})},loadAdsLibrary:we,loadEMELibrary:ke,loadMuxPlugin:Se,loadDvrSeekbar:Oe,loadContribDash:Ie});function Te(e){return Ee.apply(this,arguments)}function Ee(){return(Ee=n(t.mark(function e(n){var r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,we();case 3:r&&"Safari"==o()&&Promise.resolve().then(function(){return je}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Pe(e,n){return De.apply(this,arguments)}function De(){return(De=n(t.mark(function e(n,r){var i,l,a,s,u,c,d,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==r?void 0:r.contentType)||"video",v=null==r||null===(i=r[d])||void 0===i?void 0:i.drmEnabled,null==r||null===(l=r[d])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==r||null===(s=r[d])||void 0===s||null===(u=s.streamingInfo)||void 0===u||null===(c=u.videoAssets)||void 0===c?void 0:c.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==o()?ke():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?Ie():ke():"Safari"!=o()&&f?Ie():null,he(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ce=new Set,Le=null,Re=function(e,n,t){var o,i,a,s,u,c,d,v={},f=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(o=e[f])||void 0===o?void 0:o.id)||"Null",v["c3.cm.contentType"]=He(e),v[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),v[null==t||null===(a=t.Constants)||void 0===a?void 0:a.STREAM_URL]=n.currentSrc(),v[null==t||null===(s=t.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===r()?"NULL":r(),v["c3.cm.categoryType"]=Ue(e),v["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"}}(),v.DRMEnabled=(null===(u=e[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=e[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[t.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ve(e),v["c3.cm.genreList"]=Me(e),v["c3.cm.genre"]=Ne(e),v["c3.cm.channel"]=_e(e);var p=Ge(l(),e);return v=xe(xe({},v),p)},Ne=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Me=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"},_e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Ue=function(e){return(null==e?void 0:e.contentType)||"null"},Ve=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Be=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},He=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Fe,Qe,Ge=function(e,n){var t,o,r,l,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var c=a(),d=i();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(r=e[c-1])||void 0===r||null===(l=r.episodes)||void 0===l||null===(s=l[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ke=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"}},qe=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ze=function(){var e=n(t.mark(function e(n,o){var r,i,l,a,u,c,d,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(null==o?void 0:o.convivaConfig)||{},i=r.trackConvivaPlayerEvent,l=r.paymentHandler,a=r.tveProvider,u=r.enable,c=r.appName,d=(o||{}).token,u){e.next=4;break}return e.abrupt("return");case 4:if(v=q(n),"function"==typeof(f=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(p=e.sent){e.next=13;break}return e.abrupt("return");case 13:v.ready(function(){var e=v.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ke(t.keySystem);f("contentInfo",{DRMEnabled:o})}else f("contentInfo",{DRMEnabled:"None"})}),n||f("contentInfo",{DRMEnabled:"None"})}),v.on("loadstart",function(){var e,n;Le&&Le!==v.currentSrc()&&f("playbackEnded"),f("setPlayer",v),Ce.clear(),Le=v.currentSrc();var t=qe(v.currentType()),r=s(),i=Re(r,v,p);i[null==p||null===(e=p.Constants)||void 0===e?void 0:e.PLAYER_NAME]=c||"WEB",i[null==p||null===(n=p.Constants)||void 0===n?void 0:n.ASSET_NAME]=Be(r,o),i.authToken=d||"NULL",i.streamType=t,i.D2CType=l||"NONE",i.subscriberType=a||(l?"D2C":"FREE"),i["c3.cm.affiliate"]=a||"NULL",Je.setData(i),f("contentInfo",i)}),v.on("loadedmetadata",function(){var e,n=v.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})}),v.on("play",function(){Ce.has(v.currentSrc())||(Ce.add(v.currentSrc()),f("playbackStarted",null))}),v.on("ended",function(){Ce.has(v.currentSrc())&&Ce.delete(v.currentSrc()),f("playbackEnded")}),v.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:v,adsLoader:null==e?void 0:e.adsLoader})}),v.on("dispose",function(){null==Ce||Ce.clear(),f("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Je=(Fe={},{setData:function(e){Fe=xe(xe({},Fe),e)},getData:function(){return Fe}}),We=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-5ff2a543.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-a9816629.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-f2e99bd5.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-70cec92b.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-fa5461e2.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-8dbcb656.js").then(function(t){t.initialiseSkin(e,n)})};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ye(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Xe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var $e=[],Ze=0,en=null;function nn(n,t,o){var r,i,l,a,c,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(r=t.watchHistory)||void 0===r||r.apiVersion;var v=null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.profileId,f=Math.floor(n.currentTime()),p=Math.floor(n.duration());null==t||null===(l=t.watchHistory)||void 0===l||l.xapiKey;var m=(null==t||null===(a=t.video)||void 0===a?void 0:a.originalObjectId)||null,y=(null==t||null===(c=t.watchHistory)||void 0===c?void 0:c.saveOffline)||!1,g=Math.floor(n.currentTime()),h=d?100:Math.floor(f/p*100),b={};y?function(n,t,o){var r=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),i=tn(r),l=(new Date).getTime(),a=s(),u=(null==a?void 0:a.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(n,t){return Ye(Ye({},n),{},e({},t,u[t]))},{}),d=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Qe});d<0?i.push(Ye(Ye({content:c},n),{},{addedDate:l,updateDate:l})):i[d]=Ye(Ye(Ye({},i[d]),n),{},{updateDate:l});localStorage.setItem("".concat(r),JSON.stringify(i))}(b={completed:d,watchedTime:g,watchedPercentage:h},v,t.siteOwner):(b=Ye(Ye({videoId:Qe,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:v},en&&{seriesId:en}),m&&{originalObjectId:m}),u(b).then(function(e){}).catch(function(e){})),Ze=f+o}function tn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function on(e,n,t){var o=tn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var rn=!1,ln=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!rn){var i=an(e,"videoAssets","secondaryVideoAssets"),l=c(i,n);return l&&d(n,l),rn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function an(e,n,t){if(Array.isArray(e))return e.map(function(e){return an(e,n,t)});if(null!==e&&"object"===ce(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=an(e[r],n,t)}),o}return e}function sn(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 un(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)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function un(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function dn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var vn=function(e,n,t,r){var i,l,a,u,c=r.res,d=r.sres,y=q(e),g=(null==c?void 0:c.contentType)||"video",h=(null==c?void 0:c[g].drmEnabled)||!1,b=(null==c||null===(i=c[g])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,w=(null==c||null===(a=c[g])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;p(c),y&&(y.on("loadstart",function(){b?t.resolve({status:!0,msg:"Video Loaded",response:c}):t.resolve(dn({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:c}:{response:c}))}),y.on("loadeddata",function(){var t,r,i,l=ee(e);if(null==l||l.map(function(n){return ne(e,n.id)}),w&&"Safari"===o())try{var a;null==y||null===(a=y.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&ye(e,sessionStorage.getItem("volume")||"100");var u=s();if(v(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.saveOffline)){var d,f,p=dn(dn({},n),c);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(en=null==n||null===(r=n.series)||void 0===r?void 0:r.id),$e=[],Ze=0,Qe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=q(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());$e.includes(Ze)||(e==Ze?($e.push(e),nn(a,n,l)):e>Ze&&(Ze=e+l))}}),a.one("ended",function(){nn(a,n,l,!0)}))}(e,p,null==u||null===(d=u.video)||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=y&&y.mux){var m,g,h,b,k,S,O=(null===(m=s())||void 0===m?void 0:m.video)||(null==c?void 0:c.video),I=null==O?void 0:O.gist,j={env_key:null==n||null===(g=n.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==O||null===(b=O.series)||void 0===b?void 0:b.title,video_stream_type:null!=O&&null!==(k=O.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==n||null===(S=n.analytics)||void 0===S?void 0:S.userId};y.mux({debug:!1,data:j})}}),y.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];y.trigger("subtitlechanged",n)}),y.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){b&&ln(c,e)}),y.on("error",function(){var n,o;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&b)?ln(c,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===(o=y.error())||void 0===o?void 0:o.message)||"Some error occured",response:c}))}),y.one("play",function(){var e,t,o,r,i;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var l,a,u,c=null===(l=s())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=m(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){y.currentTime(f)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){y.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(b){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var e,n=(null==y||null===(e=y.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ce(y.dash)){var t,r,i,l=null==y||null===(t=y.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),s=sn(n);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){s.e(e)}finally{s.f()}}else{var c,d=sn(n);try{for(d.s();!(c=d.n()).done;){var v,f,p,m=c.value;if(("Chrome"==o()||"Edge"==o()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))y.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function fn(e,n){var t,o,r,i=q(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,v,f,p;if(mn.enabled&&"input"!=t.target.localName){var m=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==a||a.focus()),m){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||g(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(v=d.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(p=f.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;h||y(e,10)}}},!0)}var pn,mn=(pn=!0,{enable:function(){pn=!0},disable:function(){pn=!1},get enabled(){return pn}}),yn="ssai-breakStart",gn="ssai-adImpression",hn="ssai-firstQuartile",bn="ssai-midpoint",wn="ssai-thirdQuartile",kn="ssai-complete",Sn="ssai-breakEnd",On={breakStart:yn,impression:gn,firstQuartile:hn,midpoint:bn,thirdQuartile:wn,complete:kn,breakEnd:Sn};function In(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=q(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=On[o];r&&t.trigger(r,n)}function jn(e){var n=q(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(yn,e)},adImpression:function(e){return t(gn,e)},adFirstQuartile:function(e){return t(hn,e)},adMidpoint:function(e){return t(bn,e)},adThirdQuartile:function(e){return t(wn,e)},adComplete:function(e){return t(kn,e)},adBreakEnd:function(e){return t(Sn,e)}}}function Tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function En(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Tn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Pn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Dn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Dn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var An,xn,Cn=(An="",{set:function(e){e&&(An=e)},get:function(){return An}}),Ln=(xn=null,{set:function(e){xn=e},get position(){return xn}});function Rn(e,n){return Nn.apply(this,arguments)}function Nn(){return Nn=n(t.mark(function e(n,o){var r,i,l,a,s,u,d,v,f,p,m,y,g,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return q(n),r=c(o,n),i=r.src,l=i.replace("/dash/","/session/").replace("master","session"),l=h(l,n,o),a=Mn(l),s=ve(a,2),u=s[0],d=s[1],l=new URL(l.split("?")[0]),Object.keys(d).length>0&&Object.entries(d).forEach(function(e){var n=ve(e,2),t=n[0],o=n[1];l.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:En({},u)})});case 11:return v=e.sent,e.next=14,v.json();case 14:return f=e.sent,p="https://"+new URL(l).hostname,m=f.trackingUrl,y=f.manifestUrl,g=p+m,b=p+y,Cn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),r.src=b,e.abrupt("return",r);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",r);case 29:case"end":return e.stop()}},e,null,[[8,26]])})),Nn.apply(this,arguments)}function Mn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=Pn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=ve(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=ve(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}var _n,Un=(_n=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),_n=Array.isArray(e)?de(e):_n},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",_n),de(_n)}});function Vn(e,n){return Bn.apply(this,arguments)}function Bn(){return Bn=n(t.mark(function e(o,r){var i,l,a,s,u,c,d,v,f,p,m,g,h,b,w,k,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:S=function(e,n,t,r,i,l){var a=q(o);if(!a.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(a.currentTime());var s,u=Pn(t);try{var c=function(){var t,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,h=f,b=(null===(t=window)||void 0===t||null===(u=t.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),O=w.get("pod-".concat(i))||[];if(console.warn(e,g,"map:",v,"condition1:",e>=g,"map:",w),e>=g&&!O.includes(S)){O.push(S),w.set("pod-".concat(i),O);try{k(v,n,h,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var I=Ln.position;Ln.set(null),setTimeout(function(){null!=I&&(a.currentTime(I),l())},500)}if("function"==typeof b)try{var j,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==n||null===(j=n.ads)||void 0===j?void 0:j[r],adIndex:r};b({adsData:T}),In(o,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},k=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},b=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ln.set(r),u=Cn.get(),(c=q(o)).one("loadeddata",function(){u&&h(u)}),d=new Map,v=new Map,f=-1,p=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,m=(null==c||null===(a=c.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,g=(null==c||null===(s=c.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,h=function(){var e=n(t.mark(function e(n){var i,l,a,s,u,c,h,w,k,O,I,j,T,E,P,D,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return T=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",T),0===e.button&&O()},j=function(e){},I=function(){var e,n=h.currentTime(),t=null,o=Pn(c);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,d.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},O=function(){var e,n=h.currentTime(),t=null,o=Pn(c);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!d.has(i)||n>=i&&n<=s)&&(t=i,d.set(i,!0),v.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},l=!1,e.next=7,fetch(n);case 7:return a=e.sent,e.next=10,a.json();case 10:s=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",s),u=s.avails,c=[],h=q(o),w=h.controlBar.progressControl,k=w.seekBar.el(),u.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(l=!0),c.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!l&&r&&(h.currentTime(r),I()),null!=c&&c.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),window.adsQueueList=c),console.log(c,"data"),c.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",k.appendChild(i)}}),h.on("timeupdate",le(function(){var e=h.currentTime();if(e!==f){f=e;for(var n=!1,t=function(){var t=c[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&d.set(r,!0),mn.disable(),p&&p.classList.add("vjs-hidden"),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),g&&(g.el().style.pointerEvents="none",g.el().classList.add("vjs-hidden")),w.el().style.visibility="hidden";for(var s=e-r,u=0,f=0,y=0;y<l.length;y++){var h,k=null==l||null===(h=l[y])||void 0===h?void 0:h.durationInSeconds;if(s<u+k){f=y;break}u+=k}l[f];var O=Math.max(0,i-s),j=Math.round(O);E.style.display="block",A.textContent="".concat(f+1," of ").concat(l.length," • ").concat(b(j));var T=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,de(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&T.push(null==t?void 0:t.podSlotImpressionBeacon),S(e,t,T,f,o,I),"break"}v.delete(r)},o=0;o<c.length;o++){if("break"===t())break}n||(E.style.display="none",w.el().style.visibility="visible",m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),g&&(g.el().style.pointerEvents="auto",g.el().classList.remove("vjs-hidden")),p&&p.classList.remove("vjs-hidden"),mn.enable())}},1e3)),null===(i=document)||void 0===i||i.addEventListener("keydown",function(e){mn.enabled&&"ArrowRight"==e.key&&(O(),y(o,10),e.stopPropagation())}),w.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",T))}),(E=document.createElement("div")).className="ssai-ad-container",(P=document.createElement("div")).className="sponsored-adbox",(D=document.createElement("div")).className="sponsored-text",D.textContent="Sponsored Ad",P.append(D),(A=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",E.append(P),E.append(A),h.el().appendChild(E);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),w=new Map;case 16:case"end":return e.stop()}},e)})),Bn.apply(this,arguments)}function Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Fn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Hn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Qn=function(r,i,l,a){var s,u,v,p,m,y,g,h,O,I,j,T,E,P,D,A,x,C,L,R,N,M,_,U,V,B,H,F,Q,G,K,J,W,X,Y,$,Z,ee,ne=i.res,oe=void 0===ne?null:ne,re=i.sres,ie=void 0===re?null:re,le=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],se=(null===(s=oe)||void 0===s?void 0:s.contentType)||"video",ue=ae(null===(u=oe)||void 0===u||null===(v=u[se])||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.videoImageUrl)||ae(null===(m=oe)||void 0===m||null===(y=m[se])||void 0===y||null===(g=y.gist)||void 0===g||null===(h=g.imageGist)||void 0===h?void 0:h.r16x9),ce=(null===(O=oe)||void 0===O||null===(I=O[se])||void 0===I||null===(j=I.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,de=(null===(T=oe)||void 0===T||null===(E=T[se])||void 0===E||null===(P=E.streamingInfo)||void 0===P?void 0:P.isLiveStream)||!1,ve=(null===(D=oe)||void 0===D||null===(A=D.ads)||void 0===A||null===(x=A.preRoll)||void 0===x||null===(C=x.adTags)||void 0===C||null===(L=C.web)||void 0===L?void 0:L.active)&&(null===(R=oe)||void 0===R||null===(N=R.ads)||void 0===N||null===(M=N.preRoll)||void 0===M||null===(_=M.adTags)||void 0===_||null===(U=_.web)||void 0===U?void 0:U.url),pe=(null===(V=oe=Fn(Fn({},oe),{},{audioAssetSource:null==l?void 0:l.audioAssetSource}))||void 0===V||null===(B=V[se])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(F=H.app_data)||void 0===F||null===(Q=F.appcmsMain)||void 0===Q||null===(G=Q.adsConfig)||void 0===G?void 0:G.vodAdSticherProvider)||!1,me=(null==l?void 0:l.latency)||6,ye=(null==l?void 0:l.skin_settings)||{},ge=(null==l?void 0:l.dvrConfig)||{enable:!1},he=(ee={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ye?void 0:ye.pictureInPictureToggle)||!1},playbackRates:null!=ye&&ye.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:ce},e(ee,"autoplay",null==l?void 0:l.autoplay),e(ee,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!ve),e(ee,"loop",(null==l?void 0:l.loop)||!1),e(ee,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ee,"html5",Fn(Fn({dash:Fn(Fn(Fn({},!z.browser.IS_SAFARI&&{useTTML:!0}),(null==l?void 0:l.debugConfig)&&(null==l||null===(K=l.debugConfig)||void 0===K?void 0:K.enable)&&{debug:!0,logLevel:null!=l&&null!==(J=l.debugConfig)&&void 0!==J&&J.logLevel?null==l||null===(W=l.debugConfig)||void 0===W?void 0:W.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Fn(Fn({liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==l||null===(X=l.customData)||void 0===X?void 0:X.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(Y=null==l?void 0:l.enableLowInitialPlaylist)||void 0===Y||Y}),debug:!0,nativeTextTracks:"Safari"==o()},0==(null==l||null===($=l.customData)||void 0===$?void 0:$.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ee,"poster",ue),e(ee,"techOrder",le),e(ee,"chromecast",{requestCustomDataFn:function(e){var n,t,o=q(r),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,r,i,l,a,s,u,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,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=I;var j=(null==O?void 0:O.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=j}var T=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=T;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,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}(oe,e,i);return Fn(Fn({},a),{},{convivaMetaData:Fn({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},Je.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,l,a=q(r),s=(null==a?void 0:a.currentSource())||{};!(null===(n=oe)||void 0===n||null===(t=n[se])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ee);if(!z.getPlayers()[r]){z.log.level("debug");var we=z(r,he,function(){var e=n(t.mark(function e(){var n,o,i,s,u,v,p,m,y,g,h,O,I,j,T,E,P,D,A,x,C,L,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(we),console.log(z.VERSION),console.log(z.getPlugins()),e.next=5,Pe(l,oe);case 5:if(O=null===(n=oe)||void 0===n||null===(o=n[se])||void 0===o||null===(i=o.liveDetails)||void 0===i?void 0:i.startOverTime,de&&a.resolve(Fn({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:oe}:{response:oe})),I={},null!=ge&&ge.enable&&ce&&(I.playFromBegining=ge.playFromBegining,I.playLive=ge.playLive,T=null==l||null===(j=l.epg)||void 0===j?void 0:j.programSubType,"linearchannel"===se?"LIVE"===(null==T?void 0:T.toUpperCase())&&fe(r,l):fe(r,l)),w(r,null==l?void 0:l.analyticsCb,I),ze(r,l),/Android/i.test(navigator.userAgent)&&(z.options.vhs.overrideNative=!0),ce&&be(r,O),!ve||null!=l&&null!==(s=l.customData)&&void 0!==s&&s.disableAds||k(r,ve,oe),E=c(oe,r),console.log(E),null!=l&&l.nearestClusterUrl&&(E=S(E,l.nearestClusterUrl)),!pe){e.next=21;break}return e.next=20,Rn(r,oe);case 20:E=e.sent;case 21:E?d(r,E):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),f(r,"Incompatible / Missing Source")),((null===(u=oe)||void 0===u||null===(v=u[se])||void 0===v||null===(p=v.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=oe)||void 0===y||null===(g=y[se])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(R=(null===(D=oe)||void 0===D||null===(A=D[se])||void 0===A||null===(x=A.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(C=oe)||void 0===C||null===(L=C[se])||void 0===L?void 0:L.closedCaptions),P=R.filter(function(e){return"VTT"===e.format}),te(r,P)),null!=l&&l.disableControls?b(r):We(r,Fn(Fn(Fn({},l),he),{},{liveVideo:de,isDvrEnabled:ce,res:oe,sres:ie})),vn(r,Fn(Fn(Fn({},l),he),{},{liveVideo:de}),a,{res:oe,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}},Gn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Kn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var zn,Jn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Wn(e);Qn(r,{res:i},e,{resolve:t,reject:o})},Wn=function(e){var n,t,o,r,i,l,a,s,u=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,d=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,v=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.url)||null,f=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,y=null==e?void 0:e.token,g=O(y),h=null==g?void 0:g.site;return qn(qn({id:null==Gn?void 0:Gn[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:qn(qn({},m&&{drmProvider:m}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:qn({},f&&{videoImageUrl:f}),contentDetails:qn({},(null==p?void 0:p.length)>0&&{closedCaptions:de(p)})},ads:{preRoll:{adTags:{web:qn(qn({},v&&{active:!0}),v&&{url:v})}}}})};function Xn(e,n){return Yn.apply(this,arguments)}function Yn(){return(Yn=n(t.mark(function e(n,o){var r,i,l,a,s,u;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.resolve,i=o.reject,l=null==n?void 0:n.videoId,a=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,E();case 6:u=e.sent,I(l,u).then(function(e){var t,o,c,d;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,p(null==e?void 0:e.data);var v,f=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(d=n.watchHistory)&&void 0!==d&&d.enable&&!s)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var m,y,g,h=on((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",l,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;f.contentType="video",Qn(a,{res:f},n,{resolve:r,reject:i})}else j(l,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),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,f.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Qn(a,{res:f},n,{resolve:r,reject:i})});else Qn(a,{res:f},n,{resolve:r,reject:i})}).catch(function(e){T(e,a,i,l)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $n(e,n){return Zn.apply(this,arguments)}function Zn(){return(Zn=n(t.mark(function e(n,o){var r,i,l,a,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.resolve,i=o.reject,e.next=3,E();case 3:l=e.sent,a=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,P(s,l).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Qn(a,{res:t},n,{resolve:r,reject:i})}).catch(function(e){T(e,a,i,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function et(e,n){return nt.apply(this,arguments)}function nt(){return(nt=n(t.mark(function e(n,o){var r,i,l,a,s,u,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,l=o.reject,e.next=3,E();case 3:a=e.sent,s=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,x.set(parseInt(u)),c=null==n||null===(r=n.series)||void 0===r?void 0:r.id,D(c,a).then(function(e){var t,o,r,u=e.data,d=e.data.seasons;C(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id);A(c,a),I(v,a).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,p(e.data),Qn(s,{res:null==e?void 0:e.data,sres:u},n,{resolve:i,reject:l})}).catch(function(e){T(e,s,l,videoId)})}).catch(function(e){T(e,s,l)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function tt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ot(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):tt(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function rt(){return{loadVideoInstantly:L,onTimeUpdate:J,getVideoDuration:W,onVideoEnded:X,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(t.mark(function n(o,r){var i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,k,S,O,j,E,P,D;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!M(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(m=(null==e?void 0:e.videoSourceUrl)||!1,y=null==e?void 0:e.asat,g=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,h=null==e?void 0:e.videoId,b=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,w=(null==e?void 0:e.streamingInfo)||!1,window.videoId=h,k=null==e?void 0:e.token,!F(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),Q().set(null==e?void 0:e.refreshToken),k&&!G(k)){n.next=16;break}return r({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:zn=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(a=zn)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=zn)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=zn)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=zn)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(d=e.series)&&void 0!==d&&d.enable?null:null==e?void 0:e.chromecastReceiverId,O=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,ue(null==e||null===(f=e.customData)||void 0===f?void 0:f.localisation),H.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=33,Te(e);case 33:O&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then(function(){return K(O)}).catch(function(e){}),(E=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(S)))&&E.addEventListener("contextmenu",function(e){return e.preventDefault()}),m?(D={directPlaybackUrl:m,id:P="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},y?I(P,k).then(function(n){var t=(null==n?void 0:n.data)||{};Qn(S,{res:ot(ot({},t),D)},e,{resolve:o,reject:r})}).catch(function(e){T(e,S,r,P)}):Qn(S,{res:D},e,{resolve:o,reject:r})):w?Jn(e,{resolve:o,reject:r}):b?et(e,{resolve:o,reject:r}):g?$n(e,{resolve:o,reject:r}):Xn(e,{resolve:o,reject:r});case 37:case"end":return n.stop()}},n)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:re,skip:y,getPlayer:q,play:R,pause:N,detectBrowser:o,rewind:g,loadVideo:d,seekToTimeStamp:Y,isPlayerInitialised:M,load:_,authenticateLC:U,dispose:V,enableCaptions:oe,disableCaptions:ne,getCaptions:ee,playSelectedResolution:ie,getSource:c,setVolume:ye,getVolume:ge,disableControls:b,setPlaybackSpeed:$,getEntitlementData:B,adsQueuePointManager:Un,getSsaiEvents:jn,playerEvents:Z}}export{rt as V,fn as i,Vn as s};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import"axios";import{d as o,g as r,a as i,b as l,c as a,e as s,s as u,f as c,l as d,h as v,i as f,j as p,k as m,m as y,r as g,n as h,o as b,p as w,q as k,t as S,u as O,v as I,w as j,x as T,y as P,z as E,A as D,B as A,C as x,D as C,E as L,F as R,G as N,H as M,I as _,J as U,K as V,L as B,M as H,N as F,O as Q,P as G,Q as K}from"./generic-dd89c778.js";import{g as q}from"./player_instance-34118a5b.js";import z from"video.js";import{o as J,g as W,a as X,s as Y,b as $,p as Z}from"./util-28923483.js";import{g as ee,d as ne,a as te,e as oe}from"./captions-b619441b.js";import{g as re,p as ie}from"./resolution-62be852a.js";import{t as le,i as ae,a as se}from"./skin-16f83185.js";import{s as ue}from"./localisation-0bf399a1.js";import ce from"@babel/runtime/helpers/typeof";import de from"@babel/runtime/helpers/toConsumableArray";import ve from"@babel/runtime/helpers/slicedToArray";import{a as fe}from"./index-a012aae4.js";var pe=function(e){return new Promise(function(n,t){if(me(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},me=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ye=function(e,n,t){var o=q(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ge=function(e){var n=q(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},he=function(){var e=n(t.mark(function e(n){var r,i,l,a,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=q(null==n?void 0:n.playerId),null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(z),e.finish(13);case 16:(s=z.getTech("chromecast"))&&!s.prototype.seeking&&(s.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==i||i.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.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.airplay&&"Safari"==o()?null==i||i.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)}}(),be=function(e,n){var t=q(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=z.dom.getPointerPosition(a,n).x;z.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"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*s,d.seek()}})};var we=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),pe("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)}}(),ke=function(){var e=n(t.mark(function e(){return t.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){z.getPlugin("eme")||z.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=n(t.mark(function e(){var n;return t.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(z),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)}}(),Oe=function(){var e=n(t.mark(function e(){return t.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)}}(),Ie=function(){var e=n(t.mark(function e(){return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-2dcf13b7.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)}}(),je=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(z)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(z)})},loadAdsLibrary:we,loadEMELibrary:ke,loadMuxPlugin:Se,loadDvrSeekbar:Oe,loadContribDash:Ie});function Te(e){return Pe.apply(this,arguments)}function Pe(){return(Pe=n(t.mark(function e(n){var r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null==n?void 0:n.airplay)||!1,e.next=3,we();case 3:r&&"Safari"==o()&&Promise.resolve().then(function(){return je}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ee(e,n){return De.apply(this,arguments)}function De(){return(De=n(t.mark(function e(n,r){var i,l,a,s,u,c,d,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=(null==r?void 0:r.contentType)||"video",v=null==r||null===(i=r[d])||void 0===i?void 0:i.drmEnabled,null==r||null===(l=r[d])||void 0===l||null===(a=l.liveDetails)||void 0===a||a.isDvrEnabled,null==n||n.showPositiveSeekbar,f=(null==r||null===(s=r[d])||void 0===s||null===(u=s.streamingInfo)||void 0===u||null===(c=u.videoAssets)||void 0===c?void 0:c.dash)||null,e.prev=5,e.next=8,Promise.allSettled([v?"Safari"==o()?ke():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?Ie():ke():"Safari"!=o()&&f?Ie():null,he(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ce=new Set,Le=null,Re=function(e,n,t){var o,i,a,s,u,c,d,v={},f=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(o=e[f])||void 0===o?void 0:o.id)||"Null",v["c3.cm.contentType"]=He(e),v[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),v[null==t||null===(a=t.Constants)||void 0===a?void 0:a.STREAM_URL]=n.currentSrc(),v[null==t||null===(s=t.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===r()?"NULL":r(),v["c3.cm.categoryType"]=Ue(e),v["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"}}(),v.DRMEnabled=(null===(u=e[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=e[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[t.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ve(e),v["c3.cm.genreList"]=Me(e),v["c3.cm.genre"]=Ne(e),v["c3.cm.channel"]=_e(e);var p=Ge(l(),e);return v=xe(xe({},v),p)},Ne=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Me=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"},_e=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Ue=function(e){return(null==e?void 0:e.contentType)||"null"},Ve=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Be=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},He=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Fe,Qe,Ge=function(e,n){var t,o,r,l,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var c=a(),d=i();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(o=t.series)||void 0===o?void 0:o.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(r=e[c-1])||void 0===r||null===(l=r.episodes)||void 0===l||null===(s=l[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ke=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"}},qe=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ze=function(){var e=n(t.mark(function e(n,o){var r,i,l,a,u,c,d,v,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(null==o?void 0:o.convivaConfig)||{},i=r.trackConvivaPlayerEvent,l=r.paymentHandler,a=r.tveProvider,u=r.enable,c=r.appName,d=(o||{}).token,u){e.next=4;break}return e.abrupt("return");case 4:if(v=q(n),"function"==typeof(f=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,f("getConvivaObject");case 10:if(p=e.sent){e.next=13;break}return e.abrupt("return");case 13:v.ready(function(){var e=v.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ke(t.keySystem);f("contentInfo",{DRMEnabled:o})}else f("contentInfo",{DRMEnabled:"None"})}),n||f("contentInfo",{DRMEnabled:"None"})}),v.on("loadstart",function(){var e,n;Le&&Le!==v.currentSrc()&&f("playbackEnded"),f("setPlayer",v),Ce.clear(),Le=v.currentSrc();var t=qe(v.currentType()),r=s(),i=Re(r,v,p);i[null==p||null===(e=p.Constants)||void 0===e?void 0:e.PLAYER_NAME]=c||"WEB",i[null==p||null===(n=p.Constants)||void 0===n?void 0:n.ASSET_NAME]=Be(r,o),i.authToken=d||"NULL",i.streamType=t,i.D2CType=l||"NONE",i.subscriberType=a||(l?"D2C":"FREE"),i["c3.cm.affiliate"]=a||"NULL",Je.setData(i),f("contentInfo",i)}),v.on("loadedmetadata",function(){var e,n=v.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})}),v.on("play",function(){Ce.has(v.currentSrc())||(Ce.add(v.currentSrc()),f("playbackStarted",null))}),v.on("ended",function(){Ce.has(v.currentSrc())&&Ce.delete(v.currentSrc()),f("playbackEnded")}),v.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:v,adsLoader:null==e?void 0:e.adsLoader})}),v.on("dispose",function(){null==Ce||Ce.clear(),f("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Je=(Fe={},{setData:function(e){Fe=xe(xe({},Fe),e)},getData:function(){return Fe}}),We=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-bde50aaa.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-a9816629.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-f2e99bd5.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-70cec92b.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-fa5461e2.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-efae74e7.js").then(function(t){t.initialiseSkin(e,n)})};function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ye(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Xe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var $e=[],Ze=0,en=null;function nn(n,t,o){var r,i,l,a,c,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(r=t.watchHistory)||void 0===r||r.apiVersion;var v=null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.profileId,f=Math.floor(n.currentTime()),p=Math.floor(n.duration());null==t||null===(l=t.watchHistory)||void 0===l||l.xapiKey;var m=(null==t||null===(a=t.video)||void 0===a?void 0:a.originalObjectId)||null,y=(null==t||null===(c=t.watchHistory)||void 0===c?void 0:c.saveOffline)||!1,g=Math.floor(n.currentTime()),h=d?100:Math.floor(f/p*100),b={};y?function(n,t,o){var r=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),i=tn(r),l=(new Date).getTime(),a=s(),u=(null==a?void 0:a.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(n,t){return Ye(Ye({},n),{},e({},t,u[t]))},{}),d=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Qe});d<0?i.push(Ye(Ye({content:c},n),{},{addedDate:l,updateDate:l})):i[d]=Ye(Ye(Ye({},i[d]),n),{},{updateDate:l});localStorage.setItem("".concat(r),JSON.stringify(i))}(b={completed:d,watchedTime:g,watchedPercentage:h},v,t.siteOwner):(b=Ye(Ye({videoId:Qe,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:v},en&&{seriesId:en}),m&&{originalObjectId:m}),u(b).then(function(e){}).catch(function(e){})),Ze=f+o}function tn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function on(e,n,t){var o=tn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var rn=!1,ln=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!rn){var i=an(e,"videoAssets","secondaryVideoAssets"),l=c(i,n);return l&&d(n,l),rn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function an(e,n,t){if(Array.isArray(e))return e.map(function(e){return an(e,n,t)});if(null!==e&&"object"===ce(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=an(e[r],n,t)}),o}return e}function sn(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 un(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)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function un(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function dn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):cn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var vn=function(e,n,t,r){var i,l,a,u,c=r.res,d=r.sres,y=q(e),g=(null==c?void 0:c.contentType)||"video",h=(null==c?void 0:c[g].drmEnabled)||!1,b=(null==c||null===(i=c[g])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,w=(null==c||null===(a=c[g])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;p(c),y&&(y.on("loadstart",function(){b?t.resolve({status:!0,msg:"Video Loaded",response:c}):t.resolve(dn({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:c}:{response:c}))}),y.on("loadeddata",function(){var t,r,i,l=ee(e);if(null==l||l.map(function(n){return ne(e,n.id)}),w&&"Safari"===o())try{var a;null==y||null===(a=y.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==y||!y.muted())&&ye(e,sessionStorage.getItem("volume")||"100");var u=s();if(v(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.saveOffline)){var d,f,p=dn(dn({},n),c);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(en=null==n||null===(r=n.series)||void 0===r?void 0:r.id),$e=[],Ze=0,Qe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=q(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());$e.includes(Ze)||(e==Ze?($e.push(e),nn(a,n,l)):e>Ze&&(Ze=e+l))}}),a.one("ended",function(){nn(a,n,l,!0)}))}(e,p,null==u||null===(d=u.video)||void 0===d||null===(f=d.gist)||void 0===f?void 0:f.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=y&&y.mux){var m,g,h,b,k,S,O=(null===(m=s())||void 0===m?void 0:m.video)||(null==c?void 0:c.video),I=null==O?void 0:O.gist,j={env_key:null==n||null===(g=n.analytics)||void 0===g?void 0:g.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==I?void 0:I.id,video_title:null==I?void 0:I.title,video_series:null==O||null===(b=O.series)||void 0===b?void 0:b.title,video_stream_type:null!=O&&null!==(k=O.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==n||null===(S=n.analytics)||void 0===S?void 0:S.userId};y.mux({debug:!1,data:j})}}),y.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];y.trigger("subtitlechanged",n)}),y.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),g=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),y.tech_.on("retryplaylist",function(){b&&ln(c,e)}),y.on("error",function(){var n,o;(console.log("ERROR",y.error(),y.error().code),4===y.error().code&&b)?ln(c,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===(o=y.error())||void 0===o?void 0:o.message)||"Some error occured",response:c}))}),y.one("play",function(){var e,t,o,r,i;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(r=o.adsConfig)||void 0===r||!r.vodAdClientSideTracking){if(null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var l,a,u,c=null===(l=s())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,d=m(),v=(null==d?void 0:d.get(c))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&setTimeout(function(){y.currentTime(f)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){y.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=y&&y.dvrSeekbar)try{y.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),y.on("volumechange",function(){var e=100*y.volume().toFixed(2);y.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),y.on("chromecastDisconnected",function(){if(b){y.currentSource();for(var e=y.textTracks(),n=e.length-1;n>=0;n--)y.removeRemoteTextTrack(e[n])}}),y.one("loadeddata",function(){var e,n=(null==y||null===(e=y.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ce(y.dash)){var t,r,i,l=null==y||null===(t=y.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),a=null==l?void 0:l.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),s=sn(n);try{for(s.s();!(i=s.n()).done;){var u=i.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){s.e(e)}finally{s.f()}}else{var c,d=sn(n);try{for(d.s();!(c=d.n()).done;){var v,f,p,m=c.value;if(("Chrome"==o()||"Edge"==o()&&(null!==(v=navigator)&&void 0!==v&&null!==(f=v.userAgent)&&void 0!==f&&f.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))y.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function fn(e,n){var t,o,r,i=q(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,v,f,p;if(mn.enabled&&"input"!=t.target.localName){var m=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==a||a.focus()),m){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||g(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(v=d.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(p=f.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;h||y(e,10)}}},!0)}var pn,mn=(pn=!0,{enable:function(){pn=!0},disable:function(){pn=!1},get enabled(){return pn}}),yn="ssai-breakStart",gn="ssai-adImpression",hn="ssai-firstQuartile",bn="ssai-midpoint",wn="ssai-thirdQuartile",kn="ssai-complete",Sn="ssai-breakEnd",On={breakStart:yn,impression:gn,firstQuartile:hn,midpoint:bn,thirdQuartile:wn,complete:kn,breakEnd:Sn};function In(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=q(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=On[o];r&&t.trigger(r,n)}function jn(e){var n=q(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(yn,e)},adImpression:function(e){return t(gn,e)},adFirstQuartile:function(e){return t(hn,e)},adMidpoint:function(e){return t(bn,e)},adThirdQuartile:function(e){return t(wn,e)},adComplete:function(e){return t(kn,e)},adBreakEnd:function(e){return t(Sn,e)}}}function Tn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Pn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Tn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function En(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Dn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Dn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Dn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var An,xn,Cn=(An="",{set:function(e){e&&(An=e)},get:function(){return An}}),Ln=(xn=null,{set:function(e){xn=e},get position(){return xn}});function Rn(e,n){return Nn.apply(this,arguments)}function Nn(){return Nn=n(t.mark(function e(n,o){var r,i,l,a,s,u,d,v,f,p,m,y,g,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return q(n),r=c(o,n),i=r.src,l=i.replace("/dash/","/session/").replace("/master/","session"),l=h(l,n,o),a=Mn(l),s=ve(a,2),u=s[0],d=s[1],l=new URL(l.split("?")[0]),Object.keys(d).length>0&&Object.entries(d).forEach(function(e){var n=ve(e,2),t=n[0],o=n[1];l.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Pn({},u)})});case 11:return v=e.sent,e.next=14,v.json();case 14:return f=e.sent,p="https://"+new URL(l).hostname,m=f.trackingUrl,y=f.manifestUrl,g=p+m,b=p+y,Cn.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),r.src=b,e.abrupt("return",r);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",r);case 29:case"end":return e.stop()}},e,null,[[8,26]])})),Nn.apply(this,arguments)}function Mn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=En((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=ve(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},u={},c=0,d=Object.entries(n);c<d.length;c++){var v=ve(d[c],2),f=v[0],p=v[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=p;else u[f]=p}return[s,u]}var _n,Un=(_n=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),_n=Array.isArray(e)?de(e):_n},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",_n),de(_n)}});function Vn(e,n){return Bn.apply(this,arguments)}function Bn(){return Bn=n(t.mark(function e(o,r){var i,l,a,s,u,c,d,v,f,p,m,g,h,b,w,k,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:S=function(e,n,t,r,i,l){var a=q(o);if(!a.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(a.currentTime());var s,u=En(t);try{var c=function(){var t,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,h=f,b=(null===(t=window)||void 0===t||null===(u=t.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),O=w.get("pod-".concat(i))||[];if(console.warn(e,g,"map:",v,"condition1:",e>=g,"map:",w),e>=g&&!O.includes(S)){O.push(S),w.set("pod-".concat(i),O);try{k(v,n,h,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var I=Ln.position;Ln.set(null),setTimeout(function(){null!=I&&(a.currentTime(I),l())},500)}if("function"==typeof b)try{var j,T={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==n||null===(j=n.ads)||void 0===j?void 0:j[r],adIndex:r};b({adsData:T}),In(o,T)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},k=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},b=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Ln.set(r),u=Cn.get(),(c=q(o)).one("loadeddata",function(){u&&h(u)}),d=new Map,v=new Map,f=-1,p=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,m=(null==c||null===(a=c.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,g=(null==c||null===(s=c.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,h=function(){var e=n(t.mark(function e(n){var i,l,a,s,u,c,h,w,k,O,I,j,T,P,E,D,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return T=function(e){document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",T),0===e.button&&O()},j=function(e){},I=function(){var e,n=h.currentTime(),t=null,o=En(c);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,d.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},O=function(){var e,n=h.currentTime(),t=null,o=En(c);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!d.has(i)||n>=i&&n<=s)&&(t=i,d.set(i,!0),v.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},l=!1,e.next=7,fetch(n);case 7:return a=e.sent,e.next=10,a.json();case 10:s=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",s),u=s.avails,c=[],h=q(o),w=h.controlBar.progressControl,k=w.seekBar.el(),u.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(l=!0),c.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!l&&r&&(h.currentTime(r),I()),null!=c&&c.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",c),window.adsQueueList=c),console.log(c,"data"),c.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=h.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",k.appendChild(i)}}),h.on("timeupdate",le(function(){var e=h.currentTime();if(e!==f){f=e;for(var n=!1,t=function(){var t=c[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&d.set(r,!0),mn.disable(),p&&p.classList.add("vjs-hidden"),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),g&&(g.el().style.pointerEvents="none",g.el().classList.add("vjs-hidden")),w.el().style.visibility="hidden";for(var s=e-r,u=0,f=0,y=0;y<l.length;y++){var h,k=null==l||null===(h=l[y])||void 0===h?void 0:h.durationInSeconds;if(s<u+k){f=y;break}u+=k}l[f];var O=Math.max(0,i-s),j=Math.round(O);P.style.display="block",A.textContent="".concat(f+1," of ").concat(l.length," • ").concat(b(j));var T=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,de(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&T.push(null==t?void 0:t.podSlotImpressionBeacon),S(e,t,T,f,o,I),"break"}v.delete(r)},o=0;o<c.length;o++){if("break"===t())break}n||(P.style.display="none",w.el().style.visibility="visible",m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),g&&(g.el().style.pointerEvents="auto",g.el().classList.remove("vjs-hidden")),p&&p.classList.remove("vjs-hidden"),mn.enable())}},1e3)),null===(i=document)||void 0===i||i.addEventListener("keydown",function(e){mn.enabled&&"ArrowRight"==e.key&&(O(),y(o,10),e.stopPropagation())}),w.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",T))}),(P=document.createElement("div")).className="ssai-ad-container",(E=document.createElement("div")).className="sponsored-adbox",(D=document.createElement("div")).className="sponsored-text",D.textContent="Sponsored Ad",E.append(D),(A=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",P.append(E),P.append(A),h.el().appendChild(P);case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),w=new Map;case 16:case"end":return e.stop()}},e)})),Bn.apply(this,arguments)}function Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Fn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Hn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Qn=function(r,i,l,a){var s,u,v,p,m,y,g,h,O,I,j,T,P,E,D,A,x,C,L,R,N,M,_,U,V,B,H,F,Q,G,K,J,W,X,Y,$,Z,ee,ne=i.res,oe=void 0===ne?null:ne,re=i.sres,ie=void 0===re?null:re,le=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],se=(null===(s=oe)||void 0===s?void 0:s.contentType)||"video",ue=ae(null===(u=oe)||void 0===u||null===(v=u[se])||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.videoImageUrl)||ae(null===(m=oe)||void 0===m||null===(y=m[se])||void 0===y||null===(g=y.gist)||void 0===g||null===(h=g.imageGist)||void 0===h?void 0:h.r16x9),ce=(null===(O=oe)||void 0===O||null===(I=O[se])||void 0===I||null===(j=I.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,de=(null===(T=oe)||void 0===T||null===(P=T[se])||void 0===P||null===(E=P.streamingInfo)||void 0===E?void 0:E.isLiveStream)||!1,ve=(null===(D=oe)||void 0===D||null===(A=D.ads)||void 0===A||null===(x=A.preRoll)||void 0===x||null===(C=x.adTags)||void 0===C||null===(L=C.web)||void 0===L?void 0:L.active)&&(null===(R=oe)||void 0===R||null===(N=R.ads)||void 0===N||null===(M=N.preRoll)||void 0===M||null===(_=M.adTags)||void 0===_||null===(U=_.web)||void 0===U?void 0:U.url),pe=(null===(V=oe=Fn(Fn({},oe),{},{audioAssetSource:null==l?void 0:l.audioAssetSource}))||void 0===V||null===(B=V[se])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(H=window)||void 0===H||null===(F=H.app_data)||void 0===F||null===(Q=F.appcmsMain)||void 0===Q||null===(G=Q.adsConfig)||void 0===G?void 0:G.vodAdSticherProvider)||!1,me=(null==l?void 0:l.latency)||6,ye=(null==l?void 0:l.skin_settings)||{},ge=(null==l?void 0:l.dvrConfig)||{enable:!1},he=(ee={enableSmoothSeeking:!0,controls:0!=(null==l?void 0:l.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==l?void 0:l.muted)||!1,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ye?void 0:ye.pictureInPictureToggle)||!1},playbackRates:null!=ye&&ye.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:ce},e(ee,"autoplay",null==l?void 0:l.autoplay),e(ee,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!ve),e(ee,"loop",(null==l?void 0:l.loop)||!1),e(ee,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ee,"html5",Fn(Fn({dash:Fn(Fn(Fn({},!z.browser.IS_SAFARI&&{useTTML:!0}),(null==l?void 0:l.debugConfig)&&(null==l||null===(K=l.debugConfig)||void 0===K?void 0:K.enable)&&{debug:!0,logLevel:null!=l&&null!==(J=l.debugConfig)&&void 0!==J&&J.logLevel?null==l||null===(W=l.debugConfig)||void 0===W?void 0:W.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:Fn(Fn({liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==l||null===(X=l.customData)||void 0===X?void 0:X.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(Y=null==l?void 0:l.enableLowInitialPlaylist)||void 0===Y||Y}),debug:!0,nativeTextTracks:"Safari"==o()},0==(null==l||null===($=l.customData)||void 0===$?void 0:$.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ee,"poster",ue),e(ee,"techOrder",le),e(ee,"chromecast",{requestCustomDataFn:function(e){var n,t,o=q(r),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,r,i,l,a,s,u,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,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var O=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,I=(null==O?void 0:O.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=I;var j=(null==O?void 0:O.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=j}var T=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=T;var P=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=P;var E=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=E;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,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}(oe,e,i);return Fn(Fn({},a),{},{convivaMetaData:Fn({customerKey:(null==l||null===(n=l.convivaConfig)||void 0===n?void 0:n.customerKey)||null,debug:(null==l||null===(t=l.convivaConfig)||void 0===t?void 0:t.debug)||!1},Je.getData())})},modifyLoadRequestFn:function(e){var n,t,o,i,l,a=q(r),s=(null==a?void 0:a.currentSource())||{};!(null===(n=oe)||void 0===n||null===(t=n[se])||void 0===t||null===(o=t.streamingInfo)||void 0===o||null===(i=o.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ee);if(!z.getPlayers()[r]){z.log.level("debug");var we=z(r,he,function(){var e=n(t.mark(function e(){var n,o,i,s,u,v,p,m,y,g,h,O,I,j,T,P,E,D,A,x,C,L,R;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(we),console.log(z.VERSION),console.log(z.getPlugins()),e.next=5,Ee(l,oe);case 5:if(O=null===(n=oe)||void 0===n||null===(o=n[se])||void 0===o||null===(i=o.liveDetails)||void 0===i?void 0:i.startOverTime,de&&a.resolve(Fn({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:oe}:{response:oe})),I={},null!=ge&&ge.enable&&ce&&(I.playFromBegining=ge.playFromBegining,I.playLive=ge.playLive,T=null==l||null===(j=l.epg)||void 0===j?void 0:j.programSubType,"linearchannel"===se?"LIVE"===(null==T?void 0:T.toUpperCase())&&fe(r,l):fe(r,l)),w(r,null==l?void 0:l.analyticsCb,I),ze(r,l),/Android/i.test(navigator.userAgent)&&(z.options.vhs.overrideNative=!0),ce&&be(r,O),!ve||null!=l&&null!==(s=l.customData)&&void 0!==s&&s.disableAds||k(r,ve,oe),P=c(oe,r),console.log(P),null!=l&&l.nearestClusterUrl&&(P=S(P,l.nearestClusterUrl)),!pe){e.next=21;break}return e.next=20,Rn(r,oe);case 20:P=e.sent;case 21:P?d(r,P):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),f(r,"Incompatible / Missing Source")),((null===(u=oe)||void 0===u||null===(v=u[se])||void 0===v||null===(p=v.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(y=oe)||void 0===y||null===(g=y[se])||void 0===g||null===(h=g.closedCaptions)||void 0===h?void 0:h.length)>0)&&(R=(null===(D=oe)||void 0===D||null===(A=D[se])||void 0===A||null===(x=A.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(C=oe)||void 0===C||null===(L=C[se])||void 0===L?void 0:L.closedCaptions),E=R.filter(function(e){return"VTT"===e.format}),te(r,E)),null!=l&&l.disableControls?b(r):We(r,Fn(Fn(Fn({},l),he),{},{liveVideo:de,isDvrEnabled:ce,res:oe,sres:ie})),vn(r,Fn(Fn(Fn({},l),he),{},{liveVideo:de}),a,{res:oe,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}},Gn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Kn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var zn,Jn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Wn(e);Qn(r,{res:i},e,{resolve:t,reject:o})},Wn=function(e){var n,t,o,r,i,l,a,s,u=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,d=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,v=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.url)||null,f=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,y=null==e?void 0:e.token,g=O(y),h=null==g?void 0:g.site;return qn(qn({id:null==Gn?void 0:Gn[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:qn(qn({},m&&{drmProvider:m}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:qn({},f&&{videoImageUrl:f}),contentDetails:qn({},(null==p?void 0:p.length)>0&&{closedCaptions:de(p)})},ads:{preRoll:{adTags:{web:qn(qn({},v&&{active:!0}),v&&{url:v})}}}})};function Xn(e,n){return Yn.apply(this,arguments)}function Yn(){return(Yn=n(t.mark(function e(n,o){var r,i,l,a,s,u;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.resolve,i=o.reject,l=null==n?void 0:n.videoId,a=null==n?void 0:n.playerId,s=!(null==n||!n.anonymousId),e.next=6,P();case 6:u=e.sent,I(l,u).then(function(e){var t,o,c,d;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(c=o.gist)||void 0===c?void 0:c.contentType,p(null==e?void 0:e.data);var v,f=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(d=n.watchHistory)&&void 0!==d&&d.enable&&!s)if((null===(v=n.watchHistory)||void 0===v?void 0:v.saveOffline)||!1){var m,y,g,h=on((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",l,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;f.contentType="video",Qn(a,{res:f},n,{resolve:r,reject:i})}else j(l,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),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,f.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Qn(a,{res:f},n,{resolve:r,reject:i})});else Qn(a,{res:f},n,{resolve:r,reject:i})}).catch(function(e){T(e,a,i,l)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $n(e,n){return Zn.apply(this,arguments)}function Zn(){return(Zn=n(t.mark(function e(n,o){var r,i,l,a,s;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.resolve,i=o.reject,e.next=3,P();case 3:l=e.sent,a=null==n?void 0:n.playerId,s=null==n?void 0:n.epg,E(s,l).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==s?void 0:s.channelId,Qn(a,{res:t},n,{resolve:r,reject:i})}).catch(function(e){T(e,a,i,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function et(e,n){return nt.apply(this,arguments)}function nt(){return(nt=n(t.mark(function e(n,o){var r,i,l,a,s,u,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.resolve,l=o.reject,e.next=3,P();case 3:a=e.sent,s=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,x.set(parseInt(u)),c=null==n||null===(r=n.series)||void 0===r?void 0:r.id,D(c,a).then(function(e){var t,o,r,u=e.data,d=e.data.seasons;C(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.id);A(c,a),I(v,a).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,p(e.data),Qn(s,{res:null==e?void 0:e.data,sres:u},n,{resolve:i,reject:l})}).catch(function(e){T(e,s,l,videoId)})}).catch(function(e){T(e,s,l)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function tt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ot(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):tt(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function rt(){return{loadVideoInstantly:L,onTimeUpdate:J,getVideoDuration:W,onVideoEnded:X,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(t.mark(function n(o,r){var i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,k,S,O,j,P,E,D;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!M(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(m=(null==e?void 0:e.videoSourceUrl)||!1,y=null==e?void 0:e.asat,g=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,h=null==e?void 0:e.videoId,b=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,w=(null==e?void 0:e.streamingInfo)||!1,window.videoId=h,k=null==e?void 0:e.token,!F(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),Q().set(null==e?void 0:e.refreshToken),k&&!G(k)){n.next=16;break}return r({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:zn=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(a=zn)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=zn)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=zn)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=zn)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(d=e.series)&&void 0!==d&&d.enable?null:null==e?void 0:e.chromecastReceiverId,O=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,(j=null==e?void 0:e.errors)&&(window.customErrors=j),window.customData=null==e?void 0:e.customData,ue(null==e||null===(f=e.customData)||void 0===f?void 0:f.localisation),H.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=33,Te(e);case 33:O&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then(function(){return K(O)}).catch(function(e){}),(P=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(S)))&&P.addEventListener("contextmenu",function(e){return e.preventDefault()}),m?(D={directPlaybackUrl:m,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},y?I(E,k).then(function(n){var t=(null==n?void 0:n.data)||{};Qn(S,{res:ot(ot({},t),D)},e,{resolve:o,reject:r})}).catch(function(e){T(e,S,r,E)}):Qn(S,{res:D},e,{resolve:o,reject:r})):w?Jn(e,{resolve:o,reject:r}):b?et(e,{resolve:o,reject:r}):g?$n(e,{resolve:o,reject:r}):Xn(e,{resolve:o,reject:r});case 37:case"end":return n.stop()}},n)}));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:re,skip:y,getPlayer:q,play:R,pause:N,detectBrowser:o,rewind:g,loadVideo:d,seekToTimeStamp:Y,isPlayerInitialised:M,load:_,authenticateLC:U,dispose:V,enableCaptions:oe,disableCaptions:ne,getCaptions:ee,playSelectedResolution:ie,getSource:c,setVolume:ye,getVolume:ge,disableControls:b,setPlaybackSpeed:$,getEntitlementData:B,adsQueuePointManager:Un,getSsaiEvents:jn,playerEvents:Z}}export{rt as V,fn as i,Vn as s};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./generic-dd89c778.js";import"./player_instance-34118a5b.js";import"video.js";export{V as default}from"./index-
|
|
1
|
+
import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./generic-dd89c778.js";import"./player_instance-34118a5b.js";import"video.js";export{V as default}from"./index-710a5238.js";import"./util-28923483.js";import"./captions-b619441b.js";import"./resolution-62be852a.js";import"./skin-16f83185.js";import"./localisation-0bf399a1.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./index-a012aae4.js";import"./icons-c139587c.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as s,d as i,e as o}from"./features-96af00c0.js";import{i as r}from"./index-
|
|
1
|
+
import{a as e,b as t,c as s,d as i,e as o}from"./features-96af00c0.js";import{i as r}from"./index-710a5238.js";import{S as n,M as l,a,N as m,b as d,R as p}from"./icons-c139587c.js";import{g as u}from"./player_instance-34118a5b.js";import{b as c}from"./skin-16f83185.js";import{e as b}from"./generic-dd89c778.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./util-28923483.js";import"@babel/runtime/helpers/typeof";import"./captions-b619441b.js";import"@babel/runtime/helpers/slicedToArray";import"./index-a012aae4.js";import"js-cookie";import"ua-parser-js";function v(v,f){u(v).addClass("skin_default"),r(v,f),import("./skin-71be210e.js").then(function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)}),function(e,t){0==t.liveVideo&&0==t.liveui&&i(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&o(e,"default",p())}(v,f),function(i,o){var r=u(i),l=(null==o?void 0:o.sres)||null;r.on("loadeddata",function(){e(i,"default",n()),l&&import("./nextEpisodeButton-591509b7.js").then(function(e){e.initaliseFunctionality(o.sres.seasons,b())})}),r.one("loadedmetadata",function(){var e;l&&(t(i,null==o||null===(e=o.sres)||void 0===e?void 0:e.seasons,o),s(o.sres,o.res,i))})}(v,f),function(e,t){var s,i,o,r,n=u(e),d=document.getElementsByClassName("vjs-current-time")[0],p=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),p&&(p.style.display="none"),b&&(b.style.display="none"));null===(s=n.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(i=s.el())||void 0===i||i.appendChild(c(l(window.controlsColor))),null===(o=n.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(r=o.el())||void 0===r||r.appendChild(c(a(window.controlsColor)));var v=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,d as i,e as r,o as l,p as n,q as t,r as o,s as a}from"./features-96af00c0.js";import{g as u}from"./player_instance-34118a5b.js";import{a as s,i as d,b as v}from"./index-8bf8b43f.js";import{R as p,f as m,e as c,k as f}from"./generic-dd89c778.js";import"videojs-contrib-quality-menu";import y from"video.js";import k from"@babel/runtime/helpers/asyncToGenerator";import b from"@babel/runtime/regenerator";import{i as g,s as h}from"./index-
|
|
1
|
+
import{h as e,d as i,e as r,o as l,p as n,q as t,r as o,s as a}from"./features-96af00c0.js";import{g as u}from"./player_instance-34118a5b.js";import{a as s,i as d,b as v}from"./index-8bf8b43f.js";import{R as p,f as m,e as c,k as f}from"./generic-dd89c778.js";import"videojs-contrib-quality-menu";import y from"video.js";import k from"@babel/runtime/helpers/asyncToGenerator";import b from"@babel/runtime/regenerator";import{i as g,s as h}from"./index-710a5238.js";import{c as j,d as T}from"./icons-c139587c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-16f83185.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-068e496c.js";import"./util-28923483.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-b619441b.js";import"video.js/dist/video-js.min.css";import"./index-a012aae4.js";var C={markerStyle:{width:"5px","background-color":"red"},markerTip:{display:!1,text:function(e){return e.title},time:function(e){return e.time}},onMarkerClick:function(e){},markers:[],duration:0};function w(){return(w=k(b.mark(function e(i,r){var l,n,t,o,a,s;return b.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l=u(i),(n=l.seekable())&&n.length>0&&(t=n.start(0),o=n.end(n.length-1),a=o-t,l.markers({markerStyle:{width:"4px","background-color":"#576478"},markerTip:{display:!1},duration:a||0}),l.markers.initializeMarker(),s=E(r,a),l.markers.add(s));case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function E(e,i){var r=(new Date).getTime(),l=new Date(r-1e3*i).getTime();return e.filter(function(e){var i=new Date(e.formatted_startdate).getTime();return i>=l&&i<=r}).map(function(e){var i=new Date(e.formatted_startdate).getTime()-l;return{key:e.programId,title:e.title,time:i/1e3}})}function M(i,r){var l=u(i);l&&(l.on("loadeddata",function(){var e,n,t,o,a,v,m,c,f,y=(null==r||null===(e=r.dvrConfig)||void 0===e?void 0:e.programs)||[];l.qualityLevels()&&l.qualityLevels().length&&function(e){var i=u(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(i),!(null!=r&&null!==(n=r.series)&&void 0!==n&&n.enable||null!==(t=window)&&void 0!==t&&null!==(o=t.app_data)&&void 0!==o&&null!==(a=o.appcmsMain)&&void 0!==a&&null!==(v=a.features)&&void 0!==v&&v.auto_play)||null!=r&&r.liveVideo||s(i,r),null!=r&&r.liveVideo||p()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||d(i);var k=(null==r||null===(m=r.epg)||void 0===m?void 0:m.programSubType)||"";null!=r&&null!==(c=r.dvrConfig)&&void 0!==c&&c.enable&&null!=r&&r.isDvrEnabled&&null!=r&&null!==(f=r.epg)&&void 0!==f&&f.enable&&"LIVE"===(null==k?void 0:k.toUpperCase())&&y&&y.length&&function(e,i){w.apply(this,arguments)}(i,y)}),l.one("play",function(){var r,l,n,t;null!==(r=window)&&void 0!==r&&null!==(l=r.customData)&&void 0!==l&&l.iframeOverlayUrl&&e(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}function S(e,s){u(e).addClass("skin_vlone"),M(e,s),function(e,u){var s,d,p,y,k,b,C,w,E,M,S,B,_,L,q,x=(null==u||null===(s=u.res)||void 0===s||null===(d=s.video)||void 0===d?void 0:d.isSSAIEnabled)||!1,A=m(null==u?void 0:u.res,e)||{};A.src;var V=(null==u?void 0:u.skin_settings)||{};null!=V&&V.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&i(e,"VL_ONE",j());(null!=V&&V.rewindBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&r(e,"VL_ONE",T());(null==u||null===(p=u.relatedVideos)||void 0===p||null===(y=p.content)||void 0===y?void 0:y.length)>0&&l(e,null==u?void 0:u.relatedVideos);null!=u&&null!==(k=u.series)&&void 0!==k&&k.enable&&n(e,u);(null==u||null===(b=u.streams)||void 0===b?void 0:b.length)>1&&t(e,null==u?void 0:u.streams);if(v(e,u),g(e,u),"MEDIA_TAILOR"==(null===(C=window)||void 0===C||null===(w=C.app_data)||void 0===w||null===(E=w.appcmsMain)||void 0===E||null===(M=E.adsConfig)||void 0===M?void 0:M.vodAdSticherProvider)&&null!==(S=window)&&void 0!==S&&null!==(B=S.app_data)&&void 0!==B&&null!==(_=B.appcmsMain)&&void 0!==_&&null!==(L=_.adsConfig)&&void 0!==L&&L.vodAdClientSideTracking&&x){var D,I=null;if(null!=u&&null!==(D=u.series)&&void 0!==D&&D.enable){var O,R,P,N=null===(O=c())||void 0===O||null===(R=O.video)||void 0===R||null===(P=R.gist)||void 0===P?void 0:P.id,U=f(),z=(null==U?void 0:U.get(N))||{t:0,p:0},H=z.t;z.p<95&&(I=H)}else{var $=u.watchHistoryResumeTime;u.watchedPercentage<95&&(I=$)}h(e,I)}if(null!=u&&null!==(q=u.dvrConfig)&&void 0!==q&&q.enable&&null!=u&&u.isDvrEnabled){var G,F,J=(null==u||null===(G=u.epg)||void 0===G?void 0:G.programSubType)||"";null!=u&&null!==(F=u.epg)&&void 0!==F&&F.enable?"LIVE"===(null==J?void 0:J.toUpperCase())&&(o(e,u),a(e,u)):(o(e,u),a(e,u))}}(e,s),B(e,s)}y.registerPlugin("markers",function(e){var i=y.mergeOptions(C,e),r={},l=[],n=this,t=null;function o(){l.sort(function(e,r){return i.markerTip.time(e)-i.markerTip.time(r)})}function a(e){e.forEach(function(e){n.el().querySelector(".vjs-progress-holder").appendChild(function(e){var l=y.dom.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":i.markerTip.time(e)});return s(e,l),l.addEventListener("click",function(l){var t=!1;if("function"==typeof i.onMarkerClick&&(t=!1===i.onMarkerClick(e)),!t){var o=this.getAttribute("data-marker-key");n.currentTime(i.markerTip.time(r[o]))}}),i.markerTip.display&&function(e){e.addEventListener("mouseover",function(){var l=r[e.getAttribute("data-marker-key")];t&&(i.markerTip.html?t.querySelector(".vjs-tip-inner").innerHTML=i.markerTip.html(l):t.querySelector(".vjs-tip-inner").innerText=i.markerTip.text(l),t.style.left=u(l)+"%",t.style.visibility="visible")}),e.addEventListener("mouseout",function(){t&&(t.style.visibility="hidden")})}(l),l}(e)),r[e.key]=e,l.push(e)}),o()}function u(e){return i.markerTip.time(e)/i.duration*100}function s(e,r){r.className="vjs-marker ".concat(e.class||""),Object.keys(i.markerStyle).forEach(function(e){r.style[e]=i.markerStyle[e]});var l=e.time/i.duration;(l<0||l>1)&&(r.style.display="none");var n=u(e);n>=99.5&&(n=99.5),r.style.left=n+"%"}n.markers={getMarkers:function(){return l},initializeMarker:function(){t=y.dom.createEl("div",{className:"vjs-tip",innerHTML:"<div class='vjs-tip-arrow'></div><div class='vjs-tip-inner'></div>"}),n.el().querySelector(".vjs-progress-holder").appendChild(t)},add:function(e){a(e)},update:function(e,r){!function(e,r){e.forEach(function(e){var l=n.el().querySelector(".vjs-marker[data-marker-key='"+e.key+"']"),t=i.markerTip.time(e);l?(r||l.getAttribute("data-marker-time")!==t)&&(s(e,l),l.setAttribute("data-marker-time",t)):a([e])}),o()}(e,r)}}});var B=function(e,i){var r,l,n,t,o,a,s,d,v,p,m,c,f=u(e),k=(null==i?void 0:i.theme)||{},b=y.dom.$(".vjs-play-progress"),g=y.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(r=window)||void 0===r||null===(l=r.app_data)||void 0===l||null===(n=l.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(o=t.cta)||void 0===o||null===(a=o.primary)||void 0===a?void 0:a.backgroundColor)),b&&(b.style.background="".concat(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(v=d.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(c=m.primary)||void 0===c?void 0:c.backgroundColor));var h=f.getChild("BigPlayButton")||null;(null==k?void 0:k.progressBarColor)&&b&&(b.style.background=k.progressBarColor),(null==k?void 0:k.playButtonBackgroundColor)&&h&&(h.el().style.background=k.playButtonBackgroundColor),(null==k?void 0:k.playButtonColor)&&g&&(g.style.color=k.playButtonColor),(null==k?void 0:k.playButtonType)&&("square"==(null==k?void 0:k.playButtonType)?h.el().style.borderRadius=".3em":h.el().style.borderRadius="1.3em")};export{S as initialiseSkin};
|