@viewlift/player-backup 2.0.301-backup → 2.0.303-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-6cab8d20.js → autoNextVideo-5bd449e1.js} +1 -1
- package/cjs/bundle.css +12 -18
- package/cjs/{caption-settings-058ad013.js → caption-settings-5efc7591.js} +1 -1
- package/cjs/{captions-d98c49d6.js → captions-5f9611f1.js} +1 -1
- package/cjs/{features-2cdc4e39.js → features-c17c1806.js} +1 -1
- package/cjs/generic-c66535a6.js +1 -0
- package/cjs/{index-1c0aa450.js → index-9262cd5e.js} +1 -1
- package/cjs/{index-50e69a99.js → index-b6608461.js} +1 -1
- package/cjs/index-de1dab2f.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-1bdf2c52.js → multicamv2-0834e44d.js} +1 -1
- package/cjs/{multicamv2-56120328.js → multicamv2-e6f27f98.js} +1 -1
- package/cjs/{nextEpisodeButton-290b490f.js → nextEpisodeButton-74e8a0df.js} +1 -1
- package/cjs/{playlist-25247b47.js → playlist-415e42ad.js} +1 -1
- package/cjs/{relatedVideosManager-88017db2.js → relatedVideosManager-0a220d05.js} +1 -1
- package/cjs/{renditions-6554142b.js → renditions-6f165ef5.js} +1 -1
- package/cjs/{resolution-c33a67fb.js → resolution-19103db5.js} +1 -1
- package/cjs/{series-20fe0127.js → series-5286e1c3.js} +1 -1
- package/cjs/{series-v2-370da4d6.js → series-v2-8dabeb63.js} +1 -1
- package/cjs/{series-v2-a347f3f7.js → series-v2-bfaacb8c.js} +1 -1
- package/cjs/{settings-icon-1efd3e23.js → settings-icon-43534947.js} +1 -1
- package/cjs/{skin-12b4d86a.js → skin-0ee0edad.js} +1 -1
- package/cjs/{skin-e0cf4554.js → skin-16ae23af.js} +1 -1
- package/cjs/{skin-89ad761c.js → skin-2497fb65.js} +1 -1
- package/cjs/{skin-7556b856.js → skin-479ca0db.js} +1 -1
- package/cjs/{skin-47343a57.js → skin-536e7bdb.js} +1 -1
- package/cjs/{skin-1f5cd68e.js → skin-63da659b.js} +1 -1
- package/cjs/{skin-a25a2457.js → skin-90938729.js} +1 -1
- package/cjs/{skin-9d79794a.js → skin-ac3f9750.js} +1 -1
- package/cjs/{skin-cebece82.js → skin-b1c6b8cb.js} +1 -1
- package/cjs/{skin-00029c75.js → skin-d8a3ed15.js} +1 -1
- package/cjs/{util-9e6f986e.js → util-b4bf1579.js} +1 -1
- package/cjs/{videoSelector-24f40272.js → videoSelector-04bea276.js} +1 -1
- package/cjs/{videoSelector-f49496de.js → videoSelector-89cc2851.js} +1 -1
- package/esm/autoNextVideo-66977b2f.js +1 -0
- package/esm/bundle.css +12 -18
- package/esm/{caption-settings-a9b6581e.js → caption-settings-cfb1368b.js} +1 -1
- package/esm/{captions-9659ee8f.js → captions-89897207.js} +1 -1
- package/esm/{features-4a5d71b3.js → features-66602c1a.js} +1 -1
- package/esm/generic-7f2d1f91.js +1 -0
- package/esm/helpers/drmErrorDetection.d.ts +6 -0
- package/esm/index-0058bc4b.js +1 -0
- package/esm/{index-b62e0f74.js → index-bb7166ff.js} +1 -1
- package/esm/{index-10a24e6e.js → index-d7d3d1c2.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-a84ce8b3.js → multicamv2-15bfaa1d.js} +1 -1
- package/esm/{multicamv2-de90d28f.js → multicamv2-3812939e.js} +1 -1
- package/esm/{nextEpisodeButton-bffd417f.js → nextEpisodeButton-406f2d70.js} +1 -1
- package/esm/{playlist-de8dcaf0.js → playlist-5b825b06.js} +1 -1
- package/esm/{relatedVideosManager-33634c11.js → relatedVideosManager-81661348.js} +1 -1
- package/esm/{renditions-4eddc06a.js → renditions-ee4e8582.js} +1 -1
- package/esm/{resolution-46076e4a.js → resolution-879fc9c0.js} +1 -1
- package/esm/{series-8ef8fdfa.js → series-22cb40d1.js} +1 -1
- package/esm/{series-v2-8e6a3475.js → series-v2-59d533b4.js} +1 -1
- package/esm/{series-v2-58f8f89a.js → series-v2-64cfce61.js} +1 -1
- package/esm/{settings-icon-60394554.js → settings-icon-851014b6.js} +1 -1
- package/esm/{skin-c081d535.js → skin-00b3f94f.js} +1 -1
- package/esm/skin-0abde216.js +1 -0
- package/esm/{skin-4f5a0ac7.js → skin-16051d1c.js} +1 -1
- package/esm/{skin-a6c3353b.js → skin-2d424d08.js} +1 -1
- package/esm/{skin-9921582e.js → skin-56c905e6.js} +1 -1
- package/esm/{skin-fdbbacca.js → skin-8bcdb1ff.js} +1 -1
- package/esm/skin-916c011b.js +1 -0
- package/esm/{skin-e4073063.js → skin-c79a9a01.js} +1 -1
- package/esm/{skin-4280c73d.js → skin-d8f6449e.js} +1 -1
- package/esm/{skin-ab1ca6e2.js → skin-da87984c.js} +1 -1
- package/esm/util-907fe226.js +1 -0
- package/esm/{videoSelector-11ca5611.js → videoSelector-d9c7841c.js} +1 -1
- package/esm/{videoSelector-6ca1f79b.js → videoSelector-e69b384f.js} +1 -1
- package/package.json +1 -1
- package/cjs/autoNextVideo-19386762.js +0 -1
- package/cjs/browser-77c57718.js +0 -1
- package/cjs/features-d42cd8c1.js +0 -1
- package/cjs/features-f7498f6e.js +0 -1
- package/cjs/generic-5b90c727.js +0 -1
- package/cjs/generic-9239e4ef.js +0 -1
- package/cjs/index-004fc85d.js +0 -1
- package/cjs/index-5daec8dc.js +0 -1
- package/cjs/index-63575bc4.js +0 -1
- package/cjs/index-81c8f4a1.js +0 -1
- package/cjs/index-955b603e.js +0 -1
- package/cjs/index-add7cff5.js +0 -1
- package/cjs/index-ce95deae.js +0 -1
- package/cjs/index-ff74dc4f.js +0 -1
- package/cjs/multicamv2-1af47226.js +0 -1
- package/cjs/multicamv2-b1a591f5.js +0 -1
- package/cjs/nextEpisodeButton-f6da5f9e.js +0 -1
- package/cjs/playlist-7b61a3c6.js +0 -1
- package/cjs/relatedVideosManager-eeeaf32c.js +0 -1
- package/cjs/resolution-4c007d14.js +0 -1
- package/cjs/series-c6abeb2a.js +0 -1
- package/cjs/series-v2-4d05ebf8.js +0 -1
- package/cjs/series-v2-5ccc7a93.js +0 -1
- package/cjs/settings-icon-0dcc3788.js +0 -1
- package/cjs/skin-034c0b96.js +0 -1
- package/cjs/skin-0a5108bb.js +0 -1
- package/cjs/skin-15813134.js +0 -1
- package/cjs/skin-35bae058.js +0 -1
- package/cjs/skin-41b0c02d.js +0 -1
- package/cjs/skin-56d77491.js +0 -1
- package/cjs/skin-5d92ab3f.js +0 -1
- package/cjs/skin-71dbfc33.js +0 -1
- package/cjs/skin-83a765a8.js +0 -1
- package/cjs/skin-a904ce92.js +0 -1
- package/cjs/skin-ac3c64df.js +0 -1
- package/cjs/skin-ba07e8dc.js +0 -1
- package/cjs/skin-c08b2d3f.js +0 -1
- package/cjs/skin-c72adb59.js +0 -1
- package/cjs/skin-dd9ff331.js +0 -1
- package/cjs/skin-dfd8c833.js +0 -1
- package/cjs/skin-ed8bad19.js +0 -1
- package/cjs/skin-f26ba21b.js +0 -1
- package/cjs/skin-f3a5fe3d.js +0 -1
- package/cjs/skin-f70eedce.js +0 -1
- package/cjs/skin-fa940389.js +0 -1
- package/cjs/videoSelector-95e64eba.js +0 -1
- package/cjs/videoSelector-ab05bccb.js +0 -1
- package/cjs/videoSelector-d96b4516.js +0 -1
- package/cjs/videoSelector-fac5fff5.js +0 -1
- package/esm/autoNextVideo-379bbdc2.js +0 -1
- package/esm/autoNextVideo-be06e737.js +0 -1
- package/esm/browser-d4613b36.js +0 -1
- package/esm/features-93f642aa.js +0 -1
- package/esm/features-dbc6b07e.js +0 -1
- package/esm/generic-5fc25fa4.js +0 -1
- package/esm/generic-b3643a73.js +0 -1
- package/esm/index-311464f3.js +0 -1
- package/esm/index-32ca07d6.js +0 -1
- package/esm/index-4e64ac09.js +0 -1
- package/esm/index-8566dca0.js +0 -1
- package/esm/index-ac572236.js +0 -1
- package/esm/index-ae4cf675.js +0 -1
- package/esm/index-c9e6b4b1.js +0 -1
- package/esm/index-d83589e3.js +0 -1
- package/esm/multicamv2-85a146f1.js +0 -1
- package/esm/multicamv2-a74f52dc.js +0 -1
- package/esm/nextEpisodeButton-4d4f981f.js +0 -1
- package/esm/playlist-100ecdfe.js +0 -1
- package/esm/relatedVideosManager-8dd9aa24.js +0 -1
- package/esm/resolution-5926bb20.js +0 -1
- package/esm/series-a6e346df.js +0 -1
- package/esm/series-v2-551f67e8.js +0 -1
- package/esm/series-v2-76f5001b.js +0 -1
- package/esm/settings-icon-c4e124b8.js +0 -1
- package/esm/skin-07c5b42b.js +0 -1
- package/esm/skin-0b038d52.js +0 -1
- package/esm/skin-132a3fbe.js +0 -1
- package/esm/skin-1c1aa7a5.js +0 -1
- package/esm/skin-30c770e0.js +0 -1
- package/esm/skin-41718675.js +0 -1
- package/esm/skin-4312bdbe.js +0 -1
- package/esm/skin-5aa3c707.js +0 -1
- package/esm/skin-5fd8f1a1.js +0 -1
- package/esm/skin-80a68255.js +0 -1
- package/esm/skin-80e062bd.js +0 -1
- package/esm/skin-876554ba.js +0 -1
- package/esm/skin-882d6b96.js +0 -1
- package/esm/skin-900c1bca.js +0 -1
- package/esm/skin-97dd73c4.js +0 -1
- package/esm/skin-ae76c8c8.js +0 -1
- package/esm/skin-bc21a783.js +0 -1
- package/esm/skin-d8398bf5.js +0 -1
- package/esm/skin-dbb8c692.js +0 -1
- package/esm/skin-dddf388c.js +0 -1
- package/esm/skin-e2592aa4.js +0 -1
- package/esm/skin-f9ec12e3.js +0 -1
- package/esm/skin-fdc5aef1.js +0 -1
- package/esm/util-8d51abc3.js +0 -1
- package/esm/videoSelector-13ae5477.js +0 -1
- package/esm/videoSelector-38875a2f.js +0 -1
- package/esm/videoSelector-65842ebe.js +0 -1
- package/esm/videoSelector-93246044.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./generic-
|
|
1
|
+
"use strict";var e,t=require("./generic-c66535a6.js"),i=require("./util-b4bf1579.js"),n=require("./skin-16ae23af.js"),o=0,u=0,d=[],c=function e(i,o,d,c){u=i,i>d.length-1||(t.setVideoIdx(u+1),t.load(o,d[i].id).then(function(e){n.highlightVideo(u,o),u++,r(e)}).catch(function(t){r(t),setTimeout(function(){n.highlightVideo(u,o),u++,e(u,o,d)},5e3)}))},r=function(t){e&&e(t)};exports.autoPlayNext=function(h){clearTimeout(o),d=(null==h?void 0:h.content)||[],e=null==h?void 0:h.cb;var l=h.playerId;i.onVideoEnded(l,function(){var e=n.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=t.getVideoIdx())>d.length-1||(t.setVideoIdx(u+1),t.load(l,d[u].id).then(function(e){n.highlightVideo(u,l),t.setCurrentVideo(e.response),u++,r(e)}).catch(function(e){r(e),n.highlightVideo(u,l),u++,o=setTimeout(function(){t.isPaused(l)&&c(u,l,d)},5e3)})))})},exports.switchToNext=c,exports.updateContent=function(e){d=e||[]};
|
package/cjs/bundle.css
CHANGED
|
@@ -198,7 +198,6 @@
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
|
|
202
201
|
.video-js.skin_news_live .vjs-button>.vjs-icon-placeholder:before {
|
|
203
202
|
font-size: 2.2em;
|
|
204
203
|
line-height: 2.6;
|
|
@@ -1171,6 +1170,7 @@
|
|
|
1171
1170
|
|
|
1172
1171
|
|
|
1173
1172
|
|
|
1173
|
+
|
|
1174
1174
|
.video-js.skin_news .vjs-button>.vjs-icon-placeholder:before {
|
|
1175
1175
|
font-size: 2.2em;
|
|
1176
1176
|
line-height: 2.6;
|
|
@@ -1640,16 +1640,16 @@
|
|
|
1640
1640
|
}
|
|
1641
1641
|
|
|
1642
1642
|
.video-js.skin_news .vjs-text-track-display-ttml span {
|
|
1643
|
-
color: white;
|
|
1644
|
-
font-size: 13px;
|
|
1645
|
-
background-color: black;
|
|
1643
|
+
color: white !important;
|
|
1644
|
+
font-size: 13px !important;
|
|
1645
|
+
background-color: black !important;
|
|
1646
1646
|
}
|
|
1647
1647
|
}
|
|
1648
1648
|
|
|
1649
1649
|
.video-js.skin_news .vjs-text-track-display-ttml span {
|
|
1650
|
-
color: white;
|
|
1651
|
-
font-size: 16px;
|
|
1652
|
-
background-color: black;
|
|
1650
|
+
color: white !important;
|
|
1651
|
+
font-size: 16px !important;
|
|
1652
|
+
background-color: black !important;
|
|
1653
1653
|
}
|
|
1654
1654
|
|
|
1655
1655
|
.video-js.skin_news.vjs-has-started.vjs-user-active.vjs-controls-enabled .vjs-text-track-display-ttml p {
|
|
@@ -1961,6 +1961,7 @@
|
|
|
1961
1961
|
|
|
1962
1962
|
|
|
1963
1963
|
|
|
1964
|
+
|
|
1964
1965
|
.vjs-custom-big-mute.vjs-control{
|
|
1965
1966
|
position: absolute;
|
|
1966
1967
|
align-items: center;
|
|
@@ -2009,7 +2010,6 @@
|
|
|
2009
2010
|
width: 22px;
|
|
2010
2011
|
}
|
|
2011
2012
|
|
|
2012
|
-
|
|
2013
2013
|
/* nextep — up-next card (centered in player, scales with player size) */
|
|
2014
2014
|
.video-js:has(.next-ep-preview),
|
|
2015
2015
|
.video-js:has(.next-ep-preview-player-thumb) {
|
|
@@ -2251,16 +2251,10 @@
|
|
|
2251
2251
|
.next-ep-network-logo--empty {
|
|
2252
2252
|
display: none;
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
flex-direction: column;
|
|
2259
|
-
align-items: flex-start;
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
.next-ep-network-logo {
|
|
2263
|
-
align-self: flex-end;
|
|
2254
|
+
@media (max-width:480px){
|
|
2255
|
+
.next-ep-preview{
|
|
2256
|
+
width: 50% !important;
|
|
2257
|
+
padding: 10px !important;
|
|
2264
2258
|
}
|
|
2265
2259
|
}
|
|
2266
2260
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-eb807ef0.js"),c=require("./captions-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-eb807ef0.js"),c=require("./captions-5f9611f1.js"),l=require("./skin-16ae23af.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var d=i.getComponent("Component"),p=function(){n(v,d);var p,u,m=(p=v,u=s(),function(){var e,t=o(p);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(i=m.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(v,[{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}}]),v}();exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./skin-
|
|
1
|
+
"use strict";var t=require("./skin-16ae23af.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.srclang,label:t.label||(null==t?void 0: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 l=t.getPlayer(e).textTracks(),i=0;i<l.length;i++){var o=l[i];"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)})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-c66535a6.js"),s=require("./renditions-6f165ef5.js"),d=require("./skin-16ae23af.js"),u=require("./localisation-56e0a999.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-b6608461.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",h({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-5efc7591.js")}).then(function(r){var n,o,l,a,s=r.default,u=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.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-0834e44d.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.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-e6f27f98.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.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-74e8a0df.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.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-415e42ad.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.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-19103db5.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-5286e1c3.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-bfaacb8c.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-8dabeb63.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-43534947.js")}).then(function(r){var n,o,l,a,s=r.default,u=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-04bea276.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.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-89cc2851.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.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/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("axios"),o=require("./skin-16ae23af.js"),a=require("./browser-3670a923.js"),l=require("md5"),s=require("js-cookie"),d=require("./captions-5f9611f1.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),f=require("@viewlift/comscore/index.js"),p=require("@babel/runtime/helpers/classCallCheck"),m=require("@babel/runtime/helpers/createClass");function h(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function g(e,t){h("event",e,t)}var y={name:"@viewlift/player",version:"2.1.49",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.18",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}},w={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?T(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):T(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var b,I=(b={},{setConfig:function(e){b=_(_({},b),e)},getConfig:function(){return b}}),E=function(e){return!!e&&"drm"===function(e){var t;if(5===Number(null==e?void 0:e.code))return"drm";var n="".concat(null!==(t=null==e?void 0:e.code)&&void 0!==t?t:""," ").concat(function(e){var t,n,i,r,o;return(null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.errorMessage)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.message)||(null==e||null===(o=e.response)||void 0===o?void 0:o.statusText)||(null==e?void 0:e.message)||"unknown_error"}(e)).toLowerCase();return/(drm|license|widevine|playready|fairplay|eme|key|hdcp)/.test(n)?"drm":/(network|manifest|segment|playlist|http|xhr|fetch|timeout)/.test(n)?"network":/(decode|mediaerror|mediasource|appendbuffer|sourcebuffer)/.test(n)?"decode":"player"}(e)},S=new Set(["license","key","server_certificate"]);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var A="asset_not_found",O="geo_blocking_issue",P="entitlement_mismatch",D="DRM/License Failures",L=new Set(["contentgeorestricted","contentgeorestrictedbyhba","content_not_available_for_country"]),C=[/geo[\s_-]?block/i,/geo[\s_-]?restrict/i,/geographic/i,/not available in your/i,/outside.*(?:region|country|territory)/i,/\bcountry\b/i,/\bterritory\b/i],F=[/entitlement/i,/not entitled/i,/subscription/i,/not subscribed/i,/access denied/i,/\bunauthorized\b/i,/\bforbidden\b/i,/\bpremium\b/i,/upgrade required/i,/tv[\s_-]?provider/i,/\bprovider\b/i],x=[/not found/i,/no content/i,/does not exist/i,/\bmissing\b/i,/not available currently/i,/not available/i],j=function(e,t,n,i){var r=Number(e),o=String(t||"");return E(i)?D:L.has(function(e){return String(e||"").toLowerCase().replace(/[\s-]/g,"_")}(n))||C.some(function(e){return e.test(o)})?O:F.some(function(e){return e.test(o)})?P:x.some(function(e){return e.test(o)})||404===r?A:451===r?O:P},R=function(t,n,i){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};console.log("emitApiErrorEvent",{apiName:t,error:n,errorCategory:i,meta:o});var a=function(){var e,t,n,i,r=I.getConfig()||{};return(null==r?void 0:r.apiErrorCb)||(null==r?void 0:r.onApiError)||(null==r||null===(e=r.customData)||void 0===e?void 0:e.apiErrorCb)||(null==r||null===(t=r.customData)||void 0===t?void 0:t.onApiError)||(null==r||null===(n=r.customData)||void 0===n||null===(i=n.callbacks)||void 0===i?void 0:i.onApiError)||null}();if("function"==typeof a){console.log("emitApiErrorEvent",n);var l=(null==n||null===(r=n.response)||void 0===r?void 0:r.status)||(null==n?void 0:n.status)||0,s=function(e){var t,n,i,r,o;return(null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.errorMessage)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.message)||(null==e||null===(o=e.response)||void 0===o?void 0:o.statusText)||(null==e?void 0:e.message)||"unknown_error"}(n),d=function(e){var t,n,i,r,o,a;return(null==e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.errorCode)||(null==e||null===(i=e.response)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.error_code)||(null==e||null===(o=e.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.code)||(null==e?void 0:e.errorCode)||null}(n),u=j(l,s,d,n),c=function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({errorcode:l||d,errormessage:s,errorcategory:i||u},o);t&&(c.apiPath=t);try{a(u,c)}catch(e){console.warn("[VLPlayer] apiError callback failed:",e)}}};function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function M(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?V(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):V(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var W=y;window.vl_player_version=W.version;var N,U=function(){var e,t,n,i;return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":Q.get()+"".concat(null==w?void 0:w.getVideoDetails)},B=function(e,t){var n,i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse)return 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})});var a,l,s,d,u=U();return r({url:U(),params:M({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:o},null===(a=window)||void 0===a||null===(l=a.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":W.version,"x-player-name":"videojs",adbTempToken:null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0}).catch(function(t){throw R(u,t,"content",{id:e}),t})},H=function(e,t){var n,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse)return 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})});var u=Q.get()+w.getLinearChannelDetails;return r({url:u,params:M(M(M(M(M({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}}).catch(function(t){throw R(u,t,"content",{id:null==e?void 0:e.id,channelId:null==e?void 0:e.channelId,programId:null==e?void 0:e.programId}),t})},q=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:return i=e.sent,e.abrupt("return",r({url:Q.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:M({},t),params:M({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}).catch(function(e){throw R("saveWatchHistory",e,"content",{videoId:null==t?void 0:t.videoId,profileId:null==t?void 0:t.profileId}),e}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),G=function(e,t){var n,i,o=window.contentType,a=Q.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(o,"/").concat(e);return r({method:"GET",url:a,headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3}).catch(function(t){throw R(a,t,"content",{videoId:e,contentType:o}),t})},z=function(e){var t=e.videoId,n=Q.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(t);return r({method:"GET",url:n,headers:{Authorization:e.token},timeout:15e3}).catch(function(i){throw R(n,i,"content",{seriesId:t,videoId:null==e?void 0:e.videoId}),i})},Q=(N=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(N=e)},get:function(){return N}}),Y=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},K=null;function X(){return{set:function(e){e&&(K=e)},get:function(){return K}}}var J,$,Z,ee,te,ne,ie,re=function(){var e=t(n.mark(function e(){var t,i,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=X().get(),i=Q.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),oe=null,ae=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!Y(t)){e.next=6;break}return oe||(oe=re().then(function(e){var n,i,r=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&X().set(o),r||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){oe=null})),e.abrupt("return",oe);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),le=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},se=(ne=new Map,{set:function(e){var t,n=(null==e||null===(t=e.video)||void 0===t?void 0:t.id)||e||null;ne.set(n,(ne.get(n)||0)+1)},get:function(e){return ne.get(e)},clear:function(){ne.clear()}}),de=function(e){$=e},ue=function(){return $},ce=function(){return J},ve=function(e){Z=e},fe=function(e){if(ee){var t=ee.get(e);ve(t+1)}},pe=(ie=0,{set:function(e){e>=0&&(ie=e)},get:function(){return ie}});function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function he(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?me(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ge=0,ye=null,we=null,Te=!1,_e=!1,be=function(){var e,t,n,i,r,o,a,l=ue();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Ee(){return ye||window.sessionStorage.getItem("uid")}function Se(){return ke.apply(this,arguments)}function ke(){return(ke=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ae(e){return e?String(e):""}window.initialise=function(e){window.sid=Ie(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,window.isAdPlaying=!1,streamFailures(e),buffering(e),ads(e),ping(e),Oe(e),Pe(e)};var Oe=function(e){e.on("play",function(){"pause"!==we||e.scrubbing()||(we="play",g("RESUME",{pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("pause",function(){setTimeout(function(){Te||(we="pause",g("PAUSE",{pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},Pe=function(e){if(e){var t=0,n=0,i=0,r=0;e.on("timeupdate",o),e.on("seeking",function(){if(Te)return;Te=!0,e.off("timeupdate",o),e.one("seeked",a)}),e.on("seeked",a)}function o(){t=n,n=Math.floor(e.currentTime()),t<n&&(r=t,t=n)}function a(){if(_e)_e=!1;else{i=Math.floor(e.currentTime());var t=Math.floor(i-r);if(0!==t&&window.firstFrameFired){var n=t>0?"SEEK_FORWARD":"SEEK_BACKWARD";g(n,{pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:n,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){Te=!1},50),e.on("timeupdate",o)}}};window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var t,n,i,r=o.getPlayer(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),g(e,he({pfm:window.platform,uid:Ee(),vid:be(),videoPosition:a},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,t,n){e.one("play",tryCatch(function(){var i,r,o;window.ttFirstFrameStartTime_In_MS=performance.now(),we="play",window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),g("PLAY",he({pfm:window.platform,uid:Ee(),vid:be(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",he({"Video ID":be(),watchTime:Math.floor(e.currentTime())},n))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.firstFrameFired&&(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&ge<4)ge++,g("BUFFERING",he({pfm:window.platform,uid:Ee(),vid:be(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}window.ttFirstFrameStartTime_In_MS=null},window.endFirstFrame=function(e){var t=tryCatch(function(){var n,i,r;if(window.ttFirstFrameStartTime_In_MS&&!window.firstFrameFired)if(window.isAdPlaying)console.log("'playing' event ignored during ad playback.");else{clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0;var o=(performance.now()-window.ttFirstFrameStartTime_In_MS)/1e3;window.ttFirstFrameStartTime_In_MS=null,window.totalBufferTime=o||0,g("FIRST_FRAME",he({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),vid:be()},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e)}),e.off("timeupdate",t)}});e.on("timeupdate",t)},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,r,o,a;window.isAdPlaying=!0,!window.firstFrameFired&&window.failedToStartTimer&&clearTimeout(window.failedToStartTimer),g("AD_REQUEST",he({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),vid:be(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),g("AD_IMPRESSION",he({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:be()},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))})})};var De=function(e,t,n){var i;fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:n,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:(null===(i=e.tech_)||void 0===i?void 0:i.vhs)&&window.getBitrate(e)})};window.fireExitPing=function(e){if(!window.isAdPlaying){var t=null!=e&&e.el_?Math.floor(e.currentTime()):0;t<=0||De(e,t,t)}},window.ping=function(e){var t=[];e.on("dispose",tryCatch(function(){console.log('Player DISPOSED >> "dispose" event fired >>> firing exit PING'),window.fireExitPing(e)})),e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(ge=0,t.push(n),De(e,n,30))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(Le(t,o,a)){var l=Math.round(n-a);if(isFinite(l))return l}}})()};var Le=function(e,t,n){return e>=t&&e<=n},Ce=function(){var e,t=ue(),n=(null==t?void 0:t.contentType)||"video";return(null==t||null===(e=t[n])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,o,l,s,d,u,c,v,f,p,m,h,g,y,T,_,b,I,E,S,k;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.isBotUserAgent()){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,ae();case 4:return b=e.sent,I=le(b),E=null==I?void 0:I.site,S=null==I?void 0:I.siteId,e.t0=he,e.t1=he,e.t2=he({aid:E,cid:S,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(l=o.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=Ee(),e.t5=be(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(s=t.videoPosition)&&void 0!==s?s:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?Ae(t.adPosition):"",e.next=28,Se();case 28:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(c=t.resHeight)&&void 0!==c?c:null,e.t25=null!==(v=t.resWidth)&&void 0!==v?v:null,e.t26=null!==(f=t.bufferHealth)&&void 0!==f?f:null,e.t27=null!==(p=Ce())&&void 0!==p?p:null,e.t28=null!=E?E:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==t?void 0:t.duration)&&{duration:t.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(m=window)||void 0===m||null===(h=m.customData)||void 0===h||null===(g=h.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),k=[e.t33],r({url:(null===(y=window)||void 0===y||null===(T=y.customData)||void 0===T||null===(_=T.beacon)||void 0===_?void 0:_.url)||Q.get()+w.getBeaconUrl,method:"post",headers:{Authorization:b},contentType:"application/x-www-form-urlencoded",dataType:"text",data:k}).catch(function(e){console.error(e)});case 46:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};window.watchLive=function(e){var t;if(e){var n=null==e||null===(t=e.controlBar)||void 0===t?void 0:t.getChild("SeekToLive");if(n){var i=n.handleClick;n.handleClick=function(t){var n,r;return null!==(n=e.liveTracker)&&void 0!==n&&null!==(r=n.atLiveEdge)&&void 0!==r&&r.call(n)||(!function(e){var t,n,i;g("WATCH_LIVE",he({eventName:"WATCH_LIVE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Ee(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:be()},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:"WATCH_LIVE",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!1})}(e),_e=!0),i.call(this,t)}}}};var Fe=function(){var e=pe.get();return e>=0?e+1:1},xe=function(){var e,t,n,i=ce(),r=ue(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=pe.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===o});return l>=0?l+1:1};function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Re(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?je(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Ve=l,Me=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},We=function(e){var t=Ne(e,"video.tags",[]),n=Ne(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},Ne=function(e,t,n){for(var i=0,r=(t=t.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[t[i]]}return e||n},Ue=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID";return e?t:t.includes("browser-")?t.replace("browser-",""):t},Be=function(){var e,t,n,i,r,a,l,d,u,c,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.disableMacros)return A;var D=(null==P?void 0:P.siteName)||(null==P?void 0:P.site)||"",L=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(n=P[L])||void 0===n?void 0:n.metadata)||(null==P||null===(i=P[L])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o.getPlayer(O);if(!A.includes("VIEWLIFT_"))return A;var x,j=window.getComputedStyle(document.getElementById(O),null),R=Math.trunc(j.getPropertyValue("height").slice(0,-2)),V=Math.trunc(j.getPropertyValue("width").slice(0,-2)),M="linearchannel"===L?null==P||null===(a=P.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(d=l.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:Ne(P,"video.gist.id",""),W="linearchannel"===L?null==P||null===(c=P.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(f=v.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===f?void 0:f.title:Ne(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,U=null;"function"==typeof window.__gpp&&(null===(x=window)||void 0===x||x.__gpp("ping",function(e){N=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=s.get("us_privacy")||s.get("usprivacy"),H=void 0!==B?B:"1YNN",q=null!==(p=null===(m=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===m?void 0:m.fwIdentifier)&&void 0!==p?p:null,G=Re(Re({},He(C)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:R,VIEWLIFT_SIZE:Me(V,R),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ne(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(g=F.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(y=F.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":Ue(!1),VIEWLIFT_DID:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":Ue(),VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:We(P),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ne(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ne(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:s.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ne(null===(w=window)||void 0===w||null===(T=w.app_data)||void 0===T||null===(_=T.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D||"golfchannel"==D?"":Ne(null===(b=window)||void 0===b||null===(I=b.app_data)||void 0===I||null===(E=I.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:q?Ve(q):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ne(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:Ne(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ne(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:xe(),VIEWLIFT_SEASON_NUMBER:Fe(),VIEWLIFT_CONTENT_TAGS:We(P),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(k=S.customData)||void 0===k?void 0:k.macros);for(var z in G){var Q=new RegExp(z,"g");A=A.replace(Q,G[z])}return A},He=function(e){var t,n,i,r,o,l,s,d,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var f=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,p=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(l=o.subscription)||void 0===l?void 0:l.TVE)||!1;return f||p?(a.isMobile()?f?c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=Re(Re({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=Re(Re({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=a.isMobile()?Re(Re({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):Re(Re({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=Re(Re({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(a.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=a.isMobile()?Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):Re(Re({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=Re(Re({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:Ne(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},qe=function(e,t){var n,i,r,o,l,s,d,u,c,v,f,p,m,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[h])||void 0===n?void 0:n.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(o=e[h])||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(s=e[h])||void 0===s||null===(d=s.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[h])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var _=(null==e||null===(f=e[h])||void 0===f||null===(p=f.streamingInfo)||void 0===p||null===(m=p.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return ze(w);if(g){var b=Qe(y,t);return b.src=Be(b.src,t,e),b}if("Safari"!==a.detectBrowser()&&_)return Ge(y);if(T){var I=ze(y);return I.src=Be(I.src,t,e),I}if(null!=y&&y.mpeg){var E=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(y);return E.src=Be(E.src,t,e),E}return null},Ge=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ze=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},Qe=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,s=e.playReady,d=a.detectBrowser();if(o.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",__vlLicenseUrl:(null==e?void 0:e.licenseUrl)||"",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,t,n){console.log(e),e&&o(e),o(null,n)})}}}}}(r);return Ye(t),u}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ye(t),v.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==s?void 0:s.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==s?void 0:s.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==s?void 0:s.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ye=function(e){var t=o.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ke=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(t),r.appendChild(o),i.append(r)}}},Xe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Je=!1,$e=function(e,t,n){var i=Be(t,e,n),r=o.getPlayer(e);if(t&&window.google){if("function"!=typeof r.ima&&"object"!==u(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,t){var n,i,r,a=o.getPlayer(e);if(null!==a.el_){Je=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Je&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var t=e.adsManager;t.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),t.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};var Ze,et=(Ze=!0,{enable:function(){Ze=!0},disable:function(){Ze=!1},get enabled(){return Ze}}),tt="ssai-breakStart",nt="ssai-adImpression",it="ssai-firstQuartile",rt="ssai-midpoint",ot="ssai-thirdQuartile",at="ssai-complete",lt="ssai-breakEnd",st={breakStart:tt,impression:nt,firstQuartile:it,midpoint:rt,thirdQuartile:ot,complete:at,breakEnd:lt};function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var i=t.eventType,r=st[i];r&&n.trigger(r,t)}function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ct(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ut(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ut(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var vt,ft=(vt={},{get:function(){return vt},set:function(e){vt=e}});function pt(e,t){var n,i,r,a,l,s,d,u,c,v,p,m,h,g,y,w,T,_,b,I,E,S=null==e?void 0:e.playerId,k=o.getPlayer(S);if(null!=e&&null!==(n=e.comscore)&&void 0!==n&&n.enable){var A=ue(),O=(null==A||null===(i=A.video)||void 0===i?void 0:i.metadata)||[],P=(null==O?void 0:O.length)&&O.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=P)&&void 0!==r&&r.length){var D=P.map(function(e){return e.value});P=null==D?void 0:D.join(",")}f.destroyComscoreTag();var L,C,F,x=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,j=Array.isArray(null==x?void 0:x.category)?null==x||null===(l=x.category)||void 0===l?void 0:l.join(","):(null==x?void 0:x.category)||null,R=ct(ct(ct({},null==A?void 0:A.video),null==A?void 0:A.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==A?void 0:A.site)||null,programId:(null==x?void 0:x.videotmsid)||null,programTitle:(null==x?void 0:x.lcProgrammeName)||null,episodeId:(null==x?void 0:x.videotmsid)||null,seasonNumber:(null==A||null===(c=A.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==x||null===(p=x.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==A||null===(m=A.video)||void 0===m||null===(h=m.series)||void 0===h?void 0:h.episodeNumber)||(null==x||null===(g=x.seriesDetails)||void 0===g?void 0:g.episode)||null,episodeTitle:(null==x?void 0:x.lcSubTitle)||null,isCompleteEpisode:!!(null!=A&&null!==(y=A.video)&&void 0!==y&&y.series||null!=x&&null!==(w=x.seriesDetails)&&void 0!==w&&w.episode),genre:P||j,comscoreConfig:{implementationId:(null==e||null===(T=e.comscore)||void 0===T?void 0:T.implementationId)||null,projectId:(null==e||null===(_=e.comscore)||void 0===_?void 0:_.projectId)||null}}),V=null==e||null===(b=e.comscore)||void 0===b||null===(I=b.metadata)||void 0===I?void 0:I.contentType;if(null!=R&&null!==(E=R.streamingInfo)&&void 0!==E&&E.isLiveStream?R.contentType="Live":R.contentType=V||"LongFormOnDemand",null==R||!R.network){var M,W=(null==R?void 0:R.metadata)||[],N=null==W||null===(M=W.find(function(e){return"network"===e.name}))||void 0===M?void 0:M.value;R.network=N||null}null!=R&&R.network&&null!=R&&R.genre&&(R.customGenre="".concat(R.network,"_").concat((null==R?void 0:R.programTitle)||(L=R,null!=L&&L.series?null==L||null===(F=L.series)||void 0===F?void 0:F.title:null==L||null===(C=L.gist)||void 0===C?void 0:C.title),"_").concat(R.genre)),null!=x&&x.airDate&&(R.publishDate=x.airDate),null!=R&&R.runtime&&"function"==typeof k.duration&&(R.runtime=1e3*Math.ceil(k.duration()));var U=f.formulateComscorePayload(R,k);console.log("comscoreOptions player data",U),f.createComscoreStreamingTag(ct({playerName:"Video.js"},U)),f.setComscorePlayerInstance(k)}}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ht(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?mt(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):mt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function gt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return yt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var wt,Tt=function(){var e="";return{set:function(t){t&&(e=t)},get:function(){return e}}}(),_t=(wt=null,{set:function(e){wt=e},get position(){return wt}});function bt(e,t){return It.apply(this,arguments)}function It(){return(It=t(n.mark(function e(t,i){var r,a,l,s,d,u,c,f,p,m,h,g,y,w,T,_,b,I;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.getPlayer(t),l=qe(i,t),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=Be(u,t,i),c=St(u),f=v(c,2),p=f[0],m=f[1],h=Et(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var t=v(e,2),n=t[0],i=t[1];u.searchParams.set(n,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ht({adsParams:ht({},p)},h))});case 14:return g=e.sent,e.next=17,g.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,b=w+T,I=w+_,Tt.set(b),console.log("%c TRACKING URL","background: #bdf369; color: #000",b),l.src=I,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Et(e){var t;return Object.fromEntries(null==Object||null===(t=Object.entries(e))||void 0===t?void 0:t.map(function(e){var t=v(e,2),n=t[0],i=t[1];return[null==n?void 0:n.replace(/^aws\./,""),String(i)]}))||{}}function St(e){var t={};if(!e.split("?")[1])return[{},{}];var n,i=new URL(e,window.location.origin),r=gt((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(n=r.n()).done;){var o=v(n.value,2),a=o[0],l=o[1];t[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(t);u<c.length;u++){var f=v(c[u],2),p=f[0],m=f[1];if(p.startsWith("ads."))s[p.replace(/^ads\./,"")]=m;else d[p]=m}return[s,d]}var kt,At,Ot,Pt=new Map;function Dt(e,t){return Lt.apply(this,arguments)}function Lt(){return Lt=t(n.mark(function e(i,r){var a,l,s,d,u,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A,O,P,D,L;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,t,n,r,a,l){var s,d,u=o.getPlayer(i);if(!u.seeking()){var c=t.startTimeInSeconds;t.durationInSeconds,e<P&&O.clear(),P=e;var v=(null==t||null===(s=t.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,p=gt(n);try{var m=function(){var n,o,s,d=f.value,c=d.eventType,p=d.beaconUrls,m=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=m||0,w=p,T=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),b=Pt.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",Pt),e>=y&&!b.includes(_)){b.push(_),Pt.set("pod-".concat(a),b);try{D(c,t,w,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,t)}if("breakEnd"==c){var I=_t.position;_t.set(null),setTimeout(function(){null!=I&&(u.currentTime(I),l())},500)}if("function"==typeof T)try{var E,S={eventType:c,startTimeInSeconds:m,startTime:h,durationInSeconds:g,ad:null==t||null===(E=t.ads)||void 0===E?void 0:E[r],adIndex:r};T({adsData:S}),dt(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=ft.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,P=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,C=k.endComscoreAdTracking,F="".concat(y,"_").concat(v,"_").concat(c);if(!O.has(F))if(O.set(F,!0),"impression"===c){var x,j=Tt.get();P(A(ht(ht({},null==t||null===(x=t.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:j})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(p.s();!(f=p.n()).done;)m()}catch(e){p.e(e)}finally{p.f()}}},D=function(e,t,n,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})})},A=function(e){var t=Math.floor(e/60),n=Math.floor(e%60);return"".concat(t,":").concat(n.toString().padStart(2,"0"))},Pt.clear(),_t.set(r),m=Tt.get(),(h=o.getPlayer(i)).one("loadeddata",function(){m&&k(m)}),g=new Map,y=new Map,w=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,_=(null==h||null===(s=h.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,b=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,I=(null==h||null===(u=h.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,E=(null==h||null===(f=h.el())||void 0===f||null===(p=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,S=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==n?void 0:n.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==n?void 0:n.length)>1?null==n?void 0:n[(null==n?void 0:n.length)-1]:null==n?void 0:n[0],s=null==l||null===(t=l.trackingEvents)||void 0===t?void 0:t.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var t;return null==e||null===(t=e.beaconUrls)||void 0===t?void 0:t.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return ht(ht({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},k=function(){var e=t(n.mark(function e(t){var a,l,s,d,u,v,f,p,m,h,k,O,P,D,C,F,x,j,R,V,M,W,N,U;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",V),0===e.button&&x()},R=function(e){},j=function(){var e,t=h.currentTime(),n=null,i=gt(m);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));t>=o&&t<=l&&(n=l,g.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==n&&(console.log("Seeking to end of the ad pod:",n),setTimeout(function(){h.currentTime(n+2.2)},100))},x=function(){var e,t=h.currentTime(),n=null,i=gt(m);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(o+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(t>s||t>o)&&!g.has(o)||t>=o&&t<=s)&&(n=o,g.set(o,!0),y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==n&&(console.log("Seeking back to ad pod:",n),setTimeout(function(){h.currentTime(n+.4)},100))},u=!1,e.next=7,fetch(t);case 7:return v=e.sent,e.next=10,v.json();case 10:f=e.sent,p=f.avails,m=[],h=o.getPlayer(i),k=h.controlBar.progressControl,O=k.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,t){var n;0==t&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(n=e.ads)||void 0===n?void 0:n.length)>0&&(u=!0),m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&r&&(h.currentTime(r),j()),null!=m&&m.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),window.adsQueueList=m,"function"==typeof(F=(null===(P=window)||void 0===P||null===(D=P.customData)||void 0===D||null===(C=D.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&F(m)),console.log(m,"data"),m.forEach(function(e){var t=e.markerPositionInSeconds,n=e.ads,i=h.duration();if(!(t>i||Array.isArray(n)&&0==(null==n?void 0:n.length))){var r=t/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),h._timeUpdateHandler&&h.off("timeupdate",h._timeUpdateHandler),h._timeUpdateHandler=o.throttle(function(){var e=h.currentTime();if(e!==w){w=e;for(var t=!1,n=function(){var n=m[i],r=n.startTimeInSeconds,o=n.durationInSeconds,a=n.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(t=!0),e>l&&g.set(r,!0),et.disable(),T&&T.classList.add("vjs-hidden"),I&&(I.style.pointerEvents="none",I.classList.add("vjs-hidden")),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),k.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,v=0,f=0;f<a.length;f++){var p,h=null==a||null===(p=a[f])||void 0===p?void 0:p.durationInSeconds;if(d<u+h){v=f;break}u+=h}a[v];var w=Math.max(0,o-d),S=Math.round(w);M.style.display="block",U.textContent="".concat(v+1," of ").concat(a.length," • ").concat(A(S));var O=[];return null==a||a.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});O.push.apply(O,c(t))}),(null==n||null===(s=n.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&O.push.apply(O,c(null==n?void 0:n.podSlotImpressionBeacon)),L(e,n,O,v,i,j),"break"}y.delete(r)},i=0;i<m.length;i++){if("break"===n())break}t||(M.style.display="none",k.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),I&&(I.style.pointerEvents="auto",I.classList.remove("vjs-hidden")),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),et.enable())}},1e3),h.on("timeupdate",h._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){et.enabled&&"ArrowRight"==e.key&&(x(),Wn(i,10),e.stopPropagation())}),k.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",V))}),null===(s=document)||void 0===s||null===(d=s.querySelectorAll(".ssai-ad-container"))||void 0===d||d.forEach(function(e){return null==e?void 0:e.remove()}),(M=document.createElement("div")).className="ssai-ad-container",(W=document.createElement("div")).className="sponsored-adbox",(N=document.createElement("div")).className="sponsored-text",N.textContent="Sponsored Ad",W.append(N),(U=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(W),M.append(U),h.el().appendChild(M);case 44:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),O=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),Lt.apply(this,arguments)}function Ct(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function jt(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?xt(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Rt={},Vt=(null===(kt=window)||void 0===kt||null===(At=kt.location)||void 0===At||null===(Ot=At.search)||void 0===Ot?void 0:Ot.includes("debug=true"))||!1,Mt=null;function Wt(e){return Nt.apply(this,arguments)}function Nt(){return Nt=t(n.mark(function e(i){var r,a,l,s,d,u,v,f,p,m,h,g,y,w,T,_,b,I,E,S,k,A,O,P,D,L,C;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,t,n,r,a){var l,s,d=o.getPlayer(i);if(!d.seeking()){var u=t.startTimeInSeconds;t.durationInSeconds;var c=(null==t||null===(l=t.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=Ct(n);try{for(f.s();!(v=f.n()).done;){var p,m,h,g=v.value,y=g.eventType,w=g.beaconUrls,T=g.startTimeInSeconds,_=g.startTime,b=g.durationInSeconds,I=(g.eventId,T||u),E=w,S=(null===(p=window)||void 0===p||null===(m=p.customData)||void 0===m||null===(h=m.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);P.has(A)||P.set(A,new Set);var O=P.get(A);if(Vt&&console.warn(e,I,"map:",y,"condition1:",e>=I,"map:",P),e>=I&&e<=I+D&&!O.has(k)){O.add(k);try{L(y,t,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,t)}if("function"==typeof S)try{var C,F={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:b,ad:null==t||null===(C=t.ads)||void 0===C?void 0:C[r],adIndex:r};S({adsData:F}),dt(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var x=ft.get();if(x&&0!==Object.keys(x).length){var j=x.formulateComscoreAdPayload,R=x.startComscoreAdTracking,V=x.finishComscoreAdTracking,M=x.endComscoreAdTracking;if("impression"===y){var W,N=Tt.get();R(j(jt(jt({},null==t||null===(W=t.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:N})))}else"complete"===y?V():"breakEnd"===y&&M()}}}}catch(e){f.e(e)}finally{f.f()}}},L=function(e,t,n,i){var r,o,a;"breakEnd"===e&&(null===(r=Rt)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=Rt)||void 0===o?void 0:o.totalAds)&&(null==t||null===(a=t.ads)||void 0===a?void 0:a.length)>0||(Vt&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",t),null==n||n.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(t){console.warn("Beacon failed:",e,t)})}))},h=function(){Mt&&clearInterval(Mt)},p=Tt.get(),(m=o.getPlayer(i)).one("loadeddata",function(){h(),Mt=setInterval(function(){p&&!m.paused()&&O(p)},2e3)}),m.on("dispose",function(){h()}),g=new Map,y=new Map,w=-1,T=null,_=(null===(r=document)||void 0===r||null===(a=r.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==m||null===(l=m.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,I=(null==m||null===(s=m.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,E=(null==m||null===(d=m.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,S=(null==m||null===(v=m.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,k=!1,A=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==n?void 0:n.length))return c(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==n?void 0:n.length)>1?null==n?void 0:n[(null==n?void 0:n.length)-1]:null==n?void 0:n[0],s=null==l||null===(t=l.trackingEvents)||void 0===t?void 0:t.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var t;return null==e||null===(t=e.beaconUrls)||void 0===t?void 0:t.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return jt(jt({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},O=function(){var e=t(n.mark(function e(t){var r,a,l,s,d,u,v,f,p,m,h,O;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=new URL(t),T&&s.searchParams.append("nextToken",T),e.next=4,fetch(s.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,v=u.avails,f=u.nextToken||null,T=f,p=[],m=o.getPlayer(i),h=null==m||null===(r=m.controlBar)||void 0===r?void 0:r.progressControl,O=null==h||null===(a=h.seekBar)||void 0===a?void 0:a.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,t){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Vt&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach(function(e){var t=e.markerPositionInSeconds,n=e.ads,i=m.duration();if(!(t>i||Array.isArray(n)&&0==(null==n?void 0:n.length))){var r=t/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",O.appendChild(o)}}),m._timeUpdateHandler&&m.off("timeupdate",null==m?void 0:m._timeUpdateHandler),m._timeUpdateHandler=o.throttle(function(){if(Un(i)){var e=null==m?void 0:m.currentTime();if(e!==w){w=e;for(var t=function(){var t=p[n],i=t.startTimeInSeconds,r=t.durationInSeconds,o=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;k=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&g.set(i,!0),et.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),h.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,v=0;v<o.length;v++){var f,m=null==o||null===(f=o[v])||void 0===f?void 0:f.durationInSeconds;if(s<d+m){u=v;break}d+=m}setTimeout(function(){Rt.totalAds=null==o?void 0:o.length,Rt.currentAdIndex=u},1e3);var w=[];return null==o||o.forEach(function(e){var t=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});w.push.apply(w,c(t))}),(null==t||null===(l=t.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&w.push.apply(w,c(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,w,u),"break"}y.delete(i)},n=0;n<p.length;n++){if("break"===t())break}k||(Rt={},h.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),et.enable())}}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),P=new Map,D=2.5;case 22:case"end":return e.stop()}},e)})),Nt.apply(this,arguments)}var Ut=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Bt(e){return JSON.stringify((e||[]).map(function(e){return{availId:e.availId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds,ads:(e.ads||[]).map(function(e){return{adId:e.adId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds}})}}))}var Ht=function(){function e(t,n,i,r){p(this,e),this.video_=r,this.ad_=t,this.skipOffset_=function(e){if(!e)return null;var t=new RegExp(Ut.source,"g");t.lastIndex=0;var n=t.exec(e);if(!n)return null;var i=Number(n[1])||0,r=Number(n[2]),o=Number(n[3]),a=Number(n[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==t?void 0:t.skipOffset),this.adPosition_=n,this.totalAds_=i,this.isSkipped_=!1}return m(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,t;return null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,t,n,i,r,o;return(null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(n=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==n?n:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,t;return null!==(e=null===(t=this.ad_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),qt="impression",Gt="start",zt="mute",Qt="unmute",Yt="resume",Kt="pause",Xt="firstQuartile",Jt="midpoint",$t="thirdQuartile",Zt="complete",en="skip",tn="breakStart",nn="breakEnd",rn="skipStateChanged",on="ad_impression",an="ad_started",ln="ad_muted",sn="ad_volume_changed",dn="ad_resumed",un="ad_paused",cn="ad_first_quartile",vn="ad_midpoint",fn="ad_third_quartile",pn="ad_complete",mn="ad_stopped",hn="ad_skipped",gn="ad_skip_state_changed",yn="ad_break_started",wn="ad_break_ended",Tn="ads_loaded",_n="ad_cuepoints_changed";function bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function In(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?bn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):bn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function En(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Sn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var kn="[Transmit]";function An(e){var t,n,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(t=e.dashAvailabilityStartTime)&&void 0!==t?t:null,o=null!==(n=e.nextToken)&&void 0!==n?n:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,p,m;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(p=null!==(m=r)&&void 0!==m?m:e.data.dashAvailabilityStartTime)&&void 0!==p?p:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var On=function(){function e(t,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};p(this,e),this.video_=t,this.player_=n,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return m(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:Tn,loadTime:0})}},{key:"getCuePoints",value:function(){var e,t=new Map,n=En(this.adBreaks_);try{for(n.s();!(e=n.n()).done;){var i,r=En(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));t.has(s)||t.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){n.e(e)}finally{n.f()}return Array.from(t.values()).sort(function(e,t){return e.start-t.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var t,n;e.trackingUrl_&&(null!==(t=e.player_)&&void 0!==t&&null!==(n=t.paused)&&void 0!==n&&n.call(t)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=t(n.mark(function e(t){var i,r,o,a,l,s,d,u,c,v,f,p,m,h,g,y,w;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=An(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=En(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,p=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(p,f)}catch(e){c.e(e)}finally{c.f()}if((m=u.nextToken||null)&&m!==this.nextToken_){e.next=22;break}return this.nextToken_=m,e.abrupt("break",25);case 22:this.nextToken_=m,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),Bt(this.adBreaks_)!==Bt(y)&&(this.adBreaks_=y,w=this.getCuePoints(),this.onEvent_({type:_n,cuepoints:w}))):this.adBreaks_.length&&(this.onEvent_({type:_n,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),t&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(kn,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var t,n=1e6,i=En(e||[]);try{for(i.s();!(t=i.n()).done;){var r,o=t.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>n)return void(this.apiTimelineAbsolute_=!0);var a,l=En((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>n)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var t=this,n=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=t.resolveAbsoluteStart_(e,n,null);return In(In({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return In(In({},r),{},{startTimeInSeconds:t.resolveAbsoluteStart_(r,n,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,t,n,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=n&&n.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(n.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+t}},{key:"resolveDashAvailabilityStartTime_",value:(r=t(n.mark(function e(t,i){var r,o;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=8;break}if(r=new Date(t).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=t(n.mark(function e(){var t,i,r,o,a,l;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(t=a.querySelector("MPD"))||void 0===t?void 0:t.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(kn,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,t,n,i,r=(null===(e=this.player_)||void 0===e||null===(t=e.currentSrc)||void 0===t?void 0:t.call(e))||(null===(n=this.player_)||void 0===n||null===(i=n.src)||void 0===i?void 0:i.call(n));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,t,n=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(t=e.currentType)||void 0===t?void 0:t.call(e))||"").toLowerCase();return n.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,t,n=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(t=e.currentType)||void 0===t?void 0:t.call(e))||"").toLowerCase()||n.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,t,n=null===(e=this.player_)||void 0===e||null===(t=e.dash)||void 0===t?void 0:t.mediaPlayer;if(!n||"function"!=typeof n.time)return null;var i=n.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,t,n,i=null!==(e=null===(t=this.video_)||void 0===t?void 0:t.currentTime)&&void 0!==e?e:0,r=a.detectBrowser();if(this.isHlsSource_()){var o,l,s=i,d=null===(o=this.player_)||void 0===o||null===(l=o.seekable)||void 0===l?void 0:l.call(o);return d&&d.length>0&&(s=d.end(d.length-1)),Date.now()/1e3-(s-i)}if(this.isDashSource_()){var u,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var p=null===(u=this.player_)||void 0===u||null===(c=u.seekable)||void 0===c?void 0:c.call(u),m="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(p&&p.length>0){var h=p.start(0);if(h>1e6&&h+m>1e6)return h+m}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+m}return"Safari"===r?i:"function"==typeof(null===(n=this.player_)||void 0===n?void 0:n.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var t,n;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(t=null===(n=this.transmitAd_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==t?t:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(rn),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,t){if(t){var n=t.startTimeInSeconds+.25*t.durationInSeconds,i=t.startTimeInSeconds+.5*t.durationInSeconds,r=t.startTimeInSeconds+.75*t.durationInSeconds;e>=n&&!this.eventsSent_.has(Xt)&&(this.eventsSent_.add(Xt),this.sendTrackingEvent_(Xt)),e>=i&&!this.eventsSent_.has(Jt)&&(this.eventsSent_.add(Jt),this.sendTrackingEvent_(Jt)),e>=r&&!this.eventsSent_.has($t)&&(this.eventsSent_.add($t),this.sendTrackingEvent_($t))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,t=[Xt,Jt,$t];e<t.length;e++){var n=t[e];this.eventsSent_.has(n)||(this.eventsSent_.add(n),this.sendTrackingEvent_(n))}}},{key:"checkLinearAds_",value:function(e){var t,n=En(this.adBreaks_);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new Ht(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(tn),this.setupCurrentAdListeners_();break}}}}catch(e){n.e(e)}finally{n.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(nn),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,t,n,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(t=e.paused)&&void 0!==t&&t.call(e)?a=!0:(this.sendTrackingEvent_(qt),this.sendTrackingEvent_(Gt)),this.lastMutedForAd_=null!==(n=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==n&&n,this.attachAdListener_("volumechange",function(){var e,t,n,i=null!==(e=null===(t=o.player_)||void 0===t||null===(n=t.muted)||void 0===n?void 0:n.call(t))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_(zt):o.sendTrackingEvent_(Qt))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(qt),o.sendTrackingEvent_(Gt),a=!1):o.sendTrackingEvent_(Yt)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(Kt)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?en:Zt),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,t){this.player_&&(this.player_.on(e,t),this.globalListeners_.push({event:e,handler:t}))}},{key:"attachAdListener_",value:function(e,t){this.player_&&(this.player_.on(e,t),this.adListeners_.push({event:e,handler:t}))}},{key:"detachAdListeners_",value:function(){var e,t=En(this.adListeners_);try{for(t.s();!(e=t.n()).done;){var n,i,r=e.value,o=r.event,a=r.handler;null===(n=this.player_)||void 0===n||null===(i=n.off)||void 0===i||i.call(n,o,a)}}catch(e){t.e(e)}finally{t.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,t=En(this.globalListeners_);try{for(t.s();!(e=t.n()).done;){var n,i,r=e.value,o=r.event,a=r.handler;null===(n=this.player_)||void 0===n||null===(i=n.off)||void 0===i||i.call(n,o,a)}}catch(e){t.e(e)}finally{t.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=ft.get();if(!e||0===Object.keys(e).length)return;var t=e.formulateComscoreAdPayload,n=e.startComscoreAdTracking,i=Tt.get();n(t(In(In({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(kn,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var t,n=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(t){return t.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(t){return t.eventType===e})),i&&(null===(t=this.config_)||void 0===t||!t.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=En(i.beaconUrls||[]);try{var d=function(){var t=a.value;if(!t)return"continue";var i="".concat(l,"|").concat(e,"|").concat(t);if(n.firedBeacons_.has(i))return"continue";n.firedBeacons_.add(i),fetch(t,{mode:"no-cors"}).catch(function(e){console.warn(kn,"beacon failed",t,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=ft.get(),c=u&&Object.keys(u).length?u:null;switch(e){case qt:this.onEvent_({type:on}),this.startComscoreForCurrentAd_();break;case Gt:this.onEvent_({type:an,ad:this.ad_});break;case zt:this.onEvent_({type:ln});break;case Qt:this.onEvent_({type:sn});break;case Yt:this.onEvent_({type:dn});break;case Kt:this.onEvent_({type:un});break;case Xt:this.onEvent_({type:cn});break;case Jt:this.onEvent_({type:vn});break;case $t:this.onEvent_({type:fn});break;case Zt:this.onEvent_({type:pn}),this.onEvent_({type:mn}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case en:this.onEvent_({type:hn}),this.onEvent_({type:mn});break;case tn:this.onEvent_({type:yn});break;case nn:this.onEvent_({type:wn}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case rn:this.onEvent_({type:gn})}}else console.warn(kn,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function Pn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Dn(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Pn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Ln={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function Cn(e){if(null==e||!e.src)return null;var t=(e.type||"").toLowerCase(),n=String(e.src).toLowerCase();return"application/dash+xml"===t||n.includes(".mpd")?"dash":"application/x-mpegurl"===t||"application/vnd.apple.mpegurl"===t||n.includes(".m3u8")?"hls":null}function Fn(e,t,n){return xn.apply(this,arguments)}function xn(){return(xn=t(n.mark(function e(t,i,r){var o,a,l,s,d,u,c,v,f,p,m;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Cn(t)){e.next=3;break}return e.abrupt("return",t);case 3:return a=Be(t.src,r,i),l=a.replace(o,Ln[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",t);case 18:return v=new URL(l),f=v.hostname,p="https://".concat(f).concat(u),m="https://".concat(f).concat(c),Tt.set(m),console.log("[Transmit] session ready",{manifestUrl:p,trackingUrl:m}),e.abrupt("return",Dn(Dn({},t),{},{src:p}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",t);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var jn=null;function Rn(e,t){var n;if(jn)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),jn;var i=Tt.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o.getPlayer(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(n=r.el())||void 0===n?void 0:n.querySelector("video"))||null,l=function(e){try{var t="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(t).includes(".mpd"))return t}catch(e){}return null}(r);return(jn=new On(a,r,function(e){var n,i;console.log("[Transmit] ad event",e);var r=null==t||null===(n=t.customData)||void 0===n||null===(i=n.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),jn.addTrackingUrl(i),jn.onManifestUpdated(),jn}function Vn(){jn&&(jn.release(),jn=null)}function Mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var Wn=function(e,t){var n=i(e),r=n.currentTime()+t;n.currentTime(r)},Nn=function(e,t){var n=i(e),r=n.currentTime(),o=r<=t?0:r-t;n.currentTime(o)},Un=function(e){return!!i.getPlayer("".concat(e))},Bn=function(){var e=t(n.mark(function e(i,r){var l,s,d,u=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,ae();case 3:return s=e.sent,d=o.getPlayer(i),e.abrupt("return",new Promise(function(e,o){H(r,s).then(function(){var o=t(n.mark(function t(o){var s,u,c,v,f,p,m,h,g,y,w;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(Vn(),p=null==o?void 0:o.data,a.isBotUserAgent()||(window.sid=Ie()),p.contentType="linearchannel",p.channelId=null==r?void 0:r.channelId,m=(null===(s=window.customData)||void 0===s?void 0:s.ads)||(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v?void 0:v.adsConfig)||{},h=!(null==p||null===(f=p.linearchannel)||void 0===f||!f.isSSAIEnabled),g=h&&"MEDIA_TAILOR"==(null==m?void 0:m.vodAdSticherProvider),y=h&&"TRANSMIT"==(null==m?void 0:m.liveAdSticherProvider)&&!(null==m||!m.liveAdClientSideTracking),w=qe(p,i),!g){t.next=17;break}return t.next=13,bt(i,p);case 13:w=t.sent,l=!0,t.next=22;break;case 17:if(!y){t.next=22;break}return t.next=20,Fn(w,p,i);case 20:w=t.sent,l=!0;case 22:de(p),w&&l?(Gn(i,w),y?Rn(i,{customData:window.customData||{ads:m}}):g&&Wt(i),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:p})})):(ft.get()&&0!==Object.keys(ft.get()).length&&pt({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:p}));case 24:case"end":return t.stop()}},t)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Hn=function(){var e=t(n.mark(function e(i,r,a){var l,s,u,c,v,f,p;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ae();case 2:return c=e.sent,console.log("load video"),(ce()||null)&&fe(r),v=0,f=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(u=s.watchHistory)&&void 0!==u&&u.enable&&G(r,c).then(function(e){var t,n,i,r,o,a,l,s,d;(null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n||!n.cb||null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.isExternal||null===(o=window)||void 0===o||null===(a=o.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data),v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,(f=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedPercentage)||null)<95)&&(p=(null==e||null===(d=e.data)||void 0===d?void 0:d.watchedTime)||null)}).catch(function(){}),e.abrupt("return",new Promise(function(e,a){B(r,c).then(function(){var r=t(n.mark(function t(r){var l,s,u,c,m,h,g,y,w,T,_,b,I,E,S,k,A,O,P,D,L,C,F,x,j,R,V,M,W,N,U,B,H,q,G,z,Q,Y,K,X,J;return n.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(k=null==r?void 0:r.data,A=(null==k?void 0:k.contentType)||"video",O=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},P=!(null==k||null===(m=k[A])||void 0===m||!m.isSSAIEnabled),D=P&&"MEDIA_TAILOR"==(null==O?void 0:O.vodAdSticherProvider),L=P&&"TRANSMIT"==(null==O?void 0:O.liveAdSticherProvider)&&!(null==O||!O.liveAdClientSideTracking),C=!(null==k||null===(h=k[A])||void 0===h||null===(g=h.streamingInfo)||void 0===g||!g.isLiveStream)||"linearchannel"===A,de(r.data),(F=(null==k||null===(y=k.ads)||void 0===y||null===(w=y.preRoll)||void 0===w||null===(T=w.adTags)||void 0===T||null===(_=T.web)||void 0===_?void 0:_.active)&&(null==k||null===(b=k.ads)||void 0===b||null===(I=b.preRoll)||void 0===I||null===(E=I.adTags)||void 0===E||null===(S=E.web)||void 0===S?void 0:S.url))&&$e(i,F,k),x=qe(k,i),!D){t.next=17;break}return t.next=14,bt(i,k);case 14:x=t.sent,t.next=22;break;case 17:if(!L||!C){t.next=22;break}return Vn(),t.next=21,Fn(x,k,i);case 21:x=t.sent;case 22:x?(G=(null==k||null===(j=k.video)||void 0===j||null===(R=j.gist)||void 0===R?void 0:R.videoImageUrl)||(null==k||null===(V=k.video)||void 0===V||null===(M=V.gist)||void 0===M||null===(W=M.imageGist)||void 0===W?void 0:W.r16x9),(z=o.getPlayer(i)).poster(G),Gn(i,x),L&&C?Rn(i,{customData:window.customData||{ads:O}}):D&&Dt(i,p),z.on("loadstart",function(){C&&e({status:!0,msg:"Video Loaded",response:k})}),z.on("loadeddata",function(){Xe(),e({status:!0,msg:"Video Loaded",response:k})}),z.one("play",function(){!v||D||L&&C||f<95&&setTimeout(function(){z.currentTime(v)},0)}),z.one("error",function(){var e;a({status:!1,msg:(null==z||null===(e=z.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==k||null===(N=k.video)||void 0===N||null===(U=N.contentDetails)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0||(null==k||null===(H=k.video)||void 0===H||null===(q=H.closedCaptions)||void 0===q?void 0:q.length)>0?(J=(null==k||null===(Y=k.video)||void 0===Y||null===(K=Y.contentDetails)||void 0===K?void 0:K.closedCaptions)||(null==k||null===(X=k.video)||void 0===X?void 0:X.closedCaptions),Q=J.filter(function(e){return"VTT"===e.format}),d.addCaptions(i,Q)):d.removeCaptions(i)):(Ke(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 23:case"end":return t.stop()}},t)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){zn(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),qn=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()},Gn=function(e,t){console.log("load video in core",t);var n=o.getPlayer(e);n&&n.src(t)},zn=function(t,n,i,r){var o,a,l,s,d,u,c=null==t||null===(o=t.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==t?void 0:t.message);Un(n)&&Ke(n,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Mn(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Mn(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},r&&{videoId:r}))};exports.authenticateLC=Bn,exports.baseUrlManager=Q,exports.classifyRequestKind=function(e,t){var n=String(t||"").toLowerCase();if(n.includes("license"))return"license";if(n.includes("certificate"))return"server_certificate";if(n.includes("manifest"))return"manifest";if(n.includes("key"))return"key";if(n.includes("segment")||n.includes("media"))return"segment";var i=String(e||"").split("?")[0].toLowerCase();return i.endsWith(".mpd")||i.endsWith(".m3u8")||i.endsWith(".ism/manifest")?"manifest":/\.(m4s|mp4|m4a|m4v|ts|aac|webm|cmf[av]|mp4a)$/.test(i)?"segment":/license|widevine|playready|fairplay|drm/.test(i)?"license":/cert|certificate/.test(i)?"server_certificate":/\.key($|\?)/.test(i)||/\/key\//.test(i)?"key":"other"},exports.clearError=Xe,exports.comscoreInstanceManager=ft,exports.createIdxMapping=function(e){ee=new Map,e.map(function(e,t){ee.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;z({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),te=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var r=t.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){Vn();var t=o.getPlayer(e),n=(ft.get()||{}).destroyComscoreTag;if(qn(),n&&n(),o.clearEventListeners(),window.onresize=null,t)t.dispose();else{var i=document.getElementById(e);i&&i.remove()}},exports.emitApiErrorEvent=R,exports.extractStatusCode=function(e,t){for(var n=0,i=[null==e?void 0:e.statusCode,null==e?void 0:e.status,null==e?void 0:e.code,null==t?void 0:t.statusCode,null==t?void 0:t.status,null==t?void 0:t.code];n<i.length;n++){var r=Number(i[n]);if(Number.isFinite(r)&&r>0)return r}return null},exports.getCurrentSeries=ce,exports.getCurrentVideo=ue,exports.getDecodedToken=le,exports.getEntitlementData=function(e,t,n,i){var o,a;return r({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0}).catch(function(t){throw R(n,t,"content",{id:e,url:n}),t})},exports.getEpisodeNumber=xe,exports.getLinearChannelDetails=H,exports.getSGAIEnabledSource=bt,exports.getSeasonNumber=Fe,exports.getSeriesDetails=function(e,t){var n,i,o=le(t),a=(null==o?void 0:o.site)||null;if(null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData)return 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})});var l=Q.get()+"/v3/content/series/".concat(e);return r({url:l,params:{site:a},method:"GET",headers:{Authorization:t}}).catch(function(t){throw R(l,t,"content",{id:e}),t})},exports.getSeriesWatchHistory=z,exports.getSeriesWatchMap=function(){return te},exports.getSource=qe,exports.getSsaiEvents=function(e){var t=o.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var n=function(e,n){var i=function(e,t){return n(t)};return t.on(e,i),function(){return t.off(e,i)}};return{adBreakStart:function(e){return n(tt,e)},adImpression:function(e){return n(nt,e)},adFirstQuartile:function(e){return n(it,e)},adMidpoint:function(e){return n(rt,e)},adThirdQuartile:function(e){return n(ot,e)},adComplete:function(e){return n(at,e)},adBreakEnd:function(e){return n(lt,e)}}},exports.getToken=ae,exports.getTransmitEnabledSource=Fn,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var r=n.split(".com")[1]||"";return{src:r?"".concat(t).concat(r):n,type:i}},exports.getUserId=Ee,exports.getVideoDetails=B,exports.getVideoIdx=function(){return Z},exports.getVideoInfo=G,exports.handleError=Ke,exports.initialiseAdvertisement=$e,exports.initialiseComscoreStreamingTracking=pt,exports.initialiseKeyboardEvents=function(e,t){var n,i,r,a=o.getPlayer(e),l=null==a||null===(n=a.controlBar)||void 0===n||null===(i=n.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(n){var i,r,o,d,u,c,v,f,p;if(et.enabled&&!n.metaKey&&!n.ctrlKey&&"input"!=n.target.localName&&"textarea"!=n.target.localName){var m=n.key,h=!0===t.liveVideo||!0===t.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(n.preventDefault(),null==s||s.focus()),m){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===t.liveui||Nn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(p=f.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;h||Wn(e,10)}}},!0)},exports.initializeTransmit=Rn,exports.initiateErrorHandling=zn,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&!a.isBotUserAgent()){var n=I.getConfig();if(null==n||!n.disableBeacon){null!=t&&t.userId&&(ye=t.userId);var i=o.getPlayer(e);window.initialise(i,null==t?void 0:t.analyticsCb),window.firstFrame(i,null==t?void 0:t.analyticsCb,null==t?void 0:t.analyticsEventParams),window.endFirstFrame(i),window.watchLive(i)}}},exports.isDrmError=E,exports.isDrmRequestKind=function(e){return S.has(e)},exports.isHttpOk=function(e){return null==e||e>=200&&e<400},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=Un,exports.isTokenExpired=Y,exports.load=Hn,exports.loadVideo=Gn,exports.loadVideoInstantly=function(e,t,n){var i=o.getPlayer(e);return i.src(t),new Promise(function(e,t){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.playerConfigManager=I,exports.refreshTokenManager=X,exports.rewind=Nn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],h("js",new Date),h("config",e)},exports.saveWatchHistory=q,exports.seasonIdxManager=pe,exports.setCurrentSeries=function(e){J=e},exports.setCurrentVideo=de,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=ve,exports.setVideoIdxById=fe,exports.setupAdvertisementMarkers=Dt,exports.setupAdvertisementMarkersForLinear=Wt,exports.skip=Wn,exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},exports.trackMap=Pt,exports.trackingUrlManager=Tt,exports.videoReplayTracker=se;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./index-
|
|
1
|
+
"use strict";require("./index-de1dab2f.js");var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("./skin-16ae23af.js"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),a=require("./generic-c66535a6.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var s="my-player";function l(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function c(){return(c=e(t.mark(function e(r){var n,a,u,o,s,l,c,p,d,f,m,b,g,h,v,x,y,k,w,E,j,N,T,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return a=e.sent,e.next=11,createImageBitmap(a);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=i(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,f=[],m=0;m<l;m++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,m*d,p,d,0,0,p,d),h=g.toDataURL("image/png"),f.push({uri:h,duration:r.duration}),r._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),v=r.layout.split("x").map(Number),x=i(v,2),y=x[0],k=x[1],w=[],E=0;E<y*k;E++)w.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(T=N.appcmsMain)||void 0===T||null===(A=T.images)||void 0===A?void 0:A.placeholderCover,duration:r.duration});return e.abrupt("return",w);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function p(e,t){return d.apply(this,arguments)}function d(){return(d=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",l(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=r.getPlayer(s);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,l=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),n),p=t[l];p&&!p.loading&&(p.loading=!0,function(e){return c.apply(this,arguments)}(p).then(function(e){var t=e[p.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),p.loading=!1,p.src=t.uri}))}}function m(e){return b.apply(this,arguments)}function b(){return(b=e(t.mark(function e(a){var u,s,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},a.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),a=i(r,2),s=a[0]*a[1],l=e.duration,c=0;c<s;c++){var p,d=Math.round((t*s+c)*l);u[d]=o(o({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},n(p,"left","-60px"),n(p,"border","1px solid transparent"),n(p,"borderRadius","4px"),p)})}}),s=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r.throttle(function(e){return f(e,u,s)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r.throttle(function(e){return f(e,u,s)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var g=function(){var r=e(t.mark(function e(r,n){var a,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return a=e.sent,e.next=5,a.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=i(t,2),n=r[0],a=r[1];n&&a&&(l[n.trim().toLowerCase()]=a.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function v(e,t){return x.apply(this,arguments)}function x(){return(x=e(t.mark(function e(n,u){var o,l,c,p,d,f,m,b,g,v,x,w,E,j,N,T,A,O,I,S,P,M,R,q,$,B,L,D,C,U,X,_,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,fe,me;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=u,o=r.getPlayer(u),l=n.split("/"),c=l.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?l.slice(0,c+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),w=(null==o?void 0:o.duration())||(null===(d=a.getCurrentVideo())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),E=(null==x||null===(m=x.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(T=j[N]).getAttribute("contentType")||"image/png"!==T.getAttribute("mimeType"))&&"image/jpeg"!==T.getAttribute("mimeType")){e.next=69;break}if(O=T.getElementsByTagName("SegmentTemplate")[0],I=null===(A=O.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!O||!I){e.next=48;break}if(M=I.getElementsByTagName("S"),R=parseInt(null===(S=M[0])||void 0===S?void 0:S.getAttribute("t")),q=parseInt(null===(P=M[0])||void 0===P?void 0:P.getAttribute("d")),$=T.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],L=B.getAttribute("value"),D=null==L?void 0:L.split("x"),C=i(D,2),U=C[0],X=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?q/_:q)/(U*X),W=$.getAttribute("id"),z=Math.round(w/F),G=Math.ceil(z/(U*X)),V=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:L,uri:K+J.replace("$Time$",R+N*q).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=T.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=i(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=Q.getAttribute("id"),se=Math.round(w/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=y(ce),N=0;N<le;N++)me=fe?k(fe,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+me.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function y(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function w(){return(w=e(t.mark(function e(n){var i,a,u,o,s,l,c,d,f,b,h,x,y,k,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.getPlayer(n),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,p(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return f=(null==d?void 0:d[0])||null,b=f.uri,h=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,g(h,b);case 12:return x=e.sent,e.next=15,m(x);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,v(c,n);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,m(k);case 26:w=e.sent,s.thumbnails(w);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.initiateTrickplay=function(e){return w.apply(this,arguments)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),s=require("./skin-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),s=require("./skin-16ae23af.js");function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var a=u.getComponent("Component"),o=function(){r(m,a);var o,c,h=(o=m,c=n(),function(){var e,t=l(o);if(c){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return i(this,e)});function m(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),(r=h.call(this,t,i)).playerId=i.playerId,r.mute_state=t.muted()||!1,r.initialiseStructure(),r}return t(m,[{key:"createEl",value:function(){return u.dom.createEl("div",{className:"vjs-custom-big-mute vjs-control ".concat(this.mute_state?"":"hide"," tl")})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.getPlayer(this.playerId);null!=this&&this.mute_state&&e.classList.toggle("hide"),s.injectSVG(e,"#vjs-icon-big-mute"),e.onclick=function(){var r=null==t?void 0:t.volume();e.classList.toggle("hide"),t.muted()&&t.muted(!1),t.volume(0==r?100:r)},t.on("volumechange",function(){var r=t.volume();t.muted()?(e.classList.toggle("hide"),t.volume(r)):r>0?e.classList.add("hide"):0==r&&e.classList.remove("hide")})}}]),m}();exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,i,a=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-16ae23af.js"),r=require("./generic-c66535a6.js"),o=require("./autoNextVideo-5bd449e1.js"),d=require("./relatedVideosManager-0a220d05.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=[],m=!1,v=null,p=!1,f=null,g=null,h=null,x=null,y=null,C=function(){null!=v&&(clearInterval(v),v=null),p=!1},E="next-ep-preview-player-thumb",w=function(e,t){if(e){var n,i,a,l,r;(null==(n=t)||null===(i=n.gist)||void 0===i||null===(a=i.imageGist)||void 0===a?void 0:a.r16x9)||(null==n?void 0:n.img)||null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r||r.fallbackImage;var o=e.getElementsByClassName(E)[0];o||((o=document.createElement("div")).className=E,o.setAttribute("aria-hidden","true"),e.appendChild(o))}},N=function(e,t){if(e){var n=e.getElementsByClassName(E)[0];n&&(n.style.visibility=t?"visible":"hidden")}},b=function(){var e=document.createElement("div");e.className="next-heading-wrapper";var t=document.createElement("div");t.className="next-ep-header";var n=document.createElement("span");n.className="next-ep-header-text",n.textContent="Next up in";var i=document.createElement("span");return i.className="next-ep-duration",i.textContent="10",t.append(n,i),e.append(t),e},A=function(e,t,n,i){var a,r,o,d,u,s=null!=e&&e.isClip?null==e?void 0:e.seriesTitle:null==e?void 0:e.title,c=(null==e||null===(a=e.gist)||void 0===a?void 0:a.description)||(null==e?void 0:e.description)||"",v=document.createElement("div");v.className="next-ep-content";var p=document.createElement("div");p.className="next-ep-thumb-wrap";var f=document.createElement("img");f.className="next-ep-img",f.alt="",f.src=(null==e||null===(r=e.gist)||void 0===r||null===(o=r.imageGist)||void 0===o?void 0:o.r16x9)||(null==e?void 0:e.img)||(null===(d=window)||void 0===d||null===(u=d.customData)||void 0===u?void 0:u.fallbackImage);var g=function(e){if(null==e||Number.isNaN(Number(e)))return"";var t=Math.floor(Number(e)),n=Math.floor(t/60),i=t%60;return"".concat(n,":").concat(String(i).padStart(2,"0"))}(null==e?void 0:e.runtime),h=document.createElement("div");h.className="next-ep-thumb-runtime",h.textContent=g,g||h.classList.add("next-ep-thumb-runtime--empty"),p.appendChild(f),p.appendChild(h);var x=document.createElement("div");x.className="next-ep-meta";var y=document.createElement("div");y.className="next-ep-title",y.textContent="".concat(s||"");var E=document.createElement("div");E.className="next-ep-desc",E.textContent=c||"",String(c||"").trim()||E.classList.add("next-ep-desc--empty");var w=document.createElement("div");w.className="next-ep-meta-row";var N=document.createElement("span");N.className="next-ep-badge";var b=function(e){if(null==e?void 0:e.isClip)return"CLIP"}(e);N.textContent=b,b||N.classList.add("next-ep-badge--empty");var A=document.createElement("span");A.className="next-ep-episode",A.textContent=function(e){if(!e||"string"!=typeof e)return"";var t=e.match(/^S(\d+)\s*E(\d+)$/i)||e.match(/^S(\d+)E(\d+)$/i);return t?"S".concat(t[1]," E").concat(Number(t[2])):e}(null==e?void 0:e.episodeDisplayAttribute)||"";var I=document.createElement("div");I.className="next-ep-meta-row-left",I.appendChild(N),I.appendChild(A);var B=document.createElement("img");B.className="next-ep-network-logo",B.alt="";var S=function(e){var t,n,i;if(e){var a=null===(t=window)||void 0===t||null===(n=t.app_data)||void 0===n||null===(i=n.appcmsMain)||void 0===i?void 0:i.networks;if(e&&a){var l=null==a?void 0:a.find(function(t){if(t.identifier==e)return t});return null==l?void 0:l.badgeImage}}}(null==e?void 0:e.network);S?B.src=S:B.classList.add("next-ep-network-logo--empty"),w.appendChild(I),x.appendChild(y),x.appendChild(E),x.appendChild(w);var P=document.createElement("div");return P.className="next-ep-meta-with-logo",P.appendChild(x),P.appendChild(B),v.appendChild(p),v.appendChild(P),v.onclick=l.debounce(function(){C(),null==t||t.remove(),m=!0,L(n)},400),v},L=function(e,t){var n=l.getPlayer(e);if(n){var i=n.duration();if(Number.isFinite(i)&&!(i<=0)){n.pause(e);var a=r.getVideoIdx();o.switchToNext(a,e,c)}}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,i,a,l;for(i in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in a=t[i])a.hasOwnProperty(l)&&("object"===u(a[l])?n[l]=e(n[l],a[l]):n[l]=a[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},i=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",function(a){var l,r,o,d,u,s,c,m;function v(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",v),m()}r=t({},e,a),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),l.appendChild(o),o.src=r[0].src,o.className="vjs-thumbnail",t(o.style,r[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),s=d.duration(),d.on("durationchange",function(e){s=d.duration()}),d.on("loadedmetadata",function(e){s=d.duration()}),(u=d.controlBar.progressControl).el().appendChild(l),c=function(e){var a,d,c,m,v,p,f,g,h,x;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=i(u.el()).getBoundingClientRect()).width||x.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),m=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m-=i(u.el()).getBoundingClientRect().left+h,a=Math.floor((m-u.el().offsetLeft)/u.width()*s),r)a>d&&(c=Math.max(c,d));(v=r[c]).src&&o.src!=v.src&&(o.src=v.src),v.style&&o.style!=v.style&&t(o.style,v.style),m+(g=function(e,t){var i;return t?parseFloat(t):"auto"!==(i=n(e)("clip"))&&"inherit"!==i&&4===(i=i.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(i[1])-parseFloat(i[3]):0}(o,v.width||r[0].width)/2)>f?m-=m+g-f:m<g&&(m=g),l.style.left=m+"px"},u.on("mousemove",c),u.on("touchmove",c),u.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",v)}),m=function(e){l.style.left="-1000px"},u.on("mouseout",m),u.on("touchcancel",m),u.on("touchend",m),d.on("userinactive",m)}),exports.addNextEpPreview=function e(t,n){var i;if(m=!1,x=t,y=n,h&&(h(),h=null),null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable){var o;c=[];var u=r.getCurrentSeries();null==u||u.map(function(e){var t;return(t=c).push.apply(t,a(e.episodes))}),null==n||null===(o=n.series)||void 0===o||o.cb}else{var s=d.relatedVideosManager.get();c=(null==s?void 0:s.content)||[],null==s||s.cb,h=d.relatedVideosManager.subscribe(function(){h&&(h(),h=null),x&&y&&e(x,y)})}var E=l.getPlayer(t);if(E){!function(e){e&&g&&(e.off("timeupdate",g),g=null)}(l.getPlayer(f)),C(),f=t,g=function(){var e,n;if(!m){var i=E.duration(),a=E.currentTime(),l=Number.isFinite(i)&&i>0?i-a:1/0,o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0],d=document.getElementById(t),u=r.getVideoIdx()<=(null===(n=c)||void 0===n?void 0:n.length)-1;if(l>1){if(null!=v||p){C();var s=null==o?void 0:o.querySelector(".next-ep-header .next-ep-duration");s&&(s.textContent="10")}return o&&(o.style.visibility="hidden"),void N(d,!1)}u?(o&&(o.style.visibility="visible"),N(d,!0),p||null!=v||(E.pause(t),p=!0,function(e){var t;if(null==v){var n=null===(t=document.getElementsByClassName("next-ep-preview"))||void 0===t?void 0:t[0],i=null==n?void 0:n.querySelector(".next-ep-header .next-ep-duration");if(i){var a=10;i.textContent="10",v=setInterval(function(){a--,i.textContent=String(a),0===a&&(clearInterval(v),v=null,p=!1,c.filter(function(e,t){return t==r.getVideoIdx()}),L(e))},1e3)}}}(t))):N(d,!1)}},E.on("timeupdate",g);var I,B=c.filter(function(e,t){return t==r.getVideoIdx()});if((null==B?void 0:B.length)>0)if(null!==(I=document.getElementsByClassName("next-ep-preview"))&&void 0!==I&&I[0]){var S,P,q=null===(S=document.getElementsByClassName("next-ep-preview"))||void 0===S?void 0:S[0];q.style.visibility="hidden",null===(P=q.querySelector(".next-ep-preview-inner"))||void 0===P||P.remove(),Array.from(q.children).forEach(function(e){e.classList.contains("next-ep-content")&&e.remove()});var k=q.querySelector(".next-heading-wrapper");if(k){var j=k.querySelector(".next-ep-header"),M=null==j?void 0:j.querySelector(".next-ep-duration");if(!M&&j){j.textContent="";var V=document.createElement("span");V.className="next-ep-header-text",V.textContent="Next up in",(M=document.createElement("span")).className="next-ep-duration",M.textContent="10",j.append(V,M)}else M&&(M.textContent="10")}else k=b(),q.insertBefore(k,q.firstChild);q.appendChild(A(B[0],q,t));var T=document.getElementById(t);w(T,B[0]),N(T,!1)}else{var O=document.createElement("div");O.className="next-ep-preview",O.style.visibility="hidden";var F=document.getElementById(t);F.append(O);var X=b();O.append(X);var D=A(B[0],O,t);O.append(D),w(F,B[0]),N(F,!1)}}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),i=null==t?void 0:t.tvProviderLogoUrl;if(i){var a=document.createElement("div");a.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(i),r.alt="Provider Image",a.append(r),n.el().appendChild(a),n.on("useractive",function(){a.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||a.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?a.style.top="3.2rem":a.style.top="1rem"})}};
|