@viewlift/player-backup 1.0.113-backup → 1.0.115-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 (46) hide show
  1. package/cjs/bundle.css +60 -0
  2. package/cjs/{features-a83acb37.js → features-36972b45.js} +1 -1
  3. package/cjs/index.js +1 -1
  4. package/cjs/{series-v2-b0f97573.js → series-v2-96ed6230.js} +1 -1
  5. package/cjs/{series-v2-70137d8c.js → series-v2-fd7485a5.js} +1 -1
  6. package/cjs/{skin-0565f2e5.js → skin-199b9315.js} +1 -1
  7. package/cjs/{skin-bc8e603a.js → skin-5c7e7d6a.js} +1 -1
  8. package/cjs/{skin-d55d63cf.js → skin-b674c800.js} +1 -1
  9. package/cjs/skin-f88bd670.js +1 -0
  10. package/cjs/videoSelector-45ef2413.js +1 -0
  11. package/esm/{autoNextVideo-10772453.js → autoNextVideo-3d3dfaed.js} +1 -1
  12. package/esm/bundle.css +60 -0
  13. package/esm/caption-settings-103eb267.js +1 -0
  14. package/esm/{features-c83f30a5.js → features-e7234941.js} +1 -1
  15. package/esm/{generic-35ac8700.js → generic-5393c30a.js} +1 -1
  16. package/esm/index.js +1 -1
  17. package/esm/{keyboardShortcuts-26306702.js → keyboardShortcuts-4d3e1f4a.js} +1 -1
  18. package/esm/{multicam-8297de3d.js → multicam-239d9dd4.js} +1 -1
  19. package/esm/multicamv2-7f76ae5e.js +1 -0
  20. package/esm/{mwebPotraitTray-418df637.js → mwebPotraitTray-f39ab2d2.js} +1 -1
  21. package/esm/{nextEpisodeButton-c5873361.js → nextEpisodeButton-a467638a.js} +1 -1
  22. package/esm/playlist-3ff92f95.js +1 -0
  23. package/esm/{renditions-de1dd2c1.js → renditions-d35baed6.js} +1 -1
  24. package/esm/{resolution-08c80acf.js → resolution-9b7386f7.js} +1 -1
  25. package/esm/{series-9b9b1cbf.js → series-0152c34c.js} +1 -1
  26. package/esm/{series-v2-0727ee8c.js → series-v2-4cdbf9b1.js} +1 -1
  27. package/esm/series-v2-a15a03ba.js +1 -0
  28. package/esm/settings-icon-6b9eb004.js +1 -0
  29. package/esm/{skin-a7856d38.js → skin-3b78e344.js} +1 -1
  30. package/esm/{skin-91a6372c.js → skin-5ad7755a.js} +1 -1
  31. package/esm/{skin-59e769a9.js → skin-894b232a.js} +1 -1
  32. package/esm/{skin-e737f26f.js → skin-93d3190b.js} +1 -1
  33. package/esm/skin-977d20c5.js +1 -0
  34. package/esm/{skin-24b4285b.js → skin-ce1b7651.js} +1 -1
  35. package/esm/{util-9cc872ef.js → util-13ee59d1.js} +1 -1
  36. package/esm/videoSelector-172c9e41.js +1 -0
  37. package/package.json +1 -1
  38. package/cjs/skin-3b6e5f34.js +0 -1
  39. package/cjs/videoSelector-053a9f3d.js +0 -1
  40. package/esm/caption-settings-48ab9d4e.js +0 -1
  41. package/esm/multicamv2-aa22833f.js +0 -1
  42. package/esm/playlist-b4728a55.js +0 -1
  43. package/esm/series-v2-aaeca5d9.js +0 -1
  44. package/esm/settings-icon-4ae23ee0.js +0 -1
  45. package/esm/skin-7380c3c1.js +0 -1
  46. package/esm/videoSelector-a9d5eec1.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import r from"js-cookie";import a from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var d={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 u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)}function c(e,t){u("event",e,t)}function v(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 m(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?v(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"1.0.116",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"}};window.vl_player_version=f.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F(),params:m({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},w=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:S()+d.getLinearChannelDetails,params:m(m(m(m(m({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===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},g=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:S()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},I=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:O(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:D(),method:"POST",headers:{Authorization:r},data:m({},t),params:m({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),E=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:b(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:_(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},h=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return o({method:"GET",url:y(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:T(i),headers:{Authorization:e.token},timeout:15e3})},T=function(e){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},y=function(){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},b=function(e){return S()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},_=function(e,t){return S()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},O=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},D=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},F=function(){var e,t,n,i,o=S()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},S=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},P=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var R,V,C,W,N,k,B=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L().get(),i=S(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});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)}}(),x=null,j=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!P(t)){e.next=6;break}return x||(x=B().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){x=null}))),e.abrupt("return",x);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},U=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},H=function(e){V=e},z=function(){return V},G=function(e){R=e},Y=function(){return R},q=function(){return C},J=function(e){C=e},X=function(e){N=e},K=function(){return N},Q=function(e){W=new Map,e.map((function(e,t){W.set(e.id,t)}))},Z=function(e){if(W){var t=W.get(e);J(t+1)}},$=(k=0,{set:function(e){e>=0&&(k=e)},get:function(){return k}});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,o,r,a,l=z();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.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 ae.apply(this,arguments)}function ae(){return(ae=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,j();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).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,o,r=Math.floor(e.currentTime());c(r?"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===(o=i.beacon)||void 0===o?void 0:o.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,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("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(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.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 o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))c("BUFFERING",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}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,c("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,o,r,a;c("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}),c("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===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.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),a=i.end(o);if(le(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var le=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=te,e.t1=te,e.t2=te({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.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=20,re();case 20: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===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,j();case 37:f=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39: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 de=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ue=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"},ce=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ve(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 me(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var fe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},we=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},ge=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,f,p,w,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,h=(null==E?void 0:E.contentType)||"video",T=null==E||null===(e=E[h])||void 0===e?void 0:e.metadata,y=$e(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===h?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:we(E,"video.gist.id",""),F=me(me({},he(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:fe(O,_),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===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(E),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+we(E,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:we(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(f=m.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:we(E,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Ee(),VIEWLIFT_SEASON_NUMBER:Ie(),VIEWLIFT_CONTENT_TAGS:pe(E)},null===(p=window)||void 0===p||null===(w=p.customData)||void 0===w?void 0:w.macros);for(var S in F){var P=new RegExp(S,"g");g=g.replace(P,F[S])}return g},Ie=function(){var e=$.get();return e>=0?e+1:1},Ee=function(){var e,t,n,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=$.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},he=function(e){var t,n,i,o,r,a,l={},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===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(ce()?u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=ce()?me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=ce()?me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},Te=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[p])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[p])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,E=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return be(I);if(w){var T=_e(g,t);return T.src=ge(T.src,t,e),T}if("Safari"!==se()&&h)return ye(g);if(E){var y=be(g);return y.src=ge(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,t,e),b}return null},ye=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},be=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},_e=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=se();if($e(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return Oe(t),l}var d,u={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Oe(t),u.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.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 Oe=function(e){var t=$e(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},De=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Fe=function(e,t){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=$e(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},Se=function(e,t){for(var n=$e(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},Pe=function(e){var t,n=$e(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},Ae=function(e){var t=$e(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},Le=function(e,t){var n=$e(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},Re=!1,Ve=function(e,t,n){var i=ge(t,e,n),o=$e(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=$e(e);if(null!==r.el_){Re=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Re&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ce=["live","carousel","V2","defaultV2","multiplayer","minimalist"],We=function(e){return!Ce.includes(e)},Ne=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},ke=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Be=function(e){return ke(e)},xe=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},je=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},Me=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ue="",He=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&Ue!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Ue=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},ze=function(e,t){var n,i=$e(e),o=$e(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){Ge(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){Ge(e,t)}),50)}))},Ge=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function Ye(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}var qe=function(e){i(e).play()},Je=function(e){i(e).pause()},Xe=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ke=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Qe=function(e){return!!i.getPlayer("".concat(e))},Ze=function(e){return i(e).paused()},$e=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},et=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,j();case 3:return r=e.sent,a=$e(t),e.abrupt("return",new Promise((function(e,n){w(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=Te(r,t);H(r),l&&o?(rt(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),tt=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return d=e.sent,Z(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&E(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.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===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,f,p,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;H(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(f=m.adTags)||void 0===f||null===(p=f.web)||void 0===p?void 0:p.url);I&&Ve(t,I,w);var E=Te(w,t);if(E){var h,T,y,b,_,O,D,F,S,P,A,L,R,V,C=(null==w||null===(h=w.video)||void 0===h||null===(T=h.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),W=$e(t);if(W.poster(C),rt(t,E),W.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),W.on("loadeddata",(function(){ue(),e({status:!0,msg:"Video Loaded",response:w})})),W.one("play",(function(){u&&s<95&&setTimeout((function(){W.currentTime(u)}),0)})),W.one("error",(function(){var e;n({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(F=D.closedCaptions)||void 0===F?void 0:F.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0)A=((null==w||null===(L=w.video)||void 0===L||null===(R=L.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==w||null===(V=w.video)||void 0===V?void 0:V.closedCaptions)).filter((function(e){return"VTT"===e.format})),Le(t,A);else Ae(t)}else de(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){at(e,t,n,i)}))})));case 8:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),nt=function(e,t,n){var i=$e(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},it=function(e){var t=$e(e);if(ot(),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,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ot=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()},rt=function(e,t){var n=$e(e);n&&n.src(t)},at=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Qe(n)&&de(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ye(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ye(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},lt=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{Ge as $,M as A,L as B,P as C,We as D,s as E,p as F,at as G,g as H,w as I,E as J,Me as K,Ve as L,De as M,Le as N,$ as O,G as P,ke as Q,Be as R,Y as S,q as T,ce as U,xe as V,Ze as W,J as X,Ae as Y,Ne as Z,je as _,z as a,He as a0,ze as a1,Q as a2,Z as a3,Te as b,H as c,se as d,ue as e,K as f,$e as g,de as h,h as i,X as j,nt as k,rt as l,Xe as m,Je as n,Qe as o,qe as p,tt as q,Ke as r,I as s,et as t,it as u,Fe as v,Se as w,Pe as x,lt as y,U as z};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import r from"js-cookie";import a from"ua-parser-js";import l from"@babel/runtime/helpers/toConsumableArray";var d={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 u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)}function c(e,t){u("event",e,t)}function v(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 m(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?v(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var f={name:"@viewlift/player",version:"1.0.116",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"}};window.vl_player_version=f.version;var p=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:F(),params:m({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},w=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:S()+d.getLinearChannelDetails,params:m(m(m(m(m({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===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},g=function(e,t){var n,i,r=JSON.parse(atob(t.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:S()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},I=function(){var e=t(n.mark((function e(t,i){var r,a;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:if(r=e.sent,"v1"!=i){e.next=8;break}return a={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",o({url:O(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=i){e.next=10;break}return e.abrupt("return",o({url:D(),method:"POST",headers:{Authorization:r},data:m({},t),params:m({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),E=function(e,t){var n,i,r=(null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(t.split(".")[1])),u=(null==d?void 0:d.site)||null;return o({method:"GET",url:b(e),params:{site:u},headers:{Authorization:t,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return o({method:"GET",url:_(e,v),headers:{Authorization:t,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},h=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return o({method:"GET",url:y(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var i=e.videoId;return o({method:"GET",url:T(i),headers:{Authorization:e.token},timeout:15e3})},T=function(e){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV2,"/").concat(e)},y=function(){return S()+"".concat(null==d?void 0:d.getSeriesWatchHistoryV1)},b=function(e){return S()+"".concat(null==d?void 0:d.getVideoInfoV1,"/").concat(e)},_=function(e,t){return S()+"".concat(null==d?void 0:d.getVideoInfoV2,"/").concat(t,"/").concat(e)},O=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV1)},D=function(){return S()+"".concat(null==d?void 0:d.saveWatchHistoryV2)},F=function(){var e,t,n,i,o=S()+"".concat(null==d?void 0:d.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":o},S=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==d?void 0:d.apiBaseUrl)},P=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var R,V,C,W,N,k,B=function(){var e=t(n.mark((function e(){var t,i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=L().get(),i=S(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});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)}}(),x=null,j=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!P(t)){e.next=6;break}return x||(x=B().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){x=null}))),e.abrupt("return",x);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},U=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},H=function(e){V=e},z=function(){return V},G=function(e){R=e},Y=function(){return R},q=function(){return C},J=function(e){C=e},X=function(e){N=e},K=function(){return N},Q=function(e){W=new Map,e.map((function(e,t){W.set(e.id,t)}))},Z=function(e){if(W){var t=W.get(e);J(t+1)}},$=(k=0,{set:function(e){e>=0&&(k=e)},get:function(){return k}});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,o,r,a,l=z();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.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 ae.apply(this,arguments)}function ae(){return(ae=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,j();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).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,o,r=Math.floor(e.currentTime());c(r?"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===(o=i.beacon)||void 0===o?void 0:o.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,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),c("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(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.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 o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))c("BUFFERING",te({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}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,c("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,o,r,a;c("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}),c("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===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.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),a=i.end(o);if(le(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var le=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=te,e.t1=te,e.t2=te({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.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=20,re();case 20: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===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),m=[e.t31],e.next=37,j();case 37:f=e.sent,o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:m}).catch((function(e){console.error(e)}));case 39: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 de=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},ue=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.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"},ce=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};function ve(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 me(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ve(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=a(navigator.userAgent);var fe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},pe=function(e){var t=we(e,"video.tags",[]),n=we(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},we=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},ge=function(){var e,t,n,i,o,a,l,d,u,s,c,v,m,f,p,w,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,h=(null==E?void 0:E.contentType)||"video",T=null==E||null===(e=E[h])||void 0===e?void 0:e.metadata,y=$e(I);if(!g.includes("VIEWLIFT_"))return g;var b=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(b.getPropertyValue("height").slice(0,-2)),O=Math.trunc(b.getPropertyValue("width").slice(0,-2)),D="linearchannel"===h?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:we(E,"video.gist.id",""),F=me(me({},he(T)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:fe(O,_),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===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==y||null===(l=y.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==y||null===(d=y.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:pe(E),VIEWLIFT_MEDIA_ID:D,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:D,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+we(E,"video.gist.permalink","")),VIEWLIFT_CONSENT:r.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.site)||void 0===c?void 0:c.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:we(null===(v=window)||void 0===v||null===(m=v.app_data)||void 0===m||null===(f=m.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(E,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:D,VIEWLIFT_CONTENT_TITLE:we(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:we(E,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(E,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Ee(),VIEWLIFT_SEASON_NUMBER:Ie(),VIEWLIFT_CONTENT_TAGS:pe(E)},null===(p=window)||void 0===p||null===(w=p.customData)||void 0===w?void 0:w.macros);for(var S in F){var P=new RegExp(S,"g");g=g.replace(P,F[S])}return g},Ie=function(){var e=$.get();return e>=0?e+1:1},Ee=function(){var e,t,n,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=$.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},he=function(e){var t,n,i,o,r,a,l={},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===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return u||s?(ce()?u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):s&&(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=ce()?me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=me(me({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=ce()?me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):me(me({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},Te=function(e,t){var n,i,o,r,a,l,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[p])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[p])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,I=null==e||null===(r=e[p])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,E=(null==e||null===(l=e[p])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=I&&I.hls)return be(I);if(w){var T=_e(g,t);return T.src=ge(T.src,t,e),T}if("Safari"!==se()&&h)return ye(g);if(E){var y=be(g);return y.src=ge(y.src,t,e),y}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,t,e),b}return null},ye=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},be=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},_e=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=se();if($e(t),"Safari"===a){var l=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return Oe(t),l}var d,u={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(Oe(t),u.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.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 Oe=function(e){var t=$e(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},De=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Fe=function(e,t){var n,i,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.style)||void 0===o||o.setProperty("display","flex"));for(var r=$e(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},Se=function(e,t){for(var n=$e(e).textTracks(),i=0;i<n.length;i++){var o=n[i];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==t||(o.mode="hidden")}},Pe=function(e){var t,n=$e(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},Ae=function(e){var t=$e(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},Le=function(e,t){var n=$e(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},Re=!1,Ve=function(e,t,n){var i=ge(t,e,n),o=$e(e);t&&window.google&&(o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,r=$e(e);if(null!==r.el_){Re=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),Re&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),r.one(d,(function(){u&&r.ima.initializeAdDisplayContainer()}));var s=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;r.one("ads-ad-started",(function(){s&&s({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){s&&s({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){s&&s({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i))},Ce=["live","carousel","V2","defaultV2","multiplayer","minimalist"],We=function(e){return!Ce.includes(e)},Ne=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},ke=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},Be=function(e){return ke(e)},xe=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},je=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},Me=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Ue="",He=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&Ue!==n){var o=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(o)),Ue=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){i()}),100)}))},ze=function(e,t){var n,i=$e(e),o=$e(e).el(),r=new ResizeObserver((function(){var i;null!==(i=t.classList)&&void 0!==i&&i.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){Ge(e,t)}),200))}));r.observe(o),i.on("dispose",(function(){r.disconnect()})),i.on("fullscreenchange",(function(){setTimeout((function(){Ge(e,t)}),50)}))},Ge=function(e,t){var n;if(t){var i=document.getElementById(e),o=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==o&&(t.style.height="".concat(o))}};function Ye(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}var qe=function(e){i(e).play()},Je=function(e){i(e).pause()},Xe=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ke=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Qe=function(e){return!!i.getPlayer("".concat(e))},Ze=function(e){return i(e).paused()},$e=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},et=function(){var e=t(n.mark((function e(t,i){var o,r,a,l=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]&&l[2],e.next=3,j();case 3:return r=e.sent,a=$e(t),e.abrupt("return",new Promise((function(e,n){w(i,r).then((function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=Te(r,t);H(r),l&&o?(rt(t,l),a.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),tt=function(){var e=t(n.mark((function e(t,i,o){var r,a,l,d,u,s;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j();case 2:return d=e.sent,Z(i),u=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&E(i,d).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.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===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){p(i,d).then((function(i){var o,r,a,l,d,c,v,m,f,p,w=null==i?void 0:i.data,g=(null==w||null===(o=w.video)||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;H(i.data);var I=(null==w||null===(a=w.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==w||null===(v=w.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(f=m.adTags)||void 0===f||null===(p=f.web)||void 0===p?void 0:p.url);I&&Ve(t,I,w);var E=Te(w,t);if(E){var h,T,y,b,_,O,D,F,S,P,A,L,R,V,C=(null==w||null===(h=w.video)||void 0===h||null===(T=h.gist)||void 0===T?void 0:T.videoImageUrl)||(null==w||null===(y=w.video)||void 0===y||null===(b=y.gist)||void 0===b||null===(_=b.imageGist)||void 0===_?void 0:_.r16x9),W=$e(t);if(W.poster(C),rt(t,E),W.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:w})})),W.on("loadeddata",(function(){ue(),e({status:!0,msg:"Video Loaded",response:w})})),W.one("play",(function(){u&&s<95&&setTimeout((function(){W.currentTime(u)}),0)})),W.one("error",(function(){var e;n({status:!1,msg:(null==W||null===(e=W.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==w||null===(O=w.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(F=D.closedCaptions)||void 0===F?void 0:F.length)>0||(null==w||null===(S=w.video)||void 0===S||null===(P=S.closedCaptions)||void 0===P?void 0:P.length)>0)A=((null==w||null===(L=w.video)||void 0===L||null===(R=L.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==w||null===(V=w.video)||void 0===V?void 0:V.closedCaptions)).filter((function(e){return"VTT"===e.format})),Le(t,A);else Ae(t)}else de(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){at(e,t,n,i)}))})));case 8:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),nt=function(e,t,n){var i=$e(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},it=function(e){var t=$e(e);if(ot(),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,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ot=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()},rt=function(e,t){var n=$e(e);n&&n.src(t)},at=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Qe(n)&&de(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ye(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ye(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},lt=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{Z as $,M as A,L as B,P as C,We as D,s as E,p as F,at as G,g as H,w as I,E as J,Me as K,Ve as L,De as M,Le as N,$ as O,G as P,ke as Q,Be as R,q as S,Y as T,ce as U,xe as V,Ze as W,J as X,Ae as Y,Ne as Z,Q as _,z as a,je as a0,Ge as a1,He as a2,ze as a3,Te as b,H as c,se as d,ue as e,K as f,$e as g,de as h,h as i,X as j,nt as k,rt as l,Xe as m,Je as n,Qe as o,qe as p,tt as q,Ke as r,I as s,et as t,it as u,Fe as v,Se as w,Pe as x,lt as y,U as z};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import{d as e,g as n,s as t,a as o,b as i,l,c as r,e as a,h as s,f as u,i as d,j as c,k as v,m,p,n as f,r as w,o as h,q as y,t as g,u as b,v as k,w as j,x as I,y as O,z as T,A as P,B as S,C,D as x,E as D,F as R,G as A,H as E,I as B,J as V,K as H,L,M as _,N as M,O as N,P as U}from"./generic-35ac8700.js";import F from"@babel/runtime/helpers/asyncToGenerator";import q from"@babel/runtime/helpers/defineProperty";import z from"@babel/runtime/regenerator";import J from"video.js";import G from"@babel/runtime/helpers/typeof";import{o as K,g as X,a as W,s as Y,b as Q}from"./util-9cc872ef.js";import{g as Z}from"./renditions-de1dd2c1.js";import{playSelectedResolution as $}from"./resolution-08c80acf.js";import{s as ee}from"./localisation-0bf399a1.js";import"axios";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";var ne,te,oe=function(e){return new Promise((function(n,t){if(ie(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}}))},ie=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},le=function(){var t=F(z.mark((function t(o){var i,l,r,a;return z.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(null==o?void 0:o.playerId),null!=o&&null!==(i=o.series)&&void 0!==i&&i.enable||null==o||!o.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return a=t.sent,t.prev=5,t.next=8,oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,a.default(J),t.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=o&&o.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return t.apply(this,arguments)}}(),re=function(e,t){var o=n(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,r,a=this.el(),s=J.dom.getPointerPosition(a,n).x;J.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.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 ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ue=[],de=0,ce=null;function ve(e,n,i){var l,r,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];te=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.apiVersion)||"v1";var c=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),m=Math.floor(e.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,f=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,w=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,h=Math.floor(e.currentTime()),y=d?100:Math.floor(v/m*100),g={};w?function(e,n,t){var i=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),l=me(i),r=(new Date).getTime(),a=o(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return se(se({},e),{},q({},n,s[n]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ne}));d<0?l.push(se(se({content:u},e),{},{addedDate:r,updateDate:r})):l[d]=se(se(se({},l[d]),e),{},{updateDate:r});localStorage.setItem("".concat(i),JSON.stringify(l))}(g={completed:d,watchedTime:h,watchedPercentage:y},c,n.siteOwner):("v1"==te?g={videoId:ne,watchedTime:h,watchedPercentage:y,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==te&&(g=se(se({videoId:ne,watchedTime:h,watchedPercentage:y,doneWatching:d,profileId:c},ce&&{seriesId:ce}),f&&{originalObjectId:f})),t(g,te).then((function(e){})).catch((function(e){}))),de=v+i}function me(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}var pe=function(e,t,o){var i=n(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var l=parseFloat(t)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},fe=function(e){var t=n(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},we=!1,he=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!we){var a=ye(e,"videoAssets","secondaryVideoAssets"),s=i(a,n);return s&&l(n,s),we=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ye(e,n,t){if(Array.isArray(e))return e.map((function(e){return ye(e,n,t)}));if(null!==e&&"object"===G(e)){var o={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=ye(e[i],n,t)})),o}return e}function ge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ge(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e,t,i,l){var d,c,v=l.res,m=l.sres,p=n(e),f=(null==v?void 0:v.contentType)||"video",w=(null==v||null===(d=v[f])||void 0===d||null===(c=d.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;r(v),p&&(p.on("loadstart",(function(){w&&i.resolve({status:!0,msg:"Video Loaded",response:v})})),p.on("loadeddata",(function(){var l,r;(null==p||!p.muted())&&pe(e,sessionStorage.getItem("volume")||"100");var s=o();if(a(),i.resolve(be({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:v}:{response:v})),null!=t&&t.watchHistory&&null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var u,d,c=be(be({},t),v);!function(e,t,o){var i,l,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ce=null==t||null===(l=t.series)||void 0===l?void 0:l.id),ue=[],de=0,ne=o;var a=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=n(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());ue.includes(de)||(e==de?(ue.push(e),ve(s,t,a)):e>de&&(de=e+a))})),s.one("ended",(function(){ve(s,t,a,!0)})))}(e,c,null==s||null===(u=s.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.id)}})),p.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];p.trigger("subtitlechanged",n)})),p.on("subtitlechanged",(function(e,n){var t,o,i,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=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 f,w=p.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),p.on("loadedmetadata",(function(){window.endFirstFrame(p)})),p.tech_.on("retryplaylist",(function(){w&&he(v,e)})),p.on("error",(function(){var n,t;4===p.error().code&&w?he(v,e):(s(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,l,r=null===(n=o())||void 0===n||null===(i=n.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.id,a=u().get(r)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){p.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),p.on("volumechange",(function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),p.on("chromecastDisconnected",(function(){if(w){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})))},je=function(e,n){var t=null==n?void 0:n.skin;"live"==t?import("./skin-e737f26f.js").then((function(t){t.initialiseSkin(e,n)})):"default"==t?import("./skin-24b4285b.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-59e769a9.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-7380c3c1.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-a7856d38.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t&&import("./skin-91a6372c.js").then((function(t){t.initaliseSkin(e,n)}))},Ie=function(e,n){n.controlBar.el_.style.color=e,n.controlBar.el_.querySelector(".vjs-play-progress")&&(n.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),n.controlBar.el_.querySelector(".vjs-volume-level")&&(n.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var Oe,Te=function(){var e=F(z.mark((function e(){return z.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)}}(),Pe=function(){var e=F(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){J.getPlugin("eme")||J.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(J)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(J)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),oe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Te,loadEMELibrary:Pe});function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De=function(t,o,r,a){var u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A,E,B,V,N,U,G,K,X,W,Y,Q=o.res,Z=void 0===Q?null:Q,$=o.sres,ee=void 0===$?null:$;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(m=v.getInstance())||void 0===m||m.S;var ne=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(p=Z)||void 0===p?void 0:p.contentType)||"video",oe=H(null===(f=Z)||void 0===f||null===(w=f[te])||void 0===w||null===(h=w.gist)||void 0===h?void 0:h.videoImageUrl)||H(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),ie=(null===(j=Z)||void 0===j||null===(I=j[te])||void 0===I||null===(T=I.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,ae=(null===(P=Z)||void 0===P||null===(S=P[te])||void 0===S||null===(C=S.streamingInfo)||void 0===C?void 0:C.isLiveStream)||!1,se=(null==r?void 0:r.drmLibrary)||!1,ue=(null===(x=Z)||void 0===x||null===(D=x.ads)||void 0===D||null===(R=D.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(E=A.web)||void 0===E?void 0:E.active)&&(null===(B=Z)||void 0===B||null===(V=B.ads)||void 0===V||null===(N=V.preRoll)||void 0===N||null===(U=N.adTags)||void 0===U||null===(G=U.web)||void 0===G?void 0:G.url);Z=xe(xe({},Z),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var de=(Y={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},q(Y,"autoplay",null==r?void 0:r.autoplay),q(Y,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!ue),q(Y,"loop",(null==r?void 0:r.loop)||!1),q(Y,"audioPosterMode",null==r?void 0:r.audioPosterMode),q(Y,"html5",xe(xe({dash:xe(xe({},!J.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}}}}},null==r?void 0:r.dash),vhs:xe(xe({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(K=r.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(X=r.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(W=r.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),q(Y,"poster",oe),q(Y,"techOrder",ne),q(Y,"chromecast",{requestCustomDataFn:function(e){var o=n(t),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,l,r,a,s,u,d,c,v,m=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){p.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;p.licenseUrl=f;var w=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];p.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";p.contentType=h;var y=null==e||null===(l=e[m])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=y;var g=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=g;var b=null==e||null===(u=e[m])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,e,i)}}),Y);if(!J.getPlayers()[t])var ce=J(t,de,function(){var n=F(z.mark((function n(){var o,u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A;return z.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,le(r);case 2:if(ae&&a.resolve(xe({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),window.initialise(ce),window.firstFrame(ce),"white"!==window.controlsColor&&Ie(window.controlsColor,ce),/Android/i.test(navigator.userAgent)&&(J.options.vhs.overrideNative=!0),k=null===(o=Z)||void 0===o||null===(u=o[te])||void 0===u?void 0:u.drmEnabled,j=null===(d=Z)||void 0===d||null===(c=d[te])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!se){n.next=22;break}if("Safari"!==e()){n.next=15;break}return n.next=13,Pe();case 13:n.next=22;break;case 15:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){n.next=20;break}return n.next=18,Pe();case 18:n.next=22;break;case 20:return n.next=22,Te();case 22:if(null==r||!r.videoSourceUrl){n.next=25;break}return n.next=25,Te();case 25:ie&&re(t,j),!ue||null!=r&&null!==(m=r.customData)&&void 0!==m&&m.disableAds||L(t,ue,Z),T=i(Z,t),null!=r&&r.nearestClusterUrl&&(T=_(T,r.nearestClusterUrl)),T?l(t,T):(a.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),s(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Z)||void 0===p||null===(f=p[te])||void 0===f||null===(w=f.contentDetails)||void 0===w||null===(h=w.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.closedCaptions)||void 0===b?void 0:b.length)>0)&&(A=(null===(S=Z)||void 0===S||null===(C=S[te])||void 0===C||null===(x=C.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(D=Z)||void 0===D||null===(R=D[te])||void 0===R?void 0:R.closedCaptions),P=A.filter((function(e){return"VTT"===e.format})),M(t,P)),null!=r&&r.disableControls?O(t):je(t,xe(xe(xe({},r),de),{},{liveVideo:ae,isDvrEnabled:ie,res:Z,sres:ee})),ke(t,xe(xe(xe({},r),de),{},{liveVideo:ae}),a,{res:Z,sres:ee});case 33:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Re(){return{loadVideoInstantly:v,onTimeUpdate:K,getVideoDuration:X,onVideoEnded:W,init:function(n){return new Promise((function(t,o){var i,l,a,s,u,v,m,p,f,w,y;if(!h(null==n?void 0:n.playerId)){var g=(null==n?void 0:n.videoSourceUrl)||!1,b=null==n?void 0:n.asat,k=(null==n||null===(i=n.epg)||void 0===i?void 0:i.enable)||!1,j=null==n?void 0:n.videoId,I=(null==n||null===(l=n.series)||void 0===l?void 0:l.enable)||!1;window.videoId=j;var O=null==n?void 0:n.token;if(P(n)){if(S().set(null==n?void 0:n.refreshToken),!O||C(O))return void o({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}});Oe=JSON.parse(atob(O.split(".")[1]))}window.siteId=null===(a=Oe)||void 0===a?void 0:a.siteId,window.siteName=null===(s=Oe)||void 0===s?void 0:s.site,n.isAnonymousUser=!(null===(u=Oe)||void 0===u||!u.anonymousId),n.siteOwner=(null===(v=Oe)||void 0===v?void 0:v.site)||null,n.userId=(null===(m=Oe)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(p=Oe)||void 0===p?void 0:p.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",O);var T=null==n?void 0:n.playerId;n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId;var H=null==n?void 0:n.airplay,L=null==n?void 0:n.apiBaseUrl,_=(null==n||null===(f=n.analytics)||void 0===f?void 0:f.gaId)||null,M=null==n?void 0:n.errors;M&&(window.customErrors=M),window.customData=null==n?void 0:n.customData,ee(null==n||null===(w=n.customData)||void 0===w?void 0:w.localisation),L&&(window.playerEntitlementUrl=L),window.controlsColor=(null==n?void 0:n.controlsColor)||"white",null!=n&&n.skin&&!x(n.skin)||(n.skin="defaultV2"),Promise.resolve().then((function(){return Se})).then((function(e){e.importIMA()})),H&&"Safari"==e()&&Promise.resolve().then((function(){return Se})).then((function(e){e.importAirplay()})),_&&oe("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then((function(){return D(_)})).catch((function(e){}));var F=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(T));if(F&&F.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var q="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",z={directPlaybackUrl:g,id:q};b?R(q,O).then((function(e){De(T,{res:xe(xe({},e),z)},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,q)})):De(T,{res:z},n,{resolve:t,reject:o})}else if(I){var J,G=sessionStorage.getItem("season-idx")||0;N.set(parseInt(G));var K=null==n||null===(J=n.series)||void 0===J?void 0:J.id;E(K,O).then((function(e){var i,l,a,s=e.data,u=e.data.seasons;U(u);var v=j||(null==u||null===(i=u[0])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(e,n){var t=new Map;d({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),c(t)})).catch((function(e){return console.log(e)}))}(K,O),R(v,O).then((function(e){var i,l,a;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(e.data),De(T,{res:null==e?void 0:e.data,sres:s},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))})).catch((function(e){A(e,T,o)}))}else if(k){var X=null==n?void 0:n.epg;B(X,O).then((function(e){var i=null==e?void 0:e.data;i.contentType="linearchannel",i.channelId=null==X?void 0:X.channelId,De(T,{res:i},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}else R(j,O).then((function(e){var i,l,a,s;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(null==e?void 0:e.data);var u,d=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,m,p=function(e,n,t){var o=me(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",j,null==n?void 0:n.siteOwner);if(p&&p.length)n.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;d.contentType="video",De(T,{res:d},n,{resolve:t,reject:o})}else V(j,O).then((function(e){var i,l,r,a,s,u;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",De(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){var i,l,r,a;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(e)),De(T,{res:d},n,{resolve:t,reject:o})}));else De(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}}))},getRenditions:Z,skip:m,getPlayer:n,play:p,pause:f,detectBrowser:e,rewind:w,loadVideo:l,seekToTimeStamp:Y,isPlayerInitialised:h,load:y,authenticateLC:g,dispose:b,enableCaptions:k,disableCaptions:j,getCaptions:I,playSelectedResolution:$,getSource:i,setVolume:pe,getVolume:fe,disableControls:O,setPlaybackSpeed:Q,getEntitlementData:T}}export{Re as default};
1
+ import"video.js/dist/video-js.min.css";import{d as e,g as n,s as t,a as o,b as i,l,c as r,e as a,h as s,f as u,i as d,j as c,k as v,m,p,n as f,r as w,o as h,q as y,t as g,u as b,v as k,w as j,x as I,y as O,z as T,A as P,B as S,C,D as x,E as D,F as R,G as A,H as E,I as B,J as V,K as H,L,M as _,N as M,O as N,P as U}from"./generic-5393c30a.js";import F from"@babel/runtime/helpers/asyncToGenerator";import q from"@babel/runtime/helpers/defineProperty";import z from"@babel/runtime/regenerator";import J from"video.js";import G from"@babel/runtime/helpers/typeof";import{o as K,g as X,a as W,s as Y,b as Q}from"./util-13ee59d1.js";import{g as Z}from"./renditions-d35baed6.js";import{playSelectedResolution as $}from"./resolution-9b7386f7.js";import{s as ee}from"./localisation-0bf399a1.js";import"axios";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";var ne,te,oe=function(e){return new Promise((function(n,t){if(ie(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}}))},ie=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},le=function(){var t=F(z.mark((function t(o){var i,l,r,a;return z.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(null==o?void 0:o.playerId),null!=o&&null!==(i=o.series)&&void 0!==i&&i.enable||null==o||!o.chromecastReceiverId){t.next=20;break}return t.next=4,import("@silvermine/videojs-chromecast");case 4:return a=t.sent,t.prev=5,t.next=8,oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:t.next=13;break;case 10:t.prev=10,t.t0=t.catch(5),console.log("Error",t.t0);case 13:return t.prev=13,a.default(J),t.finish(13);case 16:null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=o&&o.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"default"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return t.stop()}}),t,null,[[5,10,13,16]])})));return function(e){return t.apply(this,arguments)}}(),re=function(e,t){var o=n(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,r,a=this.el(),s=J.dom.getPointerPosition(a,n).x;J.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.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 ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function se(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ue=[],de=0,ce=null;function ve(e,n,i){var l,r,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];te=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.apiVersion)||"v1";var c=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),m=Math.floor(e.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,f=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,w=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,h=Math.floor(e.currentTime()),y=d?100:Math.floor(v/m*100),g={};w?function(e,n,t){var i=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),l=me(i),r=(new Date).getTime(),a=o(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return se(se({},e),{},q({},n,s[n]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ne}));d<0?l.push(se(se({content:u},e),{},{addedDate:r,updateDate:r})):l[d]=se(se(se({},l[d]),e),{},{updateDate:r});localStorage.setItem("".concat(i),JSON.stringify(l))}(g={completed:d,watchedTime:h,watchedPercentage:y},c,n.siteOwner):("v1"==te?g={videoId:ne,watchedTime:h,watchedPercentage:y,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==te&&(g=se(se({videoId:ne,watchedTime:h,watchedPercentage:y,doneWatching:d,profileId:c},ce&&{seriesId:ce}),f&&{originalObjectId:f})),t(g,te).then((function(e){})).catch((function(e){}))),de=v+i}function me(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}var pe=function(e,t,o){var i=n(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var l=parseFloat(t)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},fe=function(e){var t=n(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},we=!1,he=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!we){var a=ye(e,"videoAssets","secondaryVideoAssets"),s=i(a,n);return s&&l(n,s),we=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ye(e,n,t){if(Array.isArray(e))return e.map((function(e){return ye(e,n,t)}));if(null!==e&&"object"===G(e)){var o={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=ye(e[i],n,t)})),o}return e}function ge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function be(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ge(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ke=function(e,t,i,l){var d,c,v=l.res,m=l.sres,p=n(e),f=(null==v?void 0:v.contentType)||"video",w=(null==v||null===(d=v[f])||void 0===d||null===(c=d.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;r(v),p&&(p.on("loadstart",(function(){w&&i.resolve({status:!0,msg:"Video Loaded",response:v})})),p.on("loadeddata",(function(){var l,r;(null==p||!p.muted())&&pe(e,sessionStorage.getItem("volume")||"100");var s=o();if(a(),i.resolve(be({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:v}:{response:v})),null!=t&&t.watchHistory&&null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.enable&&(!t.isAnonymousUser||null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var u,d,c=be(be({},t),v);!function(e,t,o){var i,l,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ce=null==t||null===(l=t.series)||void 0===l?void 0:l.id),ue=[],de=0,ne=o;var a=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=n(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());ue.includes(de)||(e==de?(ue.push(e),ve(s,t,a)):e>de&&(de=e+a))})),s.one("ended",(function(){ve(s,t,a,!0)})))}(e,c,null==s||null===(u=s.video)||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.id)}})),p.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];p.trigger("subtitlechanged",n)})),p.on("subtitlechanged",(function(e,n){var t,o,i,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=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 f,w=p.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(f)}})),p.on("loadedmetadata",(function(){window.endFirstFrame(p)})),p.tech_.on("retryplaylist",(function(){w&&he(v,e)})),p.on("error",(function(){var n,t;4===p.error().code&&w?he(v,e):(s(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,l,r=null===(n=o())||void 0===n||null===(i=n.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.id,a=u().get(r)||{t:0,p:0},s=a.t,d=a.p;s&&d<95&&setTimeout((function(){p.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),p.on("volumechange",(function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),p.on("chromecastDisconnected",(function(){if(w){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})))},je=function(e,n){var t=null==n?void 0:n.skin;"live"==t?import("./skin-93d3190b.js").then((function(t){t.initialiseSkin(e,n)})):"default"==t?import("./skin-ce1b7651.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-894b232a.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-977d20c5.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-3b78e344.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t&&import("./skin-5ad7755a.js").then((function(t){t.initaliseSkin(e,n)}))},Ie=function(e,n){n.controlBar.el_.style.color=e,n.controlBar.el_.querySelector(".vjs-play-progress")&&(n.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),n.controlBar.el_.querySelector(".vjs-volume-level")&&(n.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};var Oe,Te=function(){var e=F(z.mark((function e(){return z.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)}}(),Pe=function(){var e=F(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){J.getPlugin("eme")||J.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){oe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(J)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(J)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),oe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:Te,loadEMELibrary:Pe});function Ce(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function xe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ce(Object(t),!0).forEach((function(n){q(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De=function(t,o,r,a){var u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A,E,B,V,N,U,G,K,X,W,Y,Q=o.res,Z=void 0===Q?null:Q,$=o.sres,ee=void 0===$?null:$;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(m=v.getInstance())||void 0===m||m.S;var ne=null!=r&&r.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(p=Z)||void 0===p?void 0:p.contentType)||"video",oe=H(null===(f=Z)||void 0===f||null===(w=f[te])||void 0===w||null===(h=w.gist)||void 0===h?void 0:h.videoImageUrl)||H(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.gist)||void 0===b||null===(k=b.imageGist)||void 0===k?void 0:k.r16x9),ie=(null===(j=Z)||void 0===j||null===(I=j[te])||void 0===I||null===(T=I.liveDetails)||void 0===T?void 0:T.isDvrEnabled)||!1,ae=(null===(P=Z)||void 0===P||null===(S=P[te])||void 0===S||null===(C=S.streamingInfo)||void 0===C?void 0:C.isLiveStream)||!1,se=(null==r?void 0:r.drmLibrary)||!1,ue=(null===(x=Z)||void 0===x||null===(D=x.ads)||void 0===D||null===(R=D.preRoll)||void 0===R||null===(A=R.adTags)||void 0===A||null===(E=A.web)||void 0===E?void 0:E.active)&&(null===(B=Z)||void 0===B||null===(V=B.ads)||void 0===V||null===(N=V.preRoll)||void 0===N||null===(U=N.adTags)||void 0===U||null===(G=U.web)||void 0===G?void 0:G.url);Z=xe(xe({},Z),{},{audioAssetSource:null==r?void 0:r.audioAssetSource});var de=(Y={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},q(Y,"autoplay",null==r?void 0:r.autoplay),q(Y,"normalizeAutoplay",(null==r?void 0:r.autoplay)&&!ue),q(Y,"loop",(null==r?void 0:r.loop)||!1),q(Y,"audioPosterMode",null==r?void 0:r.audioPosterMode),q(Y,"html5",xe(xe({dash:xe(xe({},!J.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}}}}},null==r?void 0:r.dash),vhs:xe(xe({experimentalLLHLS:(null==r?void 0:r.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==r||null===(K=r.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==r?void 0:r.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==r?void 0:r.experimentalBufferBasedABR)||!1})},0==(null==r||null===(X=r.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==r||null===(W=r.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),q(Y,"poster",oe),q(Y,"techOrder",ne),q(Y,"chromecast",{requestCustomDataFn:function(e){var o=n(t),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,l,r,a,s,u,d,c,v,m=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){p.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;p.licenseUrl=f;var w=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];p.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";p.contentType=h;var y=null==e||null===(l=e[m])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=y;var g=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=g;var b=null==e||null===(u=e[m])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,e,i)}}),Y);if(!J.getPlayers()[t])var ce=J(t,de,function(){var n=F(z.mark((function n(){var o,u,d,c,v,m,p,f,w,h,y,g,b,k,j,I,T,P,S,C,x,D,R,A;return z.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,le(r);case 2:if(ae&&a.resolve(xe({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),window.initialise(ce),window.firstFrame(ce),"white"!==window.controlsColor&&Ie(window.controlsColor,ce),/Android/i.test(navigator.userAgent)&&(J.options.vhs.overrideNative=!0),k=null===(o=Z)||void 0===o||null===(u=o[te])||void 0===u?void 0:u.drmEnabled,j=null===(d=Z)||void 0===d||null===(c=d[te])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!k&&!se){n.next=22;break}if("Safari"!==e()){n.next=15;break}return n.next=13,Pe();case 13:n.next=22;break;case 15:if("caliente"!=(null===(I=window)||void 0===I?void 0:I.siteName)){n.next=20;break}return n.next=18,Pe();case 18:n.next=22;break;case 20:return n.next=22,Te();case 22:if(null==r||!r.videoSourceUrl){n.next=25;break}return n.next=25,Te();case 25:ie&&re(t,j),!ue||null!=r&&null!==(m=r.customData)&&void 0!==m&&m.disableAds||L(t,ue,Z),T=i(Z,t),null!=r&&r.nearestClusterUrl&&(T=_(T,r.nearestClusterUrl)),T?l(t,T):(a.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),s(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=Z)||void 0===p||null===(f=p[te])||void 0===f||null===(w=f.contentDetails)||void 0===w||null===(h=w.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(y=Z)||void 0===y||null===(g=y[te])||void 0===g||null===(b=g.closedCaptions)||void 0===b?void 0:b.length)>0)&&(A=(null===(S=Z)||void 0===S||null===(C=S[te])||void 0===C||null===(x=C.contentDetails)||void 0===x?void 0:x.closedCaptions)||(null===(D=Z)||void 0===D||null===(R=D[te])||void 0===R?void 0:R.closedCaptions),P=A.filter((function(e){return"VTT"===e.format})),M(t,P)),null!=r&&r.disableControls?O(t):je(t,xe(xe(xe({},r),de),{},{liveVideo:ae,isDvrEnabled:ie,res:Z,sres:ee})),ke(t,xe(xe(xe({},r),de),{},{liveVideo:ae}),a,{res:Z,sres:ee});case 33:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Re(){return{loadVideoInstantly:v,onTimeUpdate:K,getVideoDuration:X,onVideoEnded:W,init:function(n){return new Promise((function(t,o){var i,l,a,s,u,v,m,p,f,w,y;if(!h(null==n?void 0:n.playerId)){var g=(null==n?void 0:n.videoSourceUrl)||!1,b=null==n?void 0:n.asat,k=(null==n||null===(i=n.epg)||void 0===i?void 0:i.enable)||!1,j=null==n?void 0:n.videoId,I=(null==n||null===(l=n.series)||void 0===l?void 0:l.enable)||!1;window.videoId=j;var O=null==n?void 0:n.token;if(P(n)){if(S().set(null==n?void 0:n.refreshToken),!O||C(O))return void o({status:!1,msg:"".concat(O?"Token is expired !":"Missing Authorization Token"),response:{token:O}});Oe=JSON.parse(atob(O.split(".")[1]))}window.siteId=null===(a=Oe)||void 0===a?void 0:a.siteId,window.siteName=null===(s=Oe)||void 0===s?void 0:s.site,n.isAnonymousUser=!(null===(u=Oe)||void 0===u||!u.anonymousId),n.siteOwner=(null===(v=Oe)||void 0===v?void 0:v.site)||null,n.userId=(null===(m=Oe)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(p=Oe)||void 0===p?void 0:p.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",O);var T=null==n?void 0:n.playerId;n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId;var H=null==n?void 0:n.airplay,L=null==n?void 0:n.apiBaseUrl,_=(null==n||null===(f=n.analytics)||void 0===f?void 0:f.gaId)||null,M=null==n?void 0:n.errors;M&&(window.customErrors=M),window.customData=null==n?void 0:n.customData,ee(null==n||null===(w=n.customData)||void 0===w?void 0:w.localisation),L&&(window.playerEntitlementUrl=L),window.controlsColor=(null==n?void 0:n.controlsColor)||"white",null!=n&&n.skin&&!x(n.skin)||(n.skin="defaultV2"),Promise.resolve().then((function(){return Se})).then((function(e){e.importIMA()})),H&&"Safari"==e()&&Promise.resolve().then((function(){return Se})).then((function(e){e.importAirplay()})),_&&oe("https://www.googletagmanager.com/gtag/js?id=".concat(_)).then((function(){return D(_)})).catch((function(e){}));var F=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(T));if(F&&F.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g){var q="c09576ca-8202-4e8e-ba1e-06d1ab0ce063",z={directPlaybackUrl:g,id:q};b?R(q,O).then((function(e){De(T,{res:xe(xe({},e),z)},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,q)})):De(T,{res:z},n,{resolve:t,reject:o})}else if(I){var J,G=sessionStorage.getItem("season-idx")||0;N.set(parseInt(G));var K=null==n||null===(J=n.series)||void 0===J?void 0:J.id;E(K,O).then((function(e){var i,l,a,s=e.data,u=e.data.seasons;U(u);var v=j||(null==u||null===(i=u[0])||void 0===i||null===(l=i.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);!function(e,n){var t=new Map;d({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),c(t)})).catch((function(e){return console.log(e)}))}(K,O),R(v,O).then((function(e){var i,l,a;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(e.data),De(T,{res:null==e?void 0:e.data,sres:s},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))})).catch((function(e){A(e,T,o)}))}else if(k){var X=null==n?void 0:n.epg;B(X,O).then((function(e){var i=null==e?void 0:e.data;i.contentType="linearchannel",i.channelId=null==X?void 0:X.channelId,De(T,{res:i},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}else R(j,O).then((function(e){var i,l,a,s;window.contentType=null==e||null===(i=e.data)||void 0===i||null===(l=i.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(null==e?void 0:e.data);var u,d=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,m,p=function(e,n,t){var o=me(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",j,null==n?void 0:n.siteOwner);if(p&&p.length)n.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;d.contentType="video",De(T,{res:d},n,{resolve:t,reject:o})}else V(j,O).then((function(e){var i,l,r,a,s,u;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",De(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){var i,l,r,a;null!==(i=window)&&void 0!==i&&null!==(l=i.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(e)),De(T,{res:d},n,{resolve:t,reject:o})}));else De(T,{res:d},n,{resolve:t,reject:o})})).catch((function(e){A(e,T,o,j)}))}}))},getRenditions:Z,skip:m,getPlayer:n,play:p,pause:f,detectBrowser:e,rewind:w,loadVideo:l,seekToTimeStamp:Y,isPlayerInitialised:h,load:y,authenticateLC:g,dispose:b,enableCaptions:k,disableCaptions:j,getCaptions:I,playSelectedResolution:$,getSource:i,setVolume:pe,getVolume:fe,disableControls:O,setPlaybackSpeed:Q,getEntitlementData:T}}export{Re as default};
@@ -1 +1 @@
1
- import{g as e,m as r,r as t}from"./generic-35ac8700.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{g as e,m as r,r as t}from"./generic-5393c30a.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 +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-35ac8700.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=document.getElementById(t);if(o){var n,r,a,s,c,u,m,d,p=window.getComputedStyle(o,null),v=p.getPropertyValue("height"),f=p.getPropertyValue("width"),h=v.slice(0,-2);if(f.slice(0,-2)-135<=135)e.style.bottom="290px",e.style.height="352px";else"live"==l.config.skin&&(null===(n=i(l))||void 0===n||null===(r=n.config)||void 0===r||!r.liveui)&&(null===(a=i(l))||void 0===a||null===(s=a.config)||void 0===s||!s.liveVideo)||null!==(c=i(l))&&void 0!==c&&null!==(u=c.config)&&void 0!==u&&u.liveui&&null!==(m=i(l))&&void 0!==m&&null!==(d=m.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(h-135,"px"),e.style.height="".concat(h-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(h-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{q as c,p as u}from"./generic-5393c30a.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=document.getElementById(t);if(o){var n,r,a,s,c,u,m,d,p=window.getComputedStyle(o,null),v=p.getPropertyValue("height"),f=p.getPropertyValue("width"),h=v.slice(0,-2);if(f.slice(0,-2)-135<=135)e.style.bottom="290px",e.style.height="352px";else"live"==l.config.skin&&(null===(n=i(l))||void 0===n||null===(r=n.config)||void 0===r||!r.liveui)&&(null===(a=i(l))||void 0===a||null===(s=a.config)||void 0===s||!s.liveVideo)||null!==(c=i(l))&&void 0!==c&&null!==(u=c.config)&&void 0!==u&&u.liveui&&null!==(m=i(l))&&void 0!==m&&null!==(d=m.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(h-135,"px"),e.style.height="".concat(h-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(h-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};
@@ -0,0 +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{a0 as c,g as m,q as d,p}from"./generic-5393c30a.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,f,y=(v=g,f=u(),function(){var e,t=n(v);if(f){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=y.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=document.getElementById(this.playerId);if(a){var r=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(r,"px"),a.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-35ac8700.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{q as i,p as a}from"./generic-5393c30a.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,Z as d}from"./generic-35ac8700.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{q as a,c as s,Z as d}from"./generic-5393c30a.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};
@@ -0,0 +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{a0 as c,g as d,q as p,X as m}from"./generic-5393c30a.js";import{a as u}from"./autoNextVideo-3d3dfaed.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-13ee59d1.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(b,y);var h,f,g=(h=b,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 b(e){var n,l,o,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,b),(a=g.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(b,[{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")?(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 n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),i.dom.appendContent(e,t),n.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"}),c=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)||"")}),d=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,d),i.dom.appendContent(a,s),i.dom.appendContent(c,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(c,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,c),d(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}}))}}]),b}();export{h as default};
@@ -1 +1 @@
1
- import{g as l}from"./generic-35ac8700.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
+ import{g as l}from"./generic-5393c30a.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{g as s,Q as c,d as u}from"./generic-35ac8700.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 w=r.dom.$(".content");w&&r.dom.addClass(w,"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{g as s,Q as c,d as u}from"./generic-5393c30a.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 w=r.dom.$(".content");w&&r.dom.addClass(w,"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 n from"@babel/runtime/helpers/assertThisInitialized";import s 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{Z as d,i as p,n as u,q as v,c as m,p as f}from"./generic-35ac8700.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(){s(d,C);var e,l,c=(e=d,l=b(),function(){var i,t=a(e);if(l){var n=a(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,y=s.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,n,s){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,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=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){}))}(n),s.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")}(s,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),v[i].addEventListener("click",(function(){return function(e,i,t,n){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 n=d(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{E as customSeasonList,k as handleSeasonChange,w as seriesModule};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s 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{Z as d,i as p,n as u,q as v,c as m,p as f}from"./generic-5393c30a.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(){s(d,C);var e,l,c=(e=d,l=b(),function(){var i,t=a(e);if(l){var n=a(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,y=s.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,n,s){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,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=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){}))}(n),s.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")}(s,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),v[i].addEventListener("click",(function(){return function(e,i,t,n){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 n=d(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{E as customSeasonList,k as handleSeasonChange,w as seriesModule};