@viewlift/player-backup 2.0.355-backup → 2.0.356-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-66b37002.js → autoNextVideo-9c748d88.js} +1 -1
- package/cjs/bundle.css +1135 -1135
- package/cjs/caption-settings-50cfa585.js +1 -0
- package/cjs/captions-23ff3076.js +1 -0
- package/cjs/features-3956bca9.js +1 -0
- package/cjs/generic-9971cde9.js +1 -0
- package/cjs/index-39dbaae8.js +1 -0
- package/cjs/index-6ce8b961.js +1 -0
- package/cjs/index-6ecb2219.js +1 -0
- package/cjs/index-d82692d6.js +1 -0
- package/cjs/index-d9460e79.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-552d5534.js +1 -0
- package/cjs/multicamv2-8cbb3c7a.js +1 -0
- package/cjs/nextEpisodeButton-3136a7c9.js +1 -0
- package/cjs/playlist-a2f57a3e.js +1 -0
- package/cjs/relatedVideosManager-44ec6d59.js +1 -0
- package/cjs/renditions-05a85e06.js +1 -0
- package/cjs/resolution-b5880a17.js +1 -0
- package/cjs/series-e936a6e1.js +1 -0
- package/cjs/series-v2-e901704c.js +1 -0
- package/cjs/series-v2-ee1f4fed.js +1 -0
- package/cjs/settings-icon-91d87df4.js +1 -0
- package/cjs/skin-27d57991.js +1 -0
- package/cjs/skin-2c4c53c4.js +1 -0
- package/cjs/skin-3a9f55cb.js +1 -0
- package/cjs/skin-3f0f7c5d.js +1 -0
- package/cjs/{skin-f3d7e5b4.js → skin-46438f7f.js} +1 -1
- package/cjs/skin-55634dc6.js +1 -0
- package/cjs/skin-8e71d9b3.js +1 -0
- package/cjs/{skin-4fd8fceb.js → skin-90d2da2a.js} +1 -1
- package/cjs/skin-cd9c9b0b.js +1 -0
- package/cjs/skin-d80d7f8d.js +1 -0
- package/cjs/skin-ea8fc84f.js +1 -0
- package/cjs/videoSelector-625ce469.js +1 -0
- package/cjs/videoSelector-f5dfa63f.js +1 -0
- package/cjs/videojs-dash5.es-0f92604f.js +1 -0
- package/esm/apis/index.d.ts +4 -4
- package/esm/{autoNextVideo-1b14fa41.js → autoNextVideo-88053576.js} +1 -1
- package/esm/bundle.css +1135 -1135
- package/esm/caption-settings-d0e2275a.js +1 -0
- package/esm/captions-4dea3682.js +1 -0
- package/esm/features-34bf2890.js +1 -0
- package/esm/generic-ea2aba32.js +1 -0
- package/esm/helpers/token.d.ts +1 -1
- package/esm/index-023de7f0.js +1 -0
- package/esm/index-1a02e503.js +1 -0
- package/esm/index-22d23be0.js +1 -0
- package/esm/index-5b6be94c.js +1 -0
- package/esm/index-fe388994.js +1 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/multicamv2-4422945d.js +1 -0
- package/esm/multicamv2-7b1e8eab.js +1 -0
- package/esm/nextEpisodeButton-867ef9ad.js +1 -0
- package/esm/playlist-bebcdc17.js +1 -0
- package/esm/relatedVideosManager-93533a90.js +1 -0
- package/esm/renditions-28891b91.js +1 -0
- package/esm/resolution-3f14386f.js +1 -0
- package/esm/series-a2b568b3.js +1 -0
- package/esm/series-v2-9d0288fb.js +1 -0
- package/esm/series-v2-acf69186.js +1 -0
- package/esm/settings-icon-74213ca6.js +1 -0
- package/esm/skin-0d5a03a0.js +1 -0
- package/esm/skin-1769448f.js +1 -0
- package/esm/skin-2340ab80.js +1 -0
- package/esm/skin-2a3ee818.js +1 -0
- package/esm/skin-3eb9f992.js +1 -0
- package/esm/skin-4674228b.js +1 -0
- package/esm/skin-7fdd9116.js +1 -0
- package/esm/{skin-26dcef2b.js → skin-81eb2f7e.js} +1 -1
- package/esm/skin-e92e8857.js +1 -0
- package/esm/{skin-88e8889d.js → skin-f319c0bd.js} +1 -1
- package/esm/skin-fc42d6bb.js +1 -0
- package/esm/videoSelector-3b4d3856.js +1 -0
- package/esm/videoSelector-b9df91cb.js +1 -0
- package/esm/videojs-dash5.es-cfe95daa.js +1 -0
- package/package.json +1 -1
- package/cjs/caption-settings-0d09a023.js +0 -1
- package/cjs/captions-4dfe293a.js +0 -1
- package/cjs/features-1883e654.js +0 -1
- package/cjs/generic-17f4d6ca.js +0 -1
- package/cjs/index-58f88daa.js +0 -1
- package/cjs/index-75726505.js +0 -1
- package/cjs/index-7e74fcd2.js +0 -1
- package/cjs/index-958a579b.js +0 -1
- package/cjs/index-e0d9278b.js +0 -1
- package/cjs/multicamv2-627af073.js +0 -1
- package/cjs/multicamv2-657be51d.js +0 -1
- package/cjs/nextEpisodeButton-42b4ca8d.js +0 -1
- package/cjs/playlist-1371374f.js +0 -1
- package/cjs/relatedVideosManager-0a220d05.js +0 -1
- package/cjs/renditions-627bdfad.js +0 -1
- package/cjs/resolution-3af2cf1b.js +0 -1
- package/cjs/series-237f8263.js +0 -1
- package/cjs/series-v2-ae64961e.js +0 -1
- package/cjs/series-v2-e8dd491b.js +0 -1
- package/cjs/settings-icon-8bb0d3f0.js +0 -1
- package/cjs/skin-3dafaeb9.js +0 -1
- package/cjs/skin-40759447.js +0 -1
- package/cjs/skin-4b7e4c3c.js +0 -1
- package/cjs/skin-66dce245.js +0 -1
- package/cjs/skin-c12352cf.js +0 -1
- package/cjs/skin-d80e0ade.js +0 -1
- package/cjs/skin-deb91d1c.js +0 -1
- package/cjs/skin-f084eec8.js +0 -1
- package/cjs/skin-f8978ebe.js +0 -1
- package/cjs/videoSelector-6494f026.js +0 -1
- package/cjs/videoSelector-d09bd203.js +0 -1
- package/cjs/videojs-dash5.es-80bdd597.js +0 -1
- package/esm/caption-settings-e1a53633.js +0 -1
- package/esm/captions-1f931e14.js +0 -1
- package/esm/features-b1f1eb39.js +0 -1
- package/esm/generic-c437cc53.js +0 -1
- package/esm/index-353bbd6f.js +0 -1
- package/esm/index-85c4eeac.js +0 -1
- package/esm/index-95d1ec66.js +0 -1
- package/esm/index-b793da28.js +0 -1
- package/esm/index-cd2ea379.js +0 -1
- package/esm/multicamv2-167ae99d.js +0 -1
- package/esm/multicamv2-3856d35b.js +0 -1
- package/esm/nextEpisodeButton-93a4cb9b.js +0 -1
- package/esm/playlist-eb2ef6bc.js +0 -1
- package/esm/relatedVideosManager-81661348.js +0 -1
- package/esm/renditions-620d93b3.js +0 -1
- package/esm/resolution-2ee017b4.js +0 -1
- package/esm/series-c636d9ee.js +0 -1
- package/esm/series-v2-4e1800dc.js +0 -1
- package/esm/series-v2-d71173d8.js +0 -1
- package/esm/settings-icon-c65eb622.js +0 -1
- package/esm/skin-1cf42cac.js +0 -1
- package/esm/skin-3653c5b3.js +0 -1
- package/esm/skin-44d2671b.js +0 -1
- package/esm/skin-5f4c8961.js +0 -1
- package/esm/skin-661b5043.js +0 -1
- package/esm/skin-6f29d75a.js +0 -1
- package/esm/skin-87e08483.js +0 -1
- package/esm/skin-965eac32.js +0 -1
- package/esm/skin-96ac9396.js +0 -1
- package/esm/videoSelector-b056bac9.js +0 -1
- package/esm/videoSelector-e079ee9a.js +0 -1
- package/esm/videojs-dash5.es-45c88e15.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,g as c}from"./icons-262bef63.js";import{g as l,d as s,e as d}from"./captions-4dea3682.js";import{j as p,s as m,k as u,l as v}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/toConsumableArray";function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}var h=i.getComponent("Component"),y=function(){n(E,h);var y,g,C=(y=E,g=f(),function(){var e,t=o(y);if(g){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function E(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(i=C.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(E,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-2e47813b.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=l(this.playerId);null==t||t.map((function(t){return s(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(p(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",m(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),u(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(c())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),r=i.dom.createEl("div",{className:"caption-selector-content"}),l=i.dom.createEl("div",{className:"caption-container"}),s=this.createLanguageContanier();i.dom.appendContent(l,s),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,r),i.dom.appendContent(r,l),v(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),l(e.playerId).map((function(t){return s(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),p=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){d(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},m=0;m<c.length;m++)p(m);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),E}();export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"@babel/runtime/helpers/toConsumableArray";import{g as e}from"./skin-2a3ee818.js";var n=function(t,n){var r,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(r=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===r||null===(a=r[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","flex"));for(var i=e(t).textTracks(),s=0;s<i.length;s++){var l=i[s];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=n||(l.mode="showing")}},r=function(t,n){for(var r=e(t).textTracks(),a=0;a<r.length;a++){var o=r[a];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==n||(o.mode="hidden")}},a=function(t){var n,r=e(t),a=null==r||null===(n=r.textTracks())||void 0===n?void 0:n.tracks_.filter((function(t){return"subtitles"==t.kind||"captions"===t.kind}));return function(){var t,e=null===(t=document)||void 0===t?void 0:t.querySelector(".vjs-texttrack-settings"),n=null==e?void 0:e.querySelector(".vjs-control-text");e&&n&&(n.textContent="opens captions settings");var r=document.querySelectorAll(".vjs-subtitles-menu-item");(null==r?void 0:r.length)>0&&r.forEach((function(t,e){var n=t.querySelector(".vjs-menu-item-text");"en"==n.textContent?n.setAttribute("aria-label","English"):"es"==n.textContent?n.setAttribute("aria-label","Espanol"):n.setAttribute("aria-label",n.textContent)}))}(),a||[]},o=function(n){var r,a,o=e(n);if(o){var i=t((null===(r=o.textTracks())||void 0===r?void 0:r.tracks_)||[]).filter((function(t){return"subtitles"===t.kind||"captions"===t.kind})),s=new Set((null===(a=o.remoteTextTracks())||void 0===a?void 0:a.tracks_)||[]),l=new Map;i.forEach((function(t){var e="".concat(t.kind,"|").concat(t.language||"","|").concat(t.label||"");l.has(e)||l.set(e,[]),l.get(e).push(t)})),l.forEach((function(t){if(!(t.length<2)){var e=t.find((function(t){return"showing"===t.mode}))||t[0];t.forEach((function(t){t!==e&&s.has(t)&&o.removeRemoteTextTrack(t)}))}}))}},i=function(t){var n=e(t);n.remoteTextTracks().tracks_.map((function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)}))},s=function(t,n){var r=e(t);r.remoteTextTracks().tracks_.map((function(t){r.removeRemoteTextTrack(t)})),n.map((function(t){r.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label||(null==t?void 0:t.language)})}))},l=function(t){var n,r=e(t),a=null==r||null===(n=r.el())||void 0===n?void 0:n.querySelector(".vjs-text-track-display-ttml");a&&(Array.from(r.textTracks()).some((function(t){return("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode}))?a.style.setProperty("display","flex"):(a.style.setProperty("display","none","important"),a.innerHTML=""))};export{s as a,i as b,r as d,n as e,a as g,o as r,l as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{a6 as a,a7 as s,T as c,Q as d}from"./generic-ea2aba32.js";import{g as u}from"./renditions-28891b91.js";import{g as p,p as m}from"./skin-2a3ee818.js";import{g as h}from"./localisation-0bf399a1.js";function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?f(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function g(e){var t=C();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var y=function(e){var o=function(e){r(i,e);var o=g(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=h("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},B=function(e,o,l){var d=function(o){r(d,o);var i=g(d);function d(e,n){var r;t(this,d);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button"),o.setAttribute("aria-label","Backward 10 seconds");var a=m(l);return o.append(a),r}return n(d,[{key:"handleClick",value:function(){a(this.player_,s.REPLAY),c(e,10)}}]),d}(i.getComponent("Button"));i.registerComponent("MyButton",d),i(e).getChild("controlBar").addChild("myButton",{},1)},b=function(e,o,l){var a=function(o){r(a,o);var i=g(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button"),o.setAttribute("aria-label","Forward 10 seconds");var s=m(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},j=function(e,t,n){import("./resolution-3f14386f.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=p(e),a=u(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))}))},k=function(e,t,n){import("./nextEpisodeButton-867ef9ad.js").then((function(r){var o=r.default,l=p(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},S=function(e,t,n){import("./series-a2b568b3.js").then((function(r){var o=r.seriesModule,l=p(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},c=0;c<a.length;c++)s(c)}))},E=function(e,t){import("./videoSelector-b9df91cb.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},O=function(e,t){import("./caption-settings-d0e2275a.js").then((function(n){var r,o,l,a,s=n.default,c=p(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-74213ca6.js").then((function(n){var r,o,l,a,s=n.default,c=p(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},I=function(e,t){import("./playlist-bebcdc17.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},M=function(e,t){import("./series-v2-9d0288fb.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",v({playerId:e},t),o.controlBar.children().length-3)}))},P=function(e,t){import("./multicamv2-7b1e8eab.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},x=function(e,t){var n=p(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},L=function(e){var t=p(e).el(),n=0,r=p(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o},_=function(e,t){import("./videoSelector-3b4d3856.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},N=function(e,t){import("./series-v2-acf69186.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",v({playerId:e},t),o.controlBar.children().length-3)}))},R=function(e,t){import("./multicamv2-4422945d.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},D=function(e,t){import("./index-5b6be94c.js").then((function(n){var r=n.default,o=p(e);i.registerComponent("MuteButton",r),o.addChild("MuteButton",v({playerId:e},t))}))};export{j as a,S as b,k as c,b as d,B as e,w as f,O as g,x as h,y as i,_ as j,R as k,I as l,N as m,L as n,E as o,M as p,P as q,D as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import r from"axios";import{g as o,t as a,c as l}from"./skin-2a3ee818.js";import{i as s,a as d,d as u}from"./browser-de5f6a74.js";import c from"md5";import v from"js-cookie";import{b as f,a as p}from"./captions-4dea3682.js";import m from"@babel/runtime/helpers/typeof";import h from"@babel/runtime/helpers/toConsumableArray";import g from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as y,formulateComscorePayload as w,createComscoreStreamingTag as T,setComscorePlayerInstance as _}from"@viewlift/comscore/index.js";import b from"@babel/runtime/helpers/classCallCheck";import I from"@babel/runtime/helpers/createClass";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function S(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function k(e,n){E("event",e,n)}var A={name:"@viewlift/player",version:"2.1.64",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.3","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.19",axios:"^1.18.1",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"}},O={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 P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function L(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?P(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var D,C=(D={},{setConfig:function(e){D=L(L({},D),e)},getConfig:function(){return D}}),F=function(e){return!!e&&"drm"===function(e){var n;if(5===Number(null==e?void 0:e.code))return"drm";var t="".concat(null!==(n=null==e?void 0:e.code)&&void 0!==n?n:""," ").concat(function(e){var n,t,i,r,o;return(null==e||null===(n=e.response)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.errorMessage)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.message)||(null==e||null===(o=e.response)||void 0===o?void 0:o.statusText)||(null==e?void 0:e.message)||"unknown_error"}(e)).toLowerCase();return/(drm|license|widevine|playready|fairplay|eme|key|hdcp)/.test(t)?"drm":/(network|manifest|segment|playlist|http|xhr|fetch|timeout)/.test(t)?"network":/(decode|mediaerror|mediasource|appendbuffer|sourcebuffer)/.test(t)?"decode":"player"}(e)},j=function(e,n){var t=String(n||"").toLowerCase();if(t.includes("license"))return"license";if(t.includes("certificate"))return"server_certificate";if(t.includes("manifest"))return"manifest";if(t.includes("key"))return"key";if(t.includes("segment")||t.includes("media"))return"segment";var i=String(e||"").split("?")[0].toLowerCase();return i.endsWith(".mpd")||i.endsWith(".m3u8")||i.endsWith(".ism/manifest")?"manifest":/\.(m4s|mp4|m4a|m4v|ts|aac|webm|cmf[av]|mp4a)$/.test(i)?"segment":/license|widevine|playready|fairplay|drm/.test(i)?"license":/cert|certificate/.test(i)?"server_certificate":/\.key($|\?)/.test(i)||/\/key\//.test(i)?"key":"other"},R=new Set(["license","key","server_certificate"]),x=function(e){return R.has(e)},N=function(e,n){for(var t=0,i=[null==e?void 0:e.statusCode,null==e?void 0:e.status,null==e?void 0:e.code,null==n?void 0:n.statusCode,null==n?void 0:n.status,null==n?void 0:n.code];t<i.length;t++){var r=Number(i[t]);if(Number.isFinite(r)&&r>0)return r}return null},U=function(e){return null==e||e>=200&&e<400};function V(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}var M="asset_not_found",W="geo_blocking_issue",B="entitlement_mismatch",H="DRM/License Failures",G=new Set(["contentgeorestricted","contentgeorestrictedbyhba","content_not_available_for_country"]),q=[/geo[\s_-]?block/i,/geo[\s_-]?restrict/i,/geographic/i,/not available in your/i,/outside.*(?:region|country|territory)/i,/\bcountry\b/i,/\bterritory\b/i],Y=[/entitlement/i,/not entitled/i,/subscription/i,/not subscribed/i,/access denied/i,/\bunauthorized\b/i,/\bforbidden\b/i,/\bpremium\b/i,/upgrade required/i,/tv[\s_-]?provider/i,/\bprovider\b/i],z=[/not found/i,/no content/i,/does not exist/i,/\bmissing\b/i,/not available currently/i,/not available/i],Q=function(e,n,t,i){var r=Number(e),o=String(n||"");return F(i)?H:G.has(function(e){return String(e||"").toLowerCase().replace(/[\s-]/g,"_")}(t))||q.some((function(e){return e.test(o)}))?W:Y.some((function(e){return e.test(o)}))?B:z.some((function(e){return e.test(o)}))||404===r?M:451===r?W:B},K=function(n,t,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};console.log("emitApiErrorEvent",{apiName:n,error:t,errorCategory:i,meta:o});var a=function(){var e,n,t,i,r=C.getConfig()||{};return(null==r?void 0:r.apiErrorCb)||(null==r?void 0:r.onApiError)||(null==r||null===(e=r.customData)||void 0===e?void 0:e.apiErrorCb)||(null==r||null===(n=r.customData)||void 0===n?void 0:n.onApiError)||(null==r||null===(t=r.customData)||void 0===t||null===(i=t.callbacks)||void 0===i?void 0:i.onApiError)||null}();if("function"==typeof a){console.log("emitApiErrorEvent",t);var l=(null==t||null===(r=t.response)||void 0===r?void 0:r.status)||(null==t?void 0:t.status)||0,s=function(e){var n,t,i,r,o;return(null==e||null===(n=e.response)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.errorMessage)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.message)||(null==e||null===(o=e.response)||void 0===o?void 0:o.statusText)||(null==e?void 0:e.message)||"unknown_error"}(t),d=function(e){var n,t,i,r,o,a;return(null==e||null===(n=e.response)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.errorCode)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.error_code)||(null==e||null===(o=e.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.code)||(null==e?void 0:e.errorCode)||null}(t),u=Q(l,s,d,t),c=function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?V(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}({errorcode:l||d,errormessage:s,errorcategory:i||u},o);n&&(c.apiPath=n);try{a(u,c)}catch(e){console.warn("[VLPlayer] apiError callback failed:",e)}}};function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function J(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?X(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):X(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var $=A;window.vl_player_version=$.version;var Z,ee=function(){var e,n,t,i;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":le.get()+"".concat(null==O?void 0:O.getVideoDetails)},ne=function(e,n){var t,i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse)return new Promise((function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}));var a,l,s,d,u=ee();return r({url:ee(),params:J({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:o},null===(a=window)||void 0===a||null===(l=a.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":$.version,"x-player-name":"videojs",adbTempToken:null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0}).catch((function(n){throw K(u,n,"content",{videoId:e}),n}))},te=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse)return new Promise((function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}));var u=le.get()+O.getLinearChannelDetails;return r({url:u,params:J(J(J(J(J({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:n,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}}).catch((function(n){throw K(u,n,"content",{videoId:null==e?void 0:e.id,channelId:null==e?void 0:e.channelId,programId:null==e?void 0:e.programId}),n}))},ie=function(e,n){var t,i,o=Ie(n),a=(null==o?void 0:o.site)||null;if(null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData)return new Promise((function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}));var l=le.get()+"/v3/content/series/".concat(e);return r({url:l,params:{site:a},method:"GET",headers:{Authorization:n}}).catch((function(n){throw K(l,n,"content",{videoId:e}),n}))},re=function(){var e=n(t.mark((function e(n){var i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e();case 2:return i=e.sent,e.abrupt("return",r({url:le.get()+"".concat(null==O?void 0:O.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:J({},n),params:J({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}).catch((function(e){throw K("saveWatchHistory",e,"content",{videoId:null==n?void 0:n.videoId,profileId:null==n?void 0:n.profileId}),e})));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),oe=function(e,n){var t,i,o=window.contentType,a=le.get()+"".concat(null==O?void 0:O.getVideoInfoV2,"/").concat(o,"/").concat(e);return r({method:"GET",url:a,headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3}).catch((function(n){throw K(a,n,"content",{videoId:e,contentType:o}),n}))},ae=function(e){var n=e.videoId,t=le.get()+"".concat(null==O?void 0:O.getSeriesWatchHistoryV2,"/").concat(n);return r({method:"GET",url:t,headers:{Authorization:e.token},timeout:15e3}).catch((function(i){throw K(t,i,"content",{seriesId:n,videoId:null==e?void 0:e.videoId}),i}))},le=(Z=null==O?void 0:O.apiBaseUrl,{set:function(e){e&&(Z=e)},get:function(){return Z}}),se=function(e,n,t,i){var o,a;return r({url:t,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:n,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0}).catch((function(n){throw K(t,n,"content",{videoId:e,url:t}),n}))},de=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},ue=null;function ce(){return{set:function(e){e&&(ue=e)},get:function(){return ue}}}var ve,fe,pe,me,he,ge,ye,we=function(){var e=n(t.mark((function e(){var n,i,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ce().get(),i=le.get(),n){e.next=4;break}throw new Error("Missing refresh token");case 4:return e.prev=4,e.next=7,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 7:return o=e.sent,e.abrupt("return",o);case 11:throw e.prev=11,e.t0=e.catch(4),console.error("Error fetching refresh token",e.t0),e.t0;case 15:case"end":return e.stop()}}),e,null,[[4,11]])})));return function(){return e.apply(this,arguments)}}(),Te=null,_e=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!de(n)){e.next=6;break}return Te||(Te=we().then((function(e){var t,i,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&ce().set(o),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){Te=null}))),e.abrupt("return",Te);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},Ie=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},Ee=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},Se=(ge=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;ge.set(t,(ge.get(t)||0)+1)},get:function(e){return ge.get(e)},clear:function(){ge.clear()}}),ke=function(e){fe=e},Ae=function(){return fe},Oe=function(e){ve=e},Pe=function(){return ve},Le=function(){return pe},De=function(e){pe=e},Ce=function(){return he},Fe=function(e){me=new Map,e.map((function(e,n){me.set(e.id,n)}))},je=function(e){if(me){var n=me.get(e);De(n+1)}},Re=(ye=0,{set:function(e){e>=0&&(ye=e)},get:function(){return ye}});function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Ne(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):xe(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var Ue=0,Ve=null,Me=null,We=!1,Be=!1,He=[],Ge=null;function qe(e,n,t,i){e&&(i?e.one(n,t):e.on(n,t),He.push({type:"player",player:e,event:n,handler:t}))}function Ye(e,n,t){if(e){var i=He.findIndex((function(i){return"player"===i.type&&i.player===e&&i.event===n&&i.handler===t}));-1!==i&&He.splice(i,1),e.off(n,t)}}function ze(e,n,t){var i;e&&null!=e&&e.ima&&"function"==typeof(null==e||null===(i=e.ima)||void 0===i?void 0:i.addEventListener)&&(e.ima.addEventListener(n,t),He.push({type:"ima",player:e,eventType:n,handler:t}))}var Qe=function(){if(Ge){try{var e=Ge,n=e.seekToLive,t=e.originalHandleClick;n&&"function"==typeof t&&(n.handleClick=t)}catch(e){console.error(e)}Ge=null}},Ke=function(){He.forEach((function(e){try{"player"===e.type?e.player.off(e.event,e.handler):"ima"===e.type&&function(e,n,t){if(null!=e&&e.ima){var i=e.ima;if("function"!=typeof i.removeEventListener){var r="function"==typeof i.getAdsManager?i.getAdsManager():null;r&&"function"==typeof r.removeEventListener&&r.removeEventListener(n,t)}else i.removeEventListener(n,t)}}(e.player,e.eventType,e.handler)}catch(e){console.error(e)}})),He.length=0,Qe(),Ue=0,Ve=null,Me=null,We=!1,Be=!1,"function"==typeof window.cleanupTimers&&window.cleanupTimers()},Xe=function(){var e,n,t,i,r,o,a,l=Ae();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===t||null===(i=t.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)},Je=function(){var e=Ae(),n=(null==e?void 0:e.contentType)||"video",t="";if("undefined"==typeof window)return"";if("linearchannel"===n){var i,r,o,a;t=null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o||null===(a=o.params)||void 0===a?void 0:a.title}else{var l,s,d,u,c,v,f=null==e||null===(l=e.video)||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.title,p=null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u||null===(c=u.beacon)||void 0===c||null===(v=c.params)||void 0===v?void 0:v.title;t=p||f?p===f?p:f:""}return t};function $e(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Ze(){return Ve||window.sessionStorage.getItem("uid")}function en(){return nn.apply(this,arguments)}function nn(){return(nn=n(t.mark((function e(){var n,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(n){var t=Xe(),i=$e();window.sidMap=Ne(Ne({},window.sidMap),{},e({},t,i)),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,window.isAdPlaying=!1,window._pingTimes=[],window._pingTimeUpdateHandler=null,streamFailures(n),buffering(n),ads(n),ping(n),tn(n),rn(n)};var tn=function(e){qe(e,"play",(function(){"pause"!==Me||e.scrubbing()||(Me="play",k("RESUME",{pfm:window.platform,uid:Ze(),vid:Xe(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))})),qe(e,"playing",(function(){window.firstFrameFired&&!e.scrubbing()&&(Me="play")})),qe(e,"pause",(function(){setTimeout((function(){!We&&window.firstFrameFired&&"play"===Me&&(Me="pause",k("PAUSE",{pfm:window.platform,uid:Ze(),vid:Xe(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),50)}))},rn=function(e){if(e){var n=0,t=0,i=0,r=0;qe(e,"timeupdate",o),qe(e,"seeking",(function(){We||(We=!0,Ye(e,"timeupdate",o),qe(e,"seeked",a,!0))})),qe(e,"seeked",a)}function o(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function a(){if(Be)Be=!1;else{i=Math.floor(e.currentTime());var n=Math.floor(i-r);if(0!==n&&window.firstFrameFired){var t=n>0?"SEEK_FORWARD":"SEEK_BACKWARD";k(t,{pfm:window.platform,uid:Ze(),vid:Xe(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:t,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout((function(){We=!1}),50),qe(e,"timeupdate",o)}}};window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,i,r=o(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),k(e,Ne({pfm:window.platform,uid:Ze(),vid:Xe(),videoPosition:a},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){qe(e,"error",(function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)}))},window.firstFrame=function(e,n,t){qe(e,"play",tryCatch((function(){var i,r,o;window.ttFirstFrameStartTime_In_MS=performance.now(),Me="play",window.failedToStartTimer=setTimeout((function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")}),3e4),k("PLAY",Ne({pfm:window.platform,uid:Ze(),vid:Xe(),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}),n&&n("started_video_playback",Ne({"Video ID":Xe(),watchTime:Math.floor(e.currentTime())},t))})),!0)},window.buffering=function(e){qe(e,"waiting",tryCatch((function(){window.firstFrameFired&&(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.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 n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")}),45e3)))})))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&Ue<4)Ue++,k("BUFFERING",Ne({pfm:window.platform,uid:Ze(),vid:Xe(),videoPosition:n.el_&&Math.floor(n.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:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}window.ttFirstFrameStartTime_In_MS=null},window.endFirstFrame=function(e){var n=tryCatch((function(){var t,i,r;if(window.ttFirstFrameStartTime_In_MS&&!window.firstFrameFired)if(window.isAdPlaying)console.log("'playing' event ignored during ad playback.");else{clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0;var o=(performance.now()-window.ttFirstFrameStartTime_In_MS)/1e3;window.ttFirstFrameStartTime_In_MS=null,window.totalBufferTime=o||0,k("FIRST_FRAME",Ne({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ze(),vid:Xe()},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e)}),Ye(e,"timeupdate",n)}}));qe(e,"timeupdate",n)},window.ads=function(e){function n(){var n,t,i,r,o,a;window.isAdPlaying=!0,!window.firstFrameFired&&window.failedToStartTimer&&clearTimeout(window.failedToStartTimer),k("AD_REQUEST",Ne({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ze(),vid:Xe(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.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}),k("AD_IMPRESSION",Ne({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ze(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Xe()},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})}function t(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout((function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")}),3e4))}function i(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout((function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")}),3e4))}var r=!1;function o(){var o,a,l,s;r||null!==(o=window)&&void 0!==o&&null!==(a=o.google)&&void 0!==a&&null!==(l=a.ima)&&void 0!==l&&null!==(s=l.AdEvent)&&void 0!==s&&s.Type&&null!=e&&e.ima&&"function"==typeof e.ima.addEventListener&&("function"==typeof e.ima.getAdsManager?e.ima.getAdsManager():null)&&(ze(e,window.google.ima.AdEvent.Type.STARTED,n),ze(e,window.google.ima.AdEvent.Type.SKIPPED,t),ze(e,window.google.ima.AdEvent.Type.COMPLETE,i),r=!0)}qe(e,"adsready",o),o()};var on=function(e,n,t){var i;fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:t,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:(null===(i=e.tech_)||void 0===i?void 0:i.vhs)&&window.getBitrate(e)})};window.fireExitPing=function(e){if(!window.isAdPlaying){var n=null!=e&&e.el_?Math.floor(e.currentTime()):0;n<=0||on(e,n,n)}},window.ping=function(e){window._pingTimeUpdateHandler&&(Ye(e,"timeupdate",window._pingTimeUpdateHandler),window._pingTimeUpdateHandler=null),window._pingTimes||(window._pingTimes=[]),window._pingTimeUpdateHandler=function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!window._pingTimes.includes(n)&&(Ue=0,window._pingTimes.push(n),on(e,n,30))},qe(e,"dispose",tryCatch((function(){console.log('Player DISPOSED >> "dispose" event fired >>> firing exit PING'),window.fireExitPing(e)}))),qe(e,"timeupdate",window._pingTimeUpdateHandler)},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(an(n,o,a)){var l=Math.round(t-a);if(isFinite(l))return l}}}))()};var an=function(e,n,t){return e>=n&&e<=t};window.fireEvent=function(){var e=n(t.mark((function e(n){var i,o,a,l,d,u,c,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A,P,L;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!s()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,_e();case 4:return E=e.sent,S=Ie(E),k=null==S?void 0:S.site,A=null==S?void 0:S.siteId,P=Je(Xe()),e.t0=Ne,e.t1=Ne,e.t2=Ne,e.t3=Ne({aid:k,cid:A,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.t4={},e.t5=Ze(),e.t6=Xe(),e.t7=n.url||document.location.href,e.t8=n.ref||(null===(l=window)||void 0===l||null===(d=l.location)||void 0===d?void 0:d.ref)||document.referrer,e.t9=n.eventName,e.t10=null!==(u=n.videoPosition)&&void 0!==u?u:null,e.t11=window.environment,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=!0===n.isAdEvent?n.videoPosition:null,e.t18=!0===n.isAdEvent?(F=n.adPosition)?String(F):"":"",e.next=30,en();case 30:e.t19=e.sent,e.t20=n.playerType||"native",e.t21=n.mediaType||"VIDEO",e.t22=null===(c=window.sidMap)||void 0===c?void 0:c[Xe()],e.t23=null!==(v=n.ttFirstFrame)&&void 0!==v?v:null,e.t24=null!==(f=n.bitrate)&&void 0!==f?f:null,e.t25=null!==(p=n.resHeight)&&void 0!==p?p:null,e.t26=null!==(m=n.resWidth)&&void 0!==m?m:null,e.t27=null!==(h=n.bufferHealth)&&void 0!==h?h:null,e.t28=null!==(t=void 0,D=void 0,C=void 0,D=Ae(),C=(null==D?void 0:D.contentType)||"video",g=(null==D||null===(t=D[C])||void 0===t?void 0:t.network)||null)&&void 0!==g?g:null,e.t29=null!=k?k:null,e.t30={uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27,networkname:e.t28,brandname:e.t29},e.t31=(null==n?void 0:n.duration)&&{duration:n.duration},e.t32=(0,e.t2)(e.t3,e.t4,e.t30,e.t31),e.t33=null===(y=window)||void 0===y||null===(w=y.customData)||void 0===w||null===(T=w.beacon)||void 0===T?void 0:T.params,e.t34=(0,e.t1)(e.t32,e.t33),e.t35=P&&{title:P},e.t36=(0,e.t0)(e.t34,e.t35),L=[e.t36],r({url:(null===(_=window)||void 0===_||null===(b=_.customData)||void 0===b||null===(I=b.beacon)||void 0===I?void 0:I.url)||le.get()+O.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:L}).catch((function(e){console.error(e)}));case 50:case"end":return e.stop()}var t,D,C,F}),e)})));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};function ln(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&!s()){var t=C.getConfig();if(null==t||!t.disableBeacon){null!=n&&n.userId&&(Ve=n.userId);var i=o(e);window.initialise(i,null==n?void 0:n.analyticsCb),window.firstFrame(i,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),window.endFirstFrame(i),window.watchLive(i)}}}window.watchLive=function(e){var n;if(e){var t=null==e||null===(n=e.controlBar)||void 0===n?void 0:n.getChild("SeekToLive");if(t){Qe();var i=t.handleClick;Ge={seekToLive:t,originalHandleClick:i},t.handleClick=function(n){var t,r;return null!==(t=e.liveTracker)&&void 0!==t&&null!==(r=t.atLiveEdge)&&void 0!==r&&r.call(t)||(!function(e){var n,t,i;k("WATCH_LIVE",Ne({eventName:"WATCH_LIVE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ze(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Xe()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"WATCH_LIVE",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!1})}(e),Be=!0),i.call(this,n)}}}};var sn=function(e,n){var t=new Map;ae({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),he=t})).catch((function(e){return console.log(e)}))},dn=function(){var e=Re.get();return e>=0?e+1:1},un=function(){var e,n,t,i=Pe(),r=Ae(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=Re.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex((function(e){return(null==e?void 0:e.id)===o}));return l>=0?l+1:1};function cn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function vn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):cn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var fn=c,pn=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},mn=function(e){var n=hn(e,"video.tags",[]),t=hn(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},hn=function(e,n,t){for(var i=0,r=(n=n.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[n[i]]}return e||t},gn=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID";return e?n:n.includes("browser-")?n.replace("browser-",""):n},yn=function(){var e,n,t,i,r,a,l,s,d,u,c,f,p,m,h,g,y,w,T,_,b,I,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!==(n=e.customData)&&void 0!==n&&n.disableMacros)return A;var L=(null==P?void 0:P.siteName)||(null==P?void 0:P.site)||"",D=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(t=P[D])||void 0===t?void 0:t.metadata)||(null==P||null===(i=P[D])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o(O);if(!A.includes("VIEWLIFT_"))return A;var j,R=window.getComputedStyle(document.getElementById(O),null),x=Math.trunc(R.getPropertyValue("height").slice(0,-2)),N=Math.trunc(R.getPropertyValue("width").slice(0,-2)),U="linearchannel"===D?null==P||null===(a=P.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(s=l.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===s||null===(d=s.content)||void 0===d?void 0:d.id:hn(P,"video.gist.id",""),V="linearchannel"===D?null==P||null===(u=P.linearchannel)||void 0===u||null===(c=u.channels)||void 0===c||null===(f=c.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===f?void 0:f.title:hn(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,W=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",(function(e){M=null==e?void 0:e.gppString,W=null==e?void 0:e.sectionList[0]})));var B=v.get("us_privacy")||v.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(p=null===(m=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===m?void 0:m.fwIdentifier)&&void 0!==p?p:null,q=vn(vn({},wn(C)),{},{VIEWLIFT_WIDTH:N,VIEWLIFT_HEIGHT:x,VIEWLIFT_SIZE:pn(N,x),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:hn(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:hn(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:hn(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"==L||"usanetwork"==L||"golfchannel"==L?"":gn(!1),VIEWLIFT_DID:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":gn(),VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:mn(P),VIEWLIFT_MEDIA_ID:U,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(hn(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:U,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+hn(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:v.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:hn(null===(w=window)||void 0===w||null===(T=w.app_data)||void 0===T||null===(_=T.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"==L||"usanetwork"==L||"golfchannel"==L?"":hn(null===(b=window)||void 0===b||null===(I=b.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?fn(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*hn(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:hn(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:U,VIEWLIFT_CONTENT_TITLE:V,VIEWLIFT_CONTENT_SERIES_TITLE:hn(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:hn(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:un(),VIEWLIFT_SEASON_NUMBER:dn(),VIEWLIFT_CONTENT_TAGS:mn(P),VIEWLIFT_GPP_SID:W||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"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 Y in q){var z=new RegExp(Y,"g");A=A.replace(z,q[Y])}return A},wn=function(e){var n,t,i,r,o,a,l,s,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===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,p=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.subscription)||void 0===a?void 0:a.TVE)||!1;return f||p?(d()?f?c=vn(vn({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=vn(vn({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=vn(vn({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=vn(vn({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=vn(vn({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=vn(vn({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=d()?vn(vn({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):vn(vn({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=vn(vn({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(d()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=d()?vn(vn({},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")||""}):vn(vn({},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=vn(vn({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:hn(null===(l=window)||void 0===l||null===(s=l.app_data)||void 0===s||null===(u=s.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")||""})},Tn=function(e,n){var t,i,r,o,a,l,s,d,c,v,f,p,m,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[h])||void 0===t?void 0:t.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(o=e[h])||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[h])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.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!=w&&w.hls)return bn(w);if(g){var b=In(y,n);return b.src=yn(b.src,n,e),b}if("Safari"!==u()&&_)return _n(y);if(T){var I=bn(y);return I.src=yn(I.src,n,e),I}if(null!=y&&y.mpeg){var E=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(y);return E.src=yn(E.src,n,e),E}return null},_n=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},bn=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},In=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=u();if(o(n),"Safari"===s){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",__vlLicenseUrl:(null==e?void 0:e.licenseUrl)||"",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,(function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,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,n,t){console.log(e),e&&o(e),o(null,t)}))}}}}}(r);return En(n),d}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(En(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.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==l?void 0:l.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:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var En=function(e){var n=o(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==u()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Sn=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:i}},kn=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var 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(n),r.appendChild(o),i.append(r)}}},An=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var On=!1,Pn=function(e,n,t){var i=yn(n,e,t),r=o(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==m(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,i,r,a=o(e);if(null!==a.el_){On=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),On&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,n,!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===(t=window)||void 0===t||null===(i=t.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 n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})),n.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)}};function Ln(e,n){var t,i,r,a=o(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var i,r,o,d,u,c,v,f,p,m,h;if(Cn.enabled&&(!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName&&!(null===(i=t.target)||void 0===i||null===(r=i.closest)||void 0===r?void 0:r.call(i,'.vjs-control-bar button, .vjs-control-bar [role="button"]')))){var g=t.key,y=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==s||s.focus()),g){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":y&&!1===n.liveui||Li(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)&&null!==(f=window)&&void 0!==f&&null!==(p=f.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(h=m.adsConfig)&&void 0!==h&&h.vodAdClientSideTracking)return;y||Pi(e,10)}}}),!0)}var Dn,Cn=(Dn=!0,{enable:function(){Dn=!0},disable:function(){Dn=!1},get enabled(){return Dn}}),Fn="ssai-breakStart",jn="ssai-adImpression",Rn="ssai-firstQuartile",xn="ssai-midpoint",Nn="ssai-thirdQuartile",Un="ssai-complete",Vn="ssai-breakEnd",Mn={breakStart:Fn,impression:jn,firstQuartile:Rn,midpoint:xn,thirdQuartile:Nn,complete:Un,breakEnd:Vn};function Wn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var i=n.eventType,r=Mn[i];r&&t.trigger(r,n)}function Bn(e){var n=o(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var i=function(e,n){return t(n)};return n.on(e,i),function(){return n.off(e,i)}};return{adBreakStart:function(e){return t(Fn,e)},adImpression:function(e){return t(jn,e)},adFirstQuartile:function(e){return t(Rn,e)},adMidpoint:function(e){return t(xn,e)},adThirdQuartile:function(e){return t(Nn,e)},adComplete:function(e){return t(Un,e)},adBreakEnd:function(e){return t(Vn,e)}}}function Hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Gn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Hn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var qn,Yn=(qn={},{get:function(){return qn},set:function(e){qn=e}});function zn(e,n){var t,i,r,a,l,s,d,u,c,v,f,p,m,h,g,b,I,E,S,k,A,O=null==e?void 0:e.playerId,P=o(O);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var L=Ae(),D=(null==L||null===(i=L.video)||void 0===i?void 0:i.metadata)||[],C=(null==D?void 0:D.length)&&D.filter((function(e){return"advertisingGenre"===e.name}));if(null!==(r=C)&&void 0!==r&&r.length){var F=C.map((function(e){return e.value}));C=null==F?void 0:F.join(",")}y();var j,R,x,N=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,U=Array.isArray(null==N?void 0:N.category)?null==N||null===(l=N.category)||void 0===l?void 0:l.join(","):(null==N?void 0:N.category)||null,V=Gn(Gn(Gn({},null==L?void 0:L.video),null==L?void 0:L.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==L?void 0:L.site)||null,programId:(null==N?void 0:N.videotmsid)||null,programTitle:(null==N?void 0:N.lcProgrammeName)||null,episodeId:(null==N?void 0:N.videotmsid)||null,seasonNumber:(null==L||null===(c=L.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==N||null===(f=N.seriesDetails)||void 0===f?void 0:f.season)||null,episodeNumber:(null==L||null===(p=L.video)||void 0===p||null===(m=p.series)||void 0===m?void 0:m.episodeNumber)||(null==N||null===(h=N.seriesDetails)||void 0===h?void 0:h.episode)||null,episodeTitle:(null==N?void 0:N.lcSubTitle)||null,isCompleteEpisode:!!(null!=L&&null!==(g=L.video)&&void 0!==g&&g.series||null!=N&&null!==(b=N.seriesDetails)&&void 0!==b&&b.episode),genre:C||U,comscoreConfig:{implementationId:(null==e||null===(I=e.comscore)||void 0===I?void 0:I.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),M=null==e||null===(S=e.comscore)||void 0===S||null===(k=S.metadata)||void 0===k?void 0:k.contentType;if(null!=V&&null!==(A=V.streamingInfo)&&void 0!==A&&A.isLiveStream?V.contentType="Live":V.contentType=M||"LongFormOnDemand",null==V||!V.network){var W,B=(null==V?void 0:V.metadata)||[],H=null==B||null===(W=B.find((function(e){return"network"===e.name})))||void 0===W?void 0:W.value;V.network=H||null}null!=V&&V.network&&null!=V&&V.genre&&(V.customGenre="".concat(V.network,"_").concat((null==V?void 0:V.programTitle)||(j=V,null!=j&&j.series?null==j||null===(x=j.series)||void 0===x?void 0:x.title:null==j||null===(R=j.gist)||void 0===R?void 0:R.title),"_").concat(V.genre)),null!=N&&N.airDate&&(V.publishDate=N.airDate),null!=V&&V.runtime&&"function"==typeof P.duration&&(V.runtime=1e3*Math.ceil(P.duration()));var G=w(V,P);console.log("comscoreOptions player data",G),T(Gn({playerName:"Video.js"},G)),_(P)}}function Qn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Kn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Qn(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function Xn(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 Jn(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)?Jn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function Jn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var $n=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}();function Zn(e,n){return et.apply(this,arguments)}function et(){return(et=n(t.mark((function e(n,i){var r,a,l,s,d,u,c,v,f,p,m,h,y,w,T,_,b,I;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(n),l=Tn(i,n),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=yn(u,n,i),c=nt(u),v=g(c,2),f=v[0],p=v[1],t=p,E=void 0,S=void 0,S=Object.fromEntries(null==Object||null===(E=Object.entries(t))||void 0===E?void 0:E.map((function(e){var n=g(e,2),t=n[0],i=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(i)]}))),m=S||{}||{},u=new URL(u.split("?")[0]),Object.keys(p).length>0&&Object.entries(p).forEach((function(e){var n=g(e,2),t=n[0],i=n[1];u.searchParams.set(t,i)})),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Kn({adsParams:Kn({},f)},m))});case 14:return h=e.sent,e.next=17,h.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,b=w+T,I=w+_,$n.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=I,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()}var t,E,S}),e,null,[[11,29]])})))).apply(this,arguments)}function nt(e){var n={};if(!e.split("?")[1])return[{},{}];var t,i=new URL(e,window.location.origin),r=Xn((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var o=g(t.value,2),a=o[0],l=o[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(n);u<c.length;u++){var v=g(c[u],2),f=v[0],p=v[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=p;else d[f]=p}return[s,d]}var tt,it,rt,ot=new Map;function at(e,n){return lt.apply(this,arguments)}function lt(){return lt=n(t.mark((function e(i,r){var l,s,d,u,c,v,f,p,m,g,y,w,T,_,b,I,E,S,k,A,O,P,L,D,C;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,a,l){var s,d,u=o(i);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<L&&P.clear(),L=e;var v=(null==n||null===(s=n.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,p=Xn(t);try{for(p.s();!(f=p.n()).done;){var m,h,g,y=f.value,w=y.eventType,T=y.beaconUrls,_=y.startTimeInSeconds,b=y.startTime,I=y.durationInSeconds,E=_||0,S=T,k=(null===(m=window)||void 0===m||null===(h=m.customData)||void 0===h||null===(g=h.ads)||void 0===g?void 0:g.adEventHandler)||null,A="".concat(E,"_").concat(w),O=ot.get("pod-".concat(a))||[];if(console.warn(e,E,"map:",w,"condition1:",e>=E,"map:",ot),e>=E&&!O.includes(A)){O.push(A),ot.set("pod-".concat(a),O);try{D(w,n,S,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,w,n)}if("function"==typeof k)try{var C,F={eventType:w,startTimeInSeconds:_,startTime:b,durationInSeconds:I,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[r],adIndex:r};k({adsData:F}),Wn(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var j=Yn.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,x=j.startComscoreAdTracking,N=j.finishComscoreAdTracking,U=j.endComscoreAdTracking,V="".concat(E,"_").concat(v,"_").concat(w);if(!P.has(V))if(P.set(V,!0),"impression"===w){var M,W=$n.get();x(R(Kn(Kn({},null==n||null===(M=n.ads)||void 0===M?void 0:M[r]),{},{trackingUrl:W})))}else"complete"===w?N():"breakEnd"===w&&U()}}}}catch(e){p.e(e)}finally{p.f()}}},D=function(e,n,t,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},ot.clear(),window.isAdPlaying=!1,m=$n.get(),(g=o(i)).one("loadeddata",(function(){m&&A(m)})),y=new Map,w=new Map,T=-1,_=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,I=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,E=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(f=g.el())||void 0===f||null===(p=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,k=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return h(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==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),d=(null==s?void 0:s.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!d&&a){var u=null==s?void 0:s.map((function(e){return Kn(Kn({},e),{},{eventType:"videoView",beaconUrls:[a]})}));null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},A=function(){var e=n(t.mark((function e(n){var l,s,d,u,c,v,f,p,m,g,A,P,L,D,F,j,R,x,N,U,V,M,W,B,H,G;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",M),0===e.button&&x(R)},V=function(e){},U=function(e){if(null!=e){var n,t=null,i=Xn(p);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.startTimeInSeconds,a=r.ads;Array.isArray(a)&&(null==a?void 0:a.length)>0&&(o>e||y.has(o)||(null===t||o>t.startTimeInSeconds)&&(t=r))}}catch(e){i.e(e)}finally{i.f()}t?(console.log("Resume: seeking back to recent ad break:",t.startTimeInSeconds,"then resuming to",e),m={position:e,podStart:t.startTimeInSeconds,podEndTime:t.startTimeInSeconds+t.durationInSeconds,entered:!1},setTimeout((function(){g.currentTime(t.startTimeInSeconds+.4)}),100)):(m=null,g.currentTime(e),N(e))}},N=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g.currentTime(),t=null,i=Xn(p);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));n>=o&&n<=l&&(t=l,y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){g.currentTime(t+2.2)}),100))},x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.currentTime();if(!(null==e||e<0||n<=e)){var t,i=null,r=Xn(p);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=o.startTimeInSeconds,l=o.ads;Array.isArray(l)&&(null==l?void 0:l.length)>0&&(y.has(a)||a>e&&a<=n&&(null===i||a>i.startTimeInSeconds)&&(i=o))}}catch(e){r.e(e)}finally{r.f()}null!==i&&(y.set(i.startTimeInSeconds,!0),w.set(i.startTimeInSeconds,!0),m={position:n,podStart:i.startTimeInSeconds,podEndTime:i.startTimeInSeconds+i.durationInSeconds,entered:!1},console.log("Seeking back to ad pod:",i.startTimeInSeconds,"then resuming to",n),setTimeout((function(){g.currentTime(i.startTimeInSeconds+.4)}),100))}},e.next=8,fetch(n);case 8:return c=e.sent,e.next=11,c.json();case 11:v=e.sent,f=v.avails,p=[],m=null,g=o(i),A=g.controlBar.progressControl,P=A.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),f.map((function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t||t.length),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:k(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),r&&U(r),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p,"function"==typeof(j=(null===(L=window)||void 0===L||null===(D=L.customData)||void 0===D||null===(F=D.ads)||void 0===F?void 0:F.onAdBreaksLoaded)||null)&&j(p)),console.log(p,"data"),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,i=g.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/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",P.appendChild(o)}})),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=a((function(){var e=g.currentTime();if(e!==T){T=e;for(var n=!1,t=function(){var t=p[i],r=t.startTimeInSeconds,o=t.durationInSeconds,a=t.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&&(n=!0),e>l&&y.set(r,!0),Cn.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")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,c=0,v=0;v<a.length;v++){var f,m=null==a||null===(f=a[v])||void 0===f?void 0:f.durationInSeconds;if(d<u+m){c=v;break}u+=m}a[c];var g=Math.max(0,o-d),T=Math.round(g);W.style.display="block",G.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(T));var k=[];return null==a||a.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));k.push.apply(k,h(n))})),(null==t||null===(s=t.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&k.push.apply(k,h(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,k,c,i),"break"}w.delete(r)},i=0;i<p.length;i++){if("break"===t())break}if(window.isAdPlaying=n,m&&!g.seeking()&&(e>=m.podStart&&e<=m.podEndTime&&(m.entered=!0),m.entered&&e>=m.podEndTime)){var r=m.position;m=null,setTimeout((function(){g.currentTime(r),N(r)}),300)}n||(W.style.display="none",A.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.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")),Cn.enable())}}),1e3),g.on("timeupdate",g._timeUpdateHandler),null===(s=document)||void 0===s||s.addEventListener("keydown",(function(e){if(Cn.enabled&&"ArrowRight"==e.key){var n=g.currentTime();Pi(i,10),x(n,n+10),e.stopPropagation()}})),R=-1,A.el().addEventListener("pointerdown",(function(e){0===e.button&&(R=g.currentTime(),document.addEventListener("pointermove",V),document.addEventListener("pointerup",M))})),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach((function(e){return null==e?void 0:e.remove()})),(W=document.createElement("div")).className="ssai-ad-container",(B=document.createElement("div")).className="sponsored-adbox",(H=document.createElement("div")).className="sponsored-text",H.textContent="Sponsored Ad",B.append(H),(G=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",W.append(B),W.append(G),g.el().appendChild(W);case 47:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=new Map,L=-1;case 21:case"end":return e.stop()}}),e)}))),lt.apply(this,arguments)}function st(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 dt(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)?dt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function dt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function ut(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ct(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ut(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var vt={},ft=(null===(tt=window)||void 0===tt||null===(it=tt.location)||void 0===it||null===(rt=it.search)||void 0===rt?void 0:rt.includes("debug=true"))||!1,pt=null;function mt(e){return ht.apply(this,arguments)}function ht(){return ht=n(t.mark((function e(i){var r,l,s,d,u,c,v,f,p,m,g,y,w,T,_,b,I,E,S,k,A,O,P,L,D,C,F;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,r,a){var l,s,d=o(i);if(!d.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(l=n.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=st(t);try{for(f.s();!(v=f.n()).done;){var p,m,h,g=v.value,y=g.eventType,w=g.beaconUrls,T=g.startTimeInSeconds,_=g.startTime,b=g.durationInSeconds,I=(g.eventId,T||u),E=w,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);L.has(A)||L.set(A,new Set);var O=L.get(A);if(ft&&console.warn(e,I,"map:",y,"condition1:",e>=I,"map:",L),e>=I&&e<=I+D&&!O.has(k)){O.add(k);try{C(y,n,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof S)try{var P,F={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:b,ad:null==n||null===(P=n.ads)||void 0===P?void 0:P[r],adIndex:r};S({adsData:F}),Wn(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var j=Yn.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,x=j.startComscoreAdTracking,N=j.finishComscoreAdTracking,U=j.endComscoreAdTracking;if("impression"===y){var V,M=$n.get();x(R(ct(ct({},null==n||null===(V=n.ads)||void 0===V?void 0:V[r]),{},{trackingUrl:M})))}else"complete"===y?N():"breakEnd"===y&&U()}}}}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,i){var r,o,a;"breakEnd"===e&&(null===(r=vt)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=vt)||void 0===o?void 0:o.totalAds)&&(null==n||null===(a=n.ads)||void 0===a?void 0:a.length)>0||(ft&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))})))},g=function(){pt&&clearInterval(pt)},p=$n.get(),(m=o(i)).one("loadeddata",(function(){g(),pt=setInterval((function(){p&&!m.paused()&&P(p)}),2e3)})),m.on("dispose",(function(){g()})),y=new Map,w=new Map,T=-1,_=null,b=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,I=(null==m||null===(s=m.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,E=(null==m||null===(d=m.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==m||null===(u=m.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,k=(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,A=!1,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return h(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==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter((function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)})),d=(null==s?void 0:s.some((function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some((function(e){return e.includes("videoView")}))})))||!1;if(!d&&a){var u=null==s?void 0:s.map((function(e){return ct(ct({},e),{},{eventType:"videoView",beaconUrls:[a]})}));null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},P=function(){var e=n(t.mark((function e(n){var r,l,s,d,u,c,v,f,p,m,g,P;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),_&&d.searchParams.append("nextToken",_),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:c=e.sent,v=c.avails,f=c.nextToken||null,_=f,p=[],m=o(i),g=null==m||null===(r=m.controlBar)||void 0===r?void 0:r.progressControl,P=null==g||null===(l=g.seekBar)||void 0===l?void 0:l.el(),null===(s=document)||void 0===s||s.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),v.map((function(e,n){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:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),ft&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,i=m.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/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",P.appendChild(o)}})),m._timeUpdateHandler&&m.off("timeupdate",null==m?void 0:m._timeUpdateHandler),m._timeUpdateHandler=a((function(){if(Di(i)){var e=null==m?void 0:m.currentTime();if(e!==T){T=e;for(var n=function(){var n=p[t],i=n.startTimeInSeconds,r=n.durationInSeconds,o=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;A=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&y.set(i,!0),Cn.disable(),b&&b.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),k&&(k.style.pointerEvents="none",k.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),g.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,c=0;c<o.length;c++){var v,f=null==o||null===(v=o[c])||void 0===v?void 0:v.durationInSeconds;if(s<d+f){u=c;break}d+=f}setTimeout((function(){vt.totalAds=null==o?void 0:o.length,vt.currentAdIndex=u}),1e3);var m=[];return null==o||o.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));m.push.apply(m,h(n))})),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&m.push.apply(m,h(null==n?void 0:n.podSlotImpressionBeacon)),F(e,n,m,u),"break"}w.delete(i)},t=0;t<p.length;t++){if("break"===n())break}A||(vt={},g.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),b&&b.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),k&&(k.style.pointerEvents="auto",k.classList.remove("vjs-hidden")),Cn.enable())}}}),1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=new Map,D=2.5;case 22:case"end":return e.stop()}}),e)}))),ht.apply(this,arguments)}var gt=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function yt(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 wt=function(){function e(n,t,i,r){b(this,e),this.video_=r,this.ad_=n,this.skipOffset_=function(e){if(!e)return null;var n=new RegExp(gt.source,"g");n.lastIndex=0;var t=n.exec(e);if(!t)return null;var i=Number(t[1])||0,r=Number(t[2]),o=Number(t[3]),a=Number(t[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==n?void 0:n.skipOffset),this.adPosition_=t,this.totalAds_=i,this.isSkipped_=!1}return I(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,n,t,i,r,o;return(null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(t=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==t?t: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,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.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}(),Tt="impression",_t="start",bt="mute",It="unmute",Et="resume",St="pause",kt="firstQuartile",At="midpoint",Ot="thirdQuartile",Pt="complete",Lt="skip",Dt="breakStart",Ct="breakEnd",Ft="skipStateChanged",jt="ad_impression",Rt="ad_started",xt="ad_muted",Nt="ad_volume_changed",Ut="ad_resumed",Vt="ad_paused",Mt="ad_first_quartile",Wt="ad_midpoint",Bt="ad_third_quartile",Ht="ad_complete",Gt="ad_stopped",qt="ad_skipped",Yt="ad_skip_state_changed",zt="ad_break_started",Qt="ad_break_ended",Kt="ads_loaded",Xt="ad_cuepoints_changed";function Jt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function $t(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Jt(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function Zt(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 ei(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)?ei(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);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(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function ei(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var ni="[Transmit]";function ti(e){var n,t,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(n=e.dashAvailabilityStartTime)&&void 0!==n?n:null,o=null!==(t=e.nextToken)&&void 0!==t?t: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 ii=function(){function e(n,t,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};b(this,e),this.video_=n,this.player_=t,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 I(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:Kt,loadTime:0})}},{key:"getCuePoints",value:function(){var e,n=new Map,t=Zt(this.adBreaks_);try{for(t.s();!(e=t.n()).done;){var i,r=Zt(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));n.has(s)||n.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){t.e(e)}finally{t.f()}return Array.from(n.values()).sort((function(e,n){return e.start-n.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 n,t;e.trackingUrl_&&(null!==(n=e.player_)&&void 0!==n&&null!==(t=n.paused)&&void 0!==t&&t.call(n)||e.requestTrackingInfo_(!1))}),this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=n(t.mark((function e(n){var i,r,o,a,l,s,d,u,c,v,f,p,m,h,g,y,w;return t.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=ti(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=Zt(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),yt(this.adBreaks_)!==yt(y)&&(this.adBreaks_=y,w=this.getCuePoints(),this.onEvent_({type:Xt,cuepoints:w}))):this.adBreaks_.length&&(this.onEvent_({type:Xt,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),n&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(ni,"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 n,t=1e6,i=Zt(e||[]);try{for(i.s();!(n=i.n()).done;){var r,o=n.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>t)return void(this.apiTimelineAbsolute_=!0);var a,l=Zt((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)>t)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 n=this,t=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map((function(e){var i=n.resolveAbsoluteStart_(e,t,null);return $t($t({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map((function(r){return $t($t({},r),{},{startTimeInSeconds:n.resolveAbsoluteStart_(r,t,e,i)})}))})}))}},{key:"resolveAbsoluteStart_",value:function(e,n,t,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!=t&&t.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(t.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+n}},{key:"resolveDashAvailabilityStartTime_",value:(r=n(t.mark((function e(n,i){var r,o;return t.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(!n){e.next=8;break}if(r=new Date(n).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,n){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=n(t.mark((function e(){var n,i,r,o,a,l;return t.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===(n=a.querySelector("MPD"))||void 0===n?void 0:n.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(ni,"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,n,t,i,r=(null===(e=this.player_)||void 0===e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||(null===(t=this.player_)||void 0===t||null===(i=t.src)||void 0===i?void 0:i.call(t));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,n,t=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase();return t.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase()||t.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,n,t=null===(e=this.player_)||void 0===e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer;if(!t||"function"!=typeof t.time)return null;var i=t.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,n,t,i=null!==(e=null===(n=this.video_)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:0,r=u();if(this.isHlsSource_()){var o,a,l=i,s=null===(o=this.player_)||void 0===o||null===(a=o.seekable)||void 0===a?void 0:a.call(o);return s&&s.length>0&&(l=s.end(s.length-1)),Date.now()/1e3-(l-i)}if(this.isDashSource_()){var d,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var p=null===(d=this.player_)||void 0===d||null===(c=d.seekable)||void 0===c?void 0:c.call(d),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===(t=this.player_)||void 0===t?void 0:t.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var n,t;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(n=null===(t=this.transmitAd_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==n?n:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(Ft),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,n){if(n){var t=n.startTimeInSeconds+.25*n.durationInSeconds,i=n.startTimeInSeconds+.5*n.durationInSeconds,r=n.startTimeInSeconds+.75*n.durationInSeconds;e>=t&&!this.eventsSent_.has(kt)&&(this.eventsSent_.add(kt),this.sendTrackingEvent_(kt)),e>=i&&!this.eventsSent_.has(At)&&(this.eventsSent_.add(At),this.sendTrackingEvent_(At)),e>=r&&!this.eventsSent_.has(Ot)&&(this.eventsSent_.add(Ot),this.sendTrackingEvent_(Ot))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,n=[kt,At,Ot];e<n.length;e++){var t=n[e];this.eventsSent_.has(t)||(this.eventsSent_.add(t),this.sendTrackingEvent_(t))}}},{key:"checkLinearAds_",value:function(e){var n,t=Zt(this.adBreaks_);try{for(t.s();!(n=t.n()).done;){var i=n.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 wt(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(Dt),this.setupCurrentAdListeners_();break}}}}catch(e){t.e(e)}finally{t.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_(Ct),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,n,t,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(n=e.paused)&&void 0!==n&&n.call(e)?a=!0:(this.sendTrackingEvent_(Tt),this.sendTrackingEvent_(_t)),this.lastMutedForAd_=null!==(t=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==t&&t,this.attachAdListener_("volumechange",(function(){var e,n,t,i=null!==(e=null===(n=o.player_)||void 0===n||null===(t=n.muted)||void 0===t?void 0:t.call(n))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(bt):o.sendTrackingEvent_(It))})),this.attachAdListener_("play",(function(){a?(o.sendTrackingEvent_(Tt),o.sendTrackingEvent_(_t),a=!1):o.sendTrackingEvent_(Et)})),this.attachAdListener_("pause",(function(){o.sendTrackingEvent_(St)}))}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?Lt:Pt),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.globalListeners_.push({event:e,handler:n}))}},{key:"attachAdListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.adListeners_.push({event:e,handler:n}))}},{key:"detachAdListeners_",value:function(){var e,n=Zt(this.adListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r,o=e.value,a=o.event,l=o.handler;null===(t=this.player_)||void 0===t||null===(i=(r=t).off)||void 0===i||i.call(r,a,l)}}catch(e){n.e(e)}finally{n.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,n=Zt(this.globalListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r,o=e.value,a=o.event,l=o.handler;null===(t=this.player_)||void 0===t||null===(i=(r=t).off)||void 0===i||i.call(r,a,l)}}catch(e){n.e(e)}finally{n.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=Yn.get();if(!e||0===Object.keys(e).length)return;var n=e.formulateComscoreAdPayload,t=e.startComscoreAdTracking,i=$n.get();t(n($t($t({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(ni,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var n,t=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find((function(n){return n.eventType===e}));if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find((function(n){return n.eventType===e}))),i&&(null===(n=this.config_)||void 0===n||!n.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=Zt(i.beaconUrls||[]);try{var d=function(){var n=a.value;if(!n)return"continue";var i="".concat(l,"|").concat(e,"|").concat(n);if(t.firedBeacons_.has(i))return"continue";t.firedBeacons_.add(i),fetch(n,{mode:"no-cors"}).catch((function(e){console.warn(ni,"beacon failed",n,e)}))};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=Yn.get(),c=u&&Object.keys(u).length?u:null;switch(e){case Tt:this.onEvent_({type:jt}),this.startComscoreForCurrentAd_();break;case _t:this.onEvent_({type:Rt,ad:this.ad_});break;case bt:this.onEvent_({type:xt});break;case It:this.onEvent_({type:Nt});break;case Et:this.onEvent_({type:Ut});break;case St:this.onEvent_({type:Vt});break;case kt:this.onEvent_({type:Mt});break;case At:this.onEvent_({type:Wt});break;case Ot:this.onEvent_({type:Bt});break;case Pt:this.onEvent_({type:Ht}),this.onEvent_({type:Gt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case Lt:this.onEvent_({type:qt}),this.onEvent_({type:Gt});break;case Dt:this.onEvent_({type:zt});break;case Ct:this.onEvent_({type:Qt}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case Ft:this.onEvent_({type:Yt})}}else console.warn(ni,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function ri(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function oi(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ri(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var ai={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function li(e){if(null==e||!e.src)return null;var n=(e.type||"").toLowerCase(),t=String(e.src).toLowerCase();return"application/dash+xml"===n||t.includes(".mpd")?"dash":"application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n||t.includes(".m3u8")?"hls":null}function si(e,n,t){return di.apply(this,arguments)}function di(){return(di=n(t.mark((function e(n,i,r){var o,a,l,s,d,u,c,v,f,p,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=li(n)){e.next=3;break}return e.abrupt("return",n);case 3:return a=yn(n.src,r,i),l=a.replace(o,ai[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",n);case 18:return v=new URL(l),f=v.hostname,p="https://".concat(f).concat(u),m="https://".concat(f).concat(c),$n.set(m),console.log("[Transmit] session ready",{manifestUrl:p,trackingUrl:m}),e.abrupt("return",oi(oi({},n),{},{src:p}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",n);case 30:case"end":return e.stop()}}),e,null,[[6,26]])})))).apply(this,arguments)}var ui=null;function ci(e,n){var t;if(ui)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),ui;var i=$n.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(t=r.el())||void 0===t?void 0:t.querySelector("video"))||null,l=function(e){try{var n="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(n).includes(".mpd"))return n}catch(e){}return null}(r);return(ui=new ii(a,r,(function(e){var t,i;console.log("[Transmit] ad event",e);var r=null==n||null===(t=n.customData)||void 0===t||null===(i=t.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}),ui.addTrackingUrl(i),ui.onManifestUpdated(),ui}function vi(){ui&&(ui.release(),ui=null)}function fi(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function pi(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fi(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):fi(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}var mi="player-control-action",hi={PAUSE:"Pause",RESUME:"Resume",REPLAY:"Replay",DVR_SCRUB:"DVR Scrub",GO_LIVE:"Go Live",CC_ON:"CC On",CC_OFF:"CC Off",FULLSCREEN_ENTER:"Full Screen Enter",FULLSCREEN_EXIT:"Full Screen Exit",MUTE:"Mute",UNMUTE:"Unmute"},gi=new Map,yi=function(e){try{return!!e.muted()||0===e.volume()}catch(e){return!1}},wi=function(e){try{for(var n=e.textTracks(),t=0;t<n.length;t+=1){var i=n[t];if(("captions"===i.kind||"subtitles"===i.kind)&&"showing"===i.mode)return!0}}catch(e){}return!1},Ti=function(e){try{return!!e.ads&&"function"==typeof e.ads.isInAdMode&&e.ads.isInAdMode()}catch(e){return!1}};function _i(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&n){var i=0;try{i=e.currentTime()||0}catch(e){}e.trigger(mi,pi({playeraction:n,at:i},t))}}function bi(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.liveVideo,r=void 0!==t&&t,a=n.isDvrEnabled,l=void 0!==a&&a,s=o(e);if(!s)return!1;var d=gi.get(e);if(d)return d.live=!!r,d.dvr=!!l,d.paused=!1,d.expectPause=0,d.expectPlay=0,d.pendingScrub=!1,d.muted=yi(s),d.ccOn=wi(s),!0;var u={paused:!1,muted:yi(s),ccOn:wi(s),expectPause:0,expectPlay:0,pendingScrub:!1,live:!!r,dvr:!!l};gi.set(e,u);var c=function(e,n){return _i(s,e,pi({isLive:u.live},n))};return s.on("pause",(function(){if(u.expectPause>0)return u.expectPause-=1,void(u.paused=!0);u.paused||s.ended()||Ti(s)||(u.paused=!0,c(hi.PAUSE))})),s.on("play",(function(){if(u.expectPlay>0)return u.expectPlay-=1,void(u.paused=!1);u.paused&&(u.paused=!1,Ti(s)||c(hi.RESUME))})),s.on("volumechange",(function(){var e=yi(s);e!==u.muted&&(u.muted=e,c(e?hi.MUTE:hi.UNMUTE))})),s.on("fullscreenchange",(function(){c(s.isFullscreen()?hi.FULLSCREEN_ENTER:hi.FULLSCREEN_EXIT)})),s.textTracks().on("change",(function(){var e=wi(s);e!==u.ccOn&&(u.ccOn=e,c(e?hi.CC_ON:hi.CC_OFF))})),s.on(mi,(function(e,n){n&&n.playeraction===hi.GO_LIVE&&(u.pendingScrub=!1,u.paused&&(u.expectPlay+=1))})),s.ready((function(){var e=s.controlBar&&s.controlBar.progressControl&&"function"==typeof s.controlBar.progressControl.el?s.controlBar.progressControl.el():null,n=function(e){if(function(e){var n=i.dom&&i.dom.isSingleLeftClick;return"function"!=typeof n||n(e)}(e)){var n=!function(e){var n=e&&e.target;return!(!n||"function"!=typeof n.closest||!n.closest(".".concat("vjs-chapter-marker")))}(e);u.pendingScrub=n,n&&!s.paused()&&(u.expectPause+=1,u.expectPlay+=1)}};e&&"function"==typeof e.addEventListener&&(e.addEventListener("mousedown",n,!0),e.addEventListener("touchstart",n,!0)),s.on("seeked",(function(){u.pendingScrub&&(u.pendingScrub=!1,(u.live||u.dvr)&&c(hi.DVR_SCRUB))}));var t=s.controlBar?s.controlBar.getChild("SeekToLive"):null;t&&"function"==typeof t.on&&t.on("click",(function(){return c(hi.GO_LIVE)}))})),s.on("dispose",(function(){gi.delete(e)})),!0}function Ii(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=gi.get(e);t&&(n.pause&&(t.expectPause+=n.pause),n.play&&(t.expectPlay+=n.play))}function Ei(e){var n=gi.get(e),t=o(e);if(n&&t){try{n.paused=!!t.paused()}catch(e){}n.muted=yi(t),n.ccOn=wi(t)}}function Si(e){var n=o(e);return n?{onPlayerAction:function(e){var t=function(n,t){return e(t)};return n.on(mi,t),function(){return n.off(mi,t)}}}:(console.error("[PLAYER-CONTROL] Player instance not found"),{})}function ki(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}var Ai=function(e){var n=i(e);n.paused()&&Ii(e,{play:1}),n.play()},Oi=function(e){var n=i(e);n.paused()||Ii(e,{pause:1}),n.pause()},Pi=function(e,n){var t=i(e),r=t.currentTime()+n;t.currentTime(r)},Li=function(e,n){var t=i(e),r=t.currentTime(),o=r<=n?0:r-n;t.currentTime(o)},Di=function(e){return!!i.getPlayer("".concat(e))},Ci=function(e){return i(e).paused()},Fi=function(){var e=n(t.mark((function e(i,r){var a,l,d,u,c=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=c.length>2&&void 0!==c[2]&&c[2],e.next=3,_e();case 3:return l=e.sent,d=o(i),u=C.getConfig(),e.abrupt("return",new Promise((function(e,o){te(r,l).then(function(){var o=n(t.mark((function n(o){var l,c,v,f,p,m,h,g,y,w,T;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(vi(),m=null==o?void 0:o.data,s()||(window.sid=$e()),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,h=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(f=v.appcmsMain)||void 0===f?void 0:f.adsConfig)||{},g=!(null==m||null===(p=m.linearchannel)||void 0===p||!p.isSSAIEnabled),y=g&&"MEDIA_TAILOR"==(null==h?void 0:h.vodAdSticherProvider),w=g&&"TRANSMIT"==(null==h?void 0:h.liveAdSticherProvider)&&!(null==h||!h.liveAdClientSideTracking),T=Tn(m,i),!y){n.next=17;break}return n.next=13,Zn(i,m);case 13:T=n.sent,a=!0,n.next=22;break;case 17:if(!w){n.next=22;break}return n.next=20,si(T,m,i);case 20:T=n.sent,a=!0;case 22:ke(m),T&&a?(Ke(),ln(i,{analyticsCb:null==u?void 0:u.analyticsCb,analyticsEventParams:null==u?void 0:u.analyticsEventParams,userId:null==u?void 0:u.userId}),Ui(i,T),w?ci(i,{customData:window.customData||{ads:h}}):y&&mt(i),d.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})}))):(Yn.get()&&0!==Object.keys(Yn.get()).length&&zn({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 24:case"end":return n.stop()}}),n)})));return function(e){return o.apply(this,arguments)}}()).catch((function(e){o({status:!1,msg:"Cannot load feed",response:e})}))})));case 7:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ji=function(){var e=n(t.mark((function e(i,r,a){var l,s,d,u,c,v,m,h;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_e();case 2:return u=e.sent,c=C.getConfig(),console.log("load video"),(Pe()||null)&&je(r),v=0,m=0,h=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(d=s.watchHistory)&&void 0!==d&&d.enable&&oe(r,u).then((function(e){var n,t,i,r,o,a,l,s,d;(null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t||!t.cb||null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.isExternal||null===(o=window)||void 0===o||null===(a=o.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data),v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,(m=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedPercentage)||null)<95)&&(h=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedTime)||null)})).catch((function(){})),e.abrupt("return",new Promise((function(e,a){ne(r,u).then(function(){var r=n(t.mark((function n(r){var l,s,d,u,g,y,w,T,_,b,I,E,S,k,A,O,P,L,D,C,F,j,R,x,N,U,V,M,W,B,H,G,q,Y,z,Q,K,X,J,$,Z;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==r?void 0:r.data,P=(null==O?void 0:O.contentType)||"video",L=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.adsConfig)||{},D=!(null==O||null===(g=O[P])||void 0===g||!g.isSSAIEnabled),C=D&&"MEDIA_TAILOR"==(null==L?void 0:L.vodAdSticherProvider),F=D&&"TRANSMIT"==(null==L?void 0:L.liveAdSticherProvider)&&!(null==L||!L.liveAdClientSideTracking),j=!(null==O||null===(y=O[P])||void 0===y||null===(w=y.streamingInfo)||void 0===w||!w.isLiveStream)||"linearchannel"===P,ke(r.data),(R=(null==O||null===(T=O.ads)||void 0===T||null===(_=T.preRoll)||void 0===_||null===(b=_.adTags)||void 0===b||null===(I=b.web)||void 0===I?void 0:I.active)&&(null==O||null===(E=O.ads)||void 0===E||null===(S=E.preRoll)||void 0===S||null===(k=S.adTags)||void 0===k||null===(A=k.web)||void 0===A?void 0:A.url))&&Pn(i,R,O),x=Tn(O,i),!C){n.next=17;break}return n.next=14,Zn(i,O);case 14:x=n.sent,n.next=22;break;case 17:if(!F||!j){n.next=22;break}return vi(),n.next=21,si(x,O,i);case 21:x=n.sent;case 22:if(!x){n.next=40;break}if(z=(null==O||null===(N=O.video)||void 0===N||null===(U=N.gist)||void 0===U?void 0:U.videoImageUrl)||(null==O||null===(V=O.video)||void 0===V||null===(M=V.gist)||void 0===M||null===(W=M.imageGist)||void 0===W?void 0:W.r16x9),Q=o(i)){n.next=28;break}return console.error("[VL][player-core] player not found for id=".concat(i),{player:Q}),n.abrupt("return",a({status:!1,msg:"Player not found",response:{}}));case 28:Q.poster(z),Ke(),ln(i,{analyticsCb:null==c?void 0:c.analyticsCb,analyticsEventParams:null==c?void 0:c.analyticsEventParams,userId:null==c?void 0:c.userId}),Ui(i,x),F&&j?ci(i,{customData:window.customData||{ads:L}}):C&&at(i,h),Q.on("loadstart",(function(){j&&e({status:!0,msg:"Video Loaded",response:O})})),Q.on("loadeddata",(function(){An(),e({status:!0,msg:"Video Loaded",response:O})})),Q.one("play",(function(){!v||C||F&&j||m<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==O||null===(B=O.video)||void 0===B||null===(H=B.contentDetails)||void 0===H||null===(G=H.closedCaptions)||void 0===G?void 0:G.length)>0||(null==O||null===(q=O.video)||void 0===q||null===(Y=q.closedCaptions)||void 0===Y?void 0:Y.length)>0?(Z=(null==O||null===(X=O.video)||void 0===X||null===(J=X.contentDetails)||void 0===J?void 0:J.closedCaptions)||(null==O||null===($=O.video)||void 0===$?void 0:$.closedCaptions),K=Z.filter((function(e){return"VTT"===e.format})),p(i,K)):f(i),n.next=42;break;case 40:kn(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed");case 42:case"end":return n.stop()}}),n)})));return function(e){return r.apply(this,arguments)}}()).catch((function(e){Vi(e,i,a,r)}))})));case 12:case"end":return e.stop()}}),e)})));return function(n,t,i){return e.apply(this,arguments)}}(),Ri=function(e,n,t){var i=o(e);return i.src(n),new Promise((function(e,n){var r=0;i.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},xi=function(e){vi();var n=o(e),t=(Yn.get()||{}).destroyComscoreTag;if(Ni(),t&&t(),l(),window.onresize=null,n)n.dispose();else{var i=document.getElementById(e);i&&i.remove()}},Ni=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()},Ui=function(e,n){console.log("load video in core",n);var t=o(e);t&&t.src(n)},Vi=function(n,t,i,r){var o,a,l,s,d,u,c=null==n||null===(o=n.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);Di(t)&&kn(t,(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(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ki(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ki(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},Mi=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{Ee as $,K as A,j as B,x as C,N as D,U as E,Ie as F,ne as G,oe as H,Vi as I,_e as J,te as K,ie as L,sn as M,Re as N,Oe as O,Ri as P,Pi as Q,Ai as R,Oi as S,Li as T,Di as U,ji as V,Fi as W,xi as X,se as Y,Bn as Z,Si as _,un as a,le as a0,be as a1,ce as a2,de as a3,S as a4,ot as a5,_i as a6,hi as a7,Ln as a8,Le as a9,Ci as aa,De as ab,ci as ac,mt as ad,at as ae,ae as af,Fe as ag,je as ah,Pe as b,Yn as c,dn as d,Ae as e,Tn as f,Ze as g,ke as h,bi as i,zn as j,An as k,Ui as l,kn as m,Ce as n,Mi as o,C as p,si as q,Ei as r,re as s,$n as t,ln as u,Se as v,Pn as w,Sn as x,Zn as y,F as z};
|
package/esm/helpers/token.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function token_authentication_enabled(params: any): boolean;
|
|
2
2
|
export function getToken(): Promise<any>;
|
|
3
|
-
export function fetchRefreshToken(): Promise<import("axios").AxiosResponse<any, any
|
|
3
|
+
export function fetchRefreshToken(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
4
|
export function refreshTokenManager(): {
|
|
5
5
|
set(token: any): void;
|
|
6
6
|
get(): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,d as n}from"./skin-2a3ee818.js";import{a9 as a,b as i}from"./generic-ea2aba32.js";import{s as l}from"./autoNextVideo-88053576.js";import{r as o}from"./relatedVideosManager-93533a90.js";import r from"@babel/runtime/helpers/typeof";import d from"video.js";var s,u,c,m,p=[],v=!1,f=null,h=!1,g=null,x=null,y=null,C=null,E=null,N=function(){null!=f&&(clearInterval(f),f=null),h=!1},b="next-ep-preview-player-thumb",w=function(e,t){if(e){var n,a,i,l,o;(null==(n=t)||null===(a=n.gist)||void 0===a||null===(i=a.imageGist)||void 0===i?void 0:i.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(o=l.customData)||void 0===o||o.fallbackImage;var r=e.getElementsByClassName(b)[0];r||((r=document.createElement("div")).className=b,r.setAttribute("aria-hidden","true"),e.appendChild(r))}},A=function(e,t){if(e){var n=e.getElementsByClassName(b)[0];n&&(n.style.visibility=t?"visible":"hidden")}},L=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var a=document.createElement("span");return a.className="next-ep-duration",a.textContent="10",t.append(n,a),e.append(t),e},B=function(e,t,a,i){var l,o,r,d,s,u=null==e?void 0:e.isSport,c=(null==e?void 0:e.title)||"",m=(null==e||null===(l=e.gist)||void 0===l?void 0:l.description)||(null==e?void 0:e.description)||"",p=null==e?void 0:e.publishDate,f=document.createElement("div");f.className="next-ep-content";var h=document.createElement("div");h.className="next-ep-thumb-wrap";var g=document.createElement("img");g.className="next-ep-img",g.alt="",g.src=(null==e||null===(o=e.gist)||void 0===o||null===(r=o.imageGist)||void 0===r?void 0:r.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(s=d.customData)||void 0===s?void 0:s.fallbackImage);var x=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),a=t%60;return"".concat(n,":").concat(String(a).padStart(2,"0"))}(null==e?void 0:e.runtime),y=document.createElement("div");y.className="next-ep-thumb-runtime",y.textContent=x,x||y.classList.add("next-ep-thumb-runtime--empty"),h.appendChild(g),h.appendChild(y);var C=document.createElement("div");C.className="next-ep-meta";var E=document.createElement("div");E.className="next-ep-title",E.textContent="".concat(c||"");var b=document.createElement("div");b.className="next-ep-desc",b.textContent=m||"",String(m||"").trim()||b.classList.add("next-ep-desc--empty");var w=document.createElement("div");w.className="next-ep-meta-row";var A=document.createElement("span");A.className="next-ep-badge";var L=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);A.textContent=L,L||A.classList.add("next-ep-badge--empty");var B=document.createElement("span");B.className="next-ep-episode",B.textContent=u?p:function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var S=document.createElement("div");S.className="next-ep-meta-row-left",S.appendChild(A),S.appendChild(B);var j=document.createElement("img");j.className="next-ep-network-logo",j.alt="";var k=function(e){var t,n,a;if(e){var i=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(a=n.appcmsMain)||void 0===a?void 0:a.networks;if(e&&i){var l=null==i?void 0:i.find((function(t){if(t.identifier==e)return t}));return null==l?void 0:l.badgeImage}}}(null==e?void 0:e.network);k?j.src=k:j.classList.add("next-ep-network-logo--empty"),w.appendChild(S),C.appendChild(E),C.appendChild(b),C.appendChild(w);var P=document.createElement("div");return P.className="next-ep-meta-with-logo",P.appendChild(C),P.appendChild(j),f.appendChild(h),f.appendChild(P),f.onclick=n((function(){N(),null==t||t.remove(),v=!0,I(a)}),400),f},S=function n(l,r){var d;if(v=!1,C=l,E=r,y&&(y(),y=null),null!=r&&null!==(d=r.series)&&void 0!==d&&d.enable){var s;p=[];var u=i();null==u||u.map((function(t){var n;return(n=p).push.apply(n,e(t.episodes))})),null==r||null===(s=r.series)||void 0===s||s.cb}else{var c=o.get();p=(null==c?void 0:c.content)||[],null==c||c.cb,y=o.subscribe((function(){y&&(y(),y=null),C&&E&&n(C,E)}))}var m=t(l);if(m){!function(e){e&&x&&(e.off("timeupdate",x),x=null)}(t(g)),N(),g=l,x=function(){var e,t;if(!v){var n=m.duration(),i=m.currentTime(),o=Number.isFinite(n)&&n>0?n-i:1/0,r=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(l),s=a()<=(null===(t=p)||void 0===t?void 0:t.length)-1;if(o>1){if(null!=f||h){N();var u=null==r?void 0:r.querySelector(".next-ep-header .next-ep-duration");u&&(u.textContent="10")}return r&&(r.style.visibility="hidden"),void A(d,!1)}s?(r&&(r.style.visibility="visible"),A(d,!0),h||null!=f||(m.pause(l),h=!0,function(e){var t;if(null==f){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],i=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(i){var l=10;i.textContent="10",f=setInterval((function(){l--,i.textContent=String(l),0===l&&(clearInterval(f),f=null,h=!1,p.filter((function(e,t){return t==a()})),I(e))}),1e3)}}}(l))):A(d,!1)}},m.on("timeupdate",x);var b,S=p.filter((function(e,t){return t==a()}));if((null==S?void 0:S.length)>0)if(null!==(b=document.getElementsByClassName("next-ep-preview"))&&void 0!==b&&b[0]){var j,k,P=null===(j=document.getElementsByClassName("next-ep-preview"))||void 0===j?void 0:j[0];P.style.visibility="hidden",null===(k=P.querySelector(".next-ep-preview-inner"))||void 0===k||k.remove(),Array.from(P.children).forEach((function(e){e.classList.contains("next-ep-content")&&e.remove()}));var M=P.querySelector(".next-heading-wrapper");if(M){var O=M.querySelector(".next-ep-header"),q=null==O?void 0:O.querySelector(".next-ep-duration");if(!q&&O){O.textContent="";var F=document.createElement("span");F.className="next-ep-header-text",F.textContent="Next up in",(q=document.createElement("span")).className="next-ep-duration",q.textContent="10",O.append(F,q)}else q&&(q.textContent="10")}else M=L(),P.insertBefore(M,P.firstChild);P.appendChild(B(S[0],P,l));var D=document.getElementById(l);w(D,S[0]),A(D,!1)}else{var T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden";var X=document.getElementById(l);X.append(T);var R=L();T.append(R);var G=B(S[0],T,l);T.append(G),w(X,S[0]),A(X,!1)}}},I=function(e,n){var i=t(e);if(i){var o=i.duration();if(Number.isFinite(o)&&!(o<=0)){i.pause(e);var r=a();l(r,e,p)}}};function j(e,n){var a=t(e),i=null==n?void 0:n.tvProviderLogoUrl,l=null==n?void 0:n.tvProviderName;if(i){var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(i),r.alt="connected to ".concat(l)||"Provider Name",o.append(r),a.el().appendChild(o),a.on("useractive",(function(){o.classList.remove("vjs-fade")})),a.on("userinactive",(function(){a.paused()||o.classList.add("vjs-fade")})),a.on("fullscreenchange",(function(){a.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}s={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,a,i,l;for(a in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[a])i.hasOwnProperty(l)&&("object"===r(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},c=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},m=function e(t){return"HTML"!==t.nodeName&&"static"===c(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",(function(e){var t,n,a,i,l,o,r,d;function p(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",p),d()}n=u({},s,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",a=document.createElement("img"),t.appendChild(a),a.src=n[0].src,a.className="vjs-thumbnail",u(a.style,n[0].style),a.style.left||a.style.right||(a.onload=function(){a.style.left=-a.naturalWidth/2+"px"}),o=i.duration(),i.on("durationchange",(function(e){o=i.duration()})),i.on("loadedmetadata",(function(e){o=i.duration()})),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,d,s,p,v,f,h,g,x;for(r in d=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=m(l.el()).getBoundingClientRect()).width||x.right)+g,v=e.pageX,e.changedTouches&&(v=e.changedTouches[0].pageX),s=v||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=m(l.el()).getBoundingClientRect().left+g,i=Math.floor((s-l.el().offsetLeft)/l.width()*o),n)i>r&&(d=Math.max(d,r));(p=n[d]).src&&a.src!=p.src&&(a.src=p.src),p.style&&a.style!=p.style&&u(a.style,p.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=c(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(a,p.width||n[0].width)/2)>f?s-=s+h-f:s<h&&(s=h),t.style.left=s+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",(function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",p)})),d=function(e){t.style.left="-1000px"},l.on("mouseout",d),l.on("touchcancel",d),l.on("touchend",d),i.on("userinactive",d)}));export{S as a,j as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-023de7f0.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import{t as r,g as n}from"./skin-2a3ee818.js";import i from"@babel/runtime/helpers/defineProperty";import a from"@babel/runtime/helpers/slicedToArray";import{e as u}from"./generic-ea2aba32.js";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))})),r.push(n)}})),r}function p(){return(p=e(t.mark((function e(r){var n,i,u,o,s,l,c,p,d,m,f,b,g,v,h,x,y,w,k,E,j,N,A,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=a(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,m=[],f=0;f<l;f++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,f*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),m.push({uri:v,duration:r.duration}),r._tiles=m;return e.abrupt("return",m);case 20:for(e.prev=20,e.t0=e.catch(2),h=r.layout.split("x").map(Number),x=a(h,2),y=x[0],w=x[1],k=[],E=0;E<y*w;E++)k.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:r.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}}),e,null,[[2,20]])})))).apply(this,arguments)}function d(e,t){return m.apply(this,arguments)}function m(){return(m=e(t.mark((function e(r,n){var i,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",c(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})))).apply(this,arguments)}function f(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=n(l);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),c=t[s];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then((function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri})))}}function b(e){return g.apply(this,arguments)}function g(){return(g=e(t.mark((function e(n){var u,o,l,c;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u={},n.forEach((function(e,t){for(var r=e.layout.split("x").map(Number),n=a(r,2),o=n[0]*n[1],l=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*l);u[d]=s(s({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}})),o=Object.keys(u).map(Number).sort((function(e,t){return e-t})),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r((function(e){return f(e,u,o)}),500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",(function(e){document.addEventListener("pointermove",r((function(e){return f(e,u,o)}),500))})),e.abrupt("return",u);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var v=function(){var r=e(t.mark((function e(r,n){var i,u,o,s,l,c,p,d;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return i=e.sent,e.next=5,i.text();case 5:u=e.sent,o=u.split("\n").map((function(e){return e.trim()})),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach((function(e){var t=e.split("="),r=a(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())})),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}}),e)})));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(t.mark((function e(r,i){var o,s,c,p,d,m,f,b,g,v,x,y,k,E,j,N,A,T,O,I,S,M,P,R,$,B,L,D,U,C,X,q,F,_,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,me;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=i,o=n(i),s=r.split("/"),c=s.findIndex((function(e){return"dash"===e.toLowerCase()})),p=h(-1!==c?s.slice(0,c+1).join("/"):new URL(r).origin),e.prev=5,e.next=8,fetch(r);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=u())||void 0===d||null===(m=d.video)||void 0===m?void 0:m.runtime),k=(null==x||null===(f=x.querySelector("MPD > BaseURL"))||void 0===f?void 0:f.textContent)||p+"/",E=x.getElementsByTagName("AdaptationSet"),j=0;case 18:if(!(j<E.length)){e.next=72;break}if(("image"!==(N=E[j]).getAttribute("contentType")||"image/png"!==N.getAttribute("mimeType"))&&"image/jpeg"!==N.getAttribute("mimeType")){e.next=69;break}if(T=N.getElementsByTagName("SegmentTemplate")[0],O=null===(A=T.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!T||!O){e.next=48;break}if(M=O.getElementsByTagName("S"),P=parseInt(null===(I=M[0])||void 0===I?void 0:I.getAttribute("t")),R=parseInt(null===(S=M[0])||void 0===S?void 0:S.getAttribute("d")),$=N.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],L=B.getAttribute("value"),D=null==L?void 0:L.split("x"),U=a(D,2),C=U[0],X=U[1],!T){e.next=46;break}if(T.getAttribute("media"),q=T.getAttribute("timescale"),F=(q?R/q:R)/(C*X),_=$.getAttribute("id"),W=Math.round(y/F),z=Math.ceil(W/(C*X)),G=T.getAttribute("media"),parseInt(T.getAttribute("startNumber")),!isNaN(parseInt(z))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],j=0;j<z;j++)K="/"==(J=G)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:L,uri:K+J.replace("$Time$",P+j*R).replace("$RepresentationID$",_)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=N.getElementsByTagName("Representation")[0],V=Q.getElementsByTagName("EssentialProperty")[0],Y=V.getAttribute("value"),Z=null==Y?void 0:Y.split("x"),ee=a(Z,2),te=ee[0],re=ee[1],!T){e.next=69;break}if(T.getAttribute("media"),ne=T.getAttribute("duration"),ie=T.getAttribute("timescale"),ae=(ie?ne/ie:ne)/(te*re),ue=Q.getAttribute("id"),oe=Math.round(y/ae),se=Math.ceil(oe/(te*re)),le=T.getAttribute("media"),ce=parseInt(T.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],t=void 0,t=le.match(/Thumbnail_\$Number%0\d+d\$\.\w+/),de=t?t[0]:null,j=0;j<se;j++)me=de?w(de,j+ce):le,pe.push({duration:ae,layout:Y,uri:k+me.replace("$Number$",j+ce).replace("$RepresentationID$",ue)});return e.abrupt("return",pe);case 69:j++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}var t}),e,null,[[5,76]])})))).apply(this,arguments)}function w(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function k(e){return E.apply(this,arguments)}function E(){return(E=e(t.mark((function e(r){var i,a,u,o,s,l,c,p,m,f,g,h,y,w,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n(r),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,d(c,r);case 6:if(!((null==(p=e.sent)?void 0:p.length)>0)){e.next=17;break}return m=(null==p?void 0:p[0])||null,f=m.uri,g=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,v(g,f);case 12:return h=e.sent,e.next=15,b(h);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,x(c,r);case 22:if(!((null==(w=e.sent)?void 0:w.length)>0)){e.next=28;break}return e.next=26,b(w);case 26:k=e.sent,s.thumbnails(k);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}export{k as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/get";import i from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{a6 as s,a7 as l}from"./generic-ea2aba32.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./skin-2a3ee818.js";import"@babel/runtime/helpers/toConsumableArray";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var u={startTime:0,timeLive:3600},c=0,m=u.timeLive,h=n.getComponent("Button"),d=n.getComponent("Component"),f=n.getComponent("ProgressControl"),v=f.getComponent("SeekBar"),b=f.getComponent("PlayProgressBar"),y=f.getComponent("LoadProgressBar"),_=n.getComponent("MouseTimeDisplay");y.prototype.update=function(e){var t=this.player_.buffered(),r=this.player_.duration(),i=this.player_.bufferedEnd(),o=this.partEls_,a=function(e,t){var r=e/t||0;return 100*(r>=1?1:r)+"%"};0!==a(i,r)&&(this.el_.style.width=a(i,r));for(var n=0;n<t.length;n++){var s=t.start(n),l=t.end(n),p=o[n];p||(p=this.el_.appendChild(document.createElement("div")),o[n]=p),0!==a(s,i)&&(p.style.left=a(s,i)),0!==a(l-s,i)&&(p.style.width=a(l-s,i))}for(var u=o.length;u>t.length;u--)this.el_.removeChild(o[u-1]);o.length=t.length},v.prototype.update_=function(e,t){var r=this.player_.duration(),i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),r!==Number.POSITIVE_INFINITY&&this.el_.setAttribute("aria-valuetext","-".concat(n.formatTime(r-i,r))),this.bar.update(n.dom.getBoundingClientRect(this.el_),t)},v.prototype.handleMouseMove=function(e){var t=1-this.calculateDistance(e),r=this.player_.seekable().end(0)-t*m;r===this.player_.duration()&&(r-=.1),this.player_.currentTime(r),this.update()},b.prototype.update=function(e,t){var r=this,i=this.player_.duration();this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var o=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),a=n.formatTime(i-o,i);0!==t&&i!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(a))}))},_.prototype.update=function(e,t){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var i=n.formatTime(m-t*m,m);r.el_.style.left="".concat(e.width*t,"px"),0!==t&&r.player_.duration()!==Number.POSITIVE_INFINITY&&r.getChild("timeTooltip").update(e,t,"-".concat(i))}))};var g=function(e){var t=this;e||(e=u),this.on("timeupdate",(function(e){var r,i;(i=(r=t).seekable())&&i.length&&(i.end(0)-r.currentTime()<20?r.controlBar.liveButton.addClass("onair"):r.controlBar.liveButton.removeClass("onair"),r.duration(r.seekable().end(0)),c||(c=m=r.seekable().end(0)))})),this.on("pause",(function(e){t.controlBar.liveButton.removeClass("onair")})),this.ready((function(){var r;r=t,n.mergeOptions(u,e),r.addClass("vjs-dvr-seekbar"),r.controlBar.addClass("vjs-dvr-control-bar"),r.controlBar.progressControl.seekBar.__proto__.__proto__.update=function(){if(this.el_){var e;e="VolumeBar"===this.name_?this.getPercent():1-(this.player_.duration()-this.player_.currentTime())/m;var t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0),e>1&&(e=1);var r=(100*e).toFixed(2)+"%",i=t.el().style;return 0!==e&&(this.vertical()?i.height=r:i.width=r),e}}},r.controlBar.progressControl&&r.controlBar.progressControl.addClass("vjs-dvr-progress-control"),r.controlBar.liveButton=r.controlBar.addChild("liveButton"),r.controlBar.el().insertBefore(r.controlBar.liveButton.el(),r.controlBar.progressControl.el())}))},C=function(){i(m,h);var n,u,c=(n=m,u=p(),function(){var e,t=a(n);if(u){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function m(t,r){var i;e(this,m),(i=c.call(this,t,r)).controlText("Seek to live"),i.el().setAttribute("tabindex","0");var o=i.el().querySelector(".vjs-icon-placeholder");return o?o.outerHTML='<span class="liveCircle" aria-hidden="true"></span><span class="liveText" aria-hidden="true">LIVE</span>':i.el().insertAdjacentHTML("afterbegin",'<span class="liveCircle" aria-hidden="true"></span><span class="liveText" aria-hidden="true">LIVE</span>'),t.paused()||i.addClass("onair"),i}return t(m,[{key:"buildCSSClass",value:function(){return"vjs-live-button ".concat(function(e,t,i,o){var n=r(a(1&o?e.prototype:e),t,i);return 2&o&&"function"==typeof n?function(e){return n.apply(i,e)}:n}(m,"buildCSSClass",this,3)([]))}},{key:"handleClick",value:function(e){var t=this.player_.seekable().end(0);s(this.player_,l.GO_LIVE),this.player_.currentTime(t),this.player_.play()}}]),m}();d.registerComponent("LiveButton",C),(n.registerPlugin||n.plugin)("dvrSeekbar",g);export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{g as s,e as n}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/toConsumableArray";function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(a=function(){return!!e})()}var u=l.getComponent("Component"),c=function(){r(p,u);var c,m,h=(c=p,m=a(),function(){var e,t=o(c);if(m){var r=o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return i(this,e)});function p(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(r=h.call(this,t,i)).playerId=i.playerId,r.mute_state=t.muted()||!1,r.initialiseStructure(),r}return t(p,[{key:"createEl",value:function(){return l.dom.createEl("div",{className:"vjs-custom-big-mute vjs-control ".concat(this.mute_state?"":"hide"," tl")})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s(this.playerId);null!=this&&this.mute_state&&e.classList.toggle("hide"),n(e,"#vjs-icon-big-mute"),e.onclick=function(){var r=null==t?void 0:t.volume();e.classList.toggle("hide"),t.muted()&&t.muted(!1),t.volume(0==r?100:r)},t.on("volumechange",(function(){var r=t.volume();t.muted()?(e.classList.toggle("hide"),t.volume(r)):r>0?e.classList.add("hide"):0==r&&e.classList.remove("hide")}))}}]),p}();export{c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/typeof";import{e as n,v as t,a5 as a,U as o}from"./generic-ea2aba32.js";import{g as r}from"./skin-2a3ee818.js";import i from"@babel/runtime/helpers/toConsumableArray";import l from"@babel/runtime/helpers/slicedToArray";import{g as c}from"./localisation-0bf399a1.js";var s=!1,u=function(e,n,t){var a=r(e);a?n>=0&&n<=a.duration()?(t({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),a.currentTime(n)):t({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):t("Cannot find player with id: '".concat(e,"'"))},d=function(e,n){var t=r(e);if(!t)return"Cannot find player with id: '".concat(e,"'");try{return t.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(e){return"Error: ".concat(e)}},v=function(e,o){var i=r(e);i?(i.on("ended",(function(){return s=!0})),i.on("timeupdate",(function(){if(!i.paused()&&s){var e,r,l=null===(e=n())||void 0===e||null===(r=e.video)||void 0===r?void 0:r.id;t.get(l)?(t.clear(),a.clear(),o(),t.set(l)):(t.clear(),t.set(l)),s=!1}}))):o("Cannot find player with id: '".concat(e,"'"))},m=function(e,n){var t=r(e);t?t.on("timeupdate",(function(){return n(t.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},f=function(e,n){var t=r(e);t?t.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},h=function(e){var n=r(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")};function g(){var n=function(e,n){var t=r(e);if(!t)throw"Cannot find player with id: '".concat(e,"'");if("function"!=typeof n)throw"Callback function (cb) is missing or not a function";return t};return{onPlay:function(e,t){n(e,t).on("play",(function(){return t()}))},onPause:function(e,t){n(e,t).on("pause",(function(){return t()}))},onMute:function(e,t){var a=n(e,t);a.on("volumechange",(function(){a.muted()?t({muted:!0}):t({muted:!1})}))},onPictureInPictureChange:function(e,t){var a=n(e,t);a.on("enterpictureinpicture",(function(){t({pip:!0})})),a.on("leavepictureinpicture",(function(){t({pip:!1})}))},onFullScreenChange:function(e,t){var a=n(e,t);a.on("fullscreenchange",(function(e){a.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})}))},onSetVolume:function(e,t){var a=n(e,t);a.on("volumechange",(function(){var e=100*a.volume().toFixed(2);a.muted()?t({vol:0}):t({vol:e})}))},onSeeked:function(e,t){var a=n(e,t);a.on("seeked",(function(){t({seeked:a.currentTime()})}))},onSubtitleEnable:function(e,t){var a=n(e,t);a.textTracks().on("change",(function(e){console.log(a.textTracks());var n=a.textTracks().tracks_.filter((function(e){return("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode}));n.length>0&&t({enabled:n[0]})}))},onDisableSubtitles:function(e,t){var a=n(e,t);a.textTracks().on("change",(function(e){var n,o;console.log(a.textTracks()),(null==a||null===(n=a.textTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.every((function(e){return"showing"!=e.mode})))&&t({captions_disabled:!0})}))},onSubtitleCueChange:function(t,a){var o=n(t,a);o.on("loadeddata",(function(){var n,t,r,i,l,c=o.textTracks();"object"==e(o.dash)&&null!=o.dash&&o.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(r=t.dashjs)||void 0===r||null===(i=r.MediaPlayer)||void 0===i||null===(l=i.events)||void 0===l?void 0:l.CAPTION_RENDERED,(function(e){a(e)}));for(var s=0;s<c.length;s++){var u=c[s];"metadata"===u.kind&&(u.mode="hidden",n=u)}n&&n.addEventListener("cuechange",(function(){var e=n.activeCues;if(e&&e.length>0)for(var t=0;t<e.length;t++){var o=e[t];a(o)}else console.log("no active cue at this moment")}))}))},onError:function(e,t){var a=n(e,t);a.on("error",(function(){var e,n;t({error:null==a||null===(e=a.error())||void 0===e?void 0:e.code,msg:null==a||null===(n=a.error())||void 0===n?void 0:n.message})}))}}}var p,E=null,y=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),a=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)),o=a>0&&t>4?a:0,r=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),a=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(a-=1),a<0&&(t-=1),t}(new Date,new Date(n));return[r>0&&o>0?r:0,o,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},C=function(e){var n,t=l(e,8),a=t[0],o=t[1],r=t[2],i=t[3],c=t[4],s=t[5],u=t[6],d=t[7];n=a>=1?" ".concat(a," Year"):o>=1?" ".concat(o," month"):r>=1?" ".concat(r," week"):i>=1?" ".concat(i," day"):c<24&&c>=12?" ".concat(c," hour"):c>0?"".concat(c," hours ").concat(s," minutes ").concat(u," seconds"):s>0?"".concat(s," minutes ").concat(u," seconds"):"".concat(u," seconds"),d.textContent="".concat(n)},D=(p={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return p},set:function(e){p={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function w(e,n,t,a){if(e){var o=function(){var e,o,l=null===(e=D.get())||void 0===e?void 0:e.scheduleStartTimeMs,s=null===(o=D.get())||void 0===o?void 0:o.scheduleEndTimeMs,u=Date.now();if(u-s>0){var d=document.getElementsByClassName("error-message")[0];return d&&(d.textContent=c("eventEnded")||"Game has ended",a.textContent=""),clearInterval(r),void(null==t||t())}var v=l-u;if(v/1e3<=0)return clearInterval(r),null==n||n([0,0,0,0,0,0,0,a]),void(null==t||t());var m=y(v,l);null==n||n([].concat(i(m),[a]))};o();var r=setInterval(o,1e3);return r}}var T=function(e,n,t){var a,o,r,i,l,s,u,d,v=null==n||null===(a=n.response)||void 0===a||null===(o=a.data)||void 0===o?void 0:o.errorCode,m=(null==n||null===(r=n.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.errorMessage)||(null==n?void 0:n.message)||null;D.set({startDateTime:null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.scheduleStartDate,endDateTime:null==n||null===(u=n.response)||void 0===u||null===(d=u.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,a){var o,r,i=Date.now(),l=null===(o=D.get())||void 0===o?void 0:o.scheduleStartTimeMs,s=null===(r=D.get())||void 0===r?void 0:r.scheduleEndTimeMs,u=function(e,n,t,a){var o;e<0?o=c("eventNotStarted")||a||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(o=c("eventEnded")||a||"Game has ended");return o||a}(i-l,i-s,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(u));var v=document.getElementsByClassName("error-timer-message")[0];v&&w(Math.abs(l),C,a,v)}else{var m=document.getElementById(e).parentElement;if(m){var f=document.createElement("div");f.className="error-container";var h=document.createElement("div");h.className="error-message";var g=document.createElement("div");g.className="error-timer-message",h.textContent="".concat(u),f.appendChild(h),f.appendChild(g),m.append(f),w(Math.abs(l),C,a,g)}}}(e,v,m,t)};function M(e,n){var t=n.scheduleEndDate,a=n.scheduleStartDate;D.set({startDateTime:a,endDateTime:t}),E&&clearInterval(E),E=setInterval((function(){var n,t=Date.now(),a=null===(n=D.get())||void 0===n?void 0:n.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",a),a&&t>a){var i;console.log("Game ended");var l=r(e);if(o(e)&&l){var s;l.dispose(),console.log("Player disposed");var u=null===(s=document.getElementsByClassName("vl-container"))||void 0===s?void 0:s[0],d=document.createElement("video");d.id=e,d.className="video-js",d.style.width="100%",d.style.height="100%",u&&u.appendChild(d)}var v=c("eventEnded")||"Game has ended",m=null===(i=document.getElementsByClassName("error-container"))||void 0===i?void 0:i[0];if(m){var f=m.querySelector(".error-message");f&&(f.textContent=v)}else{var h=document.getElementById(e),g=null==h?void 0:h.parentElement;if(g){(m=document.createElement("div")).className="error-container";var p=document.createElement("div");p.className="error-message",p.textContent=v,m.appendChild(p),g.append(m)}}clearInterval(E)}}),1e3)}export{T as a,f as b,u as c,d,v as e,h as g,M as h,m as o,g as p,D as s};
|
package/esm/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare function VLPlayerCore(): {
|
|
|
30
30
|
getVolume: (playerId: any) => string;
|
|
31
31
|
disableControls: (playerId: any) => void;
|
|
32
32
|
setPlaybackSpeed: (playerId: any, speed: any) => string;
|
|
33
|
-
getEntitlementData: (id: any, token: any, url: any, locationData: any) => Promise<import("axios").AxiosResponse<any, any
|
|
33
|
+
getEntitlementData: (id: any, token: any, url: any, locationData: any) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
34
34
|
getSsaiEvents: typeof getSsaiEvents;
|
|
35
35
|
getPlayerControlEvents: typeof getPlayerControlEvents;
|
|
36
36
|
playerEvents: typeof playerEvents;
|