@viewlift/player-backup 1.0.80-backup → 1.0.81-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.
Files changed (39) hide show
  1. package/cjs/bundle.css +1 -1
  2. package/cjs/{features-2f8822d4.js → features-94df81e1.js} +1 -1
  3. package/cjs/index.js +1 -1
  4. package/cjs/renditions-9b769f53.js +1 -0
  5. package/cjs/{settings-icon-3e0891d7.js → settings-icon-59063e71.js} +1 -1
  6. package/cjs/{skin-107e895b.js → skin-3e2cff66.js} +1 -1
  7. package/cjs/{skin-e1f9c4b2.js → skin-9d1601c5.js} +1 -1
  8. package/cjs/{skin-b6ba1069.js → skin-d36eddc4.js} +1 -1
  9. package/cjs/{skin-600727fb.js → skin-dae71c0f.js} +1 -1
  10. package/esm/autoNextVideo-984c1cc4.js +1 -0
  11. package/esm/bundle.css +1 -1
  12. package/esm/caption-settings-57b1d2d0.js +1 -0
  13. package/esm/{features-dd1bc507.js → features-27b2b817.js} +1 -1
  14. package/esm/{generic-0b03b2d2.js → generic-a2327106.js} +1 -1
  15. package/esm/index.js +1 -1
  16. package/esm/{keyboardShortcuts-a1be9713.js → keyboardShortcuts-3cd063c0.js} +1 -1
  17. package/esm/{multicam-bd3a1e95.js → multicam-f1c7354a.js} +1 -1
  18. package/esm/{multicamv2-d26a19fd.js → multicamv2-2e0721d3.js} +1 -1
  19. package/esm/{mwebPotraitTray-bb8b8711.js → mwebPotraitTray-b20aad9e.js} +1 -1
  20. package/esm/{nextEpisodeButton-5deea9bd.js → nextEpisodeButton-3f1ad2d5.js} +1 -1
  21. package/esm/{playlist-41911459.js → playlist-8e3ff2d6.js} +1 -1
  22. package/esm/renditions-6634adfc.js +1 -0
  23. package/esm/{resolution-43df1d9f.js → resolution-3952a107.js} +1 -1
  24. package/esm/{series-3ad27fd8.js → series-815daac7.js} +1 -1
  25. package/esm/{series-v2-76d42c36.js → series-v2-e7388e7e.js} +1 -1
  26. package/esm/settings-icon-acc517ce.js +1 -0
  27. package/esm/{skin-4c36dbe8.js → skin-10d07f80.js} +1 -1
  28. package/esm/{skin-9af225d9.js → skin-52929ab8.js} +1 -1
  29. package/esm/{skin-0c3a01c2.js → skin-abc83110.js} +1 -1
  30. package/esm/{skin-915d6363.js → skin-c46b6cc8.js} +1 -1
  31. package/esm/{skin-146afbd6.js → skin-f334e148.js} +1 -1
  32. package/esm/{util-c6c13f38.js → util-b5ab1ff5.js} +1 -1
  33. package/esm/{videoSelector-d6210a73.js → videoSelector-42eb5c09.js} +1 -1
  34. package/package.json +1 -1
  35. package/cjs/renditions-b4349953.js +0 -1
  36. package/esm/autoNextVideo-86221d1c.js +0 -1
  37. package/esm/caption-settings-2bf9d568.js +0 -1
  38. package/esm/renditions-4b8a69ba.js +0 -1
  39. package/esm/settings-icon-685ead4d.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import"js-cookie";import r from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var a={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function u(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var s={name:"@viewlift/player",version:"1.0.85",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:_(),params:u({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":s.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+a.getLinearChannelDetails,params:u(u(u(u(u({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},p=function(){var e=n(t.mark((function e(n,o){var r,l;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return l={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:T(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:h(),method:"POST",headers:{Authorization:r},data:u({},n),params:u({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),f=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(n.split(".")[1])),u=(null==d?void 0:d.site)||null;return i({method:"GET",url:y(e),params:{site:u},headers:{Authorization:n,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:w(e,v),headers:{Authorization:n,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},g=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:I(o),headers:{Authorization:e.token},timeout:15e3})},I=function(e){return b()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},y=function(e){return b()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},w=function(e,n){return b()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(n,"/").concat(e)},T=function(){return b()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},_=function(){return b()+"".concat(null==a?void 0:a.getVideoDetails)},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},D=null;function V(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var L,S,C,A,W,F=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=V().get(),o=b(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),k=null,R=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=6;break}return k||(k=F().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&V().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){k=null}))),e.abrupt("return",k);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(e){S=e},P=function(){return S},x=function(e){L=e},j=function(){return L},B=function(){return C},U=function(e){C=e},H=function(e){W=e},M=function(){return W},z=function(e){A=new Map,e.map((function(e,n){A.set(e.id,n)}))},G=function(e){if(A){var n=A.get(e);U(n+1)}},Y=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},q=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var X=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?J(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):J(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var Q=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Z=function(e){var n=$(e,"video.tags",[]),t=$(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},$=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},ee=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ne=function(){var e,n,t,o,i,r,l,a,d,u,s,c,v,m,p,f,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,T=Fe(I);if(!g.includes("VIEWLIFT_"))return g;var h=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(h.getPropertyValue("height").slice(0,-2)),b=Math.trunc(h.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(n=E.linearchannel)||void 0===n||null===(t=n.channels)||void 0===t||null===(o=t.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.id)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:$(E,"video.gist.id",""),D=K(K({},te(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:Q(b,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:$(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==T||null===(l=T.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==T||null===(a=T.options_)||void 0===a?void 0:a.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:Z(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI($(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+$(E,"video.gist.permalink","")),VIEWLIFT_COPPA:$(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.site)||void 0===s?void 0:s.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:$(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:$(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:$(E,"video.series[0].gist.title",$(E,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:$(E,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:$(E,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:$(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f?void 0:f.macros);for(var V in D){var L=new RegExp("\\b("+V+")\\b","g");g=g.replace(L,D[V])}return g},te=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(ee()?u?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=ee()?K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=ee()?K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},oe=function(e,n){var t,o,i,r,l,a,d,u,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[f])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.videoSourceUrl)return null==e?void 0:e.videoSourceUrl;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return re(E);if(g){var T=le(I,n);return T.src=ne(T.src,n,e),T}if("Safari"!==X()&&w)return ie(I);if(y){var h=re(I);return h.src=ne(h.src,n,e),h}if(null!=I&&I.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return _.src=ne(_.src,n,e),_}return null},ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},re=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},le=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,l=X();if(Fe(n),"Safari"===l){var a=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);return ae(n),a}var d,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(ae(n),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var ae=function(e){var n=Fe(e);if("function"==typeof n.eme)try{n.eme()}catch(e){console.log("EME ERROR :",e)}},de=function(e,n){var t,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(t=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===t||null===(o=t[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=Fe(e).textTracks(),l=0;l<r.length;l++){var a=r[l];"subtitles"!==a.kind&&"captions"!==a.kind||a.id!=n||(a.mode="showing")}},ue=function(e,n){for(var t=Fe(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},se=function(e){var n,t=Fe(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},ce=function(e){var n=Fe(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},ve=function(e,n){var t=Fe(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},me=!1,pe=function(e,n,t){var o=ne(n,e,t),i=Fe(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r,l,a,d,u=Fe(e);if(null!==u.el_){me=!0;var s=(null===(t=P())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id)||(null===(r=P())||void 0===r?void 0:r.id),c={id:e,adTagUrl:"".concat(n,"&vid=").concat(s,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(s),adLabel:"Your video will resume after this sponsor message"};u.ima.initializeAdDisplayContainer&&u.ima.initializeAdDisplayContainer(),me&&null!==u.el_&&("function"==typeof u.ima?u.ima(c):setTimeout((function(){u.ima.setContentWithAdTag(null,n,!0),u.ima.requestAds()}),1e3));var v=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&v.hasAttribute("controls")&&v.removeAttribute("controls");var m="click",p=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(p=!0,m="touchend"),u.one(m,(function(){p&&u.ima.initializeAdDisplayContainer()}));var f=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null;u.one("ads-ad-started",(function(){f&&f({status:"STARTED",msg:"Advertisement Started"})})),u.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){f&&f({status:"ENDED",msg:"Advertisement Ended"})}))})),u.on("adserror",(function(e){f&&f({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},fe=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},ge=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},Ie=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ee=function(e){return Ie(e)},ye=function(e){l(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},we=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},Te=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},he="",_e=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(he!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),he=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))},be=function(e,n){var t,o=Fe(e),i=Fe(e).el(),r=new ResizeObserver((function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")||(t&&clearTimeout(t),t=setTimeout((function(){Oe(e,n)}),200))}));r.observe(i),o.on("dispose",(function(){r.disconnect()})),o.on("fullscreenchange",(function(){setTimeout((function(){Oe(e,n)}),50)}))},Oe=function(e,n){var t;if(n){var o=document.getElementById(e),i=null===(t=window.getComputedStyle(o,null))||void 0===t?void 0:t.height;n.style.height!==i&&(n.style.height="".concat(i))}};function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var Ve=function(e){o(e).play()},Le=function(e){o(e).pause()},Se=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Ce=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Ae=function(e){return!!o.getPlayer("".concat(e))},We=function(e){return o(e).paused()},Fe=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},ke=function(){var e=n(t.mark((function e(n,o,i){var r,l,a,d,u,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return d=e.sent,G(o),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&f(o,d).then((function(e){var n,t,o,i,r,l;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,t){c(o,d).then((function(o){var i,r,l,a,d,c,v,m,p,f,g=null==o?void 0:o.data,I=(null==g||null===(i=g.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;N(o.data);var E=(null==g||null===(l=g.ads)||void 0===l||null===(a=l.preRoll)||void 0===a||null===(d=a.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&pe(n,E,g);var y=oe(g,n);if(y){var w,T,h,_,b,O,D,V,L,S,C,A,W,F,k=(null==g||null===(w=g.video)||void 0===w||null===(T=w.gist)||void 0===T?void 0:T.videoImageUrl)||(null==g||null===(h=g.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=Fe(n);if(R.poster(k),xe(n,y),R.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:g})})),R.on("loadeddata",(function(){q(),e({status:!0,msg:"Video Loaded",response:g})})),R.one("play",(function(){u&&s<95&&setTimeout((function(){R.currentTime(u)}),0)})),R.one("error",(function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(O=g.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==g||null===(L=g.video)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0)C=((null==g||null===(A=g.video)||void 0===A||null===(W=A.contentDetails)||void 0===W?void 0:W.closedCaptions)||(null==g||null===(F=g.video)||void 0===F?void 0:F.closedCaptions)).filter((function(e){return"VTT"===e.format})),ve(n,C);else ce(n)}else Y(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){je(e,n,t,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Re=function(e,n,t){var o=Fe(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ne=function(e){var n=Fe(e);if(Pe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Pe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},xe=function(e,n){Fe(e).src(n)},je=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ae(t)&&Y(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Be=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{O as A,fe as B,m as C,c as D,je as E,v as F,f as G,Te as H,pe as I,ve as J,x as K,Ie as L,Ee as M,j as N,B as O,ye as P,We as Q,U as R,ge as S,we as T,Oe as U,_e as V,be as W,z as X,G as Y,P as a,Fe as b,N as c,X as d,q as e,M as f,R as g,Y as h,g as i,H as j,Se as k,Re as l,Le as m,xe as n,Ae as o,Ve as p,ke as q,Ce as r,p as s,Ne as t,de as u,ue as v,se as w,oe as x,Be as y,V as z};
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import"js-cookie";import r from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var a={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function u(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var s={name:"@viewlift/player",version:"1.0.85",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:_(),params:u({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":s.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+a.getLinearChannelDetails,params:u(u(u(u(u({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},p=function(){var e=n(t.mark((function e(n,o){var r,l;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return l={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:T(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:h(),method:"POST",headers:{Authorization:r},data:u({},n),params:u({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),f=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,d=JSON.parse(atob(n.split(".")[1])),u=(null==d?void 0:d.site)||null;return i({method:"GET",url:y(e),params:{site:u},headers:{Authorization:n,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:w(e,v),headers:{Authorization:n,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},g=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:I(o),headers:{Authorization:e.token},timeout:15e3})},I=function(e){return b()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},y=function(e){return b()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},w=function(e,n){return b()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(n,"/").concat(e)},T=function(){return b()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},_=function(){return b()+"".concat(null==a?void 0:a.getVideoDetails)},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},D=null;function V(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var L,S,C,A,W,F=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=V().get(),o=b(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),k=null,R=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=6;break}return k||(k=F().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&V().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){k=null}))),e.abrupt("return",k);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(e){S=e},P=function(){return S},x=function(e){L=e},j=function(){return L},B=function(){return C},U=function(e){C=e},H=function(e){W=e},M=function(){return W},z=function(e){A=new Map,e.map((function(e,n){A.set(e.id,n)}))},G=function(e){if(A){var n=A.get(e);U(n+1)}},Y=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},q=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var X=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?J(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):J(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var Q=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Z=function(e){var n=$(e,"video.tags",[]),t=$(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},$=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},ee=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ne=function(){var e,n,t,o,i,r,l,a,d,u,s,c,v,m,p,f,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,T=Fe(I);if(!g.includes("VIEWLIFT_"))return g;var h=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(h.getPropertyValue("height").slice(0,-2)),b=Math.trunc(h.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(n=E.linearchannel)||void 0===n||null===(t=n.channels)||void 0===t||null===(o=t.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.id)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:$(E,"video.gist.id",""),D=K(K({},te(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:Q(b,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:$(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==T||null===(l=T.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==T||null===(a=T.options_)||void 0===a?void 0:a.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:Z(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI($(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+$(E,"video.gist.permalink","")),VIEWLIFT_COPPA:$(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.site)||void 0===s?void 0:s.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:$(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:$(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:$(E,"video.series[0].gist.title",$(E,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:$(E,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:$(E,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:$(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f?void 0:f.macros);for(var V in D){var L=new RegExp("\\b("+V+")\\b","g");g=g.replace(L,D[V])}return g},te=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(ee()?u?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=ee()?K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=ee()?K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},oe=function(e,n){var t,o,i,r,l,a,d,u,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[f])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.videoSourceUrl)return null==e?void 0:e.videoSourceUrl;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return re(E);if(g){var T=le(I,n);return T.src=ne(T.src,n,e),T}if("Safari"!==X()&&w)return ie(I);if(y){var h=re(I);return h.src=ne(h.src,n,e),h}if(null!=I&&I.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return _.src=ne(_.src,n,e),_}return null},ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},re=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},le=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,l=X();if(Fe(n),"Safari"===l){var a=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);return ae(n),a}var d,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(ae(n),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var ae=function(e){var n=Fe(e);if("function"==typeof n.eme)try{n.eme()}catch(e){console.log("EME ERROR :",e)}},de=function(e,n){var t,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(t=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===t||null===(o=t[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=Fe(e).textTracks(),l=0;l<r.length;l++){var a=r[l];"subtitles"!==a.kind&&"captions"!==a.kind||a.id!=n||(a.mode="showing")}},ue=function(e,n){for(var t=Fe(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},se=function(e){var n,t=Fe(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},ce=function(e){var n=Fe(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},ve=function(e,n){var t=Fe(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},me=!1,pe=function(e,n,t){var o=ne(n,e,t),i=Fe(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r,l,a,d,u=Fe(e);if(null!==u.el_){me=!0;var s=(null===(t=P())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id)||(null===(r=P())||void 0===r?void 0:r.id),c={id:e,adTagUrl:"".concat(n,"&vid=").concat(s,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(s),adLabel:"Your video will resume after this sponsor message"};u.ima.initializeAdDisplayContainer&&u.ima.initializeAdDisplayContainer(),me&&null!==u.el_&&("function"==typeof u.ima?u.ima(c):setTimeout((function(){u.ima.setContentWithAdTag(null,n,!0),u.ima.requestAds()}),1e3));var v=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&v.hasAttribute("controls")&&v.removeAttribute("controls");var m="click",p=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(p=!0,m="touchend"),u.one(m,(function(){p&&u.ima.initializeAdDisplayContainer()}));var f=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(d=a.ads)||void 0===d?void 0:d.adEventHandler)||null;u.one("ads-ad-started",(function(){f&&f({status:"STARTED",msg:"Advertisement Started"})})),u.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){f&&f({status:"ENDED",msg:"Advertisement Ended"})}))})),u.on("adserror",(function(e){f&&f({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},fe=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},ge=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},Ie=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ee=function(e){return Ie(e)},ye=function(e){l(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},we=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},Te=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},he="",_e=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(he!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),he=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))},be=function(e,n){var t,o=Fe(e),i=Fe(e).el(),r=new ResizeObserver((function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")||(t&&clearTimeout(t),t=setTimeout((function(){Oe(e,n)}),200))}));r.observe(i),o.on("dispose",(function(){r.disconnect()})),o.on("fullscreenchange",(function(){setTimeout((function(){Oe(e,n)}),50)}))},Oe=function(e,n){var t;if(n){var o=document.getElementById(e),i=null===(t=window.getComputedStyle(o,null))||void 0===t?void 0:t.height;n.style.height!==i&&(n.style.height="".concat(i))}};function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var Ve=function(e){o(e).play()},Le=function(e){o(e).pause()},Se=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Ce=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Ae=function(e){return!!o.getPlayer("".concat(e))},We=function(e){return o(e).paused()},Fe=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},ke=function(){var e=n(t.mark((function e(n,o,i){var r,l,a,d,u,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return d=e.sent,G(o),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&f(o,d).then((function(e){var n,t,o,i,r,l;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,t){c(o,d).then((function(o){var i,r,l,a,d,c,v,m,p,f,g=null==o?void 0:o.data,I=(null==g||null===(i=g.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;N(o.data);var E=(null==g||null===(l=g.ads)||void 0===l||null===(a=l.preRoll)||void 0===a||null===(d=a.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&pe(n,E,g);var y=oe(g,n);if(y){var w,T,h,_,b,O,D,V,L,S,C,A,W,F,k=(null==g||null===(w=g.video)||void 0===w||null===(T=w.gist)||void 0===T?void 0:T.videoImageUrl)||(null==g||null===(h=g.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=Fe(n);if(R.poster(k),xe(n,y),R.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:g})})),R.on("loadeddata",(function(){q(),e({status:!0,msg:"Video Loaded",response:g})})),R.one("play",(function(){u&&s<95&&setTimeout((function(){R.currentTime(u)}),0)})),R.one("error",(function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(O=g.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==g||null===(L=g.video)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0)C=((null==g||null===(A=g.video)||void 0===A||null===(W=A.contentDetails)||void 0===W?void 0:W.closedCaptions)||(null==g||null===(F=g.video)||void 0===F?void 0:F.closedCaptions)).filter((function(e){return"VTT"===e.format})),ve(n,C);else ce(n)}else Y(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){je(e,n,t,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Re=function(e,n,t){var o=Fe(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ne=function(e){var n=Fe(e);if(Pe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Pe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},xe=function(e,n){Fe(e).src(n)},je=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ae(t)&&Y(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Be=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{O as A,fe as B,m as C,c as D,je as E,v as F,f as G,Te as H,pe as I,ve as J,x as K,Ie as L,Ee as M,j as N,B as O,ye as P,We as Q,U as R,ge as S,we as T,Oe as U,_e as V,be as W,z as X,G as Y,P as a,Fe as b,oe as c,X as d,N as e,q as f,R as g,Y as h,M as i,g as j,H as k,xe as l,Re as m,Se as n,Le as o,Ve as p,Ae as q,Ce as r,p as s,ke as t,Ne as u,de as v,ue as w,se as x,Be as y,V as z};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"axios";import{f as o,h as r,g as l,a,r as s}from"./renditions-4b8a69ba.js";import{g as u,a as d,d as c,b as v,s as m,c as f,e as p,h as w,f as h,i as g,j as y,l as b,k as T,p as k,m as P,r as I,n as O,o as S,q as j,t as E,u as A,v as D,w as C,x as R,y as x,z as F,A as _,B,C as M,D as N,E as V,F as H,G as L,H as U,I as W,J as q,K as z}from"./generic-0b03b2d2.js";import G from"video.js";import{o as J,g as K,a as Q,s as Y,b as X}from"./util-c6c13f38.js";import{playSelectedResolution as Z}from"./resolution-43df1d9f.js";import{s as $}from"./localisation-0bf399a1.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ne=function(){var e,t,n,i;return(null===(e=d())||void 0===e||null===(t=e.video)||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.id)||(null===(i=d())||void 0===i?void 0:i.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return le.apply(this,arguments)}function le(){return le=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u();case 2:if(t=e.sent,null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=8;break}return e.abrupt("return","guest-user");case 8:return e.abrupt("return",null==i?void 0:i.userId);case 9:case"end":return e.stop()}}),e)}))),le.apply(this,arguments)}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,r,l=Math.floor(e.currentTime());o(l?"FAILED_TO_START":"DROPPED_STREAM",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:t===l?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),o("PLAY",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var l,a,s,u=e+.1;if(+u.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))o("BUFFERING",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(s=a.beacon)||void 0===s?void 0:s.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return r(u),u}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,o("FIRST_FRAME",te({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,r,l,a;o("AD_REQUEST",te({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),o("AD_IMPRESSION",te({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ne()},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(ae(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var ae=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var o,r,l,a,s,d,c,v,m,f,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.videoSourceUrl){e.next=2;break}return e.abrupt("return");case 2:return e.t0=te,e.t1=te,e.t2=te({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=oe(),e.t5=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=22,re();case 22:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(a=window)||void 0===a||null===(s=a.customData)||void 0===s||null===(d=s.beacon)||void 0===d?void 0:d.params,e.t31=(0,e.t0)(e.t29,e.t30),f=[e.t31],e.next=39,u();case 39:p=e.sent,i({url:(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(m=v.beacon)||void 0===m?void 0:m.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:p},contentType:"application/x-www-form-urlencoded",dataType:"text",data:f}).catch((function(e){console.error(e)}));case 41:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var se,ue,de=function(e){return new Promise((function(t,n){if(ce(e))n("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){t()},i.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},ce=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ve=function(){var e=t(n.mark((function e(t){var i,o,r,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=v(null==t?void 0:t.playerId),null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return l=e.sent,e.prev=5,e.next=8,de("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,l.default(G),e.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=t&&t.airplay&&"Safari"==c()?null==o||o.airPlay({addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),me=function(e,t){var n=v(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,i,o,r,l,a=this.el(),s=G.dom.getPointerPosition(a,t).x;G.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}}))};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function pe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var we=[],he=0,ge=null;function ye(e,t,n){var i,o,r,l,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ue=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var s=null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.profileId,u=Math.floor(e.currentTime()),d=Math.floor(e.duration()),c=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.xapiKey,v=(null==t||null===(l=t.video)||void 0===l?void 0:l.originalObjectId)||null,f={};"v1"==ue?f={videoId:se,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(u/d*100),siteOwner:t.siteOwner,userId:t.userId,xApiKey:c}:"v2"==ue&&(f=pe(pe({videoId:se,watchedTime:Math.floor(e.currentTime()),watchedPercentage:a?100:Math.floor(u/d*100),doneWatching:a,profileId:s},ge&&{seriesId:ge}),v&&{originalObjectId:v})),m(f,ue).then((function(e){})).catch((function(e){})),he=u+n}var be=function(e,t,n){var i=v(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var o=parseFloat(t)/100;i.volume(o),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Te=function(e){var t=v(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Pe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ke(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ie=function(e,t,n,i){var o,r,l=i.res,a=i.sres,s=v(e),u=(null==l?void 0:l.contentType)||"video",c=(null==l||null===(o=l[u])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;f(l),s.on("loadstart",(function(){c&&n.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;(null==s||!s.muted())&&be(e,sessionStorage.getItem("volume")||"100");var o=d();if(p(),n.resolve(Pe({status:!0,msg:"Player Initialised"},a?{seriesResponse:a,response:l}:{response:l})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&!t.isAnonymousUser){var r,u,c=Pe(Pe({},t),l);!function(e,t,n){var i,o,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ge=null==t||null===(o=t.series)||void 0===o?void 0:o.id),we=[],he=0,se=n;var l=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,a=v(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());we.includes(he)||(e==he?(we.push(e),ye(a,t,l)):e>he&&(he=e+l))})),a.one("ended",(function(){ye(a,t,l,!0)})))}(e,c,null==o||null===(r=o.video)||void 0===r||null===(u=r.gist)||void 0===u?void 0:u.id)}})),s.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];s.trigger("subtitlechanged",t)})),s.on("subtitlechanged",(function(e,t){var n,i,o,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(i=n.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var p,w=f.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));p=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(p)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var t,i;w(e,(null==s||null===(t=s.error())||void 0===t?void 0:t.message)||"Some error occured"),n.reject({status:!1,msg:(null==s||null===(i=s.error())||void 0===i?void 0:i.message)||"Some error occured"})})),s.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,o,r=null===(n=d())||void 0===n||null===(i=n.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id,l=h().get(r)||{t:0,p:0},a=l.t,u=l.p;a&&u<95&&setTimeout((function(){s.currentTime(a)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){s.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),s.on("volumechange",(function(){var e=100*s.volume().toFixed(2);s.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),s.on("chromecastDisconnected",(function(){if(c){s.currentSource();for(var e=s.textTracks(),t=e.length-1;t>=0;t--)s.removeRemoteTextTrack(e[t])}}))},Oe=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-146afbd6.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-915d6363.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-0c3a01c2.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-9af225d9.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n&&import("./skin-4c36dbe8.js").then((function(n){n.initialiseSkin(e,t)}))},Se=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var je,Ee=function(){var e=t(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=t(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),De=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){de("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(G)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(G)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),de("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Ee,loadEMELibrary:Ae}),Ce=function(t){var n=v(t),i=!1,r=null,a=!1;n.on("texttrackchange",(function(){for(var e=n.textTracks(),t=null,i=0;i<e.length;i++)if("showing"===e[i].mode){t=e[i];break}if(t){var r,a,s=l({eventName:"video_subtitle_toggle",eventLabel3:null===(r=t)||void 0===r?void 0:r.label,eventAction:"Subtitle Toggle",eventCategory:"Viewing",eventValue:null===(a=t)||void 0===a?void 0:a.label});o(s)}})),n.on("error",(function(){var e,t,i=l({eventName:"video_error",eventLabel3:null==n||null===(e=n.error())||void 0===e?void 0:e.message,eventAction:"Error",eventCategory:"Error",eventValue:null==n||null===(t=n.error())||void 0===t?void 0:t.code});o(i)})),n.on("volumechange",(function(){var t=n.muted(),i=100*n.volume().toFixed(2);if(!t&&0==sessionStorage.getItem("volume")){var r=l({eventName:"video_unmute",eventLabel3:i,eventAction:"Unmute",eventCategory:"Viewing"});o(r)}if(t){var a=l({eventName:"video_mute",eventLabel3:i,eventAction:"Mute",eventCategory:"Viewing"});o(a)}else{var s=l(e({eventName:"volume_level",eventValue:i,eventAction:"Volume Change",eventCategory:"Viewing"},"eventValue",i));o(s)}})),n.on("fullscreenchange",(function(){if(n.isFullscreen()){var e=l({eventName:"video_fullscreen",eventAction:"Fullscreen",eventCategory:"Viewing"});o(e)}else{var t=l({eventName:"video_exit_fullscreen",eventAction:"Exit Fullscreen",eventCategory:"Viewing"});o(t)}})),n.on("seeking",(function(e){a||(seekStartTime=n.currentTime(),a=!0)})),n.on("seeked",(function(e){var t=l({eventName:"video_seek",eventLabel3:n.currentTime(),eventAction:"Seek",eventCategory:"Viewing",eventValue:n.currentTime()});o(t)})),n.on("play",(function(){var e,t,a,s,u=(null===(e=d())||void 0===e||null===(t=e.video)||void 0===t||null===(a=t.gist)||void 0===a?void 0:a.id)||(null===(s=d())||void 0===s?void 0:s.id);if(i&&u==r&&0==n.currentTime()){var c=l({eventName:"replay",eventAction:"Replay",eventCategory:"Viewing"});o(c)}var v=l({eventName:"video_play",eventLabel3:n.duration(),eventAction:"Play",eventCategory:"Viewing"});o(v),u!=r&&(r=u,i=!1)})),n.on("pause",(function(){var e=l({eventName:"video_pause",eventLabel3:n.currentTime(),eventAction:"Pause",eventCategory:"Viewing",eventValue:n.currentTime()});o(e)})),n.on("ended",(function(){i=!0;var e=l({eventName:"video_end",eventLabel3:n.duration(),eventAction:"End",eventCategory:"Viewing",eventValue:n.duration()});o(e)}))};function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function xe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Re(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Re(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Fe=function(i,o,r,l){var a,s,u,d,m,f,p,h,g,y,b,T,k,P,I,S,j,E,A,D,C,F,_,B,M,N,V,H,L,z,J,K,Q,Y=o.res,X=void 0===Y?null:Y,Z=o.sres,$=void 0===Z?null:Z;null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(m=d.getInstance())||void 0===m||m.S;var ee=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(f=X)||void 0===f?void 0:f.contentType)||"video",ne=U(null===(p=X)||void 0===p||null===(h=p[te])||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.videoImageUrl)||U(null===(y=X)||void 0===y||null===(b=y[te])||void 0===b||null===(T=b.gist)||void 0===T||null===(k=T.imageGist)||void 0===k?void 0:k.r16x9),ie=(null===(P=X)||void 0===P||null===(I=P[te])||void 0===I||null===(S=I.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,oe=(null===(j=X)||void 0===j||null===(E=j[te])||void 0===E||null===(A=E.streamingInfo)||void 0===A?void 0:A.isLiveStream)||!1,re=(null==r?void 0:r.drmLibrary)||!1,le=(null===(D=X)||void 0===D||null===(C=D.ads)||void 0===C||null===(F=C.preRoll)||void 0===F||null===(_=F.adTags)||void 0===_||null===(B=_.web)||void 0===B?void 0:B.active)&&(null===(M=X)||void 0===M||null===(N=M.ads)||void 0===N||null===(V=N.preRoll)||void 0===V||null===(H=V.adTags)||void 0===H||null===(L=H.web)||void 0===L?void 0:L.url);X=xe(xe({},X),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var ae=(Q={controls:0!=(null==r?void 0:r.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==r?void 0:r.muted)||!1,autoplay:(null==r?void 0:r.autoplay)||!1,controlBar:{volumePanel:("default"==r.skin||"defaultV2"==r.skin||"live"==(null==r?void 0:r.skin))&&{inline:!1},fullscreenToggle:"default"==r.skin||"defaultV2"==r.skin,audioTrackButton:!1,pictureInPictureToggle:(r.skin,!1)},muteToggle:"multiplayer"==r.skin,liveui:ie},e(Q,"autoplay",null==r?void 0:r.autoplay),e(Q,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!le),e(Q,"loop",(null==r?void 0:r.loop)||!1),e(Q,"audioPosterMode",null==r?void 0:r.audioPosterMode),e(Q,"html5",xe(xe({dash:xe(xe({},!G.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:xe(xe({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(z=r.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(J=r.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(K=r.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(Q,"poster",ne),e(Q,"techOrder",ee),e(Q,"chromecast",{requestCustomDataFn:function(e){var t=v(i),n=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var i,o,r,l,a,s,u,d,c,v,m=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){f.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;f.licenseUrl=p;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];f.licenseToken=w}var h=(null==e||null===(i=e[m])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=h;var g=null==e||null===(r=e[m])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=g;var y=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=y;var b=null==e||null===(u=e[m])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=b,f.subTitles=n,f.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(X,e,n)}}),Q),se=G(i,ae,function(){var e=t(n.mark((function e(){var t,o,a,s,u,d,v,m,f,p,h,g,y,b,T,k,P,I,S,j,E,A,D,C,F;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ve(r);case 2:if(oe&&l.resolve(xe({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:X}:{response:X})),window.initialise(se),window.firstFrame(se),"white"!==window.controlsColor&&Se(window.controlsColor,se),/Android/i.test(navigator.userAgent)&&(G.options.vhs.overrideNative=!0),T=null===(t=X)||void 0===t||null===(o=t[te])||void 0===o?void 0:o.drmEnabled,k=null===(a=X)||void 0===a||null===(s=a[te])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.startOverTime,!T&&!re){e.next=22;break}if("Safari"!==c()){e.next=15;break}return e.next=13,Ae();case 13:e.next=22;break;case 15:if("caliente"!=(null===(P=window)||void 0===P?void 0:P.siteName)){e.next=20;break}return e.next=18,Ae();case 18:e.next=22;break;case 20:return e.next=22,Ee();case 22:ie&&me(i,k),!le||null!=r&&null!==(d=r.customData)&&void 0!==d&&d.disableAds||W(i,le,X),(I=R(X,i))?O(i,I):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),w(i,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(v=X)||void 0===v||null===(m=v[te])||void 0===m||null===(f=m.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(h=X)||void 0===h||null===(g=h[te])||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0)&&(F=(null===(j=X)||void 0===j||null===(E=j[te])||void 0===E||null===(A=E.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(D=X)||void 0===D||null===(C=D[te])||void 0===C?void 0:C.closedCaptions),S=F.filter((function(e){return"VTT"===e.format})),q(i,S)),null!=r&&r.disableControls?x(i):Oe(i,xe(xe(xe({},r),ae),{},{liveVideo:oe,isDvrEnabled:ie,res:X,sres:$})),Ie(i,xe(xe(xe({},r),ae),{},{liveVideo:oe}),l,{res:X,sres:$}),null!=r&&null!==(b=r.analytics)&&void 0!==b&&b.gaId&&Ce(i);case 30:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function _e(){return{loadVideoInstantly:b,onTimeUpdate:J,getVideoDuration:K,onVideoEnded:Q,init:function(e){return new Promise((function(t,n){var i,o,r,l,a,u,d,v,m,p,w;if(!S(null==e?void 0:e.playerId)){var h=!(null==e||!e.videoSourceUrl),b=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,T=null==e?void 0:e.videoId,k=(null==e||null===(o=e.series)||void 0===o?void 0:o.enable)||!1;window.videoId=T,window.videoSourceUrl=null==e?void 0:e.videoSourceUrl;var P=null==e?void 0:e.token;if(!h){if(F().set(null==e?void 0:e.refreshToken),!P||_(P))return void n({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}});je=JSON.parse(atob(P.split(".")[1]))}window.siteId=null===(r=je)||void 0===r?void 0:r.siteId,window.siteName=null===(l=je)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=je)||void 0===a||!a.anonymousId),e.siteOwner=(null===(u=je)||void 0===u?void 0:u.site)||null,e.userId=(null===(d=je)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(v=je)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",P);var I=null==e?void 0:e.playerId;e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId;var O=null==e?void 0:e.airplay,j=null==e?void 0:e.apiBaseUrl,E=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,A=null==e?void 0:e.errors;A&&(window.customErrors=A),window.customData=null==e?void 0:e.customData,$(null==e||null===(p=e.customData)||void 0===p?void 0:p.localisation),j&&(window.playerEntitlementUrl=j),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!B(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return De})).then((function(e){e.importIMA()})),O&&"Safari"==c()&&Promise.resolve().then((function(){return De})).then((function(e){e.importAirplay()})),E&&de("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return s(E)})).catch((function(e){}));var D=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(I));if(D&&D.addEventListener("contextmenu",(function(e){return e.preventDefault()})),h){var C={videoSourceUrl:null==e?void 0:e.videoSourceUrl};Fe(I,{res:C},e,{resolve:t,reject:n})}else if(k){var R,x=null==e||null===(R=e.series)||void 0===R?void 0:R.id;M(x,P).then((function(i){var o,r,l,a=i.data,s=i.data.seasons;z(s);var u=T||(null==s||null===(o=s[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;g({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),y(n)})).catch((function(e){return console.log(e)}))}(x,P),N(u,P).then((function(i){var o,r,l;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,f(i.data),Fe(I,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){V(e,I,n,T)}))})).catch((function(e){V(e,I,n)}))}else if(b){var U=null==e?void 0:e.epg;H(U,P).then((function(i){var o=null==i?void 0:i.data;o.contentType="linearchannel",Fe(I,{res:o},e,{resolve:t,reject:n})})).catch((function(e){V(e,I,n,T)}))}else N(T,P).then((function(i){var o,r,l,a;window.contentType=null==i||null===(o=i.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,f(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?L(T,P).then((function(i){var o,r,l,a,u,d;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedTime)||null,e.watchedPercentage=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedPercentage)||null,s.contentType="video",Fe(I,{res:s},e,{resolve:t,reject:n})})).catch((function(i){var o,r,l,a;null!==(o=window)&&void 0!==o&&null!==(r=o.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Fe(I,{res:s},e,{resolve:t,reject:n})})):Fe(I,{res:s},e,{resolve:t,reject:n})})).catch((function(e){V(e,I,n,T)}))}}))},getRenditions:a,skip:T,getPlayer:v,play:k,pause:P,detectBrowser:c,rewind:I,loadVideo:O,seekToTimeStamp:Y,isPlayerInitialised:S,load:j,dispose:E,enableCaptions:A,disableCaptions:D,getCaptions:C,playSelectedResolution:Z,getSource:R,setVolume:be,getVolume:Te,disableControls:x,setPlaybackSpeed:X}}export{_e as default};
1
+ import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import o from"axios";import{g as i,a as r,d as l,b as a,s,c as d,l as u,e as c,f as v,h as m,i as f,j as p,k as w,m as h,n as g,p as y,o as b,r as T,q as k,t as P,u as I,v as O,w as j,x as S,y as E,z as D,A,B as R,C as F,D as x,E as C,F as B,G as M,H as _,I as H,J as N,K as L}from"./generic-a2327106.js";import V from"video.js";import U from"@babel/runtime/helpers/typeof";import{o as W,g as q,a as z,s as G,b as J}from"./util-b5ab1ff5.js";import{g as K}from"./renditions-6634adfc.js";import{playSelectedResolution as Q}from"./resolution-3952a107.js";import{s as Y}from"./localisation-0bf399a1.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function X(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function Z(e,t){X("event",e,t)}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?$(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):$(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var te=function(){var e,t,n,o;return(null===(e=r())||void 0===e||null===(t=e.video)||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.id)||(null===(o=r())||void 0===o?void 0:o.id)};function ne(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ne(),window.sessionStorage.setItem("uid",e),e)}function ie(){return re.apply(this,arguments)}function re(){return re=t(n.mark((function e(){var t,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i();case 2:if(t=e.sent,null==(o=JSON.parse(atob(t.split(".")[1])))||!o.anonymousId){e.next=8;break}return e.abrupt("return","guest-user");case 8:return e.abrupt("return",null==o?void 0:o.userId);case 9:case"end":return e.stop()}}),e)}))),re.apply(this,arguments)}window.initialise=function(e){window.sid=ne(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,o,i,r=Math.floor(e.currentTime());Z(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),Z("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,o;if(t.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(o=n.className)&&void 0!==o&&o.includes("vjs-waiting"))Z("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,Z("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,o,i,r,l;Z("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),Z("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(le(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var le=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var r,l,a,s,d,u,c,v,m,f,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.videoSourceUrl){e.next=2;break}return e.abrupt("return");case 2:return e.t0=ee,e.t1=ee,e.t2=ee({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=te(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=22,ie();case 22:return e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),f=[e.t31],e.next=39,i();case 39:p=e.sent,o({url:(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(m=v.beacon)||void 0===m?void 0:m.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:p},contentType:"application/x-www-form-urlencoded",dataType:"text",data:f}).catch((function(e){console.error(e)}));case 41:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ae,se,de=function(e){return new Promise((function(t,n){if(ue(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){t()},o.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(o)}}))},ue=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ce=function(){var e=t(n.mark((function e(t){var o,i,r,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a(null==t?void 0:t.playerId),null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||null==t||!t.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return s=e.sent,e.prev=5,e.next=8,de("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,s.default(V),e.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==i||i.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==i||i.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=t&&t.airplay&&"Safari"==l()?null==i||i.airPlay({addButtonToControlBar:"default"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(t){return e.apply(this,arguments)}}(),ve=function(e,t){var n=a(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,i,r,l,a=this.el(),s=V.dom.getPointerPosition(a,t).x;V.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(d),d&&"CONNECTED"===u){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}}))};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?me(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):me(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var pe=[],we=0,he=null;function ge(e,t,n){var o,i,r,l,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];se=(null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";var d=null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.profileId,u=Math.floor(e.currentTime()),c=Math.floor(e.duration()),v=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.xapiKey,m=(null==t||null===(l=t.video)||void 0===l?void 0:l.originalObjectId)||null,f={};"v1"==se?f={videoId:ae,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:t.siteOwner,userId:t.userId,xApiKey:v}:"v2"==se&&(f=fe(fe({videoId:ae,watchedTime:Math.floor(e.currentTime()),watchedPercentage:a?100:Math.floor(u/c*100),doneWatching:a,profileId:d},he&&{seriesId:he}),m&&{originalObjectId:m})),s(f,se).then((function(e){})).catch((function(e){})),we=u+n}var ye=function(e,t,n){var o=a(e);if(o)if(t>=0&&t<=100){o.muted()&&o.muted(!1);var i=parseFloat(t)/100;o.volume(i),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},be=function(e){var t=a(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Te=!1,ke=function(e,t){var n,o,i=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(n=e[i])||void 0===n||null===(o=n.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!Te){var r=Pe(e,"videoAssets","secondaryVideoAssets"),l=d(r,t);return l&&u(t,l),Te=!0,console.log("switched to secondary source"),!0}return!1};function Pe(e,t,n){if(Array.isArray(e))return e.map((function(e){return Pe(e,t,n)}));if(null!==e&&"object"===U(e)){var o={};return Object.keys(e).forEach((function(i){i===t&&void 0!==e[n]?o[i]=e[n]:i===n&&void 0!==e[t]?o[i]=e[t]:o[i]=Pe(e[i],t,n)})),o}return e}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Oe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ie(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var je=function(e,t,n,o){var i,l,s=o.res,d=o.sres,u=a(e),p=(null==s?void 0:s.contentType)||"video",w=(null==s||null===(i=s[p])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;c(s),u.on("loadstart",(function(){w&&n.resolve({status:!0,msg:"Video Loaded",response:s})})),u.on("loadeddata",(function(){var o;(null==u||!u.muted())&&ye(e,sessionStorage.getItem("volume")||"100");var i=r();if(v(),n.resolve(Oe({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:s}:{response:s})),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&!t.isAnonymousUser){var l,c,m=Oe(Oe({},t),s);!function(e,t,n){var o,i,r;null!=t&&t.series&&null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable&&(he=null==t||null===(i=t.series)||void 0===i?void 0:i.id),pe=[],we=0,ae=n;var l=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=a(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());pe.includes(we)||(e==we?(pe.push(e),ge(s,t,l)):e>we&&(we=e+l))})),s.one("ended",(function(){ge(s,t,l,!0)})))}(e,m,null==i||null===(l=i.video)||void 0===l||null===(c=l.gist)||void 0===c?void 0:c.id)}})),u.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];u.trigger("subtitlechanged",t)})),u.on("subtitlechanged",(function(e,t){var n,o,i,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var p,w=f.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));p=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(p)}})),u.on("loadedmetadata",(function(){window.endFirstFrame(u)})),u.on("error",(function(){var t,o;4===u.error().code?ke(s,e):(m(e,(null==u||null===(t=u.error())||void 0===t?void 0:t.message)||"Some error occured"),n.reject({status:!1,msg:(null==u||null===(o=u.error())||void 0===o?void 0:o.message)||"Some error occured"}))})),setTimeout((function(){var t,o=(null==u||null===(t=u.dash)||void 0===t?void 0:t.mediaPlayer)||null;o&&o.on("error",(function(t){var o,i,r;25===(null==t||null===(o=t.error)||void 0===o?void 0:o.code)?ke(s,e):(m(e,(null==u||null===(i=u.error())||void 0===i?void 0:i.message)||"Some error occured"),n.reject({status:!1,msg:(null==u||null===(r=u.error())||void 0===r?void 0:r.message)||"Some error occured"}))}))}),100),u.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,o,i,l=null===(n=r())||void 0===n||null===(o=n.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,a=f().get(l)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){u.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(w){u.currentSource();for(var e=u.textTracks(),t=e.length-1;t>=0;t--)u.removeRemoteTextTrack(e[t])}}))},Se=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-f334e148.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-c46b6cc8.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-abc83110.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-52929ab8.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n&&import("./skin-10d07f80.js").then((function(n){n.initialiseSkin(e,t)}))},Ee=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var De,Ae=function(){var e=t(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Re=function(){var e=t(n.mark((function e(){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Fe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){de("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(V)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(V)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),de("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Ae,loadEMELibrary:Re});function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ce(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):xe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Be=function(o,i,r,s){var c,v,f,p,w,h,g,y,b,T,k,P,I,O,j,S,D,A,R,F,x,C,B,M,L,U,W,q,z,G,J,K,Q,Y=i.res,X=void 0===Y?null:Y,Z=i.sres,$=void 0===Z?null:Z;null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(f=v.framework)||void 0===f||null===(p=f.CastContext)||void 0===p||null===(w=p.getInstance())||void 0===w||w.S;var ee=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(h=X)||void 0===h?void 0:h.contentType)||"video",ne=_(null===(g=X)||void 0===g||null===(y=g[te])||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||_(null===(T=X)||void 0===T||null===(k=T[te])||void 0===k||null===(P=k.gist)||void 0===P||null===(I=P.imageGist)||void 0===I?void 0:I.r16x9),oe=(null===(O=X)||void 0===O||null===(j=O[te])||void 0===j||null===(S=j.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,ie=(null===(D=X)||void 0===D||null===(A=D[te])||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,re=(null==r?void 0:r.drmLibrary)||!1,le=(null===(F=X)||void 0===F||null===(x=F.ads)||void 0===x||null===(C=x.preRoll)||void 0===C||null===(B=C.adTags)||void 0===B||null===(M=B.web)||void 0===M?void 0:M.active)&&(null===(L=X)||void 0===L||null===(U=L.ads)||void 0===U||null===(W=U.preRoll)||void 0===W||null===(q=W.adTags)||void 0===q||null===(z=q.web)||void 0===z?void 0:z.url);X=Ce(Ce({},X),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var ae=(Q={controls:0!=(null==r?void 0:r.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==r?void 0:r.muted)||!1,autoplay:(null==r?void 0:r.autoplay)||!1,controlBar:{volumePanel:("default"==r.skin||"defaultV2"==r.skin||"live"==(null==r?void 0:r.skin))&&{inline:!1},fullscreenToggle:"default"==r.skin||"defaultV2"==r.skin,audioTrackButton:!1,pictureInPictureToggle:(r.skin,!1)},muteToggle:"multiplayer"==r.skin,liveui:oe},e(Q,"autoplay",null==r?void 0:r.autoplay),e(Q,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!le),e(Q,"loop",(null==r?void 0:r.loop)||!1),e(Q,"audioPosterMode",null==r?void 0:r.audioPosterMode),e(Q,"html5",Ce(Ce({dash:Ce(Ce({},!V.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||5},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:Ce(Ce({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(G=r.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(J=r.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(K=r.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(Q,"poster",ne),e(Q,"techOrder",ee),e(Q,"chromecast",{requestCustomDataFn:function(e){var t=a(o),n=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,t,n){var o,i,r,l,a,s,d,u,c,v,m=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){f.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;f.licenseUrl=p;var w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];f.licenseToken=w}var h=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=h;var g=null==e||null===(r=e[m])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=g;var y=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=y;var b=null==e||null===(d=e[m])||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return f.mediaImage=b,f.subTitles=n,f.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(X,e,n)}}),Q),se=V(o,ae,function(){var e=t(n.mark((function e(){var t,i,a,c,v,f,p,w,h,g,y,b,T,k,P,I,O,j,S,D,A,R,F,x;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce(r);case 2:if(ie&&s.resolve(Ce({status:!0,msg:"Player Initialised"},$?{seriesResponse:$,response:X}:{response:X})),window.initialise(se),window.firstFrame(se),"white"!==window.controlsColor&&Ee(window.controlsColor,se),/Android/i.test(navigator.userAgent)&&(V.options.vhs.overrideNative=!0),k=null===(t=X)||void 0===t||null===(i=t[te])||void 0===i?void 0:i.drmEnabled,P=null===(a=X)||void 0===a||null===(c=a[te])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!re){e.next=22;break}if("Safari"!==l()){e.next=15;break}return e.next=13,Re();case 13:e.next=22;break;case 15:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){e.next=20;break}return e.next=18,Re();case 18:e.next=22;break;case 20:return e.next=22,Ae();case 22:oe&&ve(o,P),!le||null!=r&&null!==(f=r.customData)&&void 0!==f&&f.disableAds||H(o,le,X),(O=d(X,o))?u(o,O):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),m(o,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=X)||void 0===p||null===(w=p[te])||void 0===w||null===(h=w.contentDetails)||void 0===h||null===(g=h.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(y=X)||void 0===y||null===(b=y[te])||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(x=(null===(S=X)||void 0===S||null===(D=S[te])||void 0===D||null===(A=D.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=X)||void 0===R||null===(F=R[te])||void 0===F?void 0:F.closedCaptions),j=x.filter((function(e){return"VTT"===e.format})),N(o,j)),null!=r&&r.disableControls?E(o):Se(o,Ce(Ce(Ce({},r),ae),{},{liveVideo:ie,isDvrEnabled:oe,res:X,sres:$})),je(o,Ce(Ce(Ce({},r),ae),{},{liveVideo:ie}),s,{res:X,sres:$});case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Me(){return{loadVideoInstantly:h,onTimeUpdate:W,getVideoDuration:q,onVideoEnded:z,init:function(e){return new Promise((function(t,n){var o,i,r,a,s,d,u,v,m,f,h;if(!k(null==e?void 0:e.playerId)){var g=!(null==e||!e.videoSourceUrl),y=(null==e||null===(o=e.epg)||void 0===o?void 0:o.enable)||!1,b=null==e?void 0:e.videoId,T=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1;window.videoId=b,window.videoSourceUrl=null==e?void 0:e.videoSourceUrl;var P=null==e?void 0:e.token;if(!g){if(D().set(null==e?void 0:e.refreshToken),!P||A(P))return void n({status:!1,msg:"".concat(P?"Token is expired !":"Missing Authorization Token"),response:{token:P}});De=JSON.parse(atob(P.split(".")[1]))}window.siteId=null===(r=De)||void 0===r?void 0:r.siteId,window.siteName=null===(a=De)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=De)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=De)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=De)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=De)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",P);var I=null==e?void 0:e.playerId;e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId;var O=null==e?void 0:e.airplay,j=null==e?void 0:e.apiBaseUrl,S=(null==e||null===(m=e.analytics)||void 0===m?void 0:m.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,Y(null==e||null===(f=e.customData)||void 0===f?void 0:f.localisation),j&&(window.playerEntitlementUrl=j),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!R(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Fe})).then((function(e){e.importIMA()})),O&&"Safari"==l()&&Promise.resolve().then((function(){return Fe})).then((function(e){e.importAirplay()})),S&&de("https://www.googletagmanager.com/gtag/js?id=".concat(S)).then((function(){return e=S,window.dataLayer=window.dataLayer||[],X("js",new Date),void X("config",e);var e})).catch((function(e){}));var _=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(I));if(_&&_.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var H={videoSourceUrl:null==e?void 0:e.videoSourceUrl};Be(I,{res:H},e,{resolve:t,reject:n})}else if(T){var N,V=null==e||null===(N=e.series)||void 0===N?void 0:N.id;F(V,P).then((function(o){var i,r,l,a=o.data,s=o.data.seasons;L(s);var d=b||(null==s||null===(i=s[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;p({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),w(n)})).catch((function(e){return console.log(e)}))}(V,P),x(d,P).then((function(o){var i,r,l;window.contentType=null==o||null===(i=o.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(o.data),Be(I,{res:null==o?void 0:o.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){C(e,I,n,b)}))})).catch((function(e){C(e,I,n)}))}else if(y){var U=null==e?void 0:e.epg;B(U,P).then((function(o){var i=null==o?void 0:o.data;i.contentType="linearchannel",Be(I,{res:i},e,{resolve:t,reject:n})})).catch((function(e){C(e,I,n,b)}))}else x(b,P).then((function(o){var i,r,l,a;window.contentType=null==o||null===(i=o.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==o?void 0:o.data);var s=null==o?void 0:o.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?M(b,P).then((function(o){var i,r,l,a,d,u;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==o?void 0:o.data)),e.watchHistoryResumeTime=(null==o||null===(d=o.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==o||null===(u=o.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Be(I,{res:s},e,{resolve:t,reject:n})})).catch((function(o){var i,r,l,a;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(o)),Be(I,{res:s},e,{resolve:t,reject:n})})):Be(I,{res:s},e,{resolve:t,reject:n})})).catch((function(e){C(e,I,n,b)}))}}))},getRenditions:K,skip:g,getPlayer:a,play:y,pause:b,detectBrowser:l,rewind:T,loadVideo:u,seekToTimeStamp:G,isPlayerInitialised:k,load:P,dispose:I,enableCaptions:O,disableCaptions:j,getCaptions:S,playSelectedResolution:Q,getSource:d,setVolume:ye,getVolume:be,disableControls:E,setPlaybackSpeed:J}}export{Me as default};
@@ -1 +1 @@
1
- import{b as e,k as r,r as t}from"./generic-0b03b2d2.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
1
+ import{b as e,n as r,r as t}from"./generic-a2327106.js";function o(o,u){var l,n,i=e(o),c=null==i||null===(l=i.controlBar)||void 0===l||null===(n=l.playToggle)||void 0===n?void 0:n.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(i.muted()?i.muted(!1):i.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var n=document.querySelector(".vjs-fullscreen-control");return void(n&&n.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import a from"video.js";import{s}from"./loader-580278fe.js";import{q as c,p as u}from"./generic-0b03b2d2.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var d=a.getComponent("Component"),p=function(){l(h,d);var p,v,f=(p=h,v=m(),function(){var e,t=n(p);if(v){var i=n(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return o(this,e)});function h(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),l=f.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,a,s,c,u,m,d=window.getComputedStyle(document.getElementById(t),null),p=d.getPropertyValue("height"),v=d.getPropertyValue("width"),f=p.slice(0,-2);v.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(a=r.config)||void 0===a||!a.liveVideo)||null!==(s=i(l))&&void 0!==s&&null!==(c=s.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(m=u.config)&&void 0!==m&&m.liveVideo?(e.style.bottom="".concat(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(h,[{key:"createEl",value:function(){return a.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,a=this,s=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==s||null===(n=s.classList)||void 0===n||n.add("".concat(this.config.skin)):null==s||null===(r=s.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(s,this.playerId),window.onresize=function(){a.multicamCssPositioning(s,a.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=a.dom.createEl("div",{className:"tile ".concat(t)});return 0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),a.dom.appendContent(l,o),o.addEventListener("click",(function(t){s(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),h}();export{p as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import a from"video.js";import{s}from"./loader-580278fe.js";import{t as c,p as u}from"./generic-a2327106.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var d=a.getComponent("Component"),p=function(){l(h,d);var p,v,f=(p=h,v=m(),function(){var e,t=n(p);if(v){var i=n(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return o(this,e)});function h(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),l=f.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,a,s,c,u,m,d=window.getComputedStyle(document.getElementById(t),null),p=d.getPropertyValue("height"),v=d.getPropertyValue("width"),f=p.slice(0,-2);v.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(a=r.config)||void 0===a||!a.liveVideo)||null!==(s=i(l))&&void 0!==s&&null!==(c=s.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(m=u.config)&&void 0!==m&&m.liveVideo?(e.style.bottom="".concat(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(h,[{key:"createEl",value:function(){return a.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,a=this,s=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==s||null===(n=s.classList)||void 0===n||n.add("".concat(this.config.skin)):null==s||null===(r=s.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(s,this.playerId),window.onresize=function(){a.multicamCssPositioning(s,a.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=a.dom.createEl("div",{className:"tile ".concat(t)});return 0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),a.dom.appendContent(l,o),o.addEventListener("click",(function(t){s(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),h}();export{p as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import o from"video.js";import{g as s,e as l,h as i}from"./icons-3e9a1686.js";import{T as c,b as m,q as d,p}from"./generic-0b03b2d2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var h=o.getComponent("Component"),v=function(){a(g,h);var v,y,f=(v=g,y=u(),function(){var e,t=n(v);if(y){var a=n(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return r(this,e)});function g(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(a=f.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(g,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.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=o.dom.createEl("div",{className:"stream-container hidden"});o.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(c(),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 a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",o.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=o.dom.createEl("div",{className:"stream-selector-head"}),n=o.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});n.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=o.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=o.dom.createEl("div",{className:"stream-selector-content"}),u=o.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,r=o.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(r.classList.add("selected"),r.style.border="4px solid #D2393B"),r.onclick=function(){for(var a=o.dom.$$(".stream"),n=0;n<a.length;n++)a[n].style.border="none",a[n].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id).then((function(e){p(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),n.alt="No Thumbnail Available",r.append(n),o.dom.appendContent(u,r),o.dom.appendContent(c,u)},v=0;v<this.streams.length;v++)h(v);o.dom.appendContent(r,n),o.dom.appendContent(r,s),o.dom.appendContent(e,r),o.dom.appendContent(e,c),m(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),g}();export{v as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import o from"video.js";import{g as s,e as l,h as i}from"./icons-3e9a1686.js";import{T as c,b as m,t as d,p}from"./generic-a2327106.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var h=o.getComponent("Component"),v=function(){a(g,h);var v,y,f=(v=g,y=u(),function(){var e,t=n(v);if(y){var a=n(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return r(this,e)});function g(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(a=f.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(g,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.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=o.dom.createEl("div",{className:"stream-container hidden"});o.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(c(),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 a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",o.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=o.dom.createEl("div",{className:"stream-selector-head"}),n=o.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});n.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=o.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=o.dom.createEl("div",{className:"stream-selector-content"}),u=o.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,r=o.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(r.classList.add("selected"),r.style.border="4px solid #D2393B"),r.onclick=function(){for(var a=o.dom.$$(".stream"),n=0;n<a.length;n++)a[n].style.border="none",a[n].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id).then((function(e){p(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),n.alt="No Thumbnail Available",r.append(n),o.dom.appendContent(u,r),o.dom.appendContent(c,u)},v=0;v<this.streams.length;v++)h(v);o.dom.appendContent(r,n),o.dom.appendContent(r,s),o.dom.appendContent(e,r),o.dom.appendContent(e,c),m(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),g}();export{v as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{s}from"./loader-580278fe.js";import{q as i,p as a}from"./generic-0b03b2d2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var d=n.getComponent("Component"),u=function(){l(p,d);var u,m,v=(u=p,m=c(),function(){var e,t=r(u);if(m){var l=r(this).constructor;e=Reflect.construct(t,arguments,l)}else e=t.apply(this,arguments);return o(this,e)});function p(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(l=v.call(this,t,o)).playerId=o.playerId,l.config=o.config,l.createUI(null==o?void 0:o.config.streams),l}return t(p,[{key:"createEl",value:function(){return n.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,o,r,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(o=this.config)&&void 0!==o&&o.liveui)&&!(null!=this&&null!==(r=this.config)&&void 0!==r&&r.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var m=n.dom.createEl("div",{className:"broadcast"});m.innerHTML="Broadcasts";var v=n.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==v||null===(a=v.classList)||void 0===a||a.add("dvr"):null==v||null===(c=v.classList)||void 0===c||c.add("nondvr"),v.style.width="".concat(window.innerWidth-50,"px");var p=n.dom.createEl("div",{className:"tilecontainer-potrait"});n.dom.appendContent(d,m),n.dom.appendContent(d,v),n.dom.appendContent(v,p),m.addEventListener("click",(function(){null!=v&&v.classList.contains("hideMWebTray")?(v.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==v||v.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var h=0;h<e.length;h++)this.createTile(e[h],h)}},{key:"createTile",value:function(e,t){var l=this,o=this.el(),r=n.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(e.img,")");var c=n.dom.$(".tilecontainer-potrait",this.contentEl());return n.dom.appendContent(c,r),r.addEventListener("click",(function(t){s(l.playerId),l.removeSelectedTile();var o=document.getElementsByClassName("".concat(t.srcElement.className))[0];o&&(o.style.border="2px solid red"),i(l.playerId,e.id).then((function(e){a(l.playerId)}))})),o}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./mwebPotrait-3c1805d8.js").then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),o=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),r=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==o||o.classList.add("hide-controls"),null==r||r.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")))}}]),p}();export{u as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{s}from"./loader-580278fe.js";import{t as i,p as a}from"./generic-a2327106.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var d=n.getComponent("Component"),u=function(){l(p,d);var u,m,v=(u=p,m=c(),function(){var e,t=r(u);if(m){var l=r(this).constructor;e=Reflect.construct(t,arguments,l)}else e=t.apply(this,arguments);return o(this,e)});function p(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(l=v.call(this,t,o)).playerId=o.playerId,l.config=o.config,l.createUI(null==o?void 0:o.config.streams),l}return t(p,[{key:"createEl",value:function(){return n.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,o,r,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(o=this.config)&&void 0!==o&&o.liveui)&&!(null!=this&&null!==(r=this.config)&&void 0!==r&&r.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var m=n.dom.createEl("div",{className:"broadcast"});m.innerHTML="Broadcasts";var v=n.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==v||null===(a=v.classList)||void 0===a||a.add("dvr"):null==v||null===(c=v.classList)||void 0===c||c.add("nondvr"),v.style.width="".concat(window.innerWidth-50,"px");var p=n.dom.createEl("div",{className:"tilecontainer-potrait"});n.dom.appendContent(d,m),n.dom.appendContent(d,v),n.dom.appendContent(v,p),m.addEventListener("click",(function(){null!=v&&v.classList.contains("hideMWebTray")?(v.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==v||v.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var h=0;h<e.length;h++)this.createTile(e[h],h)}},{key:"createTile",value:function(e,t){var l=this,o=this.el(),r=n.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(e.img,")");var c=n.dom.$(".tilecontainer-potrait",this.contentEl());return n.dom.appendContent(c,r),r.addEventListener("click",(function(t){s(l.playerId),l.removeSelectedTile();var o=document.getElementsByClassName("".concat(t.srcElement.className))[0];o&&(o.style.border="2px solid red"),i(l.playerId,e.id).then((function(e){a(l.playerId)}))})),o}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./mwebPotrait-3c1805d8.js").then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),o=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),r=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==o||o.classList.add("hide-controls"),null==r||r.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")))}}]),p}();export{u 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-3e9a1686.js";import{q as a,c as s,S as d}from"./generic-0b03b2d2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var u=r.getComponent("Component"),c=function(){n(c,u);var a,s,d=(a=c,s=p(),function(){var e,t=i(a);if(s){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function c(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(c,[{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")}))}}]),c}(),m=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;a("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then((function(e){s(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"),u=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!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{c as default,m as initaliseFunctionality};
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-3e9a1686.js";import{t as a,e as s,S as d}from"./generic-a2327106.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var u=r.getComponent("Component"),c=function(){n(c,u);var a,s,d=(a=c,s=p(),function(){var e,t=i(a);if(s){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function c(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(c,[{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")}))}}]),c}(),m=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;a("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then((function(e){s(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"),u=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!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{c as default,m as initaliseFunctionality};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as s,e as r}from"./icons-3e9a1686.js";import{T as d,b as c,q as p,R as m}from"./generic-0b03b2d2.js";import{a as u}from"./autoNextVideo-86221d1c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-c6c13f38.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var y=i.getComponent("Component"),h=function(){l(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=a(h);if(f){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function g(e){var n,l,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(a=b.call(this,e,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=null==i||null===(n=i.playlist)||void 0===n?void 0:n.content,a.cb=(null==i||null===(l=i.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==i||null===(o=i.playlist)||void 0===o?void 0:o.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&u({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(g,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=i.dom.createEl("div",{className:"selection-container hidden"});i.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.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 n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),i.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),o=i.dom.createEl("div",{className:"playlist-selector-head"}),a=i.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var s=i.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=i.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,o,a=i.dom.createEl("div",{className:"playlist-container"}),s=i.dom.createEl("div",{className:"playlist-section",index:t}),r=i.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),c=i.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});i.dom.appendContent(s,r),i.dom.appendContent(s,c),i.dom.appendContent(a,s),i.dom.appendContent(d,a);var u=i.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=i.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.description)||"")}),y=i.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),i.dom.appendContent(u,y),i.dom.appendContent(u,v),i.dom.appendContent(a,u),i.dom.appendContent(d,a),u.onclick=function(e){e.stopPropagation(),m(t+1),p(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,o,i=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(i=e(i))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(o=s.classList)||void 0===o||o.add("hidden"),a.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);i.dom.appendContent(o,a),i.dom.appendContent(o,s),i.dom.appendContent(t,o),i.dom.appendContent(t,d),c(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),g}();export{h as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as s,e as r}from"./icons-3e9a1686.js";import{T as d,b as c,t as p,R as m}from"./generic-a2327106.js";import{a as u}from"./autoNextVideo-984c1cc4.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-b5ab1ff5.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var y=i.getComponent("Component"),h=function(){l(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=a(h);if(f){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function g(e){var n,l,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(a=b.call(this,e,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=null==i||null===(n=i.playlist)||void 0===n?void 0:n.content,a.cb=(null==i||null===(l=i.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==i||null===(o=i.playlist)||void 0===o?void 0:o.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&u({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(g,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=i.dom.createEl("div",{className:"selection-container hidden"});i.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.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 n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),i.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),o=i.dom.createEl("div",{className:"playlist-selector-head"}),a=i.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var s=i.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=i.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,o,a=i.dom.createEl("div",{className:"playlist-container"}),s=i.dom.createEl("div",{className:"playlist-section",index:t}),r=i.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),c=i.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});i.dom.appendContent(s,r),i.dom.appendContent(s,c),i.dom.appendContent(a,s),i.dom.appendContent(d,a);var u=i.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=i.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.description)||"")}),y=i.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),i.dom.appendContent(u,y),i.dom.appendContent(u,v),i.dom.appendContent(a,u),i.dom.appendContent(d,a),u.onclick=function(e){e.stopPropagation(),m(t+1),p(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,o,i=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(i=e(i))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(o=s.classList)||void 0===o||o.add("hidden"),a.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);i.dom.appendContent(o,a),i.dom.appendContent(o,s),i.dom.appendContent(t,o),i.dom.appendContent(t,d),c(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),g}();export{h as default};
@@ -0,0 +1 @@
1
+ import{b as l}from"./generic-a2327106.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var e,d,v=null==o||null===(e=o.tech_)||void 0===e||null===(d=e.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(t=null==v?void 0:v.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort((function(l,i){return i.height-l.height})))}return t};export{i as g};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import r from"video.js";import{b as s,L as c,d as u}from"./generic-0b03b2d2.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var m=r.getComponent("Component"),p=function(){o(f,m);var s,p,g=(s=f,p=h(),function(){var e,t=d(s);if(p){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,f),o=g.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;o.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(o),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(f,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),o=c(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),s=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(s,l),this.toggleContentOnHover(n,d);var h=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,o,a=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(a,s),r.dom.appendContent(h,a),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",h),"Safari"!=u()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(o,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(h,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,v(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",h)),r.dom.appendContent(s,h),r.dom.appendContent(d,s),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,r,s,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(s=o.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),m=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,v(n.playerId,null,!0)})),r.dom.appendContent(h,m),r.dom.appendContent(t,h)}}}]),f}(),v=function(e,t,n){var i,o=s(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,p,v,g;null==o||null===(m=o.dash)||void 0===m||null===(p=m.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(v=o.dash)||void 0===v||null===(g=v.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(f)}),100);var b=r.dom.$(".content");b&&r.dom.addClass(b,"hidden")}}};export{p as default,v as playSelectedResolution};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import r from"video.js";import{b as s,L as c,d as u}from"./generic-a2327106.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var m=r.getComponent("Component"),p=function(){o(f,m);var s,p,g=(s=f,p=h(),function(){var e,t=d(s);if(p){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,f),o=g.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;o.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(o),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(f,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),o=c(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),s=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(s,l),this.toggleContentOnHover(n,d);var h=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,o,a=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(a,s),r.dom.appendContent(h,a),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",h),"Safari"!=u()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),o=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(o,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(h,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,v(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",h)),r.dom.appendContent(s,h),r.dom.appendContent(d,s),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,r,s,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(s=o.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,v(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),m=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,v(n.playerId,null,!0)})),r.dom.appendContent(h,m),r.dom.appendContent(t,h)}}}]),f}(),v=function(e,t,n){var i,o=s(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,p,v,g;null==o||null===(m=o.dash)||void 0===m||null===(p=m.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(v=o.dash)||void 0===v||null===(g=v.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(f)}),100);var b=r.dom.$(".content");b&&r.dom.addClass(b,"hidden")}}};export{p as default,v as playSelectedResolution};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{S as d,i as p,m as u,q as v,c as m,p as f}from"./generic-0b03b2d2.js";import{s as h}from"./loader-580278fe.js";import{E as g}from"./icons-3e9a1686.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){n(d,C);var e,l,c=(e=d,l=b(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,y=n.playerId,E(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)}))}}]),d}();function L(){return(L=e(l.mark((function e(i,t,s,n){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(y),h(y),v(y,t).then((function(e){m(e.response),f(y)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=d(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){p(e).then((function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map((function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),m=document.querySelector("#episodes-back-btn"),f=e.id,h=e.episodes;m.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach((function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),v[i].addEventListener("click",(function(){return function(e,i,t,s){return L.apply(this,arguments)}(i,h[i].id,t,u)})),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function E(e,i){for(var t='<div class="hover-div"></div>\n '.concat(g(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=d(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}export{E as customSeasonList,k as handleSeasonChange,w as seriesModule};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{S as d,j as p,o as u,t as v,e as m,p as f}from"./generic-a2327106.js";import{s as h}from"./loader-580278fe.js";import{E as g}from"./icons-3e9a1686.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){n(d,C);var e,l,c=(e=d,l=b(),function(){var t,i=a(e);if(l){var s=a(this).constructor;t=Reflect.construct(i,arguments,s)}else t=i.apply(this,arguments);return r(this,t)});function d(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),i=c.call(this,e,n),o(s(i),"seriesData",[]),i.seriesData=n.seriesData,y=n.playerId,E(i.el(),i.seriesData),i.loadCSS(),i}return i(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),d}();function L(){return(L=e(l.mark((function e(t,i,s,n){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(y),h(y),v(y,i).then((function(e){m(e.response),f(y)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=d(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){p(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),m=document.querySelector("#episodes-back-btn"),f=e.id,h=e.episodes;m.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(n,r)}));for(var g=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var s=t.querySelector(".meta-details");t.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),i.forEach((function(t,s){s!==e&&(i[s].classList.remove("episode-active"),i[s].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,u[t],u)})),v[t].addEventListener("click",(function(){return function(e,t,i,s){return L.apply(this,arguments)}(t,h[t].id,i,u)})),e.episodes[t].id==f&&u[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function E(e,t){for(var i='<div class="hover-div"></div>\n '.concat(g(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=d(i);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}export{E as customSeasonList,k as handleSeasonChange,w as seriesModule};