@viewlift/player-backup 2.0.73-backup → 2.0.73-smartTv
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-1f49211b.js +1 -0
- package/cjs/autoNextVideo-50bf0bcb.js +1 -0
- package/cjs/autoNextVideo-836d16c3.js +1 -0
- package/cjs/autoNextVideo-fb6d3116.js +1 -0
- package/cjs/autoNextVideo-ff4a5872.js +1 -0
- package/cjs/browser-38ff3331.js +1 -0
- package/cjs/bundle.css +1591 -47
- package/cjs/caption-settings-5944a544.js +1 -0
- package/cjs/{captions-07bd3069.js → captions-3c7ca3a7.js} +1 -1
- package/cjs/features-43b5c4f0.js +1 -0
- package/cjs/features-48d14d21.js +1 -0
- package/cjs/features-9ff981d6.js +1 -0
- package/cjs/features-d5a19c52.js +1 -0
- package/cjs/features-e8393717.js +1 -0
- package/cjs/generic-270e0c0e.js +1 -0
- package/cjs/generic-9dbaac2c.js +1 -0
- package/cjs/generic-b8561129.js +1 -0
- package/cjs/generic-c3ef1a4c.js +1 -0
- package/cjs/generic-eff9f2d5.js +1 -0
- package/cjs/icons-0ea2e662.js +1 -0
- package/cjs/index-0243ab75.js +1 -0
- package/cjs/index-1b366d64.js +1 -0
- package/cjs/index-2414bf78.js +1 -0
- package/cjs/index-27816143.js +1 -0
- package/cjs/index-4282d6c8.js +1 -0
- package/cjs/index-7d0e79b0.js +1 -0
- package/cjs/index-7deb8e51.js +1 -0
- package/cjs/{index-84cce26a.js → index-8606834d.js} +1 -1
- package/cjs/index-952059d8.js +1 -0
- package/cjs/index-a5bc95df.js +1 -0
- package/cjs/index-f8f03b72.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-4152c3fb.js +1 -0
- package/cjs/multicamv2-4a03ff7a.js +1 -0
- package/cjs/multicamv2-59658c00.js +1 -0
- package/cjs/multicamv2-733a4c98.js +1 -0
- package/cjs/multicamv2-97f57710.js +1 -0
- package/cjs/multicamv2-afab5e59.js +1 -0
- package/cjs/multicamv2-b0297c16.js +1 -0
- package/cjs/multicamv2-e582b219.js +1 -0
- package/cjs/multicamv2-e60917aa.js +1 -0
- package/cjs/multicamv2-f25bdf97.js +1 -0
- package/cjs/nextEpisodeButton-2f8a5dcf.js +1 -0
- package/cjs/nextEpisodeButton-458c85bb.js +1 -0
- package/cjs/nextEpisodeButton-b62010fa.js +1 -0
- package/cjs/nextEpisodeButton-db512765.js +1 -0
- package/cjs/nextEpisodeButton-dbbf6459.js +1 -0
- package/cjs/playlist-261f3571.js +1 -0
- package/cjs/playlist-452d88c2.js +1 -0
- package/cjs/playlist-da8132ef.js +1 -0
- package/cjs/playlist-dc7fd81d.js +1 -0
- package/cjs/playlist-f6dc47d2.js +1 -0
- package/cjs/renditions-26c6d0df.js +1 -0
- package/cjs/resolution-5a0df2be.js +1 -0
- package/cjs/series-50af9773.js +1 -0
- package/cjs/series-5379adf3.js +1 -0
- package/cjs/series-62cf13d7.js +1 -0
- package/cjs/series-f93fa395.js +1 -0
- package/cjs/series-fa977c7b.js +1 -0
- package/cjs/series-v2-07ce65b0.js +1 -0
- package/cjs/series-v2-138050e8.js +1 -0
- package/cjs/series-v2-1540a570.js +1 -0
- package/cjs/series-v2-26fac2cb.js +1 -0
- package/cjs/series-v2-446ef683.js +1 -0
- package/cjs/series-v2-5db6fcc5.js +1 -0
- package/cjs/series-v2-a0ce7016.js +1 -0
- package/cjs/series-v2-aeb231ee.js +1 -0
- package/cjs/series-v2-dbf8f5c5.js +1 -0
- package/cjs/series-v2-f1dbee5e.js +1 -0
- package/cjs/settings-icon-12add1fe.js +1 -0
- package/cjs/skin-02cc96c7.js +1 -0
- package/cjs/skin-0d2d9d9c.js +1 -0
- package/cjs/skin-10e868b9.js +1 -0
- package/cjs/skin-11200134.js +1 -0
- package/cjs/skin-1fb711b8.js +1 -0
- package/cjs/skin-251297dc.js +1 -0
- package/cjs/skin-28e40e43.js +1 -0
- package/cjs/skin-3117b6f1.js +1 -0
- package/cjs/skin-3397dca5.js +1 -0
- package/cjs/skin-389e200a.js +1 -0
- package/cjs/skin-3bdd38e0.js +1 -0
- package/cjs/skin-3e832338.js +1 -0
- package/cjs/skin-408082dc.js +1 -0
- package/cjs/skin-4e3109f5.js +1 -0
- package/cjs/skin-5e026b9e.js +1 -0
- package/cjs/skin-5e6de97a.js +1 -0
- package/cjs/skin-62650b0f.js +1 -0
- package/cjs/skin-66bb1abb.js +1 -0
- package/cjs/skin-71bb1a0a.js +1 -0
- package/cjs/skin-7cd44fdf.js +1 -0
- package/cjs/skin-7de5dd6b.js +1 -0
- package/cjs/skin-88b9e5b1.js +1 -0
- package/cjs/skin-9319e6f5.js +1 -0
- package/cjs/skin-95078d13.js +1 -0
- package/cjs/skin-a4de7dc7.js +1 -0
- package/cjs/skin-a9258d0d.js +1 -0
- package/cjs/skin-b79a429d.js +1 -0
- package/cjs/skin-c02dde27.js +1 -0
- package/cjs/skin-c165b563.js +1 -0
- package/cjs/skin-d1c415fe.js +1 -0
- package/cjs/skin-d7cd2ac9.js +1 -0
- package/cjs/skin-db8f3b08.js +1 -0
- package/cjs/skin-e0505707.js +1 -0
- package/cjs/skin-eb1292bc.js +1 -0
- package/cjs/skin-f0dbcafa.js +1 -0
- package/cjs/skin-fc778d21.js +1 -0
- package/cjs/util-c1962d91.js +1 -0
- package/cjs/videoSelector-338918fc.js +1 -0
- package/cjs/videoSelector-3ab7f937.js +1 -0
- package/cjs/videoSelector-913574c8.js +1 -0
- package/cjs/videoSelector-9dba4d4f.js +1 -0
- package/cjs/videoSelector-bccb16ce.js +1 -0
- package/cjs/videoSelector-c371fba4.js +1 -0
- package/cjs/videoSelector-c8c41440.js +1 -0
- package/cjs/videoSelector-d6d0e1ae.js +1 -0
- package/cjs/videoSelector-e2c21c25.js +1 -0
- package/cjs/videoSelector-eea96e59.js +1 -0
- package/cjs/videojs-dash5.es-3cd3423d.js +1 -0
- package/esm/autoNextVideo-3f83b349.js +1 -0
- package/esm/autoNextVideo-63dbac74.js +1 -0
- package/esm/autoNextVideo-793707f8.js +1 -0
- package/esm/autoNextVideo-b51e19f4.js +1 -0
- package/esm/autoNextVideo-f6f0062e.js +1 -0
- package/esm/browser-512cd55a.js +1 -0
- package/esm/bundle.css +1591 -47
- package/esm/caption-settings-adcfbf9d.js +1 -0
- package/esm/{captions-b7fd8308.js → captions-7996e045.js} +1 -1
- package/esm/features-005cbf2c.js +1 -0
- package/esm/features-6746c29c.js +1 -0
- package/esm/features-b4c00ff4.js +1 -0
- package/esm/features-cc91a503.js +1 -0
- package/esm/features-e7e14dda.js +1 -0
- package/esm/generic-0d71c851.js +1 -0
- package/esm/generic-258d34e7.js +1 -0
- package/esm/generic-817644b6.js +1 -0
- package/esm/generic-9a919ba4.js +1 -0
- package/esm/generic-d14a701a.js +1 -0
- package/esm/{icons-8e47e640.js → icons-79ad4d7d.js} +1 -1
- package/esm/index-11827a9e.js +1 -0
- package/esm/index-2257f4dd.js +1 -0
- package/esm/index-5312b88e.js +1 -0
- package/esm/index-5c199c09.js +1 -0
- package/esm/index-6d959e99.js +1 -0
- package/esm/index-7b9ff142.js +1 -0
- package/esm/index-7e56199c.js +1 -0
- package/esm/index-9327e721.js +1 -0
- package/esm/index-b559de16.js +1 -0
- package/esm/index-c0023a66.js +1 -0
- package/esm/index-c4b6db11.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-0545a0ae.js +1 -0
- package/esm/multicamv2-1656a706.js +1 -0
- package/esm/multicamv2-170df815.js +1 -0
- package/esm/multicamv2-2b22eed0.js +1 -0
- package/esm/multicamv2-3cb2c96b.js +1 -0
- package/esm/multicamv2-469790c5.js +1 -0
- package/esm/multicamv2-7d0dc57f.js +1 -0
- package/esm/multicamv2-d637c59b.js +1 -0
- package/esm/multicamv2-fa150bd7.js +1 -0
- package/esm/multicamv2-fe3eda2b.js +1 -0
- package/esm/nextEpisodeButton-3bdc1a02.js +1 -0
- package/esm/nextEpisodeButton-4fe59bd5.js +1 -0
- package/esm/nextEpisodeButton-c6968fe4.js +1 -0
- package/esm/nextEpisodeButton-d18af0e3.js +1 -0
- package/esm/nextEpisodeButton-f3651707.js +1 -0
- package/esm/playlist-15c1cf5a.js +1 -0
- package/esm/playlist-1fc22b9e.js +1 -0
- package/esm/playlist-2131b25d.js +1 -0
- package/esm/playlist-3e586e91.js +1 -0
- package/esm/playlist-4f7cdb85.js +1 -0
- package/esm/{renditions-4c09c626.js → renditions-65794079.js} +1 -1
- package/esm/resolution-ed00f17a.js +1 -0
- package/esm/series-04163ae5.js +1 -0
- package/esm/series-093b9d99.js +1 -0
- package/esm/series-3d86f785.js +1 -0
- package/esm/series-dc5effb9.js +1 -0
- package/esm/series-e696078a.js +1 -0
- package/esm/series-v2-6ab87b3b.js +1 -0
- package/esm/series-v2-6beb4cc3.js +1 -0
- package/esm/series-v2-76fe35d9.js +1 -0
- package/esm/series-v2-7afbd3dc.js +1 -0
- package/esm/series-v2-7d2aef8f.js +1 -0
- package/esm/series-v2-837b160e.js +1 -0
- package/esm/series-v2-9b928249.js +1 -0
- package/esm/series-v2-aeb7ed74.js +1 -0
- package/esm/series-v2-dea9bcde.js +1 -0
- package/esm/series-v2-e0e817a0.js +1 -0
- package/esm/settings-icon-c670ad25.js +1 -0
- package/esm/skin-049e3470.js +1 -0
- package/esm/skin-0816e9e9.js +1 -0
- package/esm/skin-08b2a668.js +1 -0
- package/esm/skin-1ef7495f.js +1 -0
- package/esm/skin-287d98f0.js +1 -0
- package/esm/skin-367d2640.js +1 -0
- package/esm/skin-3688bf2d.js +1 -0
- package/esm/skin-374cfb40.js +1 -0
- package/esm/skin-48246846.js +1 -0
- package/esm/skin-49eb5647.js +1 -0
- package/esm/skin-4d7c7bee.js +1 -0
- package/esm/skin-5a4f7dff.js +1 -0
- package/esm/skin-61d92027.js +1 -0
- package/esm/skin-6290413d.js +1 -0
- package/esm/skin-6308bce9.js +1 -0
- package/esm/skin-68d81ff0.js +1 -0
- package/esm/skin-6f7eb9bb.js +1 -0
- package/esm/skin-6fb58468.js +1 -0
- package/esm/skin-77856587.js +1 -0
- package/esm/skin-7d9a1801.js +1 -0
- package/esm/skin-7f756cf9.js +1 -0
- package/esm/skin-8563e89f.js +1 -0
- package/esm/skin-8892d0cc.js +1 -0
- package/esm/skin-8e2c5488.js +1 -0
- package/esm/skin-9701a9b0.js +1 -0
- package/esm/skin-9b61d1eb.js +1 -0
- package/esm/skin-a9e96e66.js +1 -0
- package/esm/skin-ad92ef73.js +1 -0
- package/esm/skin-b56ca7dd.js +1 -0
- package/esm/skin-b64164a9.js +1 -0
- package/esm/skin-c3287a11.js +1 -0
- package/esm/skin-c360d3a7.js +1 -0
- package/esm/skin-d5e0b3e0.js +1 -0
- package/esm/skin-dfd47b2e.js +1 -0
- package/esm/skin-ec925239.js +1 -0
- package/esm/skin-f2961805.js +1 -0
- package/esm/util-389babb5.js +1 -0
- package/esm/videoSelector-05c05c24.js +1 -0
- package/esm/videoSelector-0e2a85dc.js +1 -0
- package/esm/videoSelector-16ae6e6d.js +1 -0
- package/esm/videoSelector-4230d7f6.js +1 -0
- package/esm/videoSelector-5275b274.js +1 -0
- package/esm/videoSelector-93165559.js +1 -0
- package/esm/videoSelector-ce7a4a33.js +1 -0
- package/esm/videoSelector-d4e66214.js +1 -0
- package/esm/videoSelector-e3a73107.js +1 -0
- package/esm/videoSelector-fc9959a8.js +1 -0
- package/esm/videojs-dash5.es-17cb6067.js +1 -0
- package/package.json +2 -2
- package/cjs/autoNextVideo-116ab67f.js +0 -1
- package/cjs/browser-77c57718.js +0 -1
- package/cjs/caption-settings-be714e97.js +0 -1
- package/cjs/features-f926b984.js +0 -1
- package/cjs/generic-5d13985a.js +0 -1
- package/cjs/icons-1a3febef.js +0 -1
- package/cjs/index-27c35ba0.js +0 -1
- package/cjs/index-af432026.js +0 -1
- package/cjs/multicamv2-032a9356.js +0 -1
- package/cjs/multicamv2-36e0036b.js +0 -1
- package/cjs/nextEpisodeButton-cb8fd535.js +0 -1
- package/cjs/playlist-938117f4.js +0 -1
- package/cjs/renditions-fed22c12.js +0 -1
- package/cjs/resolution-e46c9615.js +0 -1
- package/cjs/series-b7c2af54.js +0 -1
- package/cjs/series-v2-3730d400.js +0 -1
- package/cjs/series-v2-a5ecb6c1.js +0 -1
- package/cjs/settings-icon-70f8857a.js +0 -1
- package/cjs/skin-3544db58.js +0 -1
- package/cjs/skin-68f88a98.js +0 -1
- package/cjs/skin-ab7231d1.js +0 -1
- package/cjs/skin-da45780e.js +0 -1
- package/cjs/skin-df024bb6.js +0 -1
- package/cjs/skin-e9bbc533.js +0 -1
- package/cjs/skin-eb6cbd42.js +0 -1
- package/cjs/util-ef2cd61e.js +0 -1
- package/cjs/videoSelector-75b45ff6.js +0 -1
- package/cjs/videoSelector-84d35d1b.js +0 -1
- package/cjs/videojs_contrib_dash-018c8bde.js +0 -1
- package/esm/autoNextVideo-8a56130e.js +0 -1
- package/esm/browser-d4613b36.js +0 -1
- package/esm/caption-settings-4ab479b0.js +0 -1
- package/esm/features-19c286e3.js +0 -1
- package/esm/generic-7206a937.js +0 -1
- package/esm/index-5d92eaa3.js +0 -1
- package/esm/index-a8683500.js +0 -1
- package/esm/index-e01aa76c.js +0 -1
- package/esm/multicamv2-ac946873.js +0 -1
- package/esm/multicamv2-d897a809.js +0 -1
- package/esm/nextEpisodeButton-d0139827.js +0 -1
- package/esm/playlist-6dd08b34.js +0 -1
- package/esm/resolution-920515d1.js +0 -1
- package/esm/series-0c1abfff.js +0 -1
- package/esm/series-v2-c4017f00.js +0 -1
- package/esm/series-v2-c637397a.js +0 -1
- package/esm/settings-icon-366126fa.js +0 -1
- package/esm/skin-0c088b43.js +0 -1
- package/esm/skin-2d57e7a3.js +0 -1
- package/esm/skin-58b9263c.js +0 -1
- package/esm/skin-5af975a5.js +0 -1
- package/esm/skin-9b4c3e12.js +0 -1
- package/esm/skin-b5ddf30e.js +0 -1
- package/esm/skin-f613a5cf.js +0 -1
- package/esm/util-80257541.js +0 -1
- package/esm/videoSelector-25152c41.js +0 -1
- package/esm/videoSelector-26c81da3.js +0 -1
- package/esm/videojs_contrib_dash-f7d94714.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),i=require("video.js"),r=require("./icons-0ea2e662.js"),c=require("./captions-3c7ca3a7.js"),l=require("./skin-3397dca5.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}var d=i.getComponent("Component"),p=function(){function p(t){var o,i,r,c,l,d,u,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),l=this,u=[t,m],d=a(d=p),(c=n(l,s()?Reflect.construct(d,u||[],a(l).constructor):d.apply(l,u))).playerId=m.playerId,c.seriesData=m.sres,c.currentVideoData=m.res,c.initialiseStructure(),c.loadCSS(),null===(o=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===o||null===(i=o[0])||void 0===i||null===(r=i.style)||void 0===r||r.setProperty("display","none","important"),c}return o(p,d),t(p,[{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.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./caption-settings-34ca0188.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=c.getCaptions(this.playerId);null==t||t.map(function(t){return c.disableCaptions(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")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(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),l.detectOrientationChange(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(r.crossIconSvg())});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"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(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")),c.getCaptions(e.playerId).map(function(t){return c.disableCaptions(e.playerId,t.id)})},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=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==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);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}}])}();exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./skin-
|
|
1
|
+
"use strict";var t=require("./skin-3397dca5.js");exports.addCaptions=function(e,n){var a=t.getPlayer(e);a.remoteTextTracks().tracks_.map(function(t){a.removeRemoteTextTrack(t)}),n.map(function(t){a.addRemoteTextTrack({src:t.url,srcLang:t.language,label:t.language})})},exports.disableCaptions=function(e,n){for(var a=t.getPlayer(e).textTracks(),r=0;r<a.length;r++){var s=a[r];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!==n||(s.mode="hidden")}},exports.enableCaptions=function(e,n){var a,r,s;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(s=r.style)||void 0===s||s.setProperty("display","flex"));for(var i=t.getPlayer(e).textTracks(),l=0;l<i.length;l++){var o=i[l];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},exports.getCaptions=function(e){var n,a=t.getPlayer(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind}))||[]},exports.removeCaptions=function(e){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),l=require("video.js"),i=require("./generic-9dbaac2c.js"),a=require("./renditions-26c6d0df.js"),s=require("./skin-3397dca5.js"),d=require("./localisation-56e0a999.js");function u(e,t,o){return t=n(t),r(e,c()?Reflect.construct(t,o||[],n(e).constructor):t.apply(e,o))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-5944a544.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=s.getPlayer(e).el(),r=0,n=s.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-e582b219.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-afab5e59.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-2f8a5dcf.js")}).then(function(n){var o=n.default,i=s.getPlayer(r);l.registerComponent("nextEpisodeButtonModule",o),i.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},i.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=s.getPlayer(e).el(),n=l.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-da8132ef.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-5a0df2be.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var i=s.getPlayer(e),d=a.getRenditions(e);(null==d?void 0:d.length)>0&&(l.registerComponent("resolutionModule",o),i.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:d},i.controlBar.children().length-4))})},exports.addRewindButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-rewind-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.rewind(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-fa977c7b.js")}).then(function(n){var o=n.seriesModule,i=s.getPlayer(e);l.registerComponent("seriesModule",o),i.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},i.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),d=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,i,r)})},u=0;u<a.length;u++)d(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-5db6fcc5.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-dbf8f5c5.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-12add1fe.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-skip-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.skip(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(r){var n=function(r){function n(t,r){var o;e(this,n);var l=(o=u(this,n,[t,r])).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",o}return o(n,r),t(n,[{key:"handleClick",value:function(){1==i.playbackRate()?(i.playbackRate(.5),this.el().style.background="darkgray"):(i.playbackRate(1),this.el().style.background="none")}}])}(l.getComponent("Button"));l.registerComponent("MyButton",n);var i=l(r);i.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-c8c41440.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-eea96e59.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),l=require("video.js"),i=require("./generic-b8561129.js"),a=require("./renditions-26c6d0df.js"),s=require("./skin-3397dca5.js"),d=require("./localisation-56e0a999.js");function u(e,t,o){return t=n(t),r(e,c()?Reflect.construct(t,o||[],n(e).constructor):t.apply(e,o))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-5944a544.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=s.getPlayer(e).el(),r=0,n=s.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-f25bdf97.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-4a03ff7a.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-dbbf6459.js")}).then(function(n){var o=n.default,i=s.getPlayer(r);l.registerComponent("nextEpisodeButtonModule",o),i.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},i.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=s.getPlayer(e).el(),n=l.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-261f3571.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-5a0df2be.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var i=s.getPlayer(e),d=a.getRenditions(e);(null==d?void 0:d.length)>0&&(l.registerComponent("resolutionModule",o),i.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:d},i.controlBar.children().length-4))})},exports.addRewindButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-rewind-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.rewind(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-5379adf3.js")}).then(function(n){var o=n.seriesModule,i=s.getPlayer(e);l.registerComponent("seriesModule",o),i.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},i.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),d=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,i,r)})},u=0;u<a.length;u++)d(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-f1dbee5e.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-aeb231ee.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-12add1fe.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-skip-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.skip(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(r){var n=function(r){function n(t,r){var o;e(this,n);var l=(o=u(this,n,[t,r])).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",o}return o(n,r),t(n,[{key:"handleClick",value:function(){1==i.playbackRate()?(i.playbackRate(.5),this.el().style.background="darkgray"):(i.playbackRate(1),this.el().style.background="none")}}])}(l.getComponent("Button"));l.registerComponent("MyButton",n);var i=l(r);i.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-9dba4d4f.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-3ab7f937.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),l=require("video.js"),i=require("./generic-eff9f2d5.js"),a=require("./renditions-26c6d0df.js"),s=require("./skin-3397dca5.js"),d=require("./localisation-56e0a999.js");function u(e,t,o){return t=n(t),r(e,c()?Reflect.construct(t,o||[],n(e).constructor):t.apply(e,o))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-5944a544.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=s.getPlayer(e).el(),r=0,n=s.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-b0297c16.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-4152c3fb.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-458c85bb.js")}).then(function(n){var o=n.default,i=s.getPlayer(r);l.registerComponent("nextEpisodeButtonModule",o),i.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},i.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=s.getPlayer(e).el(),n=l.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-f6dc47d2.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-5a0df2be.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var i=s.getPlayer(e),d=a.getRenditions(e);(null==d?void 0:d.length)>0&&(l.registerComponent("resolutionModule",o),i.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:d},i.controlBar.children().length-4))})},exports.addRewindButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-rewind-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.rewind(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-f93fa395.js")}).then(function(n){var o=n.seriesModule,i=s.getPlayer(e);l.registerComponent("seriesModule",o),i.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},i.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),d=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,i,r)})},u=0;u<a.length;u++)d(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-446ef683.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-138050e8.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-12add1fe.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-skip-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.skip(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(r){var n=function(r){function n(t,r){var o;e(this,n);var l=(o=u(this,n,[t,r])).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",o}return o(n,r),t(n,[{key:"handleClick",value:function(){1==i.playbackRate()?(i.playbackRate(.5),this.el().style.background="darkgray"):(i.playbackRate(1),this.el().style.background="none")}}])}(l.getComponent("Button"));l.registerComponent("MyButton",n);var i=l(r);i.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-338918fc.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-e2c21c25.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),l=require("video.js"),i=require("./generic-270e0c0e.js"),a=require("./renditions-26c6d0df.js"),s=require("./skin-3397dca5.js"),d=require("./localisation-56e0a999.js");function u(e,t,o){return t=n(t),r(e,c()?Reflect.construct(t,o||[],n(e).constructor):t.apply(e,o))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-5944a544.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=s.getPlayer(e).el(),r=0,n=s.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-97f57710.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-e60917aa.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-b62010fa.js")}).then(function(n){var o=n.default,i=s.getPlayer(r);l.registerComponent("nextEpisodeButtonModule",o),i.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},i.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=s.getPlayer(e).el(),n=l.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-452d88c2.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-5a0df2be.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var i=s.getPlayer(e),d=a.getRenditions(e);(null==d?void 0:d.length)>0&&(l.registerComponent("resolutionModule",o),i.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:d},i.controlBar.children().length-4))})},exports.addRewindButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-rewind-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.rewind(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-62cf13d7.js")}).then(function(n){var o=n.seriesModule,i=s.getPlayer(e);l.registerComponent("seriesModule",o),i.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},i.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),d=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,i,r)})},u=0;u<a.length;u++)d(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-1540a570.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-a0ce7016.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-12add1fe.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-skip-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.skip(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(r){var n=function(r){function n(t,r){var o;e(this,n);var l=(o=u(this,n,[t,r])).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",o}return o(n,r),t(n,[{key:"handleClick",value:function(){1==i.playbackRate()?(i.playbackRate(.5),this.el().style.background="darkgray"):(i.playbackRate(1),this.el().style.background="none")}}])}(l.getComponent("Button"));l.registerComponent("MyButton",n);var i=l(r);i.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-d6d0e1ae.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-bccb16ce.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/inherits"),l=require("video.js"),i=require("./generic-c3ef1a4c.js"),a=require("./renditions-26c6d0df.js"),s=require("./skin-3397dca5.js"),d=require("./localisation-56e0a999.js");function u(e,t,o){return t=n(t),r(e,c()?Reflect.construct(t,o||[],n(e).constructor):t.apply(e,o))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-5944a544.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=s.getPlayer(e).el(),r=0,n=s.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-59658c00.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-733a4c98.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-db512765.js")}).then(function(n){var o=n.default,i=s.getPlayer(r);l.registerComponent("nextEpisodeButtonModule",o),i.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},i.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=s.getPlayer(e).el(),n=l.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-dc7fd81d.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-5a0df2be.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var i=s.getPlayer(e),d=a.getRenditions(e);(null==d?void 0:d.length)>0&&(l.registerComponent("resolutionModule",o),i.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:d},i.controlBar.children().length-4))})},exports.addRewindButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-rewind-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.rewind(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-50af9773.js")}).then(function(n){var o=n.seriesModule,i=s.getPlayer(e);l.registerComponent("seriesModule",o),i.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},i.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),d=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,i,r)})},u=0;u<a.length;u++)d(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-07ce65b0.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-26fac2cb.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",Object.assign({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-12add1fe.js")}).then(function(r){var n,o,i,a,d=r.default,u=s.getPlayer(e);l.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(i=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===i||null===(a=i[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(r,n,a){var d=function(n){function l(t,r){var n;e(this,l);var o=(n=u(this,l,[t,r])).el_;o.classList.add("vjs-skip-button");var i=s.parseSvgString(a);return o.append(i),n}return o(l,n),t(l,[{key:"handleClick",value:function(){i.skip(r,10)}}])}(l.getComponent("Button"));l.registerComponent("MyButton",d),l(r).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(r){var n=function(r){function n(t,r){var o;e(this,n);var l=(o=u(this,n,[t,r])).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",o}return o(n,r),t(n,[{key:"handleClick",value:function(){1==i.playbackRate()?(i.playbackRate(.5),this.el().style.background="darkgray"):(i.playbackRate(1),this.el().style.background="none")}}])}(l.getComponent("Button"));l.registerComponent("MyButton",n);var i=l(r);i.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-913574c8.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-c371fba4.js")}).then(function(r){var n=r.default,o=s.getPlayer(e);l.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),n=require("video.js"),i=require("axios"),o=require("./skin-3397dca5.js"),r=require("./browser-38ff3331.js"),l=require("js-cookie"),a=require("ua-parser-js"),d=require("./captions-3c7ca3a7.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function u(e,t){s("event",e,t)}var c={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"},v={name:"@viewlift/player-backup",version:"2.0.71-smartTv",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","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"},browserslist:["chrome > 38, safari > 7"]};window.vl_player_version=v.version;var m,f=function(e,t){var n,o,r,l,a,d,s,u;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(u=s.customData)||void 0===u?void 0:u.overrideEntitlementBaseUrl)+"/video/status":E.get()+"".concat(null==c?void 0:c.getVideoDetails),params:Object.assign({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":v.version},withCredentials:!0})},p=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:E.get()+c.getLinearChannelDetails,params:Object.assign({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId},(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId},(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle},(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},g=function(){var n=e(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return o=e.sent,e.abrupt("return",i({url:E.get()+"".concat(null==c?void 0:c.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:Object.assign({},n),params:Object.assign({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),I=function(e,t){var n,o,r=window.contentType;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var t=e.videoId;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},E=(m=null==c?void 0:c.apiBaseUrl,{set:function(e){e&&(m=e)},get:function(){return m}}),T=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},h=null;function _(){return{set:function(e){e&&(h=e)},get:function(){return h}}}var y,b,F,D,L,V,R=function(){var n=e(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=_().get(),o=E.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return n.apply(this,arguments)}}(),S=null,W=function(){var n=e(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"))||!T(n)){e.next=6;break}return S||(S=R().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&_().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){S=null})),e.abrupt("return",S);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return n.apply(this,arguments)}}(),O=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){b=e},C=function(){return b},P=function(){return y},A=function(e){F=e},N=function(e){if(D){var t=D.get(e);A(t+1)}},B=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}}),M=0,U=function(){var e,t,n,i,o,r,l,a=C();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function j(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function k(){var e=window.sessionStorage.getItem("uid");return e||(e=j(),window.sessionStorage.setItem("uid",e),e)}function H(){return G.apply(this,arguments)}function G(){return(G=e(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();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)}function z(e){return e?String(e):""}window.initialise=function(e){window.sid=j(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,u(r?"FAILED_TO_START":"DROPPED_STREAM",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),u("PLAY",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":U(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&M<4)M++,u("BUFFERING",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,u("FIRST_FRAME",Object.assign({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;u("AD_REQUEST",Object.assign({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),u("AD_IMPRESSION",Object.assign({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:U()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(M=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Y(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Y=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var n=e(t.mark(function e(n){var o,r,l,a,d,s,u,v,m,f,p,g,I,w,T,h,_,y,b,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return h=e.sent,_=O(h),y=null==_?void 0:_.site,b=null==_?void 0:_.siteId,e.t0=Object,e.t1={aid:y,cid:b,pfm:window.platform},e.t2=null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params,e.t3=k(),e.t4=U(),e.t5=n.url||document.location.href,e.t6=n.ref||document.referrer,e.t7=n.eventName,e.t8=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t9=window.environment,e.t10=n.dp1||"",e.t11=n.dp2||"",e.t12=n.dp3||"",e.t13=n.dp4||"",e.t14=n.dp5||"",e.t15=!0===n.isAdEvent?n.videoPosition:null,e.t16=!0===n.isAdEvent?z(n.adPosition):"",e.next=25,H();case 25:e.t17=e.sent,e.t18=n.playerType||"native",e.t19=n.mediaType||"VIDEO",e.t20=window.sid,e.t21=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t22=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t23=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t24=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t25=null!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t26={uid:e.t3,vid:e.t4,url:e.t5,ref:e.t6,pa:e.t7,vpos:e.t8,environment:e.t9,dp1:e.t10,dp2:e.t11,dp3:e.t12,dp4:e.t13,dp5:e.t14,apos:e.t15,apod:e.t16,profid:e.t17,player:e.t18,media_type:e.t19,stream_id:e.t20,embedurl:"",ttfirstframe:e.t21,bitrate:e.t22,connectionspeed:null,resolutionheight:e.t23,resolutionwidth:e.t24,bufferhealth:e.t25},e.t27=(null==n?void 0:n.duration)&&{duration:n.duration},e.t28=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t29=e.t0.assign.call(e.t0,e.t1,e.t2,e.t26,e.t27,e.t28),F=[e.t29],i({url:(null===(I=window)||void 0===I||null===(w=I.customData)||void 0===w||null===(T=w.beacon)||void 0===T?void 0:T.url)||E.get()+c.getBeaconUrl,method:"post",headers:{Authorization:h},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 40:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var q=function(){var e=B.get();return e>=0?e+1:1},X=function(){var e,t,n,i=P(),o=C(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=B.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};window._deviceInfo=a.UAParser(navigator.userAgent);var J=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},K=function(e){var t=Q(e,"video.tags",[]),n=Q(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},Q=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Z=function(){var e,t,n,i,r,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,_,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0,D=(null==F?void 0:F.siteName)||"",L=(null==F?void 0:F.contentType)||"video",V=(null==F||null===(e=F[L])||void 0===e?void 0:e.metadata)||(null==F||null===(t=F[L])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),R=o.getPlayer(b);if(!y.includes("VIEWLIFT_"))return y;var S,W=window.getComputedStyle(document.getElementById(b),null),O=Math.trunc(W.getPropertyValue("height").slice(0,-2)),x=Math.trunc(W.getPropertyValue("width").slice(0,-2)),C="linearchannel"===L?null==F||null===(i=F.linearchannel)||void 0===i||null===(r=i.channels)||void 0===r||null===(a=r.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===a||null===(d=a.content)||void 0===d?void 0:d.id:Q(F,"video.gist.id",""),P="linearchannel"===L?null==F||null===(s=F.linearchannel)||void 0===s||null===(u=s.channels)||void 0===u||null===(c=u.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===c?void 0:c.title:Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),A=null,N=null;"function"==typeof window.__gpp&&(null===(S=window)||void 0===S||S.__gpp("ping",function(e){A=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=Object.assign({},$(V),{VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:J(x,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Q(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(m=R.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(f=R.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:K(F),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Q(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Q(null===(p=window)||void 0===p||null===(g=p.app_data)||void 0===g||null===(I=g.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":Q(null===(w=window)||void 0===w||null===(E=w.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:P,VIEWLIFT_CONTENT_SERIES_TITLE:Q(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Q(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:X(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:K(F),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:A||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(_=h.customData)||void 0===_?void 0:_.macros);for(var M in B){var U=new RegExp(M,"g");y=y.replace(U,B[M])}return y},$=function(e){var t,n,i,o,l,a,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return ee(s);var s={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(d=a.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(r.isMobile()?c?s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):c?s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),c?s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),s=r.isMobile()?Object.assign({},s,{VIEWLIFT_PROF:u.get("prof.mweb")||""}):Object.assign({},s,{VIEWLIFT_PROF:u.get("prof.web")||""})):(s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),s=r.isMobile()?Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),s=Object.assign({},s,{VIEWLIFT_AFID:u.get("afid")})},ee=function(e){var t,n,i,o,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,u=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return(s||u)&&(u?(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.tve")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.dtc")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""}))),a},te=function(e){var t=null;try{var n,i,o,r,l,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,_,y,b,F,D,L,V,R,S;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(E=e.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(h=T.adTags)||void 0===h||null===(_=h.samsung_tv)||void 0===_?void 0:_.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(s=d.adTags)&&void 0!==s&&null!==(u=s.lg_tv)&&void 0!==u&&u.active){var W,O,x,C;t=null==e||null===(W=e.ads)||void 0===W||null===(O=W.preRoll)||void 0===O||null===(x=O.adTags)||void 0===x||null===(C=x.lg_tv)||void 0===C?void 0:C.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var P,A,N,B;t=null==e||null===(P=e.ads)||void 0===P||null===(A=P.preRoll)||void 0===A||null===(N=A.adTags)||void 0===N||null===(B=N.vizioTv)||void 0===B?void 0:B.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(g=p.preRoll)&&void 0!==g&&null!==(I=g.adTags)&&void 0!==I&&null!==(w=I.xbox)&&void 0!==w&&w.active){var M,U,j,k;t=null==e||null===(M=e.ads)||void 0===M||null===(U=M.preRoll)||void 0===U||null===(j=U.adTags)||void 0===j||null===(k=j.xbox)||void 0===k?void 0:k.url}}else t=(null==e||null===(y=e.ads)||void 0===y||null===(b=y.preRoll)||void 0===b||null===(F=b.adTags)||void 0===F||null===(D=F.web)||void 0===D?void 0:D.active)&&(null==e||null===(L=e.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(R=V.adTags)||void 0===R||null===(S=R.web)||void 0===S?void 0:S.url)}catch(e){}return t},ne=function(e,t){var n,i,o,l,a,d,s,u,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[g])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(l=e[g])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return oe(E);if(I){var _=re(w,t);return _.src=Z(_.src,t,e),_}if("Safari"!==r.detectBrowser()&&h)return ie(w);if(T){var y=oe(w);return y.src=Z(y.src,t,e),y}if(null!=w&&w.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return b.src=Z(b.src,t,e),b}return null},ie=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},oe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},re=function(e,t){var i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=r.detectBrowser();if(o.getPlayer(t),"Safari"===d){var s=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,i){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(o,function(e,t,n){console.log(e),e&&i(e),i(null,new Uint8Array(n))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,i,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(i);return le(t),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(le(t),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var le=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==r.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ae=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},de=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=!1,ue=function(e,t,n){var i=Z(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,l=o.getPlayer(e);if(null!==l.el_){se=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}},ce=function(e){return!!n.getPlayer("".concat(e))},ve=function(){var n=e(t.mark(function e(n,i){var r,l,a,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>2&&void 0!==d[2]&&d[2],e.next=3,W();case 3:return l=e.sent,a=o.getPlayer(n),e.abrupt("return",new Promise(function(e,t){p(i,l).then(function(t){var o=null==t?void 0:t.data;window.sid=j(),o.contentType="linearchannel",o.channelId=null==i?void 0:i.channelId;var l=ne(o,n);x(o),l&&r?(pe(n,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:o})})):e({status:!0,msg:"Feed authenticated",response:o})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),me=function(){var n=e(t.mark(function e(n,i){var r,l,a,s,u,c,v=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=v.length>2&&void 0!==v[2]?v[2]:null){e.next=5;break}return e.next=4,W();case 4:s=e.sent;case 5:return(P()||null)&&N(i),u=0,c=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&I(i,s).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,c=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){f(i,s).then(function(i){var r,l,a=null==i?void 0:i.data,s=(null==a||null===(r=a.video)||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var v=te(a);v&&ue(n,v,a);var m=ne(a,n);if(m){var f,p,g,I,w,E,T,h,_,y,b,F,D,L,V=(null==a||null===(f=a.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.videoImageUrl)||(null==a||null===(g=a.video)||void 0===g||null===(I=g.gist)||void 0===I||null===(w=I.imageGist)||void 0===w?void 0:w.r16x9),R=o.getPlayer(n);if(R.poster(V),pe(n,m),R.on("loadstart",function(){s&&e({status:!0,msg:"Video Loaded",response:a})}),R.on("loadeddata",function(){de(),e({status:!0,msg:"Video Loaded",response:a})}),R.one("play",function(){u&&c<95&&setTimeout(function(){R.currentTime(u)},0)}),R.one("error",function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(E=a.video)||void 0===E||null===(T=E.contentDetails)||void 0===T||null===(h=T.closedCaptions)||void 0===h?void 0:h.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(y=_.closedCaptions)||void 0===y?void 0:y.length)>0)b=((null==a||null===(F=a.video)||void 0===F||null===(D=F.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),d.addCaptions(n,b);else d.removeCaptions(n)}else ae(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ge(e,n,t,i)})}));case 11:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),fe=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()},pe=function(e,t){var n=o.getPlayer(e);n&&n.src(t)},ge=function(e,t,n,i){var o,r,l,a,d,s,u=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,c=(null==e||null===(l=e.response)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.errorMessage)||(null==e?void 0:e.message);ce(t)&&ae(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[u])||"".concat(c)),n&&n(Object.assign({status:!1,response:e,msg:"".concat(c)},i&&{videoId:i}))};exports.authenticateLC=ve,exports.baseUrlManager=E,exports.clearError=de,exports.createIdxMapping=function(e){D=new Map,e.map(function(e,t){D.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;w({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),L=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=o.getPlayer(e);if(fe(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getAdsURL=te,exports.getCurrentSeries=P,exports.getCurrentVideo=C,exports.getDecodedToken=O,exports.getEntitlementData=function(e,t,n,o){return i({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=X,exports.getLinearChannelDetails=p,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,t){var n,o,r=O(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):i({url:E.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=w,exports.getSeriesWatchMap=function(){return L},exports.getSource=ne,exports.getToken=W,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=k,exports.getVideoDetails=f,exports.getVideoIdx=function(){return F},exports.getVideoInfo=I,exports.handleError=ae,exports.initialiseAdvertisement=ue,exports.initiateErrorHandling=ge,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=o.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return n(e).paused()},exports.isPlayerInitialised=ce,exports.isTokenExpired=T,exports.load=me,exports.loadVideo=pe,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){n(e).pause()},exports.play=function(e){n(e).play()},exports.refreshTokenManager=_,exports.replaceMacros=Z,exports.rewind=function(e,t){var i=n(e),o=i.currentTime(),r=o<=t?0:o-t;i.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=g,exports.seasonIdxManager=B,exports.setCurrentSeries=function(e){y=e},exports.setCurrentVideo=x,exports.setVideoIdx=A,exports.setVideoIdxById=N,exports.skip=function(e,t){var i=n(e),o=i.currentTime()+t;i.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),n=require("video.js"),i=require("axios"),o=require("./skin-3397dca5.js"),r=require("./browser-38ff3331.js"),l=require("js-cookie"),a=require("ua-parser-js"),d=require("./captions-3c7ca3a7.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function u(e,t){s("event",e,t)}var c={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"},v={name:"@viewlift/player-backup",version:"2.0.72-smartTv",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","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"},browserslist:["chrome > 38, safari > 7"]};window.vl_player_version=v.version;var m,f=function(e,t){var n,o,r,l,a,d,s,u;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(u=s.customData)||void 0===u?void 0:u.overrideEntitlementBaseUrl)+"/video/status":E.get()+"".concat(null==c?void 0:c.getVideoDetails),params:Object.assign({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":v.version},withCredentials:!0})},p=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:E.get()+c.getLinearChannelDetails,params:Object.assign({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId},(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId},(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle},(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},g=function(){var n=e(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return o=e.sent,e.abrupt("return",i({url:E.get()+"".concat(null==c?void 0:c.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:Object.assign({},n),params:Object.assign({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),I=function(e,t){var n,o,r=window.contentType;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var t=e.videoId;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},E=(m=null==c?void 0:c.apiBaseUrl,{set:function(e){e&&(m=e)},get:function(){return m}}),T=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},h=null;function _(){return{set:function(e){e&&(h=e)},get:function(){return h}}}var y,b,F,D,L,V,R=function(){var n=e(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=_().get(),o=E.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return n.apply(this,arguments)}}(),S=null,W=function(){var n=e(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"))||!T(n)){e.next=6;break}return S||(S=R().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&_().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){S=null})),e.abrupt("return",S);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return n.apply(this,arguments)}}(),O=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){b=e},C=function(){return b},P=function(){return y},A=function(e){F=e},N=function(e){if(D){var t=D.get(e);A(t+1)}},B=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}}),M=0,U=function(){var e,t,n,i,o,r,l,a=C();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function j(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function k(){var e=window.sessionStorage.getItem("uid");return e||(e=j(),window.sessionStorage.setItem("uid",e),e)}function H(){return G.apply(this,arguments)}function G(){return(G=e(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();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)}function z(e){return e?String(e):""}window.initialise=function(e){window.sid=j(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,u(r?"FAILED_TO_START":"DROPPED_STREAM",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),u("PLAY",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":U(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&M<4)M++,u("BUFFERING",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,u("FIRST_FRAME",Object.assign({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;u("AD_REQUEST",Object.assign({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),u("AD_IMPRESSION",Object.assign({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:U()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(M=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Y(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Y=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var n=e(t.mark(function e(n){var o,r,l,a,d,s,u,v,m,f,p,g,I,w,T,h,_,y,b,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return h=e.sent,_=O(h),y=null==_?void 0:_.site,b=null==_?void 0:_.siteId,e.t0=Object,e.t1={aid:y,cid:b,pfm:window.platform},e.t2=null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params,e.t3=k(),e.t4=U(),e.t5=n.url||document.location.href,e.t6=n.ref||document.referrer,e.t7=n.eventName,e.t8=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t9=window.environment,e.t10=n.dp1||"",e.t11=n.dp2||"",e.t12=n.dp3||"",e.t13=n.dp4||"",e.t14=n.dp5||"",e.t15=!0===n.isAdEvent?n.videoPosition:null,e.t16=!0===n.isAdEvent?z(n.adPosition):"",e.next=25,H();case 25:e.t17=e.sent,e.t18=n.playerType||"native",e.t19=n.mediaType||"VIDEO",e.t20=window.sid,e.t21=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t22=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t23=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t24=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t25=null!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t26={uid:e.t3,vid:e.t4,url:e.t5,ref:e.t6,pa:e.t7,vpos:e.t8,environment:e.t9,dp1:e.t10,dp2:e.t11,dp3:e.t12,dp4:e.t13,dp5:e.t14,apos:e.t15,apod:e.t16,profid:e.t17,player:e.t18,media_type:e.t19,stream_id:e.t20,embedurl:"",ttfirstframe:e.t21,bitrate:e.t22,connectionspeed:null,resolutionheight:e.t23,resolutionwidth:e.t24,bufferhealth:e.t25},e.t27=(null==n?void 0:n.duration)&&{duration:n.duration},e.t28=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t29=e.t0.assign.call(e.t0,e.t1,e.t2,e.t26,e.t27,e.t28),F=[e.t29],i({url:(null===(I=window)||void 0===I||null===(w=I.customData)||void 0===w||null===(T=w.beacon)||void 0===T?void 0:T.url)||E.get()+c.getBeaconUrl,method:"post",headers:{Authorization:h},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 40:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var q=function(){var e=B.get();return e>=0?e+1:1},X=function(){var e,t,n,i=P(),o=C(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=B.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};window._deviceInfo=a.UAParser(navigator.userAgent);var J=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},K=function(e){var t=Q(e,"video.tags",[]),n=Q(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},Q=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Z=function(){var e,t,n,i,r,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,_,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0,D=(null==F?void 0:F.siteName)||"",L=(null==F?void 0:F.contentType)||"video",V=(null==F||null===(e=F[L])||void 0===e?void 0:e.metadata)||(null==F||null===(t=F[L])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),R=o.getPlayer(b);if(!y.includes("VIEWLIFT_"))return y;var S,W=window.getComputedStyle(document.getElementById(b),null),O=Math.trunc(W.getPropertyValue("height").slice(0,-2)),x=Math.trunc(W.getPropertyValue("width").slice(0,-2)),C="linearchannel"===L?null==F||null===(i=F.linearchannel)||void 0===i||null===(r=i.channels)||void 0===r||null===(a=r.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===a||null===(d=a.content)||void 0===d?void 0:d.id:Q(F,"video.gist.id",""),P="linearchannel"===L?null==F||null===(s=F.linearchannel)||void 0===s||null===(u=s.channels)||void 0===u||null===(c=u.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===c?void 0:c.title:Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),A=null,N=null;"function"==typeof window.__gpp&&(null===(S=window)||void 0===S||S.__gpp("ping",function(e){A=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=Object.assign({},$(V),{VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:J(x,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Q(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(m=R.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(f=R.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:K(F),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Q(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Q(null===(p=window)||void 0===p||null===(g=p.app_data)||void 0===g||null===(I=g.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":Q(null===(w=window)||void 0===w||null===(E=w.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:P,VIEWLIFT_CONTENT_SERIES_TITLE:Q(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Q(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:X(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:K(F),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:A||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(_=h.customData)||void 0===_?void 0:_.macros);for(var M in B){var U=new RegExp(M,"g");y=y.replace(U,B[M])}return y},$=function(e){var t,n,i,o,l,a,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return ee(s);var s={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(d=a.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(r.isMobile()?c?s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):c?s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),c?s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),s=r.isMobile()?Object.assign({},s,{VIEWLIFT_PROF:u.get("prof.mweb")||""}):Object.assign({},s,{VIEWLIFT_PROF:u.get("prof.web")||""})):(s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),s=r.isMobile()?Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),s=Object.assign({},s,{VIEWLIFT_AFID:u.get("afid")})},ee=function(e){var t,n,i,o,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,u=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return(s||u)&&(u?(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.tve")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.dtc")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""}))),a},te=function(e){var t=null;try{var n,i,o,r,l,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,_,y,b,F,D,L,V,R,S;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(E=e.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(h=T.adTags)||void 0===h||null===(_=h.samsung_tv)||void 0===_?void 0:_.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(s=d.adTags)&&void 0!==s&&null!==(u=s.lg_tv)&&void 0!==u&&u.active){var W,O,x,C;t=null==e||null===(W=e.ads)||void 0===W||null===(O=W.preRoll)||void 0===O||null===(x=O.adTags)||void 0===x||null===(C=x.lg_tv)||void 0===C?void 0:C.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var P,A,N,B;t=null==e||null===(P=e.ads)||void 0===P||null===(A=P.preRoll)||void 0===A||null===(N=A.adTags)||void 0===N||null===(B=N.vizioTv)||void 0===B?void 0:B.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(g=p.preRoll)&&void 0!==g&&null!==(I=g.adTags)&&void 0!==I&&null!==(w=I.xbox)&&void 0!==w&&w.active){var M,U,j,k;t=null==e||null===(M=e.ads)||void 0===M||null===(U=M.preRoll)||void 0===U||null===(j=U.adTags)||void 0===j||null===(k=j.xbox)||void 0===k?void 0:k.url}}else t=(null==e||null===(y=e.ads)||void 0===y||null===(b=y.preRoll)||void 0===b||null===(F=b.adTags)||void 0===F||null===(D=F.web)||void 0===D?void 0:D.active)&&(null==e||null===(L=e.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(R=V.adTags)||void 0===R||null===(S=R.web)||void 0===S?void 0:S.url)}catch(e){}return t},ne=function(e,t){var n,i,o,l,a,d,s,u,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[g])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(l=e[g])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return oe(E);if(I){var _=re(w,t);return _.src=Z(_.src,t,e),_}if("Safari"!==r.detectBrowser()&&h)return ie(w);if(T){var y=oe(w);return y.src=Z(y.src,t,e),y}if(null!=w&&w.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return b.src=Z(b.src,t,e),b}return null},ie=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},oe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},re=function(e,t){var i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=r.detectBrowser();if(o.getPlayer(t),"Safari"===d){var s=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,i){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(o,function(e,t,n){console.log(e),e&&i(e),i(null,new Uint8Array(n))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,i,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(i);return le(t),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(le(t),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var le=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==r.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ae=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},de=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=!1,ue=function(e,t,n){var i=Z(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,l=o.getPlayer(e);if(null!==l.el_){se=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}},ce=function(e){return!!n.getPlayer("".concat(e))},ve=function(){var n=e(t.mark(function e(n,i){var r,l,a,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>2&&void 0!==d[2]&&d[2],e.next=3,W();case 3:return l=e.sent,a=o.getPlayer(n),e.abrupt("return",new Promise(function(e,t){p(i,l).then(function(t){var o=null==t?void 0:t.data;window.sid=j(),o.contentType="linearchannel",o.channelId=null==i?void 0:i.channelId;var l=ne(o,n);x(o),l&&r?(pe(n,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:o})})):e({status:!0,msg:"Feed authenticated",response:o})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),me=function(){var n=e(t.mark(function e(n,i){var r,l,a,s,u,c,v=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=v.length>2&&void 0!==v[2]?v[2]:null){e.next=5;break}return e.next=4,W();case 4:s=e.sent;case 5:return(P()||null)&&N(i),u=0,c=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&I(i,s).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,c=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){f(i,s).then(function(i){var r,l,a=null==i?void 0:i.data,s=(null==a||null===(r=a.video)||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var v=te(a);v&&ue(n,v,a);var m=ne(a,n);if(m){var f,p,g,I,w,E,T,h,_,y,b,F,D,L,V=(null==a||null===(f=a.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.videoImageUrl)||(null==a||null===(g=a.video)||void 0===g||null===(I=g.gist)||void 0===I||null===(w=I.imageGist)||void 0===w?void 0:w.r16x9),R=o.getPlayer(n);if(R.poster(V),pe(n,m),R.on("loadstart",function(){s&&e({status:!0,msg:"Video Loaded",response:a})}),R.on("loadeddata",function(){de(),e({status:!0,msg:"Video Loaded",response:a})}),R.one("play",function(){u&&c<95&&setTimeout(function(){R.currentTime(u)},0)}),R.one("error",function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(E=a.video)||void 0===E||null===(T=E.contentDetails)||void 0===T||null===(h=T.closedCaptions)||void 0===h?void 0:h.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(y=_.closedCaptions)||void 0===y?void 0:y.length)>0)b=((null==a||null===(F=a.video)||void 0===F||null===(D=F.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),d.addCaptions(n,b);else d.removeCaptions(n)}else ae(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ge(e,n,t,i)})}));case 11:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),fe=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()},pe=function(e,t){var n=o.getPlayer(e);n&&n.src(t)},ge=function(e,t,n,i){var o,r,l,a,d,s,u=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,c=(null==e||null===(l=e.response)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.errorMessage)||(null==e?void 0:e.message);ce(t)&&ae(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[u])||"".concat(c)),n&&n(Object.assign({status:!1,response:e,msg:"".concat(c)},i&&{videoId:i}))};exports.authenticateLC=ve,exports.baseUrlManager=E,exports.clearError=de,exports.createIdxMapping=function(e){D=new Map,e.map(function(e,t){D.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;w({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),L=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=o.getPlayer(e);if(fe(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getAdsURL=te,exports.getCurrentSeries=P,exports.getCurrentVideo=C,exports.getDecodedToken=O,exports.getEntitlementData=function(e,t,n,o){return i({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=X,exports.getLinearChannelDetails=p,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,t){var n,o,r=O(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):i({url:E.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=w,exports.getSeriesWatchMap=function(){return L},exports.getSource=ne,exports.getToken=W,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=k,exports.getVideoDetails=f,exports.getVideoIdx=function(){return F},exports.getVideoInfo=I,exports.handleError=ae,exports.initialiseAdvertisement=ue,exports.initiateErrorHandling=ge,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=o.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return n(e).paused()},exports.isPlayerInitialised=ce,exports.isTokenExpired=T,exports.load=me,exports.loadVideo=pe,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){n(e).pause()},exports.play=function(e){n(e).play()},exports.refreshTokenManager=_,exports.replaceMacros=Z,exports.rewind=function(e,t){var i=n(e),o=i.currentTime(),r=o<=t?0:o-t;i.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=g,exports.seasonIdxManager=B,exports.setCurrentSeries=function(e){y=e},exports.setCurrentVideo=x,exports.setVideoIdx=A,exports.setVideoIdxById=N,exports.skip=function(e,t){var i=n(e),o=i.currentTime()+t;i.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),n=require("video.js"),i=require("axios"),o=require("./skin-3397dca5.js"),r=require("./browser-38ff3331.js"),l=require("js-cookie"),a=require("ua-parser-js"),d=require("./captions-3c7ca3a7.js");function u(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function s(e,t){u("event",e,t)}var c={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"},v={name:"@viewlift/player-backup",version:"2.0.72-smartTv",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","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"}};window.vl_player_version=v.version;var m,f=function(e,t){var n,o,r,l,a,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":E.get()+"".concat(null==c?void 0:c.getVideoDetails),params:Object.assign({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":v.version},withCredentials:!0})},p=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:E.get()+c.getLinearChannelDetails,params:Object.assign({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId},(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId},(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle},(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},g=function(){var n=e(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return o=e.sent,e.abrupt("return",i({url:E.get()+"".concat(null==c?void 0:c.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:Object.assign({},n),params:Object.assign({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),I=function(e,t){var n,o,r=window.contentType;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var t=e.videoId;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},E=(m=null==c?void 0:c.apiBaseUrl,{set:function(e){e&&(m=e)},get:function(){return m}}),T=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},h=null;function _(){return{set:function(e){e&&(h=e)},get:function(){return h}}}var y,b,F,D,L,V,R=function(){var n=e(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=_().get(),o=E.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return n.apply(this,arguments)}}(),S=null,W=function(){var n=e(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"))||!T(n)){e.next=6;break}return S||(S=R().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&_().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){S=null})),e.abrupt("return",S);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return n.apply(this,arguments)}}(),O=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){b=e},C=function(){return b},P=function(){return y},A=function(e){F=e},N=function(e){if(D){var t=D.get(e);A(t+1)}},B=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}}),M=0,U=function(){var e,t,n,i,o,r,l,a=C();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function j(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function k(){var e=window.sessionStorage.getItem("uid");return e||(e=j(),window.sessionStorage.setItem("uid",e),e)}function H(){return G.apply(this,arguments)}function G(){return(G=e(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();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)}function z(e){return e?String(e):""}window.initialise=function(e){window.sid=j(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,s(r?"FAILED_TO_START":"DROPPED_STREAM",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),s("PLAY",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":U(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&M<4)M++,s("BUFFERING",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,s("FIRST_FRAME",Object.assign({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;s("AD_REQUEST",Object.assign({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),s("AD_IMPRESSION",Object.assign({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:U()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(M=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Y(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Y=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var n=e(t.mark(function e(n){var o,r,l,a,d,u,s,v,m,f,p,g,I,w,T,h,_,y,b,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return h=e.sent,_=O(h),y=null==_?void 0:_.site,b=null==_?void 0:_.siteId,e.t0=Object,e.t1={aid:y,cid:b,pfm:window.platform},e.t2=null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params,e.t3=k(),e.t4=U(),e.t5=n.url||document.location.href,e.t6=n.ref||document.referrer,e.t7=n.eventName,e.t8=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t9=window.environment,e.t10=n.dp1||"",e.t11=n.dp2||"",e.t12=n.dp3||"",e.t13=n.dp4||"",e.t14=n.dp5||"",e.t15=!0===n.isAdEvent?n.videoPosition:null,e.t16=!0===n.isAdEvent?z(n.adPosition):"",e.next=25,H();case 25:e.t17=e.sent,e.t18=n.playerType||"native",e.t19=n.mediaType||"VIDEO",e.t20=window.sid,e.t21=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t22=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t23=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t24=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t25=null!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t26={uid:e.t3,vid:e.t4,url:e.t5,ref:e.t6,pa:e.t7,vpos:e.t8,environment:e.t9,dp1:e.t10,dp2:e.t11,dp3:e.t12,dp4:e.t13,dp5:e.t14,apos:e.t15,apod:e.t16,profid:e.t17,player:e.t18,media_type:e.t19,stream_id:e.t20,embedurl:"",ttfirstframe:e.t21,bitrate:e.t22,connectionspeed:null,resolutionheight:e.t23,resolutionwidth:e.t24,bufferhealth:e.t25},e.t27=(null==n?void 0:n.duration)&&{duration:n.duration},e.t28=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t29=e.t0.assign.call(e.t0,e.t1,e.t2,e.t26,e.t27,e.t28),F=[e.t29],i({url:(null===(I=window)||void 0===I||null===(w=I.customData)||void 0===w||null===(T=w.beacon)||void 0===T?void 0:T.url)||E.get()+c.getBeaconUrl,method:"post",headers:{Authorization:h},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 40:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var q=function(){var e=B.get();return e>=0?e+1:1},X=function(){var e,t,n,i=P(),o=C(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=B.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};window._deviceInfo=a.UAParser(navigator.userAgent);var J=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},K=function(e){var t=Q(e,"video.tags",[]),n=Q(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},Q=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Z=function(){var e,t,n,i,r,a,d,u,s,c,v,m,f,p,g,I,w,E,T,h,_,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0,D=(null==F?void 0:F.siteName)||"",L=(null==F?void 0:F.contentType)||"video",V=(null==F||null===(e=F[L])||void 0===e?void 0:e.metadata)||(null==F||null===(t=F[L])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),R=o.getPlayer(b);if(!y.includes("VIEWLIFT_"))return y;var S,W=window.getComputedStyle(document.getElementById(b),null),O=Math.trunc(W.getPropertyValue("height").slice(0,-2)),x=Math.trunc(W.getPropertyValue("width").slice(0,-2)),C="linearchannel"===L?null==F||null===(i=F.linearchannel)||void 0===i||null===(r=i.channels)||void 0===r||null===(a=r.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===a||null===(d=a.content)||void 0===d?void 0:d.id:Q(F,"video.gist.id",""),P="linearchannel"===L?null==F||null===(u=F.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===c?void 0:c.title:Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),A=null,N=null;"function"==typeof window.__gpp&&(null===(S=window)||void 0===S||S.__gpp("ping",function(e){A=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=Object.assign({},$(V),{VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:J(x,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Q(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(m=R.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(f=R.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:K(F),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Q(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Q(null===(p=window)||void 0===p||null===(g=p.app_data)||void 0===g||null===(I=g.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":Q(null===(w=window)||void 0===w||null===(E=w.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:P,VIEWLIFT_CONTENT_SERIES_TITLE:Q(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Q(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:X(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:K(F),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:A||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(_=h.customData)||void 0===_?void 0:_.macros);for(var M in B){var U=new RegExp(M,"g");y=y.replace(U,B[M])}return y},$=function(e){var t,n,i,o,l,a,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return ee(u);var u={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(d=a.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(r.isMobile()?c?u=Object.assign({},u,{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):v&&(u=Object.assign({},u,{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):c?u=Object.assign({},u,{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):v&&(u=Object.assign({},u,{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),c?u=Object.assign({},u,{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):v&&(u=Object.assign({},u,{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),u=r.isMobile()?Object.assign({},u,{VIEWLIFT_PROF:s.get("prof.mweb")||""}):Object.assign({},u,{VIEWLIFT_PROF:s.get("prof.web")||""})):(u=Object.assign({},u,{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),u=r.isMobile()?Object.assign({},u,{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):Object.assign({},u,{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),u=Object.assign({},u,{VIEWLIFT_AFID:s.get("afid")})},ee=function(e){var t,n,i,o,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var u=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return(u||s)&&(s?(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.tve")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.dtc")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""}))),a},te=function(e){var t=null;try{var n,i,o,r,l,a,d,u,s,c,v,m,f,p,g,I,w,E,T,h,_,y,b,F,D,L,V,R,S;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(E=e.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(h=T.adTags)||void 0===h||null===(_=h.samsung_tv)||void 0===_?void 0:_.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(u=d.adTags)&&void 0!==u&&null!==(s=u.lg_tv)&&void 0!==s&&s.active){var W,O,x,C;t=null==e||null===(W=e.ads)||void 0===W||null===(O=W.preRoll)||void 0===O||null===(x=O.adTags)||void 0===x||null===(C=x.lg_tv)||void 0===C?void 0:C.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var P,A,N,B;t=null==e||null===(P=e.ads)||void 0===P||null===(A=P.preRoll)||void 0===A||null===(N=A.adTags)||void 0===N||null===(B=N.vizioTv)||void 0===B?void 0:B.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(g=p.preRoll)&&void 0!==g&&null!==(I=g.adTags)&&void 0!==I&&null!==(w=I.xbox)&&void 0!==w&&w.active){var M,U,j,k;t=null==e||null===(M=e.ads)||void 0===M||null===(U=M.preRoll)||void 0===U||null===(j=U.adTags)||void 0===j||null===(k=j.xbox)||void 0===k?void 0:k.url}}else t=(null==e||null===(y=e.ads)||void 0===y||null===(b=y.preRoll)||void 0===b||null===(F=b.adTags)||void 0===F||null===(D=F.web)||void 0===D?void 0:D.active)&&(null==e||null===(L=e.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(R=V.adTags)||void 0===R||null===(S=R.web)||void 0===S?void 0:S.url)}catch(e){}return t},ne=function(e,t){var n,i,o,l,a,d,u,s,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[g])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(l=e[g])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[g])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return oe(E);if(I){var _=re(w,t);return _.src=Z(_.src,t,e),_}if("Safari"!==r.detectBrowser()&&h)return ie(w);if(T){var y=oe(w);return y.src=Z(y.src,t,e),y}if(null!=w&&w.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return b.src=Z(b.src,t,e),b}return null},ie=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},oe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},re=function(e,t){var i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=r.detectBrowser();if(o.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,i){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(o,function(e,t,n){console.log(e),e&&i(e),i(null,new Uint8Array(n))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,i,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(i);return le(t),u}var s,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(le(t),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var le=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==r.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ae=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},de=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ue=!1,se=function(e,t,n){var i=Z(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,l=o.getPlayer(e);if(null!==l.el_){ue=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),ue&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}},ce=function(e){return!!n.getPlayer("".concat(e))},ve=function(){var n=e(t.mark(function e(n,i){var r,l,a,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>2&&void 0!==d[2]&&d[2],e.next=3,W();case 3:return l=e.sent,a=o.getPlayer(n),e.abrupt("return",new Promise(function(e,t){p(i,l).then(function(t){var o=null==t?void 0:t.data;window.sid=j(),o.contentType="linearchannel",o.channelId=null==i?void 0:i.channelId;var l=ne(o,n);x(o),l&&r?(pe(n,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:o})})):e({status:!0,msg:"Feed authenticated",response:o})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),me=function(){var n=e(t.mark(function e(n,i){var r,l,a,u,s,c,v=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=v.length>2&&void 0!==v[2]?v[2]:null){e.next=5;break}return e.next=4,W();case 4:u=e.sent;case 5:return(P()||null)&&N(i),s=0,c=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&I(i,u).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,c=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){f(i,u).then(function(i){var r,l,a=null==i?void 0:i.data,u=(null==a||null===(r=a.video)||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var v=te(a);v&&se(n,v,a);var m=ne(a,n);if(m){var f,p,g,I,w,E,T,h,_,y,b,F,D,L,V=(null==a||null===(f=a.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.videoImageUrl)||(null==a||null===(g=a.video)||void 0===g||null===(I=g.gist)||void 0===I||null===(w=I.imageGist)||void 0===w?void 0:w.r16x9),R=o.getPlayer(n);if(R.poster(V),pe(n,m),R.on("loadstart",function(){u&&e({status:!0,msg:"Video Loaded",response:a})}),R.on("loadeddata",function(){de(),e({status:!0,msg:"Video Loaded",response:a})}),R.one("play",function(){s&&c<95&&setTimeout(function(){R.currentTime(s)},0)}),R.one("error",function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(E=a.video)||void 0===E||null===(T=E.contentDetails)||void 0===T||null===(h=T.closedCaptions)||void 0===h?void 0:h.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(y=_.closedCaptions)||void 0===y?void 0:y.length)>0)b=((null==a||null===(F=a.video)||void 0===F||null===(D=F.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),d.addCaptions(n,b);else d.removeCaptions(n)}else ae(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ge(e,n,t,i)})}));case 11:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),fe=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()},pe=function(e,t){var n=o.getPlayer(e);n&&n.src(t)},ge=function(e,t,n,i){var o,r,l,a,d,u,s=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,c=(null==e||null===(l=e.response)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.errorMessage)||(null==e?void 0:e.message);ce(t)&&ae(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[s])||"".concat(c)),n&&n(Object.assign({status:!1,response:e,msg:"".concat(c)},i&&{videoId:i}))};exports.authenticateLC=ve,exports.baseUrlManager=E,exports.clearError=de,exports.createIdxMapping=function(e){D=new Map,e.map(function(e,t){D.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;w({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),L=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=o.getPlayer(e);if(fe(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getAdsURL=te,exports.getCurrentSeries=P,exports.getCurrentVideo=C,exports.getDecodedToken=O,exports.getEntitlementData=function(e,t,n,o){return i({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=X,exports.getLinearChannelDetails=p,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,t){var n,o,r=O(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):i({url:E.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=w,exports.getSeriesWatchMap=function(){return L},exports.getSource=ne,exports.getToken=W,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=k,exports.getVideoDetails=f,exports.getVideoIdx=function(){return F},exports.getVideoInfo=I,exports.handleError=ae,exports.initialiseAdvertisement=se,exports.initiateErrorHandling=ge,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=o.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return n(e).paused()},exports.isPlayerInitialised=ce,exports.isTokenExpired=T,exports.load=me,exports.loadVideo=pe,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){n(e).pause()},exports.play=function(e){n(e).play()},exports.refreshTokenManager=_,exports.replaceMacros=Z,exports.rewind=function(e,t){var i=n(e),o=i.currentTime(),r=o<=t?0:o-t;i.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],u("js",new Date),u("config",e)},exports.saveWatchHistory=g,exports.seasonIdxManager=B,exports.setCurrentSeries=function(e){y=e},exports.setCurrentVideo=x,exports.setVideoIdx=A,exports.setVideoIdxById=N,exports.skip=function(e,t){var i=n(e),o=i.currentTime()+t;i.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),n=require("video.js"),i=require("axios"),o=require("./skin-3397dca5.js"),r=require("./browser-38ff3331.js"),l=require("js-cookie"),a=require("ua-parser-js"),d=require("./captions-3c7ca3a7.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function u(e,t){s("event",e,t)}var c={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"},v={name:"@viewlift/player-backup",version:"2.0.70-smartTv",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","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"},browserslist:["chrome > 38, safari > 7"]};window.vl_player_version=v.version;var m,f=function(e,t){var n,o,r,l,a,d,s,u;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(u=s.customData)||void 0===u?void 0:u.overrideEntitlementBaseUrl)+"/video/status":E.get()+"".concat(null==c?void 0:c.getVideoDetails),params:Object.assign({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":v.version},withCredentials:!0})},p=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):i({url:E.get()+c.getLinearChannelDetails,params:Object.assign({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId},(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId},(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle},(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},g=function(){var n=e(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return o=e.sent,e.abrupt("return",i({url:E.get()+"".concat(null==c?void 0:c.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:Object.assign({},n),params:Object.assign({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),I=function(e,t){var n,o,r=window.contentType;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var t=e.videoId;return i({method:"GET",url:E.get()+"".concat(null==c?void 0:c.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},E=(m=null==c?void 0:c.apiBaseUrl,{set:function(e){e&&(m=e)},get:function(){return m}}),T=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},h=null;function _(){return{set:function(e){e&&(h=e)},get:function(){return h}}}var y,b,F,D,L,V,R=function(){var n=e(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=_().get(),o=E.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return n.apply(this,arguments)}}(),S=null,W=function(){var n=e(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"))||!T(n)){e.next=6;break}return S||(S=R().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&_().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){S=null})),e.abrupt("return",S);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return n.apply(this,arguments)}}(),O=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){b=e},C=function(){return b},P=function(){return y},A=function(e){F=e},N=function(e){if(D){var t=D.get(e);A(t+1)}},B=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}}),M=0,U=function(){var e,t,n,i,o,r,l,a=C();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function j(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function k(){var e=window.sessionStorage.getItem("uid");return e||(e=j(),window.sessionStorage.setItem("uid",e),e)}function H(){return G.apply(this,arguments)}function G(){return(G=e(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();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)}function z(e){return e?String(e):""}window.initialise=function(e){window.sid=j(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,u(r?"FAILED_TO_START":"DROPPED_STREAM",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),u("PLAY",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":U(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&M<4)M++,u("BUFFERING",Object.assign({pfm:window.platform,uid:k(),vid:U(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,u("FIRST_FRAME",Object.assign({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;u("AD_REQUEST",Object.assign({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),vid:U(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),u("AD_IMPRESSION",Object.assign({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:k(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:U()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(M=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Y(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Y=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var n=e(t.mark(function e(n){var o,r,l,a,d,s,u,v,m,f,p,g,I,w,T,h,_,y,b,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return h=e.sent,_=O(h),y=null==_?void 0:_.site,b=null==_?void 0:_.siteId,e.t0=Object,e.t1={aid:y,cid:b,pfm:window.platform},e.t2=null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params,e.t3=k(),e.t4=U(),e.t5=n.url||document.location.href,e.t6=n.ref||document.referrer,e.t7=n.eventName,e.t8=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t9=window.environment,e.t10=n.dp1||"",e.t11=n.dp2||"",e.t12=n.dp3||"",e.t13=n.dp4||"",e.t14=n.dp5||"",e.t15=!0===n.isAdEvent?n.videoPosition:null,e.t16=!0===n.isAdEvent?z(n.adPosition):"",e.next=25,H();case 25:e.t17=e.sent,e.t18=n.playerType||"native",e.t19=n.mediaType||"VIDEO",e.t20=window.sid,e.t21=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t22=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t23=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t24=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t25=null!==(m=n.bufferHealth)&&void 0!==m?m:null,e.t26={uid:e.t3,vid:e.t4,url:e.t5,ref:e.t6,pa:e.t7,vpos:e.t8,environment:e.t9,dp1:e.t10,dp2:e.t11,dp3:e.t12,dp4:e.t13,dp5:e.t14,apos:e.t15,apod:e.t16,profid:e.t17,player:e.t18,media_type:e.t19,stream_id:e.t20,embedurl:"",ttfirstframe:e.t21,bitrate:e.t22,connectionspeed:null,resolutionheight:e.t23,resolutionwidth:e.t24,bufferhealth:e.t25},e.t27=(null==n?void 0:n.duration)&&{duration:n.duration},e.t28=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t29=e.t0.assign.call(e.t0,e.t1,e.t2,e.t26,e.t27,e.t28),F=[e.t29],i({url:(null===(I=window)||void 0===I||null===(w=I.customData)||void 0===w||null===(T=w.beacon)||void 0===T?void 0:T.url)||E.get()+c.getBeaconUrl,method:"post",headers:{Authorization:h},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 40:case"end":return e.stop()}},e)}));return function(e){return n.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var q=function(){var e=B.get();return e>=0?e+1:1},X=function(){var e,t,n,i=P(),o=C(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=B.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};window._deviceInfo=a.UAParser(navigator.userAgent);var J=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},K=function(e){var t=Q(e,"video.tags",[]),n=Q(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},Q=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Z=function(){var e,t,n,i,r,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,_,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,F=arguments.length>2?arguments[2]:void 0,D=(null==F?void 0:F.siteName)||"",L=(null==F?void 0:F.contentType)||"video",V=(null==F||null===(e=F[L])||void 0===e?void 0:e.metadata)||(null==F||null===(t=F[L])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),R=o.getPlayer(b);if(!y.includes("VIEWLIFT_"))return y;var S,W=window.getComputedStyle(document.getElementById(b),null),O=Math.trunc(W.getPropertyValue("height").slice(0,-2)),x=Math.trunc(W.getPropertyValue("width").slice(0,-2)),C="linearchannel"===L?null==F||null===(i=F.linearchannel)||void 0===i||null===(r=i.channels)||void 0===r||null===(a=r.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===a||null===(d=a.content)||void 0===d?void 0:d.id:Q(F,"video.gist.id",""),P="linearchannel"===L?null==F||null===(s=F.linearchannel)||void 0===s||null===(u=s.channels)||void 0===u||null===(c=u.find(function(e){return(null==e?void 0:e.id)===(null==F?void 0:F.channelId)}))||void 0===c?void 0:c.title:Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),A=null,N=null;"function"==typeof window.__gpp&&(null===(S=window)||void 0===S||S.__gpp("ping",function(e){A=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=Object.assign({},$(V),{VIEWLIFT_WIDTH:x,VIEWLIFT_HEIGHT:O,VIEWLIFT_SIZE:J(x,O),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Q(F,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==R||null===(m=R.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==R||null===(f=R.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:K(F),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Q(F,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Q(F,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Q(null===(p=window)||void 0===p||null===(g=p.app_data)||void 0===g||null===(I=g.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":Q(null===(w=window)||void 0===w||null===(E=w.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Q(F,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:P,VIEWLIFT_CONTENT_SERIES_TITLE:Q(F,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Q(F,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:X(),VIEWLIFT_SEASON_NUMBER:q(),VIEWLIFT_CONTENT_TAGS:K(F),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:A||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(_=h.customData)||void 0===_?void 0:_.macros);for(var M in B){var U=new RegExp(M,"g");y=y.replace(U,B[M])}return y},$=function(e){var t,n,i,o,l,a,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return ee(s);var s={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(d=a.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(r.isMobile()?c?s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):c?s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),c?s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):v&&(s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),s=r.isMobile()?Object.assign({},s,{VIEWLIFT_PROF:u.get("prof.mweb")||""}):Object.assign({},s,{VIEWLIFT_PROF:u.get("prof.web")||""})):(s=Object.assign({},s,{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),s=r.isMobile()?Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):Object.assign({},s,{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),s=Object.assign({},s,{VIEWLIFT_AFID:u.get("afid")})},ee=function(e){var t,n,i,o,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,u=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return(s||u)&&(u?(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.tve")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):(a=Object.assign({},a,{VIEWLIFT_SFID:d.get("sfid.dtc")}),a="lgTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):Object.assign({},a,{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""}))),a},te=function(e){var t=null;try{var n,i,o,r,l,a,d,s,u,c,v,m,f,p,g,I,w,E,T,h,_,y,b,F,D,L,V,R,S;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(E=e.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(h=T.adTags)||void 0===h||null===(_=h.samsung_tv)||void 0===_?void 0:_.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(s=d.adTags)&&void 0!==s&&null!==(u=s.lg_tv)&&void 0!==u&&u.active){var W,O,x,C;t=null==e||null===(W=e.ads)||void 0===W||null===(O=W.preRoll)||void 0===O||null===(x=O.adTags)||void 0===x||null===(C=x.lg_tv)||void 0===C?void 0:C.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var P,A,N,B;t=null==e||null===(P=e.ads)||void 0===P||null===(A=P.preRoll)||void 0===A||null===(N=A.adTags)||void 0===N||null===(B=N.vizioTv)||void 0===B?void 0:B.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(g=p.preRoll)&&void 0!==g&&null!==(I=g.adTags)&&void 0!==I&&null!==(w=I.xbox)&&void 0!==w&&w.active){var M,U,j,k;t=null==e||null===(M=e.ads)||void 0===M||null===(U=M.preRoll)||void 0===U||null===(j=U.adTags)||void 0===j||null===(k=j.xbox)||void 0===k?void 0:k.url}}else t=(null==e||null===(y=e.ads)||void 0===y||null===(b=y.preRoll)||void 0===b||null===(F=b.adTags)||void 0===F||null===(D=F.web)||void 0===D?void 0:D.active)&&(null==e||null===(L=e.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(R=V.adTags)||void 0===R||null===(S=R.web)||void 0===S?void 0:S.url)}catch(e){}return t},ne=function(e,t){var n,i,o,l,a,d,s,u,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[g])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(l=e[g])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return oe(E);if(I){var _=re(w,t);return _.src=Z(_.src,t,e),_}if("Safari"!==r.detectBrowser()&&h)return ie(w);if(T){var y=oe(w);return y.src=Z(y.src,t,e),y}if(null!=w&&w.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return b.src=Z(b.src,t,e),b}return null},ie=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},oe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},re=function(e,t){var i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=r.detectBrowser();if(o.getPlayer(t),"Safari"===d){var s=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,i){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(o,function(e,t,n){console.log(e),e&&i(e),i(null,new Uint8Array(n))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,i,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};n.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(i);return le(t),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(le(t),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var le=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==r.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ae=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},de=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var se=!1,ue=function(e,t,n){var i=Z(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,l=o.getPlayer(e);if(null!==l.el_){se=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}},ce=function(e){return!!n.getPlayer("".concat(e))},ve=function(){var n=e(t.mark(function e(n,i){var r,l,a,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>2&&void 0!==d[2]&&d[2],e.next=3,W();case 3:return l=e.sent,a=o.getPlayer(n),e.abrupt("return",new Promise(function(e,t){p(i,l).then(function(t){var o=null==t?void 0:t.data;window.sid=j(),o.contentType="linearchannel",o.channelId=null==i?void 0:i.channelId;var l=ne(o,n);x(o),l&&r?(pe(n,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:o})})):e({status:!0,msg:"Feed authenticated",response:o})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),me=function(){var n=e(t.mark(function e(n,i){var r,l,a,s,u,c,v=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=v.length>2&&void 0!==v[2]?v[2]:null){e.next=5;break}return e.next=4,W();case 4:s=e.sent;case 5:return(P()||null)&&N(i),u=0,c=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&I(i,s).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,c=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){f(i,s).then(function(i){var r,l,a=null==i?void 0:i.data,s=(null==a||null===(r=a.video)||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var v=te(a);v&&ue(n,v,a);var m=ne(a,n);if(m){var f,p,g,I,w,E,T,h,_,y,b,F,D,L,V=(null==a||null===(f=a.video)||void 0===f||null===(p=f.gist)||void 0===p?void 0:p.videoImageUrl)||(null==a||null===(g=a.video)||void 0===g||null===(I=g.gist)||void 0===I||null===(w=I.imageGist)||void 0===w?void 0:w.r16x9),R=o.getPlayer(n);if(R.poster(V),pe(n,m),R.on("loadstart",function(){s&&e({status:!0,msg:"Video Loaded",response:a})}),R.on("loadeddata",function(){de(),e({status:!0,msg:"Video Loaded",response:a})}),R.one("play",function(){u&&c<95&&setTimeout(function(){R.currentTime(u)},0)}),R.one("error",function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(E=a.video)||void 0===E||null===(T=E.contentDetails)||void 0===T||null===(h=T.closedCaptions)||void 0===h?void 0:h.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(y=_.closedCaptions)||void 0===y?void 0:y.length)>0)b=((null==a||null===(F=a.video)||void 0===F||null===(D=F.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),d.addCaptions(n,b);else d.removeCaptions(n)}else ae(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ge(e,n,t,i)})}));case 11:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}(),fe=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()},pe=function(e,t){var n=o.getPlayer(e);n&&n.src(t)},ge=function(e,t,n,i){var o,r,l,a,d,s,u=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,c=(null==e||null===(l=e.response)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.errorMessage)||(null==e?void 0:e.message);ce(t)&&ae(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[u])||"".concat(c)),n&&n(Object.assign({status:!1,response:e,msg:"".concat(c)},i&&{videoId:i}))};exports.authenticateLC=ve,exports.baseUrlManager=E,exports.clearError=de,exports.createIdxMapping=function(e){D=new Map,e.map(function(e,t){D.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;w({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),L=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=o.getPlayer(e);if(fe(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getAdsURL=te,exports.getCurrentSeries=P,exports.getCurrentVideo=C,exports.getDecodedToken=O,exports.getEntitlementData=function(e,t,n,o){return i({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=X,exports.getLinearChannelDetails=p,exports.getSeasonNumber=q,exports.getSeriesDetails=function(e,t){var n,o,r=O(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):i({url:E.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=w,exports.getSeriesWatchMap=function(){return L},exports.getSource=ne,exports.getToken=W,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=k,exports.getVideoDetails=f,exports.getVideoIdx=function(){return F},exports.getVideoInfo=I,exports.handleError=ae,exports.initialiseAdvertisement=ue,exports.initiateErrorHandling=ge,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=o.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return n(e).paused()},exports.isPlayerInitialised=ce,exports.isTokenExpired=T,exports.load=me,exports.loadVideo=pe,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){n(e).pause()},exports.play=function(e){n(e).play()},exports.refreshTokenManager=_,exports.replaceMacros=Z,exports.rewind=function(e,t){var i=n(e),o=i.currentTime(),r=o<=t?0:o-t;i.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=g,exports.seasonIdxManager=B,exports.setCurrentSeries=function(e){y=e},exports.setCurrentVideo=x,exports.setVideoIdx=A,exports.setVideoIdxById=N,exports.skip=function(e,t){var i=n(e),o=i.currentTime()+t;i.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|