@viewlift/player-backup 2.0.377-backup → 2.0.379-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-970d7952.js → autoNextVideo-38f45ca1.js} +1 -1
- package/cjs/bundle.css +1157 -1140
- package/cjs/caption-settings-af7b30a4.js +1 -0
- package/cjs/captions-8b889384.js +1 -0
- package/cjs/{features-911c3816.js → features-8beda29d.js} +1 -1
- package/cjs/generic-0b925a19.js +1 -0
- package/cjs/index-22c077d0.js +1 -0
- package/cjs/{index-6133b444.js → index-517acf72.js} +1 -1
- package/cjs/{index-aa64a6c0.js → index-93ac04ff.js} +1 -1
- package/cjs/{index-50f15aa6.js → index-f64ef24d.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/localisation-da6f64c6.js +1 -0
- package/cjs/{multicamv2-e88d0dc2.js → multicamv2-2123cc15.js} +1 -1
- package/cjs/{multicamv2-f17375d7.js → multicamv2-41a918f4.js} +1 -1
- package/cjs/{nextEpisodeButton-551faeb3.js → nextEpisodeButton-c68c6da4.js} +1 -1
- package/cjs/{playlist-f0a6659a.js → playlist-8d5202b4.js} +1 -1
- package/cjs/resolution-ac7705e6.js +1 -0
- package/cjs/{series-47045f7e.js → series-b3b39dd7.js} +1 -1
- package/cjs/{series-v2-cf79269e.js → series-v2-3baa5caa.js} +1 -1
- package/cjs/{series-v2-5ce609b4.js → series-v2-f31465e3.js} +1 -1
- package/cjs/settings-icon-7a519942.js +1 -0
- package/cjs/{skin-425c1322.js → skin-6b4fd720.js} +1 -1
- package/cjs/{skin-dbff0922.js → skin-8d797b1e.js} +1 -1
- package/cjs/{skin-f7c4ead4.js → skin-90c06edf.js} +1 -1
- package/cjs/{skin-ebab1e3f.js → skin-a3530077.js} +1 -1
- package/cjs/skin-aef6f952.js +1 -0
- package/cjs/{skin-237f8d4f.js → skin-d6a48901.js} +1 -1
- package/cjs/{skin-c49d50b6.js → skin-e03a88b8.js} +1 -1
- package/cjs/{skin-a9a5a925.js → skin-ed4decab.js} +1 -1
- package/cjs/{skin-dc3525c7.js → skin-f0bbb76d.js} +1 -1
- package/cjs/{skin-3a43f138.js → skin-f8994d41.js} +1 -1
- package/cjs/{videoSelector-f4eb61cd.js → videoSelector-1399cc18.js} +1 -1
- package/cjs/{videoSelector-607de014.js → videoSelector-2bc8977c.js} +1 -1
- package/esm/{autoNextVideo-c9d22cb4.js → autoNextVideo-7dc4b5f9.js} +1 -1
- package/esm/bundle.css +1157 -1140
- package/esm/caption-settings-cf49bb1b.js +1 -0
- package/esm/captions-f011a7d4.js +1 -0
- package/esm/{features-8b0d92d7.js → features-048cb801.js} +1 -1
- package/esm/generic-759b1422.js +1 -0
- package/esm/{index-9f2bf24a.js → index-07f963db.js} +1 -1
- package/esm/{index-cef05213.js → index-1577b990.js} +1 -1
- package/esm/index-1a5d906c.js +1 -0
- package/esm/{index-3addf20e.js → index-3bae4958.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/localisation-2f1ee38c.js +1 -0
- package/esm/{multicamv2-1e925995.js → multicamv2-220833f5.js} +1 -1
- package/esm/{multicamv2-1bd7f8c5.js → multicamv2-bd4bf0f5.js} +1 -1
- package/esm/{nextEpisodeButton-f1a025e4.js → nextEpisodeButton-ca0a2b98.js} +1 -1
- package/esm/{playlist-2012e5ef.js → playlist-2d49901b.js} +1 -1
- package/esm/resolution-d9d21f0e.js +1 -0
- package/esm/{series-8f854466.js → series-637f67ff.js} +1 -1
- package/esm/{series-v2-f28041a6.js → series-v2-7caace2c.js} +1 -1
- package/esm/{series-v2-4ada8ab6.js → series-v2-899b6955.js} +1 -1
- package/esm/settings-icon-abd55c1e.js +1 -0
- package/esm/{skin-85e8dcbb.js → skin-0e9bc166.js} +1 -1
- package/esm/{skin-74348872.js → skin-28192217.js} +1 -1
- package/esm/{skin-66b334cd.js → skin-2cb9e01a.js} +1 -1
- package/esm/{skin-d6417c01.js → skin-2d7f1782.js} +1 -1
- package/esm/{skin-7bdb21cf.js → skin-318448f4.js} +1 -1
- package/esm/skin-44cb0a24.js +1 -0
- package/esm/{skin-30a7f835.js → skin-77259d09.js} +1 -1
- package/esm/{skin-c16b40b9.js → skin-7d2af43a.js} +1 -1
- package/esm/{skin-30a90635.js → skin-9d2dad58.js} +1 -1
- package/esm/{skin-f0b7e11c.js → skin-bcb995db.js} +1 -1
- package/esm/src/core/captions.d.ts +10 -0
- package/esm/src/helpers/localisation.d.ts +1 -0
- package/esm/src/utilities/qualityLabels.d.ts +1 -0
- package/esm/{videoSelector-435aa016.js → videoSelector-01d26572.js} +1 -1
- package/esm/{videoSelector-48a4e382.js → videoSelector-21c88bd3.js} +1 -1
- package/package.json +1 -1
- package/cjs/caption-settings-e803e4a6.js +0 -1
- package/cjs/captions-abd87121.js +0 -1
- package/cjs/generic-118f7ebd.js +0 -1
- package/cjs/index-c52abe27.js +0 -1
- package/cjs/localisation-56e0a999.js +0 -1
- package/cjs/resolution-7b5483dd.js +0 -1
- package/cjs/settings-icon-b4612153.js +0 -1
- package/cjs/skin-b11e1757.js +0 -1
- package/esm/caption-settings-404c4774.js +0 -1
- package/esm/captions-8c8e9f2b.js +0 -1
- package/esm/generic-6871d7d1.js +0 -1
- package/esm/index-18292507.js +0 -1
- package/esm/localisation-0bf399a1.js +0 -1
- package/esm/resolution-847a299c.js +0 -1
- package/esm/settings-icon-c188c46d.js +0 -1
- package/esm/skin-be4ea9e2.js +0 -1
- package/esm/src/features/dvrStartOver/helpers.test.d.ts +0 -1
- package/esm/src/features/dvrStartOver/index.test.d.ts +0 -1
- package/esm/src/helpers/playerControlEvents.test.d.ts +0 -1
- package/esm/src/utilities/beacon.test.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,d as n}from"./skin-2a3ee818.js";import{ab as a,b as i}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,d as n}from"./skin-2a3ee818.js";import{ab as a,b as i}from"./generic-759b1422.js";import{s as l}from"./autoNextVideo-7dc4b5f9.js";import{r as o}from"./relatedVideosManager-93533a90.js";import r from"@babel/runtime/helpers/typeof";import d from"video.js";var s,u,c,m,p=[],v=!1,f=null,h=!1,g=null,x=null,y=null,C=null,E=null,b=function(){null!=f&&(clearInterval(f),f=null),h=!1},N="next-ep-preview-player-thumb",w=function(e,t){if(e){var n,a,i,l,o;(null==(n=t)||null===(a=n.gist)||void 0===a||null===(i=a.imageGist)||void 0===i?void 0:i.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(o=l.customData)||void 0===o||o.fallbackImage;var r=e.getElementsByClassName(N)[0];r||((r=document.createElement("div")).className=N,r.setAttribute("aria-hidden","true"),e.appendChild(r))}},A=function(e,t){if(e){var n=e.getElementsByClassName(N)[0];n&&(n.style.visibility=t?"visible":"hidden")}},L=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var a=document.createElement("span");return a.className="next-ep-duration",a.textContent="10",t.append(n,a),e.append(t),e},B=function(e,t,a,i){var l,o,r,d,s,u=null==e?void 0:e.isSport,c=(null==e?void 0:e.title)||"",m=(null==e||null===(l=e.gist)||void 0===l?void 0:l.description)||(null==e?void 0:e.description)||"",p=null==e?void 0:e.publishDate,f=document.createElement("div");f.className="next-ep-content";var h=document.createElement("div");h.className="next-ep-thumb-wrap";var g=document.createElement("img");g.className="next-ep-img",g.alt="",g.src=(null==e||null===(o=e.gist)||void 0===o||null===(r=o.imageGist)||void 0===r?void 0:r.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(s=d.customData)||void 0===s?void 0:s.fallbackImage);var x=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),a=t%60;return"".concat(n,":").concat(String(a).padStart(2,"0"))}(null==e?void 0:e.runtime),y=document.createElement("div");y.className="next-ep-thumb-runtime",y.textContent=x,x||y.classList.add("next-ep-thumb-runtime--empty"),h.appendChild(g),h.appendChild(y);var C=document.createElement("div");C.className="next-ep-meta";var E=document.createElement("div");E.className="next-ep-title",E.textContent="".concat(c||"");var N=document.createElement("div");N.className="next-ep-desc",N.textContent=m||"",String(m||"").trim()||N.classList.add("next-ep-desc--empty");var w=document.createElement("div");w.className="next-ep-meta-row";var A=document.createElement("span");A.className="next-ep-badge";var L=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);A.textContent=L,L||A.classList.add("next-ep-badge--empty");var B=document.createElement("span");B.className="next-ep-episode",B.textContent=u?p:function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var S=document.createElement("div");S.className="next-ep-meta-row-left",S.appendChild(A),S.appendChild(B);var k=document.createElement("img");k.className="next-ep-network-logo",k.alt="";var j=function(e){var t,n,a;if(e){var i=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a?void 0:a.networks;if(e&&i){var l=null==i?void 0:i.find((function(t){if(t.identifier==e)return t}));return null==l?void 0:l.badgeImage}}}(null==e?void 0:e.network);j?k.src=j:k.classList.add("next-ep-network-logo--empty"),w.appendChild(S),C.appendChild(E),C.appendChild(N),C.appendChild(w);var P=document.createElement("div");return P.className="next-ep-meta-with-logo",P.appendChild(C),P.appendChild(k),f.appendChild(h),f.appendChild(P),f.onclick=n((function(){b(),null==t||t.remove(),v=!0,I(a)}),400),f},S=function n(l,r){var d;if(v=!1,C=l,E=r,y&&(y(),y=null),null!=r&&null!==(d=r.series)&&void 0!==d&&d.enable){var s;p=[];var u=i();null==u||u.map((function(t){var n;return(n=p).push.apply(n,e(t.episodes))})),null==r||null===(s=r.series)||void 0===s||s.cb}else{var c=o.get();p=(null==c?void 0:c.content)||[],null==c||c.cb,y=o.subscribe((function(){y&&(y(),y=null),C&&E&&n(C,E)}))}var m=t(l);if(m){!function(e){e&&x&&(e.off("timeupdate",x),x=null)}(t(g)),b(),g=l,x=function(){var e,t;if(!v){var n=m.duration(),i=m.currentTime(),o=Number.isFinite(n)&&n>0?n-i:1/0,r=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(l),s=a()<=(null===(t=p)||void 0===t?void 0:t.length)-1;if(o>1){if(null!=f||h){b();var u=null==r?void 0:r.querySelector(".next-ep-header .next-ep-duration");u&&(u.textContent="10")}return r&&(r.style.visibility="hidden"),void A(d,!1)}s?(r&&(r.style.visibility="visible"),A(d,!0),h||null!=f||(m.pause(l),h=!0,function(e){var t;if(null==f){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],i=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(i){var l=10;i.textContent="10",f=setInterval((function(){l--,i.textContent=String(l),0===l&&(clearInterval(f),f=null,h=!1,p.filter((function(e,t){return t==a()})),I(e))}),1e3)}}}(l))):A(d,!1)}},m.on("timeupdate",x);var N,S=p.filter((function(e,t){return t==a()}));if((null==S?void 0:S.length)>0)if(null!==(N=document.getElementsByClassName("next-ep-preview"))&&void 0!==N&&N[0]){var k,j,P=null===(k=document.getElementsByClassName("next-ep-preview"))||void 0===k?void 0:k[0];P.style.visibility="hidden",null===(j=P.querySelector(".next-ep-preview-inner"))||void 0===j||j.remove(),Array.from(P.children).forEach((function(e){e.classList.contains("next-ep-content")&&e.remove()}));var M=P.querySelector(".next-heading-wrapper");if(M){var O=M.querySelector(".next-ep-header"),q=null==O?void 0:O.querySelector(".next-ep-duration");if(!q&&O){O.textContent="";var F=document.createElement("span");F.className="next-ep-header-text",F.textContent="Next up in",(q=document.createElement("span")).className="next-ep-duration",q.textContent="10",O.append(F,q)}else q&&(q.textContent="10")}else M=L(),P.insertBefore(M,P.firstChild);P.appendChild(B(S[0],P,l));var D=document.getElementById(l);w(D,S[0]),A(D,!1)}else{var T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden";var X=document.getElementById(l);X.append(T);var R=L();T.append(R);var G=B(S[0],T,l);T.append(G),w(X,S[0]),A(X,!1)}}},I=function(e,n){var i=t(e);if(i){var o=i.duration();if(Number.isFinite(o)&&!(o<=0)){i.pause(e);var r=a();l(r,e,p)}}};function k(e,n){var a=t(e),i=null==n?void 0:n.tvProviderLogoUrl,l=null==n?void 0:n.tvProviderName;if(i){var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(i),r.alt="connected to ".concat(l)||"Provider Name",o.append(r),a.el().appendChild(o),a.on("useractive",(function(){o.classList.remove("vjs-fade")})),a.on("userinactive",(function(){a.paused()||o.classList.add("vjs-fade")})),a.on("fullscreenchange",(function(){a.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}s={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,a,i,l;for(a in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[a])i.hasOwnProperty(l)&&("object"===r(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},c=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===c(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",(function(e){var t,n,a,i,l,o,r,d;function p(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",p),d()}n=u({},s,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",a=document.createElement("img"),t.appendChild(a),a.src=n[0].src,a.className="vjs-thumbnail",u(a.style,n[0].style),a.style.left||a.style.right||(a.onload=function(){a.style.left=-a.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",(function(e){o=i.duration()})),i.on("loadedmetadata",(function(e){o=i.duration()})),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,d,s,p,v,f,h,g,x;for(r in d=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=m(l.el()).getBoundingClientRect()).width||x.right)+g,v=e.pageX,e.changedTouches&&(v=e.changedTouches[0].pageX),s=v||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=m(l.el()).getBoundingClientRect().left+g,i=Math.floor((s-l.el().offsetLeft)/l.width()*o),n)i>r&&(d=Math.max(d,r));(p=n[d]).src&&a.src!=p.src&&(a.src=p.src),p.style&&a.style!=p.style&&u(a.style,p.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=c(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(a,p.width||n[0].width)/2)>f?s-=s+h-f:s<h&&(s=h),t.style.left=s+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",(function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",p)})),d=function(e){t.style.left="-1000px"},l.on("mouseout",d),l.on("touchcancel",d),l.on("touchend",d),i.on("userinactive",d)}));export{S as a,k as b};
|
package/esm/index.js
CHANGED
|
@@ -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 r from"video.js";import o from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/get";import a from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import s from"@babel/runtime/helpers/getPrototypeOf";import{c,g as d,a as v,b as f,d as p,e as m,f as h,h as g,i as y,l as b,s as w,v as k,j as S,k as C,m as E,n as O,o as T,p as D,q as j,t as x,r as I,u as _,w as P,x as A,y as L,z as R,A as N,B,C as M,D as U,E as F,F as V,G as H,H as z,I as G,J as q,K as W,L as K,M as Y,N as $,O as J,P as X,Q,R as Z,S as ee,T as ne,U as te,V as re,W as oe,X as ie,Y as le,Z as ae,_ as ue,$ as se,a0 as ce,a1 as de,a2 as ve,a3 as fe,a4 as pe,a5 as me,a6 as he,a7 as ge,a8 as ye}from"./generic-6871d7d1.js";import{h as be,a as we,s as ke,o as Se,g as Ce,b as Ee,c as Oe,d as Te,p as De,e as je,f as xe}from"./index-cef05213.js";import{g as Ie,d as _e,s as Pe,r as Ae,a as Le,e as Re}from"./captions-8c8e9f2b.js";import{g as Ne}from"./renditions-28891b91.js";import{p as Be}from"./resolution-847a299c.js";import{g as Me,t as Ue,p as Fe,i as Ve,a as He}from"./skin-2a3ee818.js";import{d as ze}from"./browser-02f174cf.js";import{s as Ge}from"./localisation-0bf399a1.js";import qe from"@babel/runtime/helpers/typeof";import{p as We}from"./manager-d812dea7.js";import{i as Ke,r as Ye,g as $e}from"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import Je from"@babel/runtime/helpers/toConsumableArray";import Xe from"@babel/runtime/helpers/toArray";import{createSSETransport as Qe}from"@viewlift/sse";import{r as Ze}from"./relatedVideosManager-93533a90.js";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/assertThisInitialized";function en(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nn=function(){return!!e})()}var tn=r.getComponent("TextTrackSettings"),rn=r.dom,on=[{value:"0.50",label:"50%"},{value:"0.75",label:"75%"},{value:"1.00",label:"100%"},{value:"1.25",label:"125%"},{value:"1.50",label:"150%"},{value:"1.75",label:"175%"},{value:"2.00",label:"200%"},{value:"3.00",label:"300%"},{value:"4.00",label:"400%"}],ln=on.map((function(e){return e.value})),an="1.00",un=".vjs-font-percent > select",sn="vlp-caption-font-size-style",cn="#FFF",dn="1",vn="#000",fn="1",pn="#000",mn="0",hn="proportionalSansSerif",gn="#222",yn="#ccc",bn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},wn=function(e,n){var t=parseFloat(e);return isNaN(t)?n:t},kn=function(e,n){var t;if(e&&4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(!e||7!==e.length)return e;t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"},Sn=null;function Cn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cn=function(){return!!e})()}tn?(Sn=function(){a(r,tn);var e,n,t=(e=r,n=nn(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customReady_=!0,i.customUiReady_=!0,i.triggerEl_=null,i.applyCustomFontSizeUI_(),i}return i(r,[{key:"conditionalFocus_",value:function(){this.triggerEl_=this.getCaptionsTrigger_(),this.previouslyActiveEl_=null,this.focus()}},{key:"conditionalBlur_",value:function(){this.previouslyActiveEl_=null;var e=this.player_;e&&"function"==typeof e.userActive&&e.userActive(!0);var n=this.triggerEl_||this.getCaptionsTrigger_();this.triggerEl_=null;var t=function(){n&&"function"==typeof n.focus&&n.focus()};"undefined"!=typeof window&&"function"==typeof window.setTimeout?window.setTimeout(t,0):t()}},{key:"getCaptionsTrigger_",value:function(){var e=this.player_&&this.player_.controlBar;return e&&(e.subsCapsButton||e.captionsButton||e.subtitlesButton)||null}},{key:"applyCustomFontSizeUI_",value:function(){var e=this;this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.on(this.player_,["playerresize","fullscreenchange"],(function(){return e.applyDashCaptionStyles_()})),this.applyDashCaptionStyles_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(un);if(e){for(var n=e.value;e.firstChild;)e.removeChild(e.firstChild);on.forEach((function(n){e.appendChild(rn.createEl("option",{value:n.value,textContent:n.label}))})),e.value=-1!==ln.indexOf(n)?n:an}}},{key:"bindCaptionStyleChange_",value:function(){for(var e=this,n=this.$$("select"),t=0;t<n.length;t++)this.on(n[t],"change",(function(){return e.applyDashCaptionStyles_()}))}},{key:"selectedMultiplier_",value:function(){var e=this.$(un),n=e&&-1!==ln.indexOf(e.value)?e.value:an;return parseFloat(n)}},{key:"styleEl_",value:function(){if("undefined"==typeof document)return null;var e=document.getElementById(sn);return e||((e=document.createElement("style")).id=sn,document.head.appendChild(e)),e}},{key:"applyDashCaptionStyles_",value:function(){if(this.customReady_){var e;try{e="function"==typeof this.getValues&&this.getValues()||{}}catch(e){return}var n=this.styleEl_(),t=this.player_&&this.player_.el();if(n&&t){var r=[];(e.color&&e.color!==cn||e.textOpacity&&e.textOpacity!==dn)&&r.push("color: "+kn(e.color||cn,wn(e.textOpacity,1))+" !important");var o=function(e){switch(e){case"dropshadow":return"2px 2px 3px ".concat(gn,", 2px 2px 4px ").concat(gn,", 2px 2px 5px ").concat(gn);case"raised":return"1px 1px ".concat(gn,", 2px 2px ").concat(gn,", 3px 3px ").concat(gn);case"depressed":return"1px 1px ".concat(yn,", 0 1px ").concat(yn,", -1px -1px ").concat(gn,", 0 -1px ").concat(gn);case"uniform":return"0 0 4px ".concat(gn,", 0 0 4px ").concat(gn,", 0 0 4px ").concat(gn,", 0 0 4px ").concat(gn);default:return""}}(e.edgeStyle);o&&r.push("text-shadow: "+o+" !important"),"small-caps"===e.fontFamily?(r.push("font-family: "+bn[hn]+" !important"),r.push("font-variant: small-caps !important")):e.fontFamily&&e.fontFamily!==hn&&bn[e.fontFamily]?(r.push("font-family: "+bn[e.fontFamily]+" !important"),r.push("font-variant: normal !important")):r.push("font-variant: normal !important");var i=this.selectedMultiplier_(),l="function"==typeof this.player_.currentHeight&&this.player_.currentHeight()||t.offsetHeight||0;if(1!==i&&l){var a=Math.round(.05*l*i*100)/100;r.push("font-size: "+a+"px !important"),r.push("line-height: normal !important")}var u=e.backgroundColor&&e.backgroundColor!==vn||e.backgroundOpacity&&e.backgroundOpacity!==fn?"background-color: "+kn(e.backgroundColor||vn,wn(e.backgroundOpacity,1))+" !important":"",s=e.windowColor&&e.windowColor!==pn||e.windowOpacity&&e.windowOpacity!==mn?"background-color: "+kn(e.windowColor||pn,wn(e.windowOpacity,0))+" !important":"",c=[];r.length&&c.push(".vjs-text-track-display-ttml div,.vjs-text-track-display-ttml span,.vjs-text-track-display-ttml p{"+r.join(";")+"}"),s&&c.push(".vjs-text-track-display-ttml p{"+s+"}"),u&&c.push(".vjs-text-track-display-ttml span{"+u+"}"),n.textContent=c.join("")}}}},{key:"setDefaults",value:function(){if(en(r,"setDefaults",this,3)([]),this.applyDashCaptionStyles_(),"function"==typeof Event)for(var e=this.$$("select"),n=0;n<e.length;n++)e[n].dispatchEvent(new Event("change",{bubbles:!0}))}},{key:"handleLanguagechange",value:function(){en(r,"handleLanguagechange",this,3)([]),this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.applyDashCaptionStyles_()}},{key:"close",value:function(){var e=this.opened_;en(r,"close",this,3)([]),e&&this.focusCaptionsButton_()}},{key:"focusCaptionsButton_",value:function(){var e=this.player_&&this.player_.controlBar;if(e){var n=e.getChild("SubsCapsButton")||e.getChild("CaptionsButton")||e.getChild("SubtitlesButton");n&&"function"==typeof n.focus&&n.focus()}}}]),r}(),r.registerComponent("TextTrackSettings",Sn)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var En=r.getComponent("SubsCapsButton"),On=null;En?(On=function(){a(r,En);var e,n,t=(e=r,n=Cn(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(){return o(this,r),t.apply(this,arguments)}return i(r,[{key:"pressButton",value:function(){!function(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}(r,"pressButton",this,3)([]),this.buttonPressed_&&this.focusFirstVisibleItem_()}},{key:"focusFirstVisibleItem_",value:function(){if(this.menu&&this.menu.el_&&this.menu.el_.contains(document.activeElement)){var e=this.menu.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift();for(var n=0;n<e.length&&e[n].hasClass("vjs-texttrack-settings");)n++;n>0&&n<e.length&&this.menu.focus(n)}}}]),r}(),r.registerComponent("SubsCapsButton",On)):console.warn("[vlp] CustomSubsCapsButton: video.js SubsCapsButton is not registered; skipping override.");var Tn=function(e){return new Promise((function(n,t){if(Dn(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)}}))},Dn=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},jn=function(e,n,t){var r=Me(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},xn=function(e){var n=Me(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},In=function(){var e=n(t.mark((function e(n){var o,i,l,a,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Me(null==n?void 0:n.playerId),null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("./index-cbb86a6c.js").then((function(e){return e.i}));case 4:return a=e.sent,e.prev=5,e.next=8,Tn("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(r),e.finish(13);case 16:(u=r.getTech("chromecast"))&&!u.prototype.seeking&&(u.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.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==ze()?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)}}(),_n=function(e,n){var t=Me(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(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 Pn=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"),Tn("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)}}(),An=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,import("@viewlift/comscore/index.js").then((function(e){c.set(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ln=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){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rn=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(r),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Nn=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-e9e43270.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)}}(),Bn=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-cfe95daa.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)}}(),Mn=Object.freeze({__proto__:null,importChromecast:function(){import("./index-cbb86a6c.js").then((function(e){return e.i})).then((function(e){Tn("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("./index-28ebfa21.js").then((function(e){return e.i})).then((function(e){e.default(r)}))},loadAdsLibrary:Pn,loadEMELibrary:Ln,loadMuxPlugin:Rn,loadDvrSeekbar:Nn,loadContribDash:Bn,loadComscorePlugin:An});function Un(e){return Fn.apply(this,arguments)}function Fn(){return(Fn=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,Pn();case 3:r&&"Safari"==ze()&&Promise.resolve().then((function(){return Mn})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(e){return Hn.apply(this,arguments)}function Hn(){return(Hn=n(t.mark((function e(n){var r,o,i,l,a,u,s,c,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=Me(n.playerId),e.next=3,An();case 3:v.comscore({publisherId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(e,n){return Gn.apply(this,arguments)}function Gn(){return(Gn=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,m,h,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==r?void 0:r.contentType)||"video",f=null==r||null===(o=r[v])||void 0===o?void 0:o.drmEnabled,null==r||null===(i=r[v])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(a=r[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==ze()?Ln():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?Bn():Ln():"Safari"!=ze()&&p?Bn():null,m?Vn(n):null,h?Rn():null,In(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function qn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Wn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):qn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Kn=new Set,Yn=null,$n=function(e,n,t,r){var o,i,l,a,u,s,c,v,p={},m=(null==e?void 0:e.contentType)||"video";p["c3.cm.id"]=(null===(o=e[m])||void 0===o?void 0:o.id)||"Null",p["c3.cm.contentType"]=tt(e),p[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),p[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc();var h=(null===(a=We.getConfig())||void 0===a?void 0:a.userId)||d();p[null==t||null===(u=t.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===h?"NULL":h,p["c3.cm.categoryType"]=Zn(e),p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.DRMEnabled=(null===(s=e[m])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(c=e[m])&&void 0!==c&&null!==(v=c.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[t.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=et(e),p["c3.cm.genreList"]=Xn(e),p["c3.cm.genre"]=Jn(e),p["c3.cm.channel"]=Qn(e,r);var g=ot(f(),e);return p=Wn(Wn({},p),g)},Jn=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"},Xn=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"},Qn=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(r=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find((function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)})))||void 0===r?void 0:r.title)||"NULL"},Zn=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},et=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"},nt=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)},tt=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var rt,ot=function(e,n){var t,r,o,i,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=p(),s=v();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(o=e[u-1])||void 0===o||null===(i=o.episodes)||void 0===i||null===(l=i[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},it=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"}},lt=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},at=function(){var e=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==r?void 0:r.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,u=o.enable,s=o.appName,d=(c=r||{}).token,v=c.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=Me(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(h=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=it(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})})),n||p("contentInfo",{DRMEnabled:"None"})})),f.on("loadstart",(function(){var e,n;Yn&&Yn!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),Kn.clear(),Yn=f.currentSrc();var t=lt(f.currentType()),o=m(),i=$n(o,f,h,v);i[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",i[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=nt(o,r),i.authToken=d||"NULL",i.streamType=t,i.D2CType=l||"NONE",i.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",i["c3.cm.affiliate"]=a||"NULL",ut.setData(i),p("contentInfo",i)})),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(){Kn.has(f.currentSrc())||(Kn.add(f.currentSrc()),p("playbackStarted",null))})),f.on("ended",(function(){Kn.has(f.currentSrc())&&Kn.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==Kn||Kn.clear(),p("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ut=(rt={},{setData:function(e){rt=Wn(Wn({},rt),e)},getData:function(){return rt}}),st=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-66b334cd.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-7bdb21cf.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-85e8dcbb.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-c16b40b9.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-30a7f835.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?import("./skin-be4ea9e2.js").then((function(t){t.initialiseSkin(e,n)})):"news"==t?import("./skin-d6417c01.js").then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?import("./skin-74348872.js").then((function(t){t.initialiseSkin(e,n)})):"mini"==t?import("./skin-f0b7e11c.js").then((function(t){t.initialiseSkin(e,n)})):"CN_NEWS"==t&&import("./skin-30a90635.js").then((function(t){t.initialiseSkin(e,n)}))};function ct(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}var dt,vt=["offsetSeconds","offsetLabel"],ft=function(n){if(!n||"object"!==qe(n))return n;if(!vt.some((function(e){return e in n})))return n;var t=function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ct(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}({},n);return vt.forEach((function(e){return delete t[e]})),t},pt=function(e){try{if(!e)return null;e.refreshAnchor();var n="function"==typeof e.anchorInfo?e.anchorInfo():{};if("vod"===n.source)return{live:!1,source:"vod"};var t=("function"==typeof e.displayBounds?e.displayBounds():e.windowBounds())||{},r=t.start,o=t.end;if(!(Number.isFinite(r)&&o>r))return null;var i=null!=n.anchorPdtSec&&null!=n.anchorPlayerT;return{live:!0,source:n.source,windowEnd:o,anchorT:i?n.anchorPlayerT:null,anchorUtc:i?n.anchorPdtSec:null,nowSec:Date.now()/1e3}}catch(e){return null}},mt=function(e,n){try{return ht(e,n)}catch(e){return null}},ht=function(e,n){if(!e)return null;var t=h(n).start;if(!Number.isFinite(t))return null;if(!e.live)return{seconds:t,live:!1};var r=null!=e.anchorUtc?e.anchorT+(t-e.anchorUtc):e.windowEnd-(e.nowSec-t);return Number.isFinite(r)?{seconds:Math.max(0,e.windowEnd-r),live:!0}:null},gt=function(e){if(!e||!Number.isFinite(e.seconds))return"";var n=r.formatTime(e.seconds,e.seconds);return e.live?"-".concat(n):n},yt=(dt=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n.map(ft):[];return dt.set(e,t),t},get:function(e){return dt.get(e)||[]},remove:function(e){dt.delete(e)}}),bt="chapter-change",wt="chapter-click",kt="chapters-updated";function St(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Me(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Ct(e){var n=Me(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(bt,e)},onChapterClick:function(e){return t(wt,e)},onChaptersUpdated:function(e){return t(kt,e)}}}var Et="vjs-chapter-marker",Ot="vjs-chapter-preview",Tt=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function Dt(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,i=void 0===o?{}:o,l=n.seek,a=Me(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=null,v=function(){return!0===(null==i?void 0:i.enable)},f=function(e){try{return r.chapterStartPercent(e)}catch(e){return null}},p=function(n,t,o){var i=Me(e),l=Tt(i);if(l){var a=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=Ot;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(l);a._time.textContent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt(r);return gt(mt(n,e))}(n,o),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==i?void 0:i.el)?i.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var o="function"==typeof(null==t?void 0:t.el)?t.el():null;if(o){var i=o.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=i.left+8+u,d=i.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,i,t)}},m=function(){d=null,s&&s.classList.remove("vjs-chapter-preview--visible");var n=Me(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},h=function(e){if(d&&s&&s.classList.contains("vjs-chapter-preview--visible")){var n=f(d);null!=n?p(d,n,e):m()}},g=function(n){var r=document.createElement("div");r.className=Et,r.dataset.segmentId=String(n.segmentId);var o=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=Fe(n);r&&t.appendChild(r)}else{var o=document.createElement("img");o.src=n,o.alt="",t.appendChild(o)}return t}(n);o&&r.appendChild(o);var i=function(r){if("touchstart"===r.type)r.preventDefault();else if("mousedown"===r.type&&0!==r.button)return;r.stopPropagation(),"function"==typeof l&&l(n.segmentId);var o=t.get(e).indexOf(n);St(e,wt,{chapter:n,index:o,position:o>=0?o+1:void 0})};return r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),null!=n&&n.label&&r.setAttribute("aria-label",String(n.label)),r.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.repeat||(e.preventDefault(),i(e))})),r.addEventListener("mouseenter",(function(){var e=f(n);null!=e&&(d=n,p(n,e))})),r.addEventListener("mouseleave",m),r},y=function(n){v()&&0!==u.size&&(n||r.refreshAnchor(),t.get(e).forEach((function(e){var n=u.get(String(e.segmentId));if(n){var t=f(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}})))},b=0,w=function(n){u.forEach((function(e){return e.classList.remove("".concat(Et,"--active"))}));var r=t.get(e),o=n>=0?r[n]:null;if(o){var i=u.get(String(o.segmentId));i&&i.classList.add("".concat(Et,"--active"))}},k=function(){var n=Me(e);if(n){var o=t.get(e),i=r.playerTimeToChapterIndex(n.currentTime()||0,o);-1===i&&Date.now()<b||i!==c&&(c=i,w(i),St(e,bt,{chapter:i>=0?o[i]:null}))}},S=Ue((function(){var e=pt(r);y(!0),h(e),k()}),1e3),C=function(){var e=pt(r);y(!0),h(e),k()},E=function(){pt(r),y(!0)};a.on("timeupdate",S),a.on("seeked",C);var O=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",E),O=!0)}catch(e){}var T=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(T=setInterval((function(){var e=pt(r);y(!0),h(e)}),500));return{render:function(){var n=Me(e),o=Tt(n);o&&(m(),o.querySelectorAll(".".concat(Et)).forEach((function(e){return e.remove()})),u.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach((function(e){var n=g(e);o.appendChild(n),u.set(String(e.segmentId),n)})),y(!0),w(c),k()))},reposition:y,destroy:function(){try{a.off("timeupdate",S),a.off("seeked",C),O&&a.liveTracker.off("liveedgechange",E)}catch(e){}T&&(clearInterval(T),T=null);var n=Tt(Me(e));n&&n.querySelectorAll(".".concat(Et,", .").concat(Ot)).forEach((function(e){return e.remove()})),u.clear(),s=null,d=null},setActiveBySegment:function(n){var r=t.get(e),o=r.findIndex((function(e){return String(e.segmentId)===String(n)}));o<0||(b=Date.now()+1500,o!==c&&(c=o,w(o),St(e,bt,{chapter:r[o]})))}}}function jt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function xt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var It=new Map,_t=function(e){var n=e.live,t=e.dvr;return function(e){return Array.isArray(e)&&e.some((function(e){return e&&e.eventStartUtc}))}(e.chapters)||n&&t?"livedvr":"vod"},Pt=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},At=function(e){var n=It.get(e);if(n)return n;n={mapper:g(e,{timeMode:"vod"}),markers:null,chaptersConfig:{enable:!0},timeMode:"vod",live:!1,dvr:!1,disposed:!1},It.set(e,n);var t=Me(e);return t&&(t.on("dispose",(function(){return Ut(e)})),t.one("loadeddata",(function(){n.disposed||Lt(e)}))),n},Lt=function(e){var n=It.get(e),t=function(e){var n=It.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=Me(e);return t&&Pt(t)?(n.markers=Dt(e,{store:yt,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return Mt(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function Rt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=At(e);yt.set(e,n);var r=_t({live:t.live,dvr:t.dvr,chapters:n});return r!==t.timeMode&&(t.timeMode=r,t.mapper=g(e,{timeMode:r}),t.markers&&(t.markers.destroy(),t.markers=null)),Lt(e),St(e,kt,{chapters:yt.get(e)}),!0}function Nt(e){var n=yt.get(e),t=It.get(e);if(!t||!n.length)return n;var r=pt(t.mapper);try{return n.map((function(e){var n=mt(r,e);return xt(xt({},e),{},{offsetSeconds:n?n.seconds:null,offsetLabel:gt(n)})}))}catch(e){return n}}function Bt(e){yt.set(e,[]);var n=It.get(e);return null!=n&&n.markers&&n.markers.render(),St(e,kt,{chapters:[]}),!0}function Mt(e,n){var t,r,o=Me(e),i=At(e);if(!o)return!1;var l=yt.get(e).find((function(e){return e.segmentId===n}));if(!l)return!1;i.mapper.refreshAnchor();var a=i.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=i.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),o.currentTime(a),null===(t=i.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Ut(e){var n=It.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),It.delete(e),yt.remove(e)}function Ft(e){var n,t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=We.getConfig();(null!=i&&null!==(n=i.chaptersConfig)&&void 0!==n&&n.enable||null!=i&&null!==(t=i.chapters)&&void 0!==t&&t.length)&&(function(e,n){var t,r=null===(t=Me(e))||void 0===t?void 0:t.el();if(r&&n){var o=function(e,n){null!=n&&""!==n&&r.style.setProperty(e,n)};o("--vl-chapter-color",n.markerColor),o("--vl-chapter-active",n.markerActiveColor),o("--vl-chapter-hover",n.markerHoverColor),o("--vl-chapter-size",null!=n.markerSize?"".concat(n.markerSize,"px"):null),o("--vl-chapter-opacity",null!=n.markerOpacity?String(n.markerOpacity):null),o("--vl-chapter-tooltip",n.tooltipColor)}}(e,null==i||null===(r=i.chaptersConfig)||void 0===r?void 0:r.style),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,o=n.live,i=void 0!==o&&o,l=n.dvr,a=void 0!==l&&l;n.res;var u=n.chaptersConfig,s=void 0===u?{}:u,c=Me(e);if(!c)return!1;Array.isArray(r)&&yt.set(e,r);var d=_t({live:i,dvr:a,chapters:r}),v=It.get(e);null!=v&&v.markers&&v.markers.destroy();var f={mapper:g(e,{timeMode:d}),markers:null,chaptersConfig:s||{},timeMode:d,live:i,dvr:a,disposed:!1};It.set(e,f);var p=function(){f.disposed||Lt(e)};c.one("loadeddata",p),Pt(c)&&p(),c.on("dispose",(function(){return Ut(e)}))}(e,{chapters:(null==i?void 0:i.chapters)||[],live:(null==o?void 0:o.liveVideo)||!1,dvr:(null==o?void 0:o.isDvrEnabled)||!1,res:null==o?void 0:o.res,chaptersConfig:(null==i?void 0:i.chaptersConfig)||{}}))}var Vt=!1,Ht=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[o])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!Vt){var i=zt(e,"videoAssets","secondaryVideoAssets"),l=y(i,n);return l&&b(n,l),Vt=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function zt(e,n,t){if(Array.isArray(e))return e.map((function(e){return zt(e,n,t)}));if(null!==e&&"object"===qe(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]=zt(e[o],n,t)})),r}return e}function Gt(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 qt(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)?qt(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 qt(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 Wt(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 Kt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Wt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Yt,$t=function(e,n,t,r){var o,i,l,a,u,s=r.res,c=r.sres,d=Me(e),v=(null==s?void 0:s.contentType)||"video",f=(null==s||null===(o=s[v])||void 0===o?void 0:o.drmEnabled)||!1,p=!(null==s||null===(i=s[v])||void 0===i||null===(l=i.streamingInfo)||void 0===l||!l.isLiveStream)||"linearchannel"===v,h=(null==s||null===(a=s[v])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;w(s),k.set(s),d&&(Ke(e,{liveVideo:p,isDvrEnabled:h}),d.on("loadstart",(function(){p?t.resolve({status:!0,msg:"Video Loaded",response:s}):t.resolve(Kt({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:s}:{response:s}))})),d.on("loadeddata",(function(){var t,r,o,i,l=Ie(e);if(null==l||l.map((function(n){return _e(e,n.id)})),h&&"Safari"===ze())try{var a;null==d||null===(a=d.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==d||!d.muted())&&jn(e,sessionStorage.getItem("volume")||"100"),Ye(e);var u=m();if(S(n),C(),null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.isExternal){var c=Kt(Kt({},n),s);E(d,c)}else if(null!=n&&n.watchHistory&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var v,f,p=Kt(Kt({},n),s);O(e,p,null==u||null===(v=u.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=d&&d.mux){var g,y,b,w,k,T,D=(null===(g=m())||void 0===g?void 0:g.video)||(null==s?void 0:s.video),j=null==D?void 0:D.gist,x={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==D||null===(w=D.series)||void 0===w?void 0:w.title,video_stream_type:null!=D&&null!==(k=D.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==n||null===(T=n.analytics)||void 0===T?void 0:T.userId};d.mux({debug:!1,data:x})}})),d.textTracks().on("change",(function(n){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];Pe(e),d.trigger("subtitlechanged",t)})),d.tech_.on("retryplaylist",(function(){p&&Ht(s,e)})),d.on("error",(function(){var n,r;(console.log("ERROR",d.error(),d.error().code),4===d.error().code&&p)?Ht(s,e):(T(e,(null==d||null===(n=d.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==d||null===(r=d.error())||void 0===r?void 0:r.message)||"Some error occured",response:s}))})),d.one("play",(function(){var e,t,r,o,i;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(r=t.appcmsMain)||void 0===r||null===(o=r.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=m())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,c=j(),v=(null==c?void 0:c.get(s))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&D(d,f)}else{var h,g,y,b,w,k,S,C=null!==(h=null==n?void 0:n.watchHistoryResumeTime)&&void 0!==h?h:null==n||null===(g=n.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(y=null!==(b=null==n?void 0:n.watchedPercentage)&&void 0!==b?b:null==n||null===(w=n.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,O=null!==(k=null==n||null===(S=n.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;C&&E<O&&D(d,C)}if(null!=d&&d.dvrSeekbar)try{d.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),d.on("volumechange",(function(){var e=100*d.volume().toFixed(2);d.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),d.on("chromecastDisconnected",(function(){if(p){d.currentSource();for(var n=d.textTracks(),t=n.length-1;t>=0;t--)d.removeRemoteTextTrack(n[t])}var r=d.textTracks(),o=function(){return Ae(e)};o(),r.addEventListener("addtrack",o),setTimeout((function(){return r.removeEventListener("addtrack",o)}),15e3)})),d.one("loadeddata",(function(){var e,n=(null==d||null===(e=d.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"==qe(d.dash)){var t,r,o,i=null==d||null===(t=d.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),a=Gt(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],v=Gt(n);try{for(v.s();!(s=v.n()).done;){var p,m,h,g=s.value;("Chrome"==ze()||"Edge"==ze()&&(null!==(p=navigator)&&void 0!==p&&null!==(m=p.userAgent)&&void 0!==m&&m.includes("Macintosh")||!f))&&null!=g&&null!==(h=g.label)&&void 0!==h&&h.includes("5.1")?d.audioTracks().removeTrack(g):c.push(g)}}catch(e){v.e(e)}finally{v.f()}for(var y=c.find((function(e){return"main"===e.kind})),b=y||c.find((function(e){return e.enabled}))||c[0],w=0,k=c;w<k.length;w++){var S=k[w];S.enabled=S===b}}})))},Jt=(null===(Yt=r.time)||void 0===Yt?void 0:Yt.createTimeRanges)||r.createTimeRanges;function Xt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.scheduleStartDate,r=n.startOverTime;if(e&&(t||r)){var o,i=t?(o=t)>1e12?o/1e3:o:null,l=r>0?r:null,a=e.seekable.bind(e);e.seekable=function(){var e=a();if(!e||!e.length)return e;var n=e.start(0),t=e.end(e.length-1),r=Date.now()/1e3,o=1/0;if(null!=i&&(o=Math.min(o,r-i)),null!=l&&(o=Math.min(o,l)),!isFinite(o))return e;var u=o<=0?t:Math.max(n,t-o);return Jt(u,t)};e.on("seeking",(function(){var n=e.seekable();if(n&&n.length){var t=n.start(0);e.currentTime()<t-.5&&e.currentTime(t)}}))}}function Qt(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 Zt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Qt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var er="urn:x-cast:com.viewlift.player.caf",nr={eng:"en",spa:"es",esp:"es",cast:"es",fre:"fr",fra:"fr",ger:"de",deu:"de",por:"pt",ita:"it",dut:"nl",nld:"nl",chi:"zh",zho:"zh",cmn:"zh",yue:"zh",jpn:"ja",kor:"ko",ara:"ar",hin:"hi",rus:"ru",heb:"he",iw:"he",ind:"id",in:"id",fil:"tl",tgl:"tl",vie:"vi",tha:"th",tur:"tr",pol:"pl",swe:"sv",nor:"no",nob:"no",nb:"no",dan:"da",fin:"fi",gre:"el",ell:"el",cze:"cs",ces:"cs",ukr:"uk",rum:"ro",ron:"ro",hun:"hu",ben:"bn",tam:"ta",tel:"te",mal:"ml",kan:"kn",mar:"mr",pan:"pa",guj:"gu",urd:"ur"},tr=["und","mul","zxx"];function rr(){try{return"true"===new URLSearchParams(window.location.search).get("castdebug")}catch(e){return!1}}function or(){var e;rr()&&(e=console).log.apply(e,arguments)}function ir(){var e;rr()&&(e=console).warn.apply(e,arguments)}function lr(e){if(!e)return"";var n=String(e).trim().toLowerCase().replace(/_/g,"-").split("@")[0].split(".")[0].split("-").filter(Boolean),t=Xe(n),r=t[0],o=t.slice(1);return r?[nr[r]||r].concat(Je(o)).join("-"):""}function ar(e){return lr(e).split("-")[0]}function ur(e){var n=ar(e);return!!n&&!tr.includes(n)}function sr(e,n){return ur(e)&&ur(n)&&ar(e)===ar(n)}function cr(e){return e?String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase():""}function dr(e,n){return!!e&&!!n&&cr(e)===cr(n)}function vr(e){return(null==e?void 0:e.language)||(null==e?void 0:e.lang)||""}function fr(e){return e?{language:vr(e)||void 0,label:e.label||void 0,roles:["captions"===e.kind?"caption":"subtitle"],forced:!!e.forced}:null}function pr(e){return e?{language:vr(e)||void 0,label:e.label||void 0}:null}function mr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!n||!e.length)return null;for(var t=0,r=[function(e){return t=vr(e),r=n.language,ur(t)&&ur(r)&&lr(t)===lr(r);var t,r},function(e){return sr(vr(e),n.language)},function(e){return dr(e.label,n.label)}];t<r.length;t++){var o=r[t],i=e.filter(o);if(1===i.length)return i[0];if(i.length>1)return hr(i,n)}return null}function hr(e,n){var t=n.roles||[];return e.find((function(e){var n;return null===(n=e.roles)||void 0===n?void 0:n.some((function(e){return t.includes(e)}))}))||e[0]}var gr={textTracks:[],audioTracks:[],activeCaption:null,activeAudio:null};function yr(e,n){if(!n)return null;var t=mr(e,n);return null!=(null==t?void 0:t.id)?{id:t.id}:n}function br(e,n,t){if(!n)return!t;if(!t)return!1;var r=mr(e,t);return r&&null!=n.id?r.id===n.id:!!sr(vr(n),t.language)&&(!n.label||!t.label||dr(n.label,t.label))}function wr(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=function(){var e,n,t,r,o,i,l=null===(e=window)||void 0===e||null===(n=e.cast)||void 0===n?void 0:n.framework,a=null==l||null===(t=l.CastContext)||void 0===t||null===(r=t.getInstance)||void 0===r?void 0:r.call(t),u=null==a||null===(o=a.getCurrentSession)||void 0===o?void 0:o.call(a);return u&&"function"==typeof u.sendMessage?null!=l&&l.CastState&&(null===(i=a.getCastState)||void 0===i?void 0:i.call(a))!==l.CastState.CONNECTED?null:u:null}();if(t){var r=Zt(Zt({type:"COMMAND",source:"sender",command:e},n),{},{ts:Date.now()});or("[Cast] ->",e,n);try{Promise.resolve(t.sendMessage(er,r)).catch((function(n){return ir("[Cast] command failed",e,(null==n?void 0:n.message)||n)}))}catch(n){ir("[Cast] command failed",e,(null==n?void 0:n.message)||n)}}}var kr=function(){return wr("play")},Sr=function(){return wr("pause")},Cr=function(e){return wr("seek",{currentTime:e})},Er=function(e){return wr("setPlaybackRate",{rate:e})},Or=function(e,n){return wr("setVolume",{volume:e,muted:n})},Tr=function(e){br(gr.textTracks,gr.activeCaption,e)||wr("setCaption",{track:yr(gr.textTracks,e)})},Dr=function(e){e&&(br(gr.audioTracks,gr.activeAudio,e)||wr("setAudio",{track:yr(gr.audioTracks,e)}))};function jr(e){return e?e.tracks_||Array.from(e):[]}function xr(e){var n;return jr(null===(n=e.textTracks)||void 0===n?void 0:n.call(e)).filter((function(e){return"captions"===e.kind||"subtitles"===e.kind}))}function Ir(e){return"function"==typeof e.audioTracks?jr(e.audioTracks()):[]}function _r(e){return xr(e).find((function(e){return"showing"===e.mode}))||null}function Pr(e){return Ir(e).find((function(e){return e.enabled}))||null}function Ar(e,n){var t=xr(e),r=n?mr(t,n):null;n&&!r||t.forEach((function(e){e.mode=e===r?"showing":"disabled"}))}var Lr=null;var Rr=null;function Nr(e,n){if("STATE"===n.type)return gr.textTracks=n.textTracks||[],gr.audioTracks=n.audioTracks||[],gr.activeCaption=n.activeCaption||null,gr.activeAudio=n.activeAudio||null,void function(){if(Rr&&(gr.textTracks.length||gr.audioTracks.length)){var e=Rr,n=e.caption,t=e.audio;Rr=null,Tr(n),Dr(t)}}();if("LOG_STATUS"===n.type&&or("[Cast] <- LOG_STATUS",n.type,n),"EVENT"===n.type)switch(or("[Cast] <-",n.event,n),n.event){case"CaptionChanged":gr.activeCaption=n.activeCaption||null,Ar(e,gr.activeCaption);break;case"AudioChanged":gr.activeAudio=n.activeAudio||null,function(e,n){var t=n&&mr(Ir(e),n);t&&!t.enabled&&(t.enabled=!0)}(e,gr.activeAudio);break;case"TracksChanged":gr.textTracks=[],gr.audioTracks=[];break;case"TrackUnresolved":ir("[Cast] receiver could not resolve track",n.kind,n.requested)}}var Br=!1;function Mr(e){!function(e){var n,t,r,o,i,l,a=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t?void 0:t.framework,u=null==a||null===(r=a.CastContext)||void 0===r||null===(o=r.getInstance)||void 0===o?void 0:o.call(r);if(u){var s=function(n){n&&!n.__vlCastListening&&(n.__vlCastListening=!0,n.addMessageListener(er,(function(n,t){try{var r="string"==typeof t?JSON.parse(t):t;"receiver"===(null==r?void 0:r.source)&&Nr(e,r)}catch(e){ir("[Cast] could not handle receiver message",(null==e?void 0:e.message)||e,t)}})))};s(null===(i=u.getCurrentSession)||void 0===i?void 0:i.call(u)),!Br&&null!=a&&null!==(l=a.CastContextEventType)&&void 0!==l&&l.SESSION_STATE_CHANGED&&(Br=!0,u.addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,(function(){var e;return s(null===(e=u.getCurrentSession)||void 0===e?void 0:e.call(u))})))}}(e),e.addClass("vl-casting");var n=_r(e);n&&(Lr=fr(n));var t=function(){return Ar(e,Lr)};e.one("loadeddata",(function(){return setTimeout(t,0)})),setTimeout(t,1500),function(e){var n=fr(_r(e))||Lr,t=pr(Pr(e));or("[Cast] syncing selected tracks",Rr={caption:n,audio:t}),wr("setCaption",{track:yr(gr.textTracks,n)}),t&&wr("setAudio",{track:yr(gr.audioTracks,t)})}(e)}function Ur(e){var n;if(e&&!e.__vlCastSyncBound){e.__vlCastSyncBound=!0,e.on("chromecastConnected",(function(){return Mr(e)})),e.on("chromecastDisconnected",(function(){e.removeClass("vl-casting"),gr.textTracks=[],gr.audioTracks=[],gr.activeCaption=null,gr.activeAudio=null,Rr=null}));var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150,t=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,o)}),n)}}((function(){return Or(e.volume(),e.muted())}));e.on("play",(function(){return kr()})),e.on("pause",(function(){return Sr()})),e.on("seeked",(function(){return Cr(e.currentTime())})),e.on("volumechange",t),e.on("ratechange",(function(){return Er(e.playbackRate())})),e.on("texttrackchange",(function(){var n=fr(_r(e));n&&(Lr=n),Tr(n)}));var r="function"==typeof e.audioTracks?e.audioTracks():null;null==r||null===(n=r.addEventListener)||void 0===n||n.call(r,"change",(function(){return Dr(pr(Pr(e)))}))}}function Fr(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 Vr(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function Hr(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 zr(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)?zr(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 zr(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 Gr={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},qr=function(e){var n;if(e){var t=function(){var n,t="function"==typeof e.currentWidth&&e.currentWidth()||(null===(n=e.el())||void 0===n?void 0:n.clientWidth)||0;e.toggleClass("vlp-hide-pip",t<=500&&function(){var n,t=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);if(!t)return!1;for(var r=0;r<t.length;r++){var o,i=null===(o=t[r])||void 0===o?void 0:o.kind;if("captions"===i||"subtitles"===i)return!0}return!1}())};t(),e.on("playerresize",t),e.on("fullscreenchange",t);var r=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);null!=r&&r.addEventListener&&(r.addEventListener("addtrack",t),r.addEventListener("removetrack",t),e.on("dispose",(function(){r.removeEventListener("addtrack",t),r.removeEventListener("removetrack",t)})))}};function Wr(e,n,t){var r=We.getConfig()||{};M(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n,videoId:null==r?void 0:r.videoId})}function Kr(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var o=n[r[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var i=null==e?void 0:e.keySystemOptions;if(Array.isArray(i)){var l,a=Hr(i);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function Yr(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return Kr("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function $r(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor((function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=U(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(F(r)){var o=V(e,null);H(o)||Wr(t,r,o)}}catch(e){}return Promise.resolve(e)})),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter((function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()})),"function"==typeof n.on&&n.on("public_licenseRequestComplete",(function(t){try{var r,o,i,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(o=t.error)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.responseCode)&&void 0!==r?r:V(null,t.error);Wr((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||Yr(e)||"","license",a)}catch(e){}})))}var Jr=!1,Xr=null,Qr=new Set;function Zr(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,Qr.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,Qr.delete(e),function(){if(Jr&&!(Qr.size>0)){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Xr&&e.removeHook("beforeinitialize",Xr),Jr=!1,Xr=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function eo(e){if(e){Zr(e),function(){if(!Jr){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.hook&&(Xr=function(e,n){null!=e&&e.__vlDrmDashEnabled&&$r(e,n)},Jr=!0,e.hook("beforeinitialize",Xr))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",(function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!B(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;Wr(Yr(e),"license",null)}catch(e){}})))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse((function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),o=U(r,null==e?void 0:e.type);if(!F(o))return;var i=V(t,n);H(i)&&!n||Wr(r,o,i)}catch(e){}})))}(e),$r(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",(function(){setTimeout(n,0)}))}}var no=function(o,i,l,a){var u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,O,D,j,B,M,U,F,V,H,z,G,q,W,K,Y,$,J,X,Q,Z,ee,ne,te,re=i.res,oe=void 0===re?null:re,ie=i.sres,le=void 0===ie?null:ie,ae=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=Gr[r]?Gr[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ue=ae.playerDebug,se=ae.logLevel,ce=ae.dashLogLevel;ue&&(console.log("[PLAYER DEBUG] config:",l),console.log("[PLAYER DEBUG] entitlement (res):",oe),le&&console.log("[PLAYER DEBUG] series response (sres):",le));var de=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ve=(null===(u=oe)||void 0===u?void 0:u.contentType)||"video",fe=Ve(null===(s=oe)||void 0===s||null===(c=s[ve])||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.videoImageUrl)||Ve(null===(v=oe)||void 0===v||null===(f=v[ve])||void 0===f||null===(p=f.gist)||void 0===p||null===(m=p.imageGist)||void 0===m?void 0:m.r16x9),pe=(null===(h=oe)||void 0===h||null===(g=h[ve])||void 0===g||null===(w=g.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,me=!(null===(k=oe)||void 0===k||null===(S=k[ve])||void 0===S||null===(C=S.streamingInfo)||void 0===C||!C.isLiveStream)||"linearchannel"===ve,he=(null===(E=oe)||void 0===E||null===(O=E.ads)||void 0===O||null===(D=O.preRoll)||void 0===D||null===(j=D.adTags)||void 0===j||null===(B=j.web)||void 0===B?void 0:B.active)&&(null===(M=oe)||void 0===M||null===(U=M.ads)||void 0===U||null===(F=U.preRoll)||void 0===F||null===(V=F.adTags)||void 0===V||null===(H=V.web)||void 0===H?void 0:H.url);oe=Vr(Vr({},oe),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var ge=(null==l||null===(z=l.customData)||void 0===z?void 0:z.ads)||{},ye=(null===(G=oe)||void 0===G||null===(q=G[ve])||void 0===q?void 0:q.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ge?void 0:ge.vodAdSticherProvider)||!1,be=!(null===(W=oe)||void 0===W||null===(K=W[ve])||void 0===K||!K.isSSAIEnabled)&&"TRANSMIT"==(null==ge?void 0:ge.liveAdSticherProvider)&&!(null==ge||!ge.liveAdClientSideTracking),we=(null==l?void 0:l.latency)||6,ke=(null==l?void 0:l.skin_settings)||{},Se=(ne={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==ke?void 0:ke.pictureInPictureToggle)||!1},playbackRates:null!=ke&&ke.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:pe},e(ne,"autoplay",null==l?void 0:l.autoplay),e(ne,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!he),e(ne,"loop",(null==l?void 0:l.loop)||!1),e(ne,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ne,"html5",Vr(Vr({dash:Vr(Vr({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Vr(Vr({},((null==l?void 0:l.debugConfig)&&(null==l||null===(Y=l.debugConfig)||void 0===Y?void 0:Y.enable)||ue)&&{debug:{logLevel:ce}}),{},{streaming:{parseInbandPrft:!0,delay:{liveDelay:we},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Vr({},"IE"==ze()&&{enableStallFix:!0,stallSeek:1}),abr:Vr(Vr(Vr(Vr({},(null==l?void 0:l.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==l?void 0:l.initialBandwidth)/1e3}}),(null==l?void 0:l.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==l?void 0:l.maxBitrate)/1e3}}),(null==l?void 0:l.minBitrate)&&{minBitrate:{audio:-1,video:(null==l?void 0:l.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Vr(Vr(Vr({},(null==l?void 0:l.initialBandwidth)&&{bandwidth:l.initialBandwidth}),{},{liveRangeSafeTimeDelta:we,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==l||!l.initialBandwidth},(null==l||null===($=l.customData)||void 0===$?void 0:$.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(J=null==l?void 0:l.enableLowInitialPlaylist)&&void 0!==J&&J},((null==l?void 0:l.debugConfig)&&(null==l||null===(X=l.debugConfig)||void 0===X?void 0:X.enable)||ue)&&{debug:!0}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(Q=l.debugConfig)||void 0===Q?void 0:Q.enable)||ue||!1,nativeTextTracks:"Safari"==ze()},0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(ee=l.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",fe),e(ne,"techOrder",de),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,r=Me(o),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,h,g,y,b,w,k,S;p.isDrmEnabled=!0;var C=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==C?void 0:C.url)||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(g=h[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=E;var O=(null==C?void 0:C.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=O}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 D=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=D;var j=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=j;var x,I,_=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=_,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,void 0!==("undefined"==typeof window?"undefined":qe(window))&&(p.siteId=(null===(x=window)||void 0===x?void 0:x.siteId)||null,p.userId=(null===(I=window)||void 0===I?void 0:I.sessionStorage)&&window.sessionStorage.getItem("uid")||null),console.log(p),p}(oe,e,i),u=i.find((function(e){return"showing"===e.mode}))||null;return Lr=fr(u),Vr(Vr({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:x.get()||null,convivaMetaData:Vr({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},ut.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=Me(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=oe)||void 0===n||null===(t=n[ve])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!r.getPlayers()[o]){(null!=l&&l.debugConfig&&null!=l&&null!==(te=l.debugConfig)&&void 0!==te&&te.enable||ue)&&r.log.level(se||"debug");var Ce=r(o,Se,function(){var e=n(t.mark((function e(){var n,i,u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,O,D,j,x,B,M,U,F,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return eo(Ce),qr(Ce),console.log(Ce),console.log(r.VERSION),console.log(r.getPlugins()),e.next=7,zn(l,oe);case 7:if(null!=l&&l.debugConfig&&null!=l&&null!==(n=l.debugConfig)&&void 0!==n&&n.enable||ue){try{r.log.level(se||"debug")}catch(e){}(C=function(){try{var e,n,t;null==Ce||null===(e=Ce.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:ce}})}catch(e){}})(),Ce.one("loadedmetadata",C)}if(E=null===(i=oe)||void 0===i||null===(u=i[ve])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.startOverTime,null!=l&&l.disableControls||Ft(o,{liveVideo:me,isDvrEnabled:pe,res:oe}),me&&a.resolve(Vr({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:oe}:{response:oe})),P(o,{content:oe,analyticsCb:null==l?void 0:l.analyticsCb,analyticsEventParams:null==l?void 0:l.analyticsEventParams,userId:null==l?void 0:l.userId}),at(o,l),Ur(Ce),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),pe&&_n(o,E),!he||null!=l&&null!==(c=l.customData)&&void 0!==c&&c.disableAds||A(o,he,oe),null!=l&&l.disableControls||L(o,{config:l,content:oe,liveVideo:me,isDvrEnabled:pe}),O=y(oe,o),console.log(O),ue&&(console.log("[PLAYER DEBUG] source:",O),console.log("[PLAYER DEBUG] videojs options:",Se)),null!=l&&l.nearestClusterUrl&&(O=R(O,l.nearestClusterUrl)),!ye){e.next=28;break}return e.next=25,N(o,oe);case 25:O=e.sent,e.next=32;break;case 28:if(!be){e.next=32;break}return e.next=31,_(O,oe,o);case 31:O=e.sent;case 32:Ce&&(Ce.__vlDrmLicenseUrl=Kr(O)),O?b(o,O):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),T(o,"Incompatible / Missing Source")),D=null===(d=oe)||void 0===d||null===(v=d[ve])||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleStartDate,me&&pe&&(D||E)&&Xt(Ce,{scheduleStartDate:D,startOverTime:E}),((null===(p=oe)||void 0===p||null===(m=p[ve])||void 0===m||null===(h=m.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(w=oe)||void 0===w||null===(k=w[ve])||void 0===k||null===(S=k.closedCaptions)||void 0===S?void 0:S.length)>0)&&(V=(null===(x=oe)||void 0===x||null===(B=x[ve])||void 0===B||null===(M=B.contentDetails)||void 0===M?void 0:M.closedCaptions)||(null===(U=oe)||void 0===U||null===(F=U[ve])||void 0===F?void 0:F.closedCaptions),j=V.filter((function(e){return"VTT"===e.format})),Le(o,j)),null!=l&&l.disableControls?I(o):st(o,Vr(Vr(Vr({},l),Se),{},{liveVideo:me,isDvrEnabled:pe,res:oe,sres:le})),$t(o,Vr(Vr(Vr({},l),Se),{},{liveVideo:me}),a,{res:oe,sres:le});case 39:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}};function to(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 ro(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?to(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):to(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var oo=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=io(e);no(o,{res:i},e,{resolve:t,reject:r})},io=function(e){var n,t,r,o,i,l,a,u,s,c,d,v,f,p,m,h=null==e?void 0:e.streamingInfo,g=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,y=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,b=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.url)||null,w=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,k=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],S=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,C=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],E=(null==e||null===(c=e.customData)||void 0===c||null===(d=c.ads)||void 0===d?void 0:d.isSSAIEnabled)||!1,O=(null==e||null===(v=e.streamingInfo)||void 0===v?void 0:v.scheduleStartDate)||null,T=(null==e||null===(f=e.streamingInfo)||void 0===f?void 0:f.startOverTime)||null,D=null==e?void 0:e.token,j=z(D);null==j||j.site;var x=null==j?void 0:j.siteId,I=(null==e||null===(p=e.customData)||void 0===p||null===(m=p.comscore)||void 0===m?void 0:m.video)||null,_=ro(ro({id:x?"".concat(x,"_external"):"external"},!y&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:ro(ro(ro(ro(ro({drmEnabled:y,streamingInfo:ro(ro({videoAssets:ro(ro({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==h?void 0:h.isDvrEnabled)&&{isLiveStream:!0}),(null==I?void 0:I.isLiveStream)&&{isLiveStream:null==I?void 0:I.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:C,liveDetails:ro({isDvrEnabled:null==h?void 0:h.isDvrEnabled},T&&{startOverTime:T}),gist:ro(ro(ro(ro({},w&&{videoImageUrl:w}),O&&{scheduleStartDate:O}),(null==I?void 0:I.videoId)&&{id:null==I?void 0:I.videoId}),(null==I?void 0:I.videoTitle)&&{title:null==I?void 0:I.videoTitle}),contentDetails:ro({},(null==k?void 0:k.length)>0&&{closedCaptions:Je(k)})},(null==I?void 0:I.runtime)&&{runtime:null==I?void 0:I.runtime}),(null==I?void 0:I.publishDate)&&{publishDate:null==I?void 0:I.publishDate}),(null==I?void 0:I.platform)&&{platform:null==I?void 0:I.platform}),(null==I?void 0:I.series)&&{series:null==I?void 0:I.series}),ads:{preRoll:{adTags:{web:ro(ro({},b&&{active:!0}),b&&{url:b})}}}});return I&&(null!=I&&I.isDvrEnabled&&(_.video.liveDetails=ro(ro({},_.video.liveDetails),{},{isDvrEnabled:null==I?void 0:I.isDvrEnabled})),null!=I&&I.metadata&&(_.video.metadata=[].concat(Je(_.video.metadata),Je(null==I?void 0:I.metadata)))),_},lo=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||"");return t.has("ssaiDisable")?t.get("ssaiDisable"):null}catch(e){return null}};function ao(e,n){return uo.apply(this,arguments)}function uo(){return(uo=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,u=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,c=!(null==n||!n.anonymousId),e.next=6,Y();case 6:d=e.sent,v=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),null!==(f=lo())&&(v="true"===f),G(u,d,v).then((function(e){var t,r,o,i,v,f,p,m,h,g,y;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(null==e?void 0:e.data);var b=null==e||null===(i=e.data)||void 0===i||null===(v=i.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleEndDate,k=null==e||null===(p=e.data)||void 0===p||null===(m=p.video)||void 0===m||null===(h=m.gist)||void 0===h?void 0:h.scheduleStartDate;be(s,{scheduleEndDate:b,scheduleStartDate:k});var S=null==e?void 0:e.data;if(null!=n&&null!==(g=n.watchHistory)&&void 0!==g&&g.isExternal)S.contentType="video",no(s,{res:S},n,{resolve:l,reject:a});else if(null!=n&&n.watchHistory&&null!=n&&null!==(y=n.watchHistory)&&void 0!==y&&y.enable&&!c){var C;if((null===(C=n.watchHistory)||void 0===C?void 0:C.saveOffline)||!1){var E,O,T,D=(null===(E=n.watchHistory)||void 0===E?void 0:E.profileId)||"",j=q(D,u,null==n?void 0:n.siteOwner);if(j&&j.length)n.watchHistoryResumeTime=(null===(O=j[0])||void 0===O?void 0:O.watchedTime)||null,n.watchedPercentage=(null===(T=j[0])||void 0===T?void 0:T.watchedPercentage)||null;S.contentType="video",no(s,{res:S},n,{resolve:l,reject:a})}else W(u,d).then((function(e){var t,r,o,i,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"})).catch((function(){})).finally((function(){no(s,{res:S},n,{resolve:l,reject:a})}))}else no(s,{res:S},n,{resolve:l,reject:a})})).catch((function(e){var t,r,o=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,i=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;o&&we(s,e,i),K(e,s,a,u)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function so(e,n){return co.apply(this,arguments)}function co(){return(co=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,Y();case 3:u=e.sent,s=null==n?void 0:n.playerId,c=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),$(c,u,d).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==c?void 0:c.channelId,w(t),no(s,{res:t},n,{resolve:l,reject:a})})).catch((function(e){K(e,s,a,videoId)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vo(e,n){return fo.apply(this,arguments)}function fo(){return(fo=n(t.mark((function e(n,r){var o,i,l,a,u,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,e.next=3,Y();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,Q.set(parseInt(s)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,J(c,a).then((function(e){var t,r,o,s=e.data,d=e.data.seasons;Z(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.id);X(c,a),G(v,a).then((function(e){var t,r,o;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(e.data),no(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:i,reject:l})})).catch((function(e){K(e,u,l,videoId)}))})).catch((function(e){K(e,u,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var po,mo=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,o=e.sseEndpoint,i=e.debug;if(n){var l=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,o=e.debug,i=void 0!==o&&o;return Qe({site:n,sseBaseUrl:t,getToken:Y,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;i&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,o,l,a,u,s,c,d;if(i&&console.log("SSE Message:",e),(null===(n=m())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(o=e.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var v=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(a=l.states)||void 0===a||null===(u=a.live)||void 0===u?void 0:u.startDateTime),f=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(c=s.states)||void 0===c||null===(d=c.end)||void 0===d?void 0:d.endDateTime);v&&f&&(console.log("Setting schedule timer",v,f),ke.set({startDateTime:v,endDateTime:f}))}},onReconnectAttempt:function(e){i&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;i&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){i&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){i&&console.error("SSE Error:",e,n)},onClose:function(){i&&console.log("SSE Closed")}})}({site:t,sseBaseUrl:r,sseEndpoint:o,debug:void 0!==i&&i});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=o,l}};function ho(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 go(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ho(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function yo(){return{loadVideoInstantly:ee,onTimeUpdate:Se,getVideoDuration:Ce,onVideoEnded:Ee,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,o){var i,l,a,u,s,c,d,v,f,p,m,h,g,y,b,w,k,S,C,E,O,T,D,j,x,I,_,P,A,L,R,N;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!ie(null==e?void 0:e.playerId)){n.next=3;break}return r({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(C=(null==e?void 0:e.videoSourceUrl)||!1,E=null==e?void 0:e.asat,O=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,T=null==e?void 0:e.videoId,D=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,j=(null==e?void 0:e.streamingInfo)||!1,window.videoId=T,x=null==e?void 0:e.token,!me(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",x),he().set(null==e?void 0:e.refreshToken),x&&!ge(x)){n.next=17;break}return o({status:!1,msg:"".concat(x?"Token is expired !":"Missing Authorization Token"),response:{token:x}}),n.abrupt("return");case 17:po=JSON.parse(atob(x.split(".")[1]));case 18:return window.siteName=null===(a=po)||void 0===a?void 0:a.site,window.siteId=null===(u=po)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=po)||void 0===s||!s.anonymousId),e.siteOwner=(null===(c=po)||void 0===c?void 0:c.site)||null,e.userId=(null===(d=po)||void 0===d?void 0:d.userId)||null,fe((null===(v=po)||void 0===v?void 0:v.userId)||(null===(f=po)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=e.watchHistory||null,I=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,_=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,(P=null==e?void 0:e.errors)&&(window.customErrors=P),window.customData=null==e?void 0:e.customData,Ge(null==e||null===(h=e.customData)||void 0===h?void 0:h.localisation),pe.set(e.apiBaseUrl),null!=e&&e.skin&&!He(e.skin)||(e.skin="VL_ONE"),We.setConfig(e),Ze.reset(),Ze.set(null==e?void 0:e.relatedVideos),n.next=39,Un(e);case 39:_&&Tn("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then((function(){return ye(_)})).catch((function(e){})),(A=null===(g=document)||void 0===g?void 0:g.getElementById("".concat(I)))&&A.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(L=mo({enable:null==e||null===(y=e.sse)||void 0===y?void 0:y.enable,site:null==e||null===(b=e.sse)||void 0===b?void 0:b.siteName,sseBaseUrl:null==e||null===(w=e.sse)||void 0===w?void 0:w.sseBaseUrl,sseEndpoint:null==e||null===(k=e.sse)||void 0===k?void 0:k.sseEndpoint,debug:null==e||null===(S=e.sse)||void 0===S?void 0:S.debug}))&&!L.isConnectionActive()&&L.connect(),C?(N={directPlaybackUrl:C,id:R="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}},E?G(R,x).then((function(n){var t,i=(null==n?void 0:n.data)||{},l=go(go(go({},i),N),{},{video:go(go({},null==i?void 0:i.video),{},{liveDetails:go(go({},null==i||null===(t=i.video)||void 0===t?void 0:t.liveDetails),{},{isDvrEnabled:!(null==e||!e.isDvr)})})});no(I,{res:l},e,{resolve:r,reject:o})})).catch((function(e){K(e,I,o,R)})):no(I,{res:go(go({},N),{},{video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}})},e,{resolve:r,reject:o})):j?oo(e,{resolve:r,reject:o}):D?vo(e,{resolve:r,reject:o}):O?so(e,{resolve:r,reject:o}):ao(e,{resolve:r,reject:o});case 45:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:Ne,skip:ne,getPlayer:Me,play:te,pause:re,detectBrowser:ze,rewind:oe,loadVideo:b,seekToTimeStamp:Oe,isPlayerInitialised:ie,load:le,authenticateLC:ae,dispose:ue,enableCaptions:Re,disableCaptions:_e,getCaptions:Ie,playSelectedResolution:Be,getSource:y,setVolume:jn,getVolume:xn,disableControls:I,setPlaybackSpeed:Te,getEntitlementData:se,getSsaiEvents:ce,getPlayerControlEvents:$e,playerEvents:De,onReplay:je,relatedVideosManager:Ze,setChapters:Rt,getChapters:Nt,clearChapters:Bt,seekToChapter:Mt,getChapterEvents:Ct,onWatchInVerticalView:xe,fireBeaconEvent:de,getDvrManager:ve}}export{yo as default};
|
|
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 r from"video.js";import o from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/get";import a from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import s from"@babel/runtime/helpers/getPrototypeOf";import{c,g as d,a as v,b as f,d as p,e as m,f as h,h as g,i as y,l as b,s as w,v as k,j as S,k as C,m as E,n as O,o as T,p as D,q as j,t as x,r as I,u as _,w as P,x as A,y as L,z as R,A as N,B,C as M,D as U,E as F,F as V,G as H,H as z,I as G,J as q,K as W,L as K,M as Y,N as $,O as J,P as X,Q,R as Z,S as ee,T as ne,U as te,V as re,W as oe,X as ie,Y as le,Z as ae,_ as ue,$ as se,a0 as ce,a1 as de,a2 as ve,a3 as fe,a4 as pe,a5 as me,a6 as he,a7 as ge,a8 as ye}from"./generic-759b1422.js";import{h as be,a as we,s as ke,o as Se,g as Ce,b as Ee,c as Oe,d as Te,p as De,e as je,f as xe}from"./index-1577b990.js";import{g as Ie,d as _e,s as Pe,r as Ae,a as Le,e as Re}from"./captions-f011a7d4.js";import{g as Ne}from"./renditions-28891b91.js";import{p as Be}from"./resolution-d9d21f0e.js";import{g as Me,t as Ue,p as Fe,i as Ve,a as He}from"./skin-2a3ee818.js";import{d as ze}from"./browser-02f174cf.js";import{s as Ge,r as qe}from"./localisation-2f1ee38c.js";import We from"@babel/runtime/helpers/typeof";import{p as Ke}from"./manager-d812dea7.js";import{i as Ye,r as $e,g as Je}from"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import Xe from"@babel/runtime/helpers/toConsumableArray";import Qe from"@babel/runtime/helpers/toArray";import{createSSETransport as Ze}from"@viewlift/sse";import{r as en}from"./relatedVideosManager-93533a90.js";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/assertThisInitialized";function nn(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}function tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tn=function(){return!!e})()}var rn=r.getComponent("TextTrackSettings"),on=r.dom,ln=[{value:"0.50",label:"50%"},{value:"0.75",label:"75%"},{value:"1.00",label:"100%"},{value:"1.25",label:"125%"},{value:"1.50",label:"150%"},{value:"1.75",label:"175%"},{value:"2.00",label:"200%"},{value:"3.00",label:"300%"},{value:"4.00",label:"400%"}],an=ln.map((function(e){return e.value})),un="1.00",sn=".vjs-font-percent > select",cn="vlp-caption-font-size-style",dn="#FFF",vn="1",fn="#000",pn="1",mn="#000",hn="0",gn="proportionalSansSerif",yn="#222",bn="#ccc",wn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},kn=function(e,n){var t=parseFloat(e);return isNaN(t)?n:t},Sn=function(e,n){var t;if(e&&4===e.length)t=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(!e||7!==e.length)return e;t=e.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"},Cn=null;function En(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(En=function(){return!!e})()}rn?(Cn=function(){a(r,rn);var e,n,t=(e=r,n=tn(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customReady_=!0,i.customUiReady_=!0,i.triggerEl_=null,i.applyCustomFontSizeUI_(),i}return i(r,[{key:"conditionalFocus_",value:function(){this.triggerEl_=this.getCaptionsTrigger_(),this.previouslyActiveEl_=null,this.focus()}},{key:"conditionalBlur_",value:function(){this.previouslyActiveEl_=null;var e=this.player_;e&&"function"==typeof e.userActive&&e.userActive(!0);var n=this.triggerEl_||this.getCaptionsTrigger_();this.triggerEl_=null;var t=function(){n&&"function"==typeof n.focus&&n.focus()};"undefined"!=typeof window&&"function"==typeof window.setTimeout?window.setTimeout(t,0):t()}},{key:"getCaptionsTrigger_",value:function(){var e=this.player_&&this.player_.controlBar;return e&&(e.subsCapsButton||e.captionsButton||e.subtitlesButton)||null}},{key:"applyCustomFontSizeUI_",value:function(){var e=this;this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.on(this.player_,["playerresize","fullscreenchange"],(function(){return e.applyDashCaptionStyles_()})),this.applyDashCaptionStyles_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(sn);if(e){for(var n=e.value;e.firstChild;)e.removeChild(e.firstChild);ln.forEach((function(n){e.appendChild(on.createEl("option",{value:n.value,textContent:n.label}))})),e.value=-1!==an.indexOf(n)?n:un}}},{key:"bindCaptionStyleChange_",value:function(){for(var e=this,n=this.$$("select"),t=0;t<n.length;t++)this.on(n[t],"change",(function(){return e.applyDashCaptionStyles_()}))}},{key:"selectedMultiplier_",value:function(){var e=this.$(sn),n=e&&-1!==an.indexOf(e.value)?e.value:un;return parseFloat(n)}},{key:"styleEl_",value:function(){if("undefined"==typeof document)return null;var e=document.getElementById(cn);return e||((e=document.createElement("style")).id=cn,document.head.appendChild(e)),e}},{key:"applyDashCaptionStyles_",value:function(){if(this.customReady_){var e;try{e="function"==typeof this.getValues&&this.getValues()||{}}catch(e){return}var n=this.styleEl_(),t=this.player_&&this.player_.el();if(n&&t){var r=[];(e.color&&e.color!==dn||e.textOpacity&&e.textOpacity!==vn)&&r.push("color: "+Sn(e.color||dn,kn(e.textOpacity,1))+" !important");var o=function(e){switch(e){case"dropshadow":return"2px 2px 3px ".concat(yn,", 2px 2px 4px ").concat(yn,", 2px 2px 5px ").concat(yn);case"raised":return"1px 1px ".concat(yn,", 2px 2px ").concat(yn,", 3px 3px ").concat(yn);case"depressed":return"1px 1px ".concat(bn,", 0 1px ").concat(bn,", -1px -1px ").concat(yn,", 0 -1px ").concat(yn);case"uniform":return"0 0 4px ".concat(yn,", 0 0 4px ").concat(yn,", 0 0 4px ").concat(yn,", 0 0 4px ").concat(yn);default:return""}}(e.edgeStyle);o&&r.push("text-shadow: "+o+" !important"),"small-caps"===e.fontFamily?(r.push("font-family: "+wn[gn]+" !important"),r.push("font-variant: small-caps !important")):e.fontFamily&&e.fontFamily!==gn&&wn[e.fontFamily]?(r.push("font-family: "+wn[e.fontFamily]+" !important"),r.push("font-variant: normal !important")):r.push("font-variant: normal !important");var i=this.selectedMultiplier_(),l="function"==typeof this.player_.currentHeight&&this.player_.currentHeight()||t.offsetHeight||0;if(1!==i&&l){var a=Math.round(.05*l*i*100)/100;r.push("font-size: "+a+"px !important"),r.push("line-height: normal !important")}var u=e.backgroundColor&&e.backgroundColor!==fn||e.backgroundOpacity&&e.backgroundOpacity!==pn?"background-color: "+Sn(e.backgroundColor||fn,kn(e.backgroundOpacity,1))+" !important":"",s=e.windowColor&&e.windowColor!==mn||e.windowOpacity&&e.windowOpacity!==hn?"background-color: "+Sn(e.windowColor||mn,kn(e.windowOpacity,0))+" !important":"",c=[];r.length&&c.push(".vjs-text-track-display-ttml div,.vjs-text-track-display-ttml span,.vjs-text-track-display-ttml p{"+r.join(";")+"}"),s&&c.push(".vjs-text-track-display-ttml p{"+s+"}"),u&&c.push(".vjs-text-track-display-ttml span{"+u+"}"),n.textContent=c.join("")}}}},{key:"setDefaults",value:function(){if(nn(r,"setDefaults",this,3)([]),this.applyDashCaptionStyles_(),"function"==typeof Event)for(var e=this.$$("select"),n=0;n<e.length;n++)e[n].dispatchEvent(new Event("change",{bubbles:!0}))}},{key:"handleLanguagechange",value:function(){nn(r,"handleLanguagechange",this,3)([]),this.replaceFontSizeOptions_(),this.bindCaptionStyleChange_(),this.applyDashCaptionStyles_()}},{key:"close",value:function(){var e=this.opened_;nn(r,"close",this,3)([]),e&&this.focusCaptionsButton_()}},{key:"focusCaptionsButton_",value:function(){var e=this.player_&&this.player_.controlBar;if(e){var n=e.getChild("SubsCapsButton")||e.getChild("CaptionsButton")||e.getChild("SubtitlesButton");n&&"function"==typeof n.focus&&n.focus()}}}]),r}(),r.registerComponent("TextTrackSettings",Cn)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var On=r.getComponent("SubsCapsButton"),Tn=null;On?(Tn=function(){a(r,On);var e,n,t=(e=r,n=En(),function(){var t,r=s(e);if(n){var o=s(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return u(this,t)});function r(){return o(this,r),t.apply(this,arguments)}return i(r,[{key:"pressButton",value:function(){!function(e,n,t,r){var o=l(s(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof o?function(e){return o.apply(t,e)}:o}(r,"pressButton",this,3)([]),this.buttonPressed_&&this.focusFirstVisibleItem_()}},{key:"focusFirstVisibleItem_",value:function(){if(this.menu&&this.menu.el_&&this.menu.el_.contains(document.activeElement)){var e=this.menu.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift();for(var n=0;n<e.length&&e[n].hasClass("vjs-texttrack-settings");)n++;n>0&&n<e.length&&this.menu.focus(n)}}}]),r}(),r.registerComponent("SubsCapsButton",Tn)):console.warn("[vlp] CustomSubsCapsButton: video.js SubsCapsButton is not registered; skipping override.");var Dn=function(e){return new Promise((function(n,t){if(jn(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)}}))},jn=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},xn=function(e,n,t){var r=Me(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var o=parseFloat(n)/100;r.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},In=function(e){var n=Me(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},_n=function(){var e=n(t.mark((function e(n){var o,i,l,a,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Me(null==n?void 0:n.playerId),null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("./index-cbb86a6c.js").then((function(e){return e.i}));case 4:return a=e.sent,e.prev=5,e.next=8,Dn("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(r),e.finish(13);case 16:(u=r.getTech("chromecast"))&&!u.prototype.seeking&&(u.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.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==ze()?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)}}(),Pn=function(e,n){var t=Me(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,a,u=this.el(),s=r.dom.getPointerPosition(u,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(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 An=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"),Dn("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ln=function(){var e=n(t.mark((function e(){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then((function(e){c.set(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rn=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){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Nn=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(r),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),Bn=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-e9e43270.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)}}(),Mn=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-cfe95daa.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)}}(),Un=Object.freeze({__proto__:null,importChromecast:function(){import("./index-cbb86a6c.js").then((function(e){return e.i})).then((function(e){Dn("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("./index-28ebfa21.js").then((function(e){return e.i})).then((function(e){e.default(r)}))},loadAdsLibrary:An,loadEMELibrary:Rn,loadMuxPlugin:Nn,loadDvrSeekbar:Bn,loadContribDash:Mn,loadComscorePlugin:Ln});function Fn(e){return Vn.apply(this,arguments)}function Vn(){return(Vn=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,An();case 3:r&&"Safari"==ze()&&Promise.resolve().then((function(){return Un})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(e){return zn.apply(this,arguments)}function zn(){return(zn=n(t.mark((function e(n){var r,o,i,l,a,u,s,c,d,v;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=Me(n.playerId),e.next=3,Ln();case 3:v.comscore({publisherId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.persistentLabels)||{},metadata:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.metadata)||{}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gn(e,n){return qn.apply(this,arguments)}function qn(){return(qn=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,m,h,g;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==r?void 0:r.contentType)||"video",f=null==r||null===(o=r[v])||void 0===o?void 0:o.drmEnabled,null==r||null===(i=r[v])||void 0===i||null===(l=i.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==r||null===(a=r[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(c=n.comscore)||void 0===c?void 0:c.enable)||!1,h=!(null==n||null===(d=n.analytics)||void 0===d||!d.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==ze()?Rn():"caliente"!=(null===(g=window)||void 0===g?void 0:g.siteName)?Mn():Rn():"Safari"!=ze()&&p?Mn():null,m?Hn(n):null,h?Nn():null,_n(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}}),e,null,[[7,12]])})))).apply(this,arguments)}function Wn(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 Kn(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Wn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var Yn=new Set,$n=null,Jn=function(e,n,t,r){var o,i,l,a,u,s,c,v,p={},m=(null==e?void 0:e.contentType)||"video";p["c3.cm.id"]=(null===(o=e[m])||void 0===o?void 0:o.id)||"Null",p["c3.cm.contentType"]=rt(e),p[null==t||null===(i=t.Constants)||void 0===i?void 0:i.IS_LIVE]=!(null==e||!e.linearchannel),p[null==t||null===(l=t.Constants)||void 0===l?void 0:l.STREAM_URL]=n.currentSrc();var h=(null===(a=Ke.getConfig())||void 0===a?void 0:a.userId)||d();p[null==t||null===(u=t.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===h?"NULL":h,p["c3.cm.categoryType"]=et(e),p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.DRMEnabled=(null===(s=e[m])||void 0===s?void 0:s.drmEnabled)||"None",p.DAIStream=null!==(c=e[m])&&void 0!==c&&null!==(v=c.gist)&&void 0!==v&&v.isSSAIEnabled?"YES":"NO",p[t.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NULL",p.CDVREnabled=nt(e),p["c3.cm.genreList"]=Qn(e),p["c3.cm.genre"]=Xn(e),p["c3.cm.channel"]=Zn(e,r);var g=it(f(),e);return p=Kn(Kn({},p),g)},Xn=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"},Qn=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"},Zn=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null===(r=((null==e||null===(t=e[o])||void 0===t?void 0:t.channels)||[]).find((function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)})))||void 0===r?void 0:r.title)||"NULL"},et=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},nt=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"},tt=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)},rt=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ot,it=function(e,n){var t,r,o,i,l,a={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return a;var u=p(),s=v();return a["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(r=t.series)||void 0===r?void 0:r.title)||"Null",a["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",a["c3.cm.showTitle"]=(null==e||null===(o=e[u-1])||void 0===o||null===(i=o.episodes)||void 0===i||null===(l=i[s-1])||void 0===l?void 0:l.title)||"Null",a["c3.cm.episodeNumber"]=(null==s?void 0:s.toString())||"Null",a},lt=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"}},at=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ut=function(){var e=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f,p,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==r?void 0:r.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,u=o.enable,s=o.appName,d=(c=r||{}).token,v=c.epg,u){e.next=4;break}return e.abrupt("return");case 4:if(f=Me(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(h=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=lt(t.keySystem);p("contentInfo",{DRMEnabled:r})}else p("contentInfo",{DRMEnabled:"None"})})),n||p("contentInfo",{DRMEnabled:"None"})})),f.on("loadstart",(function(){var e,n;$n&&$n!==f.currentSrc()&&p("playbackEnded"),p("setPlayer",f),Yn.clear(),$n=f.currentSrc();var t=at(f.currentType()),o=m(),i=Jn(o,f,h,v);i[null==h||null===(e=h.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",i[null==h||null===(n=h.Constants)||void 0===n?void 0:n.ASSET_NAME]=tt(o,r),i.authToken=d||"NULL",i.streamType=t,i.D2CType=l||"NONE",i.subscriberType=a?"MVPD":"FREE"!==l?"D2C":"FREE",i["c3.cm.affiliate"]=a||"NULL",st.setData(i),p("contentInfo",i)})),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(){Yn.has(f.currentSrc())||(Yn.add(f.currentSrc()),p("playbackStarted",null))})),f.on("ended",(function(){Yn.has(f.currentSrc())&&Yn.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==Yn||Yn.clear(),p("playbackEnded")}));case 20:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),st=(ot={},{setData:function(e){ot=Kn(Kn({},ot),e)},getData:function(){return ot}}),ct=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-2cb9e01a.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-318448f4.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-0e9bc166.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-7d2af43a.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-77259d09.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t?import("./skin-44cb0a24.js").then((function(t){t.initialiseSkin(e,n)})):"news"==t?import("./skin-2d7f1782.js").then((function(t){t.initialiseSkin(e,n)})):"news_live"==t?import("./skin-28192217.js").then((function(t){t.initialiseSkin(e,n)})):"mini"==t?import("./skin-bcb995db.js").then((function(t){t.initialiseSkin(e,n)})):"CN_NEWS"==t&&import("./skin-9d2dad58.js").then((function(t){t.initialiseSkin(e,n)}))};function dt(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}var vt,ft=["offsetSeconds","offsetLabel"],pt=function(n){if(!n||"object"!==We(n))return n;if(!ft.some((function(e){return e in n})))return n;var t=function(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}({},n);return ft.forEach((function(e){return delete t[e]})),t},mt=function(e){try{if(!e)return null;e.refreshAnchor();var n="function"==typeof e.anchorInfo?e.anchorInfo():{};if("vod"===n.source)return{live:!1,source:"vod"};var t=("function"==typeof e.displayBounds?e.displayBounds():e.windowBounds())||{},r=t.start,o=t.end;if(!(Number.isFinite(r)&&o>r))return null;var i=null!=n.anchorPdtSec&&null!=n.anchorPlayerT;return{live:!0,source:n.source,windowEnd:o,anchorT:i?n.anchorPlayerT:null,anchorUtc:i?n.anchorPdtSec:null,nowSec:Date.now()/1e3}}catch(e){return null}},ht=function(e,n){try{return gt(e,n)}catch(e){return null}},gt=function(e,n){if(!e)return null;var t=h(n).start;if(!Number.isFinite(t))return null;if(!e.live)return{seconds:t,live:!1};var r=null!=e.anchorUtc?e.anchorT+(t-e.anchorUtc):e.windowEnd-(e.nowSec-t);return Number.isFinite(r)?{seconds:Math.max(0,e.windowEnd-r),live:!0}:null},yt=function(e){if(!e||!Number.isFinite(e.seconds))return"";var n=r.formatTime(e.seconds,e.seconds);return e.live?"-".concat(n):n},bt=(vt=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n.map(pt):[];return vt.set(e,t),t},get:function(e){return vt.get(e)||[]},remove:function(e){vt.delete(e)}}),wt="chapter-change",kt="chapter-click",St="chapters-updated";function Ct(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Me(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function Et(e){var n=Me(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(wt,e)},onChapterClick:function(e){return t(kt,e)},onChaptersUpdated:function(e){return t(St,e)}}}var Ot="vjs-chapter-marker",Tt="vjs-chapter-preview",Dt=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function jt(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,i=void 0===o?{}:o,l=n.seek,a=Me(e);if(!a)return{render:function(){},reposition:function(){},destroy:function(){}};var u=new Map,s=null,c=-1,d=null,v=function(){return!0===(null==i?void 0:i.enable)},f=function(e){try{return r.chapterStartPercent(e)}catch(e){return null}},p=function(n,t,o){var i=Me(e),l=Dt(i);if(l){var a=function(e){if(s&&s.isConnected)return s;(s=document.createElement("div")).className=Tt;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",s.appendChild(n),s.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",s.appendChild(r),s._time=n,s._label=t,s._pointer=r,e.appendChild(s),s}(l);a._time.textContent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt(r);return yt(ht(n,e))}(n,o),a._label.textContent=(null==n?void 0:n.label)||"",a.classList.add("vjs-chapter-preview--visible");var u="function"==typeof(null==i?void 0:i.el)?i.el():null;u&&u.classList.add("vlp-chapter-preview-open"),function(e,n,t,r){var o="function"==typeof(null==t?void 0:t.el)?t.el():null;if(o){var i=o.getBoundingClientRect(),l=n.getBoundingClientRect(),a=e.offsetWidth||300,u=a/2,s=l.left+r/100*l.width,c=i.left+8+u,d=i.right-8-u,v=s;d>=c&&(v=Math.min(Math.max(s,c),d));var f=v-u-l.left;if(e.style.left="".concat(f,"px"),e.style.transform="none",e._pointer){var p=Math.min(Math.max(s-(l.left+f),8),a-8);e._pointer.style.left="".concat(p,"px")}}else e.style.left="".concat(r,"%")}(a,l,i,t)}},m=function(){d=null,s&&s.classList.remove("vjs-chapter-preview--visible");var n=Me(e),t="function"==typeof(null==n?void 0:n.el)?n.el():null;t&&t.classList.remove("vlp-chapter-preview-open")},h=function(e){if(d&&s&&s.classList.contains("vjs-chapter-preview--visible")){var n=f(d);null!=n?p(d,n,e):m()}},g=function(n){var r=document.createElement("div");r.className=Ot,r.dataset.segmentId=String(n.segmentId);var o=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=Fe(n);r&&t.appendChild(r)}else{var o=document.createElement("img");o.src=n,o.alt="",t.appendChild(o)}return t}(n);o&&r.appendChild(o);var i=function(r){if("touchstart"===r.type)r.preventDefault();else if("mousedown"===r.type&&0!==r.button)return;r.stopPropagation(),"function"==typeof l&&l(n.segmentId);var o=t.get(e).indexOf(n);Ct(e,kt,{chapter:n,index:o,position:o>=0?o+1:void 0})};return r.addEventListener("mousedown",i),r.addEventListener("touchstart",i),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),null!=n&&n.label&&r.setAttribute("aria-label",String(n.label)),r.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.repeat||(e.preventDefault(),i(e))})),r.addEventListener("mouseenter",(function(){var e=f(n);null!=e&&(d=n,p(n,e))})),r.addEventListener("mouseleave",m),r},y=function(n){v()&&0!==u.size&&(n||r.refreshAnchor(),t.get(e).forEach((function(e){var n=u.get(String(e.segmentId));if(n){var t=f(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}})))},b=0,w=function(n){u.forEach((function(e){return e.classList.remove("".concat(Ot,"--active"))}));var r=t.get(e),o=n>=0?r[n]:null;if(o){var i=u.get(String(o.segmentId));i&&i.classList.add("".concat(Ot,"--active"))}},k=function(){var n=Me(e);if(n){var o=t.get(e),i=r.playerTimeToChapterIndex(n.currentTime()||0,o);-1===i&&Date.now()<b||i!==c&&(c=i,w(i),Ct(e,wt,{chapter:i>=0?o[i]:null}))}},S=Ue((function(){var e=mt(r);y(!0),h(e),k()}),1e3),C=function(){var e=mt(r);y(!0),h(e),k()},E=function(){mt(r),y(!0)};a.on("timeupdate",S),a.on("seeked",C);var O=!1;try{a.liveTracker&&"function"==typeof a.liveTracker.on&&(a.liveTracker.on("liveedgechange",E),O=!0)}catch(e){}var T=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(T=setInterval((function(){var e=mt(r);y(!0),h(e)}),500));return{render:function(){var n=Me(e),o=Dt(n);o&&(m(),o.querySelectorAll(".".concat(Ot)).forEach((function(e){return e.remove()})),u.clear(),v()&&(r.refreshAnchor(),t.get(e).forEach((function(e){var n=g(e);o.appendChild(n),u.set(String(e.segmentId),n)})),y(!0),w(c),k()))},reposition:y,destroy:function(){try{a.off("timeupdate",S),a.off("seeked",C),O&&a.liveTracker.off("liveedgechange",E)}catch(e){}T&&(clearInterval(T),T=null);var n=Dt(Me(e));n&&n.querySelectorAll(".".concat(Ot,", .").concat(Tt)).forEach((function(e){return e.remove()})),u.clear(),s=null,d=null},setActiveBySegment:function(n){var r=t.get(e),o=r.findIndex((function(e){return String(e.segmentId)===String(n)}));o<0||(b=Date.now()+1500,o!==c&&(c=o,w(o),Ct(e,wt,{chapter:r[o]})))}}}function xt(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 It(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var _t=new Map,Pt=function(e){var n=e.live,t=e.dvr;return function(e){return Array.isArray(e)&&e.some((function(e){return e&&e.eventStartUtc}))}(e.chapters)||n&&t?"livedvr":"vod"},At=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},Lt=function(e){var n=_t.get(e);if(n)return n;n={mapper:g(e,{timeMode:"vod"}),markers:null,chaptersConfig:{enable:!0},timeMode:"vod",live:!1,dvr:!1,disposed:!1},_t.set(e,n);var t=Me(e);return t&&(t.on("dispose",(function(){return Ft(e)})),t.one("loadeddata",(function(){n.disposed||Rt(e)}))),n},Rt=function(e){var n=_t.get(e),t=function(e){var n=_t.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=Me(e);return t&&At(t)?(n.markers=jt(e,{store:bt,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return Ut(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function Nt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Lt(e);bt.set(e,n);var r=Pt({live:t.live,dvr:t.dvr,chapters:n});return r!==t.timeMode&&(t.timeMode=r,t.mapper=g(e,{timeMode:r}),t.markers&&(t.markers.destroy(),t.markers=null)),Rt(e),Ct(e,St,{chapters:bt.get(e)}),!0}function Bt(e){var n=bt.get(e),t=_t.get(e);if(!t||!n.length)return n;var r=mt(t.mapper);try{return n.map((function(e){var n=ht(r,e);return It(It({},e),{},{offsetSeconds:n?n.seconds:null,offsetLabel:yt(n)})}))}catch(e){return n}}function Mt(e){bt.set(e,[]);var n=_t.get(e);return null!=n&&n.markers&&n.markers.render(),Ct(e,St,{chapters:[]}),!0}function Ut(e,n){var t,r,o=Me(e),i=Lt(e);if(!o)return!1;var l=bt.get(e).find((function(e){return e.segmentId===n}));if(!l)return!1;i.mapper.refreshAnchor();var a=i.mapper.chapterToPlayerTime(l);if(null==a||!Number.isFinite(a))return!1;var u=i.mapper.windowBounds(),s=u.start,c=u.end;return Number.isFinite(s)&&Number.isFinite(c)&&c>s&&(a=Math.min(Math.max(a,s),c-.1)),o.currentTime(a),null===(t=i.markers)||void 0===t||null===(r=t.setActiveBySegment)||void 0===r||r.call(t,n),!0}function Ft(e){var n=_t.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),_t.delete(e),bt.remove(e)}function Vt(e){var n,t,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Ke.getConfig();(null!=i&&null!==(n=i.chaptersConfig)&&void 0!==n&&n.enable||null!=i&&null!==(t=i.chapters)&&void 0!==t&&t.length)&&(function(e,n){var t,r=null===(t=Me(e))||void 0===t?void 0:t.el();if(r&&n){var o=function(e,n){null!=n&&""!==n&&r.style.setProperty(e,n)};o("--vl-chapter-color",n.markerColor),o("--vl-chapter-active",n.markerActiveColor),o("--vl-chapter-hover",n.markerHoverColor),o("--vl-chapter-size",null!=n.markerSize?"".concat(n.markerSize,"px"):null),o("--vl-chapter-opacity",null!=n.markerOpacity?String(n.markerOpacity):null),o("--vl-chapter-tooltip",n.tooltipColor)}}(e,null==i||null===(r=i.chaptersConfig)||void 0===r?void 0:r.style),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,o=n.live,i=void 0!==o&&o,l=n.dvr,a=void 0!==l&&l;n.res;var u=n.chaptersConfig,s=void 0===u?{}:u,c=Me(e);if(!c)return!1;Array.isArray(r)&&bt.set(e,r);var d=Pt({live:i,dvr:a,chapters:r}),v=_t.get(e);null!=v&&v.markers&&v.markers.destroy();var f={mapper:g(e,{timeMode:d}),markers:null,chaptersConfig:s||{},timeMode:d,live:i,dvr:a,disposed:!1};_t.set(e,f);var p=function(){f.disposed||Rt(e)};c.one("loadeddata",p),At(c)&&p(),c.on("dispose",(function(){return Ft(e)}))}(e,{chapters:(null==i?void 0:i.chapters)||[],live:(null==o?void 0:o.liveVideo)||!1,dvr:(null==o?void 0:o.isDvrEnabled)||!1,res:null==o?void 0:o.res,chaptersConfig:(null==i?void 0:i.chaptersConfig)||{}}))}var Ht=!1,zt=function(e,n){var t,r,o=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[o])||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!Ht){var i=Gt(e,"videoAssets","secondaryVideoAssets"),l=y(i,n);return l&&b(n,l),Ht=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function Gt(e,n,t){if(Array.isArray(e))return e.map((function(e){return Gt(e,n,t)}));if(null!==e&&"object"===We(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]=Gt(e[o],n,t)})),r}return e}function qt(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 Wt(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)?Wt(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 Wt(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 Kt(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 Yt(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var $t,Jt=function(e,n,t,r){var o,i,l,a,u,s=r.res,c=r.sres,d=Me(e),v=(null==s?void 0:s.contentType)||"video",f=(null==s||null===(o=s[v])||void 0===o?void 0:o.drmEnabled)||!1,p=!(null==s||null===(i=s[v])||void 0===i||null===(l=i.streamingInfo)||void 0===l||!l.isLiveStream)||"linearchannel"===v,h=(null==s||null===(a=s[v])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;w(s),k.set(s),d&&(Ye(e,{liveVideo:p,isDvrEnabled:h}),d.on("loadstart",(function(){p?t.resolve({status:!0,msg:"Video Loaded",response:s}):t.resolve(Yt({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:s}:{response:s}))})),d.on("loadeddata",(function(){var t,r,o,i,l=Ie(e);if(null==l||l.map((function(n){return _e(e,n.id)})),h&&"Safari"===ze())try{var a;null==d||null===(a=d.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==d||!d.muted())&&xn(e,sessionStorage.getItem("volume")||"100"),$e(e);var u=m();if(S(n),C(),null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.isExternal){var c=Yt(Yt({},n),s);E(d,c)}else if(null!=n&&n.watchHistory&&null!=n&&null!==(r=n.watchHistory)&&void 0!==r&&r.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var v,f,p=Yt(Yt({},n),s);O(e,p,null==u||null===(v=u.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=d&&d.mux){var g,y,b,w,k,T,D=(null===(g=m())||void 0===g?void 0:g.video)||(null==s?void 0:s.video),j=null==D?void 0:D.gist,x={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==D||null===(w=D.series)||void 0===w?void 0:w.title,video_stream_type:null!=D&&null!==(k=D.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==n||null===(T=n.analytics)||void 0===T?void 0:T.userId};d.mux({debug:!1,data:x})}})),d.textTracks().on("change",(function(n){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];Pe(e),d.trigger("subtitlechanged",t)})),d.tech_.on("retryplaylist",(function(){p&&zt(s,e)})),d.on("error",(function(){var n,r;(console.log("ERROR",d.error(),d.error().code),4===d.error().code&&p)?zt(s,e):(T(e,(null==d||null===(n=d.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==d||null===(r=d.error())||void 0===r?void 0:r.message)||"Some error occured",response:s}))})),d.one("play",(function(){var e,t,r,o,i;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(r=t.appcmsMain)||void 0===r||null===(o=r.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var l,a,u,s=null===(l=m())||void 0===l||null===(a=l.video)||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.id,c=j(),v=(null==c?void 0:c.get(s))||{t:0,p:0},f=v.t,p=v.p;f&&p<95&&D(d,f)}else{var h,g,y,b,w,k,S,C=null!==(h=null==n?void 0:n.watchHistoryResumeTime)&&void 0!==h?h:null==n||null===(g=n.watchHistory)||void 0===g?void 0:g.watchedTime,E=null!==(y=null!==(b=null==n?void 0:n.watchedPercentage)&&void 0!==b?b:null==n||null===(w=n.watchHistory)||void 0===w?void 0:w.watchedPercentage)&&void 0!==y?y:0,O=null!==(k=null==n||null===(S=n.watchHistory)||void 0===S?void 0:S.completionThreshold)&&void 0!==k?k:95;C&&E<O&&D(d,C)}if(null!=d&&d.dvrSeekbar)try{d.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}})),d.on("volumechange",(function(){var e=100*d.volume().toFixed(2);d.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),d.on("chromecastDisconnected",(function(){if(p){d.currentSource();for(var n=d.textTracks(),t=n.length-1;t>=0;t--)d.removeRemoteTextTrack(n[t])}var r=d.textTracks(),o=function(){return Ae(e)};o(),r.addEventListener("addtrack",o),setTimeout((function(){return r.removeEventListener("addtrack",o)}),15e3)})),d.one("loadeddata",(function(){var e,n=(null==d||null===(e=d.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"==We(d.dash)){var t,r,o,i=null==d||null===(t=d.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==i?void 0:i.find((function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")})),a=qt(n);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,c=[],v=qt(n);try{for(v.s();!(s=v.n()).done;){var p,m,h,g=s.value;("Chrome"==ze()||"Edge"==ze()&&(null!==(p=navigator)&&void 0!==p&&null!==(m=p.userAgent)&&void 0!==m&&m.includes("Macintosh")||!f))&&null!=g&&null!==(h=g.label)&&void 0!==h&&h.includes("5.1")?d.audioTracks().removeTrack(g):c.push(g)}}catch(e){v.e(e)}finally{v.f()}for(var y=c.find((function(e){return"main"===e.kind})),b=y||c.find((function(e){return e.enabled}))||c[0],w=0,k=c;w<k.length;w++){var S=k[w];S.enabled=S===b}}})))},Xt=(null===($t=r.time)||void 0===$t?void 0:$t.createTimeRanges)||r.createTimeRanges;function Qt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.scheduleStartDate,r=n.startOverTime;if(e&&(t||r)){var o,i=t?(o=t)>1e12?o/1e3:o:null,l=r>0?r:null,a=e.seekable.bind(e);e.seekable=function(){var e=a();if(!e||!e.length)return e;var n=e.start(0),t=e.end(e.length-1),r=Date.now()/1e3,o=1/0;if(null!=i&&(o=Math.min(o,r-i)),null!=l&&(o=Math.min(o,l)),!isFinite(o))return e;var u=o<=0?t:Math.max(n,t-o);return Xt(u,t)};e.on("seeking",(function(){var n=e.seekable();if(n&&n.length){var t=n.start(0);e.currentTime()<t-.5&&e.currentTime(t)}}))}}function Zt(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 er(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var nr="urn:x-cast:com.viewlift.player.caf",tr={eng:"en",spa:"es",esp:"es",cast:"es",fre:"fr",fra:"fr",ger:"de",deu:"de",por:"pt",ita:"it",dut:"nl",nld:"nl",chi:"zh",zho:"zh",cmn:"zh",yue:"zh",jpn:"ja",kor:"ko",ara:"ar",hin:"hi",rus:"ru",heb:"he",iw:"he",ind:"id",in:"id",fil:"tl",tgl:"tl",vie:"vi",tha:"th",tur:"tr",pol:"pl",swe:"sv",nor:"no",nob:"no",nb:"no",dan:"da",fin:"fi",gre:"el",ell:"el",cze:"cs",ces:"cs",ukr:"uk",rum:"ro",ron:"ro",hun:"hu",ben:"bn",tam:"ta",tel:"te",mal:"ml",kan:"kn",mar:"mr",pan:"pa",guj:"gu",urd:"ur"},rr=["und","mul","zxx"];function or(){try{return"true"===new URLSearchParams(window.location.search).get("castdebug")}catch(e){return!1}}function ir(){var e;or()&&(e=console).log.apply(e,arguments)}function lr(){var e;or()&&(e=console).warn.apply(e,arguments)}function ar(e){if(!e)return"";var n=String(e).trim().toLowerCase().replace(/_/g,"-").split("@")[0].split(".")[0].split("-").filter(Boolean),t=Qe(n),r=t[0],o=t.slice(1);return r?[tr[r]||r].concat(Xe(o)).join("-"):""}function ur(e){return ar(e).split("-")[0]}function sr(e){var n=ur(e);return!!n&&!rr.includes(n)}function cr(e,n){return sr(e)&&sr(n)&&ur(e)===ur(n)}function dr(e){return e?String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase():""}function vr(e,n){return!!e&&!!n&&dr(e)===dr(n)}function fr(e){return(null==e?void 0:e.language)||(null==e?void 0:e.lang)||""}function pr(e){return e?{language:fr(e)||void 0,label:e.label||void 0,roles:["captions"===e.kind?"caption":"subtitle"],forced:!!e.forced}:null}function mr(e){return e?{language:fr(e)||void 0,label:e.label||void 0}:null}function hr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(!n||!e.length)return null;for(var t=0,r=[function(e){return t=fr(e),r=n.language,sr(t)&&sr(r)&&ar(t)===ar(r);var t,r},function(e){return cr(fr(e),n.language)},function(e){return vr(e.label,n.label)}];t<r.length;t++){var o=r[t],i=e.filter(o);if(1===i.length)return i[0];if(i.length>1)return gr(i,n)}return null}function gr(e,n){var t=n.roles||[];return e.find((function(e){var n;return null===(n=e.roles)||void 0===n?void 0:n.some((function(e){return t.includes(e)}))}))||e[0]}var yr={textTracks:[],audioTracks:[],activeCaption:null,activeAudio:null};function br(e,n){if(!n)return null;var t=hr(e,n);return null!=(null==t?void 0:t.id)?{id:t.id}:n}function wr(e,n,t){if(!n)return!t;if(!t)return!1;var r=hr(e,t);return r&&null!=n.id?r.id===n.id:!!cr(fr(n),t.language)&&(!n.label||!t.label||vr(n.label,t.label))}function kr(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=function(){var e,n,t,r,o,i,l=null===(e=window)||void 0===e||null===(n=e.cast)||void 0===n?void 0:n.framework,a=null==l||null===(t=l.CastContext)||void 0===t||null===(r=t.getInstance)||void 0===r?void 0:r.call(t),u=null==a||null===(o=a.getCurrentSession)||void 0===o?void 0:o.call(a);return u&&"function"==typeof u.sendMessage?null!=l&&l.CastState&&(null===(i=a.getCastState)||void 0===i?void 0:i.call(a))!==l.CastState.CONNECTED?null:u:null}();if(t){var r=er(er({type:"COMMAND",source:"sender",command:e},n),{},{ts:Date.now()});ir("[Cast] ->",e,n);try{Promise.resolve(t.sendMessage(nr,r)).catch((function(n){return lr("[Cast] command failed",e,(null==n?void 0:n.message)||n)}))}catch(n){lr("[Cast] command failed",e,(null==n?void 0:n.message)||n)}}}var Sr=function(){return kr("play")},Cr=function(){return kr("pause")},Er=function(e){return kr("seek",{currentTime:e})},Or=function(e){return kr("setPlaybackRate",{rate:e})},Tr=function(e,n){return kr("setVolume",{volume:e,muted:n})},Dr=function(e){wr(yr.textTracks,yr.activeCaption,e)||kr("setCaption",{track:br(yr.textTracks,e)})},jr=function(e){e&&(wr(yr.audioTracks,yr.activeAudio,e)||kr("setAudio",{track:br(yr.audioTracks,e)}))};function xr(e){return e?e.tracks_||Array.from(e):[]}function Ir(e){var n;return xr(null===(n=e.textTracks)||void 0===n?void 0:n.call(e)).filter((function(e){return"captions"===e.kind||"subtitles"===e.kind}))}function _r(e){return"function"==typeof e.audioTracks?xr(e.audioTracks()):[]}function Pr(e){return Ir(e).find((function(e){return"showing"===e.mode}))||null}function Ar(e){return _r(e).find((function(e){return e.enabled}))||null}function Lr(e,n){var t=Ir(e),r=n?hr(t,n):null;n&&!r||t.forEach((function(e){e.mode=e===r?"showing":"disabled"}))}var Rr=null;var Nr=null;function Br(e,n){if("STATE"===n.type)return yr.textTracks=n.textTracks||[],yr.audioTracks=n.audioTracks||[],yr.activeCaption=n.activeCaption||null,yr.activeAudio=n.activeAudio||null,void function(){if(Nr&&(yr.textTracks.length||yr.audioTracks.length)){var e=Nr,n=e.caption,t=e.audio;Nr=null,Dr(n),jr(t)}}();if("LOG_STATUS"===n.type&&ir("[Cast] <- LOG_STATUS",n.type,n),"EVENT"===n.type)switch(ir("[Cast] <-",n.event,n),n.event){case"CaptionChanged":yr.activeCaption=n.activeCaption||null,Lr(e,yr.activeCaption);break;case"AudioChanged":yr.activeAudio=n.activeAudio||null,function(e,n){var t=n&&hr(_r(e),n);t&&!t.enabled&&(t.enabled=!0)}(e,yr.activeAudio);break;case"TracksChanged":yr.textTracks=[],yr.audioTracks=[];break;case"TrackUnresolved":lr("[Cast] receiver could not resolve track",n.kind,n.requested)}}var Mr=!1;function Ur(e){!function(e){var n,t,r,o,i,l,a=null===(n=window)||void 0===n||null===(t=n.cast)||void 0===t?void 0:t.framework,u=null==a||null===(r=a.CastContext)||void 0===r||null===(o=r.getInstance)||void 0===o?void 0:o.call(r);if(u){var s=function(n){n&&!n.__vlCastListening&&(n.__vlCastListening=!0,n.addMessageListener(nr,(function(n,t){try{var r="string"==typeof t?JSON.parse(t):t;"receiver"===(null==r?void 0:r.source)&&Br(e,r)}catch(e){lr("[Cast] could not handle receiver message",(null==e?void 0:e.message)||e,t)}})))};s(null===(i=u.getCurrentSession)||void 0===i?void 0:i.call(u)),!Mr&&null!=a&&null!==(l=a.CastContextEventType)&&void 0!==l&&l.SESSION_STATE_CHANGED&&(Mr=!0,u.addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,(function(){var e;return s(null===(e=u.getCurrentSession)||void 0===e?void 0:e.call(u))})))}}(e),e.addClass("vl-casting");var n=Pr(e);n&&(Rr=pr(n));var t=function(){return Lr(e,Rr)};e.one("loadeddata",(function(){return setTimeout(t,0)})),setTimeout(t,1500),function(e){var n=pr(Pr(e))||Rr,t=mr(Ar(e));ir("[Cast] syncing selected tracks",Nr={caption:n,audio:t}),kr("setCaption",{track:br(yr.textTracks,n)}),t&&kr("setAudio",{track:br(yr.audioTracks,t)})}(e)}function Fr(e){var n;if(e&&!e.__vlCastSyncBound){e.__vlCastSyncBound=!0,e.on("chromecastConnected",(function(){return Ur(e)})),e.on("chromecastDisconnected",(function(){e.removeClass("vl-casting"),yr.textTracks=[],yr.audioTracks=[],yr.activeCaption=null,yr.activeAudio=null,Nr=null}));var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:150,t=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(t),t=setTimeout((function(){return e.apply(void 0,o)}),n)}}((function(){return Tr(e.volume(),e.muted())}));e.on("play",(function(){return Sr()})),e.on("pause",(function(){return Cr()})),e.on("seeked",(function(){return Er(e.currentTime())})),e.on("volumechange",t),e.on("ratechange",(function(){return Or(e.playbackRate())})),e.on("texttrackchange",(function(){var n=pr(Pr(e));n&&(Rr=n),Dr(n)}));var r="function"==typeof e.audioTracks?e.audioTracks():null;null==r||null===(n=r.addEventListener)||void 0===n||n.call(r,"change",(function(){return jr(mr(Ar(e)))}))}}function Vr(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 Hr(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function zr(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 Gr(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)?Gr(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 Gr(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 qr={debug:5,info:4,warn:3,error:2,fatal:1,none:0,off:0,DEBUG:5,INFO:4,WARN:3,ERROR:2,FATAL:1,NONE:0,OFF:0},Wr=function(e){var n;if(e){var t=function(){var n,t="function"==typeof e.currentWidth&&e.currentWidth()||(null===(n=e.el())||void 0===n?void 0:n.clientWidth)||0;e.toggleClass("vlp-hide-pip",t<=500&&function(){var n,t=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);if(!t)return!1;for(var r=0;r<t.length;r++){var o,i=null===(o=t[r])||void 0===o?void 0:o.kind;if("captions"===i||"subtitles"===i)return!0}return!1}())};t(),e.on("playerresize",t),e.on("fullscreenchange",t);var r=null===(n=e.textTracks)||void 0===n?void 0:n.call(e);null!=r&&r.addEventListener&&(r.addEventListener("addtrack",t),r.addEventListener("removetrack",t),e.on("dispose",(function(){r.removeEventListener("addtrack",t),r.removeEventListener("removetrack",t)})))}};function Kr(e,n,t){var r=Ke.getConfig()||{};M(e,{status:t,message:"DRM ".concat(n," request failed")},"playback",{requestKind:n,videoId:null==r?void 0:r.videoId})}function Yr(e){try{if(null!=e&&e.__vlLicenseUrl)return e.__vlLicenseUrl;var n=null==e?void 0:e.keySystems;if(n)for(var t=0,r=Object.keys(n);t<r.length;t++){var o=n[r[t]];if("string"==typeof o)return o;if(null!=o&&o.url)return o.url;if(null!=o&&o.licenseUri)return o.licenseUri}var i=null==e?void 0:e.keySystemOptions;if(Array.isArray(i)){var l,a=zr(i);try{for(a.s();!(l=a.n()).done;){var u,s,c,d=l.value,v=(null==d||null===(u=d.options)||void 0===u?void 0:u.serverURL)||(null==d||null===(s=d.options)||void 0===s?void 0:s.licenseUri)||(null==d||null===(c=d.options)||void 0===c?void 0:c.url);if(v)return v}}catch(e){a.e(e)}finally{a.f()}}}catch(e){}return""}function $r(e){if(null!=e&&e.__vlDrmLicenseUrl)return e.__vlDrmLicenseUrl;try{return Yr("function"==typeof e.currentSource?e.currentSource():null)}catch(e){return""}}function Jr(e,n){n&&!n.__vlDrmDashHooksInstalled&&(n.__vlDrmDashHooksInstalled=!0,"function"==typeof n.addResponseInterceptor&&n.addResponseInterceptor((function(e){try{var n=(null==e?void 0:e.request)||{},t=(null==e?void 0:e.url)||(null==n?void 0:n.url)||"",r=U(t,(null==n?void 0:n.type)||(null==e?void 0:e.type));if(F(r)){var o=V(e,null);H(o)||Kr(t,r,o)}}catch(e){}return Promise.resolve(e)})),"function"==typeof n.registerLicenseRequestFilter&&n.registerLicenseRequestFilter((function(e){try{null!=e&&e.url&&(n.__vlLastLicenseUrl=e.url)}catch(e){}return Promise.resolve()})),"function"==typeof n.on&&n.on("public_licenseRequestComplete",(function(t){try{var r,o,i,l;if(null==t||!t.error)return;var a=null!==(r=null==t||null===(o=t.error)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.responseCode)&&void 0!==r?r:V(null,t.error);Kr((null==t||null===(l=t.data)||void 0===l?void 0:l.url)||n.__vlLastLicenseUrl||$r(e)||"","license",a)}catch(e){}})))}var Xr=!1,Qr=null,Zr=new Set;function eo(e){if(e&&!e.__vlDrmDashRegistered){e.__vlDrmDashRegistered=!0,Zr.add(e),e.__vlDrmDashEnabled=!0;var n=function(){e.__vlDrmDashRegistered&&(e.__vlDrmDashRegistered=!1,e.__vlDrmDashEnabled=!1,Zr.delete(e),function(){if(Xr&&!(Zr.size>0)){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.removeHook&&"function"==typeof Qr&&e.removeHook("beforeinitialize",Qr),Xr=!1,Qr=null}}())};"function"==typeof e.one?e.one("dispose",n):"function"==typeof e.on&&e.on("dispose",n)}}function no(e){if(e){eo(e),function(){if(!Xr){var e=null==r?void 0:r.Html5DashJS;e&&"function"==typeof e.hook&&(Qr=function(e,n){null!=e&&e.__vlDrmDashEnabled&&Jr(e,n)},Xr=!0,e.hook("beforeinitialize",Qr))}}(),function(e){e&&!e.__vlEmeDrmErrorInstalled&&(e.__vlEmeDrmErrorInstalled=!0,e.on("error",(function(){try{var n,t="function"==typeof e.error?e.error():null;if(!t||!B(t))return;if(null!=e&&null!==(n=e.dash)&&void 0!==n&&n.mediaPlayer)return;Kr($r(e),"license",null)}catch(e){}})))}(e);var n=function(){var n;!function(e){var n,t,r=null==e||null===(n=e.tech_)||void 0===n||null===(t=n.vhs)||void 0===t?void 0:t.xhr;r&&"function"==typeof r.onResponse&&!e.__vlDrmVhsHooksInstalled&&(e.__vlDrmVhsHooksInstalled=!0,r.onResponse((function(e,n,t){try{var r=function(e){return(null==e?void 0:e.uri)||(null==e?void 0:e.url)||(null==e?void 0:e.src)||""}(e),o=U(r,null==e?void 0:e.type);if(!F(o))return;var i=V(t,n);H(i)&&!n||Kr(r,o,i)}catch(e){}})))}(e),Jr(e,null==e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer)};n(),e.on("xhr-hooks-ready",n),e.on("loadstart",(function(){setTimeout(n,0)}))}}var to=function(o,i,l,a){var u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,O,D,j,B,M,U,F,V,H,z,G,q,W,K,Y,$,J,X,Q,Z,ee,ne,te,re=i.res,oe=void 0===re?null:re,ie=i.sres,le=void 0===ie?null:ie,ae=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||""),r=t.get("loglevel")||null;return{playerDebug:"true"===t.get("playerdebug"),logLevel:r,dashLogLevel:null!=r&&null!=qr[r]?qr[r]:5}}catch(e){return{playerDebug:!1,logLevel:null,dashLogLevel:5}}}(),ue=ae.playerDebug,se=ae.logLevel,ce=ae.dashLogLevel;ue&&(console.log("[PLAYER DEBUG] config:",l),console.log("[PLAYER DEBUG] entitlement (res):",oe),le&&console.log("[PLAYER DEBUG] series response (sres):",le));var de=null!=l&&l.chromecastReceiverId?["chromecast","html5"]:["html5"],ve=(null===(u=oe)||void 0===u?void 0:u.contentType)||"video",fe=Ve(null===(s=oe)||void 0===s||null===(c=s[ve])||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.videoImageUrl)||Ve(null===(v=oe)||void 0===v||null===(f=v[ve])||void 0===f||null===(p=f.gist)||void 0===p||null===(m=p.imageGist)||void 0===m?void 0:m.r16x9),pe=(null===(h=oe)||void 0===h||null===(g=h[ve])||void 0===g||null===(w=g.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,me=!(null===(k=oe)||void 0===k||null===(S=k[ve])||void 0===S||null===(C=S.streamingInfo)||void 0===C||!C.isLiveStream)||"linearchannel"===ve,he=(null===(E=oe)||void 0===E||null===(O=E.ads)||void 0===O||null===(D=O.preRoll)||void 0===D||null===(j=D.adTags)||void 0===j||null===(B=j.web)||void 0===B?void 0:B.active)&&(null===(M=oe)||void 0===M||null===(U=M.ads)||void 0===U||null===(F=U.preRoll)||void 0===F||null===(V=F.adTags)||void 0===V||null===(H=V.web)||void 0===H?void 0:H.url);oe=Hr(Hr({},oe),{},{audioAssetSource:null==l?void 0:l.audioAssetSource});var ge=(null==l||null===(z=l.customData)||void 0===z?void 0:z.ads)||{},ye=(null===(G=oe)||void 0===G||null===(q=G[ve])||void 0===q?void 0:q.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==ge?void 0:ge.vodAdSticherProvider)||!1,be=!(null===(W=oe)||void 0===W||null===(K=W[ve])||void 0===K||!K.isSSAIEnabled)&&"TRANSMIT"==(null==ge?void 0:ge.liveAdSticherProvider)&&!(null==ge||!ge.liveAdClientSideTracking),we=(null==l?void 0:l.latency)||6,ke=(null==l?void 0:l.skin_settings)||{},Se=(ne={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==ke?void 0:ke.pictureInPictureToggle)||!1},playbackRates:null!=ke&&ke.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==l.skin,liveui:pe},e(ne,"autoplay",null==l?void 0:l.autoplay),e(ne,"normalizeAutoplay",(null==l?void 0:l.autoplay)&&!he),e(ne,"loop",(null==l?void 0:l.loop)||!1),e(ne,"audioPosterMode",null==l?void 0:l.audioPosterMode),e(ne,"html5",Hr(Hr({dash:Hr(Hr({},!r.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:Hr(Hr({},((null==l?void 0:l.debugConfig)&&(null==l||null===(Y=l.debugConfig)||void 0===Y?void 0:Y.enable)||ue)&&{debug:{logLevel:ce}}),{},{streaming:{parseInbandPrft:!0,delay:{liveDelay:we},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Hr({},"IE"==ze()&&{enableStallFix:!0,stallSeek:1}),abr:Hr(Hr(Hr(Hr({},(null==l?void 0:l.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==l?void 0:l.initialBandwidth)/1e3}}),(null==l?void 0:l.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==l?void 0:l.maxBitrate)/1e3}}),(null==l?void 0:l.minBitrate)&&{minBitrate:{audio:-1,video:(null==l?void 0:l.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}})}),vhs:Hr(Hr(Hr({},(null==l?void 0:l.initialBandwidth)&&{bandwidth:l.initialBandwidth}),{},{liveRangeSafeTimeDelta:we,useDevicePixelRatio:!0,experimentalLLHLS:(null==l?void 0:l.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==l||!l.initialBandwidth},(null==l||null===($=l.customData)||void 0===$?void 0:$.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(J=null==l?void 0:l.enableLowInitialPlaylist)&&void 0!==J&&J},((null==l?void 0:l.debugConfig)&&(null==l||null===(X=l.debugConfig)||void 0===X?void 0:X.enable)||ue)&&{debug:!0}),debug:(null==l?void 0:l.debugConfig)&&(null==l||null===(Q=l.debugConfig)||void 0===Q?void 0:Q.enable)||ue||!1,nativeTextTracks:"Safari"==ze()},0==(null==l||null===(Z=l.customData)||void 0===Z?void 0:Z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(ee=l.customData)||void 0===ee?void 0:ee.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(ne,"poster",fe),e(ne,"techOrder",de),e(ne,"chromecast",{requestCustomDataFn:function(e){var n,t,r=Me(o),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,h,g,y,b,w,k,S;p.isDrmEnabled=!0;var C=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==C?void 0:C.url)||(null==n||null===(h=n.keySystemOptions)||void 0===h||null===(g=h[0])||void 0===g||null===(y=g.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=E;var O=(null==C?void 0:C.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=O}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 D=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=D;var j=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=j;var x,I,_=null==e||null===(s=e[f])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=_,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,void 0!==("undefined"==typeof window?"undefined":We(window))&&(p.siteId=(null===(x=window)||void 0===x?void 0:x.siteId)||null,p.userId=(null===(I=window)||void 0===I?void 0:I.sessionStorage)&&window.sessionStorage.getItem("uid")||null),console.log(p),p}(oe,e,i),u=i.find((function(e){return"showing"===e.mode}))||null;return Rr=pr(u),Hr(Hr({},a),{},{activeCaption:{enabled:!!u,language:(null==u?void 0:u.language)||(null==u?void 0:u.lang)||null,label:(null==u?void 0:u.label)||null},transmitTrackingUrl:x.get()||null,convivaMetaData:Hr({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},st.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=Me(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=oe)||void 0===n||null===(t=n[ve])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),ne);if(!r.getPlayers()[o]){(null!=l&&l.debugConfig&&null!=l&&null!==(te=l.debugConfig)&&void 0!==te&&te.enable||ue)&&r.log.level(se||"debug");var Ce=r(o,Se,function(){var e=n(t.mark((function e(){var n,i,u,s,c,d,v,f,p,m,h,g,w,k,S,C,E,O,D,j,x,B,M,U,F,V;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return no(Ce),Wr(Ce),console.log(Ce),console.log(r.VERSION),console.log(r.getPlugins()),e.next=7,Gn(l,oe);case 7:if(null!=l&&l.debugConfig&&null!=l&&null!==(n=l.debugConfig)&&void 0!==n&&n.enable||ue){try{r.log.level(se||"debug")}catch(e){}(C=function(){try{var e,n,t;null==Ce||null===(e=Ce.dash)||void 0===e||null===(n=e.mediaPlayer)||void 0===n||null===(t=n.updateSettings)||void 0===t||t.call(n,{debug:{logLevel:ce}})}catch(e){}})(),Ce.one("loadedmetadata",C)}if(E=null===(i=oe)||void 0===i||null===(u=i[ve])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.startOverTime,null!=l&&l.disableControls||Vt(o,{liveVideo:me,isDvrEnabled:pe,res:oe}),me&&a.resolve(Hr({status:!0,msg:"Player Initialised"},le?{seriesResponse:le,response:oe}:{response:oe})),P(o,{content:oe,analyticsCb:null==l?void 0:l.analyticsCb,analyticsEventParams:null==l?void 0:l.analyticsEventParams,userId:null==l?void 0:l.userId}),ut(o,l),Fr(Ce),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),pe&&Pn(o,E),!he||null!=l&&null!==(c=l.customData)&&void 0!==c&&c.disableAds||A(o,he,oe),null!=l&&l.disableControls||L(o,{config:l,content:oe,liveVideo:me,isDvrEnabled:pe}),O=y(oe,o),console.log(O),ue&&(console.log("[PLAYER DEBUG] source:",O),console.log("[PLAYER DEBUG] videojs options:",Se)),null!=l&&l.nearestClusterUrl&&(O=R(O,l.nearestClusterUrl)),!ye){e.next=28;break}return e.next=25,N(o,oe);case 25:O=e.sent,e.next=32;break;case 28:if(!be){e.next=32;break}return e.next=31,_(O,oe,o);case 31:O=e.sent;case 32:Ce&&(Ce.__vlDrmLicenseUrl=Yr(O)),O?b(o,O):(a.reject({status:!1,msg:"Incompatible / Missing Source",response:oe}),T(o,"Incompatible / Missing Source")),D=null===(d=oe)||void 0===d||null===(v=d[ve])||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleStartDate,me&&pe&&(D||E)&&Qt(Ce,{scheduleStartDate:D,startOverTime:E}),((null===(p=oe)||void 0===p||null===(m=p[ve])||void 0===m||null===(h=m.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(w=oe)||void 0===w||null===(k=w[ve])||void 0===k||null===(S=k.closedCaptions)||void 0===S?void 0:S.length)>0)&&(V=(null===(x=oe)||void 0===x||null===(B=x[ve])||void 0===B||null===(M=B.contentDetails)||void 0===M?void 0:M.closedCaptions)||(null===(U=oe)||void 0===U||null===(F=U[ve])||void 0===F?void 0:F.closedCaptions),j=V.filter((function(e){return"VTT"===e.format})),Le(o,j)),null!=l&&l.disableControls?I(o):ct(o,Hr(Hr(Hr({},l),Se),{},{liveVideo:me,isDvrEnabled:pe,res:oe,sres:le})),Jt(o,Hr(Hr(Hr({},l),Se),{},{liveVideo:me}),a,{res:oe,sres:le});case 39:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())}};function ro(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 oo(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ro(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ro(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}var io=function(e,n){var t=n.resolve,r=n.reject,o=null==e?void 0:e.playerId,i=lo(e);to(o,{res:i},e,{resolve:t,reject:r})},lo=function(e){var n,t,r,o,i,l,a,u,s,c,d,v,f,p,m,h=null==e?void 0:e.streamingInfo,g=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,y=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,b=(null==e||null===(r=e.streamingInfo)||void 0===r||null===(o=r.ads)||void 0===o?void 0:o.url)||null,w=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,k=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],S=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(u=a.videoAssets)||void 0===u?void 0:u.drmProvider)||null,C=(null==e||null===(s=e.streamingInfo)||void 0===s?void 0:s.macroMap)||[],E=(null==e||null===(c=e.customData)||void 0===c||null===(d=c.ads)||void 0===d?void 0:d.isSSAIEnabled)||!1,O=(null==e||null===(v=e.streamingInfo)||void 0===v?void 0:v.scheduleStartDate)||null,T=(null==e||null===(f=e.streamingInfo)||void 0===f?void 0:f.startOverTime)||null,D=null==e?void 0:e.token,j=z(D);null==j||j.site;var x=null==j?void 0:j.siteId,I=(null==e||null===(p=e.customData)||void 0===p||null===(m=p.comscore)||void 0===m?void 0:m.video)||null,_=oo(oo({id:x?"".concat(x,"_external"):"external"},!y&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:oo(oo(oo(oo(oo({drmEnabled:y,streamingInfo:oo(oo({videoAssets:oo(oo({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==h?void 0:h.isDvrEnabled)&&{isLiveStream:!0}),(null==I?void 0:I.isLiveStream)&&{isLiveStream:null==I?void 0:I.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:C,liveDetails:oo({isDvrEnabled:null==h?void 0:h.isDvrEnabled},T&&{startOverTime:T}),gist:oo(oo(oo(oo({},w&&{videoImageUrl:w}),O&&{scheduleStartDate:O}),(null==I?void 0:I.videoId)&&{id:null==I?void 0:I.videoId}),(null==I?void 0:I.videoTitle)&&{title:null==I?void 0:I.videoTitle}),contentDetails:oo({},(null==k?void 0:k.length)>0&&{closedCaptions:Xe(k)})},(null==I?void 0:I.runtime)&&{runtime:null==I?void 0:I.runtime}),(null==I?void 0:I.publishDate)&&{publishDate:null==I?void 0:I.publishDate}),(null==I?void 0:I.platform)&&{platform:null==I?void 0:I.platform}),(null==I?void 0:I.series)&&{series:null==I?void 0:I.series}),ads:{preRoll:{adTags:{web:oo(oo({},b&&{active:!0}),b&&{url:b})}}}});return I&&(null!=I&&I.isDvrEnabled&&(_.video.liveDetails=oo(oo({},_.video.liveDetails),{},{isDvrEnabled:null==I?void 0:I.isDvrEnabled})),null!=I&&I.metadata&&(_.video.metadata=[].concat(Xe(_.video.metadata),Xe(null==I?void 0:I.metadata)))),_},ao=function(){try{var e,n,t=new URLSearchParams((null===(e=window)||void 0===e||null===(n=e.location)||void 0===n?void 0:n.search)||"");return t.has("ssaiDisable")?t.get("ssaiDisable"):null}catch(e){return null}};function uo(e,n){return so.apply(this,arguments)}function so(){return(so=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d,v,f;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,u=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,c=!(null==n||!n.anonymousId),e.next=6,Y();case 6:d=e.sent,v=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),null!==(f=ao())&&(v="true"===f),G(u,d,v).then((function(e){var t,r,o,i,v,f,p,m,h,g,y;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(null==e?void 0:e.data);var b=null==e||null===(i=e.data)||void 0===i||null===(v=i.video)||void 0===v||null===(f=v.gist)||void 0===f?void 0:f.scheduleEndDate,k=null==e||null===(p=e.data)||void 0===p||null===(m=p.video)||void 0===m||null===(h=m.gist)||void 0===h?void 0:h.scheduleStartDate;be(s,{scheduleEndDate:b,scheduleStartDate:k});var S=null==e?void 0:e.data;if(null!=n&&null!==(g=n.watchHistory)&&void 0!==g&&g.isExternal)S.contentType="video",to(s,{res:S},n,{resolve:l,reject:a});else if(null!=n&&n.watchHistory&&null!=n&&null!==(y=n.watchHistory)&&void 0!==y&&y.enable&&!c){var C;if((null===(C=n.watchHistory)||void 0===C?void 0:C.saveOffline)||!1){var E,O,T,D=(null===(E=n.watchHistory)||void 0===E?void 0:E.profileId)||"",j=q(D,u,null==n?void 0:n.siteOwner);if(j&&j.length)n.watchHistoryResumeTime=(null===(O=j[0])||void 0===O?void 0:O.watchedTime)||null,n.watchedPercentage=(null===(T=j[0])||void 0===T?void 0:T.watchedPercentage)||null;S.contentType="video",to(s,{res:S},n,{resolve:l,reject:a})}else W(u,d).then((function(e){var t,r,o,i,l,a;null!==(t=window)&&void 0!==t&&null!==(r=t.watchHistory)&&void 0!==r&&r.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"})).catch((function(){})).finally((function(){to(s,{res:S},n,{resolve:l,reject:a})}))}else to(s,{res:S},n,{resolve:l,reject:a})})).catch((function(e){var t,r,o=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,i=(null==n||null===(r=n.event)||void 0===r?void 0:r.onCountdownComplete)||null;o&&we(s,e,i),K(e,s,a,u)}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function co(e,n){return vo.apply(this,arguments)}function vo(){return(vo=n(t.mark((function e(n,r){var o,i,l,a,u,s,c,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=r.resolve,a=r.reject,e.next=3,Y();case 3:u=e.sent,s=null==n?void 0:n.playerId,c=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),$(c,u,d).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==c?void 0:c.channelId,w(t),to(s,{res:t},n,{resolve:l,reject:a})})).catch((function(e){K(e,s,a,videoId)}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fo(e,n){return po.apply(this,arguments)}function po(){return(po=n(t.mark((function e(n,r){var o,i,l,a,u,s,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.resolve,l=r.reject,e.next=3,Y();case 3:a=e.sent,u=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,Q.set(parseInt(s)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,J(c,a).then((function(e){var t,r,o,s=e.data,d=e.data.seasons;Z(d);var v=videoId||(null==d||null===(t=d[0])||void 0===t||null===(r=t.episodes)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.id);X(c,a),G(v,a).then((function(e){var t,r,o;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(r=t.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,w(e.data),to(u,{res:null==e?void 0:e.data,sres:s},n,{resolve:i,reject:l})})).catch((function(e){K(e,u,l,videoId)}))})).catch((function(e){K(e,u,l)}));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mo,ho=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,o=e.sseEndpoint,i=e.debug;if(n){var l=function(e){var n=e.site,t=e.sseBaseUrl,r=e.sseEndpoint,o=e.debug,i=void 0!==o&&o;return Ze({site:n,sseBaseUrl:t,getToken:Y,sseEndpoint:r,onOpen:function(e){var n=e.userId,t=e.endpoint;i&&console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,r,o,l,a,u,s,c,d;if(i&&console.log("SSE Message:",e),(null===(n=m())||void 0===n||null===(t=n.video)||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.id)===(null==e||null===(o=e.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var v=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(a=l.states)||void 0===a||null===(u=a.live)||void 0===u?void 0:u.startDateTime),f=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(c=s.states)||void 0===c||null===(d=c.end)||void 0===d?void 0:d.endDateTime);v&&f&&(console.log("Setting schedule timer",v,f),ke.set({startDateTime:v,endDateTime:f}))}},onReconnectAttempt:function(e){i&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;i&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){i&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){i&&console.error("SSE Error:",e,n)},onClose:function(){i&&console.log("SSE Closed")}})}({site:t,sseBaseUrl:r,sseEndpoint:o,debug:void 0!==i&&i});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=o,l}};function go(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 yo(n){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?go(Object(r),!0).forEach((function(t){e(n,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):go(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function bo(){return{loadVideoInstantly:ee,onTimeUpdate:Se,getVideoDuration:Ce,onVideoEnded:Ee,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=n(t.mark((function n(r,o){var i,l,a,u,s,c,d,v,f,p,m,h,g,y,b,w,k,S,C,E,O,T,D,j,x,I,_,P,A,L,R;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!ie(null==e?void 0:e.playerId)){n.next=3;break}return r({status:!0,msg:"Player already initialised",skipped:!0}),n.abrupt("return");case 3:if(S=(null==e?void 0:e.videoSourceUrl)||!1,C=null==e?void 0:e.asat,E=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,O=null==e?void 0:e.videoId,T=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,D=(null==e?void 0:e.streamingInfo)||!1,window.videoId=O,j=null==e?void 0:e.token,!me(e)){n.next=18;break}if(sessionStorage.setItem("vlp_token",j),he().set(null==e?void 0:e.refreshToken),j&&!ge(j)){n.next=17;break}return o({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),n.abrupt("return");case 17:mo=JSON.parse(atob(j.split(".")[1]));case 18:return window.siteName=null===(a=mo)||void 0===a?void 0:a.site,window.siteId=null===(u=mo)||void 0===u?void 0:u.siteId,e.isAnonymousUser=!(null===(s=mo)||void 0===s||!s.anonymousId),e.siteOwner=(null===(c=mo)||void 0===c?void 0:c.site)||null,e.userId=(null===(d=mo)||void 0===d?void 0:d.userId)||null,fe((null===(v=mo)||void 0===v?void 0:v.userId)||(null===(f=mo)||void 0===f?void 0:f.anonymousId)||null),window.watchHistory=e.watchHistory||null,x=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,I=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,(_=null==e?void 0:e.errors)&&(window.customErrors=_),window.customData=null==e?void 0:e.customData,Ge(qe(e)),pe.set(e.apiBaseUrl),null!=e&&e.skin&&!He(e.skin)||(e.skin="VL_ONE"),Ke.setConfig(e),en.reset(),en.set(null==e?void 0:e.relatedVideos),n.next=39,Fn(e);case 39:I&&Dn("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then((function(){return ye(I)})).catch((function(e){})),(P=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(x)))&&P.addEventListener("contextmenu",(function(e){return e.preventDefault()})),(A=ho({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(y=e.sse)||void 0===y?void 0:y.siteName,sseBaseUrl:null==e||null===(b=e.sse)||void 0===b?void 0:b.sseBaseUrl,sseEndpoint:null==e||null===(w=e.sse)||void 0===w?void 0:w.sseEndpoint,debug:null==e||null===(k=e.sse)||void 0===k?void 0:k.debug}))&&!A.isConnectionActive()&&A.connect(),S?(R={directPlaybackUrl:S,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}},C?G(L,j).then((function(n){var t,i=(null==n?void 0:n.data)||{},l=yo(yo(yo({},i),R),{},{video:yo(yo({},null==i?void 0:i.video),{},{liveDetails:yo(yo({},null==i||null===(t=i.video)||void 0===t?void 0:t.liveDetails),{},{isDvrEnabled:!(null==e||!e.isDvr)})})});to(x,{res:l},e,{resolve:r,reject:o})})).catch((function(e){K(e,x,o,L)})):to(x,{res:yo(yo({},R),{},{video:{liveDetails:{isDvrEnabled:!(null==e||!e.isDvr)}}})},e,{resolve:r,reject:o})):D?io(e,{resolve:r,reject:o}):T?fo(e,{resolve:r,reject:o}):E?co(e,{resolve:r,reject:o}):uo(e,{resolve:r,reject:o});case 45:case"end":return n.stop()}}),n)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:Ne,skip:ne,getPlayer:Me,play:te,pause:re,detectBrowser:ze,rewind:oe,loadVideo:b,seekToTimeStamp:Oe,isPlayerInitialised:ie,load:le,authenticateLC:ae,dispose:ue,enableCaptions:Re,disableCaptions:_e,getCaptions:Ie,playSelectedResolution:Be,getSource:y,setVolume:xn,getVolume:In,disableControls:I,setPlaybackSpeed:Te,getEntitlementData:se,getSsaiEvents:ce,getPlayerControlEvents:Je,playerEvents:De,onReplay:je,relatedVideosManager:en,setChapters:Nt,getChapters:Bt,clearChapters:Mt,seekToChapter:Ut,getChapterEvents:Et,onWatchInVerticalView:xe,fireBeaconEvent:de,getDvrManager:ve}}export{bo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/typeof";function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function o(r){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?t(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var n={},i=!1,a=function(e){return!!e&&"object"===r(e)&&!Array.isArray(e)},l=function(e){a(e)&&(n=e)},c=function(e){var r,t=a(null==e?void 0:e.localisation)?e.localisation:{},n=a(null==e||null===(r=e.customData)||void 0===r?void 0:r.localisation)?e.customData.localisation:null;return n&&!i&&(i=!0,console.warn("[player] `customData.localisation` is deprecated and will be removed in a future version. Use the root-level `localisation` config instead.")),o(o({},n||{}),t)},s=function(e){var r;return(null===(r=n)||void 0===r?void 0:r[e])||""};export{s as g,c as r,l as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,g as i,j as l}from"./icons-f9c8be77.js";import{Y as c,U as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,g as i,j as l}from"./icons-f9c8be77.js";import{Y as c,U as m}from"./generic-759b1422.js";import{j as d,g as p}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-f011a7d4.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var h=n.getComponent("Component"),v=function(){r(b,h);var v,f,y=(v=b,f=u(),function(){var e,t=a(v);if(f){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function b(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(r=y.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(b,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.style.overflow="hidden",n.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=n.dom.createEl("div",{className:"stream-selector-head"}),a=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),u=n.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,o=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(o.classList.add("selected"),o.style.border="4px solid #D2393B"),o.onclick=function(){for(var r=n.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");o.classList.add("selected"),o.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},o.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",o.append(a),n.dom.appendContent(u,o),n.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);n.dom.appendContent(o,a),n.dom.appendContent(o,s),n.dom.appendContent(e,o),n.dom.appendContent(e,d),p(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),b}();export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{i as n,g as i,j as l}from"./icons-f9c8be77.js";import{Y as c,U as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{i as n,g as i,j as l}from"./icons-f9c8be77.js";import{Y as c,U as m}from"./generic-759b1422.js";import{j as d,s as p,l as u}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-f011a7d4.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){r(g,h);var f,b,y=(f=g,b=v(),function(){var e,t=a(f);if(b){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function g(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(r=y.call(this,t,o)).playerId=o.playerId,r.seriesData=o.sres,r.streams=o.streams,r.currentVideoData=o.res,r.initialiseStructure(),r.loadCSS(),r}return t(g,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var o;null!==(o=r.classList)&&void 0!==o&&o.contains("hidden")?(d(),r.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var a=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(a,"px"),o.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),o=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=function(e){var r,o,a,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},h=0;h<this.streams.length;h++)v(h);s.dom.appendContent(o,a),s.dom.appendContent(o,n),s.dom.appendContent(e,o),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-f9c8be77.js";import{Y as s,s as a}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-f9c8be77.js";import{Y as s,s as a}from"./generic-759b1422.js";import{f as d}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-f011a7d4.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var m=r.getComponent("Component"),u=function(){n(u,m);var s,a,d=(s=u,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function u(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(u,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),u}(),c=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),m=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=m&&m.firstChild;)null==p||p.appendChild(m.firstChild)};export{u as default,c as initaliseFunctionality};
|