@viewlift/player-backup 2.0.295-backup → 2.0.297-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-fa3874dd.js +1 -0
- package/cjs/browser-3670a923.js +1 -0
- package/cjs/bundle.css +894 -661
- package/cjs/{caption-settings-1afe1cb9.js → caption-settings-8f59beca.js} +1 -1
- package/cjs/{captions-676468fe.js → captions-6cbd3375.js} +1 -1
- package/cjs/{features-fbfbfeaa.js → features-41c9fbc0.js} +1 -1
- package/cjs/generic-801833b3.js +1 -0
- package/cjs/index-0c4eda18.js +1 -0
- package/cjs/index-322d6c89.js +1 -0
- package/cjs/{index-7a3887df.js → index-3356fe8c.js} +1 -1
- package/cjs/{index-7c33892f.js → index-58f88daa.js} +1 -1
- package/cjs/index-8a9a9d4f.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-7586e645.js → multicamv2-405def83.js} +1 -1
- package/cjs/{multicamv2-1bd065f2.js → multicamv2-4c36a4b6.js} +1 -1
- package/cjs/{nextEpisodeButton-a5f392c0.js → nextEpisodeButton-06b4237d.js} +1 -1
- package/cjs/playlist-85bada7f.js +1 -0
- package/cjs/relatedVideosManager-eeeaf32c.js +1 -0
- package/cjs/{renditions-508e7f85.js → renditions-627bdfad.js} +1 -1
- package/cjs/{resolution-e6b8a4eb.js → resolution-3af2cf1b.js} +1 -1
- package/cjs/{series-513bf657.js → series-57af68b1.js} +1 -1
- package/cjs/series-v2-3beafe90.js +1 -0
- package/cjs/series-v2-b9736535.js +1 -0
- package/cjs/{settings-icon-4d365ba3.js → settings-icon-0642c8ef.js} +1 -1
- package/cjs/{skin-c3708fa0.js → skin-08943309.js} +1 -1
- package/cjs/skin-0ab416f5.js +1 -0
- package/cjs/{skin-01f53e99.js → skin-176ab1b5.js} +1 -1
- package/cjs/skin-2d394a3c.js +1 -0
- package/cjs/{skin-c6084619.js → skin-66dce245.js} +1 -1
- package/cjs/{skin-55abd2ce.js → skin-689e558c.js} +1 -1
- package/cjs/skin-82457814.js +1 -0
- package/cjs/{skin-f724b38f.js → skin-84d51e1a.js} +1 -1
- package/cjs/skin-9a8dd48d.js +1 -0
- package/cjs/skin-ba5e2587.js +1 -0
- package/cjs/skin-bea108bd.js +1 -0
- package/cjs/videoSelector-d1329ec3.js +1 -0
- package/cjs/videoSelector-ec9b4d4b.js +1 -0
- package/esm/autoNextVideo-24cb6191.js +1 -0
- package/esm/browser-de5f6a74.js +1 -0
- package/esm/bundle.css +894 -661
- package/esm/{caption-settings-d912022d.js → caption-settings-7e20f930.js} +1 -1
- package/esm/{captions-a7cd63fa.js → captions-7e8712e5.js} +1 -1
- package/esm/components/auto-next-video/autoNextVideo.d.ts +1 -0
- package/esm/components/chapters/markers.d.ts +6 -0
- package/esm/components/video-selector/videoSelector.d.ts +4 -0
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +4 -0
- package/esm/components/watch-history/handleWatchHistory.d.ts +1 -0
- package/esm/{features-2852e53e.js → features-64dca26b.js} +1 -1
- package/esm/generic-90eeea98.js +1 -0
- package/esm/helpers/apiErrorTracker.d.ts +1 -0
- package/esm/helpers/browser.d.ts +1 -0
- package/esm/helpers/browser.test.d.ts +1 -0
- package/esm/helpers/drmErrorDetection.d.ts +6 -0
- package/esm/helpers/skin.d.ts +1 -1
- package/esm/{icons-699e8cf0.js → icons-262bef63.js} +1 -1
- package/esm/index-362fad37.js +1 -0
- package/esm/index-5c79c125.js +1 -0
- package/esm/index-b4d31515.js +1 -0
- package/esm/{index-906405de.js → index-bb2d5dcb.js} +1 -1
- package/esm/{index-9b56a55c.js → index-ec92c082.js} +1 -1
- package/esm/index.d.ts +6 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-0da76319.js → multicamv2-2f4829b6.js} +1 -1
- package/esm/{multicamv2-cd64893e.js → multicamv2-9f875b4b.js} +1 -1
- package/esm/{nextEpisodeButton-7065e49b.js → nextEpisodeButton-ac6afcd4.js} +1 -1
- package/esm/playlist-a9e0c098.js +1 -0
- package/esm/relatedVideosManager-8dd9aa24.js +1 -0
- package/esm/{renditions-225582e2.js → renditions-620d93b3.js} +1 -1
- package/esm/{resolution-0fbfb20a.js → resolution-2ee017b4.js} +1 -1
- package/esm/{series-1296087c.js → series-5ddcd5da.js} +1 -1
- package/esm/series-v2-87d9cd76.js +1 -0
- package/esm/series-v2-f8c95b76.js +1 -0
- package/esm/{settings-icon-b87f878f.js → settings-icon-c65eb622.js} +1 -1
- package/esm/skin-2114817e.js +1 -0
- package/esm/skin-3653c5b3.js +1 -0
- package/esm/skin-578253c6.js +1 -0
- package/{cjs/skin-13f17735.js → esm/skin-5aa955ae.js} +1 -1
- package/esm/{skin-9a9606e2.js → skin-6dd7871e.js} +1 -1
- package/esm/skin-7260af27.js +1 -0
- package/esm/{skin-601e36bf.js → skin-7d5ba59b.js} +1 -1
- package/esm/{skin-a9c23cad.js → skin-a3b2c49d.js} +1 -1
- package/esm/skin-c9f7f5a9.js +1 -0
- package/esm/skin-e1f32725.js +1 -0
- package/esm/skin-ebecbb07.js +1 -0
- package/esm/utilities/relatedVideosManager.d.ts +11 -0
- package/esm/videoSelector-c2f3514d.js +1 -0
- package/esm/videoSelector-dea33c02.js +1 -0
- package/package.json +2 -2
- package/cjs/autoNextVideo-11f9a504.js +0 -1
- package/cjs/browser-77c57718.js +0 -1
- package/cjs/generic-9fa3c0bb.js +0 -1
- package/cjs/index-0390e484.js +0 -1
- package/cjs/index-b639e99c.js +0 -1
- package/cjs/playlist-0fe7b4d6.js +0 -1
- package/cjs/series-v2-0b013516.js +0 -1
- package/cjs/series-v2-fecd7d4c.js +0 -1
- package/cjs/skin-29bb949b.js +0 -1
- package/cjs/skin-3a02681c.js +0 -1
- package/cjs/skin-83da696f.js +0 -1
- package/cjs/skin-9bf9775b.js +0 -1
- package/cjs/skin-a810173d.js +0 -1
- package/cjs/util-0574b423.js +0 -1
- package/cjs/videoSelector-0fc6930c.js +0 -1
- package/cjs/videoSelector-f3bdf178.js +0 -1
- package/esm/autoNextVideo-2a20bbbd.js +0 -1
- package/esm/browser-d4613b36.js +0 -1
- package/esm/generic-c057edc5.js +0 -1
- package/esm/index-0c840631.js +0 -1
- package/esm/index-8acba85e.js +0 -1
- package/esm/playlist-e8861c44.js +0 -1
- package/esm/series-v2-43f33c70.js +0 -1
- package/esm/series-v2-7b0979e7.js +0 -1
- package/esm/skin-109c4ba7.js +0 -1
- package/esm/skin-280dfe76.js +0 -1
- package/esm/skin-3aa64a01.js +0 -1
- package/esm/skin-4d5df1a3.js +0 -1
- package/esm/skin-606a59c2.js +0 -1
- package/esm/skin-bce765b0.js +0 -1
- package/esm/skin-d184c7e3.js +0 -1
- package/esm/skin-dac31c35.js +0 -1
- package/esm/util-371cec8c.js +0 -1
- package/esm/videoSelector-a58fc6ba.js +0 -1
- package/esm/videoSelector-b2af3988.js +0 -1
package/cjs/generic-9fa3c0bb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("axios"),o=require("./skin-c6084619.js"),a=require("./browser-77c57718.js"),l=require("md5"),s=require("js-cookie"),d=require("./captions-676468fe.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),f=require("@viewlift/comscore/index.js"),p=require("@babel/runtime/helpers/classCallCheck"),m=require("@babel/runtime/helpers/createClass");function h(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function g(e,t){h("event",e,t)}var y={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",getBeaconUrl:"/analytics/player-beacon"};function T(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 w(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?T(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var _={name:"@viewlift/player",version:"2.1.44",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.1","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.18",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=_.version;var I,b=function(){var e,t,n,i;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":P.get()+"".concat(null==y?void 0:y.getVideoDetails)},E=function(e,t){var n,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];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})}):r({url:b(),params:w({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":_.version,"x-player-name":"videojs",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken},withCredentials:!0})},S=function(e,t){var n,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];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})}):r({url:P.get()+y.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(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===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}})},k=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return i=e.sent,e.abrupt("return",r({url:P.get()+"".concat(null==y?void 0:y.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:w({},t),params:w({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),A=function(e,t){var n,i,o=window.contentType;return r({method:"GET",url:P.get()+"".concat(null==y?void 0:y.getVideoInfoV2,"/").concat(o,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},O=function(e){var t=e.videoId;return r({method:"GET",url:P.get()+"".concat(null==y?void 0:y.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},P=(I=null==y?void 0:y.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),D=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},L=null;function C(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var F,x,j,R,V,N,W,U=function(){var e=t(n.mark(function e(){var t,i,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=C().get(),i=P.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);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)}}(),M=null,B=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"))||!D(t)){e.next=6;break}return M||(M=U().then(function(e){var n,i,r=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&C().set(o),r||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){M=null})),e.abrupt("return",M);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},q=(N=new Map,{set:function(e){var t,n=(null==e||null===(t=e.video)||void 0===t?void 0:t.id)||e||null;N.set(n,(N.get(n)||0)+1)},get:function(e){return N.get(e)},clear:function(){N.clear()}}),G=function(e){x=e},z=function(){return x},Q=function(){return F},Y=function(e){j=e},K=function(e){if(R){var t=R.get(e);Y(t+1)}},X=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function J(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 $(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?J(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Z,ee=(Z={},{setConfig:function(e){Z=$($({},Z),e)},getConfig:function(){return Z}});function te(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 ne(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?te(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ie=0,re=null,oe=function(){var e,t,n,i,r,o,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===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ae(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function le(){return re||window.sessionStorage.getItem("uid")}function se(){return de.apply(this,arguments)}function de(){return(de=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,B();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)}function ue(e){return e?String(e):""}window.initialise=function(e){window.sid=ae(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,streamFailures(e),buffering(e),ads(e),ping(e)},window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearInterval(window.ttFirstFrameTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var t,n,i,r=o.getPlayer(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),g(e,ne({pfm:window.platform,uid:le(),vid:oe(),videoPosition:a},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:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,t,n){e.one("play",tryCatch(function(){var i,r,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),g("PLAY",ne({pfm:window.platform,uid:le(),vid:oe(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",ne({"Video ID":oe(),watchTime:Math.floor(e.currentTime())},n))}))},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=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(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.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var r,o,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")&&ie<4)ie++,g("BUFFERING",ne({pfm:window.platform,uid:le(),vid:oe(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.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),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,g("FIRST_FRAME",ne({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:le(),vid:oe()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,r,o,a;g("AD_REQUEST",ne({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:le(),vid:oe(),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}),g("AD_IMPRESSION",ne({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:le(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:oe()},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.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)&&(ie=0,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(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(ce(t,o,a)){var l=Math.round(n-a);if(isFinite(l))return l}}})()};var ce=function(e,t,n){return e>=t&&e<=n},ve=function(){var e,t=z(),n=(null==t?void 0:t.contentType)||"video";return(null==t||null===(e=t[n])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,o,a,l,s,d,u,c,v,f,p,m,h,g,T,w,_,I,b,E,S;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return _=e.sent,I=H(_),b=null==I?void 0:I.site,E=null==I?void 0:I.siteId,e.t0=ne,e.t1=ne,e.t2=ne({aid:b,cid:E,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=le(),e.t5=oe(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(l=t.videoPosition)&&void 0!==l?l:null,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:null,e.t17=!0===t.isAdEvent?ue(t.adPosition):"",e.next=26,se();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(s=t.ttFirstFrame)&&void 0!==s?s:null,e.t23=null!==(d=t.bitrate)&&void 0!==d?d:null,e.t24=null!==(u=t.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(f=ve())&&void 0!==f?f:null,e.t28=null!=b?b:null,e.t29={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:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==t?void 0:t.duration)&&{duration:t.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(m=p.customData)||void 0===m||null===(h=m.beacon)||void 0===h?void 0:h.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],r({url:(null===(g=window)||void 0===g||null===(T=g.customData)||void 0===T||null===(w=T.beacon)||void 0===w?void 0:w.url)||P.get()+y.getBeaconUrl,method:"post",headers:{Authorization:_},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},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 fe=function(){var e=X.get();return e>=0?e+1:1},pe=function(){var e,t,n,i=Q(),r=z(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=X.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)===o});return l>=0?l+1:1};function me(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 he(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?me(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ge=l,ye=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},Te=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,r=(t=t.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[t[i]]}return e||n},_e=function(){var e,t,n,i,r,a,l,d,u,c,v,f,p,m,h,g,y,T,w,_,I,b,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.disableMacros)return A;var D=(null==P?void 0:P.siteName)||(null==P?void 0:P.site)||"",L=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(n=P[L])||void 0===n?void 0:n.metadata)||(null==P||null===(i=P[L])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o.getPlayer(O);if(!A.includes("VIEWLIFT_"))return A;var x,j=window.getComputedStyle(document.getElementById(O),null),R=Math.trunc(j.getPropertyValue("height").slice(0,-2)),V=Math.trunc(j.getPropertyValue("width").slice(0,-2)),N="linearchannel"===L?null==P||null===(a=P.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(d=l.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:we(P,"video.gist.id",""),W="linearchannel"===L?null==P||null===(c=P.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(f=v.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===f?void 0:f.title:we(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(x=window)||void 0===x||x.__gpp("ping",function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var B=s.get("us_privacy")||s.get("usprivacy"),H=void 0!==B?B:"1YNN",q=null!==(p=null===(m=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===m?void 0:m.fwIdentifier)&&void 0!==p?p:null,G=he(he({},Ie(C)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:R,VIEWLIFT_SIZE:ye(V,R),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===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:we(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(g=F.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(y=F.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Te(P),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(we(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+we(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:s.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:we(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(_=w.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":we(null===(I=window)||void 0===I||null===(b=I.app_data)||void 0===b||null===(E=b.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:q?ge(q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:we(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:we(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:we(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:pe(),VIEWLIFT_SEASON_NUMBER:fe(),VIEWLIFT_CONTENT_TAGS:Te(P),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(k=S.customData)||void 0===k?void 0:k.macros);for(var z in G){var Q=new RegExp(z,"g");A=A.replace(Q,G[z])}return A},Ie=function(e){var t,n,i,r,o,l,s,d,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var f=(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,p=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(l=o.subscription)||void 0===l?void 0:l.TVE)||!1;return f||p?(a.isMobile()?f?c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=he(he({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=he(he({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=a.isMobile()?he(he({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):he(he({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=he(he({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=a.isMobile()?he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):he(he({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=he(he({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:we(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},be=function(e,t){var n,i,r,o,l,s,d,u,c,v,f,p,m,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[h])||void 0===n?void 0:n.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,T=null==e||null===(o=e[h])||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(s=e[h])||void 0===s||null===(d=s.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[h])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var _=(null==e||null===(f=e[h])||void 0===f||null===(p=f.streamingInfo)||void 0===p||null===(m=p.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=T&&T.hls)return Se(T);if(g){var I=ke(y,t);return I.src=_e(I.src,t,e),I}if("Safari"!==a.detectBrowser()&&_)return Ee(y);if(w){var b=Se(y);return b.src=_e(b.src,t,e),b}if(null!=y&&y.mpeg){var E=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(y);return E.src=_e(E.src,t,e),E}return null},Ee=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},Se=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},ke=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,s=e.playReady,d=a.detectBrowser();if(o.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,t,n){console.log(e),e&&o(e),o(null,n)})}}}}}(r);return Ae(t),u}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ae(t),v.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==s?void 0:s.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ae=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.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 r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(t),r.appendChild(o),i.append(r)}}},Pe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var De=!1,Le=function(e,t,n){var i=_e(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima&&"object"!==u(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,a=o.getPlayer(e);if(null!==a.el_){De=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),De&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.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"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var t=e.adsManager;t.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),t.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};var Ce,Fe=(Ce=!0,{enable:function(){Ce=!0},disable:function(){Ce=!1},get enabled(){return Ce}}),xe="ssai-breakStart",je="ssai-adImpression",Re="ssai-firstQuartile",Ve="ssai-midpoint",Ne="ssai-thirdQuartile",We="ssai-complete",Ue="ssai-breakEnd",Me={breakStart:xe,impression:je,firstQuartile:Re,midpoint:Ve,thirdQuartile:Ne,complete:We,breakEnd:Ue};function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var i=t.eventType,r=Me[i];r&&n.trigger(r,t)}function He(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 qe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?He(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):He(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Ge,ze=(Ge={},{get:function(){return Ge},set:function(e){Ge=e}});function Qe(e,t){var n,i,r,a,l,s,d,u,c,v,p,m,h,g,y,T,w,_,I,b,E,S=null==e?void 0:e.playerId,k=o.getPlayer(S);if(null!=e&&null!==(n=e.comscore)&&void 0!==n&&n.enable){var A=z(),O=(null==A||null===(i=A.video)||void 0===i?void 0:i.metadata)||[],P=(null==O?void 0:O.length)&&O.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=P)&&void 0!==r&&r.length){var D=P.map(function(e){return e.value});P=null==D?void 0:D.join(",")}f.destroyComscoreTag();var L,C,F,x=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,j=Array.isArray(null==x?void 0:x.category)?null==x||null===(l=x.category)||void 0===l?void 0:l.join(","):(null==x?void 0:x.category)||null,R=qe(qe(qe({},null==A?void 0:A.video),null==A?void 0:A.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==A?void 0:A.site)||null,programId:(null==x?void 0:x.videotmsid)||null,programTitle:(null==x?void 0:x.lcProgrammeName)||null,episodeId:(null==x?void 0:x.videotmsid)||null,seasonNumber:(null==A||null===(c=A.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==x||null===(p=x.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==A||null===(m=A.video)||void 0===m||null===(h=m.series)||void 0===h?void 0:h.episodeNumber)||(null==x||null===(g=x.seriesDetails)||void 0===g?void 0:g.episode)||null,episodeTitle:(null==x?void 0:x.lcSubTitle)||null,isCompleteEpisode:!!(null!=A&&null!==(y=A.video)&&void 0!==y&&y.series||null!=x&&null!==(T=x.seriesDetails)&&void 0!==T&&T.episode),genre:P||j,comscoreConfig:{implementationId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.implementationId)||null,projectId:(null==e||null===(_=e.comscore)||void 0===_?void 0:_.projectId)||null}}),V=null==e||null===(I=e.comscore)||void 0===I||null===(b=I.metadata)||void 0===b?void 0:b.contentType;if(null!=R&&null!==(E=R.streamingInfo)&&void 0!==E&&E.isLiveStream?R.contentType="Live":R.contentType=V||"LongFormOnDemand",null==R||!R.network){var N,W=(null==R?void 0:R.metadata)||[],U=null==W||null===(N=W.find(function(e){return"network"===e.name}))||void 0===N?void 0:N.value;R.network=U||null}null!=R&&R.network&&null!=R&&R.genre&&(R.customGenre="".concat(R.network,"_").concat((null==R?void 0:R.programTitle)||(L=R,null!=L&&L.series?null==L||null===(F=L.series)||void 0===F?void 0:F.title:null==L||null===(C=L.gist)||void 0===C?void 0:C.title),"_").concat(R.genre)),null!=x&&x.airDate&&(R.publishDate=x.airDate),null!=R&&R.runtime&&"function"==typeof k.duration&&(R.runtime=1e3*Math.ceil(k.duration()));var M=f.formulateComscorePayload(R,k);console.log("comscoreOptions player data",M),f.createComscoreStreamingTag(qe({playerName:"Video.js"},M)),f.setComscorePlayerInstance(k)}}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}function Ke(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}function Xe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var $e,Ze=function(){var e="";return{set:function(t){t&&(e=t)},get:function(){return e}}}(),et=($e=null,{set:function(e){$e=e},get position(){return $e}});function tt(e,t){return nt.apply(this,arguments)}function nt(){return(nt=t(n.mark(function e(t,i){var r,a,l,s,d,u,c,f,p,m,h,g,y,T,w,_,I,b;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.getPlayer(t),l=be(i,t),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=_e(u,t,i),c=rt(u),f=v(c,2),p=f[0],m=f[1],h=it(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var t=v(e,2),n=t[0],i=t[1];u.searchParams.set(n,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ke({adsParams:Ke({},p)},h))});case 14:return g=e.sent,e.next=17,g.json();case 17:return y=e.sent,T="https://"+new URL(u).hostname,w=y.trackingUrl,_=y.manifestUrl,I=T+w,b=T+_,Ze.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),l.src=b,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function it(e){var t;return Object.fromEntries(null==Object||null===(t=Object.entries(e))||void 0===t?void 0:t.map(function(e){var t=v(e,2),n=t[0],i=t[1];return[null==n?void 0:n.replace(/^aws\./,""),String(i)]}))||{}}function rt(e){var t={};if(!e.split("?")[1])return[{},{}];var n,i=new URL(e,window.location.origin),r=Xe((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(n=r.n()).done;){var o=v(n.value,2),a=o[0],l=o[1];t[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(t);u<c.length;u++){var f=v(c[u],2),p=f[0],m=f[1];if(p.startsWith("ads."))s[p.replace(/^ads\./,"")]=m;else d[p]=m}return[s,d]}var ot,at,lt,st=new Map;function dt(e,t){return ut.apply(this,arguments)}function ut(){return ut=t(n.mark(function e(i,r){var a,l,s,d,u,v,f,p,m,h,g,y,T,w,_,I,b,E,S,k,A,O,P,D,L;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,t,n,r,a,l){var s,d,u=o.getPlayer(i);if(!u.seeking()){var c=t.startTimeInSeconds;t.durationInSeconds,e<P&&O.clear(),P=e;var v=(null==t||null===(s=t.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,p=Xe(n);try{var m=function(){var n,o,s,d=f.value,c=d.eventType,p=d.beaconUrls,m=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=m||0,T=p,w=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),I=st.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",st),e>=y&&!I.includes(_)){I.push(_),st.set("pod-".concat(a),I);try{D(c,t,T,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,t)}if("breakEnd"==c){var b=et.position;et.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),l())},500)}if("function"==typeof w)try{var E,S={eventType:c,startTimeInSeconds:m,startTime:h,durationInSeconds:g,ad:null==t||null===(E=t.ads)||void 0===E?void 0:E[r],adIndex:r};w({adsData:S}),Be(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=ze.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,P=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,C=k.endComscoreAdTracking,F="".concat(y,"_").concat(v,"_").concat(c);if(!O.has(F))if(O.set(F,!0),"impression"===c){var x,j=Ze.get();P(A(Ke(Ke({},null==t||null===(x=t.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:j})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(p.s();!(f=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}}},D=function(e,t,n,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})})},A=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t,":").concat(n.toString().padStart(2,"0"))},st.clear(),et.set(r),m=Ze.get(),(h=o.getPlayer(i)).one("loadeddata",function(){m&&k(m)}),g=new Map,y=new Map,T=-1,w=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,_=(null==h||null===(s=h.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,I=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,b=(null==h||null===(u=h.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,E=(null==h||null===(f=h.el())||void 0===f||null===(p=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,S=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==n?void 0:n.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==n?void 0:n.length)>1?null==n?void 0:n[(null==n?void 0:n.length)-1]:null==n?void 0:n[0],s=null==l||null===(t=l.trackingEvents)||void 0===t?void 0:t.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var t;return null==e||null===(t=e.beaconUrls)||void 0===t?void 0:t.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return Ke(Ke({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},k=function(){var e=t(n.mark(function e(t){var a,l,s,d,u,v,f,p,m,h,k,O,P,D,C,F,x,j,R,V,N,W,U,M;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",V),0===e.button&&x()},R=function(e){},j=function(){var e,t=h.currentTime(),n=null,i=Xe(m);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));t>=o&&t<=l&&(n=l,g.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==n&&(console.log("Seeking to end of the ad pod:",n),setTimeout(function(){h.currentTime(n+2.2)},100))},x=function(){var e,t=h.currentTime(),n=null,i=Xe(m);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(o+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(t>s||t>o)&&!g.has(o)||t>=o&&t<=s)&&(n=o,g.set(o,!0),y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==n&&(console.log("Seeking back to ad pod:",n),setTimeout(function(){h.currentTime(n+.4)},100))},u=!1,e.next=7,fetch(t);case 7:return v=e.sent,e.next=10,v.json();case 10:f=e.sent,p=f.avails,m=[],h=o.getPlayer(i),k=h.controlBar.progressControl,O=k.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,t){var n;0==t&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&(u=!0),m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&r&&(h.currentTime(r),j()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m,"function"==typeof(F=(null===(P=window)||void 0===P||null===(D=P.customData)||void 0===D||null===(C=D.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&F(m)),console.log(m,"data"),m.forEach(function(e){var t=e.markerPositionInSeconds,n=e.ads,i=h.duration();if(!(t>i||Array.isArray(n)&&0==(null==n?void 0:n.length))){var r=t/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),h._timeUpdateHandler&&h.off("timeupdate",h._timeUpdateHandler),h._timeUpdateHandler=o.throttle(function(){var e=h.currentTime();if(e!==T){T=e;for(var t=!1,n=function(){var n=m[i],r=n.startTimeInSeconds,o=n.durationInSeconds,a=n.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(t=!0),e>l&&g.set(r,!0),Fe.disable(),w&&w.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),k.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,v=0,f=0;f<a.length;f++){var p,h=null==a||null===(p=a[f])||void 0===p?void 0:p.durationInSeconds;if(d<u+h){v=f;break}u+=h}a[v];var T=Math.max(0,o-d),S=Math.round(T);N.style.display="block",M.textContent="".concat(v+1," of ").concat(a.length," • ").concat(A(S));var O=[];return null==a||a.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,c(t))}),(null==n||null===(s=n.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&O.push.apply(O,c(null==n?void 0:n.podSlotImpressionBeacon)),L(e,n,O,v,i,j),"break"}y.delete(r)},i=0;i<m.length;i++){if("break"===n())break}t||(N.style.display="none",k.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),w&&w.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),Fe.enable())}},1e3),h.on("timeupdate",h._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){Fe.enabled&&"ArrowRight"==e.key&&(x(),yn(i,10),e.stopPropagation())}),k.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",V))}),null===(s=document)||void 0===s||null===(d=s.querySelectorAll(".ssai-ad-container"))||void 0===d||d.forEach(function(e){return null==e?void 0:e.remove()}),(N=document.createElement("div")).className="ssai-ad-container",(W=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",W.append(U),(M=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",N.append(W),N.append(M),h.el().appendChild(N);case 44:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),O=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),ut.apply(this,arguments)}function ct(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function ft(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 pt(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ft(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ft(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var mt={},ht=(null===(ot=window)||void 0===ot||null===(at=ot.location)||void 0===at||null===(lt=at.search)||void 0===lt?void 0:lt.includes("debug=true"))||!1,gt=null;function yt(e){return Tt.apply(this,arguments)}function Tt(){return Tt=t(n.mark(function e(i){var r,a,l,s,d,u,v,f,p,m,h,g,y,T,w,_,I,b,E,S,k,A,O,P,D,L,C;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,t,n,r,a){var l,s,d=o.getPlayer(i);if(!d.seeking()){var u=t.startTimeInSeconds;t.durationInSeconds;var c=(null==t||null===(l=t.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=ct(n);try{for(f.s();!(v=f.n()).done;){var p,m,h,g=v.value,y=g.eventType,T=g.beaconUrls,w=g.startTimeInSeconds,_=g.startTime,I=g.durationInSeconds,b=(g.eventId,w||u),E=T,S=(null===(p=window)||void 0===p||null===(m=p.customData)||void 0===m||null===(h=m.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);P.has(A)||P.set(A,new Set);var O=P.get(A);if(ht&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",P),e>=b&&e<=b+D&&!O.has(k)){O.add(k);try{L(y,t,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,t)}if("function"==typeof S)try{var C,F={eventType:y,startTimeInSeconds:w,startTime:_,durationInSeconds:I,ad:null==t||null===(C=t.ads)||void 0===C?void 0:C[r],adIndex:r};S({adsData:F}),Be(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var x=ze.get();if(x&&0!==Object.keys(x).length){var j=x.formulateComscoreAdPayload,R=x.startComscoreAdTracking,V=x.finishComscoreAdTracking,N=x.endComscoreAdTracking;if("impression"===y){var W,U=Ze.get();R(j(pt(pt({},null==t||null===(W=t.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:U})))}else"complete"===y?V():"breakEnd"===y&&N()}}}}catch(e){f.e(e)}finally{f.f()}}},L=function(e,t,n,i){var r,o,a;"breakEnd"===e&&(null===(r=mt)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=mt)||void 0===o?void 0:o.totalAds)&&(null==t||null===(a=t.ads)||void 0===a?void 0:a.length)>0||(ht&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})}))},h=function(){gt&&clearInterval(gt)},p=Ze.get(),(m=o.getPlayer(i)).one("loadeddata",function(){h(),gt=setInterval(function(){p&&!m.paused()&&O(p)},2e3)}),m.on("dispose",function(){h()}),g=new Map,y=new Map,T=-1,w=null,_=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,I=(null==m||null===(l=m.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,b=(null==m||null===(s=m.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,E=(null==m||null===(d=m.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(v=m.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,k=!1,A=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==n?void 0:n.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==n?void 0:n.length)>1?null==n?void 0:n[(null==n?void 0:n.length)-1]:null==n?void 0:n[0],s=null==l||null===(t=l.trackingEvents)||void 0===t?void 0:t.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var t;return null==e||null===(t=e.beaconUrls)||void 0===t?void 0:t.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return pt(pt({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},O=function(){var e=t(n.mark(function e(t){var r,a,l,s,d,u,v,f,p,m,h,O;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=new URL(t),w&&s.searchParams.append("nextToken",w),e.next=4,fetch(s.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,v=u.avails,f=u.nextToken||null,w=f,p=[],m=o.getPlayer(i),h=null==m||null===(r=m.controlBar)||void 0===r?void 0:r.progressControl,O=null==h||null===(a=h.seekBar)||void 0===a?void 0:a.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,t){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),ht&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach(function(e){var t=e.markerPositionInSeconds,n=e.ads,i=m.duration();if(!(t>i||Array.isArray(n)&&0==(null==n?void 0:n.length))){var r=t/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),m._timeUpdateHandler&&m.off("timeupdate",null==m?void 0:m._timeUpdateHandler),m._timeUpdateHandler=o.throttle(function(){if(wn(i)){var e=null==m?void 0:m.currentTime();if(e!==T){T=e;for(var t=function(){var t=p[n],i=t.startTimeInSeconds,r=t.durationInSeconds,o=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;k=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&g.set(i,!0),Fe.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),h.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,v=0;v<o.length;v++){var f,m=null==o||null===(f=o[v])||void 0===f?void 0:f.durationInSeconds;if(s<d+m){u=v;break}d+=m}setTimeout(function(){mt.totalAds=null==o?void 0:o.length,mt.currentAdIndex=u},1e3);var T=[];return null==o||o.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});T.push.apply(T,c(t))}),(null==t||null===(l=t.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&T.push.apply(T,c(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,T,u),"break"}y.delete(i)},n=0;n<p.length;n++){if("break"===t())break}k||(mt={},h.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Fe.enable())}}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),P=new Map,D=2.5;case 22:case"end":return e.stop()}},e)})),Tt.apply(this,arguments)}var wt=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function _t(e){return JSON.stringify((e||[]).map(function(e){return{availId:e.availId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds,ads:(e.ads||[]).map(function(e){return{adId:e.adId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds}})}}))}var It=function(){function e(t,n,i,r){p(this,e),this.video_=r,this.ad_=t,this.skipOffset_=function(e){if(!e)return null;var t=new RegExp(wt.source,"g");t.lastIndex=0;var n=t.exec(e);if(!n)return null;var i=Number(n[1])||0,r=Number(n[2]),o=Number(n[3]),a=Number(n[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==t?void 0:t.skipOffset),this.adPosition_=n,this.totalAds_=i,this.isSkipped_=!1}return m(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,t;return null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,t,n,i,r,o;return(null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(n=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==n?n:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,t;return null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),bt="impression",Et="start",St="mute",kt="unmute",At="resume",Ot="pause",Pt="firstQuartile",Dt="midpoint",Lt="thirdQuartile",Ct="complete",Ft="skip",xt="breakStart",jt="breakEnd",Rt="skipStateChanged",Vt="ad_impression",Nt="ad_started",Wt="ad_muted",Ut="ad_volume_changed",Mt="ad_resumed",Bt="ad_paused",Ht="ad_first_quartile",qt="ad_midpoint",Gt="ad_third_quartile",zt="ad_complete",Qt="ad_stopped",Yt="ad_skipped",Kt="ad_skip_state_changed",Xt="ad_break_started",Jt="ad_break_ended",$t="ads_loaded",Zt="ad_cuepoints_changed";function en(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 tn(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?en(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):en(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function nn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return rn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var on="[Transmit]";function an(e){var t,n,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(t=e.dashAvailabilityStartTime)&&void 0!==t?t:null,o=null!==(n=e.nextToken)&&void 0!==n?n:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,p,m;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(p=null!==(m=r)&&void 0!==m?m:e.data.dashAvailabilityStartTime)&&void 0!==p?p:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var ln=function(){function e(t,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};p(this,e),this.video_=t,this.player_=n,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return m(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:$t,loadTime:0})}},{key:"getCuePoints",value:function(){var e,t=new Map,n=nn(this.adBreaks_);try{for(n.s();!(e=n.n()).done;){var i,r=nn(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));t.has(s)||t.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}return Array.from(t.values()).sort(function(e,t){return e.start-t.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var t,n;e.trackingUrl_&&(null!==(t=e.player_)&&void 0!==t&&null!==(n=t.paused)&&void 0!==n&&n.call(t)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=t(n.mark(function e(t){var i,r,o,a,l,s,d,u,c,v,f,p,m,h,g,y,T;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=an(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=nn(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,p=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(p,f)}catch(e){c.e(e)}finally{c.f()}if((m=u.nextToken||null)&&m!==this.nextToken_){e.next=22;break}return this.nextToken_=m,e.abrupt("break",25);case 22:this.nextToken_=m,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),_t(this.adBreaks_)!==_t(y)&&(this.adBreaks_=y,T=this.getCuePoints(),this.onEvent_({type:Zt,cuepoints:T}))):this.adBreaks_.length&&(this.onEvent_({type:Zt,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),t&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(on,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var t,n=1e6,i=nn(e||[]);try{for(i.s();!(t=i.n()).done;){var r,o=t.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>n)return void(this.apiTimelineAbsolute_=!0);var a,l=nn((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>n)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var t=this,n=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=t.resolveAbsoluteStart_(e,n,null);return tn(tn({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return tn(tn({},r),{},{startTimeInSeconds:t.resolveAbsoluteStart_(r,n,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,t,n,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=n&&n.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(n.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+t}},{key:"resolveDashAvailabilityStartTime_",value:(r=t(n.mark(function e(t,i){var r,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=8;break}if(r=new Date(t).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=t(n.mark(function e(){var t,i,r,o,a,l;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(t=a.querySelector("MPD"))||void 0===t?void 0:t.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(on,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,t,n,i,r=(null===(e=this.player_)||void 0===e||null===(t=e.currentSrc)||void 0===t?void 0:t.call(e))||(null===(n=this.player_)||void 0===n||null===(i=n.src)||void 0===i?void 0:i.call(n));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,t,n=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(t=e.currentType)||void 0===t?void 0:t.call(e))||"").toLowerCase();return n.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,t,n=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(t=e.currentType)||void 0===t?void 0:t.call(e))||"").toLowerCase()||n.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,t,n=null===(e=this.player_)||void 0===e||null===(t=e.dash)||void 0===t?void 0:t.mediaPlayer;if(!n||"function"!=typeof n.time)return null;var i=n.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,t,n,i=null!==(e=null===(t=this.video_)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0,r=a.detectBrowser();if(this.isHlsSource_()){var o,l,s=i,d=null===(o=this.player_)||void 0===o||null===(l=o.seekable)||void 0===l?void 0:l.call(o);return d&&d.length>0&&(s=d.end(d.length-1)),Date.now()/1e3-(s-i)}if(this.isDashSource_()){var u,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var p=null===(u=this.player_)||void 0===u||null===(c=u.seekable)||void 0===c?void 0:c.call(u),m="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(p&&p.length>0){var h=p.start(0);if(h>1e6&&h+m>1e6)return h+m}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+m}return"Safari"===r?i:"function"==typeof(null===(n=this.player_)||void 0===n?void 0:n.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var t,n;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(t=null===(n=this.transmitAd_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==t?t:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(Rt),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,t){if(t){var n=t.startTimeInSeconds+.25*t.durationInSeconds,i=t.startTimeInSeconds+.5*t.durationInSeconds,r=t.startTimeInSeconds+.75*t.durationInSeconds;e>=n&&!this.eventsSent_.has(Pt)&&(this.eventsSent_.add(Pt),this.sendTrackingEvent_(Pt)),e>=i&&!this.eventsSent_.has(Dt)&&(this.eventsSent_.add(Dt),this.sendTrackingEvent_(Dt)),e>=r&&!this.eventsSent_.has(Lt)&&(this.eventsSent_.add(Lt),this.sendTrackingEvent_(Lt))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,t=[Pt,Dt,Lt];e<t.length;e++){var n=t[e];this.eventsSent_.has(n)||(this.eventsSent_.add(n),this.sendTrackingEvent_(n))}}},{key:"checkLinearAds_",value:function(e){var t,n=nn(this.adBreaks_);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new It(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(xt),this.setupCurrentAdListeners_();break}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(jt),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,t,n,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(t=e.paused)&&void 0!==t&&t.call(e)?a=!0:(this.sendTrackingEvent_(bt),this.sendTrackingEvent_(Et)),this.lastMutedForAd_=null!==(n=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==n&&n,this.attachAdListener_("volumechange",function(){var e,t,n,i=null!==(e=null===(t=o.player_)||void 0===t||null===(n=t.muted)||void 0===n?void 0:n.call(t))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(St):o.sendTrackingEvent_(kt))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(bt),o.sendTrackingEvent_(Et),a=!1):o.sendTrackingEvent_(At)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(Ot)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?Ft:Ct),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,t){this.player_&&(this.player_.on(e,t),this.globalListeners_.push({event:e,handler:t}))}},{key:"attachAdListener_",value:function(e,t){this.player_&&(this.player_.on(e,t),this.adListeners_.push({event:e,handler:t}))}},{key:"detachAdListeners_",value:function(){var e,t=nn(this.adListeners_);try{for(t.s();!(e=t.n()).done;){var n,i,r=e.value,o=r.event,a=r.handler;null===(n=this.player_)||void 0===n||null===(i=n.off)||void 0===i||i.call(n,o,a)}}catch(e){t.e(e)}finally{t.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,t=nn(this.globalListeners_);try{for(t.s();!(e=t.n()).done;){var n,i,r=e.value,o=r.event,a=r.handler;null===(n=this.player_)||void 0===n||null===(i=n.off)||void 0===i||i.call(n,o,a)}}catch(e){t.e(e)}finally{t.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=ze.get();if(!e||0===Object.keys(e).length)return;var t=e.formulateComscoreAdPayload,n=e.startComscoreAdTracking,i=Ze.get();n(t(tn(tn({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(on,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var t,n=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(t){return t.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(t){return t.eventType===e})),i&&(null===(t=this.config_)||void 0===t||!t.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=nn(i.beaconUrls||[]);try{var d=function(){var t=a.value;if(!t)return"continue";var i="".concat(l,"|").concat(e,"|").concat(t);if(n.firedBeacons_.has(i))return"continue";n.firedBeacons_.add(i),fetch(t,{mode:"no-cors"}).catch(function(e){console.warn(on,"beacon failed",t,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=ze.get(),c=u&&Object.keys(u).length?u:null;switch(e){case bt:this.onEvent_({type:Vt}),this.startComscoreForCurrentAd_();break;case Et:this.onEvent_({type:Nt,ad:this.ad_});break;case St:this.onEvent_({type:Wt});break;case kt:this.onEvent_({type:Ut});break;case At:this.onEvent_({type:Mt});break;case Ot:this.onEvent_({type:Bt});break;case Pt:this.onEvent_({type:Ht});break;case Dt:this.onEvent_({type:qt});break;case Lt:this.onEvent_({type:Gt});break;case Ct:this.onEvent_({type:zt}),this.onEvent_({type:Qt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case Ft:this.onEvent_({type:Yt}),this.onEvent_({type:Qt});break;case xt:this.onEvent_({type:Xt});break;case jt:this.onEvent_({type:Jt}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case Rt:this.onEvent_({type:Kt})}}else console.warn(on,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function sn(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 dn(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?sn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):sn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var un={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function cn(e){if(null==e||!e.src)return null;var t=(e.type||"").toLowerCase(),n=String(e.src).toLowerCase();return"application/dash+xml"===t||n.includes(".mpd")?"dash":"application/x-mpegurl"===t||"application/vnd.apple.mpegurl"===t||n.includes(".m3u8")?"hls":null}function vn(e,t,n){return fn.apply(this,arguments)}function fn(){return(fn=t(n.mark(function e(t,i,r){var o,a,l,s,d,u,c,v,f,p,m;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=cn(t)){e.next=3;break}return e.abrupt("return",t);case 3:return a=_e(t.src,r,i),l=a.replace(o,un[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",t);case 18:return v=new URL(l),f=v.hostname,p="https://".concat(f).concat(u),m="https://".concat(f).concat(c),Ze.set(m),console.log("[Transmit] session ready",{manifestUrl:p,trackingUrl:m}),e.abrupt("return",dn(dn({},t),{},{src:p}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",t);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var pn=null;function mn(e,t){var n;if(pn)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),pn;var i=Ze.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o.getPlayer(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(n=r.el())||void 0===n?void 0:n.querySelector("video"))||null,l=function(e){try{var t="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(t).includes(".mpd"))return t}catch(e){}return null}(r);return(pn=new ln(a,r,function(e){var n,i;console.log("[Transmit] ad event",e);var r=null==t||null===(n=t.customData)||void 0===n||null===(i=n.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),pn.addTrackingUrl(i),pn.onManifestUpdated(),pn}function hn(){pn&&(pn.release(),pn=null)}function gn(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 yn=function(e,t){var n=i(e),r=n.currentTime()+t;n.currentTime(r)},Tn=function(e,t){var n=i(e),r=n.currentTime(),o=r<=t?0:r-t;n.currentTime(o)},wn=function(e){return!!i.getPlayer("".concat(e))},_n=function(){var e=t(n.mark(function e(i,r){var a,l,s,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>2&&void 0!==d[2]&&d[2],e.next=3,B();case 3:return l=e.sent,s=o.getPlayer(i),e.abrupt("return",new Promise(function(e,o){S(r,l).then(function(){var o=t(n.mark(function t(o){var l,d,u,c,v,f,p,m,h,g,y;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(hn(),f=null==o?void 0:o.data,window.sid=ae(),f.contentType="linearchannel",f.channelId=null==r?void 0:r.channelId,p=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},m=!(null==f||null===(v=f.linearchannel)||void 0===v||!v.isSSAIEnabled),h=m&&"MEDIA_TAILOR"==(null==p?void 0:p.vodAdSticherProvider),g=m&&"TRANSMIT"==(null==p?void 0:p.liveAdSticherProvider)&&!(null==p||!p.liveAdClientSideTracking),y=be(f,i),!h){t.next=17;break}return t.next=13,tt(i,f);case 13:y=t.sent,a=!0,t.next=22;break;case 17:if(!g){t.next=22;break}return t.next=20,vn(y,f,i);case 20:y=t.sent,a=!0;case 22:G(f),y&&a?(En(i,y),g?mn(i,{customData:window.customData||{ads:p}}):h&&yt(i),s.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})})):(ze.get()&&0!==Object.keys(ze.get()).length&&Qe({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:f}));case 24:case"end":return t.stop()}},t)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({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)}}(),In=function(){var e=t(n.mark(function e(i,r,a){var l,s,u,c,v,f,p;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return c=e.sent,console.log("load video"),(Q()||null)&&K(r),v=0,f=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(u=s.watchHistory)&&void 0!==u&&u.enable&&A(r,c).then(function(e){var t,n,i,r,o,a,l;(null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),v=(null==e||null===(o=e.data)||void 0===o?void 0:o.watchedTime)||null,(f=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(p=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)}).catch(function(e){var t,n,i,r;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){E(r,c).then(function(){var r=t(n.mark(function t(r){var l,s,u,c,m,h,g,y,T,w,_,I,b,E,S,k,A,O,P,D,L,C,F,x,j,R,V,N,W,U,M,B,H,q,z,Q,Y,K,X,J,$;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(k=null==r?void 0:r.data,A=(null==k?void 0:k.contentType)||"video",O=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},P=!(null==k||null===(m=k[A])||void 0===m||!m.isSSAIEnabled),D=P&&"MEDIA_TAILOR"==(null==O?void 0:O.vodAdSticherProvider),L=P&&"TRANSMIT"==(null==O?void 0:O.liveAdSticherProvider)&&!(null==O||!O.liveAdClientSideTracking),C=!(null==k||null===(h=k[A])||void 0===h||null===(g=h.streamingInfo)||void 0===g||!g.isLiveStream)||"linearchannel"===A,G(r.data),(F=(null==k||null===(y=k.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(_=w.web)||void 0===_?void 0:_.active)&&(null==k||null===(I=k.ads)||void 0===I||null===(b=I.preRoll)||void 0===b||null===(E=b.adTags)||void 0===E||null===(S=E.web)||void 0===S?void 0:S.url))&&Le(i,F,k),x=be(k,i),!D){t.next=17;break}return t.next=14,tt(i,k);case 14:x=t.sent,t.next=22;break;case 17:if(!L||!C){t.next=22;break}return hn(),t.next=21,vn(x,k,i);case 21:x=t.sent;case 22:x?(z=(null==k||null===(j=k.video)||void 0===j||null===(R=j.gist)||void 0===R?void 0:R.videoImageUrl)||(null==k||null===(V=k.video)||void 0===V||null===(N=V.gist)||void 0===N||null===(W=N.imageGist)||void 0===W?void 0:W.r16x9),(Q=o.getPlayer(i)).poster(z),En(i,x),L&&C?mn(i,{customData:window.customData||{ads:O}}):D&&dt(i,p),Q.on("loadstart",function(){C&&e({status:!0,msg:"Video Loaded",response:k})}),Q.on("loadeddata",function(){Pe(),e({status:!0,msg:"Video Loaded",response:k})}),Q.one("play",function(){!v||D||L&&C||f<95&&setTimeout(function(){Q.currentTime(v)},0)}),Q.one("error",function(){var e;a({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==k||null===(U=k.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==k||null===(H=k.video)||void 0===H||null===(q=H.closedCaptions)||void 0===q?void 0:q.length)>0?($=(null==k||null===(K=k.video)||void 0===K||null===(X=K.contentDetails)||void 0===X?void 0:X.closedCaptions)||(null==k||null===(J=k.video)||void 0===J?void 0:J.closedCaptions),Y=$.filter(function(e){return"VTT"===e.format}),d.addCaptions(i,Y)):d.removeCaptions(i)):(Oe(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 23:case"end":return t.stop()}},t)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){Sn(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),bn=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()},En=function(e,t){console.log("load video in core",t);var n=o.getPlayer(e);n&&n.src(t)},Sn=function(t,n,i,r){var o,a,l,s,d,u,c=null==t||null===(o=t.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==t?void 0:t.message);wn(n)&&Oe(n,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.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?gn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):gn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},r&&{videoId:r}))};exports.authenticateLC=_n,exports.baseUrlManager=P,exports.clearError=Pe,exports.comscoreInstanceManager=ze,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,t){R.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;O({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),V=n}).catch(function(e){return console.log(e)})},exports.disableControls=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 r=t.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){hn();var t=o.getPlayer(e),n=(ze.get()||{}).destroyComscoreTag;if(bn(),n&&n(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var i=document.getElementById(e);i&&i.remove()}},exports.getCurrentSeries=Q,exports.getCurrentVideo=z,exports.getDecodedToken=H,exports.getEntitlementData=function(e,t,n,i){var o,a;return r({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=pe,exports.getLinearChannelDetails=S,exports.getSGAIEnabledSource=tt,exports.getSeasonNumber=fe,exports.getSeriesDetails=function(e,t){var n,i,o=H(t),a=(null==o?void 0:o.site)||null;return 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})}):r({url:P.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return V},exports.getSource=be,exports.getSsaiEvents=function(e){var t=o.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var n=function(e,n){var i=function(e,t){return n(t)};return t.on(e,i),function(){return t.off(e,i)}};return{adBreakStart:function(e){return n(xe,e)},adImpression:function(e){return n(je,e)},adFirstQuartile:function(e){return n(Re,e)},adMidpoint:function(e){return n(Ve,e)},adThirdQuartile:function(e){return n(Ne,e)},adComplete:function(e){return n(We,e)},adBreakEnd:function(e){return n(Ue,e)}}},exports.getToken=B,exports.getTransmitEnabledSource=vn,exports.getUpdatedClusterSource=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 r=n.split(".com")[1]||"";return{src:r?"".concat(t).concat(r):n,type:i}},exports.getUserId=le,exports.getVideoDetails=E,exports.getVideoIdx=function(){return j},exports.getVideoInfo=A,exports.handleError=Oe,exports.initialiseAdvertisement=Le,exports.initialiseComscoreStreamingTracking=Qe,exports.initialiseKeyboardEvents=function(e,t){var n,i,r,a=o.getPlayer(e),l=null==a||null===(n=a.controlBar)||void 0===n||null===(i=n.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(n){var i,r,o,d,u,c,v,f,p;if(Fe.enabled&&!n.metaKey&&!n.ctrlKey&&"input"!=n.target.localName&&"textarea"!=n.target.localName){var m=n.key,h=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(n.preventDefault(),null==s||s.focus()),m){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===t.liveui||Tn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(p=f.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;h||yn(e,10)}}},!0)},exports.initializeTransmit=mn,exports.initiateErrorHandling=Sn,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=ee.getConfig();if(null==n||!n.disableBeacon){null!=t&&t.userId&&(re=t.userId);var i=o.getPlayer(e);window.initialise(i,null==t?void 0:t.analyticsCb),window.firstFrame(i,null==t?void 0:t.analyticsCb,null==t?void 0:t.analyticsEventParams),i.on("loadedmetadata",function(){window.endFirstFrame(i)})}}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=wn,exports.isTokenExpired=D,exports.load=In,exports.loadVideo=En,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.playerConfigManager=ee,exports.refreshTokenManager=C,exports.rewind=Tn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],h("js",new Date),h("config",e)},exports.saveWatchHistory=k,exports.seasonIdxManager=X,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=G,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=K,exports.setupAdvertisementMarkers=dt,exports.setupAdvertisementMarkersForLinear=yt,exports.skip=yn,exports.token_authentication_enabled=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},exports.trackMap=st,exports.trackingUrlManager=Ze,exports.videoReplayTracker=q;
|
package/cjs/index-0390e484.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-c6084619.js"),a=require("./generic-9fa3c0bb.js"),r=require("./autoNextVideo-11f9a504.js"),d=require("./icons-eb807ef0.js"),s=require("@babel/runtime/helpers/typeof"),u=require("video.js"),c=[],v=!1,m=function(e,t){var n=l.getPlayer(e),o=Math.floor(n.currentTime());if(Math.floor(n.duration())!=o){n.pause(e);var i=a.getVideoIdx();r.switchToNext(i,e,c)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},o=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var l,a,r,d,s,u,c,v;function m(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",m),v()}a=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),l.appendChild(r),r.src=a[0].src,r.className="vjs-thumbnail",t(r.style,a[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),u=d.duration(),d.on("durationchange",function(e){u=d.duration()}),d.on("loadedmetadata",function(e){u=d.duration()}),(s=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,v,m,p,f,g,h,y;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=o(s.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),v=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,v-=o(s.el()).getBoundingClientRect().left+h,i=Math.floor((v-s.el().offsetLeft)/s.width()*u),a)i>d&&(c=Math.max(c,d));(m=a[c]).src&&r.src!=m.src&&(r.src=m.src),m.style&&r.style!=m.style&&t(r.style,m.style),v+(g=function(e,t){var o;return t?parseFloat(t):"auto"!==(o=n(e)("clip"))&&"inherit"!==o&&4===(o=o.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(o[1])-parseFloat(o[3]):0}(r,m.width||a[0].width)/2)>f?v-=v+g-f:v<g&&(v=g),l.style.left=v+"px"},s.on("mousemove",c),s.on("touchmove",c),s.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",m)}),v=function(e){l.style.left="-1000px"},s.on("mouseout",v),s.on("touchcancel",v),s.on("touchend",v),d.on("userinactive",v)}),exports.addNextEpPreview=function(e,t){var n;if(v=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o;c=[];var r=a.getCurrentSeries();null==r||r.map(function(e){var t;return(t=c).push.apply(t,i(e.episodes))}),null==t||null===(o=t.series)||void 0===o||o.cb}else{var s,u;c=(null==t||null===(s=t.relatedVideos)||void 0===s?void 0:s.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var p=l.getPlayer(e);p.on("timeupdate",function(){var e,t;if(!v){var n=Math.floor(p.currentTime()),o=p.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&a.getVideoIdx()<=(null===(t=c)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var f,g=c.filter(function(e,t){return t==a.getVideoIdx()});if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,y,x,A,w,E,C,b,N,B,L,P;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var j=null===(y=document.getElementsByClassName("next-ep-title"))||void 0===y?void 0:y[0],I=null===(x=document.getElementsByClassName("next-ep-img"))||void 0===x?void 0:x[0],k=null===(A=document.getElementsByClassName("next-ep-content"))||void 0===A?void 0:A[0],q=null===(w=g[0])||void 0===w?void 0:w.title;(null===(E=q)||void 0===E?void 0:E.length)>60&&(q=q.substr(0,60)+"..."),j.textContent="".concat(q),I.src=(null===(C=g[0])||void 0===C||null===(b=C.gist)||void 0===b||null===(N=b.imageGist)||void 0===N?void 0:N.r16x9)||(null==g||null===(B=g[0])||void 0===B?void 0:B.img)||(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P?void 0:P.fallbackImage),k.onclick=function(){return m(e)}}else{var T,O,S,V,M,X,F,R,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var G=document.createElement("div");G.className="next-heading-wrapper";var H=document.createElement("div");H.className="next-ep-header",H.textContent="Next up";var Q=document.createElement("div");Q.className="next-ep-close",Q.onclick=function(){D.style.visibility="hidden",v=!0},Q.appendChild(l.parseSvgString(d.crossIconSvg())),G.append(H),G.append(Q);var U=null===(T=g[0])||void 0===T?void 0:T.title,W=document.createElement("img");W.className="next-ep-img",W.src=(null===(O=g[0])||void 0===O||null===(S=O.gist)||void 0===S||null===(V=S.imageGist)||void 0===V?void 0:V.r16x9)||(null==g||null===(M=g[0])||void 0===M?void 0:M.img)||(null===(X=window)||void 0===X||null===(F=X.customData)||void 0===F?void 0:F.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(R=U)||void 0===R?void 0:R.length)>60&&(U=U.substr(0,60)+"..."),Y.textContent="".concat(U);var _=document.createElement("div");_.className="next-ep-content",_.append(W),_.append(Y),_.onclick=l.debounce(function(){null==D||D.remove(),v=!0,m(e)},400),D.append(G),D.append(_)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),o=null==t?void 0:t.tvProviderLogoUrl;if(o){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(o),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}};
|
package/cjs/index-b639e99c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-9fa3c0bb.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/get"),u=require("@babel/runtime/helpers/inherits"),s=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),c=require("./util-0574b423.js"),v=require("./captions-676468fe.js"),f=require("./renditions-508e7f85.js"),p=require("./resolution-e6b8a4eb.js"),m=require("./skin-c6084619.js"),g=require("./browser-77c57718.js"),h=require("./localisation-56e0a999.js"),y=require("@babel/runtime/helpers/typeof");require("@viewlift/comscore/index.js");var b=require("@babel/runtime/helpers/toConsumableArray"),w=require("@babel/runtime/helpers/slicedToArray"),k=require("@viewlift/sse");function S(e,n,t,r){var i=a(d(1&r?e.prototype:e),n,t);return 2&r&&"function"==typeof i?function(e){return i.apply(t,e)}:i}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}var E=i.getComponent("TextTrackSettings"),C=i.dom,I=[{value:"12",label:"12px"},{value:"14",label:"14px"},{value:"16",label:"16px"},{value:"18",label:"18px"},{value:"20",label:"20px"},{value:"24",label:"24px"},{value:"28",label:"28px"},{value:"32",label:"32px"}],P=I.map(function(e){return e.value}),D="16",O="vlp-caption-font-size-px",j="vlp-caption-font-size-style",x=".vjs-font-percent > select",N=function(e){return-1!==P.indexOf(e)?e:D},A=null;E?(A=function(){u(r,E);var e,n,t=(e=r,n=T(),function(){var t,r=d(e);if(n){var i=d(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return s(this,t)});function r(e,n){var i;return o(this,r),(i=t.call(this,e,n)).customUiReady_=!0,i.applyCustomFontSizeUI_(),i}return l(r,[{key:"applyCustomFontSizeUI_",value:function(){this.replaceFontSizeOptions_(),this.bindFontSizeChange_(),this.restoreCustomFontSize_()}},{key:"replaceFontSizeOptions_",value:function(){var e=this.$(x);if(e){for(;e.firstChild;)e.removeChild(e.firstChild);I.forEach(function(n){e.appendChild(C.createEl("option",{value:n.value,textContent:n.label}))}),e.value=D}}},{key:"bindFontSizeChange_",value:function(){var e=this,n=this.$(x);n&&this.on(n,"change",function(){return e.applyFontSize_(n.value)})}},{key:"applyFontSize_",value:function(e){var n=N(e);if("undefined"!=typeof document){var t=document.getElementById(j);t||((t=document.createElement("style")).id=j,document.head.appendChild(t)),t.textContent=[".vjs-text-track-cue,",".vjs-text-track-cue > div,",".vjs-text-track-display-ttml,",".vjs-text-track-display-ttml span,",".vjs-text-track-display-ttml div","{ font-size: ".concat(n,"px !important; line-height: normal !important; }")].join(" ")}}},{key:"restoreCustomFontSize_",value:function(){var e=null;try{e=window.localStorage.getItem(O)}catch(e){}var n=N(e),t=this.$(x);t&&(t.value=n),this.applyFontSize_(n)}},{key:"getValues",value:function(){var e=S(r,"getValues",this,3)([]);return e&&delete e.fontPercent,e||{}}},{key:"setDefaults",value:function(){if(S(r,"setDefaults",this,3)([]),this.customUiReady_){var e=this.$(x);e&&(e.value=D),this.applyFontSize_(D)}}},{key:"saveSettings",value:function(){if(S(r,"saveSettings",this,3)([]),this.options_&&this.options_.persistTextTrackSettings){var e=this.$(x);if(e)try{window.localStorage.setItem(O,N(e.value))}catch(e){}}}},{key:"handleLanguagechange",value:function(){S(r,"handleLanguagechange",this,3)([]),this.applyCustomFontSizeUI_()}}]),r}(),i.registerComponent("TextTrackSettings",A)):console.warn("[vlp] CustomTextTrackSettings: video.js TextTrackSettings is not registered; skipping override.");var M=function(e){return new Promise(function(n,t){if(R(e))t("".concat(e," is alread initialised"));else{var r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}})},R=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},_=function(e,n,t){var r=m.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},L=function(e){var n=m.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},B=function(){var e=t(r.mark(function e(n){var t,o,l,a,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=m.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,M("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(i),e.finish(13);case 16:(u=i.getTech("chromecast"))&&!u.prototype.seeking&&(u.prototype.seeking=function(){}),null!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.chromecastReceiverId&&null!=n&&n.airplay&&"Safari"==g.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),V=function(e,n){var t=m.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),f=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=f*s,v.seek()}})};var U=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),M("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),F=function(){var n=t(r.mark(function n(){return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,import("@viewlift/comscore/index.js").then(function(n){e.comscoreInstanceManager.set(n)});case 2:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}(),q=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),H=function(){var e=t(r.mark(function e(){var n;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(i),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./index-84cce26a.js")});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=t(r.mark(function e(){return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then(function(){return require("./videojs-dash5.es-072614bc.js")});case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),K=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){M("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(i)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(i)})},loadAdsLibrary:U,loadEMELibrary:q,loadMuxPlugin:H,loadDvrSeekbar:z,loadContribDash:G,loadComscorePlugin:F});function W(e){return Y.apply(this,arguments)}function Y(){return(Y=t(r.mark(function e(n){var t;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,U();case 3:t&&"Safari"==g.detectBrowser()&&Promise.resolve().then(function(){return K}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $(e){return J.apply(this,arguments)}function J(){return(J=t(r.mark(function e(n){var t,i,o,l,a,u,s,d,c,v;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=m.getPlayer(n.playerId),e.next=3,F();case 3:v.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(i=n.comscore)||void 0===i?void 0:i.endpoint,applicationName:(null==n||null===(o=n.comscore)||void 0===o?void 0:o.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.implementationId,projectId:null==n||null===(u=n.comscore)||void 0===u?void 0:u.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(d=n.comscore)||void 0===d?void 0:d.persistentLabels)||{},metadata:(null==n||null===(c=n.comscore)||void 0===c?void 0:c.metadata)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e,n){return Q.apply(this,arguments)}function Q(){return(Q=t(r.mark(function e(n,t){var i,o,l,a,u,s,d,c,v,f,p,m,h,y;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return v=(null==t?void 0:t.contentType)||"video",f=null==t||null===(i=t[v])||void 0===i?void 0:i.drmEnabled,null==t||null===(o=t[v])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,p=(null==t||null===(a=t[v])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.dash)||null,m=(null==n||null===(d=n.comscore)||void 0===d?void 0:d.enable)||!1,h=!(null==n||null===(c=n.analytics)||void 0===c||!c.muxKey),e.prev=7,e.next=10,Promise.allSettled([f?"Safari"==g.detectBrowser()?q():"caliente"!=(null===(y=window)||void 0===y?void 0:y.siteName)?G():q():"Safari"!=g.detectBrowser()&&p?G():null,m?$(n):null,h?H():null,B(n)]);case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(7),console.log("Error",e.t0);case 15:case"end":return e.stop()}},e,null,[[7,12]])}))).apply(this,arguments)}function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ne=new Set,te=null,re=function(n,t,r,i){var o,l,a,u,s,d,c,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(o=n[f])||void 0===o?void 0:o.id)||"Null",v["c3.cm.contentType"]=de(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=t.currentSrc(),v[null==r||null===(u=r.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),v["c3.cm.categoryType"]=ae(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(s=n[f])||void 0===s?void 0:s.drmEnabled)||"None",v.DAIStream=null!==(d=n[f])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ue(n),v["c3.cm.genreList"]=oe(n),v["c3.cm.genre"]=ie(n),v["c3.cm.channel"]=le(n,i);var p=fe(e.getCurrentSeries(),n);return v=ee(ee({},v),p)},ie=function(e){var n,t,r,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},oe=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},le=function(e,n){var t,r,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(r=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===r?void 0:r.title)||"NULL"},ae=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},ue=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},se=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},de=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var ce,ve,fe=function(n,t){var r,i,o,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),d=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(o=n[s-1])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},pe=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},me=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ge=function(){var n=t(r.mark(function n(t,i){var o,l,a,u,s,d,c,v,f,p,g,h;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(null==i?void 0:i.convivaConfig)||{},l=o.trackConvivaPlayerEvent,a=o.paymentHandler,u=o.tveProvider,s=o.enable,d=o.appName,v=(c=i||{}).token,f=c.epg,s){n.next=4;break}return n.abrupt("return");case 4:if(p=m.getPlayer(t),"function"==typeof(g=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,g("getConvivaObject");case 10:if(h=n.sent){n.next=13;break}return n.abrupt("return");case 13:p.ready(function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=pe(t.keySystem);g("contentInfo",{DRMEnabled:r})}else g("contentInfo",{DRMEnabled:"None"})}),n||g("contentInfo",{DRMEnabled:"None"})}),p.on("loadstart",function(){var n,t;te&&te!==p.currentSrc()&&g("playbackEnded"),g("setPlayer",p),ne.clear(),te=p.currentSrc();var r=me(p.currentType()),o=e.getCurrentVideo(),l=re(o,p,h,f);l[null==h||null===(n=h.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",l[null==h||null===(t=h.Constants)||void 0===t?void 0:t.ASSET_NAME]=se(o,i),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u?"MVPD":"FREE"!==a?"D2C":"FREE",l["c3.cm.affiliate"]=u||"NULL",he.setData(l),g("contentInfo",l)}),p.on("loadedmetadata",function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),g("contentInfo",{screenResolution:e})}),p.on("play",function(){ne.has(p.currentSrc())||(ne.add(p.currentSrc()),g("playbackStarted",null))}),p.on("ended",function(){ne.has(p.currentSrc())&&ne.delete(p.currentSrc()),g("playbackEnded")}),p.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&g("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})}),p.on("dispose",function(){null==ne||ne.clear(),g("playbackEnded")});case 20:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}(),he=(ce={},{setData:function(e){ce=ee(ee({},ce),e)},getData:function(){return ce}}),ye=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then(function(){return require("./skin-c3708fa0.js")}).then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?Promise.resolve().then(function(){return require("./skin-f724b38f.js")}).then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?Promise.resolve().then(function(){return require("./skin-83da696f.js")}).then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?Promise.resolve().then(function(){return require("./skin-01f53e99.js")}).then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?Promise.resolve().then(function(){return require("./skin-55abd2ce.js")}).then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?Promise.resolve().then(function(){return require("./skin-9bf9775b.js")}).then(function(t){t.initialiseSkin(e,n)}):"news"==t?Promise.resolve().then(function(){return require("./skin-13f17735.js")}).then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?Promise.resolve().then(function(){return require("./skin-a810173d.js")}).then(function(t){t.initialiseSkin(e,n)}):"mini"==t?Promise.resolve().then(function(){return require("./skin-29bb949b.js")}).then(function(t){t.initialiseSkin(e,n)}):"CN_NEWS"==t&&Promise.resolve().then(function(){return require("./skin-3a02681c.js")}).then(function(t){t.initialiseSkin(e,n)})};function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ke=[],Se=0,Te=null;function Ee(){ve=null,ke=[],Se=0,Te=null}function Ce(t,r,i){var o,l,a,u,s,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==r||null===(o=r.watchHistory)||void 0===o||o.apiVersion;var c=null==r||null===(l=r.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),f=Math.floor(t.duration());null==r||null===(a=r.watchHistory)||void 0===a||a.xapiKey;var p=(null==r||null===(u=r.video)||void 0===u?void 0:u.originalObjectId)||null,m=(null==r||null===(s=r.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,g=Math.floor(t.currentTime()),h=d?100:Math.floor(v/f*100),y={};m?function(t,r,i){var o=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(i),l=Ie(o),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,t){return we(we({},e),{},n({},t,s[t]))},{}),c=l.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===ve});c<0?l.push(we(we({content:d},t),{},{addedDate:a,updateDate:a})):l[c]=we(we(we({},l[c]),t),{},{updateDate:a});localStorage.setItem("".concat(o),JSON.stringify(l))}(y={completed:d,watchedTime:g,watchedPercentage:h},c,r.siteOwner):(y=we(we({videoId:ve,watchedTime:g,watchedPercentage:h,doneWatching:d,profileId:c},Te&&{seriesId:Te}),p&&{originalObjectId:p}),e.saveWatchHistory(y).then(function(e){}).catch(function(e){})),Se=v+i}function Ie(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function Pe(e,n,t){var r=Ie(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return r&&Array.isArray(r)&&(i=r.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}var De=!1,Oe=function(n,t){var r,i,o=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[o])||void 0===r||null===(i=r.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!De){var l=je(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),De=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function je(e,n,t){if(Array.isArray(e))return e.map(function(e){return je(e,n,t)});if(null!==e&&"object"===y(e)){var r={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=je(e[i],n,t)}),r}return e}function xe(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ne(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ne(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function Ne(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Re=function(n,t,r,i){var o,l,a,u,s,d=i.res,c=i.sres,f=m.getPlayer(n),p=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(o=d[p])||void 0===o?void 0:o.drmEnabled)||!1,b=!(null==d||null===(l=d[p])||void 0===l||null===(a=l.streamingInfo)||void 0===a||!a.isLiveStream)||"linearchannel"===p,w=(null==d||null===(u=d[p])||void 0===u||null===(s=u.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;e.setCurrentVideo(d),e.videoReplayTracker.set(d),f&&(f.on("loadstart",function(){b?r.resolve({status:!0,msg:"Video Loaded",response:d}):r.resolve(Me({status:!0,msg:"Player Initialised"},c?{seriesResponse:c,response:d}:{response:d}))}),f.on("loadeddata",function(){var r,i,o,l=v.getCaptions(n);if(null==l||l.map(function(e){return v.disableCaptions(n,e.id)}),w&&"Safari"===g.detectBrowser())try{var a;null==f||null===(a=f.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==f||!f.muted())&&_(n,sessionStorage.getItem("volume")||"100");var u=e.getCurrentVideo();if(e.initialiseComscoreStreamingTracking(t),e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var s,c,p=Me(Me({},t),d);!function(e,n,t){var r,i,o;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(Te=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ke=[],Se=0,ve=t;var l=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,a=m.getPlayer(e);a&&(a.on("dispose",Ee),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());ke.includes(Se)||(e!=Se||e<l?e>Se&&(Se=e+l):(ke.push(e),Ce(a,n,l)))}}),a.one("ended",function(){Ce(a,n,l,!0)}))}(n,p,null==u||null===(s=u.video)||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.id)}if(null!=t&&null!==(o=t.analytics)&&void 0!==o&&o.muxKey&&null!=f&&f.mux){var h,y,b,k,S,T,E=(null===(h=e.getCurrentVideo())||void 0===h?void 0:h.video)||(null==d?void 0:d.video),C=null==E?void 0:E.gist,I={env_key:null==t||null===(y=t.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(b=window)||void 0===b?void 0:b.vl_player_version,video_id:null==C?void 0:C.id,video_title:null==C?void 0:C.title,video_series:null==E||null===(k=E.series)||void 0===k?void 0:k.title,video_stream_type:null!=E&&null!==(S=E.streamingInfo)&&void 0!==S&&S.isLiveStream?"live":"video",viewer_user_id:null==t||null===(T=t.analytics)||void 0===T?void 0:T.userId};f.mux({debug:!1,data:I})}}),f.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];f.trigger("subtitlechanged",n)}),f.on("subtitlechanged",function(e,n){var t,r,i,o,l,a,u,s,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(o=i.CastContext)||void 0===o||null===(l=o.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(d=s.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===f){var m,g=p.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),f.tech_.on("retryplaylist",function(){b&&Oe(d,n)}),f.on("error",function(){var t,i;(console.log("ERROR",f.error(),f.error().code),4===f.error().code&&b)?Oe(d,n):(e.handleError(n,(null==f||null===(t=f.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==f||null===(i=f.error())||void 0===i?void 0:i.message)||"Some error occured",response:d}))}),f.one("play",function(){var n,r,i,o,l;if(null===(n=window)||void 0===n||null===(r=n.app_data)||void 0===r||null===(i=r.appcmsMain)||void 0===i||null===(o=i.adsConfig)||void 0===o||!o.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var a,u,s,d=null===(a=e.getCurrentVideo())||void 0===a||null===(u=a.video)||void 0===u||null===(s=u.gist)||void 0===s?void 0:s.id,c=e.getSeriesWatchMap(),v=(null==c?void 0:c.get(d))||{t:0,p:0},p=v.t,m=v.p;p&&m<95&&setTimeout(function(){f.currentTime(p)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){f.currentTime(null==t?void 0:t.watchHistoryResumeTime)},0);if(null!=f&&f.dvrSeekbar)try{f.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}}),f.on("volumechange",function(){var e=100*f.volume().toFixed(2);f.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),f.on("chromecastDisconnected",function(){if(b){f.currentSource();for(var e=f.textTracks(),n=e.length-1;n>=0;n--)f.removeRemoteTextTrack(e[n])}}),f.one("loadeddata",function(){var e,n=(null==f||null===(e=f.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),r=(n.language||n.label||"").toUpperCase();return t<r?-1:t>r?1:0}),"object"==y(f.dash)){var t,r,i,o=null==f||null===(t=f.dash)||void 0===t||null===(r=t.mediaPlayer)||void 0===r?void 0:r.getTracksFor("audio"),l=null==o?void 0:o.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=xe(n);try{for(a.s();!(i=a.n()).done;){var u=i.value;if(l&&(null==u?void 0:u.id)=="dash-audio-".concat(l.index)){u.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var s,d=xe(n);try{for(d.s();!(s=d.n()).done;){var c,v,p,m=s.value;if(("Chrome"==g.detectBrowser()||"Edge"==g.detectBrowser()&&(null!==(c=navigator)&&void 0!==c&&null!==(v=c.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=m&&null!==(p=m.label)&&void 0!==p&&p.includes("5.1"))f.audioTracks().removeTrack(m);else{if("main"==m.kind){m.enabled=!0;break}m.enabled=!1}}}catch(e){d.e(e)}finally{d.f()}}}))};function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Be=function(o,l,a,u){var s,d,c,f,p,h,y,b,w,k,S,T,E,C,I,P,D,O,j,x,N,A,M,R,_,L,B,U,F,q,H,z,G,K,W,Y,$,J,Q,Z=l.res,ee=void 0===Z?null:Z,ne=l.sres,te=void 0===ne?null:ne,re=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],ie=(null===(s=ee)||void 0===s?void 0:s.contentType)||"video",oe=m.impolicy16x9(null===(d=ee)||void 0===d||null===(c=d[ie])||void 0===c||null===(f=c.gist)||void 0===f?void 0:f.videoImageUrl)||m.impolicy16x9(null===(p=ee)||void 0===p||null===(h=p[ie])||void 0===h||null===(y=h.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),le=(null===(w=ee)||void 0===w||null===(k=w[ie])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,ae=!(null===(T=ee)||void 0===T||null===(E=T[ie])||void 0===E||null===(C=E.streamingInfo)||void 0===C||!C.isLiveStream)||"linearchannel"===ie,ue=(null===(I=ee)||void 0===I||null===(P=I.ads)||void 0===P||null===(D=P.preRoll)||void 0===D||null===(O=D.adTags)||void 0===O||null===(j=O.web)||void 0===j?void 0:j.active)&&(null===(x=ee)||void 0===x||null===(N=x.ads)||void 0===N||null===(A=N.preRoll)||void 0===A||null===(M=A.adTags)||void 0===M||null===(R=M.web)||void 0===R?void 0:R.url);ee=Le(Le({},ee),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var se=(null==a||null===(_=a.customData)||void 0===_?void 0:_.ads)||{},de=(null===(L=ee)||void 0===L||null===(B=L[ie])||void 0===B?void 0:B.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==se?void 0:se.vodAdSticherProvider)||!1,ce=!(null===(U=ee)||void 0===U||null===(F=U[ie])||void 0===F||!F.isSSAIEnabled)&&"TRANSMIT"==(null==se?void 0:se.liveAdSticherProvider)&&!(null==se||!se.liveAdClientSideTracking),ve=(null==a?void 0:a.latency)||6,fe=(null==a?void 0:a.skin_settings)||{},pe=(J={enableSmoothSeeking:!0,controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==fe?void 0:fe.pictureInPictureToggle)||!1},playbackRates:null!=fe&&fe.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==a.skin,liveui:le},n(J,"autoplay",null==a?void 0:a.autoplay),n(J,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!ue),n(J,"loop",(null==a?void 0:a.loop)||!1),n(J,"audioPosterMode",null==a?void 0:a.audioPosterMode),n(J,"html5",Le(Le({dash:Le(Le(Le({},!i.browser.IS_SAFARI&&{useTTML:!0}),(null==a?void 0:a.debugConfig)&&(null==a||null===(q=a.debugConfig)||void 0===q?void 0:q.enable)&&{debug:!0,logLevel:null!=a&&null!==(H=a.debugConfig)&&void 0!==H&&H.logLevel?null==a||null===(z=a.debugConfig)||void 0===z?void 0:z.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:ve},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:Le({},"IE"==g.detectBrowser()&&{enableStallFix:!0,stallSeek:1}),abr:Le(Le(Le(Le({},(null==a?void 0:a.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==a?void 0:a.initialBandwidth)/1e3}}),(null==a?void 0:a.maxBitrate)&&{maxBitrate:{audio:-1,video:(null==a?void 0:a.maxBitrate)/1e3}}),(null==a?void 0:a.minBitrate)&&{minBitrate:{audio:-1,video:(null==a?void 0:a.minBitrate)/1e3}}),{},{rules:{throughputRule:{active:!0},bolaRule:{active:!1},insufficientBufferRule:{active:!1},switchHistoryRule:{active:!1},droppedFramesRule:{active:!1},abandonRequestsRule:{active:!1}},autoSwitchBitrate:{video:!0,audio:!0}})}}}),vhs:Le(Le(Le({},(null==a?void 0:a.initialBandwidth)&&{bandwidth:a.initialBandwidth}),{},{liveRangeSafeTimeDelta:ve,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==a||!a.initialBandwidth},(null==a||null===(G=a.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(K=null==a?void 0:a.enableLowInitialPlaylist)&&void 0!==K&&K}),debug:(null==a?void 0:a.debugConfig)&&(null==a||null===(W=a.debugConfig)||void 0===W?void 0:W.enable)||!1,nativeTextTracks:"Safari"==g.detectBrowser()},0==(null==a||null===(Y=a.customData)||void 0===Y?void 0:Y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===($=a.customData)||void 0===$?void 0:$.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(J,"poster",oe),n(J,"techOrder",re),n(J,"chromecast",{requestCustomDataFn:function(n){var t,r,i=m.getPlayer(o),l=((null==i?void 0:i.textTracksJson_)||i.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),u=function(e,n,t){var r,i,o,l,a,u,s,d,c,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,g,h,y,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==T?void 0:T.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);p.licenseUrl=E;var C=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=C}var I=(null==e||null===(r=e[f])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=I;var P=null==e||null===(o=e[f])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;p.duration=P;var D=null==e||null===(a=e[f])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;p.mediaTitle=D;var O=null==e||null===(s=e[f])||void 0===s||null===(d=s.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=O,p.subTitles=t,p.DVR=(null==e||null===(c=e[f])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(ee,n,l);return Le(Le({},u),{},{transmitTrackingUrl:e.trackingUrlManager.get()||null,convivaMetaData:Le({customerKey:(null==a||null===(t=a.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==a||null===(r=a.convivaConfig)||void 0===r?void 0:r.debug)||!1},he.getData())})},modifyLoadRequestFn:function(e){var n,t,r,i,l,a=m.getPlayer(o),u=(null==a?void 0:a.currentSource())||{};!(null===(n=ee)||void 0===n||null===(t=n[ie])||void 0===t||null===(r=t.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=u&&u.src&&null!=u&&null!==(l=u.src)&&void 0!==l&&l.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),J);if(!i.getPlayers()[o]){null!=a&&a.debugConfig&&null!=a&&null!==(Q=a.debugConfig)&&void 0!==Q&&Q.enable&&i.log.level("debug");var me=i(o,pe,function(){var n=t(r.mark(function n(){var t,l,s,d,c,f,p,m,g,h,y,b,w,k,S,T,E,C,I,P;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(me),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,X(a,ee);case 5:if(b=null===(t=ee)||void 0===t||null===(l=t[ie])||void 0===l||null===(s=l.liveDetails)||void 0===s?void 0:s.startOverTime,ae&&u.resolve(Le({status:!0,msg:"Player Initialised"},te?{seriesResponse:te,response:ee}:{response:ee})),e.inititateBeacon(o,{analyticsCb:null==a?void 0:a.analyticsCb,analyticsEventParams:null==a?void 0:a.analyticsEventParams,userId:null==a?void 0:a.userId}),ge(o,a),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),le&&V(o,b),!ue||null!=a&&null!==(d=a.customData)&&void 0!==d&&d.disableAds||e.initialiseAdvertisement(o,ue,ee),w=e.getSource(ee,o),console.log(w),null!=a&&a.nearestClusterUrl&&(w=e.getUpdatedClusterSource(w,a.nearestClusterUrl)),!de){n.next=21;break}return n.next=18,e.getSGAIEnabledSource(o,ee);case 18:w=n.sent,n.next=25;break;case 21:if(!ce){n.next=25;break}return n.next=24,e.getTransmitEnabledSource(w,ee,o);case 24:w=n.sent;case 25:w?e.loadVideo(o,w):(u.reject({status:!1,msg:"Incompatible / Missing Source",response:ee}),e.handleError(o,"Incompatible / Missing Source")),((null===(c=ee)||void 0===c||null===(f=c[ie])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(g=ee)||void 0===g||null===(h=g[ie])||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0)&&(P=(null===(S=ee)||void 0===S||null===(T=S[ie])||void 0===T||null===(E=T.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(C=ee)||void 0===C||null===(I=C[ie])||void 0===I?void 0:I.closedCaptions),k=P.filter(function(e){return"VTT"===e.format}),v.addCaptions(o,k)),null!=a&&a.disableControls?e.disableControls(o):ye(o,Le(Le(Le({},a),pe),{},{liveVideo:ae,isDvrEnabled:le,res:ee,sres:te})),Re(o,Le(Le(Le({},a),pe),{},{liveVideo:ae}),u,{res:ee,sres:te});case 29:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}};function Ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Fe,qe=function(e,n){var t=n.resolve,r=n.reject,i=null==e?void 0:e.playerId,o=He(e);Be(i,{res:o},e,{resolve:t,reject:r})},He=function(n){var t,r,i,o,l,a,u,s,d,c,v,f,p,m=null==n?void 0:n.streamingInfo,g=null==n||null===(t=n.streamingInfo)||void 0===t?void 0:t.videoAssets,h=(null==n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isDrmEnabled)||null,y=(null==n||null===(i=n.streamingInfo)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.url)||null,w=(null==n||null===(l=n.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,k=(null==n||null===(a=n.streamingInfo)||void 0===a?void 0:a.subtitles)||[],S=(null==n||null===(u=n.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.drmProvider)||null,T=(null==n||null===(d=n.streamingInfo)||void 0===d?void 0:d.macroMap)||[],E=(null==n||null===(c=n.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.isSSAIEnabled)||!1,C=null==n?void 0:n.token,I=e.getDecodedToken(C);null==I||I.site;var P=null==I?void 0:I.siteId,D=(null==n||null===(f=n.customData)||void 0===f||null===(p=f.comscore)||void 0===p?void 0:p.video)||null,O=Ue(Ue({id:"".concat(P,"_external")},!h&&{directPlaybackUrl:null==g?void 0:g.url}),{},{video:Ue(Ue(Ue(Ue(Ue({drmEnabled:h,streamingInfo:Ue(Ue({videoAssets:Ue(Ue({},S&&{drmProvider:S}),{},{widevine:null==g?void 0:g.widevine,fairPlay:null==g?void 0:g.fairPlay,playReady:null==g?void 0:g.playReady})},(null==m?void 0:m.isDvrEnabled)&&{isLiveStream:!0}),(null==D?void 0:D.isLiveStream)&&{isLiveStream:null==D?void 0:D.isLiveStream})},E&&{isSSAIEnabled:E}),{},{metadata:T,liveDetails:{isDvrEnabled:null==m?void 0:m.isDvrEnabled},gist:Ue(Ue(Ue({},w&&{videoImageUrl:w}),(null==D?void 0:D.videoId)&&{id:null==D?void 0:D.videoId}),(null==D?void 0:D.videoTitle)&&{title:null==D?void 0:D.videoTitle}),contentDetails:Ue({},(null==k?void 0:k.length)>0&&{closedCaptions:b(k)})},(null==D?void 0:D.runtime)&&{runtime:null==D?void 0:D.runtime}),(null==D?void 0:D.publishDate)&&{publishDate:null==D?void 0:D.publishDate}),(null==D?void 0:D.platform)&&{platform:null==D?void 0:D.platform}),(null==D?void 0:D.series)&&{series:null==D?void 0:D.series}),ads:{preRoll:{adTags:{web:Ue(Ue({},y&&{active:!0}),y&&{url:y})}}}});return D&&(null!=D&&D.isDvrEnabled&&(O.video.liveDetails=Ue(Ue({},O.video.liveDetails),{},{isDvrEnabled:null==D?void 0:D.isDvrEnabled})),null!=D&&D.metadata&&(O.video.metadata=[].concat(b(O.video.metadata),b(null==D?void 0:D.metadata)))),O},ze=null,Ge=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),r=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=r>0&&t>4?r:0,o=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),r=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(r-=1),r<0&&(t-=1),t}(new Date,new Date(n));return[o>0&&i>0?o:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},Ke=function(e){var n,t=w(e,8),r=t[0],i=t[1],o=t[2],l=t[3],a=t[4],u=t[5],s=t[6],d=t[7];n=r>=1?" ".concat(r," Year"):i>=1?" ".concat(i," month"):o>=1?" ".concat(o," week"):l>=1?" ".concat(l," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(u," minutes ").concat(s," seconds"):u>0?"".concat(u," minutes ").concat(s," seconds"):"".concat(s," seconds"),d.textContent="".concat(n)},We=(Fe={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return Fe},set:function(e){Fe={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function Ye(e,n,t,r){if(e){var i=function(){var e,i,l=null===(e=We.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(i=We.get())||void 0===i?void 0:i.scheduleEndTimeMs,u=Date.now();if(u-a>0){var s=document.getElementsByClassName("error-message")[0];return s&&(s.textContent=h.getLocalisation("eventEnded")||"Game has ended",r.textContent=""),clearInterval(o),void(null==t||t())}var d=l-u;if(d/1e3<=0)return clearInterval(o),null==n||n([0,0,0,0,0,0,0,r]),void(null==t||t());var c=Ge(d,l);null==n||n([].concat(b(c),[r]))};i();var o=setInterval(i,1e3);return o}}var $e=function(e,n,t){var r,i,o,l,a,u,s,d,c=null==n||null===(r=n.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.errorCode,v=(null==n||null===(o=n.response)||void 0===o||null===(l=o.data)||void 0===l?void 0:l.errorMessage)||(null==n?void 0:n.message)||null;We.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(u=a.data)||void 0===u?void 0:u.scheduleStartDate,endDateTime:null==n||null===(s=n.response)||void 0===s||null===(d=s.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,r){var i,o,l=Date.now(),a=null===(i=We.get())||void 0===i?void 0:i.scheduleStartTimeMs,u=null===(o=We.get())||void 0===o?void 0:o.scheduleEndTimeMs,s=function(e,n,t,r){var i;e<0?i=h.getLocalisation("eventNotStarted")||r||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(i=h.getLocalisation("eventEnded")||r||"Game has ended");return i||r}(l-a,l-u,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(s));var c=document.getElementsByClassName("error-timer-message")[0];c&&Ye(Math.abs(a),Ke,r,c)}else{var v=document.getElementById(e).parentElement;if(v){var f=document.createElement("div");f.className="error-container";var p=document.createElement("div");p.className="error-message";var m=document.createElement("div");m.className="error-timer-message",p.textContent="".concat(s),f.appendChild(p),f.appendChild(m),v.append(f),Ye(Math.abs(a),Ke,r,m)}}}(e,c,v,t)};function Je(n,t){var r=t.scheduleEndDate,i=t.scheduleStartDate;We.set({startDateTime:i,endDateTime:r}),ze&&clearInterval(ze),ze=setInterval(function(){var t,r=Date.now(),i=null===(t=We.get())||void 0===t?void 0:t.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",i),i&&r>i){var o;console.log("Game ended");var l=m.getPlayer(n);if(e.isPlayerInitialised(n)&&l){var a;l.dispose(),console.log("Player disposed");var u=null===(a=document.getElementsByClassName("vl-container"))||void 0===a?void 0:a[0],s=document.createElement("video");s.id=n,s.className="video-js",s.style.width="100%",s.style.height="100%",u&&u.appendChild(s)}var d=h.getLocalisation("eventEnded")||"Game has ended",c=null===(o=document.getElementsByClassName("error-container"))||void 0===o?void 0:o[0];if(c){var v=c.querySelector(".error-message");v&&(v.textContent=d)}else{var f=document.getElementById(n),p=null==f?void 0:f.parentElement;if(p){(c=document.createElement("div")).className="error-container";var g=document.createElement("div");g.className="error-message",g.textContent=d,c.appendChild(g),p.append(c)}}clearInterval(ze)}},1e3)}function Xe(e,n){return Qe.apply(this,arguments)}function Qe(){return(Qe=t(r.mark(function n(t,i){var o,l,a,u,s,d,c,v,f;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,s=null==t?void 0:t.videoId,d=null==t?void 0:t.playerId,c=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:v=n.sent,f=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getVideoDetails(s,v,f).then(function(n){var r,i,o,l,f,p,m,g,h,y;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(null==n?void 0:n.data);var b=null==n||null===(l=n.data)||void 0===l||null===(f=l.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.scheduleEndDate,w=null==n||null===(m=n.data)||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.scheduleStartDate;Je(d,{scheduleEndDate:b,scheduleStartDate:w});var k,S=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(y=t.watchHistory)&&void 0!==y&&y.enable&&!c)if((null===(k=t.watchHistory)||void 0===k?void 0:k.saveOffline)||!1){var T,E,C,I=Pe((null===(T=t.watchHistory)||void 0===T?void 0:T.profileId)||"",s,null==t?void 0:t.siteOwner);if(I&&I.length)t.watchHistoryResumeTime=(null===(E=I[0])||void 0===E?void 0:E.watchedTime)||null,t.watchedPercentage=(null===(C=I[0])||void 0===C?void 0:C.watchedPercentage)||null;S.contentType="video",Be(d,{res:S},t,{resolve:a,reject:u})}else e.getVideoInfo(s,v).then(function(e){var n,r,i,o,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).catch(function(e){var n,t,r,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(e))}).finally(function(){Be(d,{res:S},t,{resolve:a,reject:u})});else Be(d,{res:S},t,{resolve:a,reject:u})}).catch(function(n){var r,i,o=(null==t||null===(r=t.event)||void 0===r?void 0:r.showScheduleTimer)||!1,l=(null==t||null===(i=t.event)||void 0===i?void 0:i.onCountdownComplete)||null;o&&$e(d,n,l),e.initiateErrorHandling(n,d,u,s)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e,n){return en.apply(this,arguments)}function en(){return(en=t(r.mark(function n(t,i){var o,l,a,u,s,d,c,v;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.resolve,u=i.reject,n.next=3,e.getToken();case 3:s=n.sent,d=null==t?void 0:t.playerId,c=null==t?void 0:t.epg,v=!1===(null==t||null===(o=t.customData)||void 0===o||null===(l=o.ads)||void 0===l?void 0:l.isSSAIEnabled),e.getLinearChannelDetails(c,s,v).then(function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==c?void 0:c.channelId,Be(d,{res:n},t,{resolve:a,reject:u})}).catch(function(n){e.initiateErrorHandling(n,d,u,videoId)});case 8:case"end":return n.stop()}},n)}))).apply(this,arguments)}function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=t(r.mark(function n(t,i){var o,l,a,u,s,d,c;return r.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,d=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(d)),c=null==t||null===(o=t.series)||void 0===o?void 0:o.id,e.getSeriesDetails(c,u).then(function(n){var r,i,o,d=n.data,v=n.data.seasons;e.setCurrentSeries(v);var f=videoId||(null==v||null===(r=v[0])||void 0===r||null===(i=r.episodes)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id);e.createSeriesWatchMap(c,u),e.getVideoDetails(f,u).then(function(n){var r,i,o;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(n.data),Be(s,{res:null==n?void 0:n.data,sres:d},t,{resolve:l,reject:a})}).catch(function(n){e.initiateErrorHandling(n,s,a,videoId)})}).catch(function(n){e.initiateErrorHandling(n,s,a)});case 9:case"end":return n.stop()}},n)}))).apply(this,arguments)}var rn,on=(rn=new Map,{set:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=Array.isArray(n)?n:[];return rn.set(e,t),t},get:function(e){return rn.get(e)||[]},remove:function(e){rn.delete(e)}});function ln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function an(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return un(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?un(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,o=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw o}}}}function un(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var sn=function(e){var n=Date.parse(null==e?void 0:e.eventStartUtc),t=Number.isFinite(n)?n/1e3:0;return{start:t+(Number(null==e?void 0:e.startTime)||0),end:t+(Number(null==e?void 0:e.endTime)||0)}},dn=function(e){var n;try{var t,r,i=null==e||null===(t=e.liveTracker)||void 0===t||null===(r=t.seekableEnd)||void 0===r?void 0:r.call(t);if(Number.isFinite(i))return i}catch(e){}var o=null==e||null===(n=e.seekable)||void 0===n?void 0:n.call(e);return o&&o.length?o.end(o.length-1):NaN};function cn(e){var t=null,r=null,i="none",o=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return r+(n-t);var l=dn(o);return Number.isFinite(l)?l-(Date.now()/1e3-n):null},l=function(){var n=m.getPlayer(e),t=n&&n.seekable();return t&&t.length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}};return{refreshAnchor:function(){var n=m.getPlayer(e);if(n){var o=function(e){try{var n=e.tech(!0),t=n&&n.vhs,r=t&&t.playlists,i=r&&"function"==typeof r.media&&r.media();return i&&i.segments||null}catch(e){return null}}(n),l=n.currentTime()||0;if(o&&o.length){var a,u=null,s=1/0,d=an(o);try{for(d.s();!(a=d.n()).done;){var c=a.value;if(c&&"number"==typeof c.programDateTime&&"number"==typeof c.start&&Number.isFinite(c.start)){var v=Math.abs(c.start-l);v<s&&(s=v,u=c)}}}catch(e){d.e(e)}finally{d.f()}if(u)return t=u.programDateTime/1e3,r=u.start,void(i="pdt")}t=null,r=null,i="now"}},anchorInfo:function(){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ln(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}({anchorPdtSec:t,anchorPlayerT:r,source:i},l())},chapterToPlayerTime:function(e){return o(sn(e).start)},chapterStartPercent:function(e){return function(e){var n=l(),t=n.start,r=n.end;if(!(r>t))return null;var i=o(e);return null==i||i<t||i>r?null:(i-t)/(r-t)*100}(sn(e).start)},playerTimeToChapterIndex:function(n,o){var l=function(n){var o=m.getPlayer(e);if(!o)return null;if("pdt"===i&&null!=t)return t+(n-r);var l=dn(o);return Number.isFinite(l)?Date.now()/1e3-(l-n):null}(n);if(null==l)return-1;for(var a=-1,u=0;u<o.length;u++){var s=sn(o[u]),d=s.start,c=s.end,v=Math.max(c,d+.001);l>=d&&l<v&&(a=u)}return a},windowBounds:l}}function vn(e){return"livedvr"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).timeMode?cn(e):function(e){var n=function(e){return Number(null==e?void 0:e.startTime)||0},t=function(e){var t=Number(null==e?void 0:e.endTime);return Number.isFinite(t)?t:n(e)};return{chapterToPlayerTime:function(e){return n(e)},chapterStartPercent:function(t){var r=m.getPlayer(e),i=r&&r.duration();if(!Number.isFinite(i)||i<=0)return null;var o,l=n(t);return l<0||l>i?null:100*((o=l/i)<0?0:o>1?1:o)},playerTimeToChapterIndex:function(e,r){for(var i=-1,o=0;o<r.length;o++){var l=n(r[o]),a=Math.max(t(r[o]),l+.001);e>=l&&e<a&&(i=o)}return i},windowBounds:function(){var n=m.getPlayer(e),t=n&&n.duration();return{start:0,end:Number.isFinite(t)?t:0}},refreshAnchor:function(){},anchorInfo:function(){return{source:"vod"}}}}(e)}var fn="chapter-change",pn="chapter-click",mn="chapters-updated";function gn(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=m.getPlayer(e);r?r.trigger(n,t):console.error("[CHAPTERS] Player instance not found")}function hn(e){var n=m.getPlayer(e);if(!n)return console.error("[CHAPTERS] Player instance not found"),{};var t=function(e,t){var r=function(e,n){return t(n)};return n.on(e,r),function(){return n.off(e,r)}};return{onChapterChange:function(e){return t(fn,e)},onChapterClick:function(e){return t(pn,e)},onChaptersUpdated:function(e){return t(mn,e)}}}var yn="vjs-chapter-marker",bn="vjs-chapter-preview",wn=function(e){try{var n,t,r;return(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r?void 0:r.el())||null}catch(e){return null}};function kn(e,n){var t=n.store,r=n.mapper,o=n.chaptersConfig,l=void 0===o?{}:o,a=n.seek,u=m.getPlayer(e);if(!u)return{render:function(){},reposition:function(){},destroy:function(){}};var s=new Map,d=null,c=-1,v=function(){return!0===(null==l?void 0:l.enable)},f=function(n,t){var o=m.getPlayer(e),l=wn(o);if(l){var a=function(e){if(d&&d.isConnected)return d;(d=document.createElement("div")).className=bn;var n=document.createElement("div");n.className="vjs-chapter-preview__time";var t=document.createElement("div");t.className="vjs-chapter-preview__label",d.appendChild(n),d.appendChild(t);var r=document.createElement("span");return r.className="vjs-chapter-preview__pointer",d.appendChild(r),d._time=n,d._label=t,e.appendChild(d),d}(l);a._time.textContent=function(e){try{var n=r.chapterToPlayerTime(e);if(null==n||!Number.isFinite(n))return"";if("vod"===("function"==typeof r.anchorInfo?r.anchorInfo():{}).source)return i.formatTime(n,n);var t=(r.windowBounds()||{}).end;if(!Number.isFinite(t))return"";var o=Math.max(0,t-n);return"-".concat(i.formatTime(o,o))}catch(e){return""}}(n),a._label.textContent=(null==n?void 0:n.label)||"",a.style.left="".concat(t,"%"),a.classList.add("vjs-chapter-preview--visible")}},p=function(){d&&d.classList.remove("vjs-chapter-preview--visible")},g=function(n){var t=document.createElement("div");t.className=yn,t.dataset.segmentId=String(n.segmentId);var i=function(e){var n=null!=e&&e.icon?String(e.icon).trim():"";if(!n)return null;var t=document.createElement("span");if(t.className="vjs-chapter-marker__icon","<"===n.charAt(0)){var r=m.parseSvgString(n);r&&t.appendChild(r)}else{var i=document.createElement("img");i.src=n,i.alt="",t.appendChild(i)}return t}(n);return i&&t.appendChild(i),t.addEventListener("click",function(t){t.stopPropagation(),"function"==typeof a&&a(n.segmentId),gn(e,pn,{chapter:n})}),t.addEventListener("mouseenter",function(){var e=r.chapterStartPercent(n);null!=e&&f(n,e)}),t.addEventListener("mouseleave",p),t},h=function(){v()&&0!==s.size&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=s.get(String(e.segmentId));if(n){var t=r.chapterStartPercent(e);null==t?n.style.display="none":(n.style.display="",n.style.left="".concat(t,"%"))}}))},y=function(){var n=m.getPlayer(e);if(n){var i=t.get(e),o=r.playerTimeToChapterIndex(n.currentTime()||0,i);if(o!==c){c=o,s.forEach(function(e){return e.classList.remove("".concat(yn,"--active"))});var l=o>=0?i[o]:null;if(l){var a=s.get(String(l.segmentId));a&&a.classList.add("".concat(yn,"--active"))}gn(e,fn,{chapter:l})}}},b=m.throttle(function(){h(),y()},1e3),w=function(){h(),y()};u.on("timeupdate",b),u.on("seeked",w);var k=!1;try{u.liveTracker&&"function"==typeof u.liveTracker.on&&(u.liveTracker.on("liveedgechange",h),k=!0)}catch(e){}var S=null;(function(){try{return"function"==typeof r.anchorInfo&&"vod"!==r.anchorInfo().source}catch(e){return!1}})()&&(S=setInterval(h,500));return{render:function(){var n=m.getPlayer(e),i=wn(n);i&&(i.querySelectorAll(".".concat(yn)).forEach(function(e){return e.remove()}),s.clear(),c=-1,v()&&(r.refreshAnchor(),t.get(e).forEach(function(e){var n=g(e);i.appendChild(n),s.set(String(e.segmentId),n)}),h()))},reposition:h,destroy:function(){try{u.off("timeupdate",b),u.off("seeked",w),k&&u.liveTracker.off("liveedgechange",h)}catch(e){}S&&(clearInterval(S),S=null);var n=wn(m.getPlayer(e));n&&n.querySelectorAll(".".concat(yn,", .").concat(bn)).forEach(function(e){return e.remove()}),s.clear(),d=null}}}var Sn=new Map,Tn=function(e){try{var n,t,r;return!(null==e||null===(n=e.controlBar)||void 0===n||null===(t=n.progressControl)||void 0===t||null===(r=t.seekBar)||void 0===r||!r.el())}catch(e){return!1}},En=function(e){var n=Sn.get(e);if(n)return n;n={mapper:vn(e,{timeMode:"vod"}),markers:null,chaptersConfig:{},timeMode:"vod"},Sn.set(e,n);var t=m.getPlayer(e);return t&&t.on("dispose",function(){return jn(e)}),n},Cn=function(e){var n=Sn.get(e),t=function(e){var n=Sn.get(e);if(!n||n.markers)return(null==n?void 0:n.markers)||null;var t=m.getPlayer(e);return t&&Tn(t)?(n.markers=kn(e,{store:on,mapper:n.mapper,chaptersConfig:n.chaptersConfig,seek:function(n){return On(e,n)}}),n.markers):null}(e);t&&n&&t.render()};function In(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return En(e),on.set(e,n),Cn(e),gn(e,mn,{chapters:on.get(e)}),!0}function Pn(e){return on.get(e)}function Dn(e){on.set(e,[]);var n=Sn.get(e);return null!=n&&n.markers&&n.markers.render(),gn(e,mn,{chapters:[]}),!0}function On(e,n){var t=m.getPlayer(e),r=En(e);if(!t)return!1;var i=on.get(e).find(function(e){return e.segmentId===n});if(!i)return!1;r.mapper.refreshAnchor();var o=r.mapper.chapterToPlayerTime(i);if(null==o||!Number.isFinite(o))return!1;var l=r.mapper.windowBounds(),a=l.start,u=l.end;return Number.isFinite(a)&&Number.isFinite(u)&&u>a&&(o=Math.min(Math.max(o,a),u-.1)),t.currentTime(o),!0}function jn(e){var n=Sn.get(e);n&&(n.disposed=!0,n.markers&&n.markers.destroy()),Sn.delete(e),on.remove(e)}var xn,Nn=function(n){var t=n.site,r=n.sseBaseUrl,i=n.sseEndpoint,o=n.debug,l=void 0!==o&&o;return k.createSSETransport({site:t,sseBaseUrl:r,getToken:e.getToken,sseEndpoint:i,onOpen:function(e){var n=e.userId,t=e.endpoint;l&&console.log("SSE Connected:",n,t)},onMessage:function(n){var t,r,i,o,a,u,s,d,c,v;if(l&&console.log("SSE Message:",n),(null===(t=e.getCurrentVideo())||void 0===t||null===(r=t.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)===(null==n||null===(o=n.payload)||void 0===o?void 0:o.id)&&"GAME_STATE_CHANGE"===(null==n?void 0:n.notificationType)){var f=1e3*(null==n||null===(a=n.payload)||void 0===a||null===(u=a.states)||void 0===u||null===(s=u.live)||void 0===s?void 0:s.startDateTime),p=1e3*(null==n||null===(d=n.payload)||void 0===d||null===(c=d.states)||void 0===c||null===(v=c.end)||void 0===v?void 0:v.endDateTime);f&&p&&(console.log("Setting schedule timer",f,p),We.set({startDateTime:f,endDateTime:p}))}},onReconnectAttempt:function(e){l&&console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;l&&console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){l&&console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){l&&console.error("SSE Error:",e,n)},onClose:function(){l&&console.log("SSE Closed")}})},An=function(e){var n=e.enable,t=e.site,r=e.sseBaseUrl,i=e.sseEndpoint,o=e.debug;if(n){var l=Nn({site:t,sseBaseUrl:r,sseEndpoint:i,debug:void 0!==o&&o});return l._sseBaseUrl=r,l._site=t,l._sseEndpoint=i,l}};function Mn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function Rn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}exports.VLPlayerCore=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:c.onTimeUpdate,getVideoDuration:c.getVideoDuration,onVideoEnded:c.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(r.mark(function t(i,o){var l,a,u,s,d,c,v,f,p,g,y,b,w,k,S,T,E,C,I,P,D,O,j,x,N,A,R,_,L,B,V,U;return r.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=3;break}return i({status:!0,msg:"Player already initialised",skipped:!0}),t.abrupt("return");case 3:if(I=(null==n?void 0:n.videoSourceUrl)||!1,P=null==n?void 0:n.asat,D=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,O=null==n?void 0:n.videoId,j=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,x=(null==n?void 0:n.streamingInfo)||!1,window.videoId=O,N=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=18;break}if(sessionStorage.setItem("vlp_token",N),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),N&&!e.isTokenExpired(N)){t.next=17;break}return o({status:!1,msg:"".concat(N?"Token is expired !":"Missing Authorization Token"),response:{token:N}}),t.abrupt("return");case 17:xn=JSON.parse(atob(N.split(".")[1]));case 18:return window.siteName=null===(u=xn)||void 0===u?void 0:u.site,window.siteId=null===(s=xn)||void 0===s?void 0:s.siteId,n.isAnonymousUser=!(null===(d=xn)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=xn)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=xn)||void 0===v?void 0:v.userId)||null,e.setUserId((null===(f=xn)||void 0===f?void 0:f.userId)||(null===(p=xn)||void 0===p?void 0:p.anonymousId)||null),window.watchHistory=n.watchHistory||null,A=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(g=n.series)&&void 0!==g&&g.enable?null:null==n?void 0:n.chromecastReceiverId,R=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(_=null==n?void 0:n.errors)&&(window.customErrors=_),window.customData=null==n?void 0:n.customData,h.setLocalisation(null==n||null===(b=n.customData)||void 0===b?void 0:b.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!m.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),e.playerConfigManager.setConfig(n),t.next=37,W(n);case 37:R&&M("https://www.googletagmanager.com/gtag/js?id=".concat(R)).then(function(){return e.runGtag(R)}).catch(function(e){}),(L=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(A)))&&L.addEventListener("contextmenu",function(e){return e.preventDefault()}),(B=An({enable:null==n||null===(k=n.sse)||void 0===k?void 0:k.enable,site:null==n||null===(S=n.sse)||void 0===S?void 0:S.siteName,sseBaseUrl:null==n||null===(T=n.sse)||void 0===T?void 0:T.sseBaseUrl,sseEndpoint:null==n||null===(E=n.sse)||void 0===E?void 0:E.sseEndpoint,debug:null==n||null===(C=n.sse)||void 0===C?void 0:C.debug}))&&!B.isConnectionActive()&&B.connect(),I?(U={directPlaybackUrl:I,id:V="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},P?e.getVideoDetails(V,N).then(function(e){var t=(null==e?void 0:e.data)||{};Be(A,{res:Rn(Rn({},t),U)},n,{resolve:i,reject:o})}).catch(function(n){e.initiateErrorHandling(n,A,o,V)}):Be(A,{res:U},n,{resolve:i,reject:o})):x?qe(n,{resolve:i,reject:o}):j?nn(n,{resolve:i,reject:o}):D?Ze(n,{resolve:i,reject:o}):Xe(n,{resolve:i,reject:o});case 43:case"end":return t.stop()}},t)}));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:f.getRenditions,skip:e.skip,getPlayer:m.getPlayer,play:e.play,pause:e.pause,detectBrowser:g.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:c.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:v.enableCaptions,disableCaptions:v.disableCaptions,getCaptions:v.getCaptions,playSelectedResolution:p.playSelectedResolution,getSource:e.getSource,setVolume:_,getVolume:L,disableControls:e.disableControls,setPlaybackSpeed:c.setPlaybackSpeed,getEntitlementData:e.getEntitlementData,getSsaiEvents:e.getSsaiEvents,playerEvents:c.playerEvents,onReplay:c.onReplay,setChapters:In,getChapters:Pn,clearChapters:Dn,seekToChapter:On,getChapterEvents:hn}},exports.initChapters=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.chapters,r=void 0===t?[]:t,i=n.timeMode,o=void 0===i?"vod":i;n.res;var l=n.chaptersConfig,a=void 0===l?{}:l,u=m.getPlayer(e);if(!u)return!1;Array.isArray(r)&&r.length&&on.set(e,r);var s={mapper:vn(e,{timeMode:o}),markers:null,chaptersConfig:a||{},timeMode:o,disposed:!1};Sn.set(e,s);var d=function(){s.disposed||Cn(e)};return u.one("loadeddata",d),Tn(u)&&d(),u.on("dispose",function(){return jn(e)}),!0};
|
package/cjs/playlist-0fe7b4d6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),r=require("./icons-eb807ef0.js"),s=require("./generic-9fa3c0bb.js"),c=require("./autoNextVideo-11f9a504.js"),d=require("./skin-c6084619.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-676468fe.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-0574b423.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(r.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.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=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),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"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),r=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(r,c),o.dom.appendContent(r,d),o.dom.appendContent(a,r),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),s.setVideoIdx(t+1),s.load(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)})},r.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==r||null===(l=r.classList)||void 0===l||l.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(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")}})}}]),h}();exports.default=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-eb807ef0.js"),d=require("./generic-9fa3c0bb.js"),c=require("./skin-c6084619.js"),u=require("./autoNextVideo-11f9a504.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-676468fe.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-0574b423.js");var p=l.getComponent("Component"),m=function(){i(f,p);var m,h,g=(m=f,h=v(),function(){var e,t=r(m);if(h){var n=r(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function f(n){var i,o,r,l,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,f),(c=g.call(this,n,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(i=v.sres)||void 0===i?void 0:i.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(o=v.series)||void 0===o?void 0:o.cb,c.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(l=s(c))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var p,m,h,C,y=null==v||null===(p=v.sres)||void 0===p?void 0:p.seasons,b=[];y.map(function(t){b.push.apply(b,e(t.episodes))}),d.createIdxMapping(b),d.setVideoIdxById(null===(m=c.options_)||void 0===m||null===(h=m.res)||void 0===h||null===(C=h.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:c.playerId,content:b,cb:c.cb,series:null==v?void 0:v.sres})}return c}return n(f,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-e037e14e.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=c.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),c.getPlayer(this.playerId).on("fullscreenchange",function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map(function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}});for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=c.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),f}();exports.default=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-eb807ef0.js"),d=require("./generic-9fa3c0bb.js"),c=require("./skin-c6084619.js"),u=require("./autoNextVideo-11f9a504.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-676468fe.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-0574b423.js");var m=r.getComponent("Component"),p=function(){o(g,m);var p,h,y=(p=g,h=v(),function(){var e,t=l(p);if(h){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function g(s){var o,i,l,r,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,g),(c=y.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(l=v.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(r=n(c))&&void 0!==r&&r.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var m,p,h,b,f=null==v||null===(m=v.sres)||void 0===m?void 0:m.seasons,C=[];f.map(function(t){C.push.apply(C,e(t.episodes))}),d.createIdxMapping(C),d.setVideoIdxById(null===(p=c.options_)||void 0===p||null===(h=p.res)||void 0===h||null===(b=h.video)||void 0===b?void 0:b.id),u.autoPlayNext({playerId:c.playerId,content:C,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(g,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(a.PlaylistIcon())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-2105fd89.js")}).then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=r.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),r.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),r.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var n=r.dom.$(".series-selector-content",this.el());for(r.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(r.dom.appendContent(n,o),r.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=c.parseSvgString(a.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=r.dom.createEl("div",{className:"series-selector-head"}),o=r.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(a.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,e,s)};var i=r.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=r.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),d=r.dom.createEl("div",{className:"series-selector-content"}),u=this.createSeasonLister();r.dom.appendContent(n,l),r.dom.appendContent(d,u),r.dom.appendContent(n,o),r.dom.appendContent(n,i),r.dom.appendContent(e,n),r.dom.appendContent(e,d),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=r.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,a,c=document.createElement("label");c.className="season-holder",c.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,c.role="button",c.type="button",c.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),c.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(a=t[n])||void 0===a?void 0:a.title;var v=r.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},c.onkeydown=function(t){"Enter"===t.key&&(d.seasonIdxManager.set(n),e.showSeasonDetails(n))},r.dom.appendContent(c,v),r.dom.appendContent(c,u),r.dom.appendContent(s,c)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;d.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map(function(e){var t,s,o,i,l,r,a,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.images)||void 0===a?void 0:a.placeholderCover),watchedPercentage:(null==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var o=function(o){var i,l,a,d,u,v=r.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=r.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});r.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),r.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=r.dom.createEl("div",{className:"series-section-image"}),h=(null===(a=t[o])||void 0===a?void 0:a.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),r.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=r.dom.createEl("img",{className:"series-image"});y.src="".concat(c.impolicy16x9(null===(u=t[o])||void 0===u?void 0:u.img)),y.alt="Episode ".concat(o+1),r.dom.appendContent(p,y),r.dom.appendContent(v,p),r.dom.appendContent(v,m),r.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=r.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=r.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=c.parseSvgString(a.BackIcon());n.appendChild(o),r.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),g}();exports.default=p;
|
package/cjs/skin-29bb949b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-fbfbfeaa.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-c6084619.js"),n=require("./renditions-508e7f85.js"),t=require("./index-0390e484.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray");var o=require("./generic-9fa3c0bb.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-11f9a504.js"),require("./util-0574b423.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("./browser-77c57718.js"),require("md5"),require("js-cookie"),require("./captions-676468fe.js"),require("@viewlift/comscore/index.js"),exports.initialiseSkin=function(r,s){i.getPlayer(r).addClass("skin_mini"),function(l,o){var r=i.getPlayer(l);r&&r.on("loadeddata",function(){var i,r,s,u,d,a,v;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&0!=(null==o||null===(r=o.skin_settings)||void 0===r?void 0:r.settingsToggle)&&e.addSettingsButtonV2(l,o),!(null!=o&&null!==(s=o.series)&&void 0!==s&&s.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(a=d.appcmsMain)&&void 0!==a&&null!==(v=a.features)&&void 0!==v&&v.auto_play)||null!=o&&o.liveVideo||t.addNextEpPreview(l,o)})}(r,s),function(e,l){var n,t,o,r,s,u,d,a,v,C,c,h,p,f,m,g,b,B,y=i.getPlayer(e);null===(n=y.controlBar)||void 0===n||n.removeChild("VolumePanel"),null===(t=y.controlBar)||void 0===t||t.addChild("VolumePanel",{inline:!1},1);var L=null===(o=y.controlBar)||void 0===o?void 0:o.getChild("ProgressControl"),j=document.createElement("div");j.className="custom-spaced-progress-bar",L&&j.append(L.el());null===(r=y.controlBar)||void 0===r||null===(s=r.el())||void 0===s||s.append(j);var V='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';y.el().insertBefore(i.parseSvgString(V),null!==(u=y.el().firstChild)&&void 0!==u?u:null);var E=(null==y||null===(d=y.controlBar)||void 0===d||null===(a=d.getChild("PlayToggle"))||void 0===a||null===(v=a.el())||void 0===v?void 0:v.firstChild)||null;if(E){E.style.height="16px",E.style.width="16px";var w=i.injectSVG(E,y.paused()?"#vjs-icon-play":"#vjs-icon-pause");y.on("pause",function(){return w.setAttributeNS(null,"href","#vjs-icon-play")}),y.on("play",function(){return w.setAttributeNS(null,"href","#vjs-icon-pause")})}var x=(null==y||null===(C=y.controlBar)||void 0===C||null===(c=C.getChild("FullscreenToggle"))||void 0===c||null===(h=c.el())||void 0===h?void 0:h.firstChild)||null;if(x){x.style.height="24px",x.style.width="24px";var S=i.injectSVG(x,"#vjs-icon-fullscreen");y.on("fullscreenchange",function(){var e=y.isFullscreen_;null==S||S.setAttributeNS(null,"href",e?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var M=(null==y||null===(p=y.controlBar)||void 0===p||null===(f=p.getChild("VolumePanel"))||void 0===f?void 0:f.el())||null;if(M){var q=M.querySelector(".vjs-mute-control .vjs-icon-placeholder");q.classList.add("vjs-svg-icon"),q.style.height="24px",q.style.width="24px";var k=i.injectSVG(q,y.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");y.on("volumechange",function(e){var l=y.volume();0==l||y.muted()?k.setAttributeNS(null,"href","#vjs-icon-mute"):l>0&&l<=.3?k.setAttributeNS(null,"href","#vjs-icon-volume1"):l>=.3&&l<=.7?k.setAttributeNS(null,"href","#vjs-icon-volume2"):k.setAttributeNS(null,"href","#vjs-icon-volume3")})}var T=(null==y||null===(m=y.controlBar)||void 0===m||null===(g=m.getChild("PictureInPictureToggle"))||void 0===g?void 0:g.el())||null;if(T){var A=null==T?void 0:T.querySelector(".vjs-icon-placeholder");A.style.height="25px",A.style.width="25px";var P=i.injectSVG(A,"#vjs-icon-pip");y.on("enterpictureinpicture",function(){P.setAttributeNS(null,"href","#vjs-icon-pip")})}var Z=(null==y||null===(b=y.controlBar)||void 0===b||null===(B=b.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(Z){var _=Z.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");_.classList.add("vjs-svg-icon"),_.style.height="29px",_.style.width="29px";var N=i.injectSVG(_,"#vjs-icon-caps");N.setAttributeNS(null,"href","#vjs-icon-captions-off"),y.textTracks().on("change",function(e){for(var l=y.textTracks(),i=!1,n=0;n<l.length;n++){var t=l[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?N.setAttributeNS(null,"href","#vjs-icon-captions"):N.setAttributeNS(null,"href","#vjs-icon-captions-off")})}y&&null!=l&&l.liveVideo&&null!=l&&l.liveui&&(y.liveTracker.on("liveedgechange",function(){F(y)}),y.on("timeupdate",function(){F(y)}));function H(e){var l=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),t=function(e){return String(e).padStart(2,"0")};return 0===l?"".concat(t(i),":").concat(t(n)):"".concat(t(l),":").concat(t(i),":").concat(t(n))}function D(e){var l=e.seekable();if(l&&l.length>0){var i=l.end(0);return Math.max(0,i-e.currentTime())}return 0}function F(e){var l,i,n=e.liveTracker.atLiveEdge(),t=D(e),o=null==e||null===(l=e.controlBar)||void 0===l||null===(i=l.remainingTimeDisplay)||void 0===i?void 0:i.el();if(o){var r=o.querySelector(".vjs-remaining-time-display");n?o.style.display="none":(o.style.display="flex",r&&(r.innerText=H(t)))}}}(r,s),function(i,n){var t,r,s,u,d,a,v,C,c,h=(null==n||null===(t=n.res)||void 0===t||null===(r=t.video)||void 0===r?void 0:r.isSSAIEnabled)||!1,p=(null==n?void 0:n.skin_settings)||{};null==p||p.slowMoBtn;var f=(null==n||null===(s=n.customData)||void 0===s?void 0:s.ads)||{};null!=p&&p.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(i,"VL_ONE",SkipSvgV2());null!=p&&p.rewindBtn&&(0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(i,"VL_ONE",l.RewindSvgV3());(null==n||null===(u=n.relatedVideos)||void 0===u||null===(d=u.content)||void 0===d?void 0:d.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.relatedVideos);(null==n||null===(a=n.streams)||void 0===a?void 0:a.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.streams);(null==n||null===(v=n.playlist)||void 0===v||null===(C=v.content)||void 0===C?void 0:C.length)>0&&e.addPlaylistSelector(i,null==n?void 0:n.playlist);null!=n&&null!==(c=n.series)&&void 0!==c&&c.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,n);if("MEDIA_TAILOR"==(null==f?void 0:f.vodAdSticherProvider)&&null!=f&&f.vodAdClientSideTracking&&h){var m,g=null;if(null!=n&&null!==(m=n.series)&&void 0!==m&&m.enable){var b,B,y,L=null===(b=o.getCurrentVideo())||void 0===b||null===(B=b.video)||void 0===B||null===(y=B.gist)||void 0===y?void 0:y.id,j=o.getSeriesWatchMap(),V=(null==j?void 0:j.get(L))||{t:0,p:0},E=V.t;V.p<95&&(g=E)}else{var w=n.watchHistoryResumeTime;n.watchedPercentage<95&&(g=w)}o.setupAdvertisementMarkers(i,g)}}(r,s),t.addTVProviderImage(r,s)};
|