;OATH = window.OATH || {};OATH.VideoPlatform = OATH.VideoPlatform || {};OATH.VideoPlatform.PlayerHosting = {"app":"omega","bucket":null,"colo":"ir2","dbColo":"eu-west-1","env":"prod","ver":"8.0.85","config":null,"expiry":300,"req":{"ypv":null,"path":"/p/oath/js/1/action.gif","usm":{"bucket":"Horizon_D","config":null}},"type":"oath-player-desktop.js","g":[],"gv":2};

!function(t){function e(e){for(var n,i,r=e[0],o=e[1],s=0,a=[];s<r.length;s++)i=r[s],P[i]&&a.push(P[i][0]),P[i]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(D&&D(e);a.length;)a.shift()()}var n=window.webpackHotUpdate;window.webpackHotUpdate=function(t,e){!function(t,e){if(!b[t]||!E[t])return;for(var n in E[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(_[n]=e[n]);0==--y&&0===v&&I()}(t,e),n&&n(t,e)};var i,r=!0,o="c3415ba11024a5e2fc03",s=1e4,a={},u=[],l=[];function c(t){var e=R[t];if(!e)return L;var n=function(n){return e.hot.active?(R[n]?-1===R[n].parents.indexOf(t)&&R[n].parents.push(t):(u=[t],i=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),u=[]),L(n)},r=function(t){return{configurable:!0,enumerable:!0,get:function(){return L[t]},set:function(e){L[t]=e}}};for(var o in L)Object.prototype.hasOwnProperty.call(L,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,r(o));return n.e=function(t){return"ready"===h&&p("prepare"),v++,L.e(t).then(e,function(t){throw e(),t});function e(){v--,"prepare"===h&&(g[t]||T(t),0===v&&0===y&&I())}},n.t=function(t,e){return 1&e&&(t=n(t)),L.t(t,-2&e)},n}var d=[],h="idle";function p(t){h=t;for(var e=0;e<d.length;e++)d[e].call(null,t)}var f,_,m,y=0,v=0,g={},E={},b={};function A(t){return+t+""===t?+t:t}function S(t){if("idle"!==h)throw new Error("check() is only allowed in idle status");return r=t,p("check"),function(t){return t=t||1e4,new Promise(function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var i=new XMLHttpRequest,r=L.p+""+o+".hot-update.json";i.open("GET",r,!0),i.timeout=t,i.send(null)}catch(t){return n(t)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)n(new Error("Manifest request to "+r+" timed out."));else if(404===i.status)e();else if(200!==i.status&&304!==i.status)n(new Error("Manifest request to "+r+" failed."));else{try{var t=JSON.parse(i.responseText)}catch(t){return void n(t)}e(t)}}})}(s).then(function(t){if(!t)return p("idle"),null;E={},g={},b=t.c,m=t.h,p("prepare");var e=new Promise(function(t,e){f={resolve:t,reject:e}});for(var n in _={},P)T(n);return"prepare"===h&&0===v&&0===y&&I(),e})}function T(t){b[t]?(E[t]=!0,y++,function(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("script");n.charset="utf-8",n.src=L.p+""+t+"."+o+".hot-update.js",e.appendChild(n)}(t)):g[t]=!0}function I(){p("ready");var t=f;if(f=null,t)if(r)Promise.resolve().then(function(){return C(r)}).then(function(e){t.resolve(e)},function(e){t.reject(e)});else{var e=[];for(var n in _)Object.prototype.hasOwnProperty.call(_,n)&&e.push(A(n));t.resolve(e)}}function C(e){if("ready"!==h)throw new Error("apply() is only allowed in ready status");var n,i,r,s,l;function c(t){for(var e=[t],n={},i=e.slice().map(function(t){return{chain:[t],id:t}});i.length>0;){var r=i.pop(),o=r.id,a=r.chain;if((s=R[o])&&!s.hot._selfAccepted){if(s.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(s.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var u=0;u<s.parents.length;u++){var l=s.parents[u],c=R[l];if(c){if(c.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([l]),moduleId:o,parentId:l};-1===e.indexOf(l)&&(c.hot._acceptedDependencies[o]?(n[l]||(n[l]=[]),d(n[l],[o])):(delete n[l],e.push(l),i.push({chain:a.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function d(t,e){for(var n=0;n<e.length;n++){var i=e[n];-1===t.indexOf(i)&&t.push(i)}}e=e||{};var f={},y=[],v={},g=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var E in _)if(Object.prototype.hasOwnProperty.call(_,E)){var S;l=A(E);var T=!1,I=!1,C=!1,O="";switch((S=_[E]?c(l):{type:"disposed",moduleId:E}).chain&&(O="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":e.onDeclined&&e.onDeclined(S),e.ignoreDeclined||(T=new Error("Aborted because of self decline: "+S.moduleId+O));break;case"declined":e.onDeclined&&e.onDeclined(S),e.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+O));break;case"unaccepted":e.onUnaccepted&&e.onUnaccepted(S),e.ignoreUnaccepted||(T=new Error("Aborted because "+l+" is not accepted"+O));break;case"accepted":e.onAccepted&&e.onAccepted(S),I=!0;break;case"disposed":e.onDisposed&&e.onDisposed(S),C=!0;break;default:throw new Error("Unexception type "+S.type)}if(T)return p("abort"),Promise.reject(T);if(I)for(l in v[l]=_[l],d(y,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,l)&&(f[l]||(f[l]=[]),d(f[l],S.outdatedDependencies[l]));C&&(d(y,[S.moduleId]),v[l]=g)}var w,M=[];for(i=0;i<y.length;i++)l=y[i],R[l]&&R[l].hot._selfAccepted&&M.push({module:l,errorHandler:R[l].hot._selfAccepted});p("dispose"),Object.keys(b).forEach(function(t){!1===b[t]&&function(t){delete P[t]}(t)});for(var D,N,k=y.slice();k.length>0;)if(l=k.pop(),s=R[l]){var B={},x=s.hot._disposeHandlers;for(r=0;r<x.length;r++)(n=x[r])(B);for(a[l]=B,s.hot.active=!1,delete R[l],delete f[l],r=0;r<s.children.length;r++){var U=R[s.children[r]];U&&((w=U.parents.indexOf(l))>=0&&U.parents.splice(w,1))}}for(l in f)if(Object.prototype.hasOwnProperty.call(f,l)&&(s=R[l]))for(N=f[l],r=0;r<N.length;r++)D=N[r],(w=s.children.indexOf(D))>=0&&s.children.splice(w,1);for(l in p("apply"),o=m,v)Object.prototype.hasOwnProperty.call(v,l)&&(t[l]=v[l]);var j=null;for(l in f)if(Object.prototype.hasOwnProperty.call(f,l)&&(s=R[l])){N=f[l];var F=[];for(i=0;i<N.length;i++)if(D=N[i],n=s.hot._acceptedDependencies[D]){if(-1!==F.indexOf(n))continue;F.push(n)}for(i=0;i<F.length;i++){n=F[i];try{n(N)}catch(t){e.onErrored&&e.onErrored({type:"accept-errored",moduleId:l,dependencyId:N[i],error:t}),e.ignoreErrored||j||(j=t)}}}for(i=0;i<M.length;i++){var V=M[i];l=V.module,u=[l];try{L(l)}catch(t){if("function"==typeof V.errorHandler)try{V.errorHandler(t)}catch(n){e.onErrored&&e.onErrored({type:"self-accept-error-handler-errored",moduleId:l,error:n,originalError:t}),e.ignoreErrored||j||(j=n),j||(j=t)}else e.onErrored&&e.onErrored({type:"self-accept-errored",moduleId:l,error:t}),e.ignoreErrored||j||(j=t)}}return j?(p("fail"),Promise.reject(j)):(p("idle"),new Promise(function(t){t(y)}))}var R={},P={0:0};function L(e){if(R[e])return R[e].exports;var n=R[e]={i:e,l:!1,exports:{},hot:function(t){var e={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:i!==t,active:!0,accept:function(t,n){if(void 0===t)e._selfAccepted=!0;else if("function"==typeof t)e._selfAccepted=t;else if("object"==typeof t)for(var i=0;i<t.length;i++)e._acceptedDependencies[t[i]]=n||function(){};else e._acceptedDependencies[t]=n||function(){}},decline:function(t){if(void 0===t)e._selfDeclined=!0;else if("object"==typeof t)for(var n=0;n<t.length;n++)e._declinedDependencies[t[n]]=!0;else e._declinedDependencies[t]=!0},dispose:function(t){e._disposeHandlers.push(t)},addDisposeHandler:function(t){e._disposeHandlers.push(t)},removeDisposeHandler:function(t){var n=e._disposeHandlers.indexOf(t);n>=0&&e._disposeHandlers.splice(n,1)},check:S,apply:C,status:function(t){if(!t)return h;d.push(t)},addStatusHandler:function(t){d.push(t)},removeStatusHandler:function(t){var e=d.indexOf(t);e>=0&&d.splice(e,1)},data:a[t]};return i=void 0,e}(e),parents:(l=u,u=[],l),children:[]};return t[e].call(n.exports,n,n.exports,c(e)),n.l=!0,n.exports}L.e=function(t){var e=[],n=P[t];if(0!==n)if(n)e.push(n[2]);else{var i=new Promise(function(e,i){n=P[t]=[e,i]});e.push(n[2]=i);var r,o=document.getElementsByTagName("head")[0],s=document.createElement("script");s.charset="utf-8",s.timeout=120,L.nc&&s.setAttribute("nonce",L.nc),s.src=function(t){return L.p+""+({1:"vendors~three-facade"}[t]||t)+".chunk.js"}(t),r=function(e){s.onerror=s.onload=null,clearTimeout(a);var n=P[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src,o=new Error("Loading chunk "+t+" failed.\n("+i+": "+r+")");o.type=i,o.request=r,n[1](o)}P[t]=void 0}};var a=setTimeout(function(){r({type:"timeout",target:s})},12e4);s.onerror=s.onload=r,o.appendChild(s)}return Promise.all(e)},L.m=t,L.c=R,L.d=function(t,e,n){L.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},L.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},L.t=function(t,e){if(1&e&&(t=L(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(L.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)L.d(n,i,function(e){return t[e]}.bind(null,i));return n},L.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return L.d(e,"a",e),e},L.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},L.p="",L.oe=function(t){throw console.error(t),t},L.h=function(){return o};var O=window.loadOathPlayerChunk=window.loadOathPlayerChunk||[],w=O.push.bind(O);O.push=e,O=O.slice();for(var M=0;M<O.length;M++)e(O[M]);var D=w;c(125)(L.s=125)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(11),o=n(9),s=n(38),a=n(5),u=n(4),l=function(){function t(){}return t.getWindow=function(){return window},t.getCssBuildUrl=function(e,n,i){var r="vdms-video-player.css",o="https:"===t.getWindow().location.protocol?t.assetDomainHttps:t.assetDomainHttp;return i&&"fuji"!==i&&(r="vdms-video-player-"+i+".css"),e?"//"+n+"/"+r:o+"/playerassets/builds/"+n+"/"+r},t.loadCssAsset=function(t,e,n,i){if(!document.getElementById(t)){var r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("id",t),r.setAttribute("href",e),r.addEventListener("load",n),r.addEventListener("error",i),document.head.appendChild(r)}},t.generateGuid=function(e){return e?(0|16*Math.random()).toString(16):(""+1e7+-1e3+-4e3+-8e3+-1e11).replace(/1|0/g,t.generateGuid)},t.isValidRequestAction=function(t){return[null,r.REQUEST_TYPES.CLICK,r.REQUEST_TYPES.AUTOPLAY,r.REQUEST_TYPES.HOVER,r.REQUEST_TYPES.PLAY,r.REQUEST_TYPES.PAUSE,r.REQUEST_TYPES.SCROLL,r.REQUEST_TYPES.SWIPE,r.REQUEST_TYPES.BACKGROUND].indexOf(t)>-1},t.isValidRequestType=function(t){return[null,r.REQUEST_TYPES.CLICK,r.REQUEST_TYPES.AUTOPLAY,r.REQUEST_TYPES.API,r.REQUEST_TYPES.CONTINUOUS].indexOf(t)>-1},t.sanitizeAndUnescape=function(t){if(u.isNullOrUndefined(t))return"";var e=t.toString().replace(/<\/?[^>]+>/g,""),n=document.createElement("div");return n.innerHTML=e,n.textContent},t.getHostname=function(t){var e=document.createElement("a");return e.href=t,e.hostname},t.getFormat=function(t){var e=null;return["mpd","mp4","m3u8","webm","flv","f4m","mp4b","m3u8_playlist","m3u8_master","m3u8:fmp4"].forEach(function(n){-1!==t.indexOf(n)&&(e=n)}),e},t.extend=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return u.isObject(t)||(t={}),e.forEach(function(e){if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}),t},t.mergeStringEnums=function(t,e){return Object.assign({},t,e)},t.formatTime=function(t){var e=Math.floor(t/3600),n=Math.floor((t-3600*e)/60),i=Math.floor(t-3600*e-60*n),r=i<10?"0"+i:i.toString(),o="";if(e>0){var s=n<10?"0"+n:n.toString();o=e.toString()+":"+s+":"+r}else u.isNumber(n)&&(o=n.toString()+":"+r);return o},t.findClosest=function(t,e,n){for(var i=n||document,r=t.matches||t.msMatchesSelector||t.webkitMatchesSelector;t&&t!==i;t=t.parentNode)if(r.call(t,e))return t;return null},t.getOffsetTopFromEl=function(t,e){for(var n=0;t;)isNaN(t.offsetTop)||(n+=t.offsetTop),t=t.offsetParent,e&&this.classList(t).contains(e)&&(t=null);return n},t.getOffsetTopFromDocument=function(t){var e=document.body,n=document.documentElement,i=0,r=window.pageYOffset||n.scrollTop||e.scrollTop,o=n.clientTop||e.clientTop||0;try{var s=t.getBoundingClientRect();i=s?s.top:0}catch(t){}return Math.round(i+r-o)},t.getScriptUrl=function(e,n,i){var r,o=t.scriptType;t.scriptType||(o="min");var s="-"+o+".js";e?r="/"+i+s:r=("https:"===document.location.protocol?t.assetDomainHttps:t.assetDomainHttp)+"/rx/builds/"+n+"/"+i+s;return r},t.createErr=function(t,e,n,r,s,a,u){return new o.default(t,n,r,{playbackState:e,msg:s,debugMsg:a,prefetch:u},i.userAgent)},t.insertCssIntoHead=function(t){var e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(t)),e.appendChild(n)},t.classList=function(t){if(t&&t.classList)return t.classList;function e(e){return function(n){var i=t&&u.isString(t.className)?t.className.split(/\s+/):[],r=i.indexOf(n),o=e(i,r,n);return t&&u.isString(t.className)&&(t.className=i.join(" ")),o}}return{add:e(function(t,e,n){~e||t.push(n)}),remove:e(function(t,e){~e&&t.splice(e,1)}),toggle:e(function(t,e,n){~e?t.splice(e,1):t.push(n)}),contains:e(function(t,e){return!!~e})}},t.render=function(t,e,n){var i=document.createElement("div");return i.innerHTML=t.render(e,n),i.children[0]},t.getFullscreenElement=function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},t.fixProtocol=function(t){return i.userAgent.samsung&&0===t.indexOf("//")?"https:"+t:t},t.setSingleton=function(t,e){window.VDMS=window.VDMS||{},window.VDMS.VideoPlayer=window.VDMS.VideoPlayer||{},window.VDMS.VideoPlayer[t]=e},t.getSingleton=function(t){return window.VDMS&&window.VDMS.VideoPlayer&&window.VDMS.VideoPlayer[t]?window.VDMS.VideoPlayer[t]:null},t.getAssetUrl=function(e,n,i){var r="https:"===t.getWindow().location.protocol?t.assetDomainHttps:t.assetDomainHttp;return e?"/"+i:"player.swf"===i||"simpleplayer.swf"===i?t.getPlayerSwfUrl(n,i):r+"/rx/builds/"+n+"/assets/"+i},t.getPlayerSwfUrl=function(e,n){var r,o=t.getWindow(),s=o.location.protocol,a=("https:"===s?t.assetDomainHttps:t.assetDomainHttp)+"/rx/builds/"+e+"/assets/"+n,u=o.location.hostname;return i.userAgent.chrome&&(o.parent!==o&&(r=t.parseDomain(o.document.referrer))&&(u=r),!{"www.yahoo.com":!0,"news.yahoo.com":!0,"sports.yahoo.com":!0,"finance.yahoo.com":!0,"answers.yahoo.com":!0,"www.tumblr.com":!0,"beta.finance.yahoo.com":!0,"au.yahoo.com":!0,"be.yahoo.com":!0,"fr-be.yahoo.com":!0,"br.yahoo.com":!0,"ca.yahoo.com":!0,"de.yahoo.com":!0,"espanol.yahoo.com":!0,"es.yahoo.com":!0,"fr.yahoo.com":!0,"gr.yahoo.com":!0,"hk.yahoo.com":!0,"id.yahoo.com":!0,"ie.yahoo.com":!0,"in.yahoo.com":!0,"it.yahoo.com":!0,"my.yahoo.com":!0,"nz.yahoo.com":!0,"ro.yahoo.com":!0,"se.yahoo.com":!0,"sg.yahoo.com":!0,"tw.yahoo.com":!0,"uk.yahoo.com":!0,"us.yahoo.com":!0,"ve.yahoo.com":!0,"vn.yahoo.com":!0,"maktoob.yahoo.com":!0,"en-maktoob.yahoo.com":!0,"za.yahoo.com":!0,"qc.yahoo.com":!0,"att.yahoo.com":!0,"espanol.att.yahoo.com":!0,"frontier.yahoo.com":!0,"verizon.yahoo.com":!0,"ca.rogers.yahoo.com":!0,"fr-ca.rogers.yahoo.com":!0,"tatadocomo.yahoo.com":!0,"tikona.yahoo.com":!0,"ideanetsetter.yahoo.com":!0,"mtsindia.yahoo.com":!0,"smartfren.yahoo.com":!0,"tournament.fantasysports.yahoo.com":!0,"baseball.fantasysports.yahoo.com":!0,"football.fantasysports.yahoo.com":!0,"hockey.fantasysports.yahoo.com":!0,"basketball.fantasysports.yahoo.com":!0,"uk.news.yahoo.com":!0,"uk.sports.yahoo.com":!0,"fr.news.yahoo.com":!0,"fr.sports.yahoo.com":!0,"de.nachrichten.yahoo.com":!0,"de.sports.yahoo.com":!0,"it.notizie.yahoo.com":!0,"uk.style.yahoo.com":!0,"de.style.yahoo.com":!0,"fr.style.yahoo.com":!0,"es.vida-estilo.yahoo.com":!0,"it.style.yahoo.com":!0,"uk.movies.yahoo.com":!0,"de.kino.yahoo.com":!0,"m6info.yahoo.com":!0,"es.noticias.yahoo.com":!0}[u]?/.*mg\d*\.mail\.yahoo\.com$/.test(u)&&(a=s+"//"+u+"/lyimg/videoinmail/"+e+"/assets/"+n):a=s+"//"+u+"/sy/rx/builds/"+e+"/assets/"+n),a},t.parseDomain=function(t){var e=/^https?:\/\/([A-Za-z0-9\.\-]*)(?:$|\/|:)/.exec(t);return e?e[1]:null},t.getElementViewability=function(t){try{var e=t.getBoundingClientRect();if(!e)return 0;var n=void 0,i=window.innerHeight;return n=e.top>=0?e.bottom>i?i-e.top>0?i-e.top:0:e.height:e.bottom>i?i:e.bottom<0?0:e.bottom,Math.round(n/e.height*100)}catch(t){return 0}},t.hasUnwatchedClips=function(t){return!1},t.isIFrame=function(){var e=t.getWindow();try{return e.top!==e.self}catch(t){return!0}},t.isPlayerInBackground=function(){return this.hidden||(void 0!==document.hidden?this.hidden="hidden":void 0!==document.mozHidden?this.hidden="mozHidden":void 0!==document.msHidden?this.hidden="msHidden":void 0!==document.webkitHidden?this.hidden="webkitHidden":this.hidden="unsupported"),"unsupported"===this.hidden?!document.hasFocus():document[this.hidden]},t.strSubstitute=function(t,e){return t.replace(/\{([^\{\}]*)\}/g,function(t,n){var i="function"==typeof e?e(n):e[n];return u.isNullOrUndefined(i)?t:i})},t.querystring=function(e,n,i,r){return n=n||"&",i=i||"=",r=r||encodeURIComponent,e?(u.isObject(e)&&(e=[e]),e.map(function(e){return Object.keys(e).map(function(o){var s=r(t.stringifyPrimitive(o));return null===e[o]?s:(s+=i,u.isArray(e[o])?e[o].map(function(e){return s+r(t.stringifyPrimitive(e))}).join(n):s+r(t.stringifyPrimitive(e[o])))}).join(n)}).join(n)):""},t.getHostUrl=function(){var t=document.referrer;try{window.top.location.href&&(t=window.top.location.href)}catch(t){}return t},t.stringifyPrimitive=function(t){return u.isString(t)?t:u.isBoolean(t)?t.toString():u.isNumber(t)&&isFinite(t)?t.toString():""},t.forceDOMRedrawOnElement=function(t){t&&t.offsetHeight},t.uniquifyArray=function(t){return t.filter(function(t,e,n){return n.indexOf(t)===e})},t.replaceStrParam=function(t,e,n){return t.replace(new RegExp(e+"=\\w*"),e+"="+n)},t.parseRootHost=function(e){var n=t.parseDomain(e),i="";if(n){var r=n.split(".");i=r.length>=2?r[r.length-2]:n}return i},t.redirect=function(t,e){try{e?window.top.location.replace(t):window.top.location.assign(t)}catch(t){window.DOMException}},t.noop=function(){},t.createVideoNode=function(){var t=document.createElement("div");return i.userAgent.tv?t.innerHTML='<video preload="meta" crossorigin="anonymous"><source/></video>':t.innerHTML="<video preload></video>",t.children[0]},t.getUrlStatus=function(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onreadystatechange=function(){4===n.readyState&&e(n.status)},n.send()},t.bucketize=function(){return Math.floor(100*Math.random())},t.once=function(t){var e=this,n=function(){return n.called?n.value:(n.called=!0,n.value=t.apply(e,arguments),n.value)};return n.called=!1,n},t.appendQueryString=function(t,e){var n=-1===t.indexOf("?")?"?":"&",i=[];for(var r in e)e.hasOwnProperty(r)&&i.push(r+"="+e[r]);return t+n+i.join("&")},t.cssHexToRgb=function(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},t.decimalToHexString=function(t,e,n){var i=Number(t).toString(16).toUpperCase();return e?i.padStart(e,n):i},t.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},t.deepCopy=function(t){var e=this;if(u.isNullOrUndefined(t))return t;var n={};return Object.keys(t).forEach(function(i){u.isArray(t[i])?n[i]=t[i].slice():u.isObject(t[i])?n[i]=e.deepCopy(t[i]):n[i]=t[i]}),n},t.mergeObjects=function(e,n,i){if(void 0===i&&(i=!1),u.isNullOrUndefined(e))return n;for(var r in n)if(u.isNullOrUndefined(e[r])||i){var o=n[r];u.isArray(o)?e[r]=o.slice():u.isObject(o)?e[r]=t.deepCopy(o):e[r]=o}else u.isObject(e[r])&&(e[r]=this.mergeObjects(e[r],n[r]));return e},t.stringToArray16=function(t){for(var e=new ArrayBuffer(2*t.length),n=new Uint16Array(e),i=0,r=t.length;i<r;i++)n[i]=t.charCodeAt(i);return n},t.array16ToString=function(t){var e=new Uint16Array(t.buffer);return String.fromCharCode.apply(null,e)},t.base64DecodeUint8Array=function(t){for(var e=window.atob(t),n=e.length,i=new Uint8Array(new ArrayBuffer(n)),r=0;r<n;r++)i[r]=e.charCodeAt(r);return i},t.base64EncodeUint8Array=function(t){for(var e,n,i,r,o,s,a,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",c=0;c<t.length;)r=(e=t[c++])>>2,o=(3&e)<<4|(n=c<t.length?t[c++]:Number.NaN)>>4,s=(15&n)<<2|(i=c<t.length?t[c++]:Number.NaN)>>6,a=63&i,isNaN(n)?s=a=64:isNaN(i)&&(a=64),l+=u.charAt(r)+u.charAt(o)+u.charAt(s)+u.charAt(a);return l},t.getResourceLoadTime=function(t){if(window.performance&&window.performance.getEntriesByType){var e=window.performance.getEntriesByType("resource"),n=void 0;for(n in e)if(e[n].name.match(t))return e[n].duration}return null},t.getPlaybackMode=function(t){return t instanceof s.default?a.PlaybackMode.AD:a.PlaybackMode.VIDEO},t.getAdBreakStartOffset=function(t){var e=[];return t.forEach(function(n,i){var r,o=n.adBreakItems&&n.adBreakItems.some(function(t){return!!t.instream});if(i>0&&o){for(var s=0,a=1;a<=i;a++)s+=t[a-1].duration;r=n.startOffset-s}else r=n.startOffset;var u={adBreakId:n.adBreakId,startOffset:r,type:n.type};e.push(u)}),e},t.detectRegexPattern=function(t,e){var n=new RegExp(t).exec(e);return n&&n[0]?n[0]:null},t.extractID3Data=function(t){if(!t||!t.length)return null;var e=0;for(e=0;e<t.length&&!(t[e]>31);e++);var n=0;for(n=t.length-1;n>=0&&!(t[n]<=31);n--);return n=n<e?t.length:n,String.fromCharCode.apply(null,t.subarray(e,n))},t.initIframeCmp=function(){if(!window.__cmp){for(var t,e=window;!t;){try{e.frames.__cmpLocator&&(t=e)}catch(t){}if(e===window.top)break;e=e.parent}var n={};window.__cmp=function(e,i,r){if(t){var o=Math.random()+"",s={__cmpCall:{command:e,parameter:i,callId:o}};n[o]=r,t.postMessage(s,"*")}else r({msg:"CMP not found"},!1)},window.addEventListener("message",function(t){var e="string"==typeof t.data,i=t.data;if(e)try{i=JSON.parse(t.data)}catch(t){}if(i.__cmpReturn){var r=i.__cmpReturn;n[r.callId](r.returnValue,r.success),delete n[r.callId]}},!1)}},t.assetDomainHttp="http://assets.video.yahoo.net",t.assetDomainHttps="https://assets.video.yahoo.net",t.scriptType="PLAYER_DEBUG_TYPE",t.yuiAdded=!1,t}();e.default=l},function(t,e,n){"use strict";t.exports={userAgent:n(76),capabilities:n(129)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.PLAYER_RENDERED="render",t.PLAYER_READY="playerReady",t.PLAYER_ERROR="playerError",t.PLAYER_WARNING="playerWarning",t.PLAYER_INFO="playerInfo",t.PLAYER_FULLSCREEN_CHANGE="fullscreenChange",t.PLAYER_VOLUME_CHANGE="volumeChange",t.PLAYER_MUTE_CHANGE="muteChange",t.PLAYBACK_ERROR="playbackError",t.PLAYBACK_READY="playbackReady",t.PLAYBACK_START="playbackStart",t.DURATION_CHANGE="durationChange",t.BITRATE_CHANGE="bitrateChange",t.PLAYBACK_PAUSE="playbackPause",t.PLAYBACK_RESUMED="playbackResumed",t.PLAYBACK_TIME_UPDATE="playbackTimeUpdate",t.PLAYBACK_SEEKING="playbackSeeking",t.PLAYBACK_SEEK_COMPLETE="playbackSeek",t.PLAYBACK_COMPLETE="playbackComplete",t.PLAYBACK_REQUEST="playbackRequest",t.PLAYBACK_STALLED="playbackStalled",t.PLAYBACK_PROGRESS="playbackProgress",t.PLAYLIST_COMPLETE="playlistComplete",t.PLAYLIST_POSITION_CHANGE="playlistPositionChange",t.UI_INTERACT="uiInteract",t.BEACON_SEND="beaconSend",t.LOADING_BEGIN="loading-begin",t.LOADING_END="loading-end",t.PLAYBACK_TIMEOUT="playback-timeout",t.VIDEO_STARTED="video-started",t.METADATA_READY="metadata-ready",t.CC_AVAILABLE="media-item-cc-available",t.AIRPLAY_AVAILABILITY_CHANGE="airplay-availability-change",t.AIRPLAY_CONNECTION_STATE_CHANGE="airplay-connection-state-change",t.CAST_AVAILABILITY_CHANGE="cast-availability-change",t.CAST_CONNECTED_STATE_CHANGE="cast-connected-state-change",t.CUEPOINT_STARTED="cuepointStarted",t.CUEPOINT_STOPPED="cuepointStopped",t.CUEPOINT_DETECTED="cuepointDetected",t.PLAYER_VIEWPORT_CHANGE="player-viewport-change",t.PLAYER_DOCKED_CHANGE="player-docked-change",t.BUFFERING_START="bufferingStart",t.BUFFERING_END="bufferingEnd",t.MULTI_AUDIO_AVAILABLE="multi-audio-available",t.VIDEO_REQUEST="videoRequest",t.START_SCREEN_RENDERED="startScreenRenderered",t.HLS_FIRST_TS_LOAD_START="hlsFirstTsLoadStart",t.HLS_FIRST_TS_FIRST_BYTE_ARRIVE="hlsFirstTsFirstByteArrive",t.RECOVERY_METADATA_READY="recoveryMetadataReady",t.ABR_DATA_UPDATE="abrDataUpdate",t.SEG_INFO_AVAILABLE="segInfoAvailable",t.SEGMENT_FIRST_BYTE_LOADED="segmentFirstByteLoaded",t.CMS_API_CALLED="cmsApiCalled",t.CTRL_PLAYPAUSE="ctrlPlayPause",t.CTRL_SEEK="ctrlSeek",t.CTRL_VOLUME="ctrlVolume",t.CTRL_SETTINGS="ctrlSettings",t.CTRL_PLAYREQUEST="ctrlPlayRequest",t.CTRL_REPLAY="ctrlReplay",t.CONTROLS_AUDIO_CHANGE="controlsAudioChange",t.CC_UI_TOGGLE="ccUiToggle",t.CC_LANGUAGE_CHANGE="ccLanguageChange",t.CC_UPDATE_STYLE="ccUpdateStyle",t.CC_SETTINGS="ccSettings",t.THREE_SIXTY_INTERACT="threeSixtyInteract",t.THREE_SIXTY_PIE_INTERACT="threeSixtyPieInteract",t.MEDIA_ITEM_CURRENT="media-item-current",t.MEDIA_ITEM_ENDED="media-item-ended",t.MEDIA_ITEM_METADATA="media-item-metadata",t.MEDIA_ITEM_NEED_SOURCE="media-item-need-source",t.MEDIA_ITEM_ERROR="media-item-error",t.MEDIA_ITEM_ADDED="media-item-added",t.MEDIA_ITEM_REMOVED="media-item-removed",t.AD_BREAK_STARTED="ad-break-started",t.AD_BREAK_ENDED="ad-break-ended",t.AD_BREAK_ITEM_CURRENT="ad-break-item-current",t.AD_BREAK_ITEM_ERROR="ad-break-item-error",t.AD_BREAK_ITEM_SKIPPED="ad-break-item-skipped",t.AD_BREAK_ITEM_ENDED="ad-break-item-ended",t.AD_BREAK_ITEM_CLICKED="ad-break-item-clicked",t.AD_METRICS="ad-metrics",t.TIMED_METADATA_RECEIVED="timed-metadata-received",t.NIELSEN_REQUIRED="nielsen-required"}(e.API||(e.API={})),e.MEDIA_ITEM_NEED_SOURCE="media-item-need-source",e.MEDIA_ITEM_ERROR="media-item-error",e.MEDIA_ITEM_METADATA="media-item-metadata",e.MEDIA_ITEM_ADDED="media-item-added",e.MEDIA_ITEM_REMOVED="media-item-removed",e.MEDIA_ITEM_CURRENT="media-item-current",e.MEDIA_ITEM_ENDED="media-item-ended",e.AD_BREAK_STARTED="ad-break-started",e.AD_BREAK_ENDED="ad-break-ended",e.AD_BREAK_ITEM_CURRENT="ad-break-item-current",e.AD_BREAK_ITEM_ENDED="ad-break-item-ended",e.AD_BREAK_ITEM_ERROR="ad-break-item-error",e.AD_BREAK_ITEM_SKIPPED="ad-break-item-skipped",e.AD_BREAK_ITEM_CLICKED="ad-break-item-clicked",e.AD_METRICS="ad-metrics",e.OPSS_VISIBILITY_CHANGED="opss-visibility-changed",e.TIMED_METADATA_RECEIVED="timed-metadata-received",e.ERROR="player-error",e.WARNING="player-warning",e.INFO="player-info",e.KEYDOWN="keydown",e.WINDOW_ON_FOCUS="focus",e.WINDOW_ON_BLUR="blur",e.START_SCREEN_RENDERED="start-screen-rendered",e.START_SCREEN_CLICK="start-screen-click",e.END_SCREEN_RENDERED="end-screen-rendered",e.CTRL_ENDSCREEN_VID="selected-endscreen-video",e.RELATED_ITEM_CLICK="related-item-click",e.UP_NEXT_PG_CLICK="upnext-pg-click",e.SEEK_BAR_MOUSEOVER="seek-bar-mouseover",e.SEEK_BAR_MOUSEOUT="seek-bar-mouseout",e.TOGGLE_PLAY_PAUSE="toggle-play-pause",e.CONTROLS_SEEK_START="controls-seek-start",e.CONTROLS_SEEK_END="controls-seek-end",e.CONTROLS_SEEKING="controls-seeking",e.CONTROLS_SET_VOLUME="controls-set-volume",e.CONTROLS_SET_MUTE="controls-set-mute",e.FULLSCREEN_CHANGE="fullscreen-change",e.PLAYER_DIMENSION_CHANGE="player-dimension-change",e.CONTROLS_BAR_CHANGE="controls-bar-change",e.METADATA_AVAILABLE="metadata-available",e.RELATED_ITEMS_LOADED="related-items-loaded",e.RENDERER_SWITCHED="renderer-switched",e.RENDERER_PP_NEXT="renderer-prepare-preload-next",e.TOUCH_TO_PLAY_RESTRICTION_REMOVED="mobile-touch-play-restriction-removed",e.RENDER_PLAYLIST_FIRST_BATCH="render-playlist-first-batch",function(t){t.TOGGLE_PLAYING="cast-toggle-playing",t.BUFFERING="cast-buffering",t.MEDIA_CHANGED="cast-media-changed",t.PLAYBACK_PROGRESS="cast-playback-progress",t.VIDEO_ENDED="cast-video-ended",t.PLAYLIST_ENDED="cast-playlist-ended",t.CONNECTION_STATUS_CHANGED="cast-connection-changed",t.VOLUME_CHANGED="cast-receiver-volume-changed",t.MUTE_CHANGED="cast-receiver-mute-changed",t.CAPTION_AVAILABILITY_CHANGED="cast-captions-availability-changed"}(e.CAST||(e.CAST={})),e.CONTROLS_AUDIO_CHANGE="controlsAudioChange",e.MULTI_LANGUAGES_AVAILABLE="multiLanguagesAvailable",e.THREE_SIXTY_READY="360-ready",e.THREE_SIXTY_INTERACT="360-interact",e.THREE_SIXTY_PIE_INTERACT="360-pie-interact",e.SWF_READY="swf-ready",e.SWF_READY_TIMEOUT="swf-ready-timeout",e.PAUSE_VPAID="pause-vpaid",e.RESUME_VPAID="resume-vpaid",e.PLAYER_RESIZE="player-resize",e.RENDERER_PLUGIN_LOADED="rendererPluginLoaded",e.RENDERER_PLUGIN_LOAD_FAILED="rendererPluginLoadFailed",e.RENDERER_PLUGIN_LOAD_TIMED_OUT="rendererPluginLoadTimedOut",e.VTT_SEGMENT_LOADED="vttSegmentLoaded",e.SEGMENT_FIRST_BYTE_LOADED="segmentFirstByteLoaded",e.MEDIA_RELOAD_BEGIN="mediaReloadBegin",e.MEDIA_RELOAD_END="mediaReloadEnd",e.MEDIA_PLAYLIST_LOADED="mediaPlaylistLoaded",e.MEDIA_PLAYLIST_UPDATED="mediaPlaylistUpdated",e.SUBTITLE_PLAYLIST_UPDATED="subtitlePlaylistUpdated",e.BITRATE_LIST_CHANGED="bitrateListChanged",e.ABR_DATA_UPDATE="abrDataUpdate",e.FRAG_LOAD_RETRY_FAILURE="fragLoadRetryFailure",e.LIVE_MEDIA_PLAYLIST_LOAD_RETRY_FAILURE="liveMediaPlaylistLoadRetryFailure",e.LIVE_LOADING_LATE="liveLoadingLate",e.RECOVERY_START="recoveryStart",e.RECOVERY_METADATA_READY="recoveryMetadataReady",e.ER_READY="erReady",e.ER_ERROR="erError",e.ERR_NO_RECOVERY="errNoRecovery",e.CONVIVA_READY_FOR_SESSION_CREATION="convivaReadyForSessionCreation",e.PLAYBACK_INFO="playback-info",e.PTS_DISCONTINUITY="PTSDiscontinuity",e.RELOAD_FRAGMENT="ReloadFragment",e.SUBTITLE_TRACK_RECEIVED="subtitle-track-received",e.PAGE_VISIBILITY_CHANGED="pageVisibilityChanged",e.LIVE_RELOAD_MEDIA="reloadMedia",function(t){t.INFO_UPDATE="infoUpdate",t.SEGMENT_FIRST_BYTE_LOADED="segmentFirstByteLoaded",t.SEGMENT_RENDERED="segmentRendered",t.VTT_SEGMENT_LOADED="vttSegmentLoaded",t.STREAM_SWITCHED="streamSwitched",t.LIVE_LOADING_LATE="liveLoadingLate",t.STREAM_UPDATED="streamUpdated",t.HLS_WAITING="hlsWaiting",t.CUEPOINT_DETECTED="cuepointDetected",t.CUEPOINT_STARTED="cuepointStarted",t.SUBTITLE_STREAM_UPDATED="subtitleStreamUpdated",t.ABR_DATA_UPDATED="abrDataUpdated",t.PRELOAD_PROGRESS="preloadProgress",t.SEGINFO_METRICS_AVAILABLE="segInfoMetricsAvailable",t.CONTENT_LOAD_FINISHED="contentLoadFinished",t.BUFFER_GROWTH_DETECTED="bufferGrowthDetected",t.CC_VTT_AVAILABLE="ccVttAvailable",t.MULTI_LANGUAGES_AVAILABLE="multiLanguagesAvailable",t.TIMED_METADATA_READY="timedMetadataReady"}(e.HLSVideoEvent||(e.HLSVideoEvent={})),e.SEG_INFO_AVAILABLE="segInfoAvailable",e.CONTENT_LOAD_FINISHED="contentLoadFinished",e.BUFFER_GROWTH_DETECTED="bufferGrowthDetected",function(t){t.SRC_SWITCHING="video-src-switching",t.SRC_SWITCHED="video-src-switched",t.CLICK="video-click",t.PAUSE="pause",t.ENDED="ended",t.ERROR="error",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.STALLED="stalled",t.LOADSTART="loadstart",t.PLAY="play",t.PLAYING="playing",t.SEEKING="seeking",t.SEEKED="seeked",t.TIMEUPDATE="timeupdate",t.VOLUMECHANGE="volumechange",t.WAITING="waiting"}(e.VideoEvent||(e.VideoEvent={})),e.VIDEO_REQUEST="video-request",e.PLAYBACK_REQUEST="playback-request",e.PLAYBACK_STARTED="playback-started",e.PLAYBACK_RESUMED="playback-resumed",e.PLAYBACK_PROGRESS="playback-progress",e.PLAYBACK_STALLED="playback-stalled",e.PLAYBACK_ENDED="playback-ended",e.PLAYBACK_ERROR="playback-error",e.API_CALLED="api-called",e.HLS_FIRST_TS_LOAD_START="hls-first-ts-load-start",e.HLS_FIRST_TS_FIRST_BYTE_ARRIVE="hls-first-ts-first-byte-arrive",e.CTRL_PLAYPAUSE="ctrl-play-pause",e.CTRL_SEEK="ctrl-seek",e.CTRL_VOLUME="ctrl-volume",e.CTRL_FULLSCREEN="ctrl-fullscreen",e.CTRL_SETTINGS="ctrl-settings",e.CTRL_REPLAY="ctrl-replay",e.CTRL_PLAYREQUEST="ctrl-playrequest",e.CUEIN_DETECTED="cue-in-detected",e.YVAP_INFO_UPDATE="yvap-info-update",e.YVAP_MIDROLL_CACHE_UPDATE="yvap-midroll-cache-update",function(t){t.SETTINGS="cc-settings",t.TOGGLE="cc-toggle",t.UI_TOGGLE="cc-ui-toggle",t.REQUEST_UI_DATA_FOR_MEDIA_ITEM="cc-request-ui-data-for-media-item",t.REMOVED="cc-destroy",t.SHOW_CONTROLS="cc-show-controls",t.LANGUAGE_CHANGE="cc-language-change",t.CC_OPTIONS_LANGUAGE_CHANGE="cc-options-language-change",t.FONT_SIZE_CHANGE="cc-font-size-change",t.FONT_FACE_CHANGE="cc-font-face-change",t.BG_OPACITY_CHANGE="cc-bg-opacity-change",t.USER_STYLE_PREFERENCES_CHANGE="cc-user-style-preferences-change",t.UPDATE_STYLE="cc-update-style",t.POSITION_CHANGE="cc-position-change",t.POSITION_FLOAT="cc-position-float"}(e.CCEvent||(e.CCEvent={})),function(t){t.GET_BITRATE_FOR_OPSS="ctv-get-bitrate-for-opss"}(e.CTV||(e.CTV={})),e.BEFORE_PROGRESS_BEACON="before-progress-beacon",e.BEFORE_INCOMPLETE_EXIT="before-incomplete-exit",e.METRICS={INIT_TO_STARTSCREEN:{type:"titssc",desc:"VideoPlayer init to StartScreen Rendered"},HLS_FIRST_TS_LOAD_START:{type:"hftls",desc:"First ts loading starts in HLS"},HLS_FIRST_TS_FIRST_BYTE_ARRIVE:{type:"hftfba",desc:"First byte arrives for the first ts loading in HLS"},CLICK_TO_START:{type:"ttsapf",desc:"Player click to playback start"},INIT_TO_START:{type:"ttsapt",desc:"Init to playback start (autoplay)"},PLAYBACK_START:{type:"tpb",desc:"Playback request to playback start"},INIT_CONT_PLAY_START:{type:"tcps",desc:"Time difference between video-end and next video start"},PLAYBACK_STALLED:{type:"tps",desc:"Playback buffering start to buffering end"},LOAD_TO_LOADED_DATA:{type:"tltld",desc:"Time from load() to loaded data"},CMS_REQUEST:{type:"tsapic",desc:"CMS request to CMS response"},CMS_SOURCE_REQUEST:{type:"tssrcapic",desc:"CMS source request to CMS source response"},SWF_READY:{type:"tswfr",desc:"Player SWF is ready"},SWF_OBJECT_TO_INIT_START:{type:"tobtswfinit",desc:"Time from creation of object tag to call of swf constructor"},INIT_RENDER_GAP:{type:"tirg",desc:"Time gap between end of construction and beginning of render"},RENDER_TO_SWF:{type:"trtswf",desc:"Time from init to object tag creation"},SET_WATCH_HISTORY:{type:"tsetwh",desc:"YQL+ call to save watch history"},VP_CONSTRUCTOR:{type:"tcons",desc:"VideoPlayer Constructor"},GET_USER_PREFS:{type:"tgetcc",desc:"YQL+ call to get captions preferences"},CREATE_RENDERER:{type:"trcreate",desc:"Creating the renderer (swf/html)"},YVAP_READY:{type:"tyvapr",desc:"VideoAdPlugin is ready"},YVAP_NOAD:{type:"tyvapadn",desc:"Ad None"},YVAP_ADSTARTED:{type:"tyvapads",desc:"Ad Started"},STREAM_REQUEST_TO_RENDER:{type:"treqtr",desc:"Stream Latency (From request to render)"},STREAM_PLAY_TO_RENDER:{type:"tsltps",desc:"Media playback start to video render"},AD_PLUGIN:{type:"tadp",desc:"ad plugin latency - for ad playback start or timeout"}},function(t){t.ORIENTATION_CHANGE="device-orientation-change"}(e.Device||(e.Device={})),e.PROFILE_START="profile-start",e.PROFILE_END="profile-end"},function(t,e,n){"use strict";var i=t.exports={};i.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},i.guid=function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},i.base64ToBuffer=function(t){return new Uint8Array(atob(t).split("").map(function(t){return t.charCodeAt(0)}))},i.arrayToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(e),i=new DataView(n.buffer),r=0;r<e;r++)i.setUint8(r,t[r]);return n},i.isDrmItemContained=function(t,e){if(!t||!e||0===e.length)return!1;for(var n=0;n<e.length;n++)if(t.widevine.pssh===e[n].widevine.pssh)return!0;return!1},i.isAbsoluteUrl=function(t){return 0===t.indexOf("http")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(7);function r(t){return"string"==typeof t}function o(t){return"function"==typeof t}function s(t){return!!t&&o(t.onPlayerEvent)}function a(t){return!!t&&((t.type===i.PluginType.METADATA||t.type===i.PluginType.SOURCE_METADATA||t.type===i.PluginType.AD||t.type===i.PluginType.VISUAL_SEEK||t.type===i.PluginType.BRANDING||t.type===i.PluginType.PLAYLIST)&&r(t.mimetype)&&r(t.version)&&o(t.prepare)&&o(t.destroy))}function u(t){return!!t&&o(t.addEventListener)&&o(t.removeEventListener)}function l(t){return u(t)&&["getCapabilities","preparePlayback","play","pause","seek","stop","skip","mute","isMuted","setVolume","getVolume","getCurrentTime","getDuration","unload"].every(function(e){return o(t[e])})}function c(t){return!!t&&l(t)}function d(t){return!!t&&u(t)&&["setNonlinearAdContainer"].every(function(e){return o(t[e])})}function h(t){return u(t)&&s(t)&&["canRenderUI","renderUI","unrenderUI"].every(function(e){return o(t[e])})}function p(t){return!!t&&o(t.fetchAdBreaks)&&o(t.resolveAdBreak)&&u(t)}e.isArray=function(t){return Array.isArray(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},e.isString=r,e.isObject=function(t){return"[object Object]"===function(t){return Object.prototype.toString.call(t)}(t)},e.isFunction=o,e.isNonEmptyString=function(t){return"string"==typeof t&&""!==t},e.isPlayerPluginEventListener=s,e.isPlugin=a,e.isEventDispatcher=u,e.isExternalPlayer=l,e.isAdPlayerAdPlugin=c,e.isAdOverlayRendererAdPlugin=d,e.isAdViewAdPlugin=h,e.isAdResolverAdPlugin=p,e.isAdPlugin=function(t){return!!t&&a(t)&&(p(t)||h(t)||c(t)||d(t))}},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6);!function(t){t.EXTERNAL="EXTERNAL",t.FLASH="FLASH",t.FLASH_SIMPLE="FLASH_SIMPLE",t.HTML5_HLS="HTML5_HLS",t.HTML5_RAW="HTML5_RAW",t.HTML5_RAW_360="HTML5_RAW_360",t.HTML5_HLS_360="HTML5_HLS_360",t.HTML5_TV="HTML5_TV",t.HTML5_TV_TIZEN="HTML5_TV_TIZEN",t.HTML5_TV_ORSAY="HTML5_TV_ORSAY",t.UNKNOWN="UNKNOWN"}(r=e.RendererType||(e.RendererType={})),function(t){t.VIDEO="video",t.AD="ad",t.VPAID="vpaid"}(e.PlaybackMode||(e.PlaybackMode={})),function(t){t.ENDED="ended",t.ERROR="error",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.PAUSE="pause",t.STALLED="stalled",t.LOADSTART="loadstart",t.PLAY="play",t.PLAYING="playing",t.SEEKING="seeking",t.SEEKED="seeked",t.TIMEUPDATE="timeupdate",t.VOLUMECHANGE="volumechange",t.WAITING="waiting"}(e.NativeVideoEvent||(e.NativeVideoEvent={})),function(t){t.PAUSE="pause",t.ENDED="ended",t.ERROR="error",t.LOADEDMETADATA="loadedmetadata",t.LOADEDDATA="loadeddata",t.STALLED="stalled",t.LOADSTART="loadstart",t.PLAY="play",t.PLAYING="playing",t.SEEKING="seeking",t.SEEKED="seeked",t.TIMEUPDATE="timeupdate",t.VOLUMECHANGE="volumechange",t.WAITING="waiting"}(e.RendererEvent||(e.RendererEvent={})),function(t){t.SRC_SWITCHING="src-switching",t.SRC_SWITCHED="src-switched",t.CLICK="renderer-click",t.PLAY_BLOCKED="play-blocked",t.SKIPPED="renderer-item-skipped",t.RENDERER_END_FULLSCREEN="renderer-end-fullscreen"}(e.CustomRendererEvent||(e.CustomRendererEvent={})),function(t){t.RENDER_PDL="1",t.RENDER_VPAID="2",t.RENDER_HLS="3"}(e.ExternalPlayerCapability||(e.ExternalPlayerCapability={})),function(t){t.PLAYBACK_ERROR="external-player-error",t.ITEM_LOADED="external-player-item-loaded",t.PLAY_REQUESTED="external-player-play-requested",t.PLAYING="external-player-playing",t.PAUSED="external-player-paused",t.PLAY_COMPLETE="external-player-play-complete",t.TIME_UPDATE="external-player-time-update",t.MUTE_CHANGED="external-player-mute-changed",t.VOLUME_CHANGED="external-player-volume-changed",t.SKIPPED="external-player-item-skipped"}(e.ExternalPlayerEvent||(e.ExternalPlayerEvent={}));var s=function(t){function e(n){void 0===n&&(n="renderer");var i=t.call(this,n)||this;return i.type=e.type,i._currentPlayableItem=null,i}return i(e,t),e.canUse=function(){return!1},e.prototype.getPlayableItem=function(){return this._currentPlayableItem},e.type=r.UNKNOWN,e}(o.default);e.Renderer=s,e.default=s},function(t,e,n){t.exports=n(128)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.BASE="plugin",t.METADATA="metadata-plugin",t.SOURCE_METADATA="source-metadata-plugin",t.AD="ad-plugin",t.VISUAL_SEEK="visual-seek",t.BRANDING="branding",t.PLAYLIST="playlist"}(e.PluginType||(e.PluginType={})),function(t){t.MEDIA_ITEM_PLAYBACK_STARTED="media-item-playback-started",t.MEDIA_ITEM_PLAYBACK_ENDED="media-item-playback-ended",t.MEDIA_ITEM_PLAYBACK_PROGRESS="media-item-playback-progress",t.AD_PLAYBACK_PROGRESS="ad-playback-progress"}(e.PluginPlayerEvent||(e.PluginPlayerEvent={}))},function(t,e,n){t.exports=n(127)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),r=n(28),o=n(47).errorCodes,s=["305","306","307"];e.E_INFO=o.E_INFO,e.E_WARNING=o.E_WARNING,e.E_YVAP=o.E_YVAP,e.E_SAPI_STREAM=o.E_SAPI_STREAM,e.E_SAPI_PLAYLIST=o.E_SAPI_PLAYLIST,e.E_SAPI_RELATED=o.E_SAPI_RELATED,e.E_SAPI_POPULAR=o.E_SAPI_POPULAR,e.E_CAST=o.E_CAST,e.E_PLAYER=o.E_PLAYER,e.E_PLAYER_FAILOVER=o.E_PLAYER_FAILOVER,e.E_PLAYER_DRM=o.E_PLAYER_DRM,e.E_PLAYER_JS_HLS=o.E_PLAYER_JS_HLS,e.E_SAPI_ABSTRACT=o.E_SAPI_ABSTRACT,e.E_SAPI_CLOSEDCAPTION=o.E_SAPI_CLOSEDCAPTION;var a=e.E_PLAYER,u=e.E_PLAYER_FAILOVER,l=e.E_PLAYER_JS_HLS,c=e.E_SAPI_ABSTRACT,d=e.E_SAPI_CLOSEDCAPTION;function h(t){return t.group+t.phase+"-"+t.category+"-"+t.subcategory}function p(t){var e=[];if(t)for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}function f(t,e,n){e.forEach(function(e){t[e]=n})}e.INFO_CODES=o.INFO_CODES,e.WARNING_CODES=o.WARNING_CODES,e.PLAYER_CODES=o.PLAYER_CODES,e.PLAYER_DRM_CODES=o.PLAYER_DRM_CODES,e.FLASH_CODES=o.FLASH_CODES,e.PLAYER_JS_HLS_CODES=o.PLAYER_JS_HLS_CODES,e.SAPI_CODES=o.SAPI_CODES,e.CAST_CODES=o.CAST_CODES,e.rep=h,e.isInfoCode=function(t){for(var n in e.INFO_CODES)if(e.INFO_CODES.hasOwnProperty(n)&&e.INFO_CODES[n]===t)return!0;return!1},function(t){t.Streaming="P",t.Service="S",t.Configuration="C",t.Restriction="R"}(e.ErrorGroup||(e.ErrorGroup={})),function(t){t.KEY_SESSION_FAILED="1",t.LICENSE_REQUEST_FAILED="2",t.CERT_LOAD_FAILED="3"}(e.DRM_DEBUG_CODES||(e.DRM_DEBUG_CODES={}));var _={};_[e.INFO_CODES.E_PLAYER_360_IS_NOT_SUPPORTED]=r.default.ERR_TITLE_CANNOT_PLAY_360_VIDEO,_[e.INFO_CODES.E_SAPI_RESTRICTED_NETWORK_TYPE]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,f(_,[e.INFO_CODES.E_SAPI_LICENSE_ERROR,e.INFO_CODES.E_SAPI_UNAVAILABLE_TEMP,e.INFO_CODES.E_SAPI_GEO,e.INFO_CODES.E_SAPI_BLACKOUT],r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE),p(e.INFO_CODES).forEach(function(t){_[t]||(_[t]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO)});var m={};m[e.INFO_CODES.E_SAPI_UNAVAILABLE_TEMP]=r.default.ERR_UNAVAILABLE,m[e.INFO_CODES.E_SAPI_LICENSE_ERROR]=r.default.ERR_UNAVAILABLE,m[e.INFO_CODES.E_SAPI_GEO]=r.default.ERR_GEO,m[e.INFO_CODES.E_SAPI_BLACKOUT]=r.default.ERR_BLACKOUT,m[e.INFO_CODES.E_SAPI_DEVICE]=r.default.ERR_DEVICE,m[e.INFO_CODES.E_SAPI_EMBED]=r.default.ERR_EMBED,m[e.INFO_CODES.E_PLAYER_ANDROID_CHROME_REQUIRED]=r.default.ERR_ANDROID_LIVE_CHROME_REQUIRED,m[e.INFO_CODES.E_PLAYER_NO_COMPATIBLE_FORMAT]=r.default.ERR_BROWSER_UNSUPPORTED,m[e.INFO_CODES.E_PLAYER_360_IS_NOT_SUPPORTED]=r.default.ERR_BROWSER_UNSUPPORTED_SKIP_IN_10,f(m,[e.INFO_CODES.E_SAPI_UNSUPPORTED_LIVE_ON_HTML,e.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_SAFARI_STYLE_NONE,e.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_GENERAL_STYLE_NONE,e.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_REPLACED_BY_BGINACTIVE,e.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_POWER_SAVING,e.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_BLOCKERS_SCREEN],r.default.ERR_FLASH_IS_BLOCKED);var y={};y[e.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_SRC_NOT_SUPPORTED]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE,y[e.INFO_CODES.E_SAPI_RESTRICTED_NETWORK_TYPE]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,f(y,[e.PLAYER_CODES.E_PLAYER_NOT_ENABLED,e.PLAYER_CODES.E_PLAYER_NOT_UPTO_DATE,e.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED],r.default.ERR_TITLE_CANNOT_PLAY_VIDEO),p(e.PLAYER_CODES).forEach(function(t){y[t]||(y[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG)});var v={};v[e.PLAYER_CODES.E_PLAYER_NOT_ENABLED]=r.default.ERR_FLASH_LATEST_DOWNLOAD,v[e.PLAYER_CODES.E_PLAYER_NOT_UPTO_DATE]=r.default.ERR_FLASH_LATEST_DOWNLOAD,v[e.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_NETWORK]=r.default.ERR_NETWORK_ISSUE,e.PLAYER_CODES.E_NO_PLUGIN_FOUND="603",p(e.PLAYER_CODES).forEach(function(t){v[t]||(v[t]=r.default.ERR_GENERAL_ERROR)}),y[e.FLASH_CODES.E_FLASH_HLS_FRAGMENT_NW_ERROR]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,y[e.FLASH_CODES.E_HLS_CLIENT_DISABLE_COOKIES]=r.default.ERR_TITLE_CANNOT_PLAY_VIDEO,y[e.FLASH_CODES.E_PLAYER_FLASH_STREAM_NOT_FOUND]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE,p(e.FLASH_CODES).forEach(function(t){y[t]||(y[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG)}),v[e.FLASH_CODES.E_FLASH_HLS_FRAGMENT_NW_ERROR]=r.default.ERR_NETWORK_ISSUE,v[e.FLASH_CODES.E_HLS_CLIENT_DISABLE_COOKIES]=r.default.ERR_COOKIE_DISABLED,p(e.FLASH_CODES).forEach(function(t){t!==e.FLASH_CODES.E_FLASH_HLS_FRAGMENT_NW_ERROR&&t!==e.FLASH_CODES.E_HLS_CLIENT_DISABLE_COOKIES&&(v[t]=r.default.ERR_GENERAL_ERROR)});var g={};p(e.PLAYER_JS_HLS_CODES).forEach(function(t){g[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG});var E={};p(e.PLAYER_JS_HLS_CODES).forEach(function(t){E[t]=r.default.ERR_GENERAL_ERROR});var b={};f(b,[e.SAPI_CODES.E_SAPI_INCOMPATIBLE_FORMAT,e.SAPI_CODES.E_SAPI_NO_STREAMS_RETURNED,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_TIMEOUT,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_UNKNOWN,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_CARMOT,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_UNMAPPED],r.default.ERR_TITLE_SOMETHING_WENT_WRONG),f(b,[e.SAPI_CODES.E_SAPI_USER_NOT_AUTHORIZED,e.SAPI_CODES.E_SAPI_DRM_RESTRICTED],r.default.ERR_TITLE_CANNOT_PLAY_VIDEO),p(e.SAPI_CODES).forEach(function(t){b[t]||(b[t]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE)});var A={};A[e.SAPI_CODES.E_SAPI_USER_NOT_AUTHORIZED]=r.default.ERR_UNAUTHORIZED,A[e.SAPI_CODES.E_SAPI_RESTRICTED_TO_INTERNAL]=r.default.ERR_UNAVAILABLE,f(A,[e.SAPI_CODES.E_SAPI_INCOMPATIBLE_FORMAT,e.SAPI_CODES.E_SAPI_NO_STREAMS_RETURNED,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_TIMEOUT,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_UNKNOWN,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_CARMOT,e.SAPI_CODES.E_SAPI_TEMP_ERR_JAPI_UNMAPPED],r.default.ERR_GENERAL_ERROR),p(e.SAPI_CODES).forEach(function(t){A[t]||(A[t]=r.default.ERR_MISSING_OR_DAMAGED)});var S={};p(e.WARNING_CODES).forEach(function(t){t!==e.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE&&(S[t]=r.default.ERR_TITLE_SOMETHING_WENT_WRONG)}),S[e.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE]=r.default.ERR_TITLE_VIDEO_NOT_AVAILABLE;var T={};T[e.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE]=r.default.ERR_LIVE_PLAYBACK_COMPLETE,p(e.WARNING_CODES).forEach(function(t){t!==e.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE&&(T[t]=r.default.ERR_GENERAL_ERROR)});var I={};I[e.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_BROWSER]=function(t){return t.android?r.default.ERR_DRM_ANDROID_UNSUPPORTED_BROWSER:t.ios?r.default.ERR_DRM_IOS_UNSUPPORTED_BROWSER:null},I[e.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_OS]=function(t){return t.ios?r.default.ERR_DRM_IOS_UNSUPPORTED_OS_VER:null},I[e.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_NETWORK_TYPE_WIFI]=r.default.ERR_DRM_UNSUPPORTED_NETWORK_WIFI;var C={};f(C,[e.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_BROWSER,e.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_OS,e.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_NETWORK_TYPE],r.default.ERR_TITLE_CANNOT_PLAY_VIDEO);var R=function(){function t(t,e,n,i,r){if(!t||!e||!n)throw new Error("Error must be created with a group, category, and subcategory!");this.errorInfo=i,this._userAgent=r,this.group=t,this.phase=this._getPhaseFromState(i),this.category=e,this.subcategory=n,this._msg=i?i.msg:null,this.debugMessage=i?i.debugMsg:null,this.prefetch=!(!i||void 0===i.prefetch)&&i.prefetch}return Object.defineProperty(t.prototype,"rep",{get:function(){return h(this)},enumerable:!0,configurable:!0}),t.prototype.isSAPIError=function(){return this.category>=c&&this.category<=d},t.prototype._getPhaseFromState=function(t){var e="S";return t&&t.playbackState&&(t.playbackState.state===i.States.VIDEO||t.playbackState.state===i.States.END)&&(e="P"),e},Object.defineProperty(t.prototype,"title",{get:function(){var t=null,n=this.errorInfo.playbackState&&this.errorInfo.playbackState.loadedItem&&this.errorInfo.playbackState.loadedItem.isLive();if(this.isSAPIError())t=b;else{if(this.category===a&&-1!==s.indexOf(this.subcategory)&&n&&this._userAgent&&(this._userAgent.android||this._userAgent.ios))return r.default.ERR_TITLE_SOMETHING_WENT_WRONG;this.category===a||this.category===u?t=y:this.category===e.E_WARNING?t=S:this.category===e.E_INFO?t=_:this.category===e.E_PLAYER_DRM?t=C:this.category===l&&(t=g)}return t&&t[this.subcategory]||r.default.ERR_TITLE_SOMETHING_WENT_WRONG},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){var t=null,n=this.errorInfo.playbackState&&this.errorInfo.playbackState.loadedItem&&this.errorInfo.playbackState.loadedItem.isLive();if(this.isSAPIError())t=A;else{if(this.category===a&&-1!==s.indexOf(this.subcategory)&&n&&this._userAgent&&(this._userAgent.android||this._userAgent.ios))return r.default.ERR_LIVE_IOS_PLAYBACK;this.category===a||this.category===u?t=v:this.category===e.E_PLAYER_DRM?t=I:this.category===e.E_WARNING?t=T:this.category===e.E_INFO?t=m:this.category===l&&(t=E)}var i=t&&t[this.subcategory];return i="function"==typeof i?i(this._userAgent):i,this._msg||i||r.default.ERR_TECH_DIFFICULTIES},enumerable:!0,configurable:!0}),t}();e.default=R},function(t,e,n){"use strict";t.exports.Command=o;var i=n(16),r=n(3);function o(t,e){this.data=t,this.client=e,i.call(this,this.constructor.name)}t.exports.CmdNames={CMD_MEDIA_LOAD:"MediaLoad",CMD_STREAM_LOAD:"StreamLoad",CMD_LICENSE_LOAD:"LicenseLoad",CMD_SEGMENT_LOAD:"SegmentLoad",CMD_MP4_INIT_SEGMENT_LOAD:"Mp4InitSegmentLoad",CMD_SUBTITLE_SEGMENT_LOAD:"SubtitleSegmentLoad",CMD_ERROR_HANDLE:"ErrorHandle"},t.exports.CmdEvents={CMD_COMPLETE:"Complete",CMD_PROGRESS:"Progress",CMD_ERROR:"Error"},r.inherits(o,i),o.prototype.destroy=function(){this.data=null,i.prototype.destroy.call(this)},o.prototype.execute=function(){},o.prototype.cancel=function(){}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.HAVE_NOTHING=0]="HAVE_NOTHING",t[t.HAVE_METADATA=1]="HAVE_METADATA",t[t.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",t[t.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",t[t.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"}(e.VIDEO_TAG_READY_STATES||(e.VIDEO_TAG_READY_STATES={})),e.CHROMECAST_RECEIVER_ID="84BB6CBA",e.PLAYLIST_THUMB_DIMENSION="130x72",e.PLAYLIST_SECTION_ICON_DIMENSION="14x14",e.PLAYLIST_LABEL_ICON_DIMENSION="70x70",e.PLAYLIST_COUNT_PER_PAGE=12,e.PLAYLIST_HIDDEN_COUNT_PER_PAGE=6,e.PLAYLIST_ENDSCREEN_COUNT_PER_PAGE=12,e.PLAYLIST_ITEM_WIDTH=134,e.PLAYLIST_ITEM_MARGIN_RIGHT=14,e.UP_NEXT_COUNTDOWN_TIME=5,e.DOCKED_PLAYER_FULL="full",function(t){t.SCHEDULED="scheduled",t.NO_ARCHIVE="no-archive",t.POST="post",t.REPLAY="replay"}(e.LIVE_STATES_FOR_VOD||(e.LIVE_STATES_FOR_VOD={})),function(t){t.VP_SCRIPT_EXEC="VP_SCRIPT_EXEC",t.VP_INIT="VP_INIT",t.VP_CTRL_RENDER="VP_CTRL_RENDER",t.VP_CTRL_FETCH_METADATA="VP_CTRL_FETCH_METADATA",t.VP_CTRL_PREPARE_AUTOPLAY="VP_CTRL_PREPARE_AUTOPLAY",t.VP_CTRL_LOAD_METADATA="VP_CTRL_LOAD_METADATA",t.VP_CTRL_PREPARE_START="VP_CTRL_PREPARE_START",t.VP_RC_SETUP="VP_RC_SETUP_",t.VP_RC_PREPARE_NEXT="VP_RC_PREPARE_NEXT_",t.VP_RC_PRELOAD_NEXT_AD="VP_RC_PRELOAD_NEXT_AD_",t.VP_RC_PRELOAD_NEXT="VP_RC_PRELOAD_NEXT_",t.VP_AD_FETCH="VP_AD_FETCH",t.VP_AD_SETUP_TIMEOUT="VP_AD_SETUP_TIMEOUT",t.VP_AD_WAIT_FOR_AD_READY="VP_AD_WAIT_FOR_AD_READY",t.VP_AD_MAYBE_PLAY="VP_AD_MAYBE_PLAY",t.VP_AD_VPAID_PREPARE_RENDERER="VP_AD_VPAID_PREPARE_RENDERER",t.VP_AD_PREPARE_START="VP_AD_PREPARE_START",t.VP_AD_NORMAL_PREPARE_RENDERER="VP_AD_NORMAL_PREPARE_RENDERER"}(e.PERF||(e.PERF={})),function(t){t.PLAYLIST_ID="playlist_id",t.PLAYLIST_ID_AND_MEDIA_ITEMS="playlist_id_and_mediaItems",t.ONLY_MEDIA_ITEMS="mediaItems"}(e.PlaylistRenderingType||(e.PlaylistRenderingType={})),function(t){t.THREE_SIXTY="360"}(e.VIDEO_TYPE||(e.VIDEO_TYPE={})),e.HIGH_DEFINITION_HEIGHT_THRESHOLD=720,e.HIGH_DEFINITION_WIDTH_THRESHOLD=1080,function(t){t.PORTRAIT="portrait",t.LANDSCAPE="landscape"}(e.Orientation||(e.Orientation={})),e.SUPPORTED_THEMES=["fuji","aol"],function(t){t.wrapper="vp-ddm-wrapper",t.selectedWrapper="vp-ddm-selected-wrapper",t.selected="vp-ddm-selected",t.availability="vp-ddm-availability",t.notAvailable="not-available",t.dropDownIcon="vp-ddm-chevron",t.list="vp-ddm-list",t.listItem="vp-ddm-item"}(e.DDM_CSS_SETTINGS||(e.DDM_CSS_SETTINGS={})),function(t){t.CLICK="click",t.AUTOPLAY="autoplay",t.API="api",t.CONTINUOUS="continuous",t.HOVER="hover",t.PLAY="play",t.PAUSE="pause",t.SCROLL="scroll",t.SWIPE="swipe",t.BACKGROUND="background"}(e.REQUEST_TYPES||(e.REQUEST_TYPES={})),function(t){t.VOLUME="yvpVolume"}(e.LocalStorageKey||(e.LocalStorageKey={})),e.ID3_MATCH_PATTERN={JSON:/\{([\S\s]*)\}/,NIELSEN:/\bwww.nielsen.com.*(\/\d+){3}/},function(t){t.BOTTOM="bottom",t.RIGHT="right",t.HIDDEN="hidden"}(e.PLAYLIST_POS||(e.PLAYLIST_POS={}))},function(t,e,n){"use strict";e.HLSEvent={STATE_CHANGED:"stateChanged",PRELOAD_PROGRESS:"preloadProgress",MEDIA_LOADED:"mediaLoaded",STREAM_UPDATED:"streamUpdated",INFO_UPDATE:"infoUpdate",SEGMENT_FIRST_BYTE_LOADED:"segmentFirstByteLoaded",SEGMENT_RENDERED:"segmentRendered",VTT_SEGMENT_LOADED:"vttSegmentLoaded",PCR_AVAILABLE:"pcrAvailable",STREAM_SWITCHED:"streamSwitched",LIVE_LOADING_LATE:"liveLoadingLate",LIVE_SYNCH:"liveSynch",WAITING:"hlsWaiting",CUEPOINT_DETECTED:"cuepointDetected",CUEPOINT_STARTED:"cuepointStarted",ABR_DATA_UPDATED:"abrDataUpdated",ERROR:"error",SEG_INFO_METRICS_AVAILABLE:"segInfoMetricsAvailable",CONTENT_LOAD_FINISHED:"contentLoadFinished",CC_VTT_AVAILABLE:"ccVttAvailable",BUFFER_GROWTH_DETECTED:"bufferGrowthDetected",MULTI_LANGUAGES_AVAILABLE:"multiLanguagesAvailable",TIMED_METADATA_READY:"timedMetadataReady",PLAY_BLOCKED:"playbackBlocked"},e.ExternalEvents=[e.HLSEvent.MEDIA_LOADED,e.HLSEvent.INFO_UPDATE,e.HLSEvent.VTT_SEGMENT_LOADED,e.HLSEvent.SEGMENT_FIRST_BYTE_LOADED,e.HLSEvent.SEGMENT_RENDERED,e.HLSEvent.STREAM_SWITCHED,e.HLSEvent.LIVE_LOADING_LATE,e.HLSEvent.STREAM_UPDATED,e.HLSEvent.WAITING,e.HLSEvent.CUEPOINT_DETECTED,e.HLSEvent.CUEPOINT_STARTED,e.HLSEvent.ABR_DATA_UPDATED,e.HLSEvent.PRELOAD_PROGRESS,e.HLSEvent.SEG_INFO_METRICS_AVAILABLE,e.HLSEvent.CONTENT_LOAD_FINISHED,e.HLSEvent.CC_VTT_AVAILABLE,e.HLSEvent.BUFFER_GROWTH_DETECTED,e.HLSEvent.MULTI_LANGUAGES_AVAILABLE,e.HLSEvent.TIMED_METADATA_READY,e.HLSEvent.PLAY_BLOCKED]},function(t,e,n){var i=n(231);i.Template=n(232).Template,i.template=i.Template,t.exports=i},function(t,e){e.isArray=function(t){return Array.isArray(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},e.isString=function(t){return"string"==typeof t},e.isObject=function(t){return"[object Object]"===function(t){return Object.prototype.toString.call(t)}(t)},e.isFunction=function(t){return"function"==typeof t},e.deepCopy=function(t){var n={};return e.isNullOrUndefined(t)?t:(Object.keys(t).forEach(function(i){e.isArray(t[i])?n[i]=t[i].slice():e.isObject(t[i])?n[i]=e.deepCopy(t[i]):n[i]=t[i]}),n)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.VOD="vod",t.LIVE_EVENT="liveEvent",t.LIVE_CHANNEL="liveChannel",t.CONTAINER="container"}(e.MediaItemType||(e.MediaItemType={})),function(t){t.NO_DATA="no-data",t.FETCHING="fetching",t.HAS_DATA="has-data",t.ERROR="error"}(e.ItemState||(e.ItemState={})),function(t){t.NO_DATA="no-source-data",t.FETCHING="fetching-source",t.HAS_DATA="has-source-data",t.ERROR="source-error"}(e.SourceState||(e.SourceState={})),function(t){t.NOT_RECOVERING="not-recovering",t.RECOVERING="recovering",t.RECOVERED="recovered"}(e.ItemRecoveryStatus||(e.ItemRecoveryStatus={})),function(t){t.UPLYNK="media/uplynk",t.SAPI="media/sapi",t.CONTAINER="media/container"}(e.MediaItemMimeType||(e.MediaItemMimeType={}))},function(t,e,n){"use strict";function i(t){this.name=t||"unnamed",this._events={},this._eventKeyCounter=0}t.exports=i,i.prototype.addEventListener=function(t,e,n){if(this._events){this._events[t]||(this._events[t]={});var i=t+"_"+ ++this._eventKeyCounter;return this._events[t][i]={subscriber:n,cb:e},i}},i.prototype.removeEventListener=function(t,e){this._events&&t in this._events&&this._events[t].hasOwnProperty(e)&&delete this._events[t][e]},i.prototype.removeEventListeners=function(t){var e=this;e._events&&t&&Object.keys(t).forEach(function(n){var i=t[n];n in e._events&&e._events[n].hasOwnProperty(i)&&(delete e._events[n][i],delete t[n])})},i.prototype.publish=function(t){if(this._events&&t in this._events){var e=this._events[t],n=arguments;Object.keys(e).forEach(function(t){var i=e[t];if(i)try{i.cb&&"function"==typeof i.cb&&i.cb.apply(i.subscriber,Array.prototype.slice.call(n,1))}catch(t){console.error("Error in event handler: ",t.message||t.toString(),t.stack)}})}},i.prototype.destroy=function(){this._events=null}},function(t,e,n){"use strict";e.Model=f;var i=e.StreamingMode={DASH:"dash",HLS:"hls"};e.MetadataTypes={RAW:"raw",RAW_SUBTITLE:"rawSubtitle",STRUCTURED:"structured"};var r=e.AbrModes={AUTO:"auto",LOW:"low",MID:"medium",HIGH:"high"},o=n(20),s=o.Stream,a=o.StreamTypes,u=n(172),l=n(12).HLSEvent,c=n(96),d=n(14),h=n(3),p=n(95);function f(t){if(!(t&&t.userAgent&&t.config&&t.metadata))throw new Error("Incomplete input parameters to Model");this.configure(t.config,t.userAgent),this._media={},this.streams=[],this.altRenditionGroups=[],this._streamUpdater=this.__controller.create(p),this._setMetadata(t.metadata),this.live=t.metadata&&t.metadata.live,this.hasEndlist=!1,this.duration=0,this.bufferLength=0,this.pendingBufferLength=0,this.bufferedRanges={length:0,ranges:[]},this.currentTime=0,this.timescale=9e4,this.TIMESTAMP_COMPARE_EPSILON=.065,this.preloading=!1,this.timedMetadataStore={},this.dimensions=t.config.dimensions?t.config.dimensions:{width:NaN,height:NaN},this.pixelRatio=1,this._abrMode=r.AUTO,this._userReqBitrate=0,this._segTimeMap={},this.currentLoadingStreamIndex=-1,this._pcr=null,this._livePlaybackStartTime=null,this._streamingMode=t.metadata.url&&-1!==t.metadata.url.indexOf(".mpd")?i.DASH:i.HLS,this.drmRequired=!1,this.drmInfo=[]}f.prototype.destroy=function(){this.config=null,this.streams&&(this.streams.forEach(function(t){t.destroy()}),this.streams=[]),this.altRenditionGroups&&(this.altRenditionGroups.forEach(function(t){t.destroy()}),this.altRenditionGroups=[]),this._segTimeMap={},this._streamUpdater.destroy(),this.timedMetadataStore=null},f.prototype.configure=function(t,e){var n=this;n.config=n.config||d.deepCopy(c),n.userAgent=e,t&&(Object.keys(t).forEach(function(e){n.config.hasOwnProperty(e)&&(n.config[e]=t[e])}),n.inWorkerScope=t.inWorkerScope),n.userAgent&&(n.config.demux.startChunkWithKeyFrame=!(n.userAgent.chrome&&n.userAgent.chrome>=50))},f.prototype.build=function(t){if(t){t.streamingMode===i.DASH&&(this._streamingMode=t.streamingMode,this.drmRequired=t.drm,this._mpd=t,this.live=!(!t.type||"dynamic"!==t.type.toLowerCase()));var e=this._buildAltRenditionGroups(t.renditionGroups);this._buildStreams(t.streamInfoList,e)}},f.prototype._collectDrmInfo=function(t){var e,n,i,r;for(e=0;e<t.length&&(i=t[e].getDrmInfo());e++)for(n=0;n<i.length;n++)r=i[n],h.isDrmItemContained(r,this.drmInfo)||this.drmInfo.push(r)},f.prototype._buildAltRenditionGroups=function(t){var e=this;return t?(Object.keys(t).forEach(function(n){var i=t[n];i&&Object.keys(i).forEach(function(t){var r=e._getAltRenditionGroup(n,t),o=i[t];o&&o.length&&(e._setLiveConfig(o[0]),r?e._updateAlternateRenditionGroup(n,t,o):e._addAlternateRenditionGroup(n,t,o))})}),e._collectDrmInfo(e.altRenditionGroups),e.altRenditionGroups):e.altRenditionGroups},f.prototype._getAltRenditionGroup=function(t,e){for(var n=0;n<this.altRenditionGroups.length;n++){var i=this.altRenditionGroups[n];if(i.type===t&&i.groupId===e)return i}return null},f.prototype._addAlternateRenditionGroup=function(t,e,n){var i=this.metadata&&this.metadata.currLang,r=this.__controller.create(u,t,e,n,i);this.altRenditionGroups.push(r)},f.prototype._updateAlternateRenditionGroup=function(t,e,n){if(n&&n.length){var i=this._getAltRenditionGroup(t,e);n.forEach(function(t){i.update(t)})}},f.prototype._buildStreams=function(t,e){var n=this;t&&t.length&&((t=n._filterStreams(t)).forEach(function(t){t.sessionId=n.sessionId,t.type=a.MAIN,n._setLiveConfig(t);for(var i=!1,r=n.isDash()?"groupId":"url",o=0;o<n.streams.length;o++){if(n.streams[o][r]===t[r]){n.updateStream(o,t),i=!0;break}}i||n.addStream(t,e)}),n._collectDrmInfo(n.streams),n._sortStreams(),n.duration=n.live?NaN:t[0].duration)},f.prototype._filterStreams=function(t){return t&&t.length?(this.userAgent.firefox&&t[0].channels&&(t=this._filterMonoChannelStreams(t)),t=t.filter(function(t){var e=t.codecs;if(!e)return!0;for(var n=0;n<e.length;n++)if(-1===e[n].indexOf("avc1")&&-1===e[n].indexOf("mp4a")&&-1===e[n].indexOf("aac"))return!1;return!0})):t},f.prototype._filterMonoChannelStreams=function(t){for(var e=!1,n=t[0].channels,i=1;i<t.length;i++)if(t[i].channels&&n!==t[i].channels){e=!0;break}return e?t.filter(function(t){return 1!==t.channels}):t},f.prototype.isDash=function(){return this._streamingMode===i.DASH},f.prototype.addStream=function(t,e){var n=this.__controller.create(s,t,e);this.streams.push(n),n.setStreamIndex(this.streams.length-1),this._streamUpdater.addStream(n),1===this.streams.length&&this.setCurrentLoadingStream(n.index)},f.prototype.updateStream=function(t,e){t>=this.streams.length||(!0===e.hasEndList&&(this.hasEndlist=!0),this._streamUpdater.update(e))},f.prototype.synchStreamTimelines=function(t){var e=this.getCurrentLoadingStream();if(e&&this.live&&e.segments.length){var n=e.segments[0].programDateTime,i=e.segments[0].startTime;d.isNullOrUndefined(n)||d.isNullOrUndefined(i)||this.altRenditionGroups.forEach(function(e){t&&e.type!==t||e.adjustStartTime(i,n)})}},f.prototype.getCurrentLoadingStream=function(){return this.getStreamByIndex(this.currentLoadingStreamIndex)},f.prototype.setCurrentLoadingStream=function(t){this.streams&&this.streams.length&&(t<0||t>=this.streams.length||(this.currentLoadingStreamIndex=t))},f.prototype.getCurrentPlayingStream=function(){return this.getStreamByIndex(this.currentPlayingStreamIndex)},f.prototype.setCurrentPlayingStream=function(t){this.streams&&this.streams.length&&(t<0||t>=this.streams.length||(this.currentPlayingStreamIndex=t))},f.prototype.getTotalBufferLength=function(){for(var t=this.bufferedRanges,e=0,n=0;n<t.length;n++)e+=t.ranges[n].end-t.ranges[n].start;return e},f.prototype.setPCR=function(t){(null===this._pcr||void 0===this._pcr||isNaN(this._pcr))&&(this._pcr=t,this.__controller.sendEvent(l.PCR_AVAILABLE,t))},f.prototype.getPCR=function(){return this._pcr},f.prototype.setLivePlaybackStartTime=function(t){this._livePlaybackStartTime=t},f.prototype.getLivePlaybackStartTime=function(){return this._livePlaybackStartTime},f.prototype.setStartOffset=function(t){this.startOffsetTimestamp&&!isNaN(this.startOffsetTimestamp)||(this.startOffsetTimestamp=t)},f.prototype.setSegEndTimeStamps=function(t,e,n,i){if(t&&i){var r=t===a.MAIN?this.streams:this._getAltRenditionGroup(t,e);r&&r.length&&r.forEach(function(t){var e=t.getSegmentfromSeqNum(n);e&&(e.endTimestamps.audio=i.audio,e.endTimestamps.video=i.video)})}},f.prototype.getPrevSegEndTimestamps=function(t,e){if(!t||!e)return null;var n=t.getIndexFromSeqNum(e.seqNum);return n>=1&&t.segments&&n<t.segments.length?t.segments[n-1].endTimestamps:null},f.prototype.getStreamRefreshInterval=function(){var t=this.getCurrentLoadingStream();return t?t.refreshInterval:null},f.prototype._setMetadata=function(t){if(t){this.sessionId=t?t.sessionId:null,this.is360=!!t&&t.is360,t.type=e.MetadataTypes.RAW,this.metadata=t;var n=t.streams,i=t.altStreams;n&&n.length>0&&((n[0].hls_info||n[0].hlsInfo||n.length>1)&&(this.metadata.type=e.MetadataTypes.STRUCTURED,this.metadata.hasMediaMetadata=!0),(n[0].hls_info||n[0].hlsInfo)&&(this.metadata.hasStreamMetadata=!0)),this.metadata.hasMediaMetadata||this.metadata.hasStreamMetadata||(this._media=n&&1===n.length?n[0]:t),i&&i.length&&(this.metadata.hasAltStreamMetadata=!0)}},f.prototype._sortStreams=function(){this.streams.sort(function(t,e){return t.bitrate-e.bitrate}),this.streams.forEach(function(t,e){t.index=e,t.segments.forEach(function(t){t.setStreamIndex(e)})})},f.prototype.getSegment=function(t,e){return t<0||t>=this.streams.length?null:this.streams[t].getSegmentfromSeqNum(e)},f.prototype._getFallbackStreams=function(t){var e=[];return this.streams.forEach(function(n){n.index!==t&&e.push({index:n.index,url:n.url})}),e},f.prototype.setABRMode=function(t){var e=this,n=e._abrMode;return e._abrMode=r.AUTO,Object.keys(r).forEach(function(n){r[n]===t.preference&&(e._abrMode=t.preference)}),e._userReqBitrate=1e3*t.stream.bitrate,n!==e._abrMode},f.prototype.getABRMode=function(){return this._abrMode},f.prototype.setAudioLanguage=function(t){var e=!1;return this.altRenditionGroups.forEach(function(n){n.type===a.AUDIO&&(e=n.setCurrentStreamWithName(t)||e)}),e},f.prototype.getMediaDto=function(){var t={streams:[],altRenditionGroups:[],live:this.live,duration:this.duration,currentPlayingStreamIndex:this.currentPlayingStreamIndex,currentLoadingStreamIndex:this.currentLoadingStreamIndex,preloading:this.preloading,currentKbps:this.__controller.services.segmentMetrics.getMetricsBandwidthInfo(),abrMode:this._abrMode,streamingMode:this._streamingMode,drmRequired:this.drmRequired,drmInfo:this.drmInfo};return this.streams.forEach(function(e){t.streams.push(e.dto())}),t},f.prototype.getUserReqBitrate=function(){return this._userReqBitrate},f.prototype._setLiveConfig=function(t){t&&t.segmentInfoList&&!d.isNullOrUndefined(t.hasEndList)&&d.isNullOrUndefined(this.live)&&(this.live=!t.hasEndList)},f.prototype.getMediaUrl=function(){var t=this._media.url||"";return!t.length&&this._media.host&&this._media.path&&(t=this._media.host+this._media.path),t},f.prototype.getMediaCdn=function(){return this._media.cdn||""},f.prototype.getStreamByIndex=function(t){return this.streams&&this.streams.length&&t>=0&&t<this.streams.length?this.streams[t]:null},f.prototype.getSegmentLength=function(){return this.streams&&this.streams.length?this.streams[0].targetDuration:NaN},f.prototype.updateTimedMetadata=function(t,e){if(t&&t.payload){this.timedMetadataStore[e]=this.timedMetadataStore[e]||[];for(var n=this.timedMetadataStore[e].length,i=0;i<this.timedMetadataStore[e].length;i++){var r=this.timedMetadataStore[e][i];if(Math.abs(r.timestamp-t.timestamp)<=.1)return!1;if(t.timestamp<r.timestamp){n=i;break}}return this.timedMetadataStore[e].splice(n,0,t),!0}}},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.INIT="init",t.WAITING="waiting",t.VIDEO="video",t.END="end"}(i=e.States||(e.States={})),e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(){}return Object.defineProperty(t,"deviceType",{get:function(){return i.userAgent.mobile?i.userAgent.ipad||i.userAgent.androidTablet?"tablet":"phone":i.userAgent.tv?"tv":"desktop"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"canPlayInline",{get:function(){return!i.userAgent.mobile||(i.userAgent.android&&i.userAgent.chrome>=50||i.userAgent.ios&&i.userAgent.iosVersion>=10)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"hasMuteAtFirstPlayRestriction",{get:function(){return i.userAgent.android&&i.userAgent.chrome>=56},enumerable:!0,configurable:!0}),Object.defineProperty(t,"hasLoadRestriction",{get:function(){return i.userAgent.ios&&i.userAgent.iosVersion>=11},enumerable:!0,configurable:!0}),Object.defineProperty(t,"hasTouchRestrictions",{get:function(){return i.userAgent.mobile&&(t.hasNativeAutoplaySupport||t.hasLoadRestriction)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"needsGestureToPlay",{get:function(){return t._needsGestureToPlay(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"needsGestureToPlayUnmuted",{get:function(){return t._needsGestureToPlay(!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"autoplaySupported",{get:function(){return t.canPlayInline&&t.isAutoplaySupported()},enumerable:!0,configurable:!0}),Object.defineProperty(t,"drmSupported",{get:function(){return i.userAgent.ios?!(!(i.userAgent.iosVersion>11.2&&i.userAgent.safari)||i.userAgent.iosWebView||i.userAgent.chrome||i.userAgent.firefox):i.userAgent.android?!!i.userAgent.chrome:!!i.userAgent.desktop},enumerable:!0,configurable:!0}),Object.defineProperty(t,"autoplayByUIEvtOnly",{get:function(){return t.autoplaySupported&&t.canAutoplayByUIEvtOnly()},enumerable:!0,configurable:!0}),Object.defineProperty(t,"hasNativeAutoplaySupport",{get:function(){return t.autoplaySupported&&!t.autoplayByUIEvtOnly},enumerable:!0,configurable:!0}),Object.defineProperty(t,"airplaySupported",{get:function(){return!1},enumerable:!0,configurable:!0}),t.updateNetwork=function(e,n){n&&!t.network.available&&(t.network.mobile=e,t.network.connectionType=n,t.network.available=!0)},t.update=function(t,e){"boolean"==typeof t&&e&&!this.network.available&&(this.network.mobile=t,this.network.connectionType=e,this.network.available=!0)},t.isAutoplaySupported=function(){return!i.userAgent.mobile||(i.userAgent.android&&i.userAgent.chrome>=50||i.userAgent.ios&&i.userAgent.iosVersion>=10||!1)},t.canAutoplayByUIEvtOnly=function(){return!!(i.userAgent.android&&i.userAgent.chrome>=50&&i.userAgent.chrome<53||i.userAgent.iosVersion>=10&&t.needsGestureToPlay)},t._needsGestureToPlay=function(t){var e=window.document.createElement("video");e.muted=t,e.setAttribute("playsinline","true");var n=e.play&&e.play();n&&n.catch(function(t){});var i=e.paused;return e=null,i},t.network={available:!1,connectionType:"unknown",mobile:!1},t}();e.default=r},function(t,e,n){"use strict";t.exports.Stream=c;var i=e.StreamTypes={MAIN:"MAIN",AUDIO:"AUDIO",VIDEO:"VIDEO",SUBTITLES:"SUBTITLES",CLOSED_CAPTIONS:"CLOSED_CAPTIONS"},r=n(93),o=n(169),s=n(94),a=n(17).StreamingMode,u=n(49),l=n(171);function c(t,e){this.segments=[],this.cuepoints=[],this.type=i.MAIN,this.videoCodec=null,this.audioCodec=null,this.mp4Chunks={sidx:null,first:null},this.adjusted=!1,this._initSegmentCache=new l(this),this.activeInitSegment=null,t&&(this._initAlternateGroups(t,e),this.updateConfig(t)),this._mp4Parser=new u}c.prototype.destroy=function(){var t=this;t.segments=[],t.cuepoints=[],"mp4"===t.containerFormat&&Object.keys(t.mp4Chunks).forEach(function(e){var n=t.mp4Chunks[e];n&&n.destroy()}),t._initSegmentCache.destroy()},c.prototype._initAlternateGroups=function(t,e){if(this.altRenditionGroups={},e)for(var n=0;n<e.length;n++){var i=e[n];i.groupId===t.audioGroupId?(this.altRenditionGroups.AUDIO=i,this.audioGroupId=t.audioGroupId):i.groupId===t.videoGroupId?(this.altRenditionGroups.VIDEO=i,this.videoGroupId=t.videoGroupId):i.groupId===t.subtitlesGroupId?(this.altRenditionGroups.SUBTITLES=i,this.subtitlesGroupId=t.subtitlesGroupId):i.groupId===t.ccGroupId&&(this.altRenditionGroups.CLOSED_CAPTIONS=i,this.ccGroupId=t.ccGroupId)}},c.prototype.getAlternateStream=function(t){if(this.altRenditionGroups[t])return this.altRenditionGroups[t].getCurrentStream()},c.prototype.setAlternateStream=function(t,e){this.altRenditionGroups[t]&&this.altRenditionGroups[t].setCurrentStream(e)},c.prototype.updateConfig=function(t){var e=this,n=e.audioCodec&&e.audioCodec.length>0;if(t&&(e.streamingMode=t.streamingMode||e.streamingMode,e.bitrate=t.bitrate||e.bitrate,e.avgBitrate=t.avgBitrate||e.avgBitrate,e.url=t.url||e.url,e.containerFormat=t.containerFormat||e.containerFormat,e.cdn=t.cdn||e.cdn,e.rcMode=t.rcMode||"cbr",e.channels=t.channels>=0?t.channels:e.channels,e.width=t.width>=0?t.width:e.width,e.height=t.height>=0?t.height:e.height,e.index=t.index>=0?t.index:e.index,e.hlsInfo=t.hlsInfo||e.hlsInfo,e.targetDuration=t.targetDuration||NaN,e.refreshInterval=1e3*e.targetDuration,e.sessionId=t.sessionId||null,e.audioCodec=t.audioCodec||e.audioCodec,e.videoCodec=t.videoCodec||e.videoCodec,e.type=t.type||i.MAIN,e.sidxOffset=t.sidxOffset>=0?t.sidxOffset:e.sidxOffset,e.sidxLength=t.sidxLength>=0?t.sidxLength:e.sidxLength,e.firstSegOffset=t.firstSegOffset>=0?t.firstSegOffset:e.firstSegOffset,e.firstSegLength=t.firstSegLength>=0?t.firstSegLength:e.firstSegLength,e.hasAudio=t.hasAudio||n||e.channels>0||e.hasAudio,e.groupId=t.groupId||null,void 0!==t.hasEndList&&null!==t.hasEndList&&(e.hasEndList=t.hasEndList),e.hlsInfo&&e.hlsInfo.mp4_url&&(e.mp4Chunks.sidx=e._createMp4Chunk("sidx",e.sidxOffset,e.sidxLength,e.hlsInfo.mp4_url),e.mp4Chunks.first=e._createMp4Chunk("first",e.firstSegOffset,e.firstSegLength,e.hlsInfo.mp4_url)),t.drmInfo&&(e.drmInfo=t.drmInfo)),e.url&&e.url.length&&e.url.indexOf("_60fps")>=0?e.frameRate=60:e.frameRate="AUDIO"===e.type?0:30,t&&t.segmentInfoList){var s=[];t.segmentInfoList.forEach(function(t){t.levelIndex=e.index,t.bitrate=e.bitrate,t.sessionId=e.sessionId,t.cdn=e.cdn;var n=e.getSegmentfromSeqNum(t.sequenceNum);n&&(t.endTimestamps=n.endTimestamps),s.push(e.__controller.create(r,t))}),s.length&&(e.segments=s,e.startSeqNum=s[0].seqNum,e.endSeqNum=s[s.length-1].seqNum,t.cuepointList&&t.cuepointList.length&&(t.cuepointList.forEach(function(t){e.hasCuepoint(t.startSeqNum)||e.cuepoints.push(new o(t))}),e.updateCuepointTime()))}var a=e.altRenditionGroups?e.altRenditionGroups.AUDIO:null;e.type===i.MAIN&&a&&e.containerFormat&&!a.getContainerFormat()&&a.setContainerFormat("ts"===e.containerFormat?"aac":"mp4")},c.prototype.addInitSegment=function(t){return"mp4"===this.containerFormat?this._initSegmentCache.add(t):null},c.prototype.getInitSegment=function(t){if(!t){if(!this.segments.length)return null;t=this.segments[0]}return this._initSegmentCache.get(t.initSegment)},c.prototype._createMp4Chunk=function(t,e,n,i){var r,o=this.mp4Chunks[t];return o||("mp4"===this.containerFormat&&i?(e>=0&&n>=0&&(r={start:e,end:e+n-1}),new s({name:t,url:i,range:r})):null)},c.prototype.getMp4Chunk=function(t){return"mp4"===this.containerFormat?this.mp4Chunks[t]:null},c.prototype.dto=function(){var t=this,e={segments:[],cuepoints:[]},n=["segments","__controller","cuepoints","altRenditionGroups","_initSegmentCache","activeInitSegment"];return Object.keys(t).forEach(function(i){n.indexOf(i)>=0||(e[i]=t[i])}),t.segments.forEach(function(t){e.segments.push(t.dto())}),t.cuepoints.forEach(function(t){e.cuepoints.push(t.dto())}),e},c.prototype.setStreamIndex=function(t){this.index=t,this.segments.forEach(function(e){e.setStreamIndex(t)})},c.prototype.getSeqNumBeforePosition=function(t){if(!this.segments.length)return NaN;if(t<this.segments[0].startTime)return this.startSeqNum;for(var e=0;e<this.segments.length;e++){var n=this.segments[e];if(n&&n.startTime<=t&&n.startTime+n.duration>t)return this.startSeqNum+e}var i=this.segments[this.segments.length-1];return i&&i.startTime+i.duration===t?this.endSeqNum:NaN},c.prototype.getSegmentfromSeqNum=function(t){var e=this.getIndexFromSeqNum(t);return e>=0&&e<this.segments.length?this.segments[e]:null},c.prototype.getIndexFromSeqNum=function(t){if(t>=this.startSeqNum&&t<=this.endSeqNum)for(var e=0;e<this.segments.length;e++)if(this.segments[e]&&this.segments[e].seqNum===t)return e;return-1},c.prototype.contains=function(t){return t>=this.startSeqNum&&t<=this.endSeqNum},c.prototype.isEmpty=function(){return 0===this.segments.length},c.prototype.isReady=function(){if("mp4"!==this.containerFormat)return this.url&&this.segments.length>0;var t=this._initSegmentCache.getFirst();if(this.streamingMode===a.HLS&&this.hlsInfo&&this.hlsInfo.mp4_url){var e=this.mp4Chunks.sidx;return t&&e&&t.loaded&&e.loaded}return t&&t.loaded&&this.segments.length>0},c.prototype.hasCuepoint=function(t){for(var e=this.cuepoints.length-1;e>=0;e--)if(this.cuepoints[e].startSeqNum===t)return!0;return!1},c.prototype.updateCuepointTime=function(){for(var t,e=0;e<this.cuepoints.length;e++)(t=this.getSegmentfromSeqNum(this.cuepoints[e].startSeqNum))&&this.cuepoints[e].setCueOutStartTime(t.startTime)},c.prototype.equals=function(t){return!!t&&(this.url===t.url&&this.type===t.type&&(this.isDash()?this.groupId===t.groupId:this.index===t.index))},c.prototype.updateSegmentRanges=function(t){if(t&&t.length)for(var e=0;e<t.length&&e<this.segments.length;e++)this.segments[e].brStartOffset=t[e].brStartOffset,this.segments[e].brEndOffset=t[e].brEndOffset},c.prototype.setMp4Timescale=function(t){if("mp4"===this.containerFormat&&t&&t.loaded&&t.data){var e=this._mp4Parser.parse(t.data,"mdhd");if(e&&e.timescale>0)this.timescale=e.timescale;else{var n=this._mp4Parser.parse(t.data,"mvhd");this.timescale=n.timescale}}},c.prototype.isDash=function(){return this.streamingMode===a.DASH},c.prototype.getDrmInfo=function(){return this.drmInfo}},function(t,e,n){"use strict";t.exports.WorkerDefs={HlsTransformer:n(63),Controller:n(91)},t.exports.MessageTypes={EVENT:"event",MESSAGE:"message"},t.exports.MessageIds={CREATE:"create",DESTROY:"destroy",CALL_METHOD:"callMethod",EVENT:"eventPublish",CREATE_SRC_BUFFER:"createSrcBuffer",APPEND_SRC_BUFFER:"appendSrcBuffer",TIMED_METADATA:"timedMetadata",CLEAR_SRC_BUFFER:"clearSrcBuffer",END_OF_STREAM:"endOfStream",SAVE_AVG_BANDWIDTH:"saveAvgBandwidth",PLAY_AFTER_STREAM_CHANGE:"playAfterStreamChange",PAUSE_BEFORE_STREAM_CHANGE:"pauseBeforeStreamChange",DRM_INIT:"drmInit",DRM_LICENSE_INFO:"drmLicenseInfo"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=["touchstart","touchmove","touchend","touchcancel","mousedown","mouseup"],o=function(){function t(t,e,n){void 0===n&&(n=!1);var o=this;t=i.isString(t)?document.getElementById(t):t,this.element=t,this.moved=!1,this.mouseDown=!1,this._isTouchDevice=!1,i.isFunction(e)?(this.onTap=e,this.shouldPropagate=n):(this.onTap=function(){},this.shouldPropagate=!!i.isBoolean(e)&&e),t&&t.addEventListener("tap",this.onTap,!1),r.forEach(function(e){t&&t.addEventListener(e,o,!1)})}return t.prototype.destroy=function(){var t=this,e=this.element;e&&(e.removeEventListener("tap",this.onTap,!1),r.forEach(function(n){e.removeEventListener(n,t,!1)}),this.element=null)},t.prototype.isTouchDevice=function(){return this._isTouchDevice},t.prototype.handleEvent=function(t){switch(t.type){case"mousedown":if(this.isTouchDevice())return;case"touchstart":this._start(t);break;case"touchmove":this._move(t);break;case"mouseup":if(this.isTouchDevice())return;case"touchend":this._end(t);break;case"touchcancel":this._cancel()}},t.prototype._start=function(t){var e,n="touchstart"===t.type;n&&(this._isTouchDevice=!0,e=t.touches&&t.touches[0]||{}),this.mouseDown=!0,this.startX=n?e.clientX:t.clientX,this.startY=n?e.clientY:t.clientY,this.lastPageX=n?e.pageX:t.pageX,this.lastPageY=n?e.pageY:t.pageY,this.moved=!1},t.prototype._move=function(t){var e=t.touches[0];this.lastPageX=e.pageX,this.lastPageY=e.pageY,(Math.abs(e.clientX-this.startX)>10||Math.abs(e.clientY-this.startY)>10)&&(this.moved=!0)},t.prototype._end=function(t){var e;!this.moved&&this.mouseDown&&(this.mouseDown=!1,void 0!==document.CustomEvent?e=new document.CustomEvent("tap",{bubbles:!0,cancelable:!0}):(e=document.createEvent("Event")).initEvent("tap",!0,!0),e.pageX=t.pageX||this.lastPageX,e.pageY=t.pageY||this.lastPageY,e.eventSource=t.srcElement,e.eventTarget=t.target,t.handled&&!this.shouldPropagate||this.element&&this.element.dispatchEvent(e),t.handled=!0)},t.prototype._cancel=function(){this.moved=!1},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(40),o=n(1),s=n(8),a=n(122),u=n(46),l=["yahoo.com","yahoo.co.jp","yahoo.net","yahoo.fr","yimg.com","rivals.com","tumblr.com","txmblr.com","flickr.com","maktoob.com","grindtv.com","thepostgame.com","nfl.com","nfljapan.com","movie.yahoo-leisure.hk","mmovie.yahoo-leisure.hk","test.player.vdms.io"],c=["aol.com","oath.com","verizondigitalmediaservices.com","ouroath.com"].concat(l);!function(t){t[t.NOT_LOADED=0]="NOT_LOADED",t[t.LOADING=1]="LOADING",t[t.LOAD_COMPLETE=2]="LOAD_COMPLETE"}(i=e.SCRIPT_LOAD_STATE||(e.SCRIPT_LOAD_STATE={}));var d=function(){function t(){}return t.isOffNetwork=function(e,n){e=e||t.getHostUrl();var i=t.parseDomain(e);if(!e||o.userAgent.samsung)return!1;var r=n?l:c,s=[];return["cdn.ampproject.org","amp.cloudflare.com"].forEach(function(t){r.forEach(function(e){var n=e.replace(/-/g,"--").replace(/\./g,"-");s.push(n+"."+t)})}),(s=s.concat(r)).push("localhost"),!i||!s.some(function(t){return-1!==i.indexOf(t,i.length-t.length)})},t.isYahooDomain=function(e){return!1===t.isOffNetwork(e,!0)},t.isOathDomain=function(e){return!1===t.isOffNetwork(e,!1)},t.getHostUrl=function(){var t=document.referrer;try{window.top.location.href&&(t=window.top.location.href)}catch(t){}return t},t.parseDomain=function(t){var e=/^https?:\/\/([A-Za-z0-9\.\-]*)(?:$|\/|:)/.exec(t);return e?e[1]:null},t.isValidUrl=function(t){return/^https:\/\/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\\|\\\^\[\]`]+)?$/.test(t)},t.getPageQueryString=function(){var e=t._getWindow().location.search;return e&&0===e.indexOf("?")&&(e=e.substr(1)),r.parse(e,void 0,void 0,{decodeURIComponent:window.decodeURIComponent})},t.sendIframeBeacon=function(e){e=t.fixProtocol(e);var n,i=Math.random(),r=document.querySelector("#vp-beacons"),o="vp-beacons-"+i;return r||(r=t.createBeaconsIframe(document,"vp-beacons"),document.body.appendChild(r)),(n=t.createBeaconsIframe(r.contentDocument,o)).src=e,"complete"===r.contentDocument.readyState?r.contentDocument.body.appendChild(n):r.contentDocument.body.onload=function(){r.contentDocument.body.appendChild(n)},!0},t.createBeaconsIframe=function(t,e){var n=t.createElement("iframe");return n.frameBorder=0,n.width=0,n.height=0,n.marginwidth=0,n.marginheight=0,n.hspace=0,n.vspace=0,n.frameborder=0,n.scrolling="no",n.id=e,n.style.display="none",n.title="",n},t.sendImageBeacon=function(e){e=t.fixProtocol(e);var n=new Image;n.onload=n.onabort=n.onerror=function(){n.onload=n.onabort=n.onerror=null,n=null},n.src=e},t.fixProtocol=function(t){return o.userAgent.samsung&&0===t.indexOf("//")?"https:"+t:t},t.lazyLoad=function(e,n){var r=t.getLazyLoadState(e);if(r.state!==i.LOADING){if(r.state===i.LOAD_COMPLETE)return n(!0);r.state=i.LOADING,r.subscribers.push(n);t.loadScript(e,function(t){r.state=i.LOAD_COMPLETE,r.subscribers.forEach(function(e){return e(t)})})}else r.subscribers.push(n)},t.getLazyLoadState=function(e){var n=t.getSingleton("lazyLoadState"),r={state:i.NOT_LOADED,subscribers:[]};if(n&&n[e])r=n[e];else if(n)n[e]=r;else{var o={};o[e]=r,t.setSingleton("lazyLoadState",o)}return r},t.loadScript=function(t,e){var n=document.createElement("script");n.async=!0,n.src=t,n.onload=function(){return e(!0)},n.onerror=function(){return e(!1)},document.body.appendChild(n)},t.setSingleton=function(t,e){window.OATH=window.OATH||{},window.OATH.VideoPlatform=window.OATH.VideoPlatform||{},window.OATH.VideoPlatform[t]=e},t.getSingleton=function(t){return window.OATH&&window.OATH.VideoPlatform&&window.OATH.VideoPlatform[t]?window.OATH.VideoPlatform[t]:null},t.isValidRequestAction=function(t){return-1!==[null,a.REQUEST_TYPES.CLICK,a.REQUEST_TYPES.AUTOPLAY,a.REQUEST_TYPES.HOVER,a.REQUEST_TYPES.PLAY,a.REQUEST_TYPES.PAUSE,a.REQUEST_TYPES.SCROLL,a.REQUEST_TYPES.SWIPE,a.REQUEST_TYPES.BACKGROUND].indexOf(t)},t.transformLegacyConfig=function(e){var n=Object.assign({mediaItems:[],ui:{}},e),i=!1;if(e.playlist&&e.playlist.mediaItems){e.playlist=Object.assign({},e.playlist);for(var r=0,o=e.playlist.mediaItems;r<o.length;r++){var l=o[r],c=null;l.id===a.GEMINI_STUB_VIDEO_ID&&e.YVAP&&e.YVAP.standaloneAd&&(c=t._transformGeminiAdItem(l,e)),c||(c={mimetype:l.id?s.MediaItemInterfaces.MediaItemMimeType.SAPI:s.MediaItemInterfaces.MediaItemMimeType.CONTAINER,id:l.id||""},(l.meta||l.streams)&&(c.customConfig={response:l}),l.streams&&(c.source=c.source||{},c.source.streams=l.streams),l.meta&&l.meta.playlist_config&&(i=!0));var d=l.images;d&&(d.thumbnail||d.large||d.medium||d.small)&&(c.metadata=c.metadata||{},c.metadata.thumbnail=d.thumbnail||d.large||d.medium||d.small),n.mediaItems.push(c)}void 0!==n.playlist.videoRecommendations&&(n.videoRecommendations=n.playlist.videoRecommendations),n.playlist.id?delete n.playlist.mediaItems:delete n.playlist}e.region&&(n.region=e.region.toUpperCase()),e.docking&&(n.ui.docking=Object.assign({},e.docking),n.ui.docking.position={},["Top","Right","Bottom","Left"].forEach(function(t){var i="position"+t,r=e.docking[i];n.ui.docking.position[t.toLowerCase()]="number"==typeof r?r:-1,delete n.ui.docking[i]}),delete n.docking);return[["ccOnMute","ccOnMute"],["chromeless","chromeless"],["showControls","showControls"],["stopAtLastFrame","stopAtLastFrame"],["showAgeGate","showAgeGate"],["replayonlyendscreen","showReplayOnlyEndScreen"],["fullscreenBtn","showFullscreenButton"]].forEach(function(t){void 0!==e[t[0]]&&(n.ui[t[1]]=!!e[t[0]]),delete n[t[0]]}),void 0!==e.startscreen&&"object"!=typeof e.startscreen?(n.ui.startScreen={show:!!e.startscreen},delete n.startscreen):"object"==typeof e.startscreen&&e.startscreen&&(n.ui.startScreen=n.ui.startScreen||{},["showButton","show","showDesc","showControls","showProvider","showTitle"].forEach(function(t){void 0!==e.startscreen[t]&&(n.ui.startScreen[t]=!!e.startscreen[t])}),n.ui.startScreen.showDescription=!!e.startscreen.showDesc,delete n.ui.startScreen.showDesc,delete n.startscreen),void 0!==e.endscreen&&"object"!=typeof e.endscreen?(n.ui.endScreen={show:!!e.endscreen},delete n.endscreen):"object"==typeof e.endscreen&&e.endscreen&&(n.ui.endScreen=e.endscreen,delete n.endscreen),["Start","Hover"].forEach(function(t){var i="showTitleOn"+t;void 0!==e[i]&&(n.ui.title=n.ui.title||{},n.ui.title["showOn"+t]=e[i],delete n[i])}),["watchHistoryEnabled","watchedPeriod","watchHistoryExpiry"].forEach(function(t){void 0!==e[t]&&(n.ui.watchHistory=n.ui.watchHistory||{},n.ui.watchHistory[t]=e[t],delete n[t])}),e.YVAP&&("number"==typeof e.YVAP.timeout&&(n.ads=n.ads||{timeout:{}},n.ads.timeout.load=e.YVAP.timeout),"number"==typeof e.YVAP.vpaidTimeout&&(n.ads=n.ads||{timeout:{}},n.ads.timeout.start=e.YVAP.vpaidTimeout)),e.playlistUI&&(n.ui.playlist=e.playlistUI,delete n.playlistUI),i&&n.ui.playlist&&(n.ui.playlist.mimetype="playlist/structured"),["height","width"].forEach(function(t){e[t]&&u.isString(e[t])&&(n[t]=parseInt(e[t],10),u.isNumber(n[t])||delete n[t])}),n},t.isLegacyConfig=function(t){return!!(t&&t.playlist&&t.playlist.mediaItems)},t.formatTime=function(t){var e=Math.floor(t/3600),n=Math.floor((t-3600*e)/60),i=Math.floor(t-3600*e-60*n),r=i<10?"0"+i:i.toString(),o="";if(e>0){var s=n<10?"0"+n:n.toString();o=e.toString()+":"+s+":"+r}else u.isNumber(n)&&(o=n.toString()+":"+r);return o},t.getPlayerType=function(){var e=t.getSingleton("PlayerHosting"),n="desktop";if(e&&e.type){var i=e.type.match(/^oath\-player\-([a-z\-]*)\.js/);i&&i[1]&&(n=i[1])}return"nextgen-"+(n="mobile-ios"===n?"ios":n)},t.getBckt=function(){return"Treatment_Oath_Player"},t.initIframeCmp=function(){if(!window.__cmp){for(var t,e=window;!t;){try{e.frames.__cmpLocator&&(t=e)}catch(t){}if(e===window.top)break;e=e.parent}var n={};window.__cmp=function(e,i,r){if(t){var o=Math.random()+"",s={__cmpCall:{command:e,parameter:i,callId:o}};n[o]=r,t.postMessage(s,"*")}else r({msg:"CMP not found"},!1)},window.addEventListener("message",function(t){var e="string"==typeof t.data,i=t.data;if(e)try{i=JSON.parse(t.data)}catch(t){}if(i.__cmpReturn){var r=i.__cmpReturn;n[r.callId](r.returnValue,r.success),delete n[r.callId]}},!1)}},t.getCookie=function(t){t+="=";var e=null;return document.cookie.split(/;\s*/).forEach(function(n){n.indexOf(t)>-1&&(e=n.replace(t,""))}),e},t._transformGeminiAdItem=function(t,e){return t&&e&&e.YVAP&&e.YVAP.standaloneAd&&e.YVAP.standaloneAd.gemini?{mimetype:s.MediaItemInterfaces.MediaItemMimeType.CONTAINER,metadata:{type:s.MediaItemInterfaces.MediaItemType.CONTAINER},id:"gemini-ad-"+Math.ceil(1e11*Math.random()),adConfig:{mimetype:"adplugin/vrm",value:{YVAP:e.YVAP}}}:null},t._getWindow=function(){return window},t}();e.default=d},function(t,e,n){"use strict";var i="api",r="network",o="decode";function s(t,e){this.code=t[0],this.message=t[1],this.type=t[2],this.isDrm=t[3],e&&(this.message+=": "+e),this.error=new Error(this.message,this.code)}t.exports={Error:s,ERR_XHR_LOAD:[11,"Failed to load xhr request",r,!1],ERR_PLAYLIST_LOAD:[12,"Failed to load Playlist",r,!1],ERR_SUBS_LOAD:[13,"Failed to load Subtitle",r,!1],ERR_SEGMENT_LOAD:[14,"Failed to load Segment",r,!1],ERR_PARTIAL_LOAD:[15,"Loader failed to load complete data",r,!1],ERR_MASTER_PLAYLIST_PARSE:[16,"Failed to parse Master Playlist",o,!1],ERR_MEDIA_PLAYLIST_PARSE:[17,"Failed to parse Media Playlist",o,!1],ERR_SEGMENT_PARSE:[18,"Failed to parse segment data",o,!1],ERR_API_NO_NODE:[19,"No video node is being set",i,!1],ERR_MIMETYPE_NOT_SUPPORTED:[20,"Mimetype is not supported in current browser",o,!1],ERR_XHR_LOAD_LIVE_PAUSE:[21,"Failed to load xhr request during live pause",r,!1],ERR_DRM_EME_MISSING:[22,"Browser EME components not detected or HTTPS required",o,!0],ERR_DRM_INIT:[23,"Failed to initialize DRM components",o,!0],ERR_DRM_CONFIG:[24,"Browser/system does not support the requested DRM configurations",o,!0],ERR_DRM_LICENSE_REQUEST:[25,"Failed to get DRM license",o,!0],ERR_XHR_LOAD_FORBIDDEN:[27,"Forbidden to load xhr request",r,!1]},s.prototype.dto=function(){return{code:this.code,message:this.message,type:this.type,isDrm:this.isDrm}}},function(t,e,n){"use strict";t.exports=r;var i=n(16);function r(t,e){if(!t||isNaN(t))throw new Error("Invalid Argument: No delay");i.call(this,this.constructor.name),this.delay=Math.max(t,20),this.repeatCount=e>0?e:Number.POSITIVE_INFINITY,this.currentCount=0,this.running=!1,this.startTime=0,this._timerHandle=null,this._subscriptions={},this._eventKeys={}}n(3).inherits(r,i),r.prototype.destroy=function(){this.reset(),this._subscriptions={},i.prototype.removeEventListeners.call(this,this._eventKeys),i.prototype.destroy.call(this)},r.prototype.addEventListener=function(t,e){if(!e)throw new Error("Invalid Argument: No context");var n=i.prototype.addEventListener.call(this,"timedOut",t,e);this._eventKeys.timedOut=n},r.prototype.removeEventListener=function(t,e){if(!e)throw new Error("Invalid Argument: No context");i.removeEventListeners(this._eventKeys)},r.prototype.start=function(){var t=this;t._timerHandle||t.running||(t._timerHandle=setInterval(function(){t.currentCount++,t.currentCount>=t.repeatCount&&t.stop(),t.publish("timedOut"),t.startTime=Date.now()},t.delay),t.startTime=Date.now(),t.running=!0)},r.prototype.stop=function(){this._timerHandle&&this.running&&(clearInterval(this._timerHandle),this._timerHandle=null,this.running=!1,this.startTime=0)},r.prototype.reset=function(){this.stop(),this.currentCount=0,this.startTime=0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.PREROLL="preroll",t.POSTROLL="postroll",t.MIDROLL="midroll",t.TRIGGER="trigger",t.NON_LINEAR="nonlinear",t.NATIVE="native"}(e.AdBreakType||(e.AdBreakType={})),function(t){t.DUMMY="ad/dummy"}(e.AdBreakMimeType||(e.AdBreakMimeType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(44),s=n(19),a=function(){function t(){}return t.isFlashInstalled=function(){if(void 0!==t.isFlashInstalledMem)return t.isFlashInstalledMem;var e=null;if(i.userAgent.ie)try{e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/[A-Za-z\s]+/g,"").split(",")}catch(t){}else{var n=navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"];if(n){var r=n.enabledPlugin;r&&(e=r.description.replace(/\s[rd]/g,".").replace(/[A-Za-z\s]+/g,"").split("."))}}return t.isFlashInstalledMem=!!e&&"0"!==e[0],t.isFlashInstalledMem},t.isFlashAvailable=function(){return!i.userAgent.mobile&&!i.userAgent.tv&&t.isFlashInstalled()},t.isHtml5MseAvailable=function(){return!!r.isFunction(o.default)&&(!!t.isMSEAvailable()&&(t.isMSECompatible('video/mp4; codecs="avc1.640010"')&&t.isMSECompatible('audio/mp4; codecs="mp4a.40.2"')))},t.useHtml5MseDefault=function(){return i.userAgent.tv?!(i.userAgent.tizen||i.userAgent.orsay||i.userAgent.firetv||i.userAgent.presto)&&!!t.isHtml5MseAvailable():i.userAgent.mobile?!!(i.userAgent.android&&i.userAgent.chrome&&s.default.hasNativeAutoplaySupport):!(i.userAgent.winXP||i.userAgent.winVista||i.userAgent.win8)&&(i.userAgent.chrome>=47||i.userAgent.firefox>=44||i.userAgent.ie>=11||i.userAgent.edge>=12)},t.is360Supported=function(){return!!i.userAgent.desktop&&!!(i.userAgent.chrome||i.userAgent.firefox||i.userAgent.opera)},t.isMSEAvailable=function(){return"undefined"!=typeof MediaSource},t.isMSECompatible=function(t){var e=MediaSource;if(e&&!e.isTypeSupported){var n=document.createElement("video");return!(!n||!n.canPlayType(t))}return!(!e||!e.isTypeSupported(t))},t.isAndroidVersionAbove4=function(){return!!i.userAgent.androidVersion&&parseInt(i.userAgent.androidVersion,10)>=4},t.canPlayType=function(t,e){var n;try{e||(e=document.createElement("video")),n=!!e.canPlayType&&"probably"===e.canPlayType(t)}catch(t){n=!1}return n},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.MENU="Menu",t.ELAPSED_TIME="elapsed time",t.REMAINING_TIME="remaining time",t.NUM_SECONDS="{num-seconds} seconds",t.NUM_SECOND="{num-seconds} second",t.EMBED="Embed",t.NOW_PLAYING="Now Playing",t.WATCHED="watched",t.LIVE="Live",t.PLAY_VIDEO="Play Video",t.BACK="Back",t.CONTENT_RESTRICTED="Content Restricted",t.AGE_GATE_DESC="This content is intended for mature audiences. Viewer discretion advised.",t.SIGN_IN_TO_VIEW_ACTION="Sign-in to view",t.CONTINUE_ACTION="Continue",t.AGE_GATE_BDAY_DESC="This content is intended for mature audiences. Please enter your date of birth below to continue.",t.SUBMIT_ACTION="Submit",t.AGE_GATE_NOT_ALLOWED_DESC="Sorry. This content is intended for mature audiences.",t.MATURE="Mature",t.SETTINGS="Settings",t.VIDEO_QUALITY="Video Quality",t.QUALITY="QUALITY",t.AUTO="Auto",t.LOW="Low",t.MEDIUM="Medium",t.HIGH="High (HD)",t.LOGIN_MESSAGE="Please sign in to use this feature.",t.EMBED_NOT_ALLOWED="This video cannot be embedded due to provider license restrictions.",t.TOP="Top",t.BOTTOM="Bottom",t.ON="On",t.OFF="Off",t.CC_PREVIEW="Bottom",t.CC_PREVIEW_MESSAGE="Captions will look like this",t.BACKGROUND="background",t.EFFECTS="effects",t.RAISED="raised",t.NO_ITEM_AVAILABLE="No item available",t.CC="Closed Captions",t.LANGUAGE="Language",t.POSITION="Position",t.ERR_ANDROID_LIVE_CHROME_REQUIRED='This video requires Android 4.0 or above and the latest version of the Google Chrome browser.<br>You can get the latest version of Chrome from the <a href="https://play.google.com/store/apps/details?id=com.android.chrome">Google Play store</a>.',t.ERR_LIVE_PLAYBACK_COMPLETE="This live event has ended.",t.ERR_NETWORK_ISSUE="Videos cannot play due to a network issue. Please check your Internet connection and try again.",t.ERR_DEVICE="Due to license restrictions; this video cannot be viewed on this device.",t.ERR_EMBED="Due to license restrictions; this video can only be viewed on Yahoo.",t.ERR_FLASH_IS_BLOCKED="This video requires Flash. Verify Flash is not disabled or blocked, then <a href='javascript:window.location.reload();'>reload</a> the page.",t.ERR_COOKIE_DISABLED="This video cannot be played due to a browser settings issue. Enable third party cookies in your browser, then <a href='javascript:window.location.reload();'>reload</a> the page.",t.ERR_FLASH_LATEST_DOWNLOAD="The latest version of Adobe Flash is required to play this video. <a class='vp-error-flash-download-wrapper' href='http://get.adobe.com/flashplayer/'>Download the free Flash player here.</a>",t.ERR_GEO="Unfortunately, this video is not available in your region.",t.ERR_BLACKOUT="Due to local blackout restrictions, this live event cannot be viewed in your area.",t.ERR_TECH_DIFFICULTIES="If this error is occurring repeatedly, we may be experiencing technical difficulties. We apologize for the inconvenience. <a class='vp-browser-refresh' href='javascript:window.location.reload();'>Refresh Browser</a>",t.ERR_UNAUTHORIZED="You must be a paid subscriber to view this video.",t.ERR_UNAVAILABLE="Unfortunately, this video is no longer available.",t.ERR_MISSING_OR_DAMAGED="Unfortunately, this video is missing or damaged and cannot be played.",t.ERR_BROWSER_UNSUPPORTED="This browser is unsupported. To view this video, try another browser.",t.ERR_BROWSER_UNSUPPORTED_SKIP_IN_10="This browser is unsupported. To view this video, try another browser. In few seconds, we will go to the next video.",t.ERR_GENERAL_ERROR="Unfortunately, an error occurred. To try again, <a href='javascript:window.location.reload();'>refresh the browser</a>.",t.ERR_LIVE_IOS_PLAYBACK="Unfortunately, an error occurred. To try again, either <a href='javascript:window.location.reload();'>refresh</a> the browser or download the <a class='vp-browser-refresh' href='https://mobile.yahoo.com/sports'>Yahoo Sports app</a>",t.ERR_DRM_ANDROID_UNSUPPORTED_BROWSER='This video requires DRM, which is not supported by this web browser. To view this video, use the <a href="https://play.google.com/store/apps/details?id=com.android.chrome">Google Chrome web browser</a> instead.',t.ERR_DRM_IOS_UNSUPPORTED_BROWSER="This video requires DRM, which is not supported by this web browser. To view this video, use the Apple Safari web browser instead.",t.ERR_DRM_IOS_UNSUPPORTED_OS_VER="This video requires DRM, which is not supported by the older version of iOS on your device. To view this video, update your device to the latest version of iOS.",t.ERR_DRM_UNSUPPORTED_NETWORK_WIFI="Due to license restrictions, this video cannot be played over WiFi on your device. To view this video, turn off WiFi and use your cellular data connection instead.",t.ERR_TITLE_CANNOT_PLAY_VIDEO="Cannot Play Video",t.ERR_TITLE_CANNOT_PLAY_360_VIDEO="Cannot Play 360 Video",t.ERR_TITLE_SOMETHING_WENT_WRONG="Something Went Wrong",t.ERR_TITLE_VIDEO_NOT_AVAILABLE="Video Not Available",t.CHROMECAST="Chromecast",t.DISCONNECT="Disconnect",t.CAST_PLAYING_RECEIVER="Playing on {device-name}",t.AIRPLAY="Airplay",t.PAUSE_VIDEO="Pause Video",t.GO_TO_FULLSCREEN="Go to full screen",t.GO_TO_NORMAL_SCREEN="Go to normal screen",t.UNMUTE="Unmute",t.MUTE="Mute",t.SEEK_SLIDER="Seek slider",t.UP_NEXT="Up next",t.FULLSCREEN_SPACE="Full Screen",t.PRESETS="Presets",t.CC_SETTINGS="Closed Caption Settings",t.CC_TYPE_SIZE="Type Size",t.SUBMIT_FEEDBACK="Submit Feedback",t.ADV_SHORT="Ad: {remaining}s",t.ADV_LONG="Ad: video resumes in {remaining}s",t.ADV_MULT_SHORT="Ad {position}/{total}: {remaining}s",t.ADV_MULT_LONG="Ad {position}/{total}: video resumes in {remaining}s",t.TEXT="Text",t.STYLE_OPTIONS="Style Options",t.PLAIN="Plain",t.SHADOW="Shadow",t.LOWERED="Lowered",t.OUTLINE="Outline",t.CAPTIONS_ON="Captions On",t.CAPTIONS_OFF="Captions Off",t.CAPTIONS_AVAILABLE="Captions Available",t.MULTI_AUDIO="Select Audio Language",t.CAPTIONS_NOT_AVAILABLE="Captions Not Available",t.EXIT_FULLSCREEN="Exit Full Screen",t.MORE_MARKERS="+{count_markers} more",t}();e.default=i},function(t,e,n){"use strict";t.exports.Streamer=y;var i=n(3),r=n(16),o=n(10).CmdNames,s=n(24),a=n(12).HLSEvent,u=n(92),l=u.StreamLoader,c=u.Events,d=n(21),h=n(50),p=n(20).StreamTypes,f=n(192),_=t.exports.Events={SEG_LOAD_START:"streamerSegLoadStart",SEG_LOAD_PROGRESS:"streamerSegLoadProgress",SEG_LOAD_COMPLETE:"streamerSegLoadComplete",SEG_LOAD_ERROR:"streamerSegLoadError",PRELOAD_COMPLETE:"streamerPreloadComplete",STREAM_LOAD_COMPLETE:"StreamLoadComplete",STREAM_LOAD_ERROR:"StreamLoadError",LIVE_SYNCH:"streamerLiveSynch"},m=t.exports.SynchTypes={INIT:"synchAtInit",TIME_GAP:"synchAtTimeGap"};function y(t){var e=this.__controller;r.call(this,this.constructor.name),this._model=e.model,this._services=e.services,this._commandManager=e.create(h),this._streamLoader=e.create(l,this._commandManager),this._streamLoader.addEventListener(c.STREAM_LOADED,this.onStreamLoaded,this),this._streamLoader.addEventListener(c.STREAM_LOAD_ERROR,this.onStreamLoadError,this),this.AVG_BW_MEASUREMENT_INTERVAL=30,this._playedSinceLastBWMeasurement=0,this._lastPlayedTime=0,this._commandName=o.CMD_SEGMENT_LOAD,this._currentStream=t,this.type=t?t.type:null,this.type&&this.type!==p.VIDEO&&this.type!==p.MAIN||(this._cea608TrackData=[],this._cea608Parser=new f(this.sendVttEventCB.bind(this))),this.STATES={ERROR:-1,NONE:0,INITIALIZING:1,INITIALIZED:2,LOADING:3},this._state=this.STATES.NONE,this._loadingStream=!1,this._preloading=!1,this._seqNum=NaN,this._endOfStream=!1,this._targetPosition=null,this._paused=!1,this._maxBuffer=this._model.config.maxBuffer,this._live=this._model.live,this._isAltAudioActive=!1,this._manualStreamChange=!1,this._endTimestamps={audio:NaN,video:NaN},this._switching=!1,this._retryExclusion=[403]}i.inherits(y,r),y.prototype.destroy=function(){this._streamLoader.destroy(),this._state=this.STATES.NONE,this._currentStream=null,this._commandManager&&(this._commandManager.destroy(),this._commandManager=null),r.prototype.destroy.call(this)},y.prototype.setCurrentStream=function(t){t&&!t.equals(this._currentStream)&&(this._currentStream=t,console.log("["+this.constructor.name+"][setCurrentStream] "+(t.type===p.MAIN?"index = "+t.index:"groupId = "+t.groupId)),this.onSwitchBegin())},y.prototype.isActive=function(){return this._currentStream&&this._currentStream.url&&this._currentStream.url.length>0},y.prototype.setAltAudioActive=function(t){this._isAltAudioActive=t},y.prototype.getCurrentStream=function(){return this._currentStream},y.prototype.process=function(t){if("number"==typeof t&&(this._targetPosition=t),this.isStreamReady()||this._state===this.STATES.ERROR){if(this._shouldLoadSegment()){var e=this._getNextSeqNum(this._targetPosition),n=this._isSegmentAvailable(e);"empty"!==n?"ahead"!==n&&("behind"!==n?this._shouldLoadSegment()&&(this._targetPosition=null,this._loadSegment(e)):this._synch(m.TIME_GAP)):this._updateStream()}}else this._initializeStream()},y.prototype.onPlay=function(t){this._paused=!1,this._maxBuffer=this._model.config.maxBuffer,t&&this.onSynchBegin()},y.prototype.onPlaying=function(){this._manualStreamChange=!1},y.prototype.onPause=function(){this._paused=!0},y.prototype.onSeeking=function(t){this._closeLoadingSegments(),this._setEndOfStream(!1),this.process(t)},y.prototype.onSeeked=function(){},y.prototype.onError=function(){this._commandManager&&this._commandManager.removeAllCommands()},y.prototype.onComplete=function(){},y.prototype.onTimeUpdate=function(t){if(this._lastPlayedTime){var e=t-this._lastPlayedTime;e>0&&(this._playedSinceLastBWMeasurement+=e)}this._playedSinceLastBWMeasurement>this.AVG_BW_MEASUREMENT_INTERVAL&&(this._setAvgBWToLocalStorage(this._services.bandwidthEstimator.averageBandwidth),this._playedSinceLastBWMeasurement=0),this._lastPlayedTime=t},y.prototype.onPreloadBegin=function(){this._preloading=!0,this._maxBuffer=this._model.config.preloadBufferLimit},y.prototype.onPreloadEnd=function(){this._preloading=!1},y.prototype._synch=function(){},y.prototype.isStreamReady=function(){var t=this._currentStream;return t&&t.isReady()&&this._state>=this.STATES.INITIALIZED},y.prototype._initializeStream=function(){this.isActive()&&(this._state=this.STATES.INITIALIZING,this._updateStream())},y.prototype._shouldLoadSegment=function(){var t=this._isBufferFull(),e=this._model.config.stopBufferingOnPause;return this._preloading&&t&&this.publish(_.PRELOAD_COMPLETE,this),!this._endOfStream&&this._state!==this.STATES.LOADING&&((!this._paused||!e)&&(!t&&!this._isTotalBufferFull()))},y.prototype._isSegmentAvailable=function(t){var e=this._currentStream;if(!e||e.isEmpty()||isNaN(t))return"empty";if(!e.contains(t)){if(t<e.startSeqNum)return"behind";if(t>e.endSeqNum)return"ahead"}return"available"},y.prototype._isBufferFull=function(){if(this.type&&this._model.bufferedAndPending){var t={buffered:0,pending:0},e=this._model.bufferedAndPending.video||t;return this.type!==p.MAIN&&this.type!==p.VIDEO&&(e=this._model.bufferedAndPending.audio||t),e.buffered+e.pending>=this._maxBuffer}return this._model.bufferLength+this._model.pendingBufferLength>=this._maxBuffer},y.prototype._isTotalBufferFull=function(){var t=this._model;return t.getTotalBufferLength()>=t.config.maxTotalBuffer},y.prototype.onSwitchBegin=function(){this._switching=!0,this._updateStream()},y.prototype.onSwitchEnd=function(){this._switching=!1},y.prototype._updateStream=function(){this._loadingStream||this._loadCurrentStream()},y.prototype._loadCurrentStream=function(){this.isActive()&&(this._loadingStream=!0,this._streamLoader.load(this._currentStream,this._getStreamLoadOptions()))},y.prototype._getStreamLoadOptions=function(){return{url:this._currentStream.url,retryExclusion:this._retryExclusion,withResponseHeaders:this._model.isDash()}},y.prototype.onStreamLoaded=function(t){this._state===this.STATES.INITIALIZING&&(this._state=this.STATES.INITIALIZED),this._loadingStream=!1,this.publish(_.STREAM_LOAD_COMPLETE,this,{stream:t.dto()})},y.prototype.onStreamLoadError=function(t,e){e.code===s.ERR_XHR_LOAD_LIVE_PAUSE[0]&&this.stopStreamUpdate(),this.publish(_.STREAM_LOAD_ERROR,this,{err:e,stream:t}),this._state=this.STATES.ERROR,this._loadingStream=!1,this.process()},y.prototype._getNextSeqNum=function(t){var e=this._currentStream,n=NaN;return n="number"==typeof t?e.getSeqNumBeforePosition(t+this._model.TIMESTAMP_COMPARE_EPSILON):isNaN(this._seqNum)?this._getFirstSegmentSeqNum():this._state===this.STATES.ERROR||this._segAborted?this._seqNum:this._seqNum+1,n=this._getFirstNonBufferedSeqNum(n),this._live||(n=Math.max(n,e.startSeqNum),n=Math.min(n,e.endSeqNum)),n},y.prototype._getFirstNonBufferedSeqNum=function(t){var e=this._currentStream,n=this._model.bufferedRanges,i=n.length,r=this._getBufferedRangeIndex(t),o=this._model.userAgent;if(o&&o.safariDesktop)return t;if(this._model.isDash())return t;if(r>=0&&i&&r<i){var s=n.ranges[r].end;return!this._live&&s>=this._model.duration?(this._setEndOfStream(!0),e.endSeqNum):e.getSeqNumBeforePosition(s)}return t},y.prototype._getFirstSegmentSeqNum=function(){return this._currentStream.getSeqNumBeforePosition(0)},y.prototype._getBufferedRangeIndex=function(t){var e=this._currentStream.getSegmentfromSeqNum(t);if(!e)return-1;for(var n=this._model.TIMESTAMP_COMPARE_EPSILON,i=this._model.bufferedRanges,r=0;r<i.length;r++){var o=i.ranges[r],s=o.start-n,a=o.end+n;if(s=0===e.startTime&&s<.1?0:s,e.startTime>=s&&e.startTime+e.duration<=a)return r}return-1},y.prototype._beforeLoadSegment=function(){},y.prototype._loadSegment=function(t){if(this._beforeLoadSegment(t),!(this._state<this.STATES.INITIALIZED)){this._closeLoadingSegments(),this._state=this.STATES.LOADING,this._seqNum=t,this._segAborted=!1;var e=this._executeSegmentLoadCommand(this._seqNum);e&&(this._printLoadMessage(e,this._currentStream),this.publish(_.SEG_LOAD_START,this),this._afterLoadSegment(t))}},y.prototype._afterLoadSegment=function(){},y.prototype._executeSegmentLoadCommand=function(t){var e=this._getSegmentLoadCmdData(t),n=e?e.segment:null;return n?(this._currSegLoadCmd=this._commandManager.executeCommand(this._commandName,e,this),n):null},y.prototype._getSegmentLoadCmdData=function(t){var e=this._currentStream;return e?{segment:e.getSegmentfromSeqNum(t),stream:e}:null},y.prototype.onSegmentLoadProgress=function(t,e){var n,i,r,o,s,a=this;if(e)if(e.id!==d.MessageIds.TIMED_METADATA){e.getParam?(n=e.getParam("tracks"),i=e.getParam("perfInfo"),r=e.getParam("bytesTotal")||0,o=e.getParam("parsedInfo"),s=e.getParam("cea608TrackData")):e.cea608TrackData&&(s=e.cea608TrackData);var u=o?o.position:e.position,l=o&&o.inWorkerScope||!1;switch(a.publish(_.SEG_LOAD_PROGRESS,a,{seqNum:a._seqNum,position:u,bytesTotal:r,inWorkerScope:l,perfInfo:i}),a._model.preloading=a._preloading,u){case"firstByte":return;case"start":break;case"end":a._state===a.STATES.LOADING&&(a._state=a.STATES.INITIALIZED)}if(n&&(n.forEach(function(t){t.minBufferTime=a.__controller.getMinimumBufferTime(),a._endTimestamps[t.type]=t.endTimestamp}),a._sendToBuffer(n,e.getParam("transferables"))),s&&s.length>0)for(var c=0;c<s.length;c++)a._cea608TrackData.push(s[c]);"end"===u&&(a._model.setSegEndTimeStamps(a.type,a._currentStream.groupId,a._seqNum,a._endTimestamps),a._endTimestamps.audio=NaN,a._endTimestamps.video=NaN)}else{var h=e.getParam("timedMetadata");a._model.updateTimedMetadata(h,a._seqNum)}},y.prototype.onSegmentLoadComplete=function(t,e){if(this._state===this.STATES.LOADING&&(this._state=this.STATES.INITIALIZED),this._cea608TrackData&&this._cea608TrackData.length>0){for(var n=[],i=0;i<this._cea608TrackData.length;i++){for(var r=this._cea608TrackData[i],o=0;o<n.length&&r.pts>=n[o].pts;)o++;n.splice(o,0,r)}var s=this._currentStream.getSegmentfromSeqNum(this._seqNum);this._cea608Parser.parse(n,s),this._cea608TrackData=[]}this._commandManager.removeCommand(t),e&&e.getParam("segTimeStamp")&&this._model.setPrevSegTimeStamps(e.getParam("segTimeStamp")),this._handleSegmentEnd(),this.publish(_.SEG_LOAD_COMPLETE,this,{stream:this._currentStream}),this._currSegLoadCmd=null},y.prototype.onSegmentLoadError=function(t,e){this.abortCurrentSegment(t),this._currSegLoadCmd=null;var n=e&&e.code===s.ERR_XHR_LOAD[0]?new s.Error(s.ERR_SEGMENT_LOAD):e;this.publish(_.SEG_LOAD_ERROR,this,{seqNum:this._seqNum,err:n,stream:this._currentStream})},y.prototype.abortCurrentSegment=function(t){return this._state!==this.STATES.LOADING?null:(t&&this._commandManager.removeCommand(t),this._state===this.STATES.LOADING&&(this._state=this.STATES.INITIALIZED),this._segAborted=!0,this._endTimestamps.audio=NaN,this._endTimestamps.video=NaN,this._seqNum)},y.prototype._closeLoadingSegments=function(){this._state===this.STATES.LOADING&&(this._state=this.STATES.INITIALIZED),this._endTimestamps.audio=NaN,this._endTimestamps.video=NaN,this._commandManager.removeRelatedCommands(this._commandName)},y.prototype._sendToBuffer=function(t,e){t&&this.__controller.sendMessage(d.MessageIds.APPEND_SRC_BUFFER,[t],["tracks"],e)},y.prototype._setEndOfStream=function(t){this._endOfStream=t,this._endTimestamps.audio=NaN,this._endTimestamps.video=NaN,this.type===p.MAIN&&this.__controller.sendMessage(d.MessageIds.END_OF_STREAM,[t],["endOfStream"])},y.prototype._handleSegmentEnd=function(){var t=this._currentStream;t&&t.endSeqNum===this._seqNum&&this._setEndOfStream(!0)},y.prototype._setAvgBWToLocalStorage=function(t){var e={avgBWtimestamp:Date.now(),avgBW:t};this.type===p.MAIN&&this.__controller.sendMessage(d.MessageIds.SAVE_AVG_BANDWIDTH,[e],["avgBwInfo"])},y.prototype.onManualStreamChange=function(){this._setEndOfStream(!1),this._manualStreamChange=!0,this._closeLoadingSegments(),this._streamLoader.cancel(),this._loadingStream=!1,this._state=this._state!==this.STATES.ERROR?this.STATES.INITIALIZING:this._state,this._updateStream()},y.prototype.onSynchBegin=function(){},y.prototype.onSynchComplete=function(){},y.prototype.onSynchMetadataReady=function(t){this._closeLoadingSegments(),this._setEndOfStream(!1),this.process(t)},y.prototype.canSwitch=function(t){return"mid-segment"!==t||this._state===this.STATES.LOADING},y.prototype.isInError=function(){return this._state===this.STATES.ERROR},y.prototype.getSegLoadCommand=function(){return this._commandManager.getCommand(this._commandName)},y.prototype._printLoadMessage=function(){},y.prototype.sendVttEventCB=function(t){this.__controller.sendEvent(a.VTT_SEGMENT_LOADED,t)}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var i=n(55),r=e.ValidationError=function(t,e,n,i,r,o){i&&(this.property=i),t&&(this.message=t),n&&(n.id?this.schema=n.id:this.schema=n),e&&(this.instance=e),this.name=r,this.argument=o,this.stack=this.toString()};r.prototype.toString=function(){return this.property+" "+this.message};var o=e.ValidatorResult=function(t,e,n,i){this.instance=t,this.schema=e,this.propertyPath=i.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.disableFormat=n&&!0===n.disableFormat};function s(t,e){return e+": "+t.toString()+"\n"}o.prototype.addError=function(t){var e;if("string"==typeof t)e=new r(t,this.instance,this.schema,this.propertyPath);else{if(!t)throw new Error("Missing error detail");if(!t.message)throw new Error("Missing error message");if(!t.name)throw new Error("Missing validator type");e=new r(t.message,this.instance,this.schema,this.propertyPath,t.name,t.argument)}if(this.throwError)throw e;return this.errors.push(e),e},o.prototype.importErrors=function(t){"string"==typeof t||t&&t.validatorType?this.addError(t):t&&t.errors&&Array.prototype.push.apply(this.errors,t.errors)},o.prototype.toString=function(t){return this.errors.map(s).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}});var a=e.SchemaError=function t(e,n){this.message=e,this.schema=n,Error.call(this,e),Error.captureStackTrace(this,t)};a.prototype=Object.create(Error.prototype,{constructor:{value:a,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=e.SchemaContext=function(t,e,n,i,r){this.schema=t,this.options=e,this.propertyPath=n,this.base=i,this.schemas=r};u.prototype.resolve=function(t){return i.resolve(this.base,t)},u.prototype.makeChild=function(t,e){var n=void 0===e?this.propertyPath:this.propertyPath+c(e),r=i.resolve(this.base,t.id||""),o=new u(t,this.options,n,r,Object.create(this.schemas));return t.id&&!o.schemas[r]&&(o.schemas[r]=t),o};var l=e.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(t){return"string"==typeof t&&parseFloat(t)===parseInt(t,10)&&!isNaN(t)},regex:function(t){var e=!0;try{new RegExp(t)}catch(t){e=!1}return e},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],e.isFormat=function(t,e,n){if("string"==typeof t&&void 0!==l[e]){if(l[e]instanceof RegExp)return l[e].test(t);if("function"==typeof l[e])return l[e](t)}else if(n&&n.customFormats&&"function"==typeof n.customFormats[e])return n.customFormats[e](t);return!0};var c=e.makeSuffix=function(t){return(t=t.toString()).match(/[.\s\[\]]/)||t.match(/^[\d]/)?t.match(/^\d+$/)?"["+t+"]":"["+JSON.stringify(t)+"]":"."+t};function d(t,e){var n=Array.isArray(e),i=n&&[]||{};return n?(t=t||[],i=i.concat(t),e.forEach(function(t,e,n,i){"object"==typeof n?e[i]=d(t[i],n):-1===t.indexOf(n)&&e.push(n)}.bind(null,t,i))):(t&&"object"==typeof t&&Object.keys(t).forEach(function(t,e,n){e[n]=t[n]}.bind(null,t,i)),Object.keys(e).forEach(function(t,e,n,i){"object"==typeof e[i]&&e[i]&&t[i]?n[i]=d(t[i],e[i]):n[i]=e[i]}.bind(null,t,e,i))),i}function h(t){return"/"+encodeURIComponent(t).replace(/~/g,"%7E")}e.deepCompareStrict=function t(e,n){if(typeof e!=typeof n)return!1;if(e instanceof Array)return n instanceof Array&&(e.length===n.length&&e.every(function(i,r){return t(e[r],n[r])}));if("object"==typeof e){if(!e||!n)return e===n;var i=Object.keys(e),r=Object.keys(n);return i.length===r.length&&i.every(function(i){return t(e[i],n[i])})}return e===n},t.exports.deepMerge=d,e.objectGetPath=function(t,e){for(var n,i=e.split("/").slice(1);"string"==typeof(n=i.shift());){var r=decodeURIComponent(n.replace(/~0/,"~").replace(/~1/g,"/"));if(!(r in t))return;t=t[r]}return t},e.encodePath=function(t){return t.map(h).join("")},e.getDecimalPlaces=function(t){var e=0;if(isNaN(t))return e;"number"!=typeof t&&(t=Number(t));var n=t.toString().split("e");if(2===n.length){if("-"!==n[1][0])return e;e=Number(n[1].slice(1))}var i=n[0].split(".");return 2===i.length&&(e+=i[1].length),e}},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(145),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(30))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(0),s=n(84);e.XHR_ERROR="XHR error",e.XHR_TIMEOUT="XHR request timed out",e.JSONP_ERROR="jsonp error",e.JSONP_TIMED_OUT="jsonp request timed out";var a=function(){function t(){}return t.ajax=function(t,n){t=o.default.fixProtocol(t);var a=o.default.getWindow(),u=n.context,l=n.responseTypeJson,c=n.withCookie,d=n.timeout,h=o.default.once(n.successHandler),p=o.default.once(n.failureHandler),f=!1,_=null,m={url:t,cors:i.userAgent.ie&&i.userAgent.ie<10||c,withCredentials:c,timeout:d||3e3,responseType:n.responseType,headers:n.headers,method:n.method,body:n.body,beforeSend:n.beforeSend};if(u&&h&&p){var y=(new Date).getTime(),v=new s(m,function(i,o,s){if(!f){if(n.collectPerfData){if(_={},r.isFunction(v.getResponseHeader)&&(_.resp_len=v.getResponseHeader("Content-Length")||"na"),a.performance&&a.performance.getEntriesByName){var c=0===t.indexOf("http")?t:location.protocol+t;_.resourceTiming=a.performance.getEntriesByName(c).pop(),_.resourceTimingEntries=a.performance.getEntries()}_.http_code=o.statusCode}if(o.timeDiff=(new Date).getTime()-y,i){var m=null;r.isFunction(v.getResponseHeader)&&(m=v.getResponseHeader("Access-Control-Allow-Origin"));var g=a.location.protocol+"//"+a.location.host;if(m&&m!==g)p.call(u,new Error(e.XHR_ERROR),"default","cors");else{var E=o.timeDiff>=d?e.XHR_TIMEOUT:e.XHR_ERROR;p.call(u,new Error(E),o.previousState,o.statusCode,o.timeDiff,_,v)}}else o.statusCode<200||o.statusCode>=300?p.call(u,new Error(e.XHR_ERROR+": statusCode = "+o.statusCode),o.previousState,o.statusCode,o.timeDiff,_,v):h.call(u,l?JSON.parse(s):s,!1,_,v)}});v.previousState=v.readyState;var g=v.onreadystatechange;v.onreadystatechange=function(){4===v.readyState?g.call(v):v.previousState=v.readyState}}return function(){f=!0}},t.preconnect=function(t,e){if(document&&!document.head.querySelector("#"+t)){var n=document.createElement("link");n.setAttribute("rel","preconnect"),n.setAttribute("id",t),n.setAttribute("href",e);var i=document.getElementsByTagName("head")[0];i&&i.appendChild(n)}},t.querystring=function(t,e,n,i){return void 0===e&&(e="&"),void 0===n&&(n="="),void 0===i&&(i=encodeURIComponent),r.isObject(t)&&(t=[t]),t.map(function(t){return Object.keys(t).map(function(s){var a=i(o.default.stringifyPrimitive(s));return null===t[s]?a:(a+=n,r.isArray(t[s])?t[s].map(function(t){return a+i(o.default.stringifyPrimitive(t))}).join(e):a+i(o.default.stringifyPrimitive(t[s])))}).join(e)}).join(e)},t}();e.default=a},function(t,e,n){"use strict";function i(t){t&&(this.type=t.type,this.id=t.id,this.moduleName=t.moduleName,this.instanceId=t.instanceId,this.funcName=t.funcName,this.timestamp=t.timestamp||Date.now(),this.args=t.args||[],this.argNames=t.argNames||[],this.transferables=t.transferables)}t.exports=i,i.prototype.putParam=function(t,e){e&&(this.args.push(e),this.argNames.push(t||""))},i.prototype.getParam=function(t){if(!t)return null;var e=this.argNames.indexOf(t);return e>=0?this.args[e]:null},i.prototype.dto=function(){var t=this,e={};return Object.keys(t).forEach(function(n){"__controller"!==n&&(e[n]=t[n])}),e},i.prototype.addMedia=function(){var t;return this.__controller&&(t=this.__controller.model.getMediaDto(),this.putParam("media",t)),t}},function(t,e,n){"use strict";e.Loader=h,e.LoadRequest=function(t){if(!t||i.isNullOrUndefined(t.maxRetries)||i.isNullOrUndefined(t.requestTimeout)||i.isNullOrUndefined(t.chunkedRequestTimeout))throw new Error("[LoadRequest] Invalid Arguments: Request details are not complete");this.method=t.method||"GET",this.chunked=t.isChunkedLoad||!1,this.useMSStream=t.useMSStream||!1,this.maxRetries=t.maxRetries,this.retryExclusion=t.retryExclusion,this.requestTimeout=1e3*t.requestTimeout,this.chunkedRequestTimeout=1e3*t.chunkedRequestTimeout,this.responseType=t.responseType||"text",this.headerFields=t.headerFields,this.minChunkSize=i.isNullOrUndefined(t.minChunkSize)?1e5:t.minChunkSize,this.stopStreamLoadOnError=t.stopStreamLoadOnError,this.url=t.url,this.withCredentials=t.withCredentials||!1,this.withResponseHeaders=t.withResponseHeaders||!1},e.Events={COMPLETE:"complete",ERROR:"error",PROGRESS:"progress",BYTES_LOADED:"bytesLoaded"};var i=n(14),r=n(3),o=n(16),s=n(24),a=n(25),u=0,l=3,c=4,d=1;function h(t,e,n){if(!t)throw new Error("[Loader] Invalid Arguments: Loader created without a load request");o.call(this,"Loader"),this.request=t,this._inWorkerScope=n,this.window=this._inWorkerScope?null:e||window,this._xhr=null,this._xhrMetaData={},this._backOffInit=[1e3,1e3,2e3,2e3,3e3,3e3,5e3],this._backOffInterval=5e3,this._retryTimer=new a(1e3,1),this._retryTimer.addEventListener(this.load,this),this.MIN_TIMEOUT=2e3,this.MAX_TIMEOUT=15e3,this._retries=0,this._maxRetries=t.maxRetries,this._requestTimer=new a(this._getTimeOut(),1),this._requestTimer.addEventListener(this._onTimeout,this)}function p(t,e,n){h.call(this,t,e,n)}function f(t,e,n){p.call(this,t,e,n)}e.getLoader=function(t,e,n){if(!t)throw new Error("[LoaderFactory] Invalid Arguments: Loader created without a load request");return t.chunked?t.useMSStream?new f(t,e,n):new p(t,e,n):new h(t,e,n)},r.inherits(h,o),r.inherits(p,h),r.inherits(f,p),h.prototype.load=function(t,n){var i=this;if(!i.request)throw new Error("[Loader] InvalidStateError: load called without a request");if(i.url=t||i.request.url,!i.url)return i.publish(e.Events.ERROR,new s.Error(s.ERR_XHR_LOAD));i._cancelCurrentRequest(),i._xhr=i._inWorkerScope?new XMLHttpRequest:new i.window.XMLHttpRequest,i._xhr._offset=0,i._xhr._finished=!1,i._initialize(),i._xhr.withCredentials=i.request.withCredentials,i._xhr.open(i.request.method,i.url,!0),i._headerFields=i.request.headerFields,i._headerFields&&Object.keys(i._headerFields).forEach(function(t){i._xhr.setRequestHeader(t,i._headerFields[t])}),i._setResponseType(),i._requestTimer.reset(),i._requestTimer.start(),i._xhr.send(n)},h.prototype._setResponseType=function(){this._xhr.responseType=this.request.responseType},h.prototype._initialize=function(){var t=this;t._xhr.onerror=t._handleError.bind(t),t._xhr.onreadystatechange=function(){if(t._xhr&&t._xhr.readyState===c&&!t._xhr._finished){if(!t._statusGood(t._xhr.status))return t._requestTimer.stop(),t._handleError();t._xhr._finished=!0;var n={data:t._xhr.response};if(t.request.withResponseHeaders){var i=t._xhr.getAllResponseHeaders();if(i){var r=[];i.trim().split(/[\r\n]+/).forEach(function(t){var e=t.split(": "),n=e.shift(),i=e.join(": ");r.push({name:n,value:i})}),n.headers=r}}t.publish(e.Events.COMPLETE,n),t._requestTimer.stop()}}},h.prototype._getResponseHeader=function(t){var e=new RegExp(t+": (.*)","ig"),n=this._xhr.getAllResponseHeaders(),i=e.exec(n);return i&&i.length>1?i[1]:""},h.prototype._statusGood=function(t){return t>=200&&t<300},h.prototype._cleanupOnTimeout=function(){var t=Date.now()-this._requestTimestamp;this._requestTimer.stop(),console.log("[Loader][_onTimeout] delta = "+t+", Timed-out url = "+this.url)},h.prototype._onTimeout=function(){this._cleanupOnTimeout(),this._handleError()},h.prototype._handlePartialLoadError=function(){this.reset(),this._sendError(s.ERR_PARTIAL_LOAD)},h.prototype._getBackoffTime=function(){var t=this._backOffInit.length,e=this._retries;return e<t?this._backOffInit[e]:this._backOffInit[t-1]+this._backOffInterval*(e-t+1)},h.prototype._handleError=function(){this._cancelCurrentRequest(),this._retries<this._maxRetries&&(!this.request.retryExclusion||-1===this.request.retryExclusion.indexOf(this._xhr.status))?(this._retries++,this._retryTimer.delay=this._getBackoffTime(),this._retryTimer.reset(),this._retryTimer.start(),this.request.headerFields&&this._xhr.readyState===c&&0===this._xhr.status&&(this.request.headerFields=null),console.log("[Loader][_handleError] Retrying url = "+this.url)):this.request.stopStreamLoadOnError?this._sendError(s.ERR_XHR_LOAD_LIVE_PAUSE):403===this._xhr.status?this._sendError(s.ERR_XHR_LOAD_FORBIDDEN):this._sendError(s.ERR_XHR_LOAD)},h.prototype._sendError=function(t){this.publish(e.Events.ERROR,new s.Error(t))},h.prototype._cancelCurrentRequest=function(){this._xhr&&this._xhr.readyState!==c&&this._xhr.readyState!==u&&(this._xhr._finished=!0,this._xhr.abort()),this._retryTimer.stop(),this._requestTimer.stop()},h.prototype._getTimeOut=function(){var t=this.request,e=t.chunked?t.chunkedRequestTimeout:t.requestTimeout;return isNaN(e)||e<this.MIN_TIMEOUT||e>this.MAX_TIMEOUT?this.MAX_TIMEOUT:e},h.prototype.reset=function(){this._cancelCurrentRequest(),this._xhr=null,this.request=null},h.prototype.destroy=function(){this.reset(),this._retryTimer.destroy(),this._requestTimer.destroy(),o.prototype.destroy.call(this)},p.prototype.destroy=function(){h.prototype.destroy.call(this)},p.prototype._initialize=function(){var t=this,n=function(){if(t._xhr&&!t._xhr._finished&&(t._xhr.readyState===c||t._xhr.readyState===l)){if(!t._statusGood(t._xhr.status))return t._requestTimer.stop(),0===t._xhr._offset?t._handleError():void t._handlePartialLoadError();var n=t._xhr.responseText,i=n.length-t._xhr._offset;if(i>0&&(t._requestTimer.stop(),t._xhrMetaData.atlasMarker=t._getResponseHeader("X-ATLAS-MARKERS"),t.publish(e.Events.BYTES_LOADED,n.length,t._xhrMetaData)),i>t.request.minChunkSize||t._xhr.readyState===c){for(var r=new Uint8Array(i),o=0;o<i;o++)r[o]=255&n.charCodeAt(o+t._xhr._offset);t._xhr._offset=n.length,t.publish(e.Events.PROGRESS,r,n.length)}t._requestTimer.start(),t._xhr.readyState===c&&(t._xhr._finished=!0,t.publish(e.Events.COMPLETE),t._requestTimer.stop())}};t._xhr.onreadystatechange=n,t._xhr.onprogress=n},p.prototype._onTimeout=function(){this._cleanupOnTimeout(),this._xhr._offset>0&&this._xhr.readyState===l?this._handlePartialLoadError():this._handleError()},p.prototype._setResponseType=function(){this._xhr.overrideMimeType("text/plain; charset=x-user-defined")},f.prototype.destroy=function(){p.prototype.destroy.call(this)},f.prototype._initialize=function(){var t=this;t._xhr.onreadystatechange=function(){if(t._xhr.readyState===l){if(!t._statusGood(t._xhr.status))return t._requestTimer.stop(),t._handleError();var n=t._xhr.response;if(t._MSStreamReader||(t._MSStreamReader=t._inWorkerScope?new MSStreamReader:new t.window.MSStreamReader),t._MSStreamReader.readyState===d)return;t._MSStreamReader.readAsArrayBuffer(n),t._MSStreamReader.onprogress=function(){t._requestTimer.stop();var n=t._MSStreamReader.result;n.byteLength>0&&(t._xhrMetaData.atlasMarker=t._getResponseHeader("X-ATLAS-MARKERS"),t.publish(e.Events.BYTES_LOADED,n.byteLength,t._xhrMetaData));var i=new Uint8Array(n.slice(t._xhr._offset,n.byteLength));t._xhr._offset=n.byteLength,t.publish(e.Events.PROGRESS,i,n.byteLength),t._requestTimer.start()},t._MSStreamReader.onload=function(){t._requestTimer.stop(),t.publish(e.Events.COMPLETE)},t._MSStreamReader.onerror=function(){t._requestTimer.stop()}}}},f.prototype._setResponseType=function(){this._xhr.responseType="ms-stream"},f.prototype.reset=function(){h.prototype.reset.call(this),this._MSStreamReader&&this._MSStreamReader.abort()}},function(t,e,n){"use strict";t.exports={DATA_PROCESS_PROGRESS:"dataProcessProgress",DATA_PROCESS_ERROR:"dataProcessError",DATA_PROCESS_COMPLETE:"dataProcessComplete"}},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(221),s=n(9),a=n(2),u=n(2),l=n(5),c=n(18),d=n(222),h=n(19),p=n(27),f=n(48),_=n(4),m=n(0),y=n(103),v=n(223),g=[1,5],E=function(t){function e(n,i){var o=t.call(this,n,i)||this;return o.type=e.type,o._capabilities=i.capabilities[l.RendererType.HTML5_RAW],o._resetStates(),(r.userAgent.desktop||r.userAgent.mobile&&h.default.hasNativeAutoplaySupport)&&(o._triggerSubtitleTracks=!0),o._rebufferingManager=new v.default,o._rebufferingManager.on(v.RebufferingEvent.WAITING,o._onWaiting,o),o._rebufferingManager.on(v.RebufferingEvent.SEG_INFO_AVAILABLE,o._onSegInfoAvailable,o),o}return i(e,t),e.canUse=function(){return!r.userAgent.tv},e.prototype.play=function(t){if(void 0===t&&(t=0),this.ended=!1,this.node){if(this._firstPlay){if(!h.default.autoplaySupported){if(r.userAgent.ios){var e=this.node.src;this.node.src="",this.node.load(),this.node.src=e}r.userAgent.mobile&&this.node.load()}}else{var n=this._model.playlist.getCurrentItem(),i=isNaN(this.node.duration)?n&&n.duration:this.node.duration;i||(i=0),_.isNumber(t)&&t>0&&t<i&&(this.node.currentTime=t)}this._firstPlay=!1,this._eventBus.publish(u.PROFILE_START,a.METRICS.STREAM_PLAY_TO_RENDER),this._startPlay(),this._playRequested||(this._rebufferingManager.publishWaitingEvent(!0),this._playRequested=!0)}},e.prototype.preload=function(t){},e.prototype.setPlayableItem=function(t,e){void 0===e&&(e=0),this._resetStates(),this._currentPlayableItem=t,this._mode=m.default.getPlaybackMode(t);var n=t.streams||[],i=!1,o=null;this._streams=n,this._retryStreams=n.slice(0),this._rebufferingManager.init(this.node),(r.userAgent.safari>=6||r.userAgent.tv)&&n.forEach(function(t){t.format&&t.format.indexOf("m3u8")>-1&&(t.isPrimary||t.is_primary||!o)&&(o=t,i=!0)});var s=[];if(i){if(o)return this._setSrc(o,e),!0}else{n.forEach(function(t){s.push(parseInt(t.videoMetadata.bitrate+"",10))}),s=s.sort(),this._bitrateSelector=new d.default(this.node,s);var a=this._bitrateSelector.getTargetBitrate();if(o=this._getBestStream(a))return this._setSrc(o,e),this._updateStreamBitrateInfo(o),this._model.mp4Abr&&s.length>1&&(this._timeupdateSubForAbrKey=this.on(l.RendererEvent.TIMEUPDATE,this._onPlaybackProgress,this),this._lastABRCheckTime=0),!0}return!1},e.prototype.setQuality=function(t){this._switchSrc(t.stream.url),this._updateStreamBitrateInfo(t.stream)},e.prototype.retryStreams=function(t){var e=this,n=this._currentStream;if(n&&this._retryCount<=2)window.setTimeout(function(){e._retryStream(n,t)},1e3*g[this._retryCount-1]);else{this._retryCount=0;var i=this._retryStreams.indexOf(n);if(this._retryStreams.splice(i,1),0===this._retryStreams.length)return n;var r=f.default.findStreamByProperty(this._retryStreams,f.default.BITRATE,this._bitrateSelector.getTargetBitrate(),this._capabilities);this._retryStream(r,t)}return null},e.prototype.stopMedia=function(){this.node.removeAttribute("src"),this.node.load()},e.prototype.bindCustomEvents=function(){},e.prototype.bindPlaybackEvents=function(){},e.prototype.unbindCustomEvents=function(){},e.prototype.unbindPlaybackEvents=function(){},e.prototype.setAudioLanguage=function(t){if(this.node&&this.node.audioTracks&&this.node.audioTracks.length){for(var e,n=-1,i=0;i<this.node.audioTracks.length;i++)(e=this.node.audioTracks[i]).enabled=!1,e.label===t&&-1===n&&(n=i);n>-1&&(this.node.audioTracks[n].enabled=!0)}},e.prototype._handleVideoEvent=function(t,e){var n=this;if(this.node)switch(t===l.NativeVideoEvent.PLAYING&&this._eventBus.publish(u.PROFILE_END,[a.METRICS.STREAM_PLAY_TO_RENDER,a.METRICS.STREAM_REQUEST_TO_RENDER]),t){case l.NativeVideoEvent.TIMEUPDATE:this._rebufferingManager.playbackStuck||(this._playingPublished||(this._playingPublished=!0,this.publish(l.RendererEvent.PLAYING)),this.seeking&&(this.publish(l.RendererEvent.SEEKED,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this.seeking=!1));var i=this.node.currentTime;if(r.userAgent.android){if(!this._hasPlayed&&r.userAgent.chrome<33&&i>1&&i<2)(_=this._model.playlist.getCurrentItem())&&_.isLive()?(this.node.pause(),this._startPlay()):this.seek(0),this._hasPlayed=!0;!this._fsEvt&&r.userAgent.androidVersion<=4.4&&this.node.addEventListener("webkitfullscreenchange",function(){if(n.node){var t=n.node.currentTime;n._fsEvt=!0,n.node.load();var e=n.on(l.RendererEvent.LOADEDMETADATA,function(){if(n.node){n._startPlay();var i=n._model.playlist.getCurrentItem();i&&i.isLive()&&(n.node.currentTime=parseInt(t+"",10)),n.removeEventListener(l.RendererEvent.LOADEDMETADATA,e)}},n)}},!1)}this._isSwitching||this._rebufferingManager.playbackStuck||this.publish(e,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this._lastUpdatedTime=this.node.currentTime;break;case l.NativeVideoEvent.SEEKING:this.seeking=!0,this._rebufferingManager.onSeeking(),this._isSwitching||this._rebufferingManager.playbackStuck||this.publish(e,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this._lastUpdatedTime=this.node.currentTime;break;case l.NativeVideoEvent.SEEKED:this._isSwitching?this._playNewStream():this._rebufferingManager.playbackStuck||(this.seeking=!1,this.publish(e,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered})),this._lastUpdatedTime=this.node.currentTime;break;case l.NativeVideoEvent.ERROR:if(this._mode!==l.PlaybackMode.VIDEO){this.publish(l.RendererEvent.ERROR,this.node.error);break}var o=this.node.error,c=this._getCodeForNodeError(o),d=this._retryStreams.length<=1&&this._retryCount>=2,h=s.E_WARNING,p=u.WARNING;d&&(h=s.E_PLAYER,p=u.ERROR);var f=m.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,h,c,null,this.node.src);if(parseInt(f.subcategory,10)>=303&&parseInt(f.subcategory,10)<=308){this._retryCount++,d||this._eventBus.publish(p,f);var _,y=null;return(y=(_=this._model.playlist.getCurrentItem())&&!_.isLive()?this.retryStreams(this._lastUpdatedTime):this.retryStreams(0))?void m.default.getUrlStatus(y.url,function(t){401===t?f.subcategory=s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_AUTHORIZED:404===t&&(f.subcategory=s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_FOUND),f.errorType=s.E_PLAYER,n._eventBus.publish(u.ERROR,f)}):void 0}this.publish(l.RendererEvent.ERROR,o),f.errorType=s.E_PLAYER,this._eventBus.publish(p,f);break;case l.NativeVideoEvent.ENDED:this.ended=!0,this._hasPlayed=!1,this._rebufferingManager.onEnded(),this._rebufferingManager.playbackStuck&&this._rebufferingManager.publishWaitingEvent(!1),this.publish(e);break;case l.NativeVideoEvent.LOADEDDATA:if(this._isSwitching){this._seekToCurrentTime();break}this._eventBus.publish(u.PROFILE_END,a.METRICS.LOAD_TO_LOADED_DATA),this.publish(e),this.node.audioTracks&&this.node.audioTracks.length>1&&this._updateMultiAudioStreamMeta();break;case l.NativeVideoEvent.PAUSE:if(this.ended||this.node.ended)break;if(this.seeking)break;if(!this.node.paused)break;this._rebufferingManager.playbackStuck&&this._rebufferingManager.publishWaitingEvent(!1),this.publish(e);break;case l.NativeVideoEvent.PLAY:case l.NativeVideoEvent.PLAYING:if(this._isSwitching){t===l.NativeVideoEvent.PLAYING&&this._finishSwitching();break}this._rebufferingManager.playbackStuck||(this._playingPublished=t===l.NativeVideoEvent.PLAYING,this.publish(e));break;case l.NativeVideoEvent.WAITING:break;default:this.publish(e)}},e.prototype._checkFormat=function(t,e){return t.indexOf(e)>-1},e.prototype._areFormatsCrashy=function(t,e){return this._checkFormat(t,"mp4")&&this._checkFormat(e,"m3u8")||this._checkFormat(t,"m3u8")&&this._checkFormat(e,"mp4")},e.prototype._resetStates=function(){this._isSwitching=!1,this._currentSrcFormat="",this._currentStream=null,this._retryCount=0,this._retryStreams=[],this._retryState=null,this._playRequested=!1,this._lastUpdatedTime=0,this._playingPublished=!1,this._currentPlayableItem=null,this._mode=l.PlaybackMode.VIDEO,this._hasPlayed=!1,this._fsEvt=!1,this._lastABRCheckTime=0,this._timeupdateSubForAbrKey&&(this.removeEventListener(l.RendererEvent.TIMEUPDATE,this._timeupdateSubForAbrKey),this._timeupdateSubForAbrKey=null),this.seeking=!1,this.ended=!1},e.prototype._getFirstPrimaryStream=function(){var t=null;if(this._streams)for(var e=0,n=this._streams;e<n.length;e++){var i=n[e];if(i.isPrimary){t=i;break}}return t},e.prototype._getBestStream=function(t){var e=this._getFirstPrimaryStream();return e||(e=f.default.findStreamByProperty(this._streams,"bitrate",t,this._capabilities)),!e&&this._streams&&this._streams.length>0&&(e=this._streams[0]),e},e.prototype._onPlaybackProgress=function(t){if(t-this._lastABRCheckTime>10){this._lastABRCheckTime=t;var e=this._getBestStream(this._bitrateSelector.getRecommendedBitrate());e&&(this._switchSrc(e.url),this._updateStreamBitrateInfo(e))}},e.prototype._updateStreamBitrateInfo=function(t){this._bitrateSelector&&(this._bitrateSelector.currentBitrate=t.videoMetadata.bitrate),this._eventBus.publish(u.PLAYBACK_INFO,{currentStreamBitrate:t.videoMetadata.bitrate,qualityLevels:this._streams.length})},e.prototype._setSrc=function(t,e,n){var i=this;if(this.node){var d=this._model.playlist.getCurrentItem(),f=d.license&&d.license.isDrm;if(f&&!h.default.drmSupported){var _=void 0;return r.userAgent.ios&&r.userAgent.iosVersion<11.2||r.userAgent.android&&!r.userAgent.chrome?_=s.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_OS:r.userAgent.ios&&!r.userAgent.safari&&(_=s.PLAYER_DRM_CODES.ERR_DRM_UNSUPPORTED_BROWSER),void this._eventBus.publish(u.INFO,m.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,s.E_PLAYER_DRM,_,null,this.node.src))}if(r.userAgent.safari&&(t.fairplayCertificatePath||f)&&(this._fairplayLicenseManager||(this._fairplayLicenseManager=new o.default(this.node,this.reportError.bind(this))),this._fairplayLicenseManager.load(t.fairplayCertificatePath)),this.ended=!1,this._hasPlayed=!1,this.node.src!==t.url||n){if(r.userAgent.iphone&&this.node.hasOwnProperty("webkitDisplayingFullscreen")&&!this.node.webkitDisplayingFullscreen&&t.format&&this._areFormatsCrashy(t.format,this._currentSrcFormat)){var y=this.node.parentNode;this.destroy(),y&&y.appendChild(this.create())}if(r.userAgent.android&&t.live&&(r.userAgent.chrome&&r.userAgent.chrome<30||!p.default.isAndroidVersionAbove4())){var v=m.default.createErr(s.ErrorGroup.Restriction,this._model.playbackState,s.E_INFO,s.INFO_CODES.E_PLAYER_ANDROID_CHROME_REQUIRED);return void this._eventBus.publish(u.INFO,v)}if(this._deleteTracks(),this._eventBus.publish(u.PROFILE_START,a.METRICS.STREAM_REQUEST_TO_RENDER),this.node.src=t.url,e)var g=this.on(l.RendererEvent.LOADEDMETADATA,function(){i.node&&(i.node.currentTime=e),i.removeEventListener(l.RendererEvent.LOADEDMETADATA,g)},this);this._firstPlay=!0,this._currentSrcFormat=t.format||"",this._currentStream=t,this._mode===l.PlaybackMode.VIDEO&&this._eventBus.publish(u.PROFILE_START,a.METRICS.LOAD_TO_LOADED_DATA),r.userAgent.mobile?h.default.hasNativeAutoplaySupport&&this.node.load():(this.node.load(),this._model.getState()===c.States.VIDEO&&this.play())}}},e.prototype._calculateCanvasPosition=function(){if(!this.node)return{};var t=this.node.videoWidth/this.node.videoHeight,e=this.node.clientWidth,n=this.node.clientHeight,i=0,r=0;return e/n>t?(r=parseInt(n.toFixed(2),10),i=parseInt((t*n).toFixed(2),10)):(i=parseInt(e.toFixed(2),10),r=parseInt((e/t).toFixed(2),10)),{width:i,height:r,left:Math.max((e-i)/2,0),top:Math.max((n-r)/2,0)}},e.prototype._seekToCurrentTime=function(){this.seek(this._currentTime)},e.prototype._playNewStream=function(){if(this.node){this._startPlay();var t=this._canvas.parentNode;t&&t.removeChild(this._canvas)}},e.prototype._finishSwitching=function(){this.publish(l.CustomRendererEvent.SRC_SWITCHED),this._isSwitching=!1},e.prototype._switchSrc=function(t,e){if(this.node){var n=this.node.clientWidth,i=this.node.clientHeight;if(this.node.src===t)return this.publish(l.CustomRendererEvent.SRC_SWITCHING),void this.publish(l.CustomRendererEvent.SRC_SWITCHED);this._isSwitching=!0,this.node.pause(),this._currentTime=this.node.currentTime;var r=document.createElement("canvas");this._canvas=r,r.className="vp-switching-canvas",r.width=n,r.height=i;var o=this._calculateCanvasPosition();r.style.cssText="width:"+o.width+"px;height:"+o.height+"px;left:"+o.left+"px;top:"+o.top+"px";var s=this.node.parentNode;s&&s.appendChild(r);var a=r.getContext("2d");a&&a.drawImage(this.node,0,0,n,i),this.publish(l.CustomRendererEvent.SRC_SWITCHING),this.node.src=t}},e.prototype._retryStream=function(t,e){this._setSrc(t,e,!0),this._updateStreamBitrateInfo(t)},e.prototype._updateMultiAudioStreamMeta=function(){if(this.node&&this.node.audioTracks&&!(this.node.audioTracks.length<2)){var t=Array.prototype.slice.call(this.node.audioTracks).map(function(t){return{name:t.label,language:t.language,selected:t.enabled}}),e=this._model.playlist.getCurrentItem();e&&(e.setMultiLanguages(t),this._eventBus.publish(u.MULTI_LANGUAGES_AVAILABLE))}},e.prototype._onWaiting=function(t){t.value&&(this._playingPublished=!1),t.ignoreBuffering=t.ignoreBuffering||this.seeking,this.publish(l.RendererEvent.WAITING,t)},e.prototype._onSegInfoAvailable=function(t){this._eventBus.publish(u.SEG_INFO_AVAILABLE,t)},e.type=l.RendererType.HTML5_RAW,e}(y.default);e.default=E},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(48),r=n(0),o=n(77),s=n(78),a=function(){function t(t,e,n,i){this._streams=[],this._adBreak=t,this._rawAdBreakItemData=e,this.id=e.adBreakItemId,this.adBreakItemId=e.adBreakItemId,this.adPluginMimeType=e.adPluginMimeType,this.customConfig=e.customInfo||null,this.duration=e.duration||NaN,this.instream=e.instream,this.interactionConfig=e.interactionConfig,this.type=e.type,this.videoSession=this._generateVSid(),e.source&&e.source.streams&&this._buildStreams(e.source.streams,n,i)}return t.prototype.getPlayableItemType=function(){return o.PlayableItemType.AD_BREAK_ITEM},t.prototype.getDuration=function(){return this.duration},t.prototype.setDuration=function(t){this.duration=t},t.prototype.isRecovering=function(){return!1},Object.defineProperty(t.prototype,"adBreak",{get:function(){return this._adBreak},enumerable:!0,configurable:!0}),t.prototype.skip=function(){},Object.defineProperty(t.prototype,"rawItemData",{get:function(){return r.default.deepCopy(this._rawAdBreakItemData)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streams",{get:function(){return this._streams},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streamProfiles",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"altStreams",{get:function(){return[]},set:function(t){},enumerable:!0,configurable:!0}),t.prototype.isLive=function(){return!1},t.prototype.getCurrLanguage=function(){return null},t.prototype.is360Video=function(){return!1},t.prototype.getStreamType=function(){return this._adBreak&&this._adBreak.type||""},t.prototype._generateVSid=function(){for(var t=[],e="abcdefghijklmnopqrstuvwxyz123456789",n=0;n<8;n++)t.push(e.charAt(Math.floor(Math.random()*e.length)));return t.join("")},t.prototype._buildStreams=function(t,e,n){if(t&&t.length&&0===this._streams.length){for(var r=t.map(function(t){return new s.default(t)}),o=0,a=e;o<a.length;o++){var u=a[o],l=n[u],c=i.default.findAcceptedStreams(r,l);if(0!==c.length){this.rendererType=u,this._streams=c;break}}this._streams.length>0&&this._streams.sort(function(t,e){return t.videoMetadata.bitrate-e.videoMetadata.bitrate})}},t}();e.default=a},function(t,e,n){"use strict";var i=t.exports.Validator=n(131);t.exports.ValidatorResult=n(31).ValidatorResult,t.exports.ValidationError=n(31).ValidationError,t.exports.SchemaError=n(31).SchemaError,t.exports.SchemaScanResult=n(56).SchemaScanResult,t.exports.scan=n(56).scan,t.exports.validate=function(t,e,n){return(new i).validate(t,e,n)}},function(t,e,n){"use strict";e.decode=e.parse=n(135),e.encode=e.stringify=n(136)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5);e.AdPluginPlaybackCapability=i.ExternalPlayerCapability,e.AdPlayerEvent=i.ExternalPlayerEvent;var r,o,s,a,u=n(0).default.mergeStringEnums;!function(t){t.METRICS="ad-plugin--metrics",t.DIAGNOSTICS="ad-plugin--diagnostics"}(r=e.AdPluginMetricsEvent||(e.AdPluginMetricsEvent={})),function(t){t.AD_BREAKS_AVAILABLE="ad-plugin--breaks-available",t.AD_BREAK_RESOLVED="ad-plugin--break-resolved",t.AD_BREAK_RESOLVE_ERROR="ad-plugin--break-resolve-error"}(o=e.AdPluginMetadataEvent||(e.AdPluginMetadataEvent={})),function(t){t.CTA_TRIGGERED="ad-plugin-ui-cta-triggered",t.SKIP_AD="ad-plugin-ui-skip-ad",t.CLICKED="ad-plugin-ui-clicked"}(s=e.AdPluginUIEvent||(e.AdPluginUIEvent={})),function(t){t.NONLINEAR_AD_RENDERED="ad-plugin-nonlinear-ad-rendered",t.NONLINEAR_AD_CLEARED="ad-plugin-nonlinear-ad-cleared",t.NONLINEAR_AD_DISMISSED="ad-plugin-nonlinear-ad-dismissed",t.NONLINEAR_AD_CLICKED="ad-plugin-nonlinear-ad-clicked"}(a=e.AdPluginOverlayAdEvent||(e.AdPluginOverlayAdEvent={})),e.AdPluginEvent=u(o,u(r,u(a,u(s,i.ExternalPlayerEvent))))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.get=function(t){var e;try{e=(e=window.localStorage.getItem(t))&&JSON.parse(e)||null}catch(t){e=null}return e},t.put=function(t,e){if(!t||!e)return!1;try{return e=JSON.stringify(e),localStorage.setItem(t,e),!0}catch(t){return!1}},t.remove=function(t){try{localStorage.removeItem(t)}catch(t){return}},t.getAllKeys=function(){var t=[];try{for(var e=0,n=localStorage.length;e<n;++e){var i=localStorage.key(e);i&&t.push(i)}return t}catch(e){return t}},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(59);e.Command=i.default;var r=n(155);e.MetadataLoadCommand=r.default;var o,s,a=n(156);e.SourceMetadataLoadCommand=a.default,function(t){t.CMD_SOURCE_METADATA_LOAD="SourceMetadataLoad",t.CMD_METADATA_LOAD="MetadataLoad"}(o||(o={})),e.CmdName=o,function(t){t.CMD_COMPLETE="Complete",t.CMD_PROGRESS="Progress",t.CMD_ERROR="Error",t.CMD_INFO="Info"}(s||(s={})),e.CmdEvent=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(160),o=n(1),s=n(11),a=n(9),u=n(2),l=n(2),c=n(5),d=n(27),h=n(4),p=n(0),f=function(t){function e(n,i){var r=t.call(this,n,i)||this;return r.type=e.type,r._resetStates(),r}return i(e,t),e.canUse=function(){return d.default.useHtml5MseDefault()&&d.default.isHtml5MseAvailable()},e.prototype.create=function(e){this.node=t.prototype.create.call(this,e);var n=this._getHtml5HlsConfig();return this._jsPlayer=new r(this.node,n),this.node},e.prototype.play=function(t){void 0===t&&(t=0),this.ended=!1,this.seeking=!1,this._eventBus.publish(u.PROFILE_START,l.METRICS.STREAM_PLAY_TO_RENDER),this._jsPlayer.play(t)},e.prototype.pause=function(){this._jsPlayer.pause()},e.prototype.preload=function(t){!t||h.isNumber(t.startOffset)&&t.startOffset>0||this._jsPlayer.preload(t.bufferLimit)},e.prototype.setPlayableItem=function(t,e){var n=this;if(void 0===e&&(e=0),!t)return!1;this._resetStates(),this._currentPlayableItem=t,this._mode=p.default.getPlaybackMode(t);var i,r=t.isLive(),s=t.streamProfiles;if(s&&s.length||(s=t.streams),!s)return!1;var d=[];if(s.forEach(function(t){t&&t.format&&t.format.indexOf("m3u8")>=0?(t.hls_info=t.hlsInfo,d.push(t),n._contentType="hls"):t&&t.format&&t.format.indexOf("mpd")>=0&&(i=t.url,n._contentType="dash")}),"hls"===this._contentType){var h=[];if(t.altStreams&&(t.altStreams=this._filterDuplicateAltStreams(t.altStreams),t.altStreams.forEach(function(t){h.push(t)})),this._eventBus.publish(u.PROFILE_START,l.METRICS.STREAM_REQUEST_TO_RENDER),this._mode===c.PlaybackMode.VIDEO&&this._eventBus.publish(u.PROFILE_START,l.METRICS.LOAD_TO_LOADED_DATA),d.length>0)return this._jsPlayer.setSrc({streams:d,altStreams:h,sessionId:t.videoSession,currLang:t&&t.getCurrLanguage(),is360:t.is360Video(),live:r}),!0}else if("dash"===this._contentType){if(59===o.userAgent.firefox){var f=p.default.createErr(a.ErrorGroup.Streaming,this._model.playbackState,a.E_PLAYER_JS_HLS,a.PLAYER_JS_HLS_CODES.MEDIA_ERR_DECODE);return this._eventBus.publish(u.ERROR,f),!1}if(null!==i)return this._jsPlayer.setSrc({url:i,sessionId:t.videoSession,currLang:t&&t.getCurrLanguage(),is360:t.is360Video(),live:r}),!0}return!1},e.prototype.waitForReady=function(t){t()},e.prototype.getCurrentDate=function(){return this._jsPlayer.getCurrentDate()},e.prototype.setQuality=function(t){this._jsPlayer.setQuality(t)},e.prototype.setAudioLanguage=function(t){this._jsPlayer.setAudioLanguage(t)},e.prototype.stopMedia=function(){this._jsPlayer.unload()},e.prototype.bindCustomEvents=function(){var t=this;if(this.node){this._onCustomVideoEvents=function(e){var n=e.type;t._handleHLSVideoEvent(n,e)}.bind(this),Object.keys(l.HLSVideoEvent).forEach(function(e){t.node&&t.node.addEventListener(l.HLSVideoEvent[e],t._onCustomVideoEvents)})}},e.prototype.unbindCustomEvents=function(){var t=this;this.node&&Object.keys(l.HLSVideoEvent).forEach(function(e){t.node&&t.node.removeEventListener(l.HLSVideoEvent[e],t._onCustomVideoEvents)})},e.prototype.bindPlaybackEvents=function(){},e.prototype.unbindPlaybackEvents=function(){},e.prototype.destroy=function(){t.prototype.destroy.call(this),this._jsPlayer&&this._jsPlayer.destroy()},e.prototype._bindEvents=function(){t.prototype._bindEvents.call(this),this.bindCustomEvents()},e.prototype._unbindEvents=function(){t.prototype._unbindEvents.call(this),this.unbindCustomEvents()},e.prototype._handleVideoEvent=function(t,e){switch(t===c.NativeVideoEvent.PLAYING&&this._eventBus.publish(u.PROFILE_END,[l.METRICS.STREAM_PLAY_TO_RENDER,l.METRICS.STREAM_REQUEST_TO_RENDER]),t){case c.NativeVideoEvent.SEEKING:case c.NativeVideoEvent.SEEKED:this.node&&this.publish(e,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered});break;case c.NativeVideoEvent.ERROR:if(!this.node)return;if(this._mode!==c.PlaybackMode.VIDEO){this.publish(c.RendererEvent.ERROR,this.node.error);break}var n=this.node.error,i=this._jsPlayer.error||{},r=void 0,o=void 0;h.isNumber(i.code)?(r=i.code.toString(),o=i.message):(r=n.code.toString(),o=n.message);var s=p.default.createErr(a.ErrorGroup.Streaming,this._model.playbackState,a.E_PLAYER_JS_HLS,r,null,o);this.publish(c.RendererEvent.ERROR,n),this._eventBus.publish(u.ERROR,s);break;case c.NativeVideoEvent.ENDED:this.ended=!0;var d=this._model.playlist.getCurrentItem();if(!d)return;d.isLive()&&this._eventBus.publish(u.WARNING,p.default.createErr(a.ErrorGroup.Streaming,this._model.playbackState,a.E_WARNING,a.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE),!0),this.publish(e);break;case c.NativeVideoEvent.PAUSE:if(this.ended)break;if(this.seeking)break;this.publish(e);break;case c.NativeVideoEvent.PLAY:this._playingCalled=!1,this.publish(e);break;case c.NativeVideoEvent.PLAYING:this._playingCalled=!0,this.publish(e);break;case c.NativeVideoEvent.TIMEUPDATE:if(!this.node)return;this.publish(e,{currentTime:this.node.currentTime,duration:this.node.duration,buffered:this.node.buffered}),this._playingCalled||(this._playingCalled=!0,this.publish(c.RendererEvent.PLAYING));break;case c.NativeVideoEvent.LOADEDDATA:this._eventBus.publish(u.PROFILE_END,l.METRICS.LOAD_TO_LOADED_DATA),this.publish(e);break;case c.NativeVideoEvent.WAITING:break;default:this.publish(e)}},e.prototype._handleHLSVideoEvent=function(t,e){var n;switch(t){case l.HLSVideoEvent.INFO_UPDATE:if(this._active){var i=e.detail.mediaInfo,r=i.currentStreamBitrate;0===this._model.bitrate&&r>0&&this._eventBus.publish(u.API.BITRATE_CHANGE,r,{}),i.drmsys&&i.drm&&(this._model.isDrmAvailable=i.drm,this._model.drmSystem=i.drmsys),this._eventBus.publish(u.PLAYBACK_INFO,i)}break;case l.HLSVideoEvent.STREAM_SWITCHED:var o=e.detail.bitrate,a={reason:e.detail.reason,oldFrameRate:e.detail.oldFrameRate,newFrameRate:e.detail.newFrameRate};this._eventBus.publish(u.API.BITRATE_CHANGE,o,a);break;case l.HLSVideoEvent.HLS_WAITING:e&&e.detail&&!h.isNullOrUndefined(e.detail.bufferInit)&&this.publish(c.RendererEvent.WAITING,{value:e.detail.value,ignoreBuffering:e.detail.bufferInit});break;case l.HLSVideoEvent.SEGMENT_FIRST_BYTE_LOADED:this._eventBus.publish(u.SEGMENT_FIRST_BYTE_LOADED,e.detail);break;case l.HLSVideoEvent.SEGMENT_RENDERED:var d=this._jsPlayer.getSegInfo();d&&d.segInfo&&this._sendSegInfo(d);break;case l.HLSVideoEvent.VTT_SEGMENT_LOADED:var f=this._model?this._model.playlist:null;if(e.detail&&f){var _=void 0;if(this._model.playbackState.ad)_=this._currentPlayableItem.id;else{var m=f.getMediaItemBySessionId(e.detail.sessionId);_=m?m.id:null}e.detail.itemId=_}this._eventBus.publish(u.VTT_SEGMENT_LOADED,e.detail);break;case l.HLSVideoEvent.LIVE_LOADING_LATE:this._eventBus.publish(u.LIVE_LOADING_LATE);break;case l.HLSVideoEvent.STREAM_UPDATED:this._eventBus.publish(u.MEDIA_PLAYLIST_UPDATED);break;case l.HLSVideoEvent.CUEPOINT_DETECTED:this._eventBus.publish(u.API.CUEPOINT_DETECTED,e.detail.cuepointDuration,e.detail.timeGapBeforeCUEOUT);break;case l.HLSVideoEvent.CUEPOINT_STARTED:this._eventBus.publish(u.API.CUEPOINT_STARTED,e.detail.cuepointDuration,e.detail.cuepointPlayedTime);break;case l.HLSVideoEvent.SUBTITLE_STREAM_UPDATED:this._eventBus.publish(u.SUBTITLE_PLAYLIST_UPDATED);break;case l.HLSVideoEvent.ABR_DATA_UPDATED:this._sendAbrAnalytics&&this._eventBus.publish(u.ABR_DATA_UPDATE,e.detail);break;case l.HLSVideoEvent.PRELOAD_PROGRESS:this._eventBus.publish(u.PROFILE_END,l.METRICS.STREAM_REQUEST_TO_RENDER);break;case l.HLSVideoEvent.SEGINFO_METRICS_AVAILABLE:this._sendSegInfo(e.detail);break;case l.HLSVideoEvent.CONTENT_LOAD_FINISHED:this._eventBus.publish(u.CONTENT_LOAD_FINISHED,e.detail);break;case l.HLSVideoEvent.BUFFER_GROWTH_DETECTED:this._eventBus.publish(u.BUFFER_GROWTH_DETECTED,e.detail);break;case l.HLSVideoEvent.CC_VTT_AVAILABLE:(n=this._model.playlist.getMediaItemBySessionId(e.detail.sessionId))&&n.setCCAvailability(!0);break;case l.HLSVideoEvent.MULTI_LANGUAGES_AVAILABLE:(n=this._model.playlist.getMediaItemBySessionId(e.detail.sessionId))&&n.setMultiLanguages(e.detail.languages),this._eventBus.publish(u.MULTI_LANGUAGES_AVAILABLE);break;case l.HLSVideoEvent.TIMED_METADATA_READY:var y=p.default.extractID3Data(e.detail.data);if(y){var v=p.default.detectRegexPattern(s.ID3_MATCH_PATTERN.JSON,y);if(v)try{y=JSON.parse(v)}catch(t){}this._eventBus.publish(u.TIMED_METADATA_RECEIVED,y)}}},e.prototype._getHtml5HlsConfig=function(){this._sendAbrAnalytics=!1;var t={useWorker:!0,sendAbrAnalytics:this._sendAbrAnalytics,stopBufferingOnPause:this._model.stopBufferingOnPause,dimensions:{width:this._model.uiState.width,height:this._model.uiState.height}};return!0===this._model.preload&&(t.preloadBufferLimit=8),t},e.prototype._isPlayerVisible=function(){var t=document.getElementsByClassName("vp-main");return!p.default.isPlayerInBackground()&&t&&t.length>0&&0!==p.default.getElementViewability(t[0])},e.prototype._filterDuplicateAltStreams=function(t){if(!t)return t;var e={};return t.filter(function(t){var n=t.type+"_"+t.host+t.path;return!e[n]&&(e[n]=1,!0)})},e.prototype._sendSegInfo=function(t){var e=t.segInfo,n=t.sessionId,i=this._isPlayerVisible();e.forEach(function(t){t.vis=i}),this._eventBus.publish(u.SEG_INFO_AVAILABLE,{val:e,session:n,bufferLen:t.bufferLen})},e.prototype._resetStates=function(){this._currentPlayableItem=null,this._contentType=null,this._mode=c.PlaybackMode.VIDEO,this._playingCalled=!0,this.seeking=!1,this.ended=!1},e.type=c.RendererType.HTML5_HLS,e}(n(103).default);e.default=f},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e,n){void 0===n&&(n=0);var i=t.call(this,"Timer")||this;if(!e||isNaN(e))throw new Error("Invalid Argument: No delay");return i.delay=Math.max(e,20),i._repeatCount=n>0?n:Number.POSITIVE_INFINITY,i._currentCount=0,i.running=!1,i.startTime=0,i._timerHandle=null,i._subscriptions={},i._eventKeys={},i}return i(e,t),e.prototype.destroy=function(){this.reset(),this._subscriptions={},t.prototype.removeEventListeners.call(this,this._eventKeys),t.prototype.destroy.call(this)},e.prototype.addEventListener=function(n,i,r){if(void 0===n&&(n=e.TIMER_EVENT),!r)throw new Error("Invalid Argument: No context");var o=t.prototype.addEventListener.call(this,n,i,r);return this._eventKeys[n]=o,o},e.prototype.removeEventListener=function(n,i){void 0===n&&(n=e.TIMER_EVENT),void 0===i&&(i=""),t.prototype.removeEventListeners.call(this,this._eventKeys)},e.prototype.start=function(){var t=this;this._timerHandle||this.running||(this._timerHandle=window.setInterval(function(){t._currentCount++,t._currentCount>=t._repeatCount&&t.stop(),t.publish(e.TIMER_EVENT),t.startTime=Date.now()},this.delay),this.startTime=Date.now(),this.running=!0)},e.prototype.stop=function(){this._timerHandle&&this.running&&(window.clearInterval(this._timerHandle),this._timerHandle=null,this.running=!1,this.startTime=0)},e.prototype.reset=function(){this.stop(),this._currentCount=0,this.startTime=0},e.TIMER_EVENT="timedOut",e}(n(6).default);e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=function(t){return Array.isArray(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t&&!isNaN(t)},e.isString=function(t){return"string"==typeof t},e.isObject=function(t){return"[object Object]"===function(t){return Object.prototype.toString.call(t)}(t)},e.isFunction=function(t){return"function"==typeof t},e.isNonEmptyString=function(t){return"string"==typeof t&&""!==t}},function(t,e,n){"use strict";var i=n(130);t.exports={errorCodes:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.isFormatInAcceptedFormats=function(t,e){return e.some(function(e){return t===e})},t.isProtocolInAcceptedProtocols=function(t,e){var n=!1;return e.forEach(function(e){t.indexOf(e)>-1&&(n=!0)}),n},t.findAcceptedStreams=function(e,n){return e.filter(function(e){return!!t.isFormatInAcceptedFormats(e.format,n.acceptedFormats)&&(!(e.isUplynk()&&"m3u8"===e.format&&!n.canDecryptAES)&&!!t.isProtocolInAcceptedProtocols(e._getProtocol(),n.acceptedProtocols))})},t.findStreamByProperty=function(e,n,i,r){return e=t.findAcceptedStreams(e,r).sort(function(t,e){return t[n]-e[n]}),"resolution"===n&&(n="height"),t.findStream(e,i,n)},t.filterStreamByResolution=function(t,e,n){return t.filter(function(t){var i=t&&t.height;if(i){if(e&&i<e)return!1;if(n&&i>n)return!1}return!0})},t.isHlsLive=function(t){return t.url.match(/\.m3u8/)&&t.live||!1},t.findStream=function(t,e,n){var i;return t&&t.forEach(function(t){i?t[n]<=e&&(i=t):i=t}),i},t.BITRATE="bitrate",t.RESOLUTION="resolution",t}();e.default=i},function(t,e,n){"use strict";t.exports=o;var i=n(170),r=n(14);function o(){this._pointer=0}o.prototype.destroy=function(){this._pointer=0},o.prototype.parse=function(t,e,n){if(!t||!e||!i[e])return null;this._pointer=0;var o=new DataView(t.buffer);if(r.isNullOrUndefined(n)?(n=this.findBoxOffset(o,e),this._pointer=n):this._pointer=n,this._pointer<0)return null;var s=this.parseHeader(o,e,this._pointer);return!s||s.boxSize>o.byteLength?null:"sidx"===s.boxType?this._parseSidx(o,s,n):this._parse(o,s)},o.prototype._parseAll=function(t){var e=[];if(!t)return e;this._pointer=0;for(var n=new DataView(t.buffer);this._pointer+8<=n.byteLength;){var r=this._pointer,o=this._binaryToString(n.getUint32(r+4),4);if(i[o]){var s=this.parseHeader(n,o,r);s&&("sidx"===s.boxType?e.push(this._parseSidx(n,s)):e.push(this._parse(n,s)))}else console.log("[MP4BoxParser] unknown box type: "+o),this._pointer++}return e},o.prototype.parseHeader=function(t,e,n){var r={boxOffset:n};this._pointer=n;var o=this._parseBox(t,r);return-1===o||r.boxType!==e?null:i[e].fullBox&&-1===(o=this._parseFullBox(t,r))?null:r},o.prototype.extractVttCaptions=function(t){var e=[];if(this._pointer=0,!t)return e;var n=new DataView(t.buffer),i=this.findBoxOffset(n,"mdat");if(i<0)return e;var r=t.slice(i+8),o=this._parseAll(r);if(!o.length)return e;for(var s=0;s<o.length;s++){var a=o[s];if(a)if("vttc"===a.boxType){this._pointer=0;var u=r.slice(a.boxOffset+8,a.boxOffset+a.boxSize),l=this._parseAll(u);e.push(this._getVttCaption(l))}else"vtte"===a.boxType&&e.push({})}return e},o.prototype._parse=function(t,e,n){if(!t||!e||e.boxSize>t.byteLength)return e;var r=i[e.boxType],o=r.properties;if(!o)return this._pointer+=e.boxSize-(r.fullBox?12:8),e;for(var s=Object.keys(o),a=0;a<s.length;a++){var u=s[a],l=o[u];if(this._isPresent(l.validator,e[l.validationProperty]||e.flags,l.validationResult))if("array"===l.type){e[u]=[];var c=l.length||l.lengthField&&e[l.lengthField],d=l.itemSchema;if(!d)break;c?this._readFixedLengthArray(e,u,t,c,d,n):this._readVariableLengthArray(e,u,t,d)}else this._setProp(t,l,n,u),e[u]=this._readSingleProp(e,l,t)}return e},o.prototype._setProp=function(t,e,n,i,r,o){if(n&&e){var s=!n.pos||n.pos&&n.pos===r||r===o-1&&-1===n.pos;n.name&&i===n.name&&n.length&&e.length&&n.length===e.length&&s&&this._setBytes(t,n)}},o.prototype._readFixedLengthArray=function(t,e,n,i,r,o){for(var s,a=0;a<i;a++){if(r.length)s=this._readSingleProp(t,r,n);else{s={};for(var u=Object.keys(r),l=0;l<u.length;l++){var c=u[l],d=r[c];this._isPresent(d.validator,t.flags)&&(this._setProp(n,d,o,c,a,i),s[c]=this._readSingleProp(t,d,n))}}t[e].push(s)}},o.prototype._readVariableLengthArray=function(t,e,n,i){for(var r;this._pointer<t.boxOffset+t.boxSize;)r=this._readSingleProp(t,i,n),t[e].push(r)},o.prototype._isPresent=function(t,e,n){return!t||(n?(e&t)===n:e&t)},o.prototype._readSingleProp=function(t,e,n){var i;return e.length&&(i=this._readBytes(n,e.length),this._pointer+=i.readBytes,i.readBytes===e.length/8)?"string"===e.type?this._binaryToString(i.value,4):i.value:"string"===e.type?this._readString(t,n):"boxstring"===e.type?this._readBoxString(t,n):null},o.prototype._readBytes=function(t,e){var n={value:0,readBytes:0},i=e/8;if(this._pointer+i<=t.byteLength){switch(e){case 8:n.value=t.getUint8(this._pointer);break;case 16:n.value=t.getUint16(this._pointer);break;case 32:n.value=t.getUint32(this._pointer);break;case 64:for(var r=new Uint8Array(8),o=0;o<8;o++)r[o]=t.getUint8(this._pointer+o);n.value=r}n.readBytes=i}return n},o.prototype._setBytes=function(t,e){var n=e.value;switch(e.length){case 8:t.setUint8(this._pointer,n);break;case 16:t.setUint16(this._pointer,n);break;case 32:t.setUint32(this._pointer,n)}},o.prototype._readString=function(t,e){var n="",i=this._readBytes(e,8);for(this._pointer+=i.readBytes;i.readBytes>0&&i.value>0&&this._pointer<t.boxOffset+t.boxSize;)n+=String.fromCharCode(i.value),i=this._readBytes(e,8),this._pointer+=i.readBytes;return n},o.prototype._readBoxString=function(t,e){var n=t.boxSize-(this._pointer-t.boxOffset),i=String.fromCharCode.apply(null,new Uint8Array(e.buffer,this._pointer,n));return this._pointer+=n,i},o.prototype.findBoxOffset=function(t,e){if(!t||t.byteLength<8)return-1;var n,r=i[e].parents,o=0;if(r&&r.length>0){for(var s=!1,a=0;a<r.length;a++){var u=r[a];if((n=this.findBoxOffset(t,u))>=0){o=n+(i[u].fullBox?12:8);var l=i[u].payload;l&&(o+=l),s=!0;break}}if(!s)return-1}for(;o+8<=t.byteLength;){if(this._binaryToString(t.getUint32(o+4),4)===e)return o;var c=t.getUint32(o);if(!(c>0))break;o+=c}return-1},o.prototype._parseBox=function(t,e){if(!t||!e||t.byteLength<8)return-1;e.boxSize=t.getUint32(this._pointer),this._pointer+=4;var n=t.getUint32(this._pointer);return e.boxType=this._binaryToString(n,4),this._pointer+=4,1===e.boxSize&&(e.boxSize=this._getUint64(t),this._pointer+=8),0},o.prototype._parseFullBox=function(t,e){if(!t||!e)return-1;var n=t.getUint32(this._pointer);return e.boxVersion=n>>24,e.flags=16777215&n,this._pointer+=4,0},o.prototype._parseSidx=function(t,e,n){var i;if(!t||!e)return null;n=n||0,this._pointer+=4,this._pointer+=4,0===e.boxVersion?(t.getUint32(this._pointer),this._pointer+=4,i=t.getUint32(this._pointer),this._pointer+=4):(this._getUint64(t),this._pointer+=8,i=this._getUint64(t),this._pointer+=8),this._pointer+=2;var r=t.getUint16(this._pointer);this._pointer+=2;for(var o=e.boxOffset+e.boxSize+i,s=[],a=0;a<r;a++){var u=t.getUint32(this._pointer);if(this._pointer+=4,1===u>>>31)return null;var l=2147483647&u;this._pointer+=8,s.push({brStartOffset:o+n,brEndOffset:o+n+l-1}),o+=l}return s},o.prototype.setSingleProp=function(t,e,n){if(t&&e){var i=new DataView(t.buffer),r=this.findBoxOffset(i,e);if(!(r<0)){this._pointer=r;var o=this.parseHeader(i,e,r);o&&this._parse(i,o,n)}}},o.prototype._binaryToString=function(t,e){if(!t||!e)return"";for(var n=new Array(e),i=e-1;i>=0;i--){var r=255&t;n[i]=String.fromCharCode(r),t>>>=8}return n.join("")},o.prototype._getUint64=function(t){var e=this._pointer,n=t.getUint32(e);e+=4;var i=t.getUint32(e);return n*Math.pow(2,32)+i},o.prototype._getVttCaption=function(t){for(var e={},n=0;n<t.length;n++){var i=t[n];if(i)switch(i.boxType){case"vsid":e.sourceId=i.sourceId;break;case"ctim":e.cueTime=i.cueTime;break;case"payl":e.cueText=i.cueText}}return e}},function(t,e,n){"use strict";t.exports=u;var i=n(10),r=i.CmdEvents,o=i.CmdNames,s=n(175),a=n(3);function u(){for(var t in this._commandMap={},this._eventKeys={},o)o.hasOwnProperty(t)&&(this._commandMap[o[t]]={})}u.prototype.destroy=function(){this.removeAllCommands(),this._commandMap=null},u.prototype.executeCommand=function(t,e,n){e&&(e.controller=this.__controller);var i=this.createCommand(t,e,n);return i&&i.execute(),i},u.prototype.createCommand=function(t,e,n){var i;try{i=s.create(t,e,n)}catch(t){console.error("[CommandManager] Could not create command. Error = "+t.toString()),i=null}if(!i)return null;for(var o in i.key=a.guid(),r)if(r.hasOwnProperty(o)){var u=r[o],l="on"+t+u;n[l]&&(this._eventKeys[u+t+i.key]=i.addEventListener(u,n[l],n))}return this._commandMap[t][i.key]=i,i},u.prototype.removeCommand=function(t){if(t){var e=this._commandMap[t.name];if(e[t.key]===t){if(delete e[t.key],t.client)for(var n in r)if(r.hasOwnProperty(n)){var i=r[n],o="on"+t.name+i;t.client[o]&&(t.removeEventListener(i,this._eventKeys[i+t.name+t.key]),delete this._eventKeys[i+t.name+t.key])}t.destroy()}}},u.prototype.removeRelatedCommands=function(t){if(this._commandMap.hasOwnProperty(t)){var e=this._commandMap[t];for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i&&this.removeCommand(i)}}},u.prototype.removeAllCommands=function(){for(var t in this._commandMap)this._commandMap.hasOwnProperty(t)&&this.removeRelatedCommands(t)},u.prototype.getCommand=function(t){var e=this._commandMap[t];if(!e)return null;var n=Object.keys(e);return n.length<1?null:e[n[n.length-1]]}},function(t,e,n){"use strict";t.exports=h;var i=n(3),r=n(29),o=r.Streamer,s=r.Events,a=r.SynchTypes,u=n(25),l=n(12).HLSEvent,c=n(20).StreamTypes,d=n(14);function h(t,e){o.call(this,t,e),this._eventKeys={},this._eventKeys[l.MEDIA_LOADED]=this.__controller.addEventListener(l.MEDIA_LOADED,this._onMediaLoaded,this),this.DEFAULT_STREAM_UPDATE_INTERVAL=8e3,this.MAX_STREAM_UPDATE_INTERVAL=1e4,this.PAST_BUFFER_LENGTH_LIMIT=this._model.config.pastBufferLengthLimit.live,this.LONG_PAUSE_INTERVAL=24e3,this._updateStreamTimer=new u(this.DEFAULT_STREAM_UPDATE_INTERVAL),this._updateStreamTimer.addEventListener(this._loadCurrentStream,this),this._synchPosition=null,this._timestampAtPause=null,this._restartProcessOnSynch=!1,this._pauseTimer=new u(this.LONG_PAUSE_INTERVAL,1),this._pauseTimer.addEventListener(this._onLongPauseInterval,this)}i.inherits(h,o),h.prototype.destroy=function(){this._updateStreamTimer.destroy(),this._pauseTimer.destroy(),this.__controller.removeEventListeners(this._eventKeys),o.prototype.destroy.call(this)},h.prototype.onPlay=function(t){if(this._scheduleStreamUpdate(),this._shouldSynch()){var e=this._timestampAtPause?a.TIME_GAP:a.INIT;this._synch(e),this.process(this._targetPosition),this._timestampAtPause=null}else this._manualStreamChange&&(this._targetPosition=t,this._paused=!1,this.process(this._targetPosition),this._timestampAtPause=null);o.prototype.onPlay.call(this),this._pauseTimer.stop()},h.prototype.onPause=function(){this._timestampAtPause=Date.now(),this._pauseTimer.start(),o.prototype.onPause.call(this)},h.prototype.onSeeking=function(t){this._setEndOfStream(!1),this._restartProcessOnSynch&&(this._closeLoadingSegments(),this.process(t))},h.prototype.onSynchComplete=function(){this._synchPosition=null,this._targetPosition=null,this.type===c.MAIN&&this._model.setLivePlaybackStartTime(null)},h.prototype._shouldSynch=function(){if(!this._timestampAtPause)return!0;var t=this._currentStream,e=t&&t.targetDuration?3*t.targetDuration*1e3:this.LONG_PAUSE_INTERVAL;return Date.now()-this._timestampAtPause>e},h.prototype._synch=function(t){if(this._model.hasEndlist)this._setEndOfStream(!0);else{var e=this._currentStream;if(!e.segments.length||d.isNullOrUndefined(e.endSeqNum)||d.isNullOrUndefined(e.startSeqNum))console.warn("[LiveStreamer][_synch] Synch could not be done as the stream is not ready");else{var n=this._getFirstSegmentSeqNum(),i=e.getSegmentfromSeqNum(n);this._targetPosition=i?i.startTime:null,this._synchPosition=this._targetPosition,e.type===c.MAIN&&this._model.setLivePlaybackStartTime(this._synchPosition),console.log("["+this.constructor.name+"][_synch] target position = "+this._targetPosition);var r=this._model.userAgent;this._restartProcessOnSynch=r&&r.safariDesktop&&t===a.TIME_GAP,this.publish(s.LIVE_SYNCH,this,{synchPosition:this._synchPosition,synchType:t})}}},h.prototype._onLongPauseInterval=function(){},h.prototype._shouldLoadSegment=function(){return!this._endOfLive&&this._state!==this.STATES.LOADING&&!this._paused&&!this._isBufferFull()},h.prototype._updateStream=function(){this.isActive()&&(!this._switching&&this._state!==this.STATES.INITIALIZING||this._loadingStream||(this._loadCurrentStream(),this._scheduleStreamUpdate()))},h.prototype._getFirstSegmentSeqNum=function(){var t=this._currentStream,e=this._model.getLivePlaybackStartTime();return t.type===c.MAIN||d.isNullOrUndefined(e)?Math.max(t.endSeqNum-this.SEGMENT_OFFSET,t.startSeqNum):t.getSeqNumBeforePosition(e)},h.prototype._getFirstNonBufferedSeqNum=function(t){return t},h.prototype.onStreamLoaded=function(t){this._scheduleStreamUpdate(),o.prototype.onStreamLoaded.call(this,t)},h.prototype._onMediaLoaded=function(){this._scheduleStreamUpdate()},h.prototype._scheduleStreamUpdate=function(){var t,e;this._model.hasEndlist?this._updateStreamTimer.destroy():this._currentStream.isDash()&&this.type!==c.MAIN?this._updateStreamTimer.destroy():(t=this._updateStreamTimer.startTime>0?Date.now()-this._updateStreamTimer.startTime:0,this._updateStreamTimer.reset(),e=this._model.getStreamRefreshInterval()||this.DEFAULT_STREAM_UPDATE_INTERVAL,e-=t,e=Math.max(e,100),e=Math.min(e,this.MAX_STREAM_UPDATE_INTERVAL),this._updateStreamTimer.delay=e,this._updateStreamTimer.start())},h.prototype._getStreamLoadOptions=function(){var t={url:this._currentStream.url,withResponseHeaders:this._model.isDash()};return this._paused&&(t.stopStreamLoadOnError=!0,t.maxRetries=1),t},h.prototype.stopStreamUpdate=function(){this._updateStreamTimer.reset()},h.prototype.canSwitch=function(t){return!this._synchPosition&&("mid-segment"!==t||this._state===this.STATES.LOADING)},h.prototype._handleSegmentEnd=function(){var t=this._currentStream;t&&t.endSeqNum===this._seqNum&&this._model.hasEndlist&&this._setEndOfStream(!0)}},function(t,e,n){t.exports=n(288)},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.streamSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/streamSchema",type:"object",properties:{audioMetadata:{type:"object",properties:{autoSelect:{type:"boolean"},bitrate:{type:"number"},channels:{type:"number"},default:{type:"boolean"},forced:{type:"boolean"},samplingRate:{type:"number"}}},cdn:{type:"string"},fairplayCertificatePath:{type:"string"},live:{type:"boolean"},manifest:{type:"string"},mimeType:{type:"string"},rcMode:{type:"string"},type:{type:"string"},url:{type:"string"},videoMetadata:{type:"object",properties:{avgBitrate:{type:"number"},bitrate:{type:"number"},framerate:{type:"number"},height:{type:"number"},profile:{type:"string"},width:{type:"number"}}}},required:["url"]}},function(t,e,n){"use strict";var i=n(132),r=n(134);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=g,e.resolve=function(t,e){return g(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?g(t,!1,!0).resolveObject(e):e},e.format=function(t){r.isString(t)&&(t=g(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),d=["%","/","?",";","#"].concat(c),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n(40);function g(t,e,n){if(t&&r.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if(!r.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",l=t.split(a);l[0]=l[0].replace(/\\/g,"/");var g=t=l.join(a);if(g=g.trim(),!n&&1===t.split("#").length){var E=u.exec(g);if(E)return this.path=g,this.href=g,this.pathname=E[1],E[2]?(this.search=E[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=s.exec(g);if(b){var A=(b=b[0]).toLowerCase();this.protocol=A,g=g.substr(b.length)}if(n||b||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===g.substr(0,2);!S||b&&m[b]||(g=g.substr(2),this.slashes=!0)}if(!m[b]&&(S||b&&!y[b])){for(var T,I,C=-1,R=0;R<h.length;R++){-1!==(P=g.indexOf(h[R]))&&(-1===C||P<C)&&(C=P)}-1!==(I=-1===C?g.lastIndexOf("@"):g.lastIndexOf("@",C))&&(T=g.slice(0,I),g=g.slice(I+1),this.auth=decodeURIComponent(T)),C=-1;for(R=0;R<d.length;R++){var P;-1!==(P=g.indexOf(d[R]))&&(-1===C||P<C)&&(C=P)}-1===C&&(C=g.length),this.host=g.slice(0,C),g=g.slice(C),this.parseHost(),this.hostname=this.hostname||"";var L="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!L)for(var O=this.hostname.split(/\./),w=(R=0,O.length);R<w;R++){var M=O[R];if(M&&!M.match(p)){for(var D="",N=0,k=M.length;N<k;N++)M.charCodeAt(N)>127?D+="x":D+=M[N];if(!D.match(p)){var B=O.slice(0,R),x=O.slice(R+1),U=M.match(f);U&&(B.push(U[1]),x.unshift(U[2])),x.length&&(g="/"+x.join(".")+g),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),L||(this.hostname=i.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,L&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!_[A])for(R=0,w=c.length;R<w;R++){var V=c[R];if(-1!==g.indexOf(V)){var H=encodeURIComponent(V);H===V&&(H=escape(V)),g=g.split(V).join(H)}}var G=g.indexOf("#");-1!==G&&(this.hash=g.substr(G),g=g.slice(0,G));var Y=g.indexOf("?");if(-1!==Y?(this.search=g.substr(Y),this.query=g.substr(Y+1),e&&(this.query=v.parse(this.query)),g=g.slice(0,Y)):e&&(this.search="",this.query={}),g&&(this.pathname=g),y[A]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var K=this.search||"";this.path=j+K}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||y[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(r.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var n=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];n[a]=this[a]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),l=0;l<u.length;l++){var c=u[l];"protocol"!==c&&(n[c]=t[c])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!y[t.protocol]){for(var d=Object.keys(t),h=0;h<d.length;h++){var p=d[h];n[p]=t[p]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||m[t.protocol])n.pathname=t.pathname;else{for(var f=(t.pathname||"").split("/");f.length&&!(t.host=f.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),n.pathname=f.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var _=n.pathname||"",v=n.search||"";n.path=_+v}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),E=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=E||g||n.host&&t.pathname,A=b,S=n.pathname&&n.pathname.split("/")||[],T=(f=t.pathname&&t.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(T&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===f[0]?f[0]=t.host:f.unshift(t.host)),t.host=null),b=b&&(""===f[0]||""===S[0])),E)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,S=f;else if(f.length)S||(S=[]),S.pop(),S=S.concat(f),n.search=t.search,n.query=t.query;else if(!r.isNullOrUndefined(t.search)){if(T)n.hostname=n.host=S.shift(),(L=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=L.shift(),n.host=n.hostname=L.shift());return n.search=t.search,n.query=t.query,r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var I=S.slice(-1)[0],C=(n.host||t.host||S.length>1)&&("."===I||".."===I)||""===I,R=0,P=S.length;P>=0;P--)"."===(I=S[P])?S.splice(P,1):".."===I?(S.splice(P,1),R++):R&&(S.splice(P,1),R--);if(!b&&!A)for(;R--;R)S.unshift("..");!b||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),C&&"/"!==S.join("/").substr(-1)&&S.push("");var L,O=""===S[0]||S[0]&&"/"===S[0].charAt(0);T&&(n.hostname=n.host=O?"":S.length?S.shift():"",(L=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=L.shift(),n.host=n.hostname=L.shift()));return(b=b||n.host&&S.length)&&!O&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),r.isNull(n.pathname)&&r.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){var i=n(55),r=n(31);function o(t,e){this.id=t,this.ref=e}t.exports.SchemaScanResult=o,t.exports.scan=function(t,e){function n(t,e){if(e&&"object"==typeof e)if(e.$ref){var o=i.resolve(t,e.$ref);l[o]=l[o]?l[o]+1:0}else{var c=e.id?i.resolve(t,e.id):t;if(c){if(c.indexOf("#")<0&&(c+="#"),u[c]){if(!r.deepCompareStrict(u[c],e))throw new Error("Schema <"+e+"> already exists with different definition");return u[c]}u[c]=e,"#"==c[c.length-1]&&(u[c.substring(0,c.length-1)]=e)}s(c+"/items",e.items instanceof Array?e.items:[e.items]),s(c+"/extends",e.extends instanceof Array?e.extends:[e.extends]),n(c+"/additionalItems",e.additionalItems),a(c+"/properties",e.properties),n(c+"/additionalProperties",e.additionalProperties),a(c+"/definitions",e.definitions),a(c+"/patternProperties",e.patternProperties),a(c+"/dependencies",e.dependencies),s(c+"/disallow",e.disallow),s(c+"/allOf",e.allOf),s(c+"/anyOf",e.anyOf),s(c+"/oneOf",e.oneOf),n(c+"/not",e.not)}}function s(t,e){if(e instanceof Array)for(var i=0;i<e.length;i++)n(t+"/"+i,e[i])}function a(t,e){if(e&&"object"==typeof e)for(var i in e)n(t+"/"+i,e[i])}var u={},l={};return n(t,e),new o(u,l)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_SEG_INFO_ENTRIES_PER_BEACON=15,e.BEACONS={VIDEO_REQUEST:{evt:"v_request",type:"pb",payloadParams:["prefetch"]},PLAYBACK_RESUMED:{evt:"p_resm",type:"pb"},PLAYBACK_STALLED:{evt:"v_stall",type:"pb",payloadParams:["value"]},BITRATE_CHANGE:{evt:"v_btrt",type:"pb"},PLAYER_INFO:{evt:"info",type:"pb"},ABR_DATA_UPDATE:{evt:"v_abr",type:"pb"},CMS_API_CALLED:{evt:"v_api",type:"pb"},PLAYER_ERROR:{evt:"error",type:"pb"},PLAYER_WARNING:{evt:"warn",type:"pb"},PLAYBACK_START:{evt:"v_start",type:"pb"},PLAYBACK_STREAM_START:{evt:"v_strm_view",type:"pb"},PLAYBACK_PROGRESS:{evt:"v_prog",type:"pb"},PLAYBACK_COMPLETE:{evt:"v_comp",type:"pb"},INCOMPLETE_EXIT:{evt:"v_ncomp",type:"pb"},CTRL_SEEK:{evt:"ui_seek",type:"ctrl",payloadParams:["value_e"],params:[{key:"value",value:"lastKnownPlaybackTime"}]},CTRL_PLAYPAUSE:{evt:"ui_pp",type:"ctrl",payloadParams:["value"],params:[{key:"req_type",value:"requestType"},{key:"req_action",value:"requestAction"}]},CTRL_VOLUME:{evt:"ui_cv",type:"ctrl",payloadParams:["value"],params:[{key:"value_e",value:"volume"}]},CTRL_REPLAY:{evt:"ui_esrpl",type:"ctrl"},CTRL_PLAYREQUEST:{evt:"ui_pb_req",type:"ctrl",payloadParams:["req_type"]},CTRL_SETTINGS:{evt:"ui_stgs",type:"ctrl"},CONTROLS_AUDIO_CHANGE:{evt:"ui_aslng",type:"ctrl",payloadParams:["value","value_e"]},THREE_SIXTY_INTERACT:{evt:"ui_360_interact",type:"ctrl"},THREE_SIXTY_PIE_INTERACT:{evt:"ui_360_pie_interact",type:"ctrl"},AIRPLAY_CONNECTION_STATE_CHANGE:{evt:"ui_airp",type:"ctrl"},UI_INTERACT:{evt:"none",type:"ctrl"},CC_TOGGLE:{evt:"ui_cctog",type:"ctrl"},CC_LANGUAGE_CHANGE:{evt:"ui_cclng",type:"ctrl",payloadParams:["value"]},CC_UPDATE_STYLE:{evt:"ui_ccstl",type:"ctrl",payloadParams:["value"]},CC_SETTINGS:{evt:"ui_ccstg",type:"ctrl"},FULLSCREEN_CHANGE:{evt:"ui_fs",type:"ctrl"}},e.PROGRESS_BEACON_INTERVALS=[{time:3,beacon:e.BEACONS.PLAYBACK_STREAM_START,lastSent:null},{time:10,beacon:e.BEACONS.PLAYBACK_PROGRESS,lastSent:null},{time:30,beacon:e.BEACONS.PLAYBACK_PROGRESS,recurring:!0,lastSent:null}],e.PARAMS=["_V","type","ss","vid","pstaid","prt","cprt","vs","vlng","pver","host","_w","_R","pls","pltype","auto","snd","deos","deom","play_pos","psz","ccav","cdn","smpl","cont","replay","focus","view","expm","bit","drm","drmsys","pl_type","pl_uuid","pl_intr","pl_sec"]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.AD="ad",t.BLACKOUT="blackout",t.BUMPER="bumper"}(e.AdBreakItemType||(e.AdBreakItemType={}))},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){function e(e,n){var i=t.call(this,"Command")||this;return i.cmdName="Command",i.data=e,i.client=n,i}return i(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.data=null},Object.defineProperty(e.prototype,"pluginManager",{set:function(t){this._pluginManager=t},enumerable:!0,configurable:!0}),e}(n(6).default);e.default=r},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.ALWAYS="always",t.TIMEBASED="timebased",t.NEVER="never"}(i=e.SkipOnError||(e.SkipOnError={})),e.defaultConfigs={adPlaybackOnly:!1,analytics:!0,autoplay:!1,casting:!0,continuousPlay:!1,enableRecovery:!0,fullscreen:!1,height:0,lang:"",loop:!1,mute:!1,preload:!0,region:"",site:"",skipOnError:i.NEVER,stopBufferingOnPause:!1,liveUnloadOnPause:!0,ads:{timeout:{load:3,start:10},preferExternalPlayback:!0},ui:{ccOnMute:!1,chromeless:!1,docking:{enableOnMuted:!0,enableOnScrollDown:!1,enableOnScrollUp:!1,fadeInAnimation:!0,height:180,position:{bottom:20,left:-1,right:20,top:-1},showInfoCard:!0,threshold:50,width:320},endScreen:{show:!1},logos:{network:null,provider:null,rating:null},playlist:{inStream:!1,show:!1,position:"hidden",theme:"dark",mimetype:"playlist/simple"},showControls:!0,showFullscreenButton:!0,startScreen:{show:!0,showButton:!0,showDescription:!0,showProvider:!0,showTitle:!0},title:{showOnHover:!0,showOnStart:""}},width:0,iframeRender:!1,pauseLiveVideo:!1,pauseVODVideo:!1}},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(6),o=n(62);!function(t){t.METADATA_AVAILABLE="media-store-metadata-available",t.SOURCE_AVAILABLE="media-store-source-available",t.MEDIA_ITEM_ADDED="media-item-added",t.MEDIA_ITEM_REMOVED="media-item-removed"}(e.MediaStoreEvent||(e.MediaStoreEvent={}));var s=function(t){function e(e,n,i){var r=t.call(this,"MediaStore")||this;return r._items={},r._rendererTypes=e,r._adRendererTypes=n,r._capabilities=i,r}return i(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this)},e.prototype.addItems=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.addItem(i)}},e.prototype.addItem=function(t){o.default.normalizeKey(t);var e=o.default.createKey(t.id,t.mimetype);if(this._items[e])return e;var n=new o.default(t,this._rendererTypes,this._adRendererTypes,this._capabilities);return this._items[n.key]=n,n.key},e.prototype.updateItem=function(t){if(!t||!t.id||!t.mimetype)return null;var e=o.default.createKey(t.id,t.mimetype),n=this._items[e];return n?n.build(t,this._rendererTypes,this._adRendererTypes,this._capabilities):(n=new o.default(t,this._rendererTypes,this._adRendererTypes,this._capabilities)).updateVideoSession(),this._items[n.key]=n,n},e.prototype.updateItemState=function(t,e){if(t){var n=this.getByData(t);n&&n.state!==e&&n.setState(e)}},e.prototype.updateItemSourceState=function(t,e){if(t){var n=this.getByData(t);n&&n.sourceState!==e&&n.setSourceState(e)}},e.prototype.get=function(t){return t&&this._items[t]||null},e.prototype.getById=function(t){if(!t)return null;for(var e in this._items)if(0===e.indexOf(t))return this._items[e];return null},e.prototype.getByData=function(t){if(!t)return null;var e=o.default.createKey(t.id,t.mimetype);return this._items[e]||null},e.prototype.getBySessionId=function(t){if(!t)return null;for(var e=0,n=Object.keys(this._items);e<n.length;e++){var i=n[e],r=this._items[i];if(r&&r.videoSession===t)return r}return null},e}(r.default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),r=n(48),o=n(4),s=n(0),a=n(158),u=n(26),l=n(15),c=n(77),d=n(86),h=n(87),p=n(54),f=n(78),_=n(39).Validator,m={id:"",mimetype:l.MediaItemMimeType.UPLYNK,metadata:{description:"",duration:0,title:"",thumbnail:"",type:l.MediaItemType.VOD,videoTypes:[]},source:{},customConfig:null,adConfig:null},y=function(){function t(t,e,n,i){this.state=l.ItemState.NO_DATA,this.sourceState=l.SourceState.NO_DATA,this.recoveryStatus=l.ItemRecoveryStatus.NOT_RECOVERING,this.tryCount=1,this.failoverCount=0,this.isCCAvailable=!1,this.languages=[],this.altStreams=[],this.streamProfiles=[],this.blockAutoplay=!1,this.adBreaks=[],this._position=0,this._streams=[],this.build(t,e,n,i)}return t.createKey=function(t,e){return t+"#"+e},t.normalizeKey=function(t){t.id||(t.id=s.default.generateGuid()),t.mimetype||(t.mimetype=l.MediaItemMimeType.CONTAINER)},Object.defineProperty(t.prototype,"key",{get:function(){return this._key},enumerable:!0,configurable:!0}),t.prototype.getPlayableItemType=function(){return c.PlayableItemType.MEDIA_ITEM},t.prototype.getDuration=function(){return this.duration},t.prototype.setDuration=function(t){this.duration=t},t.prototype.isRecovering=function(){return this.recoveryStatus===l.ItemRecoveryStatus.RECOVERING},t.prototype.build=function(t,e,n,i){t&&(this._adRendererTypes=n,this._capabilities=i,this._rawItemData=s.default.deepCopy(t),this._configure(t),t.source&&t.source.streams&&this._buildStreams(t.source.streams,e,i),t.adBreaks&&this._buildAdBreaks(t.adBreaks,n,i))},t.prototype.setState=function(t){this.state=t},t.prototype.setSourceState=function(t){this.sourceState=t},t.prototype.hasSource=function(){return this.sourceState===l.SourceState.HAS_DATA},t.prototype.hasNoMetadata=function(){return this.state===l.ItemState.NO_DATA},t.prototype.hasExpiredMetadata=function(){return!1},t.prototype.hasNativeAd=function(){return!!this.isContainer()&&!(!this.adBreaks||!this.adBreaks.length||this.adBreaks[0].type!==u.AdBreakType.NATIVE)},t.prototype.isContainer=function(){return this.metadata&&this.metadata.type===l.MediaItemType.CONTAINER},t.prototype.equals=function(t){return!!t&&this.key===t.key},Object.defineProperty(t.prototype,"rawItemData",{get:function(){return this._rawItemData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this.metadata?this.metadata.description:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this.metadata&&o.isNumber(this.metadata.duration)?this.metadata.duration:NaN},set:function(t){this.metadata&&(this.metadata.duration=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.metadata?this.metadata.title:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbnail",{get:function(){return this.metadata?this.metadata.thumbnail:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){this._position=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"samplingId",{get:function(){return this._samplingId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streams",{get:function(){return this._streams},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visualSeekData",{get:function(){return this._visualSeekData},set:function(t){this._visualSeekData=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"brandingData",{get:function(){return this._brandingData},set:function(t){this._brandingData=t},enumerable:!0,configurable:!0}),t.prototype.updateAdBreak=function(t,e,n){var i=this,r=null;return this.adBreaks.forEach(function(o,s){t.adBreakId===o.adBreakId&&(r=new a.default(i,t,e,n),i.adBreaks[s]=r)}),r},t.prototype.removeAdBreaks=function(t){var e=this;if(Array.isArray(t)){t.forEach(function(t){var n=function(t){var n;return e.adBreaks.some(function(e,i){return e.adBreakId===t?(n=i,!0):(n=-1,!1)}),n}(t.adBreakId);-1!==n&&e.adBreaks.splice(n,1)})}},t.prototype.addAdBreaks=function(t){var e=this;if(Array.isArray(t)){t.forEach(function(t){if(!function(t){return e.adBreaks.some(function(e){return e.adBreakId===t})}(t.adBreakId)){var n=new a.default(e,t,e._adRendererTypes,e._capabilities);e.adBreaks.push(n)}})}},t.prototype.getRecoveryStatusForBeacon=function(){var t=this.recoveryStatus===l.ItemRecoveryStatus.RECOVERED;return t&&(this.recoveryStatus=l.ItemRecoveryStatus.NOT_RECOVERING),t},t.prototype.fetchFinished=function(){return this.state===l.ItemState.HAS_DATA||this.state===l.ItemState.ERROR},t.prototype.hasError=function(){return this.state===l.ItemState.ERROR},t.prototype.isLongForm=function(){return!(!this.metadata||!this.metadata.duration)&&this.metadata.duration>600},t.prototype.restartIfNeeded=function(){this.position+10>this.duration&&(this.position=0)},t.prototype.hasStreams=function(){return 0!==this._streams.length},t.prototype.hasMetadata=function(){return this.state===l.ItemState.HAS_DATA},t.prototype.getCDN=function(){return this._streams.length>0?this._streams[0].cdn:null},t.prototype.isLive=function(){return!!this.hasLiveStreams()},t.prototype.hasLiveStreams=function(){for(var t=0,e=this._streams;t<e.length;t++){if(e[t].live)return!0}return!1},t.prototype.hasLiveStateForVod=function(){return!1},t.prototype.is360Video=function(){var t=this.metadata?this.metadata.videoTypes:null;return!(!t||!t.length)&&-1!==t.indexOf(i.VIDEO_TYPE.THREE_SIXTY)},t.prototype.hasThumbnail=function(){var t=this.metadata&&this.metadata.thumbnail;return void 0!==t&&t.length>0},t.prototype.generateVSid=function(){for(var t=[],e="abcdefghijklmnopqrstuvwxyz123456789",n=0;n<8;n++)t.push(e.charAt(Math.floor(Math.random()*e.length)));return t.join("")},t.prototype.generateSamplingId=function(){return Math.floor(10*Math.random())},t.prototype.getType=function(){return this.hasStreams()?this._streams[0].getType():"none"},t.prototype.getStreamProtocol=function(){return this.hasStreams()?this._streams[0].streamProtocol:"none"},t.prototype.getSubtitleStreams=function(){return this.altStreams.filter(function(t){return"SUBTITLES"===t.type})},t.prototype.mayUpdateVideoSession=function(){this._isNewVideoSession||this._initNewVideoSession()},t.prototype.useVideoSession=function(){this._isNewVideoSession=!1},t.prototype.setCCAvailability=function(t){o.isBoolean(t)&&(this.isCCAvailable=t)},t.prototype.setMultiLanguages=function(t){this.languages=t},t.prototype.getMultiLanguages=function(){return this.languages},t.prototype.setCurrLanguage=function(t){if(this.languages&&this.languages.length)for(var e=0,n=this.languages;e<n.length;e++){var i=n[e];i.name===t?(this._currentLang=i,i.selected=!0):i.selected=!1}},t.prototype.getCurrLanguage=function(){return this._currentLang},t.prototype.getCurrentAudioLanguage=function(){if(!this.isMultiAudioAvailable())return null;var t=this.languages||[];return(t=t.filter(function(t){return!!t.selected})).length?t[0].name:null},t.prototype.isMultiAudioAvailable=function(){return Array.isArray(this.languages)&&this.languages.length>=2},t.prototype.updateVideoSession=function(){this.videoSession=this.generateVSid(),this._isNewVideoSession=!0,this._samplingId=this.generateSamplingId()},t.prototype.getStreamType=function(){return this.metadata&&this.metadata.type||l.MediaItemType.VOD},t.prototype.getAspectRatio=function(){return this._streams.length>0?this._streams[0].aspectRatio:null},t.prototype._buildAdBreaks=function(t,e,n){var i=this;this.adBreaks=t.map(function(t){return new a.default(i,t,e,n)})},t.prototype._configure=function(e){this._validateConfig(e);var n=s.default.deepCopy(e);n=s.default.mergeObjects(n,m),s.default.mergeObjects(this,n,!0),this._key=t.createKey(this.id,this.mimetype)},t.prototype._validateConfig=function(t){try{var e=new _;e.addSchema(p.streamSchema,"/streamSchema"),e.addSchema(h.sourceSchema,"/sourceSchema"),e.validate(t,d.mediaItemSchema,{throwError:!0})}catch(t){var n="Invalid media item config: "+t.property+" "+t.message;throw console.error(n),new Error(n)}},t.prototype._buildStreams=function(t,e,n){var i=this;if(t&&t.length){this._streams=[];for(var o=t.map(function(t){return t.hasOwnProperty("live")||(t.live=i.metadata&&(i.metadata.type===l.MediaItemType.LIVE_CHANNEL||i.metadata.type===l.MediaItemType.LIVE_EVENT)),new f.default(t)}),s=0,a=e;s<a.length;s++){var u=a[s],c=n[u];if(!(this.is360Video()&&!c.is360Renderer||!this.is360Video()&&c.is360Renderer)){var d=r.default.findAcceptedStreams(o,c);if(0!==d.length){this.rendererType=u,this._streams=d;break}}}this._streams.length>0&&this._streams.sort(function(t,e){return t.videoMetadata.bitrate-e.videoMetadata.bitrate})}},t.prototype._initNewVideoSession=function(){this.updateVideoSession(),this._resetSourceState()},t.prototype._resetSourceState=function(){this.setSourceState(l.SourceState.NO_DATA)},t}();e.default=y},function(t,e,n){"use strict";t.exports=u;var i=n(163),r=n(166),o=n(14),s=n(21),a=n(34);function u(t,e){this._properties=t,this._callback=e,this._tsDemux=t.noDemux?null:new i(t.demux,this.processSegmentData.bind(this)),this._mp4Generator=new r,this.DEFAULT_WIDTH=640,this.DEFAULT_HEIGHT=360,this.GAP_EPSILON=100,this._startOffsetTimestamp=this._properties.startOffsetTimestamp,this._lastAudioTimestamp=this._properties.lastAudioTimestamp,this._lastAudioFrameDuration=this._properties.lastAudioFrameDuration,this._isAltAudioActive=this._properties.isAltAudioActive,this._prevSegEndTimeStamps=this._properties.prevSegEndTimeStamps;var n=this._properties.mp4State;this._shouldInit={audio:!n||!n.audio||n.audio.shouldInit,video:!n||!n.video||n.video.shouldInit},this._discontinuityOffsets={audio:0,video:0},this._extractedStartTime={audio:{dts:NaN,pts:NaN},video:{dts:NaN,pts:NaN}}}u.prototype.destroy=function(){this._tsDemux&&(this._tsDemux.destroy(),this._tsDemux=null),this._mp4Generator.destroy()},u.prototype.close=function(){this._tsDemux&&this._tsDemux.destroy()},u.prototype.append=function(t){this._tsDemux&&this._tsDemux.append(t)},u.prototype.endOfSegment=function(){this._tsDemux&&this._tsDemux.endOfSegment()},u.prototype.processSegmentData=function(t){if(t&&!t.error){var e,n=t.avData,i=t.pos,r=t.timedMetadata,o=this._properties.startTime,u=this._properties.timescale;if(n){var l=this._properties.pcr;(null===l||void 0===l||isNaN(l))&&(this._properties.pcr=l=n.pcr-o*u);var c=[],d=n.audio,h=n.video,p=null,f=0,_=[];if(d&&d.frames&&d.frames.length&&!this._isAltAudioActive&&(d.type="audio",d.config.timescale=u,d.config.duration=this._properties.duration*d.config.timescale,d.config.useEditBox=this._properties.useEditBox,this._computeDiscontinuityOffset("audio",d.frames[0],l,o,u),f=l+this._discontinuityOffsets.audio,d.frames.forEach(function(t){t.dts-=f,t.pts-=f}),d.startTime=d.frames[0].dts,d.endTime=d.frames[d.frames.length-1].dts,c.push(d)),h&&h.frames&&h.frames.length){h.type="video",h.config.timescale=u,h.config.duration=this._properties.duration*h.config.timescale,h.config.width=this._properties.width||this.DEFAULT_WIDTH,h.config.height=this._properties.height||this.DEFAULT_HEIGHT,h.config.useEditBox=this._properties.useEditBox,this._computeDiscontinuityOffset("video",h.frames[0],l,o,u),f=l+this._discontinuityOffsets.video,h.frames.forEach(function(t){t.dts-=f,t.pts-=f}),h.startTime=h.frames[0].dts,h.endTime=h.frames[h.frames.length-1].dts,p=h.frames[0].pts,c.push(h);for(var m=0;m<h.frames.length;m++)for(var y=0;y<h.frames[m].cea608Data.length;y++){var v=h.frames[m].cea608Data[y];v.pts=h.frames[m].pts,v.dts=h.frames[m].dts,v.timescale=h.config.timescale,_.push(v)}}e=new a({type:s.MessageTypes.MESSAGE,id:s.MessageIds.APPEND_SRC_BUFFER});var g={};g.position=this.position=i,g.pcr=l,"number"!=typeof this._startOffsetTimestamp&&"number"==typeof p&&(this._startOffsetTimestamp=p),g.startOffsetTimestamp=this._startOffsetTimestamp;var E=this._convertToMp4(c);g.lastAudioTimestamp=this._lastAudioTimestamp,g.lastAudioFrameDuration=this._lastAudioFrameDuration,e.putParam("parsedInfo",g);var b=[];E&&E.tracks&&(e.putParam("tracks",E.tracks),E.tracks.forEach(function(t){b.push(t.data.buffer)}),_&&_.length>0&&e.putParam("cea608TrackData",_),e.putParam("transferables",b))}else{if(!r)return;r.timestamp=(r.pts-this._properties.pcr)/u,delete r.pts,(e=new a({type:s.MessageTypes.MESSAGE,id:s.MessageIds.TIMED_METADATA})).putParam("timedMetadata",r)}this._callback&&this._callback(e)}},u.prototype._computeDiscontinuityOffset=function(t,e,n,i,r){var o=this._properties.discontinuity,s=this._extractedStartTime[t];isNaN(s.dts)&&isNaN(s.pts)&&(this._extractedStartTime[t]={dts:e.dts-n,pts:e.pts-n});var a=this._discontinuityOffsets[t];if(o&&!(a>0)){var u=this._prevSegEndTimeStamps?this._prevSegEndTimeStamps[t]:NaN;i=isNaN(u)?i*r:u,this._discontinuityOffsets[t]=this._extractedStartTime[t].dts-i}},u.prototype._convertToMp4=function(t){var e=this;if(t&&t.length){var n={tracks:[]};return t.forEach(function(t){if(t){t.config.offset=e._properties.live?0:e._startOffsetTimestamp;var i=e._properties.mp4State,r=e._shouldInit[t.type];t.config.shouldInit=o.isNullOrUndefined(r)?"start"===e.position:r,t.config.seqNum=i[t.type]?i[t.type].seqNum++:0,"video"===t.type?t.config.defaultFrameDuration=e._properties.timescale/e._properties.frameRate:"audio"===t.type&&(t.config.defaultFrameDuration=Math.ceil(1024*e._properties.timescale/t.config.samplingFreq),e._closeGapsInBuffer(t.frames,t.config.defaultFrameDuration)),e._shouldInit[t.type]=!1,e._properties.onlyMetadata&&(t.frames=[]);var s=e._mp4Generator.generate(t);s.onlyMetadata=e._properties.onlyMetadata,n.tracks.push(s)}}),n}},u.prototype._closeGapsInBuffer=function(t,e){if(t&&t.length){var n=t[t.length-1].dts,i=t[0].dts;if(o.isNumber(this._lastAudioTimestamp)&&!isNaN(this._lastAudioTimestamp)){var r=i-this._lastAudioTimestamp,s=Math.ceil(2*this._lastAudioFrameDuration)-this.GAP_EPSILON,a=Math.ceil(6*this._lastAudioFrameDuration);if(r>s)console.warn("A gap of more than one frame is detected =",r);else if(r<this._lastAudioFrameDuration-this.GAP_EPSILON){console.warn("An overlap between 2 frames is detected =",r);var u=this._lastAudioTimestamp+this._lastAudioFrameDuration;u-i>e&&(u=i+e-1,console.warn("fix is bigger than current frame duration, move it only by ",e-1,"instead of ",this._lastAudioFrameDuration)),t[0].pts=u,t[0].dts=t[0].pts}if(r>s&&r<a){for(var l=Math.floor(r/e),c=0;c<l;c++){var d=t[0].dts;t.unshift(o.deepCopy(t[0])),t[0].dts=d-e,t[0].pts=t[0].dts}console.warn("Added ",l," new frames in the gap")}}this._lastAudioTimestamp=n,this._lastAudioFrameDuration=e}}},function(t,e,n){"use strict";t.exports.AACStream=l,t.exports.AVCStream=c;var i=n(89),r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],o=["Null","Main","LC","SSR","LTP"],s=9e4,a=.033,u=t.exports.NAL_UNIT_TYPES={NON_IDR:1,IDR:5,AD_INFO_SEI:6,SPS:7,PPS:8,AUD:9};function l(t){this._frames=[],this._demuxConfig=t||{},this._config={},this.ready=!1,this._defaultFrameDuration=0}function c(t){this._frames=[],this._demuxConfig=t||{},this._config={},this._keyFrameIndex=0,this.ready=!1,this._keyFrameCount=0,this._defaultFrameDuration=a*s,this._seiParser=new i}l.prototype.destroy=function(){this._frames=[]},l.prototype.readFrames=function(t){t&&t.packetInfo&&this.readFramesFromBitstream(t.packetInfo.streamData,t.packetInfo.pts)},l.prototype.readFramesFromBitstream=function(t,e){if(!t||t.length<6)return 0;for(var n=0,i=0,r=0;n<t.length;){var o=0,s=(t[n++]<<8)+t[n++],a=1&s;if(65520==(65520&s)&&0===(6&s)){this._parseConfig(t.subarray(n,n+2)),this._config.codec="mp4a.40.2",n++;var u=(t[n++]<<16)+(t[n++]<<8)+t[n++];for(u=(262112&u)>>>5,i=1+(3&t[n++]),a?u-=7:(u-=9,n+=2);o<i&&n<t.length;){var l=e+r*this._defaultFrameDuration;this._frames.push({data:t.subarray(n,n+u),dts:l,pts:l,keyframe:!1,flags:{isLeading:!1,dependsOn:!0,isDependedOn:!1,hasRedundancy:!1,paddingValue:!1,isNonSyncSample:!1,degradationPriority:1}}),n+=u,o++,r++}}else n--}return this.ready=this._checkReadiness(),n},l.prototype._parseConfig=function(t){if(t&&!(t.length<2)){var e=1+((192&t[0])>>>6);e=e>4?4:e,this._config.audioObjectTypeIndex=e,this._config.audioObjectType=o[e],e=(e=(60&t[0])>>>2)<13?e:0,this._config.samplingFreqIndex=e,this._config.samplingFreq=r[e],this._config.channels=(1&t[0])<<2|(192&t[1])>>>6,this._config.sampleSize=16,this._defaultFrameDuration=1024*s/this._config.samplingFreq}},l.prototype._checkReadiness=function(){var t=this._frames.length;return(t>0?this._frames[t-1].pts-this._frames[0].pts+this._defaultFrameDuration:0)>=.1*s},l.prototype.getFrames=function(){return this.ready=!1,this._frames.splice(0,this._frames.length)},l.prototype.getConfig=function(){return this._config},l.prototype.getLastFrameDetails=function(){return this._frames.length?{timestamp:this._frames[this._frames.length-1].dts,duration:this._defaultFrameDuration}:null},c.prototype.destroy=function(){this._frames=[],this._seiParser.destroy()},c.prototype.readFrames=function(t){if(t&&t.packetInfo){var e=t.packetInfo.streamData;if(e&&!(e.length<4)){for(var n,i,r=0,o=0,s=0,a=r,l={nalUnits:[],nalUnitSize:0,dts:t.packetInfo.dts,pts:t.packetInfo.pts,keyframe:!1,data:e,cea608Data:[],flags:{isLeading:0,dependsOn:0,isDependedOn:0,hasRedundancy:0,paddingValue:0,isNonSyncSample:!1,degradationPriority:0}},c=4294967295,d=!1;r<e.length;){if(i=NaN,1===(c=c<<8|e[r++])&&(i=4),1===(16777215&c)){if(!d&&r>i&&this._frames&&this._frames.length){var h=this._frames[this._frames.length-1],p=h.nalUnits,f=p[p.length-1];if(f){var _,m=r-i;h.nalUnitSize+=m,f.data?((_=new Uint8Array(f.data.byteLength+m)).set(f.data,0),_.set(e.subarray(0,m),f.data.byteLength)):(_=new Uint8Array(m)).set(e.subarray(0,m),0),f.data=_,(_=new Uint8Array(h.data.byteLength+m)).set(h.data,0),_.set(e.subarray(0,m),h.data.byteLength),h.data=_}}if(d=!0,c=4294967295,i=i||3,(o=l.nalUnits.length)>=1&&null===l.nalUnits[o-1].data)switch(s=r-a-i,n=e.subarray(a,a+s),l.nalUnitSize+=s,l.nalUnits[o-1].data=n,l.nalUnits[o-1].type){case u.SPS:this._config.profileIndication=n[1],this._config.profileCompatibility=n[2],this._config.levelIndication=n[3],this._config.numOfSPS=1,this._config.spsLength=n.length,this._config.sps=n;break;case u.PPS:this._config.numOfPPS=1,this._config.ppsLength=n.length,this._config.pps=n}a=r,s=0;var y=31&e[r++];if(y<u.AUD&&l.nalUnits.push({data:null,type:y}),y===u.IDR)this._keyFrameIndex=this._frames.length,l.keyframe=!0,l.flags.dependsOn=2,this._keyFrameCount++;else if(y===u.NON_IDR)l.keyframe=!1,l.flags.dependsOn=1,l.flags.isNonSyncSample=!0;else if(y===u.AD_INFO_SEI)for(var v=this._seiParser.parse(e,r),g=0;g<v.length;g++)l.cea608Data.push(v[g])}}(o=l.nalUnits.length)>=1&&null===l.nalUnits[o-1].data&&a<e.length&&(s=r-a,l.nalUnits[o-1].data=e.subarray(a,a+s),l.nalUnitSize+=s),this._config.codec=this._getVideoCodecType(this._config),l.nalUnitSize>0&&this._frames.push(l),this.ready=this._checkReadiness()}}},c.prototype._checkReadiness=function(){var t=this._frames.length,e=t>0?this._frames[t-1].pts-this._frames[0].pts+this._defaultFrameDuration:0,n=.1*s;return this._demuxConfig.startChunkWithKeyFrame?this._keyFrameCount>=2:t>1&&e>=n},c.prototype.getFrames=function(t){var e=this._demuxConfig.startChunkWithKeyFrame&&t&&t.keyFrameBoundary,n=t.keyFrameBoundary?this._frames.length-1:this._frames.length;e&&(n=this._keyFrameIndex,this._keyFrameCount=1,this.ready=!1);var i=this._frames.splice(0,n);return this._keyFrameIndex=0,i},c.prototype.getConfig=function(){return this._config},c.prototype._getVideoCodecType=function(t){var e=t&&t.profileIndication||66;return"avc1."+((e=Math.max(e,66))<<16|(t&&t.profileCompatibility||0)<<8|(t&&t.levelIndication||10)).toString(16)}},function(t,e,n){"use strict";t.exports.Fmp4Streamer=d,t.exports.Fmp4LiveStreamer=h;var i=n(3),r=n(51),o=n(29).Streamer,s=n(10).CmdNames,a=n(20).StreamTypes,u=n(21),l=n(17).StreamingMode,c=n(14);function d(t,e){o.call(this,t,e),this._super=this.constructor.super_.prototype,this._currentPeriod=null,this._init(t)}function h(t,e){r.call(this,t,e),this._super=this.constructor.super_.prototype,this._currentPeriod=null,this._init(t),this.SEGMENT_OFFSET=7}i.inherits(d,o),i.inherits(h,r),d.prototype.destroy=function(){o.prototype.destroy.call(this)},h.prototype.destroy=function(){r.prototype.destroy.call(this)},h.prototype._init=d.prototype._init=function(t){this._setCodecType(t);var e=[{type:this._trackType,mimeType:this._trackType+'/mp4; codecs="'+this._codec+'"',minBufferTime:this.__controller.getMinimumBufferTime()}];this.__controller.sendMessage(u.MessageIds.CREATE_SRC_BUFFER,[e],["tracks"])},h.prototype._setCodecType=d.prototype._setCodecType=function(t){t.type===a.AUDIO?(this._codec=this._model.userAgent.android?"mp4a.40.2":t.audioCodec||"mp4a.40.2",this._trackType="audio"):(this._codec=t.videoCodec||"avc1.640021",this._trackType="video")},h.prototype.setCurrentStream=d.prototype.setCurrentStream=function(t){t&&this._currentStream&&!t.equals(this._currentStream)&&(this._currentStream=t,console.log("["+this.constructor.name+"]["+t.type+"][setCurrentStream] index = "+t.index+" groupId = "+t.groupId),this._state===this.STATES.LOADING&&this.abortCurrentSegment(this._currSegLoadCmd),this.isStreamReady()||(this._state=this.STATES.NONE))},h.prototype._loadInitSegment=d.prototype._loadInitSegment=function(t,e,n,i){var r=this._currentStream;this._commandManager.removeRelatedCommands(s.CMD_MP4_INIT_SEGMENT_LOAD);var o={stream:r,segment:e,initSegment:t,comboLoad:n,cached:i};this._commandManager.executeCommand(s.CMD_MP4_INIT_SEGMENT_LOAD,o,this)},h.prototype._initializeStream=d.prototype._initializeStream=function(t){if(!(this._state>=this.STATES.INITIALIZING)){var e=c.isNullOrUndefined(t)?this._getNextSeqNum(this._targetPosition):t,n=this._currentStream,i=e===n.startSeqNum,r=n.getSegmentfromSeqNum(e);if(r){var o=n.getInitSegment(r),s=!c.isNullOrUndefined(o);s||(o=n.addInitSegment(r.initSegment));var a=n.streamingMode===l.HLS&&!c.isNullOrUndefined(n.mp4Chunks.first);a&&(r=i?r:null),this._state=this.STATES.INITIALIZING,r&&r.periodId!==this._currentPeriod&&this._onPeriodChange(r.periodId),this._addDrmItem(r?r.periodId:null),this._loadInitSegment(o,r,a,s)}}},h.prototype.onMp4InitSegmentLoadProgress=d.prototype.onMp4InitSegmentLoadProgress=function(t,e){var n=this._currentStream;if(e&&n){var i=t.getSegment();if(e.comboLoad&&i&&"firstByte"===e.position)this.onSegmentLoadProgress(t,e);else{var r=e.chunk,o=e.stream;if(r&&o){var s=o.getInitSegment(i);switch(r.name){case"init":o.setMp4Timescale(s);break;case"sidx":var a=r.data;a&&o.updateSegmentRanges(this._services.mp4BoxParser.parse(a,"sidx",o.sidxOffset));break;case"first":return void this.onSegmentLoadProgress(t,e)}n.equals(o)&&o.isReady()&&(this._sendInitSegment(s),this._state=this.STATES.INITIALIZED,e.comboLoad&&i&&(this._seqNum=i.seqNum,this._state=this.STATES.LOADING))}}}},h.prototype.onMp4InitSegmentLoadComplete=d.prototype.onMp4InitSegmentLoadComplete=function(t,e){if(e){var n=t.getSegment();e.comboLoad&&n?this.onSegmentLoadComplete(t):(this._state<this.STATES.INITIALIZED&&this._currentStream.equals(e.stream)&&(this._state=this.STATES.INITIALIZED),this._commandManager.removeCommand(t))}},h.prototype.onMp4InitSegmentLoadError=d.prototype.onMp4InitSegmentLoadError=function(t,e){console.warn("["+this.constructor.name+"] onMp4InitSegmentLoadError: "+e),this._commandManager.removeCommand(t)},h.prototype.onSegmentLoadProgress=d.prototype.onSegmentLoadProgress=function(t,e){var n=this._currentStream;if(e&&n){var i=e.stream;if(!i||n.equals(i)){if("firstByte"!==e.position){var r={data:new Uint8Array(e.data),codec:this._codec,type:this._trackType,minBufferTime:this.__controller.getMinimumBufferTime(),frames:e.samples,startTime:n.timescale>0?e.baseTime/n.timescale:NaN,endTime:n.timescale>0?(e.baseTime+e.totalDuration)/n.timescale:NaN};this._sendToBuffer([r])}o.prototype.onSegmentLoadProgress.call(this,t,e)}}},h.prototype._onPeriodChange=d.prototype._onPeriodChange=function(t){if(this._currentPeriod!==t){this._currentPeriod=t;var e=this._currentStream;console.log("["+this.constructor.name+"]["+e.type+"] loading period: "+t),"MAIN"!==this.type&&"AUDIO"!==this.type||this._printCurrentRays(t,e),this._addDrmItem(t)}},h.prototype._printCurrentRays=d.prototype._printCurrentRays=function(t,e){for(var n=this._model.streams,i="[debug]["+this.type+"] Period changes to "+t+" with rays: [",r=0;r<n.length;r++)i+=n[r].groupId;i+="] currentStream = "+e.groupId,console.log(i)},h.prototype._addDrmItem=d.prototype._addDrmItem=function(t){var e=this,n=e._currentStream;n&&n.drmInfo&&!c.isNullOrUndefined(t)&&n.drmInfo.forEach(function(n){n.periodId===t&&e.__controller.sendMessage(u.MessageIds.DRM_LICENSE_INFO,[n],["drmItem"])})},h.prototype._sendInitSegment=d.prototype._sendInitSegment=function(t){var e=this._currentStream;if(t){var n=t.data;if(n){var i={data:new Uint8Array(n.buffer),codec:this._codec,type:this._trackType,minBufferTime:this.__controller.getMinimumBufferTime(),onlyMetadata:!0};this._sendToBuffer([i]),e.activeInitSegment=t;var r=e?e.getMp4Chunk("sidx"):null;if(r){var o=r.data;o&&(i.data=new Uint8Array(o.buffer),this._sendToBuffer([i]))}}else console.warn("["+this.constructor.name+"][_sendInitSegment] NO INIT SEGMENT DATA")}else console.warn("["+this.constructor.name+"][_sendInitSegment] NO INIT SEGMENT")},h.prototype._printLoadMessage=d.prototype._printLoadMessage=function(t,e){console.log("["+this.constructor.name+"]["+e.type+"] Loading segment: seq num = "+t.seqNum+", index = "+e.index+", bitrate = "+e.bitrate+", range = ["+e.startSeqNum+", "+e.endSeqNum+"], buffer = "+this._model.bufferLength)},h.prototype._beforeLoadSegment=d.prototype._beforeLoadSegment=function(t){var e=this._currentStream.getSegmentfromSeqNum(t);e&&e.periodId!==this._currentPeriod&&this._onPeriodChange(e.periodId),this._state=this.STATES.NONE,this._segAborted=!0,this._seqNum=t,this._initializeStream(t)},d.prototype.onSynchBegin=function(){this.processOnlyMetadata=!0},h.prototype._synch=function(t){this.lastAudioTimestamp=NaN,this._super._synch.call(this,t)}},function(t,e,n){"use strict";t.exports={userAgent:n(102),capabilities:n(209)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(22),o=n(19),s=n(0),a=function(){function t(){}return t.hasFirstPlaybackStartHappened=function(t){return!0===t.__hasPlayedVideo},t.onceFirstPlaybackStarts=function(e,n){o.default.hasMuteAtFirstPlayRestriction&&(n="function"==typeof n?n:void 0,t.hasFirstPlaybackStartHappened(e)?n&&n():(e.__firstPlaybackStartCb&&(e.__firstPlaybackStartCb=null,delete e.__firstPlaybackStartCb),n&&(e.__firstPlaybackStartCb=n)))},t.waitForValidUserGestureEvent=function(t){if("function"!=typeof t)return s.default.noop;var e,n=["keydown","mousedown"];i.userAgent.mobile&&(o.default.autoplayByUIEvtOnly?n.push("touchend"):(n.push("tap"),e=new r.default(window)));var a=function(){u&&u(),t()},u=function(){e&&e.destroy(),n&&n.forEach(function(t){a&&window.removeEventListener(t,a,!0)}),n=e=a=u=null};return n.forEach(function(t){a&&window.addEventListener(t,a,!0)}),u},t.isUnmuteRestrictionRemoved=function(t){return!!t&&("boolean"!=typeof t.__userTouchRestrictionRemoved||t.__userTouchRestrictionRemoved)},t.removeUnmuteRestriction=function(e){if(e&&!t.isUnmuteRestrictionRemoved(e)){var n=e.muted;e.muted=!1,e.__userTouchRestrictionRemoved=!0,e.setAttribute("data-restricted","false"),e.muted!==n&&(e.muted=n)}},t.removeTouchToPlayRestriction=function(e){e&&o.default.autoplayByUIEvtOnly&&!t.isTouchToPlayRestrictionRemoved(e)&&(e.load(),e.__userTouchToPlayRestrictionRemoved=!0)},t.isTouchToPlayRestrictionRemoved=function(t){return!!t&&(!o.default.autoplayByUIEvtOnly||!!t.__userTouchToPlayRestrictionRemoved)},t.setupTouchToPlayRestrictionRemoval=function(e,n){return!o.default.autoplayByUIEvtOnly||t.isTouchToPlayRestrictionRemoved(e)?(n(),s.default.noop):t.waitForValidUserGestureEvent(function(){t.removeTouchToPlayRestriction(e),n()})},t.createMobileVideoNode=function(){var t=s.default.createVideoNode();return i.userAgent.mobile&&o.default.autoplaySupported?(t.controlsList&&"function"==typeof t.controlsList.add&&t.controlsList.add("nodownload"),o.default.canPlayInline&&t.setAttribute("playsinline","true"),t.muted=!0,t.__userTouchRestrictionRemoved=!1,t.setAttribute("data-restricted","true"),o.default.autoplayByUIEvtOnly&&(t.__userTouchToPlayRestrictionRemoved=!1),o.default.hasMuteAtFirstPlayRestriction&&(t.__onPlaying=function(){t.__hasPlayedVideo=!0,t.__firstPlaybackStartCb&&(t.__firstPlaybackStartCb(),delete t.__firstPlaybackStartCb),t.__onPlaying&&(t.removeEventListener("playing",t.__onPlaying),delete t.__onPlaying)},t.__hasPlayedVideo=!1,t.addEventListener("playing",t.__onPlaying)),t):t},t.setMuteSafe=function(e,n){e.muted!==n&&t.isUnmuteRestrictionRemoved(e)&&(o.default.hasMuteAtFirstPlayRestriction&&!t.hasFirstPlaybackStartHappened(e)?t.onceFirstPlaybackStarts(e,function(){e.muted=n}):e.muted=n)},t.cleanupVideoNode=function(t){t.__firstPlaybackStartCb&&(t.__firstPlaybackStartCb=null,delete t.__firstPlaybackStartCb),t.__onPlaying&&(t.removeEventListener("playing",t.__onPlaying),delete t.__onPlaying)},t.available=!0,t}();e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(9),s=n(2),a=n(38),u=n(88),l=n(18),c=n(106),d=n(107),h=n(27),p=n(48),f=n(0),_=n(44),m=n(5),y=function(t){function e(n,i){var r=t.call(this,"flash-simple-renderer")||this;return r.type=e.type,r._eventBus=n,r._model=i,r._blockDetector=new c.default(n),r._resetStates(),r._jobQueue=new d.default(r),r._swfReady=!1,r._crashed=!1,r._active=!1,r.timedOut=!1,r}return i(e,t),e.canUse=function(){return!r.userAgent.safari&&(h.default.isFlashAvailable()&&_.default.canUse())},e.prototype.create=function(t){var e=this,n=f.default.generateGuid(),i=f.default.getAssetUrl(this._model.isLocal(),this._model.version,"simpleplayer.swf");return this._eventHandlerName="__YVPFlashAdHandler_"+this._model.guid,this._bindEvents(),this._eventBus.publish(s.PROFILE_START,s.METRICS.SWF_OBJECT_TO_INIT_START),this.node=this._createNode({id:n,swfUrl:i,params:[{name:"allowscriptaccess",value:"always"},{name:"allowFullScreen",value:"true"},{name:"wmode",value:this._determineWindowMode()},{name:"flashVars",value:"jsCallback="+this._eventHandlerName+"&allowedDomain="+document.location.hostname}]}),this.node.pause=function(){e._callIfReady(e._pause)},this._removeSWFNotReadyTimeout=setTimeout(function(){f.default.classList(e.node).remove("vp-swf-not-ready")},1e3),this._swfReadyTimeout=setTimeout(function(){e.timedOut=!0,e._eventBus.publish(s.SWF_READY_TIMEOUT,e.node)},7e3),this._eventBus.publish(s.PROFILE_END,s.METRICS.RENDER_TO_SWF),this._eventBus.publish(s.PROFILE_START,s.METRICS.SWF_READY),this._unsubscribeEvents=[],this.node},e.prototype.play=function(t){this._callIfReady(this._play,[t])},e.prototype.detectFlashBlockers=function(t){this._blockDetector.detect(t)},e.prototype.preload=function(t){},e.prototype.setPlayableItem=function(t,e){if(void 0===e&&(e=0),!t)return!1;this._resetStates(),this._currentPlayableItem=t;var n=f.default.getPlaybackMode(t);this._updatePlaybackMode(n);var i={streams:t.streams,startTime:e,mode:n,uuid:t.id,isCCM:!0};return this._callIfReady(this._setStreamsImpl,[i]),!0},e.prototype.waitForReady=function(t){var e=this;if(this._swfReady)t();else if(this.timedOut){var n=f.default.createErr(o.ErrorGroup.Streaming,this._model.playbackState,o.E_WARNING,o.WARNING_CODES.E_SWF_TIMEOUT);t(n)}else{var i=!1,r=this._eventBus.addEventListener(s.SWF_READY_TIMEOUT,function(){var n=f.default.createErr(o.ErrorGroup.Streaming,e._model.playbackState,o.E_WARNING,o.WARNING_CODES.E_SWF_TIMEOUT);e._eventBus.publish(s.WARNING,n,!1),i||(i=!0,t(n))},this);this._unsubscribeEvents.push(r),r=this._eventBus.addEventListener(s.SWF_READY,function(){i||(i=!0,t())},this),this._unsubscribeEvents.push(r)}},e.prototype.seek=function(t){this._callIfReady(this._seek,[t])},e.prototype.getCurrentDate=function(){return null},e.prototype.getCurrentTime=function(){return this._callIfReady(this._getCurrentTime)},e.prototype.getDuration=function(){return this._callIfReady(this._getDuration)},e.prototype.setQuality=function(t){},e.prototype.enterFullScreen=function(){},e.prototype.exitFullScreen=function(){},e.prototype.setVolume=function(t){this._callIfReady(this._setVolume,[t])},e.prototype.setMute=function(t){this.setVolume(t?0:this._model.volume)},e.prototype.setAudioLanguage=function(t){},e.prototype.stopMedia=function(){this._callIfReady(this._stopMedia)},e.prototype.bindCustomEvents=function(){},e.prototype.unbindCustomEvents=function(){},e.prototype.bindPlaybackEvents=function(){},e.prototype.detachNode=function(){},e.prototype.reattachNode=function(){},e.prototype.setActive=function(t){this._active=t},e.prototype.unbindPlaybackEvents=function(){this._unsubscribeEvents&&(this._unsubscribeEvents.forEach(function(t){t()}),this._unsubscribeEvents=[])},e.prototype.showAirplayTargetMenu=function(){},e.prototype.destroy=function(){this.stopMedia(),delete window[this._eventHandlerName],this._unbindEvents(),this.unbindPlaybackEvents(),clearTimeout(this._removeSWFNotReadyTimeout),clearTimeout(this._swfReadyTimeout),this._jobQueue.destroy(),this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.node,this._blockDetector.destroy()},e.prototype._setSrc=function(t){var e=t.streams,n=p.default.findStreamByProperty(e,"bitrate",u.default.DESIRED_BITRATE,this._model.capabilities[m.RendererType.FLASH_SIMPLE]);this._callFlashMethod("set","src",{bitrate:n.videoMetadata&&n.videoMetadata.bitrate||0,format:n.format,url:n.url})},e.prototype._onVideoEvent=function(t){var e=t.type,n=m.RendererEvent[e.toUpperCase()];switch("playing"===e&&this._eventBus.publish(s.PROFILE_END,[s.METRICS.STREAM_PLAY_TO_RENDER,s.METRICS.STREAM_REQUEST_TO_RENDER]),e){case"timeupdate":case"seeking":case"seeked":if("timeupdate"===e&&this._isSeeking)break;if("seeked"===e&&(this._isSeeking=!1),this._model.playbackState.isOnCriticalError()||this._model.getState()===l.default.END)break;var i=t.buffered,r={length:1,start:function(){return i?i.start:0},end:function(){return i?i.end:0}};this.publish(n,{currentTime:t.currentTime,duration:t.duration,buffered:r});break;case"error":if(this._mode!==m.PlaybackMode.VIDEO){this.publish(m.RendererEvent.ERROR,t.error);break}console.log("Flash Error: critical? ",t.critical," ",t.msg,".",t.detail);t.critical&&this._callFlashMethod("stopMedia"),this._eventBus.publish(s.ERROR,null);break;case"ended":this.ended=!0,this.publish(n);break;case"pause":if(this.ended)break;if(this.seeking)break;this.publish(n);break;default:this.publish(n)}},e.prototype._onFlashEvent=function(t){if(!this._crashed){var e=t.type;switch(e){case"swfReady":console.log(e),this._swfReady=!0,this._eventBus.publish(s.PROFILE_END,s.METRICS.SWF_READY),clearTimeout(this._swfReadyTimeout),f.default.classList(this.node).remove("vp-swf-not-ready"),this._jobQueue.flush(!0),this._eventBus.publish(s.SWF_READY,this.node);break;case"jsLog":console.log("[flash log]",t.message);break;case"noAccessAllowed":this._eventBus.publish(s.SWF_READY,this.node),this._handleCrash();break;case"uiInteract":this.publish(m.CustomRendererEvent.CLICK);break;case"playerPluginResize":this._eventBus.publish(s.PLAYER_RESIZE,t.width,t.height);break;default:console.log("Unhandled event from .swf",t)}}},e.prototype._setStreamsImpl=function(t){var e=t.streams;this.ended=!1,this._isSeeking=!1,!e||e.length<=0||this._setSrc(t)},e.prototype._createNode=function(t){var e='<object id="'+t.id+'" class="vp-flash-video vp-swf-not-ready" type="application/x-shockwave-flash" data="'+t.swfUrl+'" width="100%" height="100%">';t.params.forEach(function(t){e+='<param name="'+t.name+'" value="'+t.value+'">'}),e+="</object>";var n=document.createElement("div");return n.innerHTML=e,n.children[0]},e.prototype._bindEvents=function(){var t=this;window[this._eventHandlerName]=function(e){try{m.RendererEvent[e.type.toUpperCase()]?t._onVideoEvent(e):t._onFlashEvent(e)}catch(t){console.error("Error in flash event handler:",t.message||t,t.stack)}}},e.prototype._play=function(t){if(!this.seeking||this._model.isPaused()){this.seeking=!1,this.ended=!1,this._isSeeking=!1;var e=0;this._model.preconnect||(this._mode===m.PlaybackMode.VIDEO?this._jobQueue.flush(!0):this._mode===m.PlaybackMode.AD&&(e=1)),this._jobQueue.getLength()>e&&this._eventBus.publish(s.ERROR,f.default.createErr(o.ErrorGroup.Streaming,this._model.playbackState,o.E_PLAYER,o.PLAYER_CODES.E_INTERNAL_VIOLATION)),this._eventBus.publish(s.PROFILE_START,[s.METRICS.STREAM_REQUEST_TO_RENDER,s.METRICS.STREAM_PLAY_TO_RENDER]),this._callFlashMethod("playMedia",t)}},e.prototype._pause=function(){this._callFlashMethod("pauseMedia")},e.prototype._getCurrentTime=function(){return this._callFlashMethod("get","currentTime")},e.prototype._getDuration=function(){return this._callFlashMethod("get","duration")},e.prototype._seek=function(t){this._isSeeking=!0,this._callFlashMethod("set","currentTime",t)},e.prototype._setVolume=function(t){this._callFlashMethod("set","volume",t)},e.prototype._stopMedia=function(){this._callFlashMethod("stopMedia")},e.prototype._setPlayMode=function(t){this._callFlashMethod("set","playMode",[t])},e.prototype._updatePlaybackMode=function(t){this._mode=t,this._callIfReady(this._setPlayMode,[this._mode])},e.prototype._callIfReady=function(t,e){return void 0===e&&(e=[]),this._swfReady?t.apply(this,e):(this._jobQueue.enQueue(t,e),null)},e.prototype._callFlashMethod=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._crashed)try{if(this._swfReady&&this.node[t])return this.node[t].apply(this.node,e)}catch(t){this._crashed=!0,this._handleCrash(t)}},e.prototype._handleCrash=function(t){var e=f.default.createErr(o.ErrorGroup.Streaming,this._model.playbackState,o.E_WARNING,o.WARNING_CODES.E_FLASH_CRASHED);console.error("Flash crashed:",t),this._currentPlayableItem instanceof a.default?this.publish(m.RendererEvent.ERROR,e):this._eventBus.publish(s.WARNING,e,!0)},e.prototype._determineWindowMode=function(){return"macintosh"===r.userAgent.os&&(r.userAgent.chrome||r.userAgent.safari||r.userAgent.firefox)?"direct":"opaque"},e.prototype._unbindEvents=function(){},e.prototype._resetStates=function(){this._isSeeking=!1,this._currentPlayableItem=null,this._mode=m.PlaybackMode.VIDEO,this.seeking=!1,this.ended=!1},e.type=m.RendererType.FLASH_SIMPLE,e}(m.Renderer);e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.listenEventDispatcherEvts=function(t,e,n){var i={},r=Array.isArray(e)?e:[e];return r.forEach(function(e){var r=function(e){return function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];n.apply(void 0,[t,e].concat(i))}}(e);t.addEventListener(e,r),i[e]=r}),function(){i&&(r.forEach(function(e){var n=i[e];t.removeEventListener(e,n)}),r=i=null)}}},function(t,e,n){var i=n(284);(t.exports=n(119)(!1)).push([t.i,".vp-nfl-branding-container{width:100%;height:36px;position:relative;z-index:22;background:#011832;background:-moz-linear-gradient(left,#011832 0,#103155 40%,#011832 100%);background-image:-webkit-linear-gradient(left,#011832,#103155 40%,#011832);background-image:-o-linear-gradient(left,#011832 0,#103155 40%,#011832 100%);background-image:linear-gradient(left,#011832,#103155 40%,#011832);*background:#011832;white-space:nowrap}.vp-browser-mobile .vp-nfl-branding-container{height:52px}.vp-nfl-branding{margin:10px auto;display:inline-block;zoom:1;width:30%;height:100%}.vp-browser-mobile .vp-nfl-branding{margin:15px auto}.vp-nfl-branding-container .vp-nfl-brand{display:inline-block;height:100%;background-position:50%;margin-left:10px;background-repeat:no-repeat;background-size:100%}.vp-nfl-branding-container .vp-nfl-brand-span{background-image:url("+i(n(285))+");width:20px}.vp-browser-mobile .vp-nfl-branding-container .vp-nfl-brand-span{width:30px;height:30px}.vp-nfl-branding-container .vp-nfl-brand-logo{background-image:url("+i(n(286))+");width:110px}.vp-browser-mobile .vp-nfl-branding-container .vp-nfl-brand-logo{margin-left:50px;margin-top:2px;width:157px;height:20px}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(47),r=n(52),o={0:{timeout:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_SERVER_CONNECTION_FAILED_TIMEOUT,default:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_SERVER_CONNECTION_FAILED},1:{timeout:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_RESPONSE_NOT_RECEIVED_TIMEOUT,default:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_RESPONSE_NOT_RECEIVED},2:{408:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_LOAD_FAILED_408,timeout:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_LOAD_FAILED_TIMEOUT,default:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_LOAD_FAILED},3:{408:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_NOT_COMPLETE_408,timeout:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_NOT_COMPLETE_TIMEOUT,default:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_NOT_COMPLETE},default:{timeout:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_TIMEOUT,cors:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_CORS_ERROR,default:i.errorCodes.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_ERROR}};e.getErrorCode=function(t,e,n){return e=e&&o[e]?e:"default",t&&t.message===r.LoaderConstants.XHR_TIMEOUT?n="timeout":n&&o[e][n]||(n="default"),o[e][n]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(40),r=n(1),o=n(8),s=n(47),a=n(52),u=n(121),l=n(46),c=n(23),d=n(71),h=n(118),p=n(290),f=n(123);e.DEFAULT_MEDIA_ITEM_META={title:"",description:"",thumbnail:"",duration:0};var _=o.RendererInterfaces.RendererType,m=function(){function t(t){this._cancelled=!1,this._model=t,this._endPoint=f.default.getEnv(this._model.config.CMS&&this._model.config.CMS.env||""),a.Loader.preconnect("preconnect-sapi","//"+this._endPoint)}return t.prototype.resolve=function(t,e,n){var i=this;if(Array.isArray(t)&&0!==t.length){var r=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(!i._cancelled){var o=e[0],a=void 0,l=e[2],c=e[2]&&e[2].resourceTiming&&e[2].resourceTiming.name||null;try{a=JSON.parse(o),l.instrument=a.query&&a.query.results&&a.query.results.instrument?JSON.stringify(a.query.results.instrument):"none"}catch(t){}n.onApiCallInfo({perfObj:l,url:c}),i._parseResponse(t,o,function(t,e){if(!t&&e&&e.length){for(var r=0,o=e;r<o.length;r++){var a=(o[r].customConfig||{}).mediaItemStatus||{},l=parseInt(a.code,10);if(!isNaN(l)&&l>100){var c=a.msg;return a.code===s.errorCodes.INFO_CODES.E_SAPI_RESTRICTED_NETWORK_TYPE&&(c=u.default.ERR_RESTRICTED_NETWORK_TYPE),void i._sendError(a.code,c,n)}}n.onComplete(e)}else t=t||"",i._sendError(d.getErrorCode(),t,n)})}},o=function(t,e,r,o,s,a){i._cancelled||(n.onApiCallInfo({perfObj:s||{},url:a&&a.url||null}),i._sendError(d.getErrorCode(t,e,r),t.message,n))};this._getSapiUrl(t,e,function(t){t?a.Loader.ajax(t,{context:i,successHandler:r,failureHandler:o,collectPerfData:!0}):o.apply(i)})}},t.prototype.cancel=function(){this._cancelled=!0},t.prototype.parseMediaItemsResponse=function(t){var e=this;Array.isArray(t)&&t.length>0&&t.forEach(function(t){t.customConfig&&t.customConfig.response&&(e._parseMediaObjItem(t,t.customConfig.response,!1),delete t.customConfig.response)})},t.prototype.getDeviceType=function(){return r.userAgent.tv?"tv-widget":r.userAgent.ipad||r.userAgent.androidTablet?"tablet":r.userAgent.mobile?"smartphone":"desktop"},t.prototype._parseMediaObjItem=function(t,n,i){var r=this;void 0===i&&(i=!0);var o=n.meta||{},s=n.streams||[],a=n.license||{},u=t.metadata||{},l=n.metrics||{},c=t.customConfig||{};if(u.title=o.title||o.description,u.description=o.description,u.thumbnail=o.thumbnail,u.duration=o.duration,!c.playlistConfig&&o.playlist_config&&(c.playlistConfig=o.playlist_config),t.customConfig=t.customConfig||{},t.customConfig.nielsenRequired=o.nielsen_beacons||!1,n.status&&(t.customConfig.mediaItemStatus=n.status),o.allowed_connection_types&&(t.customConfig.allowedConnectionTypes=o.allowed_connection_types),t.customConfig.metrics={comscoreCM5:l.comscore_cm5||"",ywa:l.ywa||[],comscore6:l.comscore6||"",pspId:l.pspid||"",plidl:l.plidl||"",isrc:l.isrc||"",mmActivityId:l.mmActivityId||"",mediametrie:l.mediametrie||""},t.customConfig.meta={genre:o.genre||"",showName:o.show_name||"",credits:o.credits||{},eventStart:o.event_start||0,eventEnd:o.event_stop||0},i&&(u.title=u.title||e.DEFAULT_MEDIA_ITEM_META.title,u.description=u.description||e.DEFAULT_MEDIA_ITEM_META.description,u.thumbnail=u.thumbnail||e.DEFAULT_MEDIA_ITEM_META.thumbnail,u.duration=u.duration||e.DEFAULT_MEDIA_ITEM_META.duration),t.source={streams:s.map(function(t){return r._formatStreamMetadata(t)})},u.type=this._getStreamType(t.source.streams),t.metadata=u,a){var d={};d.title=a.title,d.accountName=a.account_name,d.originatingProperty=a.originating_property,d.accountId=a.account_id,d.salesforceId=a.salesforce_id,d.isDrm=a.is_drm,t.license=d}t.visualSeekData=t.visualSeekData||{mimetype:"visualseek/sapi"},t.visualSeekData.visualSeek=n.visualseek,o.provider&&(t.brandingData=t.brandingData||{branding:{}},o.provider.provider_id&&h.PROVIDER_BRANDING_TEMPLATES[o.provider.provider_id]&&(t.brandingData.mimetype="branding/provider"),t.brandingData.branding=t.brandingData.branding||{},t.brandingData.branding.providerId=o.provider.provider_id,t.brandingData.branding.providerName=o.provider.name,t.brandingData.branding.providerVideoId=o.provider.provider_video_id,t.brandingData.branding.gameOrigin=o.game_origin||[]),n.vrm&&(t.adConfig={value:n.vrm,mimetype:"adplugin/vrm"}),n.closedcaptions&&(t.closedCaptions=n.closedcaptions)},t.prototype._parseResponse=function(t,e,n){var i=this;try{var r=JSON.parse(e),o=r&&r.query&&r.query.results&&r.query.results.mediaObj;if(!o)return void n("Bad sapi response");t.forEach(function(t){o.some(function(e,n){return!(!e||t.id!==e.id)&&(i._parseMediaObjItem(t,e),o.splice(n,1),!0)})}),n(null,t)}catch(t){n(t.message)}},t.prototype._sendError=function(t,e,n){var i={code:t,message:e};n.onError(i)},t.prototype._getSapiUrl=function(t,e,n){var o=this._model,s=t.map(function(t){return t.id}).join(","),a=e.rendererTypes,u=e.rendererCapabilities,d={},h={},p=e.gdprConsent,f=e.thumbnailDimensions,m="html",y="//"+this._endPoint+"/v1/video/sapi/streams/"+s;a&&a.forEach(function(t){var e=u[t],n=e.acceptedProtocols,i=e.preferredFormats;n.forEach(function(t){return d[t]=!0}),i.forEach(function(t){return h[t]=!0}),t!==_.FLASH&&t!==_.FLASH_SIMPLE||(m="flash")}),f&&f.width&&f.height||(f={width:640,height:360});var v={srid:Math.floor(4294967295*Math.random()),protocol:Object.keys(d).join(","),format:Object.keys(h).join(","),rt:m,devtype:this.getDeviceType(),offnetwork:!c.default.isYahooDomain(),plid:o.guid,region:o.region||"US",site:o.site,expb:o.experienceBucket,expn:o.experienceName,lang:o.lang,width:f.width,height:f.height,resize:!0,ps:e.sessionId,autoplay:e.autoplay,image_sizes:"",excludePS:!0,acctid:o.yvapAccountId,synd:o.syndication,pspid:o.pspid,plidl:"",topic:o.cTopic,pver:"",try:l.isNumber(Number(e.tryCount))?Number(e.tryCount):1,failover_count:l.isNumber(Number(e.failoverCount))?Number(e.failoverCount):0,ads:"vrm"},g=c.default.getPageQueryString().ad_debug;g&&(v.ad_debug=g),a&&this._shouldPrefetchMasterPlaylist(a)&&(v.hlspre=!0),p&&!l.isNullOrUndefined(p.gdprApplies)&&(v.gdpr=!0===p.gdprApplies,v.iabconsent=p.consentData||""),o.allowGeoRequest&&r.userAgent.mobile?this._buildGPSClipParams(s).then(function(t){var e=Object.assign({},v,t);n(y+"?"+i.stringify(e))}).catch(function(){n(y+"?"+i.stringify(v))}):n(y+"?"+i.stringify(v))},t.prototype._shouldPrefetchMasterPlaylist=function(t){for(var e=t.length,n=-1,i=-1,r=0;r<e;r++){var o=t[r];if(o===_.HTML5_HLS)return!0;o===_.HTML5_RAW?n=r:o===_.FLASH&&(i=r)}return-1!==i&&(-1===n||n>i)},t.prototype._formatStreamMetadata=function(t){return t?{url:t.host+t.path,live:t.live,format:t.format,cdn:t.cdn,rcMode:t.rc_mode,mimeType:t.mime_type,aspectRatio:t.aspect_ratio,videoMetadata:{avgBitrate:t.avgbitrate||0,bitrate:t.bitrate||0,framerate:t.framerate||0,height:t.height||0,width:t.width||0,profile:t.h264_profile},audioMetadata:{channels:t.channels||0,forced:t.forced,autoSelect:t.auto_select,default:t.default}}:null},t.prototype._buildGPSClipParams=function(t){var e=this;return new Promise(function(n,i){p.default.getXAuthParams(t,e.getDeviceType()).then(function(t){var i=e._model.geoData;if(i&&i.latitude&&i.longitude&&i.accuracy){var r=i.latitude+";"+i.longitude+" epu="+i.accuracy,o=Object.assign({},t,{"geo-position":r});n(o)}else n(t)}).catch(function(){i({})})})},t.prototype._getStreamType=function(t){return t.some(function(t){return t.live})?o.MediaItemInterfaces.MediaItemType.LIVE_EVENT:o.MediaItemInterfaces.MediaItemType.VOD},t}();e.default=m},function(t,e,n){(t.exports=n(119)(!1)).push([t.i,".yvp-playlist-icon-wrapper{position:absolute;left:0;height:100%;width:24px;background:rgba(0,0,0,.7)}.yvp-playlist-icon-wrapper .yvp-playlist-icon.item{position:absolute;top:50%;margin-top:-7px;left:5px}.yvp-playlist-icon{display:inline-block;vertical-align:top;width:14px;height:14px}.yvp-playlist-icon.item{opacity:1;margin-right:5px}",""])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PARAMS=["s","_ex","_NOL","test","cached_vs","expn","expt","expb","vsid","lms_id","bckt","env","ccap","loc","site","lang","intl","ccode","sec","cpos","pt","pd","pct","pstcat","ver","p_sec","p_subsec","pstaid_p","pkgt","subsec","_rid","bx","ar"],e.INT_DEFAULT="",e.STRING_DEFAULT="none",e.HIDE_KEY="__hide__beacon__key__",e.NULL_DEFAULT="*null"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(26),r=n(15),o=n(5),s=n(4),a=n(0),u=n(57),l=function(){function t(t){this._player=t,this.viewability={value:0,timestamp:0},this.SKIP_PARAM_IN_BEACON="___skip_param_in_beacon___",this.expm="na",this.pltype="vdms",this._bitrate=0,this._V="V",this.type="",this.ss="",this.vid="",this.pstaid="",this.prt="none",this.cprt="none",this.vs="",this.vlng="none",this.pver="",this.host=document.location.host,this._w=document.location.href,this._R=document.referrer,this.pls="",this.auto="",this.snd="",this.deos="",this.deom="",this.psz="",this.ccav="",this.cdn="uncalculated",this.smpl="",this.cont=1,this.replay=0,this.focus="",this.bit=0,this.drmsys="none",this.drm=!1,this.pl_type="",this.pl_uuid="",this.pl_intr="",this.pl_sec=""}return t.getStreamType=function(e,n,s){switch(n){case i.AdBreakType.PREROLL:return"ad pre-roll";case i.AdBreakType.MIDROLL:return"ad mid-roll";case i.AdBreakType.POSTROLL:return"ad post-roll";case i.AdBreakType.TRIGGER:return"ad trigger";case i.AdBreakType.NON_LINEAR:return"ad non-linear";case i.AdBreakType.NATIVE:return"ad native"}return e===o.PlaybackMode.AD?"ad"+(n?" "+n:""):n===r.MediaItemType.VOD?0===s?"":s>t.LONG_VOD_DURATION?"vod long":"vod short":n===r.MediaItemType.LIVE_EVENT||n===r.MediaItemType.LIVE_CHANNEL?"live":n},t.prototype.destroy=function(){this.pls=""},t.prototype.update=function(e){this.requestType=e.requestType||"",this.requestAction=e.requestAction||"none",this.audioLanguage=e.audioLanguage||"",this._playerRootElement=e.playerRootElement||this._playerRootElement,this.playbackMode=e.playbackMode,this.adParams=this.playbackMode!==o.PlaybackMode.AD?null:this.adParams,this.type=t.getStreamType(e.playbackMode,e.currentMediaType,e.videoLength)||this.type,this.pls=this._player.guid,this.ss=this._getStreamStatus(e.playingStreamType)||this.ss,this.vid=e.videoId||this.vid,this.pstaid=e.videoId||this.pstaid,this.prt=this._getRendererType(e.rendererType)||this.prt,this.cprt=this._getRendererType(e.mediaItemRendererType)||this.cprt,this.vs=e.sessionId||this.vs,this.vlng=e.videoLength&&parseFloat(parseFloat(e.videoLength).toFixed(2)).toString()||this.vlng,this.pver="0.1.240"===e.playerVersion?"local":e.playerVersion,this.auto=!0===e.autoPlay?"true":"false",this.snd=!0===e.mute?"m":"um",this.deos=e.docking&&!0===e.docking.enableOnScrollDown?"1":"0",this.deom=e.docking&&!0===e.docking.enableOnMuted?"1":"0",this.psz=e.uiState&&e.uiState.width&&e.uiState.height?e.uiState.width+"x"+e.uiState.height:this.psz,this.ccav=!0===e.isCCAvailable?"1":"0",this.cdn=e.cdn||this.cdn,this.smpl=s.isNullOrUndefined(e.samplingId)?this.smpl:e.samplingId.toString(),this.focus=a.default.isPlayerInBackground()?"0":"1",this.expm=(e.uiState&&!0===e.uiState.isFullScreen?"fullscreen":e.uiState&&!0===e.uiState.isDocked&&"docked")||"na",this.drmsys=e.drmsys,this.drm=e.drm},t.prototype.getCommonParams=function(){var t=this,e={t:Math.random()};return u.PARAMS.forEach(function(n){e[n]=t[n]}),e},t.prototype.onVideoRequest=function(t,e){this._currentVideo&&(e.videoId===this._currentVideo?this.replay++:this.cont++),this._currentVideo=e.videoId,this.bitrate=0},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._player.getCurrentTime()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){var t=this._player.volume;return t&&t>0&&t.toString()||"0"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitrate",{get:function(){return this._bitrate},set:function(t){this._bitrate=Math.round(t),this.bit=Math.round(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"programDateTimeLatency",{get:function(){var t=this._player.getCurrentDate(),e=(new Date).getTime();return t>0?(e-t).toString():""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"play_pos",{get:function(){return parseFloat(this.currentTime.toFixed(2)).toString()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._getPlayerViewability(this._playerRootElement).toString()+"%"},enumerable:!0,configurable:!0}),t.prototype._getRendererType=function(t){if(!t)return"";switch(t){case o.RendererType.FLASH:return"flash";case o.RendererType.FLASH_SIMPLE:return"flash-simple";case o.RendererType.HTML5_HLS:return"html5-hls";case o.RendererType.HTML5_HLS_360:return"html5-hls-360";case o.RendererType.HTML5_RAW_360:return"html-360";case o.RendererType.EXTERNAL:case o.RendererType.HTML5_RAW:case o.RendererType.HTML5_TV:case o.RendererType.HTML5_TV_TIZEN:case o.RendererType.HTML5_TV_ORSAY:default:return"html"}},t.prototype._getStreamStatus=function(t){return t===r.MediaItemType.LIVE_EVENT||t===r.MediaItemType.LIVE_CHANNEL?"live":"vod"},t.prototype._getPlayerViewability=function(t){var e=(new Date).getTime();if(t&&e-this.viewability.timestamp>1e3){var n=t.getElementsByClassName("vp-main");n.length&&(this.viewability.value=a.default.getElementViewability(n[0]),this.viewability.timestamp=e)}return this.viewability.value},t.LONG_VOD_DURATION=600,t}();e.default=l},function(t,e,n){"use strict";(function(t){var n="undefined"!=typeof window?window:void 0!==t&&t.window?t.window:{},i=n.navigator?n.navigator:"undefined"!=typeof navigator?navigator:{},r=i.userAgent?i.userAgent.toLowerCase().replace(/<[A-Za-z]+.*?(\/>|>.*?<\/[A-Za-z]+>)|javascript:/g,""):"",o=function(t){if(null===t)return!1;var e=t[1];return parseFloat(e.replace("_",".").split(".",2).join("."))||1},s=function(t){for(var e=(n&&n.location&&n.location.search&&n.location.search.substring(1)||"").split("&"),i=0;i<e.length;i++){var r=e[i].split("=");if(decodeURIComponent(r[0])===t)return decodeURIComponent(r[1])}return null};if(e.ua=r,e.chromium=o(/chromium\/([^\s]*)/.exec(r)),e.edge=o(/edge\/([^\s]*)/.exec(r)),e.opera=/opr\/|opera\//.test(r),e.chrome=!e.chromium&&!e.edge&&!e.opera&&(o(/chrome\/([^\s]*)/.exec(r))||o(/crios\/([^\s]*)/.exec(r))),e.ie=o(/msie ([^;]*)/.exec(r))||o(/trident.*; rv:([0-9.]+)/.exec(r)),e.firefox=!e.ie&&o(/firefox\/([^\s]*)/.exec(r)),e.android=/android/.test(r),e.androidTablet=e.android&&!/mobile/.test(r),e.htc_one=/htc_one/.test(r),e.vizio=/vizio/.test(r)||"vizio"===s("man"),e.tivo=/tivo/.test(r),e.presto=e.opera&&/presto/i.test(r),e.fios=/verizon.*(stb|vms|ipc)/.test(r),e.philips=/philipstv/.test(r),e.toshiba=/tsb/.test(r),e.amazon=e.android&&/amazonwebappplatform/.test(r)&&/aft/.test(r),e.lg=/web0s/.test(r),e.tizen=/tizen/.test(r),e.orsay=/smarttv/.test(r)&&!e.tizen&&!e.lg&&!e.philips,e.samsung=e.orsay||e.tizen,e.sony=/sony|bravia/.test(r),e.playstation=/(playstation)/.test(r),e.ios=/(ipad|iphone|ipod)/.test(r),e.iphone=/(iphone|ipod)/.test(r)&&!/ipad/.test(r),e.ipad=e.ios&&!e.iphone,e.androidBrowser=!e.chrome&&/android/.test(r),e.androidVersion=o(/android\s([0-9.]*)/.exec(r)),e.safari=!e.chrome&&!e.chromium&&!e.android&&/safari\/([^\s]*)/.test(r)&&o(/version\/([^\s]*)/.exec(r)),e.iosWebView=e.ios&&!navigator.standalone&&!e.safari,e.iosVersion=e.ios&&o(/\bos ((\d+_?){2,3})\s/.exec(r)),e.mobile=e.ios||e.android&&!e.amazon,e.safariDesktop=!e.mobile&&e.safari,e.tv=e.vizio||e.tivo||e.amazon||e.samsung||e.sony||e.playstation||e.lg||e.fios||e.philips||e.toshiba,e.desktop=!e.mobile&&!e.tv,e.phantomJS=n.window&&n.window._phantom,e.tv){var a=void 0!==a?a:void 0!==t&&t.tv?t.tv:{};if(e.class=e.ua,e.vizio)e.os="vizio",e.class=s("class")||s("soc"),a&&a.tts&&(e.class+="-tts");else if(e.tivo)e.os="tivo",/tcd849/.test(r)?e.class="TCD849":/tcd8d9/.test(r)?e.class="TCD8D9":/tcd8f9/.test(r)?e.class="TCD8F9":/tcd8/.test(r)?e.class="TCD8":/tcdd/.test(r)?e.class="TCDD":/tcd7/.test(r)?e.class="TCD7":/tcda9/.test(r)&&(e.class="TCDA9");else if(e.amazon)e.os="amazon",/aftb/.test(r)?e.class="AFTB":/afts/.test(r)?e.class="AFTS":/aftm/.test(r)?e.class="AFTM":/aftn/.test(r)?e.class="AFTN":/aftrs/.test(r)?e.class="AFTRS":/aftt/.test(r)&&(e.class="AFTT");else if(e.lg)e.os="lg",/qtwebengine/.test(r)?e.class="3":/safari\/537/.test(r)?e.class="1":/safari\/538/.test(r)&&(e.class="2");else if(e.samsung){e.os="samsung";var u="default";if(e.tizen){var l=void 0!==l?l:n.tizen;l&&l.systeminfo&&(e.version=l.systeminfo.getCapability("http://tizen.org/feature/platform.version"));var c=void 0!==c?c:n.webapis;if(c&&c.productinfo&&c.productinfo.getRealModel)try{var d=c.productinfo.getRealModel(),h=d.substr(4,isNaN(Number(d[5]))?2:1);u=h+d.substr(1===h.length?5:6,1)}catch(t){u="default"}}else u="orsay";e.class=u}else e.roku||e.chromecast||e.toshiba||e.philips||e.appletv||e.xbox||(e.sony?(e.os="sony",/bdp/.test(r)?e.class="BDP":/bravia|sony-kj/.test(r)?e.class="BRAVIA":e.class="default"):e.playstation?(e.os="playstation",/4pro/.test(r)?e.class="4PRO":/playstation 4/.test(r)?e.class="4":/vita/i.test(r)&&(e.class="VITA")):e.fios?(e.os="fios",/stb/.test(r)?e.class="STB":/vms/.test(r)?e.class="VMS":/ipc/.test(r)&&(e.class="IPC")):e.os=null)}else e.ios?e.os="ios":e.android?e.os="android":/windows|win32/.test(r)?(e.os="windows",e.winXP=/(windows nt 5\.[1-3])/.test(r),e.class=e.winXP?"XP":e.class,e.winVista=/(windows nt 6\.0)/.test(r),e.class=e.winVista?"VISTA":e.class,e.win7=/(windows nt 6\.1)/.test(r),e.class=e.win7?"7":e.class,e.win8=/(windows nt 6\.2)/.test(r),e.class=e.win8?"8":e.class,e.win8_1=/(windows nt 6\.3)/.test(r),e.class=-1*e.win?"8_1":e.class,e.win10=/(windows nt 10\.0)/.test(r),e.class=e.win10?"10":e.class,e.win64=/(wow64|win64)/.test(r),e.architecture=e.win64?"64":"32"):/macintosh|mac_powerpc/.test(r)?e.os="macintosh":/symbos/.test(r)?e.os="symbos":/linux/.test(r)?e.os="linux":e.os=null}).call(this,n(30))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.MEDIA_ITEM="media-item",t.AD_BREAK_ITEM="ad-break-item"}(e.PlayableItemType||(e.PlayableItemType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=n(0),o=n(54),s=n(39).Validator,a={audioMetadata:{bitrate:0,channels:1},videoMetadata:{avgBitrate:0,bitrate:0,framerate:0,height:0,width:0},live:!1,manifest:"",url:"",aspectRatio:""},u=function(){function t(t){this._configure(t),"subtitle"===this.type&&(this.type="SUBTITLES")}return t.prototype.isRTMP=function(){var t=/^rtmp(?:e|t|te|s)?:\/\//;return t.test(this.host)||t.test(this.url)},t.prototype.isRTX=function(){return this.url.indexOf("/rtx/")>-1},t.prototype.isAtlas=function(){var t=this.host;return this.hlsInfo&&(t=this.hlsInfo.ts_url),/atlas\.cdn\.yimg\.com/.test(t)},t.prototype.isUplynk=function(){if(this.url&&this.url.length){var t=this.url.toLowerCase();return t.indexOf("uplynk.com")>-1||t.indexOf("downlynk.com")>-1||t.indexOf("uplynk.localhost")>-1||t.indexOf("downlynk.localhost")>-1}return!1},t.prototype.getType=function(){var t="unknown",e=this.url,n=this._getProtocol();return"m3u8:fmp4"===this.format?t="hls-fmp4":e&&(n&&(n.indexOf("rtmp")>-1||n.indexOf("rtsp")>-1)?t=n:/\/*\.f4m/i.test(e)?t=this.isRTX()?"rtx-hds":"hds":/\/*\.m3u8/i.test(e)||e.length>0&&e.indexOf("content=hls")>-1?t=this.isRTX()?"rtx-hls":"hls":/\/*\.mp4/i.test(e)?t="mp4":/\/*\.webm/i.test(e)?t="webm":/\/*\.mpd/i.test(e)&&(t="dash")),t},Object.defineProperty(t.prototype,"bitrate",{get:function(){return this.videoMetadata?this.videoMetadata.bitrate||0:this.audioMetadata&&this.audioMetadata.bitrate||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"avgBitrate",{get:function(){return this.videoMetadata&&this.videoMetadata.avgBitrate||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.videoMetadata&&this.videoMetadata.width||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.videoMetadata&&this.videoMetadata.height||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"framerate",{get:function(){return this.videoMetadata&&this.videoMetadata.framerate||0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"profile",{get:function(){return this.videoMetadata&&this.videoMetadata.profile||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"channels",{get:function(){return this.audioMetadata&&this.audioMetadata.channels>=0?this.audioMetadata.channels:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forced",{get:function(){return this.audioMetadata&&this.audioMetadata.forced},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"default",{get:function(){return this.audioMetadata&&this.audioMetadata.default},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoSelect",{get:function(){return this.audioMetadata&&this.audioMetadata.autoSelect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streamProtocol",{get:function(){return this._getProtocol()},enumerable:!0,configurable:!0}),t.prototype._configure=function(t){this._validateConfig(t);var e=r.default.deepCopy(t);if(e=r.default.mergeObjects(e,a),r.default.mergeObjects(this,e,!0),i.isString(this.url)&&0!==this.url.length||this.host&&this.path&&(this.url=this.host+this.path),this.type&&(this.format=this.type),this.format||(this.format=r.default.getFormat(this.url)),!this.host&&i.isString(this.url)&&this.url.length>0){this.host=this._getProtocol()+"://"+r.default.getHostname(this.url);var n=this.url.split(this.host);n.length>=2&&(this.path=n[1])}this.cdn&&this.cdn.length||(this.cdn=this._getCdnFromUrl(this.url))},t.prototype._validateConfig=function(t){try{(new s).validate(t,o.streamSchema,{throwError:!0})}catch(t){var e="Invalid stream config: "+t.property+" "+t.message;throw console.error(e),new Error(e)}},t.prototype._getProtocol=function(){var t="http",e=this.url.split(":");return e.length>1&&(t=e[0]),t},t.prototype._getCdnFromUrl=function(t){var e="unknown";return t&&t.length>0&&(e=t.indexOf("akamai")>-1?"akamai":t.indexOf("yahoo.com")>-1||t.indexOf("yimg.com")>-1?"atlas":t.indexOf("llnwd.net")>-1?"limelight":t.indexOf("fastly.com")>-1?"fastly":t.indexOf("edgecast.com")>-1?"edgecast":r.default.parseRootHost(t)),e},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(5),o=n(4),s=n(0),a=n(57),u=n(75),l=n(138),c=n(139),d=function(){function t(t){this._player=t,this._adPlayed=!1,this._sessionComplete=!1,this._evtListeners=[{evt:i.API.VIDEO_REQUEST,cb:this._sendGenericBeacon.bind(this,"VIDEO_REQUEST")},{evt:i.API.PLAYBACK_RESUMED,cb:this._sendGenericBeacon.bind(this,"PLAYBACK_RESUMED")},{evt:i.API.PLAYBACK_STALLED,cb:this._sendGenericBeacon.bind(this,"PLAYBACK_STALLED")},{evt:i.API.CTRL_SEEK,cb:this._sendGenericBeacon.bind(this,"CTRL_SEEK")},{evt:i.API.CTRL_VOLUME,cb:this._sendGenericBeacon.bind(this,"CTRL_VOLUME")},{evt:i.API.CTRL_PLAYPAUSE,cb:this._sendGenericBeacon.bind(this,"CTRL_PLAYPAUSE")},{evt:i.API.CTRL_REPLAY,cb:this._sendGenericBeacon.bind(this,"CTRL_REPLAY")},{evt:i.API.CTRL_PLAYREQUEST,cb:this._sendGenericBeacon.bind(this,"CTRL_PLAYREQUEST")},{evt:i.API.CTRL_SETTINGS,cb:this._sendGenericBeacon.bind(this,"CTRL_SETTINGS")},{evt:i.API.CONTROLS_AUDIO_CHANGE,cb:this._sendGenericBeacon.bind(this,"CONTROLS_AUDIO_CHANGE")},{evt:i.API.THREE_SIXTY_INTERACT,cb:this._sendGenericBeacon.bind(this,"THREE_SIXTY_INTERACT")},{evt:i.API.THREE_SIXTY_PIE_INTERACT,cb:this._sendGenericBeacon.bind(this,"THREE_SIXTY_PIE_INTERACT")},{evt:i.API.CC_LANGUAGE_CHANGE,cb:this._sendGenericBeacon.bind(this,"CC_LANGUAGE_CHANGE")},{evt:i.API.CC_UPDATE_STYLE,cb:this._sendGenericBeacon.bind(this,"CC_UPDATE_STYLE")},{evt:i.API.CC_SETTINGS,cb:this._sendGenericBeacon.bind(this,"CC_SETTINGS")},{evt:i.API.AIRPLAY_CONNECTION_STATE_CHANGE,cb:this._onAirplayConnectionStateChange},{evt:i.API.BITRATE_CHANGE,cb:this._onBitrateChange},{evt:i.API.UI_INTERACT,cb:this._onUiInteraction},{evt:i.API.CC_UI_TOGGLE,cb:this._onCcToggle},{evt:i.API.PLAYER_FULLSCREEN_CHANGE,cb:this._onFullScreenToggle},{evt:i.API.PLAYER_INFO,cb:this._onPlayerInfo},{evt:i.API.ABR_DATA_UPDATE,cb:this._onAbrDataUpdate},{evt:i.API.CMS_API_CALLED,cb:this._onApiCalled},{evt:i.API.PLAYER_ERROR,cb:this._onError},{evt:i.API.PLAYER_WARNING,cb:this._onWarning},{evt:i.API.PLAYBACK_START,cb:this._onPlaybackStarted},{evt:i.API.PLAYBACK_COMPLETE,cb:this._onPlaybackComplete},{evt:i.API.AD_METRICS,cb:this._onAdMetricsAvailable}],this._player?(this._model=new u.default(this._player),this._progressManager=new l.default(this._player,this._model),this._evtKeys={},this._bindEvents()):console.error("[VdmsAnalytics] Cannot initialize VdmsAnalytics. Bad player instance!")}return t.prototype.destroy=function(){this._player.removeEventListeners(this._evtKeys),this._progressManager.destroy(),this._model.destroy(),this._evtKeys={}},t.prototype._onPlaybackStarted=function(t){var e=this._player.getPlaybackStartDto();t.ad=this._adPlayed?1:0,t.rsm=e.isResume||"",t.pdtl=this._model.programDateTimeLatency,this._updateLatencyParams(t,e),this._updateEventDetails(t,a.BEACONS.PLAYBACK_START),this._sendBeacon(t)},t.prototype._bindEvents=function(){var t=this;window.addEventListener("unload",this._sendUnloadBeacon.bind(this)),this._player.addEventListener(i.API.VIDEO_REQUEST,this._onVideoRequest,this),this._progressManager.addEventListener(l.ProgressEvent.VIDEO_PROGRESS,this._onVideoProgress,this),this._evtListeners.forEach(function(e){t._evtKeys[e.evt]=t._player.addEventListener(e.evt,t._handleVideoEvent.bind(t,e),t)})},t.prototype._handleVideoEvent=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var i=e.length-1,r=e[i]||{};this._model.update(r);var s=this._model.getCommonParams(),a=o.isObject(e[i])?Array.prototype.slice.call(e,0,i):e;t.cb.apply(this,a.concat([s]))},t.prototype._sendGenericBeacon=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var r=t&&a.BEACONS[t]||null,o=n[n.length-1];if(r){var s=Array.prototype.slice.call(n,0,n.length-1),u=r.payloadParams;if(s.length&&u&&u.length===s.length)for(var l=0;l<s.length;l++)o[u[l]]=s[l].toString();else if(u&&u.length)return void console.error("bad event config for beacon: ",r.evt);r.params&&r.params.forEach(function(t){o[t.key]=e._model[t.value]}),this._updateEventDetails(o,r),this._sendBeacon(o)}},t.prototype._sendBeacon=function(t){this._filterSkipParams(t);var e="https://bats.video.yahoo.com/p?"+s.default.querystring(t,"&","=",function(t){return encodeURIComponent(t).replace(/[!'()]/g,escape).replace(/\*/g,"%2A")});c.default.sendImageBeacon(e)},t.prototype._filterSkipParams=function(t){for(var e in t)t.hasOwnProperty(e)&&t[e]===this._model.SKIP_PARAM_IN_BEACON&&delete t[e]},t.prototype._onVideoRequest=function(t,e){this._adPlayed=!1,this._sessionComplete=!1,this._model.onVideoRequest(t,e)},t.prototype._onBitrateChange=function(t,e,n){this._updateEventDetails(n,a.BEACONS.BITRATE_CHANGE),n.value=t.toString(),n.value_e=this._model.bitrate,n.reason=e.reason||"",n.fr=e.newFrameRate||"",n.fr_old=e.oldFrameRate||"",this._sendBeacon(n),this._model.bitrate=t},t.prototype._onAirplayConnectionStateChange=function(t,e){t.isInitialEvt||(this._updateEventDetails(e,a.BEACONS.AIRPLAY_CONNECTION_STATE_CHANGE),e.value=t.connected?"1":"0",this._sendBeacon(e))},t.prototype._onUiInteraction=function(t,e){this._updateEventDetails(e,a.BEACONS.UI_INTERACT),e.evt=["ui_pl_nxt_clk","ui_pl_nxt_hvr","ui_pl_scrl","ui_pl_thmb_clk"].indexOf(t.srcElement)>-1?"ui_pl":e.evt,e.V_slk=t.srcElement,this._sendBeacon(e)},t.prototype._onCcToggle=function(t,e,n){this._updateEventDetails(n,a.BEACONS.CC_TOGGLE),n.value=t?"1":"0",this._sendBeacon(n)},t.prototype._onFullScreenToggle=function(t,e){this._updateEventDetails(e,a.BEACONS.FULLSCREEN_CHANGE),e.value=t?"ON":"OFF",this._sendBeacon(e)},t.prototype._onPlayerInfo=function(t,e){this._updateEventDetails(e,a.BEACONS.PLAYER_INFO),e.ecode=t.rep||"",e.estring=t.debugMessage||t.message||"",this._sendBeacon(e)},t.prototype._onAbrDataUpdate=function(t,e){this._updateEventDetails(e,a.BEACONS.ABR_DATA_UPDATE),e.sc=t.sc||"",e.ib=t.ib||"",e.bft=t.bft||"",e.ci=t.ci||"",e.dw=t.dw||"",e.dh=t.dh||"",e.pr=t.pr||"",e.eb=t.eb||"",e.bl=t.bl||"",e.swc=t.swc||"",e.dfr=t.dfr||"",e.fbl=t.fbl?t.fbl.toString():"",e.ted="",t.ted&&t.ted.length&&(e.ted=t.ted.map(function(t){return JSON.stringify(t)}).toString()),e.ni=t.ni||"",e.rs=t.rs||"",this._sendBeacon(e)},t.prototype._onApiCalled=function(t,e){var n=c.default.prepareApiInfo(t.url,t.perfObj);this._updateEventDetails(e,a.BEACONS.CMS_API_CALLED),e.source=n.source||"na",e.url=n.url||"",e.latency=n.latency||"",e.http_code=n.http_code||"na",e.resp_len=n.resp_len||"na",e.instrument=n.instrument||"",e.perf_info=n.perfInfo||"",e.perf_stack=n.perfStack||"",this._sendBeacon(e)},t.prototype._onError=function(t,e){this._updateEventDetails(e,a.BEACONS.PLAYER_ERROR),e.ecode=t.rep||"",e.estring=t.debugMessage||t.message||"",e.dur=Math.round(this._progressManager.totalWatchTime)||"",this._sendBeacon(e),this._sendUnloadBeacon()},t.prototype._onWarning=function(t,e){this._updateEventDetails(e,a.BEACONS.PLAYER_WARNING),e&&(e.ecode=t.rep||"",e.estring=t.debugMessage||t.message||""),this._sendBeacon(e)},t.prototype._onPlaybackComplete=function(t,e,n){this._sendSessionCompleteBeacon(a.BEACONS.PLAYBACK_COMPLETE,n)},t.prototype._sendUnloadBeacon=function(){var t=this._model.getCommonParams();this._sendSessionCompleteBeacon(a.BEACONS.INCOMPLETE_EXIT,t)},t.prototype._sendSessionCompleteBeacon=function(t,e){this._sessionComplete||(this._sessionComplete=!0,this._updateEventDetails(e,t),e.pdtl=this._model.programDateTimeLatency,e.alang=this._model.audioLanguage,this._model.playbackMode===r.PlaybackMode.AD?this._updateAdPlaybackStats(e):this._progressManager.updatePlaybackStats(e),this._sendBeacon(e))},t.prototype._onVideoProgress=function(t){var e=this._model.getCommonParams();this._updateEventDetails(e,t.beacon),this._progressManager.updatePlaybackStats(e),this._sendBeacon(e)},t.prototype._onAdMetricsAvailable=function(t,e){if(t&&t.evt){t.evt=t.evt.toLowerCase(),"ad_dlv"===t.evt&&(this._adPlayed=!0,this._updateLatencyParams(e,this._player.getPlaybackStartDto())),this._model.adParams=t;for(var n=["string","number","boolean","undefined"],i=0,r=Object.getOwnPropertyNames(t);i<r.length;i++){var s=r[i];(n.indexOf(typeof t[s])>=0||null===t[s])&&o.isNullOrUndefined(e[s])&&(e[s]=t[s])}e.V_sec="pb",this._sendBeacon(e)}},t.prototype._getProfilerTimeDiff=function(t){return t&&o.isNumber(t.timeDiff)&&t.timeDiff.toString()||""},t.prototype._getProfilerTimeStamp=function(t,e){return t&&t.startTime&&e&&(e+t.startTime).toString()||""},t.prototype._updateEventDetails=function(t,e){t&&e&&(t.evt=e.evt,t.V_sec=e.type)},t.prototype._updateAdPlaybackStats=function(t){t.pos=this._model.adParams&&this._model.adParams.pos||"ad",t.dur=this._player.getCurrentTime(),t.dur_d=0,t.buff_info="",t.buf_dur=0},t.prototype._updateLatencyParams=function(t,e){t.apallwd=e.autoPlayAllowed||"",t.jsdt=s.default.getResourceLoadTime(/vdms-player\.js/)||"",t.cssdt=s.default.getResourceLoadTime(/vdms-video-player\.css/)||"",t.swfdt=s.default.getResourceLoadTime(/player\.swf/)||"",t.req_type=this._model.requestType||"",t.req_action=this._model.requestAction||"",t.apl=this._getProfilerTimeDiff(e.autoPlayLatency),t.s_apl=this._getProfilerTimeStamp(e.autoPlayLatency,e.initTime),t.ucl=this._getProfilerTimeDiff(e.clickToPlayLatency),t.tpb=this._getProfilerTimeDiff(e.playbackStartLatency),t.s_tpb=this._getProfilerTimeStamp(e.playbackStartLatency,e.initTime),t.tmeta_call=this._getProfilerTimeDiff(e.cmsLatency),t.s_tsapic=this._getProfilerTimeStamp(e.cmsLatency,e.initTime),t.tsrc_call=this._getProfilerTimeDiff(e.cmsSourceLatency),t.s_tssrcapic=this._getProfilerTimeStamp(e.cmsSourceLatency,e.initTime),t.tadp=this._getProfilerTimeDiff(e.adPluginLatency),t.s_tadpc=this._getProfilerTimeStamp(e.adPluginLatency,e.initTime)},t}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(7),r=function(){function t(){this.version="0.1.240",this.type=i.PluginType.VISUAL_SEEK}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.IMAGE="image",t.SPRITE="sprite"}(e.VisualSeekType||(e.VisualSeekType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),r=function(){function t(t){this._controller=t}return t.prototype.getSize=function(){return this._controller.getPlaylistItems().length},t.prototype.getPosition=function(){return this._controller.getPlaylist()?this._controller.getPlaylist().position:null},t.prototype.sendPrefetchInfo=function(t){return this._controller.sendPrefetchInfo(t)},t.prototype.setPosition=function(t){if(!(t in this._controller.getPlaylistItems()))throw new Error("setPosition called with invalid position");var e=this._controller.autoplay,n=e?{type:i.REQUEST_TYPES.API,action:i.REQUEST_TYPES.AUTOPLAY}:null;this._controller.setPlaylistPosition(t,e,n)},t.prototype.setPositionById=function(t){var e=this._controller.getPlaylistItemIds().indexOf(t);if(-1===e)throw new Error("setPositionById called with id not in playlist");var n=this._controller.autoplay,r=n?{type:i.REQUEST_TYPES.API,action:i.REQUEST_TYPES.AUTOPLAY}:null;this._controller.setPlaylistPosition(e,n,r)},t.prototype.addItem=function(t){this.addItems([t])},t.prototype.addItems=function(t,e){if(Array.isArray(t)){var n=this._controller.mediaStore,i=this._controller.getPlaylist(),r=t.filter(function(t){var e=t.id;return null===n.get(e)});e&&i.removeItems(0,i.size),i.addItems(t),r.length>0&&this._controller.fetchMetadata()}},t.prototype.setItems=function(t){this.addItems(t,!0)},t.prototype.getItems=function(){return this._controller.getPlaylistItemIds()?this._controller.getPlaylistItemIds().slice(0):null},t.prototype.getItemId=function(t){var e=this._controller.getPlaylistItemIds();if(!(t in e))throw new Error("getItemId called with invalid position");return e[t]},t.prototype.getCurrentItemId=function(){var t=this._controller.getCurrentMediaItem();return t?t.id:null},t.prototype.getCurrentItem=function(){var t=this._controller.getCurrentMediaItem();return t?this.getItemById(t.id):null},t.prototype.getCurrentItemTitle=function(){var t=this.getCurrentItem();return t?t.title:null},t.prototype.getCurrentItemLiveStatus=function(){var t=this.getCurrentItem();return t?t.isLive:null},t.prototype.getCurrentItemDescription=function(){var t=this.getCurrentItem();return t?t.description:null},t.prototype.getCurrentItemProviderName=function(){var t=this.getCurrentItem();return t&&t.provider?t.provider.name:null},t.prototype.getCurrentItemMarkers=function(){var t=this._controller.getCurrentMediaItem();return t&&t.videoMarkers||null},t.prototype.getItem=function(t){var e=this._controller.getPlaylistItemIds();if(!(t in e))throw new Error("getItem called with invalid position");return this.getItemById(e[t])},t.prototype.getItemById=function(t){var e=this,n=this._controller.mediaStore;if(!n)return null;var i=n.getById(t);return i?{id:i.id,mimetype:i.mimetype,title:i.title,description:i.description,duration:i.duration,publishTime:i.publishTime,provider:i.provider,credits:i.credits,shareUrl:i.shareUrl,setShareUrl:function(t){e.shareUrl=t,i.shareUrl=t},thumbnail:i.images&&i.images.defaultThumbnail,visualSeek:i.visualSeek,isLive:i.isLive(),closedCaptions:i.closedCaptions,streams:i.streams,videoMarkers:i.videoMarkers,languages:i.getMultiLanguages()}:null},t.prototype.getIndexForId=function(t){return this._controller.getPlaylistItemIds().indexOf(t)},t.prototype.removeItem=function(t){if(!(t in this._controller.getPlaylistItems()))throw new Error("removeItem called with invalid position");this._controller.removePlaylistItems(t,1)},t.prototype.removeItems=function(t,e){var n=this._controller.getPlaylistItems();if(!(t in n&&t+e-1 in n))throw new Error("removeItems called with invalid position/count");this._controller.removePlaylistItems(t,e)},t.prototype.removeItemById=function(t){var e=this._controller.getPlaylistItemIds().indexOf(t);if(-1===e)throw new Error("removeItemById called with id not in playlist");this._controller.removePlaylistItems(e,1)},t.prototype.removeItemsById=function(t){var e=this;t.forEach(function(t){e.removeItemById(t)})},t.prototype.clear=function(){this._controller.removePlaylistItems(0,this._controller.getPlaylistItems().length)},t}();e.default=r},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(6),o=n(1),s=n(2),a=n(5),u=n(33),l=n(42),c=n(4),d=n(0),h=n(85),p="en-us";e.CC_LOCAL_STORAGE="yvpCC";var f,_={none:"",dropshadow:"2px 1px 1px rgba(0, 0, 0, 1)",raised:"3px 3px 4px rgba(0, 0, 0, 0.75)",depressed:"0px -4px 4px rgba(0, 0, 0, 0.54)",uniform:"-2px -2px 0 #000, -2px 2px 0 #000, -2px 0 0 #000, 2px -2px 0 #000, 2px 2px 0 #000, 2px 0 0 #000, 0 -2px 0 #000, 0 2px 0 #000"},m=Math.floor((Math.pow(2,33)-1)/90);!function(t){t.CC_AVAILABILITY_UPDATE="cc-availability-update",t.CC_LIST_FETCHED="cc-list-fetched",t.CC_LIST_FETCHED_MOBILE="cc-list-fetched-mobile",t.TOGGLE_SIMPLE_CC_CONTROLS="cc-toggle-simple-cc-controls"}(f=e.CCControllerEvent||(e.CCControllerEvent={}));var y=function(t){function n(e,n,i){var r=t.call(this,"CC Controller")||this;r._eventBus=e,r._model=n,r._view=i,r._userPreferences=r._model.ccUserPreferences||{},r._syncCCLocalStorage(),r._eventBus.addEventListener(s.VideoEvent.PLAYING,r.onMediaItemPlaybackStarted,r),o.userAgent.tv||r._eventBus.addEventListener(s.AD_BREAK_ENDED,r.onMediaItemPlaybackStarted,r),r._eventBus.addEventListener(s.PLAYBACK_PROGRESS,r._onPlaybackProgress,r),r._eventBus.addEventListener(s.FULLSCREEN_CHANGE,r._adjustCCSizeToScreen,r),r._eventBus.addEventListener(s.API.PLAYER_VIEWPORT_CHANGE,r._adjustCCSizeToScreen,r),r._eventBus.addEventListener(s.VTT_SEGMENT_LOADED,r._loadVttSegment,r),r._eventBus.addEventListener(s.CCEvent.REQUEST_UI_DATA_FOR_MEDIA_ITEM,r.onMediaItemLoaded,r),r._eventBus.addEventListener(s.CCEvent.LANGUAGE_CHANGE,r.onLanguageChange,r),r._eventBus.addEventListener(s.CCEvent.UPDATE_STYLE,r.updateCCStyle,r),r._eventBus.addEventListener(s.CCEvent.POSITION_CHANGE,r._updateCCPosition,r),r._eventBus.addEventListener(s.CCEvent.POSITION_FLOAT,r._floatCCPosition,r),r._eventBus.addEventListener(s.CCEvent.USER_STYLE_PREFERENCES_CHANGE,r._syncCCPreferences,r),r._eventBus.addEventListener(s.SUBTITLE_TRACK_RECEIVED,r._onSubtitleTrackReceived,r),r._currentMediaCCPool=[],r._currentMediaItem=null,r._currentAdItem=null,r._defaultLang=p,r._captionStore={},r._ccElement=document.createElement("div"),d.default.classList(r._ccElement).add("vp-cc-element"),r._CCElementInnerSpan=document.createElement("span"),r._ccElement.appendChild(r._CCElementInnerSpan),r._currentFontSize=r._userPreferences.fontSize,r.updateCCStyle();var a=r._view.getMainElement();return a&&a.appendChild(r._ccElement),o.userAgent.tv&&(r._vttFetcher=new h.default(r._eventBus,r._model)),r._enableCCOnMute=!1,r._model.ccOnMute&&r._model.mute&&(r._enableCCOnMute=!0),r._lastCCText="",r}return i(n,t),n.saveCCSettingsToLocalStorage=function(t){var n=l.default.get(e.CC_LOCAL_STORAGE)||{};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);l.default.put(e.CC_LOCAL_STORAGE,n)},n.getLanguageForCode=function(t){(t=t.toLowerCase().split("-")).length>1&&(t.pop(),t=t.join("-"));return{id:"Bahasa Indonesia",ms:"Bahasa Melayu",cs:"čeština",da:"dansk",de:"Deutsch",et:"eesti",en:"English",es:"español",fil:"Filipino",fr:"français",hr:"hrvatski",it:"italiano",lv:"latviešu",lt:"lietuvių",hu:"magyar",nl:"Nederlands",nb:"norsk bokmål",pl:"polski",pt:"português",ro:"română",sk:"slovenčina",sl:"slovenščina",fi:"suomi",sv:"svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",bg:"български",ru:"русский","sr-cyrl":"Српски",uk:"українська",he:"‎עברית‏‎",ar:"‎العربية‏‎",mr:"मराठी",hi:"हिन्दी",bn:"বাংলা",gu:"ગુજરાતી",ta:"தமிழ்",te:"తెలుగు",kn:"ಕನ್ನಡ",ml:"മലയാളം",th:"ไทย",ur:"اردو زبان",ko:"한국어","zh-hans":"简体中文","zh-hant":"繁體中文",ja:"日本人"}[t]},n.prototype.onMediaItemLoaded=function(t){if(t){if(this._currentMediaItem&&this._currentMediaItem.id!==t.id&&delete this._captionStore[this._currentMediaItem.id],this._currentMediaItem=t,this._isLive=t.isLive(),!this._captionStore[t.id]){var e={ccAvailable:!1,vttPresent:!1,parsedCaptions:null};this._captionStore[t.id]=e,this._canPlayVtt(t)?(e.vttPresent=!0,this._hideAndDisableCC(!0)):(e.ccAvailable=!0,e.vttPresent=!1,this._currentCC=null,this.publish(f.CC_AVAILABILITY_UPDATE,!0),this._processAndPropagateCC(t.closedCaptions))}this._vttFetcher&&this._vttFetcher.onMediaItemLoaded(t)}},n.prototype.destroy=function(){this._captionStore=null},n.prototype.enableAndPersist=function(t){this._enable(!0,t)},n.prototype.disable=function(){this._disable(!1)},n.prototype.disableAndPersist=function(){this._disable(!0)},n.prototype.enable=function(t){this._enable(!1,t)},n.prototype.toggleFromUI=function(t,e){!1===e?t?this.enable():this.disable():t?this.enableAndPersist():this.disableAndPersist()},n.prototype.onAdPlaybackStarted=function(t){var e=this;o.userAgent.tv||window.setTimeout(function(){e._currentAdItem=t,e._hideAndDisableCC()},0)},n.prototype.onAdPlaybackProgress=function(t){var e=t.currentTime,n=t.duration;if(this._currentAdItem){var i=this._currentAdItem.adId||null;i&&this._renderVODCC(i,e,n)}},n.prototype.onMediaItemPlaybackStarted=function(){this._currentAdItem=null;var t=this._currentMediaItem?this._captionStore[this._currentMediaItem.id]:null;t&&t.ccAvailable&&this._propagateCC()},n.prototype.onMediaItemPlaybackEnded=function(){this.disable()},n.prototype.onLanguageChange=function(t){this.enableAndPersist(t)},n.prototype.updateCCStyle=function(){if(this._ccElement){var t=d.default.cssHexToRgb(this._userPreferences.bgColor)||{r:0,g:0,b:0},e=0===this._userPreferences.bgOpacity?"transparent":"rgba("+t.r+","+t.g+","+t.b+","+this._userPreferences.bgOpacity+")",n=_[this._userPreferences.fontEffect];this._ccElement.style.fontFamily=this._userPreferences.fontName,this._adjustCCSizeToScreen(),this._ccElement.style.color=this._userPreferences.fontColor,this._CCElementInnerSpan.style.backgroundColor=e,this._ccElement.style.textShadow=n,this._updateCCPosition("top"===this._userPreferences.ccPos),o.userAgent.tv&&(o.userAgent.samsung&&this._applyExtraCCSettings(),Object.assign(this._ccElement.style,{position:"absolute",width:"100%",textAlign:"center",bottom:"14%",zIndex:"30"}))}},n.prototype._syncCCLocalStorage=function(){var t=l.default.get(e.CC_LOCAL_STORAGE),n=t&&t.ccSettings;if(n)for(var i in n)n.hasOwnProperty(i)&&!c.isNullOrUndefined(n[i])&&(this._userPreferences[i]=n[i])},n.prototype._propagateCC=function(){var t,e=[p],n=this._getCurrentCaptionId(),i=n?this._captionStore[n]:null;if(this._currentMediaCCPool&&this._currentMediaCCPool.length&&(e=this._currentMediaCCPool.map(function(t){return t.lang})),t=this._currentCC&&this._currentCC.lang||this._userPreferences.lang,this._setCCSimpleMode(!1),i&&!i.hasNonNativeCC){var r=i&&i.tracks||null;r&&r.length&&(e=r.map(function(t){return t.language}),t=this._currentTrack&&this._currentTrack.language||this._userPreferences.lang,this._setCCSimpleMode(!0))}this.publish(f.CC_LIST_FETCHED,{langList:e,selectedLang:t});var o=this._userPreferences.show||this._enableCCOnMute;this._view.controls.updateClosedCaptionButtonState(o),this.publish(f.CC_AVAILABILITY_UPDATE,!0),(this._userPreferences.show||this._enableCCOnMute)&&this.enable()},n.prototype._getCurrentCaptionId=function(){var t,e,n=this._model.playbackState;return n&&n.ad?t=n.ad.adId:(e=this._model.playlist.getCurrentItem())&&(t=e&&e.id),t},n.prototype._setCCSimpleMode=function(t){this.publish(f.TOGGLE_SIMPLE_CC_CONTROLS,t)},n.prototype._enable=function(t,e){var n=this,i=this._getCurrentCaptionId(),r=i?this._captionStore[i]:null;if(!r||!r.ccAvailable)return!1;var s=function(){var i=r.tracks||[];return!(!i||i.length<1)&&(n._currentTrack=n._getTrackByLanguage(r,e),!!n._currentTrack&&(i.forEach(function(t){t===n._currentTrack?t.mode="showing":t.mode="hidden"}),n._saveAndPropagateData({show:!0,lang:n._currentTrack.language},t),!0))};return r.vttPresent?(d.default.classList(this._ccElement).remove("vp-hide"),d.default.classList(this._ccElement).add("vp-show"),this._isLive&&d.default.classList(this._ccElement).add("vp-live-cc"),r&&r.hasNonNativeCC?(this._saveAndPropagateData({show:!0,lang:p},t),!0):s()):(this._currentCC=this._getCCByLanguage(e),this._currentCC||(this._currentCC=this._getCCByLanguage(this._userPreferences.lang)||this._currentMediaCCPool[0]),!(!o.userAgent.desktop&&!o.userAgent.tv)&&(this._prepareCCForRendering(this._currentCC,function(e){e?(r.parsedCaptions=n._currentCC.parsedCC,d.default.classList(n._ccElement).remove("vp-hide"),d.default.classList(n._ccElement).add("vp-show"),n._saveAndPropagateData({show:!0,lang:n._currentCC.lang},t)):s()}),!0))},n.prototype._getCCByLanguage=function(t){for(var e,n=0,i=this._currentMediaCCPool;n<i.length;n++){var r=i[n];if(t&&r&&r.lang&&r.lang.toLowerCase()===t.toLowerCase().replace("_","-"))return r;r.lang===p&&(e=r)}return e},n.prototype._prepareCCForRendering=function(t,e){var n=this,i=this._getCurrentCaptionId(),r=i?this._captionStore[i]:null;if(r&&t){var s={url:t.url};if(o.userAgent.ie&&o.userAgent.ie<10&&(s.cors=!0),t.parsedCC)return e&&e(!0);u.default.ajax(t.url,{context:this,failureHandler:function(t){console.warn("Could not fetch CC from endpoint: "+t),n._hideAndDisableCC(),e&&e(!1)},successHandler:function(i){r.parsedCaptions=t.parsedCC=n._grabCCFromTTML(i),r.parsedCaptions&&(r.hasNonNativeCC=!0,n._currentMediaItem&&n._currentMediaItem.setCCAvailability(!0),e&&e(!0)),e&&e(!1)}})}else e&&e(!1)},n.prototype._hideAndDisableCC=function(t){if(this.publish(f.CC_AVAILABILITY_UPDATE,!1),this._currentCC=null,this._currentTrack=null,this.disable(),t){var e=this._getCurrentCaptionId(),n=e?this._captionStore[e]:null;n&&(n.ccAvailable=!1),this._currentMediaCCPool=[]}},n.prototype._disable=function(t){var e=this._getCurrentCaptionId(),n=e?this._captionStore[e]:null;return this._saveAndPropagateData({show:!1},t),this._isLive&&!this._model.playbackState.ad||!n||n.vttPresent||(n.parsedCaptions=null),n&&n.tracks&&n.tracks.forEach(function(t){t.mode="hidden"}),d.default.classList(this._ccElement).remove("vp-show"),d.default.classList(this._ccElement).add("vp-hide"),!0},n.prototype._saveAndPropagateData=function(t,e){var i,r;t||(t={}),i=t&&t.show,r=t&&t.lang,this.publish(s.CCEvent.TOGGLE,i),e&&(c.isBoolean(i)&&(this._userPreferences.show=i,this._enableCCOnMute=i),r&&c.isString(r)&&(this._userPreferences.lang=r),n.saveCCSettingsToLocalStorage({ccSettings:this._userPreferences}))},n.prototype._onPlaybackProgress=function(t,e,n){var i=this._currentMediaItem&&this._currentMediaItem.id||null;i&&(this._isLive?this._renderLiveCC(i,e):this._renderVODCC(i,e,n))},n.prototype._renderLiveCC=function(t,e){var n=this;if(t){var i=this._captionStore[t];if(i&&i.hasNonNativeCC&&this._hideNativeCC(i),i&&i.parsedCaptions&&i.parsedCaptions.length){for(var r=0;r<i.parsedCaptions.length&&i.parsedCaptions[r].end<e;)r++;if(r>0&&(setTimeout(function(){i.parsedCaptions.splice(0,r)},100),r>=i.parsedCaptions.length))return;var o=!1;if(i.parsedCaptions[r]&&(o=e>=i.parsedCaptions[r].begin&&e<=i.parsedCaptions[r].end),o){var s=i.parsedCaptions[r].text||"";this._updateCCTextNode(s,i.parsedCaptions[r].settings)}else this._ccLiveClearTO||(this._ccLiveClearTO=setTimeout(function(){n._updateCCTextNode(""),clearTimeout(n._ccLiveClearTO),n._ccLiveClearTO=null},1e3))}else""!==this._CCElementInnerSpan.innerHTML&&this._updateCCTextNode("")}},n.prototype._renderVODCC=function(t,e,n){if(t){var i=this._captionStore[t];if(i&&i.hasNonNativeCC&&this._hideNativeCC(i),i&&i.ccAvailable&&i.parsedCaptions&&i.parsedCaptions.length){for(var r=e/n,o=i.parsedCaptions.length,s=Math.floor(r*o);s>0&&s<o&&e<i.parsedCaptions[s].begin;)s--;for(;s<o&&e>i.parsedCaptions[s].end;)s++;var a=s>=0&&s<o;if(a=a&&i.parsedCaptions[s].begin<=e&&e<=i.parsedCaptions[s].end&&!!i.parsedCaptions[s].text){var u=i.parsedCaptions[s].text||"";this._updateCCTextNode(u,i.parsedCaptions[s].settings)}else this._updateCCTextNode("")}else this._updateCCTextNode("")}},n.prototype._updateCCTextNode=function(t,e){if(t!==this._lastCCText)if(this._lastCCText=t,t){if(this._CCElementInnerSpan.innerHTML=o.userAgent.tv?t:this._breakLinesAndPadSides(t),e)for(var n=0,i=e;n<i.length;n++){var r=i[n].split(":"),s=r[0],a=r[1];"align"===s&&"start"===a?this._ccElement.style.textAlign="left":"line"===s?this._ccElement.style.top=a:"position"===s&&(this._ccElement.style.left=a,this._ccElement.style.right="")}}else this._CCElementInnerSpan.innerHTML=""},n.prototype._onSubtitleTrackReceived=function(t){if(t&&t.itemId){var e=t.itemId,n=this._captionStore[e];n||(n={ccAvailable:!1,vttPresent:!1,parsedCaptions:null,tracks:[]},this._captionStore[e]=n);var i=t.track;i&&(i.mode="hidden",n.ccAvailable=!0,n.tracks||(n.tracks=[]),n.tracks.push(i));var r=this._getCurrentCaptionId();r&&r===e&&this._propagateCC()}},n.prototype._breakLinesAndPadSides=function(t){var e;if(t){var n=t.split("<br/>");if(n.length>1){for(e=0;e<n.length;e++)n[e].trim()&&(n[e]="&nbsp;"+n[e]+"&nbsp;",e<n.length-1&&(n[e]+="<br/>"));return n.join("")}t=t.trim(),this._CCElementInnerSpan.innerHTML=t;var i=Math.floor(this._CCElementInnerSpan.offsetHeight/(this._currentFontSize+2)),r=[],o=0,s=void 0,a=void 0;for(e=0;e<i;e++)(s=e===i-1)?a=t.length:(a=Math.floor(t.length/i*(e+1)),/\s/.test(t.charAt(a))||(a=t.indexOf(" ",t.lastIndexOf(" ",a)))),a>o&&r.push("&nbsp;"+t.substring(o,a)+"&nbsp;"+(s?"":"<br/>")),o=a+1;return r.join("")}return t},n.prototype._hideNativeCC=function(t){(t&&t.tracks||[]).forEach(function(t){t.mode="hidden"})},n.prototype._syncCCPreferences=function(){this.updateCCStyle()},n.prototype._adjustCCSizeToScreen=function(){var t=0,e=this._view.getMainElement();e&&(t=e.offsetWidth);var n=Math.ceil(this._userPreferences.fontSize*(t/640));t>640?n=Math.ceil(.8*n):t<640?n<10&&(n=10):n=this._userPreferences.fontSize,this._currentFontSize=n,this._ccElement.style.fontSize=this._currentFontSize+"px"},n.prototype._loadVttSegment=function(t,e){if(t){var n=t.itemId;if(n){var i=this._captionStore[n];if(i||(i={ccAvailable:!1,vttPresent:!1,parsedCaptions:null},this._captionStore[n]=i),i.hasNonNativeCC=!0,!i.parsedCaptions||!i.ccAvailable){i.parsedCaptions=i.parsedCaptions||[],i.vttPresent=!0,i.ccAvailable=!0;var r=this._model.playlist.getMediaItemById(n);r&&r.setCCAvailability(!0);var o=this._getCurrentCaptionId();o&&o===n&&this._propagateCC()}if(i.vttPresent){var s=t.adjustedTime?t.adjustedTime:0,a=this._parseVTT(t.data||"",s,e);i.parsedCaptions=this._appendToCaptionStore(i.parsedCaptions,a)}}}},n.prototype._appendToCaptionStore=function(t,e){if(t&&e){if(!t.length)return e;for(var n=0;n<e.length;){for(var i=t.length-1;i>=0;){if(t[i].begin===e[n].begin){t.splice(i,1,e[n]);break}if(!(t[i].begin>e[n].begin)){t.splice(i+1,0,e[n]);break}i--}-1===i&&t[0].begin>e[n].begin&&t.unshift(e[n]),n++}return t}},n.prototype._canPlayVtt=function(t){if(!t)return!1;if(this._isLive||!this._isLive&&t.rendererType===a.RendererType.HTML5_HLS){var e=t.getSubtitleStreams();if(e&&e.length>0)return!0}return!t.closedCaptions||!t.closedCaptions.length},n.prototype._processAndPropagateCC=function(t){var e=this;this._getCCByRenderer(function(t){e._currentMediaCCPool=t,e._currentMediaCCPool.length>0?(o.userAgent.mobile?e.publish(f.CC_LIST_FETCHED_MOBILE,{langList:e._currentMediaCCPool,selectedLang:e._userPreferences.lang}):(e.publish(f.CC_LIST_FETCHED,{langList:e._currentMediaCCPool.map(function(t){return t.lang}),selectedLang:e._userPreferences.lang}),e._currentMediaItem&&e._currentMediaItem.setCCAvailability(!0)),e._userPreferences.show||e._enableCCOnMute?e.enable(e._userPreferences.lang):e.disable()):(e._hideAndDisableCC(!0),console.warn("CC could not load for current mediaItem"))},t,o.userAgent.desktop||o.userAgent.tv)},n.prototype._transformTTMLToVTT=function(t,e){var n=this,i=!1,r=[];e.forEach(function(o){n._ccUrlToVttBlobUrl(o.url,function(n){n?(o.url=n,function(n){r.push(n),r.length===e.length&&t(r)}(o)):(!i&&t(r),i=!0)})})},n.prototype._ccUrlToVttBlobUrl=function(t,e){var n=this,i={url:t};o.userAgent.ie&&o.userAgent.ie<10&&(i.cors=!0);u.default.ajax(t,{context:this,failureHandler:function(){return e(null)},successHandler:function(i){try{var r=t.indexOf("ttml")>-1?n._ttmlToVtt(i):i,o=new Uint8Array(n._utf8ToBytes(r)),s=URL.createObjectURL(new Blob([o],{type:"text/vtt"}));e(s)}catch(t){console.log("Exception occurred in converting TTML to VTT",t),e(null)}}})},n.prototype._getCCByRenderer=function(t,e,n){var i,r=function(t){return t.content_type===i};if(n)i="application/ttml+xml",t(e.filter(r));else{i="text/vtt";var o=e.filter(r);0===o.length?this._transformTTMLToVTT(t,e):t(o)}},n.prototype._utf8ToBytes=function(t){for(var e=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<=127)e.push(i);else{var r=n;i>=55296&&i<=57343&&n++;for(var o=0,s=encodeURIComponent(t.slice(r,n+1)).substr(1).split("%");o<s.length;o++){var a=s[o];e.push(parseInt(a,16))}}}return e},n.prototype._ttmlToVtt=function(t){var e="WEBVTT\n\n",n=(new window.DOMParser).parseFromString(t,"application/xml").documentElement.querySelectorAll("p");return Array.prototype.forEach.call(n,function(t){var n=t.getAttribute("id"),i=t.getAttribute("begin"),r=t.getAttribute("end"),o="";Array.prototype.forEach.call(t.childNodes,function(t){""!==t.textContent&&(o+=t.textContent+" ")}),o=o.replace(/<br.*?\/\>/," "),e+=n+"\n",e+=i+" --\x3e "+r+"\n",e+=o+"\n\n"}),e},n.prototype._grabCCFromTTML=function(t){for(var e=[],n=0,i=(new window.DOMParser).parseFromString(t,"application/xml").documentElement.querySelectorAll("p");n<i.length;n++){var r=i[n],o={};if(o.begin=this._parseToSeconds(r.getAttribute("begin")),o.end=this._parseToSeconds(r.getAttribute("end")),!o.end&&(o.end=this._parseToSeconds(r.getAttribute("dur"))&&this._parseToSeconds(r.getAttribute("begin"))+this._parseToSeconds(r.getAttribute("dur")),!o.end)){e=null,this._hideAndDisableCC(!0);break}""!==r.textContent&&(o.text=r.textContent),e.push(o)}return e},n.prototype._parseVTT=function(t,e,n){for(var i,r,s,a,u=t.split(/\r\n|\r|\n/),l=u.length,c=/((?:\d{2,}:)?\d{2}:\d{2}\.\d{2,3})\s+.+\s+((?:\d{2,}:)?\d{2}:\d{2}\.\d{2,3})/,d=[],h=0,p=0,f=0;f<l;f++)if(c.test(u[f])){if(p>0){for(s=u[r=f-1]&&u[r].trim(),a=u[r-1]&&u[r-1].trim(),""!==s&&""===a&&r--,i=p;i<=r;i++)d[h].text+=u[i]+(i+1<=r?"<br/>":"");h++}var _=u[f].match(c);if(!_)continue;!n||this._zeroTimeIndicator||o.userAgent.tizen||(this._zeroTimeIndicator=1e3*this._parseToSeconds(_[1]));var y=1e3*this._parseToSeconds(_[1]),v=1e3*this._parseToSeconds(_[2]);n&&!o.userAgent.tizen?(y-=this._zeroTimeIndicator,v-=this._zeroTimeIndicator):(y=y%m+e,v=v%m+e),d[h]={begin:y/1e3,end:v/1e3,text:""},p=f+1;for(var g=[],E=u[f].split(/\s+/).filter(function(t){return t.length>0}),b=3;b<E.length;b++)g.push(E[b]);g.length>0&&(d[h].settings=g)}if(p>0&&p<l)for(i=p;i<l;i++)d[h].text+=u[i]+(i+2<l?"<br/>":"");return d},n.prototype._parseToSeconds=function(t){var e,n,i=0;if(t)for(var r=(n=(e=t.split(":")).length)-1;r>=0;r--)i+=e[n-1-r]*Math.pow(60,r);return i},n.prototype._getTrackByLanguage=function(t,e){var n,i=t&&t.tracks||[],r=function(t){i.some(function(e){var i=e.language;return!(!i||!t||i.toLowerCase()!==t.toLowerCase())&&(n=e,!0)})};return r(e=e||this._userPreferences.lang||p),!n&&this._userPreferences.lang&&r(this._userPreferences.lang),!n&&i[0]&&(n=i[0]),n},n.prototype._floatCCPosition=function(t){var e=this._ccElement,n=this._getCurrentCaptionId(),i=n?this._captionStore[n]:null;i&&i.ccAvailable&&!d.default.classList(e).contains("vp-hide")&&("bottom"===this._userPreferences.ccPos&&(t?(d.default.classList(e).remove("float"),d.default.classList(e).remove("bottom")):(d.default.classList(e).add("float"),d.default.classList(e).add("bottom"))))},n.prototype._updateCCPosition=function(t){var e=this._ccElement;t?(d.default.classList(e).remove("bottom"),d.default.classList(e).add("top")):(d.default.classList(e).add("bottom"),d.default.classList(e).remove("top"))},n.prototype._applyExtraCCSettings=function(){var t=_[this._userPreferences.fontEffect],e=this._userPreferences.windowBgColor&&d.default.cssHexToRgb(this._userPreferences.windowBgColor)||{r:0,g:0,b:0},n=0===this._userPreferences.windowBgOpacity?"transparent":"rgba("+e.r+","+e.g+","+e.b+","+this._userPreferences.windowBgOpacity+")";this._ccElement.style.backgroundColor=n;var i=this._userPreferences.fontColor&&d.default.cssHexToRgb(this._userPreferences.fontColor)||{r:255,g:255,b:255},r=0===this._userPreferences.fontOpacity?"transparent":"rgba("+i.r+","+i.g+","+i.b+","+this._userPreferences.fontOpacity+")";this._CCElementInnerSpan.style.color=r;var o=this._userPreferences.fontEdgeColor&&d.default.cssHexToRgb(this._userPreferences.fontEdgeColor)||{r:255,g:255,b:255};switch(this._userPreferences.fontEffect){case"dropshadow":case"raised":case"depressed":t=t.replace("rgba(0, 0, 0","rgba("+o.r+", "+o.g+", "+o.b);break;case"uniform":t=t.replace(/#000/g,this._userPreferences.fontEdgeColor)}this._ccElement.style["text-shadow"]=t},n}(r.default);e.CCController=y},function(t,e,n){"use strict";var i=n(147),r=n(148),o=n(149),s=n(153);function a(t,e,n){var i=t;return r(e)?(n=e,"string"==typeof t&&(i={uri:t})):i=s(e,{uri:t}),i.callback=n,i}function u(t,e,n){return l(e=a(t,e,n))}function l(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,n=function(n,i,r){e||(e=!0,t.callback(n,i,r))};function i(t){return clearTimeout(c),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,n(t,y)}function r(){if(!a){var e;clearTimeout(c),e=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=y,r=null;return 0!==e?(i={body:function(){var t=void 0;if(t=l.response?l.response:l.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(l),m)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:e,method:h,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(i.headers=o(l.getAllResponseHeaders()))):r=new Error("Internal XMLHttpRequest Error"),n(r,i,i.body)}}var s,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var c,d=l.url=t.uri||t.url,h=l.method=t.method||"GET",p=t.body||t.data,f=l.headers=t.headers||{},_=!!t.sync,m=!1,y={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:l};if("json"in t&&!1!==t.json&&(m=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===t.json?p:t.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(r,0)},l.onload=r,l.onerror=i,l.onprogress=function(){},l.onabort=function(){a=!0},l.ontimeout=i,l.open(h,d,!_,t.username,t.password),_||(l.withCredentials=!!t.withCredentials),!_&&t.timeout>0&&(c=setTimeout(function(){if(!a){a=!0,l.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",i(t)}},t.timeout)),l.setRequestHeader)for(s in f)f.hasOwnProperty(s)&&l.setRequestHeader(s,f[s]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p||null),l}t.exports=u,t.exports.default=u,u.XMLHttpRequest=i.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:i.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){u["delete"===t?"del":t]=function(e,n,i){return(n=a(e,n,i)).method=t.toUpperCase(),l(n)}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(33),o=10,s=function(){function t(t,e){this._vttIndex=3,this._eventBus=t,this._eventBus.addEventListener(i.PLAYBACK_PROGRESS,this._onPlaybackProgress,this),this._eventBus.addEventListener(i.PLAYBACK_RESUMED,this._onPlaybackResumed,this),this._model=e;var n=e.vttIndex;n>=1&&n<=o&&(this._vttIndex=n),this._vttPlaylistURL="",this._language="",this._vttList=[],this._resumed=!1,this._endReached=!1}return t.prototype.onMediaItemLoaded=function(t){var e=this;if(t.isLive()&&t&&t.streams&&t.streams[0]&&t.streams[0].url){var n=t.streams[0].url;this._urlPrefix=n.substring(0,n.lastIndexOf("/"));r.default.ajax(n,{context:this,failureHandler:function(t){return console.warn("Could not fetch m3u8: "+t)},successHandler:function(t){if(-1!==t.indexOf("#EXTM3U")){for(var n=/#*BANDWIDTH=([0-9]+)/g,r=[],o=n.exec(t);null!==o;)r.push(o[1]),o=n.exec(t);r&&e._eventBus.publish(i.CTV.GET_BITRATE_FOR_OPSS,r);var s=t.match(/TYPE=SUBTITLES.+URI=['|"](.+?)['|"]/);if(s){var a=s[0].match(/LANGUAGE=['|"](.+?)['|"]/);if(!a)return;e._language=a[1],e._vttPlaylistURL=e._completeURL(s[1]),0===e._vttPlaylistURL.indexOf("http")&&(e._urlPrefix=e._vttPlaylistURL.substring(0,e._vttPlaylistURL.lastIndexOf("/")),console.log("urlPrefix updated to:"+e._urlPrefix)),console.log("vttplaylisturl:"+e._vttPlaylistURL)}}}})}},t.prototype._onPlaybackProgress=function(t,e){if(!this._endReached&&this._vttPlaylistURL)return this._lastTime||0===this._lastTime?this._resumed?(this._resumed=!1,this._lastTime=e,this._vttList=[],void this._updateVttList()):void(e-this._lastTime>=2&&(this._lastTime+=2,this._updateVttList())):(this._lastTime=e,void this._updateVttList())},t.prototype._onPlaybackResumed=function(){this._resumed=!0},t.prototype._updateVttList=function(){var t=this;if(this._vttPlaylistURL){r.default.ajax(this._vttPlaylistURL,{context:this,successHandler:function(e){var n=0,i=e.match(/#EXT-X-MEDIA-SEQUENCE:(.+)/);if(i&&(n=Number(i[1])),0===t._vttList.length)t._addVttDataToList(e,n);else{var r=e.lastIndexOf("#EXTINF:"),o=e.match(/#EXTINF:/g).length,s=e.substring(r);t._addVttDataToList(s,n+o-1)}t._endReached=e.indexOf("#EXT-X-ENDLIST")>-1},failureHandler:function(t){return console.warn("Could not fetch VTT m3u8: "+t)}})}},t.prototype._addVttDataToList=function(t,e){for(var n="",i=0,r=0,s=t.split(/\r\n|\r|\n/);r<s.length;r++){var a=s[r];if(a){var u=a.match(/#EXT-X-PROGRAM-DATE-TIME:(.+)/);if(u)n=u[1];else{var l=a.match(/#EXTINF:(.+),/);if(l)i=parseInt(l[1],10);else if("#"!==a.charAt(0)){var c=this._vttList[this._vttList.length-1];if(c&&a===c.url)return;var d={};d.url=a,d.seqNum=e++,n&&(d.dateTime=n),i&&(d.duration=i),this._language&&(d.language=this._language),this._vttList.push(d),this._vttList.length>o&&this._vttList.shift(),this._sendVttEvent()}}}}},t.prototype._sendVttEvent=function(){var t=this,e=this._vttList[this._vttList.length-this._vttIndex];if(e){r.default.ajax(this._completeURL(e.url),{context:this,failureHandler:function(t){return console.warn("Could not load VTT: "+t)},successHandler:function(n){var r={mpegTSTime:0,localCueTime:0,clockReference:0};r.data=n,t._eventBus.publish(i.VTT_SEGMENT_LOADED,r,!0,t._vttIndex,t._completeURL(e.url))}})}},t.prototype._completeURL=function(t){return 0===t.indexOf("http")?t:"/"===t.charAt(0)?this._urlPrefix+t:this._urlPrefix+"/"+t},t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15);e.mediaItemSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/mediaItemSchema",type:"object",properties:{adConfig:{type:"object",properties:{mimetype:{type:"string"},value:{type:{}}}},customConfig:{type:"object"},id:{type:"string"},metadata:{type:"object",properties:{description:{type:"string"},duration:{type:"number"},title:{type:"string"},thumbnail:{type:"string"},type:{type:"string",enum:Object.keys(i.MediaItemType).map(function(t){return i.MediaItemType[t]})},videoTypes:{type:"array"}}},mimetype:{type:"string"},source:{$ref:"/sourceSchema"}},dependencies:{mimetype:["id"]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sourceSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/sourceSchema",type:"object",properties:{streams:{type:"array",items:{$ref:"/streamSchema"},minItems:0}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(11),o=n(159),s=n(219),a=n(18),u=n(42),l=n(19),c=n(4),d=n(0),h=n(60),p=n(61),f=n(224),_=n(225),m=function(){function t(e,n,i){this.consent={gdprApplies:null,consentData:null},this._version="0.1.240",this._jshlsVersion="1.1.210",this._waitingForUserTap=!1,this._drmSystem="none",this._isDrmAvailable=!1,this._uiState=new _.default,this._playbackConfig={desiredBitrate:t.DESIRED_BITRATE,mp4Abr:!1,bitrate:0,bitrates:[],heights:[],startTime:NaN,preconnect:!0,skipFormats:[],isResumingFromSavedPosition:!1,requestType:null,requestAction:null,playlistLoop:!1},this._guid=i,this._errors=[],this._config=e,this._playerConfig=this._configure(e),this._overrideAutoplay(),this._determineWaitingForUserTap(),this._overrideStartScreen(),this._prepareMediaStore(n),this._preparePlayerHostingConfig(),this._getConsentData(),this.playlist=new f.default(this._mediaStore),this.playlist.addItems(this._playerConfig.mediaItems),this.ccUserPreferences={show:!1,lang:"en-US",fontSize:24,fontName:"Arial, Helvetica, sans-serif",fontColor:"#ffffff",fontOpacity:1,fontEffect:"none",bgColor:"#000000",bgOpacity:.75,ccPos:"bottom",isAvailable:!1},this.rendered=!1}return t.prototype.destroy=function(){this.playlist.destroy(),this.rendererTypes=[],this.adsRendererTypes=[]},Object.defineProperty(t.prototype,"config",{get:function(){return this._playerConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"site",{get:function(){return this._playerConfig.site||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"region",{get:function(){return this._playerConfig.region||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{get:function(){return this._playerConfig.lang||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fastInitRecoverer",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"recoveryFailureTimeout",{get:function(){return t.RECOVERY_FAILURE_TIMEOUT},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ccOnMute",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.ccOnMute;return t&&void 0!==t.ccOnMute?t.ccOnMute:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"chromeless",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.chromeless;return t&&void 0!==t.chromeless?t.chromeless:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"docking",{get:function(){var t=this._playerConfig.ui;return t?t.docking:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logos",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.logos;return t?t.logos:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showControls",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.showControls;return t&&void 0!==t.showControls?t.showControls:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startScreenConfig",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.startScreen;return t?t.startScreen:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTitleOnStart",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.title.showOnStart;return t&&t.title?t.title.showOnStart:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showTitleOnHover",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.title.showOnHover;return t&&t.title&&void 0!==t.title.showOnHover?t.title.showOnHover:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showStartScreen",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.startScreen.show;return t&&t.startScreen&&void 0!==t.startScreen.show?t.startScreen.show:e},set:function(t){var e=this._playerConfig.ui;e&&e.startScreen&&(e.startScreen.show=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showFullscreenButton",{get:function(){var t=this._playerConfig.ui,e=h.defaultConfigs.ui.showFullscreenButton;return t&&void 0!==t.showFullscreenButton?t.showFullscreenButton:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showReplayOnlyEndScreen",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stopAtLastFrame",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thumbnailDimensions",{get:function(){return{width:this.uiState.width,height:this.uiState.height}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vttIndex",{get:function(){return-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playlistUIConfig",{get:function(){var t=h.defaultConfigs.ui.playlist,e=this._playerConfig.ui;return e?e.playlist:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"continuousPlay",{get:function(){var t=this._playerConfig.continuousPlay;return void 0===t?h.defaultConfigs.continuousPlay:t},set:function(t){this._playerConfig.continuousPlay=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"adPlaybackOnly",{get:function(){var t=this._playerConfig.adPlaybackOnly;return void 0===t?h.defaultConfigs.adPlaybackOnly:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoplay",{get:function(){var t=this._playerConfig.autoplay;return void 0===t?h.defaultConfigs.autoplay:t},set:function(t){this._playerConfig.autoplay=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stopBufferingOnPause",{get:function(){var t=this._playerConfig.stopBufferingOnPause;return void 0===t?h.defaultConfigs.stopBufferingOnPause:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preload",{get:function(){var t=this._playerConfig.preload;return void 0===t?h.defaultConfigs.preload:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullscreen",{get:function(){var t=this._playerConfig.fullscreen;return void 0===t?h.defaultConfigs.fullscreen:t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipWatchedVideos",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitrate",{get:function(){return this._playbackConfig.bitrate},set:function(t){this._playbackConfig.bitrate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"quality",{get:function(){return"auto"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitrates",{set:function(t){this._playbackConfig.bitrates=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"heights",{set:function(t){this._playbackConfig.heights=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mp4Abr",{get:function(){return this._playbackConfig.mp4Abr},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._playbackConfig.startTime},set:function(t){this._playbackConfig.startTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preconnect",{get:function(){return this._playbackConfig.preconnect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isResumingFromSavedPosition",{set:function(t){this._playbackConfig.isResumingFromSavedPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestType",{get:function(){return this._playbackConfig.requestType},set:function(t){this._playbackConfig.requestType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"requestAction",{get:function(){return this._playbackConfig.requestAction},set:function(t){this._playbackConfig.requestAction=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playlistLoop",{get:function(){return this._playbackConfig.playlistLoop},set:function(t){this._playbackConfig.playlistLoop=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"desiredBitrate",{get:function(){return this._playbackConfig.desiredBitrate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uiState",{get:function(){return this._uiState},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playbackState",{get:function(){return this._playbackState},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"waitingForUserTap",{get:function(){return this._waitingForUserTap},set:function(t){this._waitingForUserTap=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forcePreloadBufferLimit",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"userPreferences",{get:function(){return{closedCaptions:{show:!1,lang:"en-US",fontSize:24,fontName:"Arial, Helvetica, sans-serif",fontColor:"#ffffff",fontOpacity:1,fontEffect:"none",bgColor:"#000000",bgOpacity:.75,ccPos:"bottom",isAvailable:!1},isAdult:null,isAuthenticated:!0}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playerWidth",{get:function(){return this._playerConfig.width||0},set:function(t){this._playerConfig.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playerHeight",{get:function(){return this._playerConfig.height||0},set:function(t){this._playerConfig.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"skipOnError",{get:function(){return this._playerConfig.skipOnError||h.SkipOnError.NEVER},set:function(t){this._playerConfig.skipOnError=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"liveUnloadOnPause",{get:function(){return this._playerConfig.liveUnloadOnPause||!0},set:function(t){this._playerConfig.liveUnloadOnPause=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDrmAvailable",{set:function(t){this._isDrmAvailable=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"drmSystem",{set:function(t){t&&(this._drmSystem=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"muteMode",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"jshlsVersion",{get:function(){return this._jshlsVersion},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"casting",{get:function(){return void 0===this._playerConfig.casting||this._playerConfig.casting},enumerable:!0,configurable:!0}),t.prototype.setShowStartScreen=function(){(!this.autoplay||this.playbackState&&this.waitingForUserTap)&&!this.chromeless&&(this.showStartScreen=!0)},Object.defineProperty(t.prototype,"guid",{get:function(){return this._guid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputConfig",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},set:function(t){this._errors=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstCriticalError",{get:function(){for(var t=0,e=this.errors;t<e.length;t++){var n=e[t];if(n.category||n.subcategory)return n}return null},enumerable:!0,configurable:!0}),t.prototype.setPlaybackState=function(t){if(this._playbackState)throw new Error("playbackState is already set");this._playbackState=t,this._overrideMute(),this._overrideVolume()},t.prototype.isPlaylistStructured=function(){return!1},t.prototype.isLocal=function(){return this._version.indexOf("local")>-1},t.prototype.isMobileStrmInlineExpr=function(){return(i.userAgent.ios||i.userAgent.android)&&l.default.canPlayInline},t.prototype.isAutoplayAllowed=function(){var t=!0!==l.default.network.mobile;return!i.userAgent.mobile||l.default.autoplaySupported&&t},t.prototype.isMobileWebAutoplayCase=function(){return i.userAgent.mobile&&(this.autoplay||this.isMobileStrmInlineExpr())},t.prototype.endVideo=function(){this._playbackConfig.bitrate=0},Object.defineProperty(t.prototype,"loop",{get:function(){var t=this._playerConfig.loop;return void 0===t&&(t=h.defaultConfigs.loop),this.getPlaylistRenderingType()===r.PlaylistRenderingType.ONLY_MEDIA_ITEMS?t:!(!this.playlist.isEndOfPlaylist()&&t)&&t},set:function(t){c.isBoolean(t)&&(this._playerConfig.loop=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mute",{get:function(){return this._playbackState&&this._playbackState.mute},set:function(t){this._playbackState&&c.isBoolean(t)&&(this._playbackState.mute=t)},enumerable:!0,configurable:!0}),t.prototype.getState=function(){return this.playbackState.state},t.prototype.setState=function(t){this._playbackState&&(Object.keys(a.States).indexOf(t.toUpperCase())>-1&&(this.playbackState.state=t))},Object.defineProperty(t.prototype,"volume",{get:function(){return this._playbackState&&this._playbackState.volume},set:function(t){this._playbackState&&c.isNumber(t)&&t>=0&&t<=1&&(this._playbackState.volume=t)},enumerable:!0,configurable:!0}),t.prototype.isPaused=function(){return this.playbackState&&this.playbackState.paused},t.prototype.setPaused=function(t){this.playbackState&&c.isBoolean(t)&&(this.playbackState.paused=t)},t.prototype.isSeeking=function(){return this.playbackState&&this.playbackState.seeking},t.prototype.setSeeking=function(t){this.playbackState&&c.isBoolean(t)&&(this.playbackState.seeking=t)},t.prototype.isLoading=function(){return this.playbackState&&this.playbackState.loading},t.prototype.setLoading=function(t){this.playbackState&&c.isBoolean(t)&&(this.playbackState.loading=t)},t.prototype.getPlaylistRenderingType=function(){var t=this.playlist&&this.playlist.playlistId,e=this._config&&this._config.playlist,n=e&&e.mediaItems||[];return t?0===n.length?r.PlaylistRenderingType.PLAYLIST_ID:r.PlaylistRenderingType.PLAYLIST_ID_AND_MEDIA_ITEMS:r.PlaylistRenderingType.ONLY_MEDIA_ITEMS},Object.defineProperty(t.prototype,"mediaStore",{get:function(){return this._mediaStore},enumerable:!0,configurable:!0}),t.prototype.getEventsDto=function(){var t={rendererType:this.playbackState&&this.playbackState.rendererType,playerVersion:this._version,autoPlay:this.autoplay,mute:this.mute,paused:this.isPaused(),docking:this.docking,requestType:this.requestType,requestAction:this.requestAction,playerRootElement:this.playerRootElement,uiState:{width:this.uiState.width,height:this.uiState.height,isFullScreen:this.uiState.isFullscreen,isDocked:this.uiState.isDocked},drmsys:this._drmSystem,drm:this._isDrmAvailable,playbackMode:this.playbackState&&this.playbackState.playbackMode,currentMediaType:this.playbackState&&this.playbackState.currentMediaType},e=this.playlist.getCurrentItem();return e?d.default.extend(t,{videoId:e.id,sessionId:e.videoSession,videoLength:e.duration,isLive:e.isLive(),isCCAvailable:e.isCCAvailable,cdn:e.getCDN(),samplingId:e.samplingId,audioLanguage:e.getCurrentAudioLanguage(),mediaItemRendererType:e.rendererType,customConfig:e.customConfig,brandingData:e.brandingData,streamProtocol:e.getStreamProtocol(),license:e.license,title:e.title,description:e.description,aspectRatio:e.getAspectRatio()}):t},t.prototype._configure=function(t){var e=d.default.deepCopy(t);return e=d.default.mergeObjects(e,h.defaultConfigs),e=this._finalizeConfiguration(e)},t.prototype._finalizeConfiguration=function(t){if(!t)return t;var e=t.ui;e&&e.chromeless&&(e.startScreen&&(e.startScreen.show=!1),e.endScreen&&(e.endScreen.show=!1),e.showControls=!1);var n=t.connectionType;return n&&n.raw&&"boolean"==typeof n.mobile&&l.default.updateNetwork(n.mobile,n.raw),t},t.prototype._overrideAutoplay=function(){!u.default.get("vp-dont-autoplay")&&this.isAutoplayAllowed()||(this.autoplay=!1)},t.prototype._overrideMute=function(){this.muteMode&&(this.mute=!0),i.userAgent.desktop&&this.autoplay&&(i.userAgent.safari>=11||(i.userAgent.chrome>=66||i.userAgent.edge>=17)&&l.default.needsGestureToPlayUnmuted)&&(this.mute=!0)},t.prototype._overrideVolume=function(){if(i.userAgent.mobile&&l.default.autoplaySupported)return this.volume=1,void(this.mute=!0);var t=1,e=!1,n=u.default.get(r.LocalStorageKey.VOLUME);n&&(t=n.volume,e=n.mute),null===this.volume&&(this.volume=t),null===this.mute&&(this.mute=e)},t.prototype._overrideStartScreen=function(){(!this.autoplay||this.playbackState&&this.waitingForUserTap)&&!this.chromeless&&(this.showStartScreen=!0)},t.prototype._prepareRenderers=function(){this.rendererTypes=s.default.getRendererTypes(),this.adsRendererTypes=s.default.getAdRendererTypes();var t=this.rendererTypes.slice(0);this.adsRendererTypes.forEach(function(e){-1!==t.indexOf(e)&&t.push(e)}),this.capabilities=this._getCapabilities(t)},t.prototype._getCapabilities=function(t){var e=this,n={};return t?(t.forEach(function(t){var i=o.default.get(t);i&&(n[t]=i,e._playbackConfig.skipFormats.length>0&&(n[t].preferredFormats=n[t].preferredFormats.filter(function(t){return-1===e._playbackConfig.skipFormats.indexOf(t)})))}),n):n},t.prototype._prepareMediaStore=function(t){this._prepareRenderers(),this._mediaStore=t||new p.default(this.rendererTypes,this.adsRendererTypes,this.capabilities)},t.prototype._preparePlayerHostingConfig=function(){var t={},e=d.default.getSingleton("PlayerHosting");e&&e.ver&&e.ver===this.version&&(t.bucket=e.bucket,t.env=e.env,t.colo=e.colo,t.config=e.config&&"object"==typeof e.config?e.config:null,t.log=e.req&&e.req.usm&&e.req.usm.config&&e.req.usm.config.log||""),this.playerHostingConfig=t},t.prototype._determineWaitingForUserTap=function(){l.default.canPlayInline&&l.default.autoplayByUIEvtOnly&&this.autoplay&&(this.waitingForUserTap=!0)},t.prototype._getConsentData=function(){var t=this;void 0!==window.__cmp&&window.__cmp("getConsentData",null,function(e){t.consent.gdprApplies=e.gdprApplies,t.consent.consentData=e.consentData})},t.DESIRED_BITRATE=900,t.RECOVERY_FAILURE_TIMEOUT=120,t}();e.default=m},function(t,e,n){"use strict";function i(){}t.exports=i,i.prototype.destroy=function(){},i.prototype.parse=function(t,e){for(var n=[],i=0;255===t[e];)i+=255,e++;if(i+=t[e],!(++e>=t.length)){for(var r=0;255===t[e];)r+=255,e++;if(r+=t[e],e++,4===i){var o=t[e],s=t[e+1]<<8|t[e+2],a=t[e+3]<<24|t[e+4]<<16|t[e+5]<<8|t[e+6],u=t[e+7];if(181===o&&49===s&&1195456820===a&&3===u){var l=31&t[e+8];e+=9;var c,d,h=0;for(e++;h<l;){if(c=(4&t[e])>>2,d=3&t[e],c&&(0===d||1===d)){var p={fieldType:d,data1:t[e+1],data2:t[e+2]};n.push(p)}e+=3,h++}}}return e+=r,n}}},function(t,e,n){"use strict";t.exports=i;function i(){}i.prototype._getID3Data=function(t,e){for(var n=e,i=0;this._isHeader(t,e);)i+=10,i+=this._readSize(t,e+6),this._isFooter(t,e+10)&&(i+=10),e+=i;return i>0?t.subarray(n,n+i):null},i.prototype._isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},i.prototype._isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},i.prototype._readSize=function(t,e){var n=(127&t[e])<<21;return n|=(127&t[e+1])<<14,n|=(127&t[e+2])<<7,n|=127&t[e+3]},i.prototype.getString=function(t){var e=this._getID3Data(t,0);if(!e||!e.length)return null;for(var n="",i=0;i<e.length;i++)n+=String.fromCharCode(e[i]);return n},i.prototype._extendedHeaderSize=function(t){return 100===t[5]?self._readSize(t,10):0},i.prototype._getFrameId=function(t,e){var n=t.subarray(e,e+4);return String.fromCharCode.apply(null,n)},i.prototype.getID3Payload=function(t){var e=this._getID3Data(t,0);if(!e||!e.length)return null;var n=10+this._extendedHeaderSize(e);return{key:this._getFrameId(e,n),data:e.subarray(n+10)}},i.prototype.extractID3FromMessage=function(t){if(!t)return null;t=new Uint8Array(t);for(var e=0;!this._isHeader(t,e);)e++;return e+10>t.length?null:t.subarray(e)}},function(t,e,n){"use strict";t.exports=b;var i=n(12).HLSEvent,r=n(24),o=n(168),s=o.StreamingController,a=o.Events,u=n(202),l=n(17).MetadataTypes,c=n(10).CmdNames,d=n(50),h=n(25),p=n(98),f=n(16),_=n(3),m=n(17).Model,y=n(203),v=n(21),g=n(34),E=n(66).userAgent;function b(t,e){f.call(this,this.constructor.name),this._properties=t,this._callback=e,this.model=this.create(m,t),this.services=this.create(y),this._parser=this.services.metadataParser,this._commandManager=this.create(d),this._streamingController=this.create(s,this._commandManager),this._bufferMonitor=this.create(u),this._state=p.INITIAL,this._eventKeys={},this._inWorkerScope=this._properties.config.inWorkerScope,this._addEventListeners(),this._seeking=!1,this._playStarted=!1,this._processTimer=new h(250),this._processTimer.addEventListener(this._process,this),this.initialize()}_.inherits(b,f),b.prototype.create=function(){var t=Array.prototype.slice.call(arguments),e=t.shift(),n=Object.create(e.prototype);return n.__controller=this,e.apply(n,t),n},b.prototype.destroy=function(){this._streamingController&&(this._streamingController.destroy(),this._streamingController=null),this._bufferMonitor&&(this._bufferMonitor.destroy(),this._bufferMonitor=null),this._commandManager&&(this._commandManager.destroy(),this._commandManager=null),this.services&&(this.services.destroy(),this.services=null),this._processTimer&&(this._processTimer.destroy(),this._processTimer=null),this._state=p.INITIAL,this.removeEventListeners(this._eventKeys),f.prototype.destroy.call(this)},b.prototype.initialize=function(){this._loadMetadata()},b.prototype.getSegInfo=function(){var t=this._streamingController.getMetrics();return this._inWorkerScope&&this.sendEvent(i.SEG_INFO_METRICS_AVAILABLE,t),t},b.prototype.sendEvent=function(t,e){this.publish(t,e);var n=this.create(g,{type:v.MessageTypes.EVENT,id:t,args:[e],argNames:["eventData"]});this._notifyClient(n)},b.prototype.sendMessage=function(t,e,n,i){var r=this.create(g,{type:v.MessageTypes.MESSAGE,id:t,args:e,argNames:n});this._notifyClient(r,i)},b.prototype.notifyError=function(t){this.error=t;var e=this._state;e!==p.ERROR&&this._setState(p.ERROR),e!==p.PAUSED&&this.sendEvent(i.ERROR,"HlsError"===this.error.constructor.name?this.error.dto():this.error)},b.prototype._notifyClient=function(t,e){t&&this._callback&&(t.addMedia(),this._callback(t,e))},b.prototype._addEventListeners=function(){this._streamingController.addEventListener(a.STREAM_METADATA_LOADED,this._onStreamMetadataLoaded,this),this._streamingController.addEventListener(a.STREAM_METADATA_LOAD_ERROR,this._onStreamMetadataLoadError,this),this._streamingController.addEventListener(a.PRELOAD_COMPLETE,this._onPreloadComplete,this),this._streamingController.addEventListener(a.SEG_LOAD_PROGRESS,this._onSegLoadProgress,this)},b.prototype._beforeStateChange=function(t){console.log("[Controller] State changed from "+this._stateToString(this._state)+" to "+this._stateToString(t))},b.prototype._setState=function(t,e){this._beforeStateChange(t),this._state=t,this.sendEvent(i.STATE_CHANGED,t),this._afterStateChange(e)},b.prototype.getState=function(){return this._state},b.prototype._afterStateChange=function(t){switch(this._state){case p.MEDIA_METADATA_LOADING:this._loadMedia();break;case p.MEDIA_METADATA_LOADED:if(this.model.isDash()){this.sendMessage(v.MessageIds.DRM_INIT),this._setState(p.MEDIA_LOADED);break}this._setState(p.STREAM_METADATA_LOADING);break;case p.STREAM_METADATA_LOADING:this._streamingController.loadStream(this.model.getCurrentLoadingStream());break;case p.STREAM_METADATA_LOADED:this._setState(p.MEDIA_LOADED);break;case p.MEDIA_LOADED:if(E.android&&E.chrome&&this.model.drmInfo&&this.model.drmInfo.length)return;this._initializeStreamingController();break;case p.PRELOADING:this._streamingController.onPreloadBegin(),this._processTimer.start();break;case p.PLAY_REQUESTED:this._processTimer.start(),this._streamingController.onPlay(t),this._playStarted||(this._bufferMonitor.onPlayRequested(),this._playStarted=!0);break;case p.PLAYING:this._streamingController.onPlaying();break;case p.PLAY_COMPLETE:this._processTimer.stop(),this._streamingController.onComplete(),this._bufferMonitor.onComplete();break;case p.ERROR:this._processTimer.stop(),this._streamingController.onError(),this._commandManager.removeAllCommands(),this._bufferMonitor.onError()}},b.prototype._loadMetadata=function(){var t=this.model.metadata;if(this._state===p.INITIAL)return t.type===l.STRUCTURED?(this.model.build(this._parser.parse(t)),void(t.hasStreamMetadata?t.hasSubtitleMetadata?this._streamingController.loadAllSubtitleStreams():this._setState(p.MEDIA_LOADED):t.hasMediaMetadata&&this._setState(p.MEDIA_METADATA_LOADED))):void this._setState(p.MEDIA_METADATA_LOADING);console.warn("[Controller][_loadMetadata] Invalid state = "+this._stateToString(this._state))},b.prototype._process=function(){this._state<p.MEDIA_LOADED?console.warn("[Controller][_process] Invalid state = "+this._stateToString(this._state)):(this._bufferMonitor.checkBuffering(),this._streamingController.process())},b.prototype.onPlay=function(t){this._state===p.ERROR&&this.error&&this.notifyError(this.error),this._state<p.MEDIA_LOADED||(this._state===p.PRELOADING&&this._streamingController.onPreloadEnd(),this._setState(p.PLAY_REQUESTED,t))},b.prototype.onPlaying=function(){this._state<p.MEDIA_LOADED?console.warn("[Controller][onPlaying] Invalid state = "+this._stateToString(this._state)):(this._setState(p.PLAYING),this._bufferMonitor.onPlaying())},b.prototype.onPause=function(){this._state<p.MEDIA_LOADED?console.warn("[Controller][onPause] Invalid state = "+this._stateToString(this._state)):(this._streamingController.onPause(),this._bufferMonitor.onPause(),this._setState(p.PAUSED))},b.prototype.onSeeking=function(t){this._state<p.MEDIA_LOADED?console.warn("[Controller][onSeeking] Invalid state = "+this._stateToString(this._state)):(this._seeking=!0,this._streamingController.onSeeking(t),this._bufferMonitor.onSeeking())},b.prototype.onSeeked=function(t){this._state<p.MEDIA_LOADED?console.warn("[Controller][onSeeked] Invalid state = "+this._stateToString(this._state)):(this._seeking=!1,this._streamingController.onSeeked(t),this._bufferMonitor.onSeeked())},b.prototype.onComplete=function(){this._state<p.MEDIA_LOADED?console.warn("[Controller][onComplete] Invalid state = "+this._stateToString(this._state)):this._setState(p.PLAY_COMPLETE)},b.prototype.onError=function(t){console.warn("[Controller][onError] Video Error = "+t),this._setState(p.ERROR)},b.prototype.onTimeUpdate=function(t){this._updateModel(t),this._bufferMonitor.onTimeUpdate(),this._streamingController.onTimeUpdate(this.model.currentTime)},b.prototype.onUpdate=function(t){this._updateModel(t),this._bufferMonitor.onTimeUpdate()},b.prototype.onSynchComplete=function(t){this._streamingController.onSynchComplete(),this._bufferMonitor.onVideoSync(t)},b.prototype.onSynchMetadataReady=function(t){this._streamingController.onSynchMetadataReady(t)},b.prototype._updateModel=function(t){t&&(this.model.currentTime=t.currentTime,this.model.bufferedAndPending=t.bufferedAndPending,this.model.bufferLength=t.bufferLength,this.model.pendingBufferLength=t.pendingBufferLength,this.model.bufferedRanges=t.bufferedRanges,this.model.dimensions=t.dimensions,this.model.pixelRatio=t.pixelRatio,this.services.segmentMetrics.updateFrameStats(t.frameStats))},b.prototype._loadMedia=function(){var t=this.model.getMediaUrl(),e={url:t,withResponseHeaders:t&&-1!==t.indexOf(".mpd")};this._commandManager.executeCommand(c.CMD_MEDIA_LOAD,e,this)},b.prototype.onMediaLoadComplete=function(t,e){if(t)if(e){var n={rawData:e.data,headers:e.headers,type:l.RAW,url:t.data?t.data.url:"",cdn:this.model.getMediaCdn()};this.model.build(this._parser.parse(n)),this._commandManager.removeCommand(t),this._setState(p.MEDIA_METADATA_LOADED)}else this._commandManager.removeCommand(t)},b.prototype.onMediaLoadError=function(t,e){t&&this._commandManager.removeCommand(t),e&&1===e.code&&(this._setState(p.ERROR),this.notifyError(new r.Error(r.ERR_PLAYLIST_LOAD)))},b.prototype._onStreamMetadataLoaded=function(){this._state<p.MEDIA_LOADED&&this._setState(p.STREAM_METADATA_LOADED)},b.prototype._onStreamMetadataLoadError=function(){this._setState(p.ERROR),this.notifyError(new r.Error(r.ERR_PLAYLIST_LOAD))},b.prototype._onPreloadComplete=function(){this._state===p.PRELOADING&&this._setState(p.MEDIA_LOADED),this._processTimer.reset()},b.prototype._onSegLoadProgress=function(){this._bufferMonitor.isBuffering()&&this.sendEvent(i.BUFFER_GROWTH_DETECTED)},b.prototype._stateToString=function(t){for(var e=Object.keys(p),n=0;n<e.length;n++)if(t===p[e[n]])return e[n]},b.prototype.preload=function(t){t&&(this.model.config.preloadBufferLimit=t,this.model.bufferLength+this.model.pendingBufferLength<t&&this._state===p.MEDIA_LOADED&&this._setState(p.PRELOADING))},b.prototype.setABRMode=function(t){this._state<p.MEDIA_LOADED||this._streamingController.setABRMode(t)},b.prototype.setAudioLanguage=function(t){this._state<p.MEDIA_LOADED||this._streamingController.setAudioLanguage(t)},b.prototype.getMinimumBufferTime=function(){return this._bufferMonitor.getMinimumBufferTime()},b.prototype._initializeStreamingController=function(){this._streamingController.isInitialized()||(this._streamingController.init(),this.sendEvent(i.MEDIA_LOADED),!this.model.live&&this.model.bufferLength+this.model.pendingBufferLength<this.model.config.preloadBufferLimit&&this._setState(p.PRELOADING))},b.prototype.onGenerateRequestComplete=function(){this._initializeStreamingController()}},function(t,e,n){"use strict";t.exports.StreamLoader=l;var i=n(10).CmdNames,r=n(17).MetadataTypes,o=n(24),s=n(3),a=n(16),u=t.exports.Events={STREAM_LOADED:"streamLoaded",STREAM_LOAD_ERROR:"streamLoadError"};function l(t){a.call(this,this.constructor.name),this._model=this.__controller.model,this._commandManager=t,this._parser=this.__controller.services.metadataParser,this.stream=null,this.loaded=!1}s.inherits(l,a),l.prototype.destroy=function(){a.prototype.destroy.call(this)},l.prototype.load=function(t,e){t&&(this.stream=t,this.loaded=!1,this._commandManager.executeCommand(i.CMD_STREAM_LOAD,{stream:t,retryOpts:e},this))},l.prototype.cancel=function(){this._commandManager.removeRelatedCommands(i.CMD_STREAM_LOAD)},l.prototype.onStreamLoadComplete=function(t,e){if(t)if(e&&e.stream){var n=e.stream,i={rawData:e.data,headers:e.headers,type:r.RAW,streamType:n.type,groupId:n.groupId,name:n.name,url:e.streamUrl,index:n.index};this._model.build(this._parser.parse(i)),this._commandManager.removeCommand(t),this.loaded=!0,this.publish(u.STREAM_LOADED,n)}else this._commandManager.removeCommand(t)},l.prototype.onStreamLoadError=function(t,e){this._commandManager.removeCommand(t);var n=e.code===o.ERR_XHR_LOAD[0]?new o.Error(o.ERR_PLAYLIST_LOAD):e;this.publish(u.STREAM_LOAD_ERROR,this.stream,n)}},function(t,e,n){"use strict";function i(t){t&&(this.duration=t.duration,this.url=t.url,this.initSegment=t.initSegment,this.seqNum=t.sequenceNum,this.startTime=t.startTime,this.discontinuity=t.discontinuity,this.programDateTime=t.programDateTime,this.streamIndex=t.levelIndex,this.bitrate=t.bitrate,this.sessionId=t.sessionId,this.cdn=t.cdn,this._segmentIndex=this.streamIndex+"_"+this.seqNum,this.brStartOffset=t.brStartOffset,this.brEndOffset=t.brEndOffset,this.containerFormat=t.containerFormat,this.encryptionData=t.encryptionData,this.endTimestamps=t.endTimestamps,this.periodId=t.periodId),this.endTimestamps||(this.endTimestamps={audio:NaN,video:NaN}),this.totalDownloadTime=0,this.timeToFirstByte=0,this._clockReference=0}t.exports=i,i.prototype.setStreamIndex=function(t){this.streamIndex=t,this._segmentIndex=this.streamIndex+"_"+this.seqNum},i.prototype.dto=function(){var t=this,e={};return Object.keys(t).forEach(function(n){"__controller"!==n&&(e[n]=t[n])}),e}},function(t,e,n){"use strict";function i(t){t&&(this.url=t.url,this.name=t.name,this.range=t.range);var e=this.range;this.loaded=!1,this.data=e&&e.end>=0&&e.start>=0&&e.end>e.start?new Uint8Array(e.end-e.start+1):null,this._readOffset=0,this._chunkLength=this.data?this.data.byteLength:0}t.exports=i,i.prototype.destroy=function(){this.data=null},i.prototype.append=function(t){if(this.loaded||!t)return 0;var e=0;if(this._chunkLength&&this.data){e=Math.min(t.byteLength,this._chunkLength-this._readOffset);for(var n=0;n<e;n++)this.data[this._readOffset+n]=t[n];this._readOffset+=e,this._readOffset>=this._chunkLength&&(this.loaded=!0)}else{var i=t.byteLength;if(!i)return;var r=null,o=0;this.data&&(o=(r=this.data).length),e=o+i,this.data=new Uint8Array(e),r&&this.data.set(r),this.data.set(t,o),this._readOffset+=e}return e},i.prototype.equals=function(t){return!!t&&(this.url===t.url&&this.name===t.name&&(!this.range||!t.range||this.range.start===t.range.start&&this.range.end===t.range.end))}},function(t,e,n){"use strict";t.exports=r;var i=n(14);function r(){this._segTimeMap={},this._lastSegmentSeqNum=Number.NaN,this._discontinuity=!1,this._firstDiscontinuousStartTime=NaN,this._streams=[]}r.prototype.destroy=function(){this._segTimeMap={},this._streams=[]},r.prototype.addStream=function(t){this._streams.push(t),this._streams.length&&(this._lastSegmentSeqNum=this._streams[0].endSeqNum)},r.prototype.update=function(t){if(t){var e=this._getTargetStream(t);if(e){var n=this.__controller.model.live;n&&(t=e.isDash()?this._convertSequenceNums(t,e):this._convertSegmentStartTime(t)),e.updateConfig(t),n&&!e.isDash()&&this._lastSegmentSeqNum>=e.endSeqNum&&(e.refreshInterval=500*e.targetDuration),this._lastSegmentSeqNum=e.endSeqNum}}},r.prototype._getTargetStream=function(t){if(!t||!this._streams.length)return null;for(var e=0;e<this._streams.length;e++)if(this._streams[e].equals(t))return this._streams[e];return null},r.prototype._convertSegmentStartTime=function(t){var e=this;if(!t)return t;var n=t.segmentInfoList;if(!n||!n.length)return t;Object.keys(e._segTimeMap).length||(e._segTimeMap[n[0].sequenceNum]={startTime:n[0].startTime,programDateTime:n[0].programDateTime});var i,r,o,s,a=e._segTimeMap[n[0].sequenceNum];if(a&&"number"==typeof a.startTime)i=e._segTimeMap[n[0].sequenceNum].startTime;else{console.warn("[StreamUpdater] Segment startTime not found in the record. seqNum = "+n[0].sequenceNum);var u=Object.keys(e._segTimeMap),l=parseInt(u[u.length-1]);n[n.length-1].sequenceNum<l&&console.warn("[StreamUpdater] Mediaplaylist goes back");var c=0;for(r=1;r<n.length;r++)if(-1!==u.indexOf(n[r].sequenceNum.toString())){c=r;break}if(c)for(i=e._segTimeMap[n[c].sequenceNum].startTime,r=c-1;r>=0;r--)i-=n[r].duration;else{if(n[0].sequenceNum>l)o=parseInt(u[u.length-1]),s=e._segTimeMap[o];else for(r=n[n.length-1].sequenceNum;r<=l;){if(-1!==u.indexOf(r.toString())){o=r,s=e._segTimeMap[o];break}r++}i="number"==typeof s.programDateTime?s.startTime+(n[0].programDateTime-s.programDateTime)/1e3:s.startTime+(n[0].sequenceNum-o)*n[0].duration}}var d=0;return n.forEach(function(t){t.startTime=i+d,d+=t.duration,!e._discontinuity&&t.discontinuity&&(e._discontinuity=!0,e._firstDiscontinuousStartTime=t.startTime),e._discontinuity&&!isNaN(e._firstDiscontinuousStartTime)&&(t.discontinuity=t.startTime>=e._firstDiscontinuousStartTime),e._segTimeMap[t.sequenceNum]||(e._segTimeMap[t.sequenceNum]={startTime:t.startTime,programDateTime:t.programDateTime})}),t},r.prototype._convertSequenceNums=function(t,e){if(!t||!e)return t;var n=t.segmentInfoList;if(!n||!n.length)return t;var i=e.segments;if(!i||!i.length)return t;for(var r=0,o=!1,s=0;s<i.length;s++)if(r=i[s].seqNum,i[s].startTime>=n[0].startTime){o=!0;break}o||r++;for(var a=0;a<n.length;a++)n[a].sequenceNum=r,r++;return t},r.prototype.adjustStartTime=function(t,e,n){var r=this;if(t&&!i.isNullOrUndefined(n)&&!i.isNullOrUndefined(e)){var o=Object.keys(r._segTimeMap),s=o.length?o[0]:null,a=s?r._segTimeMap[s]:null,u=a?(a.programDateTime-n)/1e3-(a.startTime-e):0;u?(o.forEach(function(t){(a=r._segTimeMap[t]).startTime+=u}),t.segments.forEach(function(t){a=r._segTimeMap[t.seqNum],t.startTime=a?a.startTime:t.startTime+u}),t.adjusted=!0):t.adjusted=!0}}},function(t,e,n){"use strict";t.exports={useWorker:!0,maxRetries:5,maxBuffer:60,maxTotalBuffer:300,requestTimeout:10,chunkedRequestTimeout:5,pastBufferLengthLimit:{vod:180,live:10},segmentLoadMonitorInterval:1,preloadBufferLimit:0,variableMinBuffer:!0,minBufferTime:{vod:.1,live:4},sendAbrAnalytics:!1,demux:{startChunkWithKeyFrame:!0},stopBufferingOnPause:!1,dimensions:{width:640,height:360}}},function(t,e,n){"use strict";t.exports=f;var i=n(3),r=n(35).Events,o=n(180),s=n(36),a=n(188),u=n(25),l=n(12).HLSEvent,c=n(10),d=c.Command,h=c.CmdNames,p=c.CmdEvents;function f(t,e){this._validateData(t),d.call(this,t,e),this.name=h.CMD_SEGMENT_LOAD,this._segment=t.segment,this._stream=t.stream,this.__controller=this.data.controller,this._model=this.__controller.model,this._url=this._segment?this._segment.url:t.url,this._streamIndex=this._segment?this._segment.streamIndex:t.stream.index,this._encryptionData=this._segment?this._segment.encryptionData:null,this._loading=!1,this._loadProfiler=new a,this._bytesTotal=0,this._segmentPerfInfo=null;var n=t.controller.services;this._retryExclusion=[403],this._loader=n.getNewLoader(this._configureLoaderOptions()),this._encryptionData&&this._encryptionData.keyUri&&(this._keyLoader=n.getNewLoader(this._configureKeyLoaderOptions())),this._bandwidthEstimator=this.__controller.services.bandwidthEstimator,this._metricsTimer=new u(this._bandwidthEstimator.COLLECTION_INTERVAL),this._metricsTimer.addEventListener(this._addSample,this),this._createSegmentLoadProcessor()}i.inherits(f,d),f.prototype.destroy=function(){this.cancel(),this._loader.destroy(),this._metricsTimer.destroy(),this._loadProfiler.destroy(),this._keyLoader&&this._keyLoader.destroy(),this._segmentDataProcessor&&this._segmentDataProcessor.destroy(),d.prototype.destroy.call(this)},f.prototype._validateData=function(t){if(!(t&&t.segment&&t.stream&&t.controller))throw new Error("Invalid argument: data argument of the command is not complete")},f.prototype._configureKeyLoaderOptions=function(){return{responseType:"arraybuffer",isChunkedLoad:!1,headerFields:{},retryExclusion:this._retryExclusion}},f.prototype._configureLoaderOptions=function(){var t={responseType:"arraybuffer",isChunkedLoad:!0,headerFields:{},retryExclusion:this._retryExclusion},e=this._segment?this._segment.bitrate*this._segment.duration/8:0;return this._segment.brStartOffset>=0&&this._segment.brEndOffset>=0&&(t.headerFields.Range="bytes="+this._segment.brStartOffset+"-"+this._segment.brEndOffset,e=this._segment.brEndOffset-this._segment.brStartOffset+1),t.minChunkSize=.025*e,"atlas"===this._segment.cdn&&(t.headerFields.Accept="*/*; X-PB-SESSION-ID="+this._segment.sessionId),0===this._segment.streamIndex&&(t.timeout=1e4),t},f.prototype._createSegmentLoadProcessor=function(){var t=this._getSegmentLoadProcessorConfig();t.containerFormat=this._segment.containerFormat,t.encryptionData=this._encryptionData;var e=this.__controller.create(o,t);e&&(e.addEventListener(s.DATA_PROCESS_PROGRESS,this._onDataProcessProgress,this),e.addEventListener(s.DATA_PROCESS_COMPLETE,this._onDataProcessComplete,this),e.addEventListener(s.DATA_PROCESS_ERROR,this._onDataProcessError,this),this._segmentDataProcessor=e)},f.prototype._getSegmentLoadProcessorConfig=function(){return{seqNum:this._segment.seqNum,discontinuity:this._segment.discontinuity,demux:this._model.config.demux,width:this._stream?this._stream.width:640,height:this._stream?this._stream.height:360,timescale:this._stream.timescale?this._stream.timescale:this._model.timescale,duration:this._model.duration,segDuration:this._segment.duration?this._segment.duration:-1,pcr:this._model.getPCR(),frameRate:this._stream?this._stream.frameRate:30,mp4State:this.data.state?this.data.state.mp4:null,startOffsetTimestamp:this._model.startOffsetTimestamp,startTime:this._segment.startTime,lastAudioTimestamp:this.data.state?this.data.state.lastAudioTimestamp:NaN,lastAudioFrameDuration:this.data.state?this.data.state.lastAudioFrameDuration:NaN,prevSegEndTimeStamps:this._model.getPrevSegEndTimestamps(this._stream,this._segment),isAltAudioActive:!!this.data.state&&this.data.state.isAltAudioActive,live:this._model.live,onlyMetadata:this.data.onlyMetadata,useEditBox:!0,userAgent:this._model.userAgent,dash:this._model.isDash(),type:this._stream.type}},f.prototype.execute=function(){this._bytesTotal=0,this._beginning=!1,this._loading=!0,this._chunkLoadStartTime=Date.now(),this._chunkLength=0,this._chunkDownloadTime=0,this._segment&&(this._segment.totalDownloadTime=0,this._segment.timeToFirstByte=0),this._startLoadTime=Date.now(),this._metricsTimer.start(),this._encryptionData&&this._keyLoader&&this._loadEncryptionData(),this._loadSegmentData()},f.prototype.cancel=function(){this._close(),this._loader.reset()},f.prototype._close=function(){this._metricsTimer.reset(),this._segmentDataProcessor&&this._segmentDataProcessor.close(),this._loading=!1},f.prototype._loadEncryptionData=function(){var t=this;if(t._encryptionData&&t._keyLoader){var e=t._stream.lastKey,n=t._encryptionData.keyUri;if(e&&e.keyUri&&e.key&&e.keyUri===n)t._onKeyLoadComplete(e.key);else{t._keyLoader.addEventListener(r.COMPLETE,function(e){t._onKeyLoadComplete(e)},t),t._keyLoader.addEventListener(r.ERROR,function(e){t.publish(p.CMD_ERROR,t,e)},t),t._keyLoader.load(n)}}},f.prototype._loadSegmentData=function(){var t=this;if(t._loader){var e=t._url;t._loader.addEventListener(r.COMPLETE,function(){t._onLoadComplete()},t),t._loader.addEventListener(r.PROGRESS,function(e,n){t._onProgress(e,n)},t),t._loader.addEventListener(r.ERROR,function(e){t.publish(p.CMD_ERROR,t,e)},t),t._loader.addEventListener(r.BYTES_LOADED,function(e,n){t._onBytesLoaded(e,n)},t),t._loader.load(e)}},f.prototype._onBytesLoaded=function(t,e){this._segment&&0===this._segment.timeToFirstByte&&(this._segment.timeToFirstByte=Date.now()-this._startLoadTime,this.__controller.sendEvent(l.SEGMENT_FIRST_BYTE_LOADED,e),this.publish(p.CMD_PROGRESS,this,{position:"firstByte"})),this._chunkLength+=Math.max(t-this._bytesTotal,0),this._bytesTotal=t},f.prototype._onProgress=function(t,e){e!==this._bytesTotal&&this._onBytesLoaded(e),this._segmentDataProcessor&&this._segmentDataProcessor.append(t)},f.prototype._onLoadComplete=function(){this._addSample(),this._metricsTimer.stop();var t=this._getTotalDownloadTime();this._segmentDataProcessor&&this._segmentDataProcessor.endOfSegment(),t>0&&this._bandwidthEstimator.replaceSamples(this._bytesTotal,t)},f.prototype._onKeyLoadComplete=function(t){t.type="key",t.initVector=this._encryptionData.initVector,t.seqNum=this._segment.seqNum,this._segment.encryptionData.key=t,this._stream.lastKey=this._encryptionData,this._segmentDataProcessor.append(t)},f.prototype._onDataProcessProgress=function(t){t&&(t.putParam&&(this._segmentPerfInfo&&t.putParam("perfInfo",this._segmentPerfInfo),t.putParam("bytesTotal",this._bytesTotal)),this.publish(p.CMD_PROGRESS,this,t))},f.prototype._onDataProcessComplete=function(t){this.publish(p.CMD_COMPLETE,this,t)},f.prototype._onDataProcessError=function(){},f.prototype._addSample=function(){var t=Math.max(this._chunkLength,0),e=Date.now();this._chunkDownloadTime=e-this._chunkLoadStartTime,this._metricsTimer.reset(),this._bandwidthEstimator&&this._chunkDownloadTime>10&&(this._chunkLoadStartTime=e,this._segment&&(this._segment.totalDownloadTime+=this._chunkDownloadTime),this._chunkLength=0,this._bandwidthEstimator.addSample({size:t,time:this._chunkDownloadTime})),this._metricsTimer.start()},f.prototype._getTotalDownloadTime=function(){var t=this._loadProfiler?this._loadProfiler.getPerformanceTiming(["startTime","requestStart","responseStart","responseEnd","secureConnectionStart","fetchStart","connectStart","domainLookupStart"],this._url):null;return this._segmentPerfInfo=t,t&&t.responseEnd&&t.startTime?t.responseEnd-t.startTime:null}},function(t,e,n){"use strict";t.exports={ERROR:-1,INITIAL:0,MEDIA_METADATA_LOADING:1,MEDIA_METADATA_LOADED:2,STREAM_METADATA_LOADING:3,STREAM_METADATA_LOADED:4,MEDIA_LOADED:5,PRELOADING:6,PLAY_REQUESTED:7,PLAYING:8,PAUSED:9,PLAY_COMPLETE:10}},function(t,e,n){"use strict";function i(){this.PIXEL_THRESHOLD_FACTOR=.5}function r(){this.BANDWIDTH_FACTOR_LOW=1.3,this.BANDWIDTH_FACTOR_HIGH=1.6,this.MIN_BW_FOR_LOW_FACTOR=25e5,this.MIN_BUFFER_TO_SWITCH_DOWN=10}function o(){this.BANDWIDTH_FACTOR_LOW=1.3,this.BANDWIDTH_FACTOR_HIGH=1.6,this.MIN_BW_FOR_LOW_FACTOR=25e5,this.MIN_BUFFER_TO_SWITCH_UP=6,this.MIN_LENGTH_DATA=2,this.ALLOWED_LOAD_TIME=500}function s(){this.MAX_WIDTH_240P=427,this.MAX_HEIGHT_240P=240,this.MAX_BITRATE_240P=9e5,this.MAX_BITRATE_LIMIT=1e7,this.PIXEL_RATIO_360=6}t.exports.StartupRule=i,t.exports.BandwidthRule=r,t.exports.BufferRule=o,t.exports.ResolutionRule=s,e.validateAbrInput=function(t){return!(!t||"object"!=typeof t||!t.bitrateList||!t.bitrateList.length||"number"!=typeof t.estimatedBandwidthInBps||isNaN(t.estimatedBandwidthInBps)||void 0===t.currentIndex||null===t.currentIndex||isNaN(t.currentIndex)||void 0===t.bufferLength||isNaN(t.bufferLength)||void 0===t.displayWidth||isNaN(t.displayWidth)||t.displayWidth<=0||void 0===t.displayHeight||isNaN(t.displayHeight)||t.displayHeight<=0||void 0===t.streams||t.streams.length<=0)},i.prototype.getNextStreamIndex=function(t){if(!e.validateAbrInput(t))return-1;for(var n,i=t.displayWidth*t.displayHeight*this.PIXEL_THRESHOLD_FACTOR,r=t.streams.length-1;r>=0;r--){var o=t.streams[r].width*t.streams[r].height;if(!n&&o<i&&(n=o),n&&o<n)return r+1}return 0},r.prototype.getNextStreamIndex=function(t){if(!e.validateAbrInput(t))return-1;for(var n=0,i=t.estimatedBandwidthInBps,r=this._getBandwidthFactor(i),o=0;o<t.bitrateList.length&&!(i<r*t.bitrateList[o]);o++)n=o;return n<t.currentIndex&&t.bufferLength>this.MIN_BUFFER_TO_SWITCH_DOWN&&(n=t.currentIndex,console.log("[debug] Bandwidth rule nextIndex when bufLen below 10: "+n)),n},r.prototype._getBandwidthFactor=function(t){return t>=this.MIN_BW_FOR_LOW_FACTOR?this.BANDWIDTH_FACTOR_LOW:this.BANDWIDTH_FACTOR_HIGH},o.prototype.getNextStreamIndex=function(t){if(!e.validateAbrInput(t))return-1;var n=t.segmentLength?Math.min(t.segmentLength,this.MIN_BUFFER_TO_SWITCH_UP):this.MIN_BUFFER_TO_SWITCH_UP;return 0===t.bufferLength?this._getIndexWithLoadTime(t):t.bufferLength<n?t.currentIndex:t.bitrateList.length-1},o.prototype._getIndexWithLoadTime=function(t){for(var e=0,n=t.estimatedBandwidthInBps,i=this._getBandwidthFactor(n),r=this.ALLOWED_LOAD_TIME/1e3,o=0;o<t.bitrateList.length&&!(i*t.bitrateList[o]*this.MIN_LENGTH_DATA/n>r);o++)e=o;return e},o.prototype._getBandwidthFactor=function(t){return t>=this.MIN_BW_FOR_LOW_FACTOR?this.BANDWIDTH_FACTOR_LOW:this.BANDWIDTH_FACTOR_HIGH},s.prototype.getNextStreamIndex=function(t){if(!e.validateAbrInput(t))return-1;var n=t.pixelRatio||this.getPixelRatio(t),i=t.displayWidth,r=t.displayHeight;!isNaN(n)&&n>1&&(i*=n,r*=n);for(var o=0,s=0;s<t.streams.length&&!(t.streams[s].width>i||t.streams[s].height>r);s++)o=s;var a=t.streams[o].width,u=t.streams[o].height,l=i<=this.MAX_WIDTH_240P||r<=this.MAX_HEIGHT_240P?this.MAX_BITRATE_240P:this.MAX_BITRATE_LIMIT;if((o=this._getMaxIdxWithSameDim(t,a,u,l))<t.streams.length-1&&t.bitrateList[o+1]<l){var c=t.streams[o+1].width,d=t.streams[o+1].height,h=t.streams[o].height;Math.abs(d-r)<=Math.abs(h-r)&&(o=this._getMaxIdxWithSameDim(t,c,d,l))}return o},s.prototype._getMaxIdxWithSameDim=function(t,e,n,i){var r=0;return t.streams.forEach(function(o,s){var a=t.bitrateList[s];o&&o.width===e&&o.height===n&&a<=i&&s>r&&a>t.bitrateList[r]&&(r=s)}),r},s.prototype.getPixelRatio=function(t){var e=1;try{window&&(e=window.devicePixelRatio)}catch(t){e=1}return e||(e=1),t.is360&&(e*=this.PIXEL_RATIO_360),e}},function(t,e,n){"use strict";t.exports=function(t){t._instances={},t.addEventListener("message",function(e){!function(t,e){var n=e;if(!t)return;var i=t.instanceId,s=t.moduleName,a=t.funcName,u=t.args;switch(t.id){case o.CREATE:n._instances[i]=Object.create(r[s].prototype),r[s].apply(n._instances[i],u);break;case o.DESTROY:n._instances.hasOwnProperty(i)&&(n._instances[i].destroy(),delete n._instances[i]);break;case o.CALL_METHOD:if(n._instances.hasOwnProperty(i)){var l=n._instances[i];l&&l[a]&&"function"==typeof l[a]&&l[a].apply(l,u)}}}(function(t,e){if(!e)return;var n=new s(t.data),i=n.instanceId;return n.putParam("callback",function(t,n){t.instanceId=i,function(t,e,n){if(n){var i=t.dto();n.postMessage(i,e)}}(t,n,e)}),n}(e,t),t)})};var i=n(21),r=i.WorkerDefs,o=i.MessageIds,s=n(34)},function(t,e){var n=arguments[3],i=arguments[4],r=arguments[5],o=JSON.stringify;t.exports=function(t){for(var e,s=Object.keys(r),a=0,u=s.length;a<u;a++){var l=s[a];if(r[l].exports===t){e=l;break}}if(!e){e=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var c={};for(a=0,u=s.length;a<u;a++){c[l=s[a]]=l}i[e]=[Function(["require","module","exports"],"("+t+")(self)"),c]}var d=Math.floor(Math.pow(16,8)*Math.random()).toString(16),h={};h[e]=e,i[d]=[Function(["require"],"require("+o(e)+")(self)"),h];var p="("+n+")({"+Object.keys(i).map(function(t){return o(t)+":["+i[t][0]+","+o(i[t][1])+"]"}).join(",")+"},{},["+o(d)+"])",f=window.URL||window.webkitURL||window.mozURL||window.msURL;return new Worker(f.createObjectURL(new Blob([p],{type:"text/javascript"})))}},function(t,e,n){"use strict";var i="undefined"!=typeof navigator?navigator.userAgent.toLowerCase().replace(/<[A-Za-z]+.*?(\/>|>.*?<\/[A-Za-z]+>)|javascript:/g,""):"",r="undefined"!=typeof window?window:{},o=function(t){if(null===t)return!1;var e=t[1];return parseFloat(e.replace("_",".").split(".",2).join("."))||1},s=function(t){for(var e=(r&&r.location&&r.location.search&&r.location.search.substring(1)||"").split("&"),n=0;n<e.length;n++){var i=e[n].split("=");if(decodeURIComponent(i[0])===t)return decodeURIComponent(i[1])}return null};if(e.ua=i,e.chromium=o(/chromium\/([^\s]*)/.exec(i)),e.edge=o(/edge\/([^\s]*)/.exec(i)),e.opera=/opr\/|opera\//.test(i),e.chrome=!e.chromium&&!e.edge&&!e.opera&&(o(/chrome\/([^\s]*)/.exec(i))||o(/crios\/([^\s]*)/.exec(i))),e.ie=o(/msie ([^;]*)/.exec(i))||o(/trident.*; rv:([0-9.]+)/.exec(i)),e.firefox=!e.ie&&o(/firefox\/([^\s]*)/.exec(i)),e.android=/android/.test(i),e.androidTablet=e.android&&!/mobile/.test(i),e.htc_one=/htc_one/.test(i),e.vizio=/Vizio/i.test(i)||"vizio"===s("man"),e.tivo=/TiVo/i.test(i),e.fios=/Verizon_STB|\(Verizon.*VMS1100|\(Verizon.*IPC1100|\(Verizon.*IPC3200/i.test(i),e.firetv=e.android&&/amazonwebappplatform/.test(i)&&/aft/.test(i),e.lg=/web0s/.test(i),e.tizen=/tizen/.test(i),e.orsay=/smarttv/.test(i)&&!e.tizen&&!e.lg,e.samsung=e.orsay||e.tizen,e.sony=/(sony)/.test(i),e.ps4=/(playstation 4)/.test(i),e.ios=/(ipad|iphone|ipod)/.test(i),e.iphone=/(iphone|ipod)/.test(i)&&!/ipad/.test(i),e.ipad=e.ios&&!e.iphone,e.androidBrowser=!e.chrome&&/android/.test(i),e.androidVersion=o(/android\s([0-9.]*)/.exec(i)),e.safari=!e.chrome&&!e.chromium&&!e.android&&/safari\/([^\s]*)/.test(i)&&o(/version\/([^\s]*)/.exec(i)),e.iosWebView=e.ios&&!navigator.standalone&&!e.safari,e.iosVersion=e.ios&&o(/\bos ((\d+_?){2,3})\s/.exec(i)),e.mobile=e.ios||e.android&&!e.firetv,e.safariDesktop=!e.mobile&&e.safari,e.tv=e.vizio||e.tivo||e.firetv||e.samsung||e.sony||e.ps4||e.lg||e.fios,e.desktop=!e.mobile&&!e.tv,e.phantomJS=r.window&&r.window._phantom,e.tv)if(e.vizio)e.os="vizio",e.model=s("class")||s("soc");else if(e.tivo)e.os="tivo",/tcd849/.test(i)?(e.model="series6",e.version="tcd849"):/tcd8d9/.test(i)?(e.model="series6",e.version="tcd8d9"):/tcd8f9/.test(i)?(e.model="series6",e.version="tcd8f9"):/tcd8/.test(i)?(e.model="series5",e.version="tcd8"):/tcdd/.test(i)?(e.model="series5",e.version="tcdd"):e.model="series4";else if(e.firetv)e.os="firetv",/aftb/.test(i)?e.model="aftb":/afts/.test(i)?e.model="afts":(/aftm/.test(i),e.model="aftm");else if(e.lg)e.os="lg",e.model="lg";else if(e.samsung){e.os="samsung";var a=void 0!==a?a:window.tizen;a&&a.systeminfo?(e.model="tizen",e.version=a.systeminfo.getCapability("http://tizen.org/feature/platform.version")):e.model="orsay"}else e.sony?(e.os="sony",/bdp/.test(i)?e.model="bdp":e.model="tv"):e.ps4?(e.os="ps4",e.model="4"):e.fios?e.os="fios":e.os=null;else e.ios?e.os="ios":e.android?e.os="android":/windows|win32/.test(i)?(e.os="windows",e.winXP=/(windows nt 5\.[1-3])/.test(i),e.winVista=/(windows nt 6\.0)/.test(i),e.win7=/(windows nt 6\.1)/.test(i),e.win8=/(windows nt 6\.2)/.test(i),e.win8_1=/(windows nt 6\.3)/.test(i),e.win10=/(windows nt 10\.0)/.test(i),e.win64=/(wow64|win64)/.test(i)):/macintosh|mac_powerpc/.test(i)?e.os="macintosh":/symbos/.test(i)?e.os="symbos":/linux/.test(i)?e.os="linux":e.os=null},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(1),s=n(9),a=n(2),u=n(104),l=n(67),c=n(19),d=n(0),h=n(22),p=n(5);c.default.hasTouchRestrictions&&(r=u.default.getPool());var f=function(t){function e(n,i){var r=t.call(this,"html-renderer")||this;return r.type=e.type,r._triggerSubtitleTracks=!1,r._eventBus=n,r._model=i,r}return i(e,t),e.canUse=function(){return!0},e.prototype.create=function(t){var e=this;return this.node=t instanceof HTMLVideoElement?t:r?r.get():d.default.createVideoNode(),this.node||(this.node=d.default.createVideoNode()),this.node.setAttribute("id",d.default.generateGuid()),d.default.classList(this.node).add("vp-html5-video"),this._bindEvents(),this._overridePlayMethod(this.node),o.userAgent.mobile&&c.default.autoplayByUIEvtOnly&&this._model.autoplay&&l.default&&(this._unbindTapToPlayRestriction=l.default.setupTouchToPlayRestrictionRemoval(this.node,function(){e._unbindTapToPlayRestriction=null,e._eventBus.publish(a.TOUCH_TO_PLAY_RESTRICTION_REMOVED)})),this._active=!1,this.node},e.prototype.destroy=function(){this._unbindEvents(),this.node&&(r&&r.discard(this.node),this.node.pause(),this.node.src="",this.node.load(),this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.node),this._unbindTapToPlayRestriction&&(this._unbindTapToPlayRestriction(),this._unbindTapToPlayRestriction=null)},e.prototype.enterFullScreen=function(){if(this.node){var t=this.node.requestFullscreen||this.node.webkitRequestFullscreen||this.node.webkitEnterFullscreen;t&&t.call(this.node)}},e.prototype.exitFullScreen=function(){if(this.node){var t=document.exitFullscreen||document.webkitExitFullscreen;t?t.call(document):this.node.webkitExitFullscreen&&this.node.webkitExitFullscreen()}},e.prototype.detachNode=function(){this._unbindEvents(),this.node&&this.node.pause&&this.node.pause()},e.prototype.getCurrentDate=function(){return null},e.prototype.getCurrentTime=function(){return this.node?this.node.currentTime:0},e.prototype.getDuration=function(){return this.node?this.node.duration:0},e.prototype.isAirplaying=function(){return!(!this.node||!this.node.webkitCurrentPlaybackTargetIsWireless)},e.prototype.reattachNode=function(){this._bindEvents()},e.prototype.seek=function(t){var e=this;if(this.node)try{this.node.currentTime=t}catch(i){if("InvalidStateError"===i.name)var n=this.on(p.RendererEvent.LOADEDMETADATA,function(){e.node&&(e.node.currentTime=t,e.removeEventListener(p.RendererEvent.LOADEDMETADATA,n))},this)}},e.prototype.setActive=function(t){this._active=t},e.prototype.setMute=function(t){this.node&&"boolean"==typeof t&&(o.userAgent.mobile&&c.default.autoplaySupported&&l.default?l.default.setMuteSafe(this.node,t):this.node.muted=t)},e.prototype.setVolume=function(t){this.node&&(this.node.volume=t)},e.prototype.showAirplayTargetMenu=function(){this.node&&"function"==typeof this.node.webkitShowPlaybackTargetPicker&&this.node.webkitShowPlaybackTargetPicker()},e.prototype.waitForReady=function(t){t()},e.prototype.reportError=function(t,e,n,i,r,o){var s=d.default.createErr(e,this._model.playbackState,n,i,r,o);this._eventBus.publish(t,s)},e.prototype.enableMobileNativeCC=function(t){if(this.node){var e=document.createDocumentFragment();this._deleteTracks(),t.langList.forEach(function(n){var i=document.createElement("track");i.setAttribute("label","English"),i.setAttribute("srclang",n.lang),i.setAttribute("kind","subtitles"),i.setAttribute("type","text/vtt"),n.lang===t.selectedLang&&i.setAttribute("default","true"),i.src=n.url,i.track&&(i.track.mode="hidden"),e.appendChild(i)}),this.node.appendChild(e)}},e.prototype._bindEvents=function(){var t=this;if(this.node){this._onVideoEvent=function(e){if(!t.ended){var n=e.type,i=p.RendererEvent[n.toUpperCase()];t._handleVideoEvent(n,i)}}.bind(this),Object.keys(p.NativeVideoEvent).forEach(function(e){t.node&&t.node.addEventListener(p.NativeVideoEvent[e],t._onVideoEvent)}),o.userAgent.iphone&&!c.default.canPlayInline||(this._videoTap=new h.default(this.node,function(){t.publish(p.CustomRendererEvent.CLICK)})),o.userAgent.safari>=8&&this._setupTrackListener(),o.userAgent.ios&&this._setupFullscreenEndListener(),c.default.airplaySupported&&this._model.casting&&this._setupAirplayAvailabilityListener(),this._eventKeys={},this._eventKeys[a.FULLSCREEN_CHANGE]=this._eventBus.addEventListener(a.FULLSCREEN_CHANGE,function(){t.node&&t._eventBus.publish(a.PLAYER_RESIZE,t.node.clientWidth,t.node.clientHeight)},this)}},e.prototype._startPlay=function(){var t=this;if(this.node){var e=this.node.play();return e&&"function"==typeof e.catch&&e.catch(function(e){t.node.paused}),e}},e.prototype._deleteTracks=function(){if(this.node)for(var t=this.node.querySelectorAll("track"),e=0;e<t.length;e++)this.node.removeChild(t[e])},e.prototype._getCodeForNodeError=function(t){if(!(t&&t instanceof MediaError))return s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR;switch(t.code){case MediaError.MEDIA_ERR_ABORTED:return s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED;case MediaError.MEDIA_ERR_NETWORK:return s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_NETWORK;case MediaError.MEDIA_ERR_DECODE:return s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_DECODE;case MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:return s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_SRC_NOT_SUPPORTED;default:return s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR}},e.prototype._setupAirplayAvailabilityListener=function(){var t=this;if(c.default.airplaySupported&&this.node){var e=function(e){t._eventBus.publish(a.API.AIRPLAY_AVAILABILITY_CHANGE,"available"===e.availability)},n=function(){t._eventBus.publish(a.API.AIRPLAY_CONNECTION_STATE_CHANGE,{connected:t.isAirplaying(),isInitialEvt:!t._initialAirplayStateEvtFired}),t._initialAirplayStateEvtFired||(t._initialAirplayStateEvtFired=!0)};this.node.addEventListener("webkitplaybacktargetavailabilitychanged",e),this.node.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",n),this._removeAirplayAvailabilityListener=function(){t.node&&(t.node.removeEventListener("webkitplaybacktargetavailabilitychanged",e),t.node.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",n))}}},e.prototype._setupTrackListener=function(){var t=this;if(this.node&&this.node.textTracks){var e=function(e){var n=e.track;n&&("metadata"===n.kind?(n.mode="hidden",n.addEventListener("cuechange",function(e){var n=e.target,i=n&&n.activeCues[0],r=i&&i.value&&i.value.data,o=i&&i.value&&i.value.info;if(o)r=o;else if("string"==typeof r)try{r=JSON.parse(r)}catch(t){}else r=r instanceof ArrayBuffer?String.fromCharCode.apply(null,new Uint8Array(r)):{};t._eventBus.publish(a.TIMED_METADATA_RECEIVED,r)})):"subtitles"===n.kind&&t._triggerSubtitleTracks&&t._eventBus.publish(a.SUBTITLE_TRACK_RECEIVED,{itemId:t._currentPlayableItem.id,track:n}))},n=function(t){for(var e=0,n=t&&t.srcElement;e<n.length;e++){var i=n[e];"metadata"===i.kind&&"disabled"===i.mode&&(i.mode="hidden")}};this.node.textTracks.addEventListener("addtrack",e),this.node.textTracks.addEventListener("change",n),this._removeTrackListener=function(){t.node&&t.node.textTracks&&(t.node.textTracks.removeEventListener("addtrack",e),t.node.textTracks.removeEventListener("change",n))}}},e.prototype._setupFullscreenEndListener=function(){var t=this;if(this.node){var e=function(){t.publish(p.CustomRendererEvent.RENDERER_END_FULLSCREEN)};this.node.addEventListener("webkitendfullscreen",e),this._removeFullscreenEndListener=function(){t._removeFullscreenEndListener=null,t.node.removeEventListener("webkitendfullscreen",e)}}},e.prototype._unbindEvents=function(){var t=this;this._removeTrackListener&&this._removeTrackListener(),this._removeFullscreenEndListener&&this._removeFullscreenEndListener(),this._removeAirplayAvailabilityListener&&this._removeAirplayAvailabilityListener(),Object.keys(p.NativeVideoEvent).forEach(function(e){t.node&&t.node.removeEventListener(p.NativeVideoEvent[e],t._onVideoEvent)}),this._videoTap&&(this._videoTap.destroy(),this._videoTap=null),this._eventBus.removeEventListeners(this._eventKeys)},e.prototype._overridePlayMethod=function(t){var e=this;t.__play||(t.__play=t.play.bind(t),t.play=function(){var n=t.__play();return n&&"function"==typeof n.catch&&n.catch(function(n){t.paused&&e.publish(p.CustomRendererEvent.PLAY_BLOCKED)}),n})},e.type=p.RendererType.HTML5_RAW,e}(p.Renderer);e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(67),o=n(19),s=n(0),a=function(){function t(){this._elementPool=[],this._elementsInUse=[],this._unbindGestureHandler=null,this._hasTouchRestriction=o.default.hasTouchRestrictions,this._nodeIdx=1,this.fill()}return t.getPool=function(){return t._singletonPoolInstance||(t._singletonPoolInstance=new t),t._singletonPoolInstance},t.prototype.get=function(){this._elementPool.length<=2&&this.fill();var t=this._elementPool.shift();if(t)return r.default.isUnmuteRestrictionRemoved(t)||this._elementsInUse.push(t),t.setAttribute("data-vp-ridx",this._nodeIdx+""),t.__rendererIndex=this._nodeIdx,this._nodeIdx++,t},t.prototype.fill=function(){this._addNewItems(10-this._elementPool.length)},t.prototype.discard=function(t){r.default.cleanupVideoNode(t);var e=this._elementsInUse.indexOf(t);-1!==e&&this._elementsInUse.splice(e,1)},t.prototype.destroy=function(){this._unbindGestureHandler&&this._unbindGestureHandler(),this._elementPool.length=0,this._elementsInUse.length=0,this._elementsInUse=this._elementPool=[],this._unbindGestureHandler=null},t.prototype._addNewItems=function(t){for(var e=0;e<t;e++){var n=i.userAgent.mobile?r.default.createMobileVideoNode():s.default.createVideoNode();this._elementPool.push(n)}this._hasTouchRestriction&&this._setupRendererRestrictionRemoval()},t.prototype._setupRendererRestrictionRemoval=function(){var t=this;this._unbindGestureHandler||(this._unbindGestureHandler=r.default.waitForValidUserGestureEvent(function(){t._unbindGestureHandler=null,t._elementsInUse.forEach(r.default.removeUnmuteRestriction),t._elementPool.forEach(r.default.removeUnmuteRestriction),t._elementsInUse.forEach(r.default.removeTouchToPlayRestriction),t._elementPool.forEach(r.default.removeTouchToPlayRestriction),t._elementsInUse.length=0}))},t}();e.default=a},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(220),s=n(9),a=n(2),u=n(18),l=n(106),c=n(107),d=n(27),h=n(0),p=n(68),f=n(5),_=function(t){function e(n,i){var r=t.call(this,"flash-renderer")||this;return r.type=e.type,r._eventBus=n,r._model=i,r._error=s,r._blockDetector=new l.default(n),r._resetStates(),r._jobQueue=new c.default(r),r._swfReady=!1,r._crashed=!1,r._active=!1,r.timedOut=!1,r}return i(e,t),e.canUse=function(){return!r.userAgent.safari&&(d.default.isFlashAvailable()&&!p.default.canUse())},e.prototype.create=function(t){var e=this,n=h.default.generateGuid(),i=h.default.getAssetUrl(this._model.isLocal(),this._model.version,"player.swf");return this._eventHandlerName="__YVPFlashHandler_"+this._model.guid,this._bindEvents(),this._eventBus.publish(a.PROFILE_START,a.METRICS.SWF_OBJECT_TO_INIT_START),this.node=this._createNode({id:n,swfUrl:i,params:[{name:"allowscriptaccess",value:"always"},{name:"allowFullScreen",value:"true"},{name:"wmode",value:this._determineWindowMode()},{name:"flashVars",value:"YUIBridgeCallback="+this._eventHandlerName+"&allowedDomain="+document.location.hostname}]}),this.node.pause=function(){e._swfReady?e._pause():e._jobQueue.enQueue(e._pause)},this._removeSWFNotReadyTimeout=setTimeout(function(){h.default.classList(e.node).remove("vp-swf-not-ready")},1e3),this._swfReadyTimeout=setTimeout(function(){e.timedOut=!0,e._eventBus.publish(a.SWF_READY_TIMEOUT,e.node)},7e3),this._eventBus.publish(a.PROFILE_END,a.METRICS.RENDER_TO_SWF),this._eventBus.publish(a.PROFILE_START,a.METRICS.SWF_READY),this.node},e.prototype.play=function(t){if(!this.seeking||this._model.isPaused())if(this._eventBus.publish(a.PROFILE_START,a.METRICS.STREAM_PLAY_TO_RENDER),this._swfReady){this.seeking=!1,this.ended=!1,this._isSeeking=!1;var e=0;this._model.preconnect||(this._mode===f.PlaybackMode.VIDEO?this._jobQueue.flush(!0):this._mode===f.PlaybackMode.AD&&(e=1)),this._jobQueue.getLength()>e&&this._eventBus.publish(a.ERROR,this._createStreamingError(s.PLAYER_CODES.E_INTERNAL_VIOLATION,!1)),this._callFlashMethod("playMedia",t)}else this._jobQueue.enQueue(this.play,[t])},e.prototype.detectFlashBlockers=function(t){this._blockDetector.detect(t)},e.prototype.preload=function(t){},e.prototype.setPlayableItem=function(t,e){if(void 0===e&&(e=0),!t)return!1;this._resetStates(),this._currentPlayableItem=t;var n=h.default.getPlaybackMode(t);this._updatePlaybackMode(n);var i={streams:t.streams,startTime:e,mode:n,uuid:t.id,isCCM:!0};return this._swfReady?this._setStreamsImpl(i):this._jobQueue.enQueue(this._setStreamsImpl,[i]),!0},e.prototype.waitForReady=function(t){var e=this;if(this._swfReady)t();else if(this.timedOut)t(this._createStreamingError(s.WARNING_CODES.E_SWF_TIMEOUT,!0));else{var n=!1;this._eventBus.addEventListener(a.SWF_READY_TIMEOUT,function(){var i=e._createStreamingError(s.WARNING_CODES.E_SWF_TIMEOUT,!0);e._eventBus.publish(a.WARNING,i,!1),n||(n=!0,t(i))},this),this._eventBus.addEventListener(a.SWF_READY,function(){n||(n=!0,t())},this)}},e.prototype.seek=function(t){var e=this;if(this._swfReady)if(this._isSeeking=!0,this._callFlashMethod("get","seekable"))this._callFlashMethod("set","currentTime",t);else var n=this.on(f.RendererEvent.PLAYING,function(){e._callFlashMethod("set","currentTime",t),e.removeEventListener(f.RendererEvent.PLAYING,n)},this);else this._jobQueue.enQueue(this.seek,[t])},e.prototype.getCurrentDate=function(){return null},e.prototype.getCurrentTime=function(){return this._callFlashMethod("get","currentTime")},e.prototype.getDuration=function(){return this._callFlashMethod("get","duration")},e.prototype.setQuality=function(t){this._setQuality({preference:t.preference,bitrate:t.stream.videoMetadata.bitrate})},e.prototype.enterFullScreen=function(){},e.prototype.exitFullScreen=function(){},e.prototype.setVolume=function(t){this._swfReady?this._callFlashMethod("set","volume",t):this._jobQueue.enQueue(this.setVolume,[t])},e.prototype.setMute=function(t){this.setVolume(t?0:this._model.volume)},e.prototype.setAudioLanguage=function(t){},e.prototype.stopMedia=function(){this._callFlashMethod("stopMedia")},e.prototype.bindCustomEvents=function(){},e.prototype.unbindCustomEvents=function(){},e.prototype.bindPlaybackEvents=function(){this._unsubscribeEventBusEvents=[],this._unsubscribeEventBusEvents.push({evt:a.BEFORE_PROGRESS_BEACON,subKey:this._eventBus.addEventListener(a.BEFORE_PROGRESS_BEACON,this._beforeProgressBeaconSend,this)})},e.prototype.detachNode=function(){},e.prototype.reattachNode=function(){},e.prototype.setActive=function(t){this._active=t},e.prototype.unbindPlaybackEvents=function(){var t=this;this._unsubscribeEventBusEvents&&(this._unsubscribeEventBusEvents.forEach(function(e){t._eventBus.removeEventListener(e.evt,e.subKey)}),this._unsubscribeEventBusEvents=[])},e.prototype.showAirplayTargetMenu=function(){},e.prototype.isReady=function(){return this._swfReady},e.prototype.getFlashVersion=function(){return this._swfReady?this._callFlashMethod("get","flashVersion"):null},e.prototype.destroy=function(){this._callFlashMethod("stopMedia"),delete window[this._eventHandlerName],this._unbindEvents(),this.unbindPlaybackEvents(),clearTimeout(this._removeSWFNotReadyTimeout),clearTimeout(this._swfReadyTimeout),this._jobQueue.destroy(),this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.node,this._blockDetector.destroy()},e.prototype._createNode=function(t){var e='<object id="'+t.id+'" class="vp-flash-video vp-swf-not-ready" type="application/x-shockwave-flash" data="'+t.swfUrl+'" width="100%" height="100%">';t.params.forEach(function(t){e+='<param name="'+t.name+'" value="'+t.value+'">'}),e+="</object>";var n=document.createElement("div");return n.innerHTML=e,n.children[0]},e.prototype._determineWindowMode=function(){return"macintosh"===r.userAgent.os&&(r.userAgent.chrome||r.userAgent.safari||r.userAgent.firefox)?"direct":"opaque"},e.prototype._bindEvents=function(){var t=this;window[this._eventHandlerName]=function(e){try{f.RendererEvent[e.type.toUpperCase()]?t._onVideoEvent(e):t._onFlashEvent(e)}catch(t){console.error("Error in flash event handler:",t.message||t,t.stack)}}},e.prototype._onVideoEvent=function(t){var e=t.type,n=f.RendererEvent[e.toUpperCase()];switch("playing"===e&&this._eventBus.publish(a.PROFILE_END,[a.METRICS.STREAM_PLAY_TO_RENDER,a.METRICS.STREAM_REQUEST_TO_RENDER]),e){case"timeupdate":case"seeking":case"seeked":if("timeupdate"===e&&this._isSeeking)break;if("seeked"===e&&(this._isSeeking=!1),this._model.playbackState.isOnCriticalError()||this._model.getState()===u.default.END)break;var i=t.buffered,r={length:1,start:function(){return i?i.start:0},end:function(){return i?i.end:0}};this.publish(n,{currentTime:t.currentTime,duration:t.duration,buffered:r});break;case"error":if(this._mode!==f.PlaybackMode.VIDEO){this.publish(f.RendererEvent.ERROR,this._callFlashMethod("get","error"));break}console.error("Flash Error: critical? ",t.critical," ",t.msg,".",t.detail);var o=void 0;t.code===s.FLASH_CODES.E_HLS_CLIENT_DISABLE_COOKIES?o=h.default.createErr(s.ErrorGroup.Restriction,this._model.playbackState,s.E_PLAYER,t.code,null,t.msg+"; "+t.detail):(0===t.code&&(t.code=s.PLAYER_CODES.E_PLAYER_PLAYBACK_ERROR),o=this._createStreamingError(t.code,!1,null,t.msg+"; "+t.detail)),t.critical&&this._callFlashMethod("stopMedia"),this._eventBus.publish(a.ERROR,o);break;case"ended":this.ended=!0,this.publish(n);break;case"pause":if(this.ended)break;if(this.seeking)break;this.publish(n);break;case"loadeddata":this._eventBus.publish(a.PROFILE_END,a.METRICS.LOAD_TO_LOADED_DATA),this.publish(n);break;case"warning":/Remove Last Fragment Buffer/.test(t.msg)&&this._eventBus.publish(a.RELOAD_FRAGMENT,t.msg);break;default:this.publish(n)}},e.prototype._onFlashEvent=function(t){switch(t.type){case"infoupdate":var e=t.mediaInfo;this._model.bitrate=e.currentStreamBitrate,this._eventBus.publish(a.PLAYBACK_INFO,e);break;case"swfReady":this._swfReady=!0,this._eventBus.publish(a.PROFILE_END,a.METRICS.SWF_READY),this._eventBus.publish(a.PROFILE_END,a.METRICS.SWF_OBJECT_TO_INIT_START,this._callFlashMethod("get","swfInitTimestamp"),!0),clearTimeout(this._swfReadyTimeout),h.default.classList(this.node).remove("vp-swf-not-ready"),this._setPlayerInfo(),this._jobQueue.flush(!0),this._eventBus.publish(a.SWF_READY,this.node);break;case"noAccessAllowed":this._eventBus.publish(a.SWF_READY,this.node),this._handleCrash();break;case"playerPluginResize":this._eventBus.publish(a.PLAYER_RESIZE,t.width,t.height);break;case"jsLog":break;case"uiInteract":this.publish(f.CustomRendererEvent.CLICK);break;case"bitratechange":var n=t.bitrate,i=t.info;this._eventBus.publish(a.API.BITRATE_CHANGE,n,i);break;case"durationchange":break;case"pluginLoadComplete":this._eventBus.publish(a.RENDERER_PLUGIN_LOADED);break;case"pluginLoadError":this._eventBus.publish(a.RENDERER_PLUGIN_LOAD_FAILED);break;case"pluginLoadTimedOut":this._eventBus.publish(a.RENDERER_PLUGIN_LOAD_TIMED_OUT);break;case"loadFirstFragment":this._eventBus.publish(a.HLS_FIRST_TS_LOAD_START);break;case"firstFragmentFirstByteFReceived":this._eventBus.publish(a.HLS_FIRST_TS_FIRST_BYTE_ARRIVE);break;case"reloadBegin":this._eventBus.publish(a.MEDIA_RELOAD_BEGIN);break;case"reloadEnd":this._eventBus.publish(a.MEDIA_RELOAD_END);break;case"mediaPlaylistLoaded":this._eventBus.publish(a.MEDIA_PLAYLIST_LOADED);break;case"mediaPlaylistUpdated":this._eventBus.publish(a.MEDIA_PLAYLIST_UPDATED,t.interval);break;case"streamLoadBegin":this._eventBus.publish(a.PROFILE_START,a.METRICS.STREAM_REQUEST_TO_RENDER);break;case"vttSegmentLoaded":t.vttSegmentInfo&&(t.vttSegmentInfo.itemId=this._currentPlayableItem.id),this._eventBus.publish(a.VTT_SEGMENT_LOADED,t.vttSegmentInfo);break;case"bitrateListChanged":this._eventBus.publish(a.BITRATE_LIST_CHANGED,t.bitrates,t.heights);break;case"playbackComplete":var r=this._model.playlist.getCurrentItem();r&&r.isLive()&&this._eventBus.publish(a.WARNING,this._createStreamingError(s.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE,!0),!0);break;case"fragLoadRetryFailure":this._eventBus.publish(a.FRAG_LOAD_RETRY_FAILURE);break;case"liveMediaPlaylistLoadRetryFailure":this._eventBus.publish(a.LIVE_MEDIA_PLAYLIST_LOAD_RETRY_FAILURE);break;case"liveLoadingLate":this._eventBus.publish(a.LIVE_LOADING_LATE);break;case"PTSDiscontinuity":this._eventBus.publish(a.PTS_DISCONTINUITY,t.timedifference);break;case"cuepointStarted":var o={cueoutStartSeqNum:t.startSeqNum,cueoutStreamIndex:t.cueoutStreamIndex};this._eventBus.publish(a.API.CUEPOINT_STARTED,t.cuepointDuration,t.cuepointPlayedTime,o);break;case"cuepointStopped":this._eventBus.publish(a.API.CUEPOINT_STOPPED);break;case"cuepointDetected":this._eventBus.publish(a.API.CUEPOINT_DETECTED,t.cuepointDuration,t.timeGapBeforeCUEOUT)}},e.prototype._setPlayerInfo=function(){var t=this._model,e={name:"Fireball",site:t.site,version:t.version,region:t.region,autoplay:t.autoplay,hostEnv:t.isLocal()?"l":"p",lang:t.lang,conviva:!1,bucket:h.default.bucketize(),browserName:this._getBrowserName(),os:r.userAgent.os,disableGPU:!1};this._callFlashMethod("set","playerInfo",e)},e.prototype._updatePlaybackMode=function(t){t!==this._mode&&(this._mode=t,this._callFlashMethod("set","playMode",t))},e.prototype._getBrowserName=function(){var t="";return r.userAgent.chrome?t="chrome":r.userAgent.firefox?t="firefox":r.userAgent.safari?t="safari":r.userAgent.ie?t="ie":r.userAgent.opera&&(t="opera"),t},e.prototype._setStreamsImpl=function(t){var e=t.streams,n=t.mode;this.ended=!1,this._isSeeking=!1,!e||e.length<=0||(n===f.PlaybackMode.AD?this._setAdSrc(t):t.isCCM?this._setVideoSrc(t):this._setStreamUrlSrc(t))},e.prototype._setSrc=function(t){this._model.preconnect?this._setSrcImpl(t):(this._jobQueue.deQueue(this._setSrcImpl),this._jobQueue.enQueue(this._setSrcImpl,[t]))},e.prototype._setSrcImpl=function(t){t.live&&"hls"===t.streamType&&(this._hlsCueTracker||(this._hlsCueTracker=new o.default(this._eventBus,this._model)),this._hlsCueTracker.updatePlaylistURLs("",t.streams[0].url)),this._callFlashMethod("set","src",t)},e.prototype._setAdSrc=function(t){var e=t.streams;try{this._callFlashMethod("set","src",{live:!1,rtx:!1,url:e[0].url})}catch(t){this.publish(f.RendererEvent.ERROR)}},e.prototype._setStreamUrlSrc=function(t){var e={live:!1,rtx:!1};if(t.streams&&t.streams.length){var n=t.streams[0];"m3u8"===n.format?(t.streams.forEach(function(t){t.url&&""!==t.url&&(t.host=t.url)}),e.streams=t.streams):e.url=n.url,e.live=n.live}this._eventBus.publish(a.PROFILE_START,a.METRICS.LOAD_TO_LOADED_DATA),this._callFlashMethod("set","src",e)},e.prototype._setVideoSrc=function(t){var e=this,n=t.streamProfiles&&t.streamProfiles.length>0?t.streamProfiles:t.streams;this._eventBus.publish(a.PROFILE_START,a.METRICS.LOAD_TO_LOADED_DATA);var i=[],r=[];if(t.altStreams&&t.altStreams.forEach(function(t){"SUBTITLES"===t.type&&i.push(t)}),n.forEach(function(t){var n=t;n.format&&n.format.indexOf("m3u8")>-1&&(n.format="m3u8"),n.path&&n.path.indexOf("content=hls")>-1&&(n.format="m3u8"),n.isAtlas()&&e._fixPathForFlash(n),r.push(n)}),!(r.length<=0)){var o=r.filter(function(t){return!e._isProgressiveDownload(t)}),s=this._model.playlist.getCurrentItem(),u={uuid:t.uuid,title:s?s.title:"",duration:s?s.duration:0};t.startTime&&(u.startTime=t.startTime),i.length>0&&(u.subtitles=i),o.length>0?(u.streamType=o[0].getType(),u.streams=o,u.live=o[0].live,u.rtx=o[0].isRTX()):(r=r.sort(function(t,e){return e.videoMetadata.bitrate-t.videoMetadata.bitrate}),u.streamType=r[0].getType(),u.url=r[0].url,u.rtx=r[0].isRTX(),u.bitrate=r[0].videoMetadata.bitrate),this._callFlashMethod("set","stopBufferingOnPause",this._model.stopBufferingOnPause),this._callFlashMethod("set","preload",this._model.preload),this._callFlashMethod("set","ignoreEndlist",t.ignoreEndlist),this._setSrc(u)}},e.prototype._fixPathForFlash=function(t){if(t.format){var e="mp4"===t.format.toLowerCase(),n=t.path.replace(/^\/?mp4:/,"");(e||"flv"===t.format.toLowerCase())&&(n=n.replace(/^\//,"")),e&&t.isRTMP()&&(n="mp4:"+n),t.path=n}},e.prototype._isProgressiveDownload=function(t){return!t.host||/^http[s]?:\/\//.test(t.host)&&"m3u8"!==t.format&&"f4m"!==t.format},e.prototype._pause=function(){this._callFlashMethod("pauseMedia")},e.prototype._setQuality=function(t){this._swfReady?this._callFlashMethod("set","quality",t):this._jobQueue.enQueue(this._setQuality,[t])},e.prototype._beforeProgressBeaconSend=function(t){var e;if(t&&this._active&&this._swfReady){var n=document.getElementsByClassName("vp-main"),i=!h.default.isPlayerInBackground()&&n&&n.length>0&&0!==h.default.getElementViewability(n[0]);for(e=this._callFlashMethod("get","segmentMetrics");e&&e.length;){var r=e.shift();r.vis||(r.vis=i),t.val&&t.val.push(r)}}},e.prototype._unbindEvents=function(){},e.prototype._callFlashMethod=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._crashed)try{if(this._swfReady&&this.node)return this.node[t].apply(this.node,e)}catch(t){this._handleCrash(t)}},e.prototype._handleCrash=function(t,e,n){void 0===e&&(e=""),void 0===n&&(n=[]),console.error("Flash crashed:",t),this._crashed=!0;var i,r=!0;"get"===e&&"segmentMetrics"===n[0]&&(r=!1,i="segInfo-flash-error",this._crashed=!1);var o=this._createStreamingError(s.WARNING_CODES.E_FLASH_CRASHED,!0,i);this._model.playbackState.ad?this.publish(f.RendererEvent.ERROR,o):this._eventBus.publish(a.WARNING,o,r)},e.prototype._createStreamingError=function(t,e,n,i){return h.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,e?s.E_WARNING:s.E_PLAYER,t,n,i)},e.prototype._resetStates=function(){this._isSeeking=!1,this._currentPlayableItem=null,this._mode=f.PlaybackMode.VIDEO,this.seeking=!1,this.ended=!1},e.type=f.RendererType.FLASH,e}(f.Renderer);e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(9),o=n(2),s=n(0),a=function(){function t(t){this._eventBus=t,this._scenarios=[this._scenario1,this._scenario2,this._scenario3,this._scenario4]}return t.prototype.destroy=function(){this._observer&&this._observer.disconnect()},t.prototype.detect=function(t){var e=this;if(!this._isFlashBlocked(t)){var n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(i.userAgent.ie&&i.userAgent.ie<11||void 0===n)return;this._observer=new n(function(n){var i={};try{n.forEach(function(n){if(e._isFlashBlocked(t))throw i})}catch(t){if(t!==i)throw t;e._observer.disconnect()}});this._observer.observe(t,{attributes:!0,childList:!0,characterData:!0})}},t.prototype._isFlashBlocked=function(t){if(!t)return!1;for(var e=0,n=this._scenarios;e<n.length;e++){var i=n[e].call(this,t);if(i)return this._eventBus.publish(o.INFO,i),this._observer&&this._observer.disconnect(),!0}return!1},t.prototype._scenario1=function(t){var e=t.querySelector("object");if(e&&"none"===e.style.display){var n=i.userAgent.safari?r.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_SAFARI_STYLE_NONE:r.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_GENERAL_STYLE_NONE;return s.default.createErr(r.ErrorGroup.Restriction,null,r.E_INFO,n)}return null},t.prototype._scenario2=function(t){return t&&t.querySelector("div[bginactive]")?s.default.createErr(r.ErrorGroup.Restriction,null,r.E_INFO,r.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_REPLACED_BY_BGINACTIVE):null},t.prototype._scenario3=function(t){return i.userAgent.safari&&t&&t.querySelector('div[aria-label~="Safari Power Saver"]')?s.default.createErr(r.ErrorGroup.Restriction,null,r.E_INFO,r.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_POWER_SAVING):null},t.prototype._scenario4=function(t){return t&&t.querySelector('div[style~="chrome-extension"]')?s.default.createErr(r.ErrorGroup.Restriction,null,r.E_INFO,r.INFO_CODES.E_PLAYER_FLASH_IS_BLOCKED_BLOCKERS_SCREEN):null},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._client=t,this._jobs=new Array}return t.prototype.destroy=function(){this.flush(!1)},t.prototype.enQueue=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this._jobs.push({args:e,job:t})},t.prototype.flush=function(t){var e=this;void 0===t&&(t=!1);var n=this._jobs;this._jobs=new Array,t&&n.forEach(function(t){if(e._client){var n=t.job,i=t.args;n.apply(e._client,i)}})},t.prototype.deQueue=function(t,e){if(void 0===e&&(e=!1),t)for(var n=0;n<this._jobs.length;n++){var i=this._jobs[n],r=i.job,o=i.args;if(r===t){e&&this._client&&r.apply(this._client,o),this._jobs.splice(n,1);break}}},t.prototype.getLength=function(){return this._jobs.length},t}();e.default=i},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(1),s=n(2),a=n(5),u=n(27),l=n(0),c=n(109),d=function(t){function e(n,i){var r=t.call(this,n,i)||this;return r.type=e.type,r}return i(e,t),e.canUse=function(){return!o.userAgent.tv&&(u.default.is360Supported()&&t.canUse.call(this))},e.prototype.create=function(e){return t.prototype.create.call(this,e),this._init360(),this.container},e.prototype.destroy=function(){this._destroy360(),t.prototype.destroy.call(this)},e.prototype.waitForReady=function(t){var e=this;this._isReady?(this._onReady(),t()):this._360ReadySubscriptionKey=this._eventBus.addEventListener(s.THREE_SIXTY_READY,function(){e._onReady(),t()},this)},e.prototype._init360=function(){var t=this;this._isReady=!1,this.node&&(this.node.setAttribute("crossorigin","anonymous"),this.node.style.visibility="hidden",this._node360=document.createElement("div"),this._node360.classList.add("vp-360-node"),this._node360.style.position="absolute",this.container=document.createElement("div"),this.container.setAttribute("id",l.default.generateGuid()),this.container.classList.add("vp-360-video"),this.container.appendChild(this.node),this.container.appendChild(this._node360),this._lazyLoadDepsLibrary().then(function(){t._initAfterLazyLoad()}).catch(function(t){console.warn("Cannot download three-facade.js dependency: ",t)}))},e.prototype._lazyLoadDepsLibrary=function(){return new Promise(function(t,e){n.e(1).then(function(){r=n(53).default,t(r)}.bind(null,n)).catch(function(t){e(t)})})},e.prototype._initAfterLazyLoad=function(){this._camera=new r.PerspectiveCamera(70,16/9,.01,1e3),this._camera.target=new r.Vector3(0,0,0);var t=new r.SphereBufferGeometry(500,64,32);t.scale(-1,1,1);var e=new r.VideoTexture(this.node);e.minFilter=r.NearestFilter;var n=new r.MeshBasicMaterial({map:e}),i=new r.Mesh(t,n);this._scene=new r.Scene,this._scene.add(i),this._360renderer=new r.WebGLRenderer,this._360renderer.setPixelRatio(window.devicePixelRatio),this._node360&&this._node360.appendChild(this._360renderer.domElement),this._pie360=new c.default(this.container),this._pie360.render(),this._lon=0,this._lat=0,this._stopAnimation=!0,this._bind360Events(),this._isReady=!0,this._eventBus.publish(s.THREE_SIXTY_READY)},e.prototype._bind360Events=function(){var t=this;this._mouseDownHandler=this._onMouseDown.bind(this),this._mouseMoveHandler=this._onMouseMove.bind(this),this._mouseUpHandler=this._onMouseUp.bind(this),this._mouseOverHandler=this._onMouseOver.bind(this),this._mouseOutHandler=this._onMouseOut.bind(this),this._resizeHandler=this._onResize.bind(this),this.container&&(this.container.addEventListener("mousedown",this._mouseDownHandler,!1),this.container.addEventListener("mousemove",this._mouseMoveHandler,!1),this.container.addEventListener("mouseup",this._mouseUpHandler,!1),this.container.addEventListener("mouseover",this._mouseOverHandler,!1),this.container.addEventListener("mouseout",this._mouseOutHandler,!1),this.container.addEventListener("resize",this._resizeHandler,!1)),this._onPauseHandler=this._onPause.bind(this),this._onPlayingHandler=this._onPlaying.bind(this),this._onSeekedHandler=this._onSeeked.bind(this),this.node&&(this.node.addEventListener("pause",this._onPauseHandler),this.node.addEventListener("playing",this._onPlayingHandler),this.node.addEventListener("seeked",this._onSeekedHandler)),this._pie360&&this._pie360.addClickListener(this._backToInitialPosition.bind(this)),this._eventSubscriptionKeys={},this._eventSubscriptionKeys[s.PLAYER_RESIZE]=this._eventBus.addEventListener(s.PLAYER_RESIZE,function(e,n){window.setTimeout(function(){t._isFullscreen&&(e=window.screen.width,n=window.screen.height),t._resize(e,n)},1)},this),this._eventSubscriptionKeys[s.FULLSCREEN_CHANGE]=this._eventBus.addEventListener(s.FULLSCREEN_CHANGE,function(e){t._isFullscreen=!!e},this),this._eventSubscriptionKeys[s.PLAYER_DIMENSION_CHANGE]=this._eventBus.addEventListener(s.PLAYER_DIMENSION_CHANGE,function(){var e,n,i;t.node&&t.node.parentNode&&((e=window.getComputedStyle(t.node.parentNode))&&(n=parseInt(e.getPropertyValue("width"),10),i=parseInt(e.getPropertyValue("height"),10)),n&&!isNaN(n)&&i&&!isNaN(i)&&t._resize(n,i))},this)},e.prototype._backToInitialPosition=function(){this._lon=0,this._lat=0,this._update(),this._pie360&&this._pie360.update(this._lon),this._eventBus.publish(s.THREE_SIXTY_PIE_INTERACT)},e.prototype._unbind360Events=function(){var t=this;this._eventSubscriptionKeys&&Object.keys(this._eventSubscriptionKeys).forEach(function(e){t._eventBus.removeEventListener(e,t._eventSubscriptionKeys[e])}),this._mouseDownHandler&&(this.container&&this.container.removeEventListener("mousedown",this._mouseDownHandler,!1),this._mouseDownHandler=null),this._mouseMoveHandler&&(this.container&&this.container.removeEventListener("mousemove",this._mouseMoveHandler,!1),this._mouseMoveHandler=null),this._mouseUpHandler&&(this.container&&this.container.removeEventListener("mouseup",this._mouseUpHandler,!1),this._mouseUpHandler=null),this._mouseOverHandler&&(this.container&&this.container.removeEventListener("mouseover",this._mouseOverHandler,!1),this._mouseOverHandler=null),this._resizeHandler&&(this.container&&this.container.removeEventListener("resize",this._resizeHandler,!1),this._resizeHandler=null),this._mouseOverHandler&&(this.container&&this.container.removeEventListener("mouseover",this._mouseOverHandler,!1),this._mouseOverHandler=null),this._onPauseHandler&&(this.node&&this.node.removeEventListener("pause",this._onPauseHandler),this._onPauseHandler=null),this._onPlayingHandler&&(this.node&&this.node.removeEventListener("playing",this._onPlayingHandler),this._onPlayingHandler=null),this._onSeekedHandler&&(this.node&&this.node.removeEventListener("seeked",this._onSeekedHandler),this._onSeekedHandler=null),this._360ReadySubscriptionKey&&(this._eventBus.removeEventListener(s.THREE_SIXTY_READY,this._360ReadySubscriptionKey),this._360ReadySubscriptionKey=null)},e.prototype._stopDragging=function(){this._isUserInteracting=!1,this.container&&(this.container.classList.remove("grabbing-360"),this.container.classList.add("over-360")),this._isPausedAnimate&&(this._isPausedAnimate=!1,this._stopAnimation=!0)},e.prototype._resize=function(t,e){var n=t,i=e;e*(16/9)>t&&(i=t/(16/9)),this._camera&&(this._camera.setViewOffset(t,e,t-n,e-i,n,i),this._camera.updateProjectionMatrix()),this._360renderer&&this._360renderer.setSize(t,e)},e.prototype._animate=function(){var t=this._animate.bind(this);if(this._stopAnimation&&this._requestAnimationId)return window.cancelAnimationFrame(this._requestAnimationId),void(this._requestAnimationId=null);this._requestAnimationId=window.requestAnimationFrame(t),this._update()},e.prototype._update=function(){var t,e;this._lat=Math.max(-85,Math.min(85,this._lat)),t=r.Math.degToRad(90+this._lat),e=r.Math.degToRad(this._lon),this._camera&&(this._camera.position.x=500*Math.sin(t)*Math.cos(e),this._camera.position.y=500*Math.cos(t),this._camera.position.z=500*Math.sin(t)*Math.sin(e),this._camera.lookAt(this._camera.target),this._camera.position.copy(this._camera.target).negate(),this._scene&&this._360renderer&&this._360renderer.render(this._scene,this._camera))},e.prototype._destroy360=function(){this._requestAnimationId&&window.cancelAnimationFrame(this._requestAnimationId),this._stopAnimation=!0,this._unbind360Events(),this._pie360&&(this._pie360.destroy(),this._pie360=null),this._node360&&(this._node360.parentNode&&this._node360.parentNode.removeChild(this._node360),this._node360=null),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this._camera=null,this._scene=null,this._360renderer=null},e.prototype._onPause=function(){this._isPaused=!0,this._stopAnimation=!0},e.prototype._onPlaying=function(){this._isPaused=!1,this._stopAnimation=!1,this._animate()},e.prototype._onSeeked=function(){this._update()},e.prototype._onMouseOver=function(){this.container&&this.container.classList.add("over-360")},e.prototype._onMouseDown=function(t){this._hasMouseDownAndMoved=!1,this.container&&(this.container.classList.remove("over-360"),this.container.classList.add("grabbing-360")),this._isUserInteracting=!0,this._onPointerDownPointX=t.clientX,this._onPointerDownPointY=t.clientY,this._onPointerDownLon=this._lon,this._onPointerDownLat=this._lat},e.prototype._onMouseMove=function(t){this._isUserInteracting&&(this._isPaused&&!this._isPausedAnimate&&(this._isPausedAnimate=!0,this._stopAnimation=!1,this._animate()),this._hasMouseDownAndMoved=!0,this._lon=.1*(this._onPointerDownPointX-t.clientX)+this._onPointerDownLon,this._lat=.1*(t.clientY-this._onPointerDownPointY)+this._onPointerDownLat,this._pie360&&this._pie360.update(this._lon))},e.prototype._onMouseUp=function(){this._isUserInteracting&&(this._stopDragging(),this._hasMouseDownAndMoved?this._eventBus.publish(s.THREE_SIXTY_INTERACT):this._eventBus.publish(s.TOGGLE_PLAY_PAUSE)),this._hasMouseDownAndMoved=!1},e.prototype._onMouseOut=function(){this._stopDragging()},e.prototype._onResize=function(){this.container&&this._resize(this.container.offsetWidth,this.container.offsetHeight)},e.prototype._onReady=function(){this._360ReadySubscriptionKey&&(this._eventBus.removeEventListener(s.THREE_SIXTY_READY,this._360ReadySubscriptionKey),this._360ReadySubscriptionKey=null),!this._isInitialized&&this._360renderer&&this.container&&(this._360renderer.setSize(this.container.offsetWidth,this.container.offsetHeight),this._isInitialized=!0)},e.type=a.RendererType.HTML5_HLS_360,e}(n(44).default);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._canvas=document.createElement("canvas"),this._ctx=this._canvas.getContext("2d"),this._canvas.setAttribute("width","80"),this._canvas.setAttribute("height","80"),this._canvas.classList.add("vp-360-pie"),t.appendChild(this._canvas),this._movement=1}return t.prototype.render=function(){this._draw()},t.prototype.addClickListener=function(t){this._onClick=function(e){e.preventDefault(),e.stopPropagation(),t&&t()},this._doNothing=function(t){t.preventDefault(),t.stopPropagation()},this._canvas.addEventListener("click",this._onClick,!1),this._canvas.addEventListener("mousedown",this._doNothing,!1),this._canvas.addEventListener("mouseup",this._doNothing,!1)},t.prototype.update=function(t){var e=t%360;e<0&&(e=360+e),e*=-1,this._movement=e/90+Math.PI/4-3.79,this._draw()},t.prototype.destroy=function(){this._canvas.removeEventListener("click",this._onClick,!1),this._canvas.removeEventListener("mousedown",this._doNothing,!1),this._canvas.removeEventListener("mouseup",this._doNothing,!1),this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)},t.prototype._draw=function(){var t=this._ctx;if(t){t.clearRect(0,0,80,80),t.beginPath(),t.arc(40,40,28,0,2*Math.PI),t.shadowColor="rgba(18, 23, 23, 0.5)",t.shadowBlur=10,t.lineWidth=4,t.strokeStyle="#fff",t.stroke(),t.beginPath(),t.arc(40,3,2,0,2*Math.PI),t.fillStyle="#fff",t.fill();var e=-.5*Math.PI*this._movement;t.beginPath(),t.arc(40,40,28,Math.PI/4+e,-Math.PI/4+e,!0),t.lineTo(40,40),t.fillStyle="rgba(255, 255, 255, 0.6)",t.fill()}},t}();e.default=i},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(1),s=n(2),a=n(5),u=n(27),l=n(0),c=n(109),d=function(t){function e(n,i){var r=t.call(this,n,i)||this;return r.type=e.type,r._capabilities=i.capabilities[a.RendererType.HTML5_RAW_360],r}return i(e,t),e.canUse=function(){return!o.userAgent.tv&&(u.default.is360Supported()&&t.canUse.call(this))},e.prototype.create=function(e){return t.prototype.create.call(this,e),this._init360(),this.container},e.prototype.destroy=function(){this._destroy360(),t.prototype.destroy.call(this)},e.prototype.waitForReady=function(t){var e=this;this._isReady?(this._onReady(),t()):this._360ReadySubscriptionKey=this._eventBus.addEventListener(s.THREE_SIXTY_READY,function(){e._onReady(),t()},this)},e.prototype._init360=function(){var t=this;this._isReady=!1,this.node&&(this.node.setAttribute("crossorigin","anonymous"),this.node.style.visibility="hidden",this._node360=document.createElement("div"),this._node360.classList.add("vp-360-node"),this._node360.style.position="absolute",this.container=document.createElement("div"),this.container.setAttribute("id",l.default.generateGuid()),this.container.classList.add("vp-360-video"),this.container.appendChild(this.node),this.container.appendChild(this._node360),this._lazyLoadDepsLibrary().then(function(){t._initAfterLazyLoad()}).catch(function(t){console.warn("Cannot download three-facade.js dependency: ",t)}))},e.prototype._lazyLoadDepsLibrary=function(){return new Promise(function(t,e){n.e(1).then(function(){r=n(53).default,t(r)}.bind(null,n)).catch(function(t){e(t)})})},e.prototype._initAfterLazyLoad=function(){this._camera=new r.PerspectiveCamera(70,16/9,.01,1e3),this._camera.target=new r.Vector3(0,0,0);var t=new r.SphereBufferGeometry(500,64,32);t.scale(-1,1,1);var e=new r.VideoTexture(this.node);e.minFilter=r.NearestFilter;var n=new r.MeshBasicMaterial({map:e}),i=new r.Mesh(t,n);this._scene=new r.Scene,this._scene.add(i),this._360renderer=new r.WebGLRenderer,this._360renderer.setPixelRatio(window.devicePixelRatio),this._node360&&this._node360.appendChild(this._360renderer.domElement),this._pie360=new c.default(this.container),this._pie360.render(),this._lon=0,this._lat=0,this._stopAnimation=!0,this._bind360Events(),this._isReady=!0,this._eventBus.publish(s.THREE_SIXTY_READY)},e.prototype._bind360Events=function(){var t=this;this._mouseDownHandler=this._onMouseDown.bind(this),this._mouseMoveHandler=this._onMouseMove.bind(this),this._mouseUpHandler=this._onMouseUp.bind(this),this._mouseOverHandler=this._onMouseOver.bind(this),this._mouseOutHandler=this._onMouseOut.bind(this),this._resizeHandler=this._onResize.bind(this),this.container&&(this.container.addEventListener("mousedown",this._mouseDownHandler,!1),this.container.addEventListener("mousemove",this._mouseMoveHandler,!1),this.container.addEventListener("mouseup",this._mouseUpHandler,!1),this.container.addEventListener("mouseover",this._mouseOverHandler,!1),this.container.addEventListener("mouseout",this._mouseOutHandler,!1),this.container.addEventListener("resize",this._resizeHandler,!1)),this._onPauseHandler=this._onPause.bind(this),this._onPlayingHandler=this._onPlaying.bind(this),this._onSeekedHandler=this._onSeeked.bind(this),this.node&&(this.node.addEventListener("pause",this._onPauseHandler),this.node.addEventListener("playing",this._onPlayingHandler),this.node.addEventListener("seeked",this._onSeekedHandler)),this._pie360&&this._pie360.addClickListener(this._backToInitialPosition.bind(this)),this._eventSubscriptionKeys={},this._eventSubscriptionKeys[s.PLAYER_RESIZE]=this._eventBus.addEventListener(s.PLAYER_RESIZE,function(e,n){window.setTimeout(function(){t._isFullscreen&&(e=window.screen.width,n=window.screen.height),t._resize(e,n)},1)},this),this._eventSubscriptionKeys[s.FULLSCREEN_CHANGE]=this._eventBus.addEventListener(s.FULLSCREEN_CHANGE,function(e){t._isFullscreen=!!e},this),this._eventSubscriptionKeys[s.PLAYER_DIMENSION_CHANGE]=this._eventBus.addEventListener(s.PLAYER_DIMENSION_CHANGE,function(){var e,n,i;t.node&&t.node.parentNode&&((e=window.getComputedStyle(t.node.parentNode))&&(n=parseInt(e.getPropertyValue("width"),10),i=parseInt(e.getPropertyValue("height"),10)),n&&!isNaN(n)&&i&&!isNaN(i)&&t._resize(n,i))},this)},e.prototype._backToInitialPosition=function(){this._lon=0,this._lat=0,this._update(),this._pie360&&this._pie360.update(this._lon),this._eventBus.publish(s.THREE_SIXTY_PIE_INTERACT)},e.prototype._unbind360Events=function(){var t=this;this._eventSubscriptionKeys&&Object.keys(this._eventSubscriptionKeys).forEach(function(e){t._eventBus.removeEventListener(e,t._eventSubscriptionKeys[e])}),this._mouseDownHandler&&(this.container&&this.container.removeEventListener("mousedown",this._mouseDownHandler,!1),this._mouseDownHandler=null),this._mouseMoveHandler&&(this.container&&this.container.removeEventListener("mousemove",this._mouseMoveHandler,!1),this._mouseMoveHandler=null),this._mouseUpHandler&&(this.container&&this.container.removeEventListener("mouseup",this._mouseUpHandler,!1),this._mouseUpHandler=null),this._mouseOverHandler&&(this.container&&this.container.removeEventListener("mouseover",this._mouseOverHandler,!1),this._mouseOverHandler=null),this._resizeHandler&&(this.container&&this.container.removeEventListener("resize",this._resizeHandler,!1),this._resizeHandler=null),this._mouseOverHandler&&(this.container&&this.container.removeEventListener("mouseover",this._mouseOverHandler,!1),this._mouseOverHandler=null),this._onPauseHandler&&(this.node&&this.node.removeEventListener("pause",this._onPauseHandler),this._onPauseHandler=null),this._onPlayingHandler&&(this.node&&this.node.removeEventListener("playing",this._onPlayingHandler),this._onPlayingHandler=null),this._onSeekedHandler&&(this.node&&this.node.removeEventListener("seeked",this._onSeekedHandler),this._onSeekedHandler=null),this._360ReadySubscriptionKey&&(this._eventBus.removeEventListener(s.THREE_SIXTY_READY,this._360ReadySubscriptionKey),this._360ReadySubscriptionKey=null)},e.prototype._stopDragging=function(){this._isUserInteracting=!1,this.container&&(this.container.classList.remove("grabbing-360"),this.container.classList.add("over-360")),this._isPausedAnimate&&(this._isPausedAnimate=!1,this._stopAnimation=!0)},e.prototype._resize=function(t,e){var n=t,i=e;e*(16/9)>t&&(i=t/(16/9)),this._camera&&(this._camera.setViewOffset(t,e,t-n,e-i,n,i),this._camera.updateProjectionMatrix()),this._360renderer&&this._360renderer.setSize(t,e)},e.prototype._animate=function(){var t=this._animate.bind(this);if(this._stopAnimation&&this._requestAnimationId)return window.cancelAnimationFrame(this._requestAnimationId),void(this._requestAnimationId=null);this._requestAnimationId=window.requestAnimationFrame(t),this._update()},e.prototype._update=function(){var t,e;this._lat=Math.max(-85,Math.min(85,this._lat)),t=r.Math.degToRad(90+this._lat),e=r.Math.degToRad(this._lon),this._camera&&(this._camera.position.x=500*Math.sin(t)*Math.cos(e),this._camera.position.y=500*Math.cos(t),this._camera.position.z=500*Math.sin(t)*Math.sin(e),this._camera.lookAt(this._camera.target),this._camera.position.copy(this._camera.target).negate(),this._scene&&this._360renderer&&this._360renderer.render(this._scene,this._camera))},e.prototype._destroy360=function(){this._requestAnimationId&&window.cancelAnimationFrame(this._requestAnimationId),this._stopAnimation=!0,this._unbind360Events(),this._pie360&&(this._pie360.destroy(),this._pie360=null),this._node360&&(this._node360.parentNode&&this._node360.parentNode.removeChild(this._node360),this._node360=null),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this._camera=null,this._scene=null,this._360renderer=null},e.prototype._onPause=function(){this._isPaused=!0,this._stopAnimation=!0},e.prototype._onPlaying=function(){this._isPaused=!1,this._stopAnimation=!1,this._animate()},e.prototype._onSeeked=function(){this._update()},e.prototype._onMouseOver=function(){this.container&&this.container.classList.add("over-360")},e.prototype._onMouseDown=function(t){this._hasMouseDownAndMoved=!1,this.container&&(this.container.classList.remove("over-360"),this.container.classList.add("grabbing-360")),this._isUserInteracting=!0,this._onPointerDownPointX=t.clientX,this._onPointerDownPointY=t.clientY,this._onPointerDownLon=this._lon,this._onPointerDownLat=this._lat},e.prototype._onMouseMove=function(t){this._isUserInteracting&&(this._isPaused&&!this._isPausedAnimate&&(this._isPausedAnimate=!0,this._stopAnimation=!1,this._animate()),this._hasMouseDownAndMoved=!0,this._lon=.1*(this._onPointerDownPointX-t.clientX)+this._onPointerDownLon,this._lat=.1*(t.clientY-this._onPointerDownPointY)+this._onPointerDownLat,this._pie360&&this._pie360.update(this._lon))},e.prototype._onMouseUp=function(){this._isUserInteracting&&(this._stopDragging(),this._hasMouseDownAndMoved?this._eventBus.publish(s.THREE_SIXTY_INTERACT):this._eventBus.publish(s.TOGGLE_PLAY_PAUSE)),this._hasMouseDownAndMoved=!1},e.prototype._onMouseOut=function(){this._stopDragging()},e.prototype._onResize=function(){this.container&&this._resize(this.container.offsetWidth,this.container.offsetHeight)},e.prototype._onReady=function(){this._360ReadySubscriptionKey&&(this._eventBus.removeEventListener(s.THREE_SIXTY_READY,this._360ReadySubscriptionKey),this._360ReadySubscriptionKey=null),!this._isInitialized&&this._360renderer&&this.container&&(this._360renderer.setSize(this.container.offsetWidth,this.container.offsetHeight),this._isInitialized=!0)},e.type=a.RendererType.HTML5_RAW_360,e}(n(37).default);e.default=d},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(2),s=n(18),a=n(4),u=n(0),l=n(37),c=n(5),d={hls:"application/vnd.apple.mpegurl",mp4:"video/mp4",webm:"video/webm"},h=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return i(e,t),e.canUse=function(){return!!r.userAgent.tv&&(!r.userAgent.tizen&&!r.userAgent.orsay&&!(!r.userAgent.firetv&&!r.userAgent.presto))},e.prototype.play=function(t){void 0===t&&(t=0),this.node&&(this.ended=!1,a.isNumber(t)&&t>0&&t<this.node.duration&&(this.node.currentTime=t),this.seeking=!1,this._eventBus.publish(o.PROFILE_START,o.METRICS.STREAM_PLAY_TO_RENDER),this._startPlay())},e.prototype.switchStream=function(t){this._switchSrc(t.url,t.getType())},e.prototype._onPlaybackProgress=function(t){if(t-this._lastABRCheckTime>10){this._lastABRCheckTime=t;var e=this._getBestStream(this._bitrateSelector.getRecommendedBitrate());e&&(this._switchSrc(e.url,e.getType()),this._updateStreamBitrateInfo(e))}},e.prototype._setSrc=function(t,e,n){var i=this;if(this.node&&(this.ended=!1,this.sourceEl||(this.sourceEl=this.node.getElementsByTagName("source")[0]),this.sourceEl.src!==t.url||n)){this._deleteTracks(),r.userAgent.vizio&&"vizio-mtk"===window.appid&&(t.url=u.default.appendQueryString(t.url,{appid:window.appid})),this._eventBus.publish(o.PROFILE_START,o.METRICS.STREAM_REQUEST_TO_RENDER);var a=d[t.getType()]||"video/mp4";if(this.sourceEl.type=a,this._isHttpForced()&&(t.url="http"+t.url.substring(5),t.url.indexOf("protocol=https")>-1&&(t.url=t.url.replace(/protocol=https/i,"protocol=http"))),this.sourceEl.src=t.url,e)var l=this.on(c.RendererEvent.LOADEDMETADATA,function(){i.node&&(i.node.currentTime=e),i.removeEventListener(c.RendererEvent.LOADEDMETADATA,l)},this);this._currentSrcFormat=t.format||"",this._currentStream=t,this._mode===c.PlaybackMode.VIDEO&&this._eventBus.publish(o.PROFILE_START,o.METRICS.LOAD_TO_LOADED_DATA),this.node.load(),this._model.getState()===s.default.VIDEO&&this.play()}},e.prototype._switchSrc=function(t,e){if(this.node){var n=this.node.clientWidth,i=this.node.clientHeight;if(this.sourceEl.src===t)return this.publish(c.CustomRendererEvent.SRC_SWITCHING),void this.publish(c.CustomRendererEvent.SRC_SWITCHED);this._isSwitching=!0,this.node.pause(),this._currentTime=this.node.currentTime;var r=document.createElement("canvas");this._canvas=r,r.className="vp-switching-canvas",r.width=n,r.height=i;var o=this._calculateCanvasPosition();r.style.cssText="width:"+o.width+"px;height:"+o.height+"px;left:"+o.left+"px;top:"+o.top+"px",this.node.parentNode&&this.node.parentNode.appendChild(r);try{var s=r.getContext("2d");s&&s.drawImage(this.node,0,0,n,i)}catch(t){console.log("HTML5TVRenderer:_switchSrc convas drawImage error",t.message)}this.publish(c.CustomRendererEvent.SRC_SWITCHING);var a=e&&d[e]||"video/mp4";this._isHttpForced()&&(t="http"+t.substring(5)).indexOf("protocol=https")>-1&&(t=t.replace(/protocol=https/i,"protocol=http")),this.sourceEl.src=t,this.sourceEl.type=a}},e.prototype._isHttpForced=function(){return!1},e.type=c.RendererType.HTML5_TV,e}(l.default);e.default=h},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(9),s=n(2),a=n(0),u=n(37),l=n(5),c=function(t){function e(n,i){var r=t.call(this,n,i)||this;return r._eventBus=n,r._model=i,r.type=e.type,r._logger=console,r.seeking=!1,r.ended=!1,r._isSwitching=!1,r._currentSrcFormat="",r._currentStream=null,r._lastUpdatedTime=0,r._retryCount=0,r._retryStreams=[],r._retryState=null,r._seeked=!1,r.currentPlayTime=0,r.error=!1,r.setCCPrefs(),r}return i(e,t),e.canUse=function(){return!!r.userAgent.tv&&!!r.userAgent.orsay},e.prototype.create=function(t){var e=document.getElementById("sefplayer");return this.node=e||this._createNode(),this.node.style.display="inline-block",this.node},e.prototype.detachNode=function(){this._unbindAndStop()},e.prototype.seek=function(t){try{var e=Math.round(t-this.currentPlayTime);e>0?this.node.Execute("JumpForward",e):this.node.Execute("JumpBackward",-e)}catch(t){this._logger.error("Error while seeking",t)}},e.prototype.pause=function(){if(this.node)try{this.node.paused||(this.node.Execute("Pause"),this.node.paused=!0,this.publish(l.RendererEvent.PAUSE))}catch(t){this._logger.error("Error while pausing video",t)}},e.prototype.setVolume=function(t){},e.prototype.destroy=function(){this._unbindAndStop(),this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.node},e.prototype.stop=function(){this._unbindAndStop();try{sf.service.setScreenSaver(!1)}catch(t){this._logger.error("Error while stopping avplay",t)}},e.prototype.waitForReady=function(t){t()},e.prototype.play=function(t){void 0===t&&(t=0),this.ended=!1,this._firstPlay=!1,this.seeking=!1,this._eventBus.publish(s.PROFILE_START,s.METRICS.STREAM_PLAY_TO_RENDER);try{this.node.paused?(this.node.Execute("Resume"),this.node.paused=!1):this.node.Execute("Play"),this.publish(l.RendererEvent.PLAYING)}catch(t){this._logger.error("Error while playing stream",t)}},e.prototype.getCurrentTime=function(){return this.currentPlayTime},e.prototype.setCCPrefs=function(){if(webapis&&webapis.tv)try{var t=this._model.userPreferences.closedCaptions;t.fontName=this._getFontName(),t.fontColor=this._getColor(),t.fontOpacity=this._getFontOpacity(),t.fontSize=this._getSize(),t.bgColor=this._getBgColor(),t.bgOpacity=this._getBgOpacity(),t.fontEffect=this._getFontEffect(),t.fontEdgeColor=this._getEdgeColor(),this._eventBus.publish(s.CCEvent.UPDATE_STYLE)}catch(t){this._logger.log("Error while setting CC prefs",t)}},e.prototype._bindEvents=function(){var t=this,e=this.node;e&&(e.OnEvent=function(e,n,i){switch(e){case 1:case 2:case 3:case 4:case 5:case 6:t._logger.log("event type error : ",e,n,i),t._handleError(e);break;case 7:t.publish(l.RendererEvent.PLAYING);break;case 8:t.ended=!0,t._rebufferingManager.onEnded(),t.node.Execute("Stop"),t.publish(l.RendererEvent.ENDED);break;case 9:t.publish(l.RendererEvent.LOADEDMETADATA);break;case 10:case 11:case 12:case 13:break;case 14:var r=n/1e3;t.currentPlayTime=r;var o=t.node.Execute("GetDuration")/1e3;t._logger.log("Current playtime: "+r+" of: "+o),t.publish(l.RendererEvent.TIMEUPDATE,{currentTime:r,duration:o,buffered:{}})}})},e.prototype._unbindEvents=function(){if(this.node)try{this.node.OnEvent=null}catch(t){this._logger.error("Error occurred while unsetting listener ",t)}},e.prototype._getCodeForNodeError=function(t){switch(t){case 1:case 4:case 5:return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_NETWORK;case 2:return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_AUTHORIZED;case 3:return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_FOUND;default:return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR}},e.prototype._setSrc=function(t,e,n){if(this.ended=!1,this.src!==t.url||n){this._eventBus.publish(s.PROFILE_START,s.METRICS.STREAM_REQUEST_TO_RENDER),this._firstPlay=!0,this._currentSrcFormat=t.format||"",this._currentStream=t,this._mode===l.PlaybackMode.VIDEO&&this._eventBus.publish(s.PROFILE_START,s.METRICS.LOAD_TO_LOADED_DATA),this.src=t.url;var i=this.node;try{i.Open("Player","1.010","Player"),i.Execute("InitPlayer",this.src+"|COMPONENT=HLS"),i.Execute("StartPlayback")}catch(t){this._logger.error("Error while setting up the stream",t)}}},e.prototype._switchSrc=function(){},e.prototype._handleWaitingEvent=function(){},e.prototype._createNode=function(){try{sf.service.setScreenSaver(!0)}catch(t){this._logger.log("Error while setting screensaver on",t)}var t=document.createElement("div");return t.innerHTML='<object id="sefplayer" border=0 classid="clsid:SAMSUNG-INFOLINK-SEF" style="position:fixed;top:0px;left:0px;width:1280px;height:720px;"></object>',t.children[0]},e.prototype._unbindAndStop=function(){if(this.node){this._unbindEvents();try{this.node.Execute("Stop")}catch(t){this._logger.log("Error happened while stopping",t)}}},e.prototype._handleError=function(t){var e=this;if(this._mode===l.PlaybackMode.VIDEO){var n=this._getCodeForNodeError(t),i=1===this._retryStreams.length&&2===this._retryCount,r=this._model.playlist.getCurrentItem(),u=o.E_WARNING,c=s.WARNING,d=null;i&&(u=o.E_PLAYER,c=s.ERROR);var h=a.default.createErr(o.ErrorGroup.Streaming,this._model.playbackState,u,n,null,this.src);if(this._logger.log("Video node errored out because: ",t),parseInt(h.subcategory,10)>=303&&parseInt(h.subcategory,10)<=308)return this._retryCount++,i||this._eventBus.publish(c,h),(d=r&&!r.isLive()?this.retryStreams(this._lastUpdatedTime):this.retryStreams(0))?void a.default.getUrlStatus(d.url,function(t){401===t?h.subcategory=o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_AUTHORIZED:404===t&&(h.subcategory=o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_FOUND),e._eventBus.publish(s.ERROR,h)}):void 0;this.publish(l.RendererEvent.ERROR,t),this._eventBus.publish(c,h)}else this.publish(l.RendererEvent.ERROR,t)},e.prototype._getFontLanguage=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_LANGUAGE_TYPE)){case t.CAPTION_LANGUAGE_AUTO:return"en-US";case t.CAPTION_LANGUAGE_JPN:return"ja";case t.CAPTION_LANGUAGE_ENG:return"en-US";case t.CAPTION_LANGUAGE_GER:return"de";case t.CAPTION_LANGUAGE_FRE:return"fr";case t.CAPTION_LANGUAGE_ITA:return"it";case t.CAPTION_LANGUAGE_RUS:return"ru";case t.CAPTION_LANGUAGE_CHS:return"zh-cn";case t.CAPTION_LANGUAGE_KOR:return"ko";case t.CAPTION_LANGUAGE_SPA:return"es";default:return"en-US"}},e.prototype._getFontFeature=function(t,e){var n=webapis.tv.closedcaption;return e?n.getClosedCaptionOption(n.PROFILE_CC_FCC,t):n.getClosedCaptionOption(n.PROFILE_CC,t)},e.prototype._getSize=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_FONT_SIZE)){case t.CAPTION_SIZE_SMALL:return 12;case t.CAPTION_SIZE_STANDARD:return 24;case t.CAPTION_SIZE_LARGE:return 36;case t.CAPTION_SIZE_EXTRA_LARGE:return 48;case t.CAPTION_SIZE_DEFAULT:default:return 24}},e.prototype._getFontOpacity=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_FG_OPACITY)){case t.CAPTION_OPACITY_SOLID:return"1";case t.CAPTION_OPACITY_TRANSLUCENT:return"0.5";case t.CAPTION_OPACITY_TRANSPARENT:return"0";case t.CAPTION_OPACITY_DEFAULT:default:return"1"}},e.prototype._getFontEffect=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_EDGE_TYPE,!0)){case t.CAPTION_EDGE_NONE:return"none";case t.CAPTION_EDGE_RAISED:return"raised";case t.CAPTION_EDGE_DEPRESSED:return"depressed";case t.CAPTION_EDGE_UNIFORM:return"uniform";case t.CAPTION_EDGE_DROP_SHADOWED:return"dropshadow";default:return"none"}},e.prototype._getEdgeColor=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_EDGE_COLOR,!0)){case t.CAPTION_COLOR_DEFAULT:case t.CAPTION_COLOR_WHITE:return"#ffffff";case t.CAPTION_COLOR_BLACK:return"#000000";case t.CAPTION_COLOR_RED:return"#ff0000";case t.CAPTION_COLOR_GREEN:return"#00ff00";case t.CAPTION_COLOR_BLUE:return"#0000ff";case t.CAPTION_COLOR_YELLOW:return"#ffff00";case t.CAPTION_COLOR_MAGENTA:return"#ff00ff";case t.CAPTION_COLOR_CYAN:return"#00ffff";default:return"#ffffff"}},e.prototype._getBgOpacity=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_BG_OPACITY)){case t.CAPTION_OPACITY_SOLID:return"1";case t.CAPTION_OPACITY_TRANSLUCENT:return"0.5";case t.CAPTION_OPACITY_TRANSPARENT:return"0";case t.CAPTION_OPACITY_DEFAULT:default:return"1"}},e.prototype._getBgColor=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_BG_COLOR)){case t.CAPTION_COLOR_DEFAULT:return"#000000";case t.CAPTION_COLOR_WHITE:return"#ffffff";case t.CAPTION_COLOR_BLACK:return"#000000";case t.CAPTION_COLOR_RED:return"#ff0000";case t.CAPTION_COLOR_GREEN:return"#00ff00";case t.CAPTION_COLOR_BLUE:return"#0000ff";case t.CAPTION_COLOR_YELLOW:return"#ffff00";case t.CAPTION_COLOR_MAGENTA:return"#ff00ff";case t.CAPTION_COLOR_CYAN:return"#00ffff";default:return"#000000"}},e.prototype._getFontName=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_FONT_STYLE)){case t.CAPTION_FONT_DEFAULT:case t.CAPTION_FONT_STYLE0:return"sans-serif";case t.CAPTION_FONT_STYLE1:return"PT Mono";case t.CAPTION_FONT_STYLE2:return"Crimson Text";case t.CAPTION_FONT_STYLE3:return"Inconsolata";case t.CAPTION_FONT_STYLE4:return"sans-serif";case t.CAPTION_FONT_STYLE5:return"Neucha";case t.CAPTION_FONT_STYLE6:return"Oleo Script";case t.CAPTION_FONT_STYLE7:return"Carrois Gothic SC";case t.CAPTION_FONT_UNDEFINED:default:return"sans-serif"}},e.prototype._getColor=function(){var t=webapis.tv.closedcaption;switch(this._getFontFeature(t.CAPTION_FG_COLOR)){case t.CAPTION_COLOR_DEFAULT:case t.CAPTION_COLOR_WHITE:return"#ffffff";case t.CAPTION_COLOR_BLACK:return"#000000";case t.CAPTION_COLOR_RED:return"#ff0000";case t.CAPTION_COLOR_GREEN:return"#00ff00";case t.CAPTION_COLOR_BLUE:return"#0000ff";case t.CAPTION_COLOR_YELLOW:return"#ffff00";case t.CAPTION_COLOR_MAGENTA:return"#ff00ff";case t.CAPTION_COLOR_CYAN:return"#00ffff";default:return"#ffffff"}},e.type=l.RendererType.HTML5_TV_ORSAY,e}(u.default);e.default=c},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(9),s=n(2),a=n(0),u=n(37),l=n(5),c=function(t){function e(n,i,r){var o=t.call(this,n,i)||this;o._eventBus=n,o._model=i,o.api=r,o.type=e.type;try{o.api=webapis}catch(t){r&&(o.api=r)}return o.seeking=!1,o.ended=!1,o._isSwitching=!1,o._currentSrcFormat="",o._currentStream=null,o._lastUpdatedTime=0,o._logger=console,o._retryCount=0,o._retryStreams=[],o._retryState=null,o._seeked=!1,o.currentPlayTime=0,o._vodTimeOffset=0,o.error=!1,o.setCCPrefs(),o}return i(e,t),e.canUse=function(){return!!r.userAgent.tv&&!!r.userAgent.tizen},e.prototype.create=function(t){var e=document.getElementById("avplayer");return this.node=e||this._createNode(),this.node.style.display="inline-block",this.node},e.prototype.detachNode=function(){this._unbindEvents(),this.clearPlayTimer();try{this.api.avplay.pause()}catch(t){this._logger.log("Error happened while pausing",t)}},e.prototype.clearPlayTimer=function(){this._currentPlayTimer&&(clearInterval(this._currentPlayTimer),this._currentPlayTimer=null)},e.prototype.seek=function(t){try{this.clearPlayTimer(),this.api.avplay.seekTo(1e3*t)}catch(t){this._logger.error("Error while seeking",t)}},e.prototype.pause=function(){this._logger.log("Pausing tizen");try{this.clearPlayTimer(),this.api.avplay.pause(),"PAUSED"===this.api.avplay.getState()&&(this.paused=!0,this.publish(l.RendererEvent.PAUSE))}catch(t){this._logger.error("Error while pausing video",t)}},e.prototype.setVolume=function(t){},e.prototype.destroy=function(){this._unbindEvents(),this.clearPlayTimer();try{this.api.avplay.close()}catch(t){this._logger.error("Error while closing avplay",t)}this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node)},e.prototype.stop=function(){this.clearPlayTimer();try{this._logger.log("stopping video"),this.api.avplay.stop(),this.api.appcommon.setScreenSaver(this.api.appcommon.AppCommonScreenSaverState.SCREEN_SAVER_ON)}catch(t){this._logger.error("Error while stopping avplay",t)}this._unbindEvents()},e.prototype.waitForReady=function(t){t()},e.prototype.play=function(t){void 0===t&&(t=0),this.ended=!1,this._firstPlay=!1,this.seeking=!1,this._eventBus.publish(s.PROFILE_START,s.METRICS.STREAM_PLAY_TO_RENDER);try{this.api.avplay.play(),this.api.appcommon.setScreenSaver(this.api.appcommon.AppCommonScreenSaverState.SCREEN_SAVER_OFF);var e=this.api.avplay.getState();this.paused&&"PLAYING"===e&&(this.paused=!1,this.publish(l.RendererEvent.PLAYING))}catch(t){this._logger.error("Error while playing stream",t)}},e.prototype.getCurrentTime=function(){return this.currentPlayTime/1e3},e.prototype.setCCPrefs=function(){var t=this._model.userPreferences.closedCaptions;try{var e=this.api&&this.api.tvinfo,n=e&&e.TvInfoMenuKey;e&&n&&(t.bgColor=this._getColor(e.getMenuValue(n.CAPTION_BG_COLOR_KEY),!1),t.fontColor=this._getColor(e.getMenuValue(n.CAPTION_FG_COLOR_KEY),!0),t.bgOpacity=this._getOpacity(e.getMenuValue(n.CAPTION_BG_OPACITY_KEY),!0),t.fontOpacity=this._getOpacity(e.getMenuValue(n.CAPTION_FG_OPACITY_KEY),!1),t.fontEffect=this._getEffect(e.getMenuValue(n.CAPTION_EDGE_TYPE_KEY)),t.fontEdgeColor=this._getColor(e.getMenuValue(n.CAPTION_EDGE_COLOR_KEY),!1),t.fontSize=this._getSize(e.getMenuValue(n.CAPTION_FONT_SIZE_KEY)),t.fontName=this._getName(e.getMenuValue(n.CAPTION_FONT_STYLE_KEY)),t.windowBgOpacity=this._getOpacity(e.getMenuValue(n.CAPTION_WINDOW_OPACITY_KEY),!0),t.windowBgColor=this._getColor(e.getMenuValue(n.CAPTION_WINDOW_COLOR_KEY),!1))}catch(t){this._logger.error("Error while fetching menu settings",t)}this._eventBus.publish(s.CCEvent.UPDATE_STYLE)},e.prototype._bindEvents=function(){var t=this;this._listeners={onbufferingstart:function(){t.clearPlayTimer(),t._logger.log("Buffering start."),t._eventBus.publish("render"),t._publishWaitingEvent(!0,!1)},onbufferingprogress:function(e){t._logger.log("Buffering progress data : "+e),t.clearPlayTimer(),t._publishWaitingEvent(!1,!1)},onbufferingcomplete:function(){t._logger.log("Buffering complete."),t.clearPlayTimer(),t._publishWaitingEvent(!1,!1),t.duration=t.api.avplay.getDuration(),t.publish(l.RendererEvent.PLAYING),t._eventBus.publish(s.PROFILE_END,[s.METRICS.STREAM_PLAY_TO_RENDER,s.METRICS.STREAM_REQUEST_TO_RENDER])},oncurrentplaytime:function(e){t._logger.log("Current playtime: "+e+" of: "+t.duration),0===t._vodTimeOffset&&0===t.currentPlayTime&&(t._isLive||(t._vodTimeOffset=e-1e3)),t._origCurrentPlayTime!==e&&(t._origCurrentPlayTime=e,e-=t._vodTimeOffset,t.currentPlayTime=e,t.clearPlayTimer(),(t._isLive||e<=t.duration)&&t.publish(l.RendererEvent.TIMEUPDATE,{currentTime:e/1e3,duration:t.duration/1e3,buffered:{}}),t._currentPlayTimer=setInterval(function(){e+=300,(t._isLive||e<=t.duration)&&t.publish(l.RendererEvent.TIMEUPDATE,{currentTime:e/1e3,duration:t.duration/1e3,buffered:{}})},300))},onevent:function(e,n){t._logger.log("event type: "+e+", data: "+n)},onstreamcompleted:function(){t._logger.log("Stream Completed"),t.clearPlayTimer(),t.ended=!0,t._rebufferingManager.onEnded(),t._publishWaitingEvent(!1,!1),t._isLive=!1,t.currentPlayTime=0,t._vodTimeOffset=0,t.paused=!1,t.publish(l.RendererEvent.ENDED)},onerror:function(e){t._logger.log("event type error : "+e),t._handleError(e),t.clearPlayTimer()}};try{this.api.avplay.setListener(this._listeners)}catch(t){this._logger.log("Error while setting listener",t)}},e.prototype._unbindEvents=function(){this._listeners=null,this._vodTimeOffset=0,this.paused=!1;try{this.api.avplay.setListener(null)}catch(t){this._logger.error("Error occurred while unsetting listener ",t)}},e.prototype._getCodeForNodeError=function(t){switch(t.name){case"PLAYER_ERROR_VIDEO_CODEC_NOT_SUPPORTED":case"PLAYER_ERROR_AUDIO_CODEC_NOT_SUPPORTED":case"PLAYER_ERROR_NOT_SUPPORTED_FILE":return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_SRC_NOT_SUPPORTED;case"PLAYER_ERROR_CONNECTION_FAILED":return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_NETWORK;case"PLAYER_ERROR_NO_AUTH":return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_AUTHORIZED;case"PLAYER_ERROR_NO_SUCH_FILE":return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_FOUND;default:return o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR}},e.prototype._setSrc=function(t,e,n){if(this.ended=!1,this.src!==t.url||n){this._eventBus.publish(s.PROFILE_START,s.METRICS.STREAM_REQUEST_TO_RENDER),this._firstPlay=!0,this._currentSrcFormat=t.format||"",this._currentStream=t,this._isLive=t.live,this._mode===l.PlaybackMode.VIDEO&&this._eventBus.publish(s.PROFILE_START,s.METRICS.LOAD_TO_LOADED_DATA),this.src=t.url;try{"PLAYING"===this.api.avplay.getState()&&this.api.avplay.stop(),this.api.avplay.open(this.src),this._bindEvents(),this.api.avplay.prepare(),this.api.avplay.setDisplayRect(0,0,window.innerWidth,window.innerHeight),this.api.avplay.setDisplayMethod("PLAYER_DISPLAY_MODE_FULL_SCREEN"),this.api.avplay.setStreamingProperty("ADAPTIVE_INFO","STARTBITRATE=HIGHEST")}catch(t){this._logger.error("Error while setting up the stream",t)}}},e.prototype._switchSrc=function(){},e.prototype._handleWaitingEvent=function(){},e.prototype._onWaiting=function(t){},e.prototype._publishWaitingEvent=function(t,e){this.publish(l.RendererEvent.WAITING,{type:"waiting",value:t,ignoreBuffering:e}),this._rebufferingManager.playbackStuck=t},e.prototype._createNode=function(){var t=document.createElement("div");return t.innerHTML='<object id="avplayer" type="application/avplayer"style="display:none; position:fixed; top:0px; left:0px; width:100%; height:100%"></object>',t.children[0]},e.prototype._handleError=function(t){var e=this;if(this._mode===l.PlaybackMode.VIDEO){var n=this._getCodeForNodeError(t),i=1===this._retryStreams.length&&2===this._retryCount,r=this._model.playlist.getCurrentItem(),u=o.E_WARNING,c=s.WARNING,d=null;i&&(u=o.E_PLAYER,c=s.ERROR);var h=a.default.createErr(o.ErrorGroup.Streaming,this._model.playbackState,u,n,null,this.src);if(this._logger.log("Video node errored out because: ",t),parseInt(h.subcategory,10)>=303&&parseInt(h.subcategory,10)<=308)return this._retryCount++,i||this._eventBus.publish(c,h),(d=r&&!r.isLive()?this.retryStreams(this._lastUpdatedTime):this.retryStreams(0))?void a.default.getUrlStatus(d.url,function(t){401===t?h.subcategory=o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_AUTHORIZED:404===t&&(h.subcategory=o.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_FOUND),e._eventBus.publish(s.ERROR,h)}):void 0;this.error=!0,this.publish(l.RendererEvent.ERROR,t),this._eventBus.publish(c,h)}else this.publish(l.RendererEvent.ERROR,t)},e.prototype._getColor=function(t,e){var n=this.api.tvinfo.TvInfoMenuValue;switch(t){case n.CAPTION_COLOR_DEFAULT:return e?"#ffffff":"#000000";case n.CAPTION_COLOR_WHITE:return"#ffffff";case n.CAPTION_COLOR_BLACK:return"#000000";case n.CAPTION_COLOR_RED:return"#ff0000";case n.CAPTION_COLOR_GREEN:return"#00ff00";case n.CAPTION_COLOR_BLUE:return"#0000ff";case n.CAPTION_COLOR_YELLOW:return"#ffff00";case n.CAPTION_COLOR_MAGENTA:return"#ff00ff";case n.CAPTION_COLOR_CYAN:return"#00ffff";default:return"#ffffff"}},e.prototype._getOpacity=function(t,e){var n=this.api.tvinfo.TvInfoMenuValue;switch(t){case n.CAPTION_OPACITY_SOLID:case n.CAPTION_OPACITY_FLASHING:return"1";case n.CAPTION_OPACITY_TRANSLUCENT:return"0.75";case n.CAPTION_OPACITY_DEFAULT:return e?"0":"1";case n.CAPTION_OPACITY_TRANSPARENT:return"0";default:return e?"0":"1"}},e.prototype._getEffect=function(t){var e=this.api.tvinfo.TvInfoMenuValue;switch(t){case e.CAPTION_EDGE_NONE:return"none";case e.CAPTION_EDGE_RAISED:return"raised";case e.CAPTION_EDGE_DEPRESSED:return"depressed";case e.CAPTION_EDGE_UNIFORM:return"uniform";case e.CAPTION_EDGE_DROP_SHADOWED:return"dropshadow";default:return"none"}},e.prototype._getSize=function(t){var e=this.api.tvinfo.TvInfoMenuValue;switch(t){case e.CAPTION_SIZE_DEFAULT:return 24;case e.CAPTION_SIZE_SMALL:return 18;case e.CAPTION_SIZE_STANDARD:return 24;case e.CAPTION_SIZE_LARGE:return 27;case e.CAPTION_SIZE_EXTRA_LARGE:return 30;default:return 24}},e.prototype._getName=function(t){var e=this.api.tvinfo.TvInfoMenuValue;switch(t){case e.CAPTION_FONT_DEFAULT:case e.CAPTION_FONT_STYLE0:return"sans-serif";case e.CAPTION_FONT_STYLE1:return"PT Mono";case e.CAPTION_FONT_STYLE2:return"Crimson Text";case e.CAPTION_FONT_STYLE3:return"Inconsolata";case e.CAPTION_FONT_STYLE4:return"sans-serif";case e.CAPTION_FONT_STYLE5:return"Neucha";case e.CAPTION_FONT_STYLE6:return"Oleo Script";case e.CAPTION_FONT_STYLE7:return"Carrois Gothic SC";default:return"sans-serif"}},e.type=l.RendererType.HTML5_TV_TIZEN,e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6),r=n(41),o=n(0),s=n(22),a=n(7),u=n(28),l=n(234),c=function(){function t(){this.version="0.1.240",this.mimetype=t.mimetype,this.type=a.PluginType.AD,this._showExtendedProgressMsg=!1,this._rendered=!1,this._eventBus=new i.default("DefaultAdPlugin"),this._subscribedEventsMap={}}return t.prototype.prepare=function(){},t.prototype.destroy=function(){this._clickUrl=null,this._ctaEl=null,this._progressUpdateEl=null,this._viewFragment=null,this._ctaElTap&&this._ctaElTap.destroy(),this._subscribedEventsMap=null,this._rendered=!1,this._eventBus.destroy()},t.prototype.canRenderUI=function(t){return!0},t.prototype.renderUI=function(t,e){var n=this,i=e.position,r=void 0===i?0:i,s=e.total,a=void 0===s?1:s,l=e.adBreakDuration,c=this._renderTemplate();return this._adBreakDuration=l,this._breakProgStrShort=o.default.strSubstitute(1===a?u.default.ADV_SHORT:u.default.ADV_MULT_SHORT,{position:r+1,total:a}),this._breakProgStrLong=o.default.strSubstitute(1===a?u.default.ADV_LONG:u.default.ADV_MULT_LONG,{position:r+1,total:a}),t.interactionConfig&&t.interactionConfig.clickUrl?(this._clickUrl=t.interactionConfig.clickUrl,o.default.classList(this._ctaEl).remove("vp-hidden")):(this._clickUrl=null,o.default.classList(this._ctaEl).add("vp-hidden")),0===r&&(this._progressUpdateEl.innerText=o.default.strSubstitute(this._breakProgStrLong,{remaining:Math.round(this._adBreakDuration)}),this._showExtendedProgressMsg=!0,setTimeout(function(){n._showExtendedProgressMsg=!1},1500)),this._rendered=!0,c},t.prototype.unrenderUI=function(){this._rendered=!1,this._clearView()},t.prototype.onPlayerEvent=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t===a.PluginPlayerEvent.AD_PLAYBACK_PROGRESS&&this._rendered){var i=e[0];this._onPlaybackProgress(i)}},t.prototype.addEventListener=function(t,e){var n=this._eventBus.addEventListener(t,e,null);this._subscribedEventsMap[t]=this._subscribedEventsMap[t]||[],this._subscribedEventsMap[t].push([e,n])},t.prototype.removeEventListener=function(t,e){this._subscribedEventsMap[t]=this._subscribedEventsMap[t]||[];for(var n=0,i=this._subscribedEventsMap[t];n<i.length;n++){var r=i[n],o=r[0],s=r[1];if(o===e)return void this._eventBus.removeEventListener(t,s)}},t.prototype._clearView=function(){this._clickUrl=null,this._progressUpdateEl&&(this._progressUpdateEl.innerText="")},t.prototype._onPlaybackProgress=function(t){if(this._progressUpdateEl){var e,n,i=t.currentTime,r=t.duration;this._showExtendedProgressMsg?(e=this._breakProgStrLong,n=this._adBreakDuration):(e=this._breakProgStrShort,n=r);var s=Math.round(n-i);this._progressUpdateEl.innerText=o.default.strSubstitute(e,{remaining:s})}},t.prototype._dispatchEvent=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(e=this._eventBus).publish.apply(e,[t].concat(n))},t.prototype._renderTemplate=function(){var t=this;return this._viewFragment?(this._clearView(),this._viewFragment):(this._viewFragment=o.default.render(l,u.default),this._progressUpdateEl=this._viewFragment.querySelector(".vp-adbreak-progress span"),this._ctaEl=this._viewFragment.querySelector(".vp-adbreakitem-cta"),this._ctaElTap=new s.default(this._ctaEl,function(e){t._clickUrl&&(window.open(t._clickUrl,"_blank"),t._dispatchEvent(r.AdPluginUIEvent.CTA_TRIGGERED))}),this._clearView(),this._viewFragment)},t.mimetype="adplugin/default-ad-view",t}();e.default=c},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(2),u=n(26),l=n(81),c=n(7),d=n(5),h=n(28),p=n(19),f=n(4),_=n(0),m=n(236),y=n(22),v=n(239),g=n(240);!function(t){t.LOGO_CLICK="controls-logo-click",t.SEEK="controls-seek",t.SET_VOLUME="controls-set-volume",t.SET_MUTE="controls-set-mute",t.TOGGLE_CC="controls-toggle-cc",t.TOGGLE_PLAY_PAUSE="controls-toggle-play-pause",t.SET_AUDIO_LANGUAGE="controls-set-audio",t.UI_INTERACT="controls-ui-interact"}(r=e.ControlsEvent||(e.ControlsEvent={}));var E=function(t){function e(e,n,i,r){var o=t.call(this,"Controls")||this;return o._eventBus=e,o._view=n,o._model=i,o._pluginManager=r,o._ccAvailable=!0,o._eventBus.addEventListener(a.VideoEvent.PLAYING,o._onVideoPlaying,o),o._eventBus.addEventListener(a.CAST.CAPTION_AVAILABILITY_CHANGED,o.updateClosedCaptionUI,o),o._eventBus.addEventListener(a.RELATED_ITEM_CLICK,o._onRelatedItemClick,o),o._eventBus.addEventListener(a.CONTROLS_BAR_CHANGE,o._onControlsBarChange,o),o._eventBus.addEventListener(a.FULLSCREEN_CHANGE,function(){o._updateFullscreen(o._view.getFullscreen())},o),o._eventBus.addEventListener(a.API.AIRPLAY_AVAILABILITY_CHANGE,function(t){o._airplayBtn&&_.default.classList(o._airplayBtn)[t?"remove":"add"]("vp-hidden")},o),o._eventBus.addEventListener(a.API.AIRPLAY_CONNECTION_STATE_CHANGE,function(t){o._airplayBtn&&_.default.classList(o._airplayBtn)[t.connected?"add":"remove"]("vp-airplay-on")},o),o._eventBus.addEventListener(a.KEYDOWN,o._onKeyDown,o),o._eventBus.addEventListener(a.API.PLAYER_DOCKED_CHANGE,o._onDockingChange,o),o._eventBus.addEventListener(a.CCEvent.TOGGLE,o.updateClosedCaptionButtonState,o),o}return i(e,t),e.prototype.create=function(){var t=_.default.render(v,{isMobile:s.userAgent.mobile,strings:h.default}),e={logoContainer:t.querySelector(".vp-logos"),multiAudioList:t.querySelector(".vp-multi-audio"),bottomBar:t.querySelector(".vp-bottom-bar"),topBar:t.querySelector(".vp-top-bar"),titleBar:t.querySelector(".vp-playing-item-title"),muteIndicator:t.querySelector(".vp-mute-indicator"),objectOverlay:t.querySelector(".vp-object-overlay")};this._bottomBar=e.bottomBar,this._slider=this._bottomBar.querySelector(".vp-slider"),this._bufferBar=this._bottomBar.querySelector(".vp-buffer-bar"),this._timeDisplay=this._bottomBar.querySelector(".vp-time-container"),this._menuControls=this._bottomBar.querySelector(".vp-menu-controls"),this._currentTimeLabel=this._bottomBar.querySelector(".vp-current-time"),this._totalTimeLabel=this._bottomBar.querySelector(".vp-total-time"),this._handle=this._bottomBar.querySelector(".vp-handle"),this._playbackBar=this._bottomBar.querySelector(".vp-playback-bar"),this._playBtn=this._bottomBar.querySelector(".vp-play-btn"),this._seekBar=this._bottomBar.querySelector(".vp-seek"),this._visualSeekContainer=this._bottomBar.querySelector(".vp-visual-seek"),this._ccBtn=this._bottomBar.querySelector(".vp-cc-btn"),this._airplayBtn=this._bottomBar.querySelector(".vp-airplay-btn"),this._fullscreenBtn=this._bottomBar.querySelector(".vp-fullscreen-btn"),this._volumeBtn=this._bottomBar.querySelector(".vp-volume-btn"),this._volumeBarContainer=this._bottomBar.querySelector(".vp-volume-bar-container"),this._volumeIndicator=this._bottomBar.querySelector(".vp-volume-level"),this._volumeBar=this._bottomBar.querySelector(".vp-volume-bar"),this._volumeValue=this._bottomBar.querySelector(".vp-volume-value"),this._volumeHandle=this._bottomBar.querySelector(".vp-volume-handle"),this._multiAudioContainer=e.multiAudioList||this._bottomBar.querySelector(".vp-multi-audio"),this._multiAudioBtn=this._bottomBar.querySelector(".vp-multiaudio-btn"),this._logoContainer=e.logoContainer,this._muteIndicator=e.muteIndicator,this._titleBar=e.titleBar,this._headerTitleBar=this._bottomBar&&this._bottomBar.parentNode.querySelector(".vp-playing-item-title-header"),this._topBar=e.topBar,this._contentType=this._topBar&&this._topBar.querySelector(".vp-content-type"),this._showTitleOnHover=this._model.showTitleOnHover;var n=this._fullscreenBtn&&s.userAgent.ie&&s.userAgent.ie<=10&&_.default.isIFrame();if(n=n||!this._model.showFullscreenButton){var i=document.createElement("div");_.default.classList(i).add("vp-fullscreen-btn-replacement"),this._fullscreenBtn&&(this._fullscreenBtn.parentNode.insertBefore(i,this._fullscreenBtn),this._fullscreenBtn.parentNode.removeChild(this._fullscreenBtn),this._fullscreenBtn=null)}return p.default.airplaySupported&&this._model.casting||this._airplayBtn&&this._airplayBtn.parentNode&&(this._airplayBtn.parentNode.removeChild(this._airplayBtn),delete this._airplayBtn),this._initAriaProperties(),this._renderCCSettings(),this._bindEvents(),this._ccBtn&&(this._desktopControls?this._desktopControls.createCCBtnTooltip(this._ccBtn):!s.userAgent.mobile||s.userAgent.chrome&&p.default.hasNativeAutoplaySupport||(this._ccBtn.style.display="none")),this._renderLogos(),this._syncVolumeUI(),e},e.prototype.syncAriaState=function(){this._model.isPaused()?this._playBtn.setAttribute("aria-label",h.default.PLAY_VIDEO):this._playBtn.setAttribute("aria-label",h.default.PAUSE_VIDEO),this._fullscreenBtn&&(this._view.getFullscreen()?this._fullscreenBtn.setAttribute("aria-label",h.default.GO_TO_NORMAL_SCREEN):this._fullscreenBtn.setAttribute("aria-label",h.default.GO_TO_FULLSCREEN)),this._volumeBtn&&(_.default.classList(this._volumeBtn).contains("muted")?this._volumeBtn.setAttribute("aria-label",h.default.UNMUTE):this._volumeBtn.setAttribute("aria-label",h.default.MUTE))},e.prototype.getBottomBar=function(){return this._bottomBar},e.prototype.onMediaItemLoaded=function(t){this._isLive=t.isLive(),this._liveState="",this._contentType.innerHTML="",this._contentType.setAttribute("aria-label",""),_.default.classList(this._contentType).add("hide"),this._isLive?this._setLiveMode():this._setVodMode()},e.prototype.updateVolumeUI=function(t,e){"boolean"!=typeof e||f.isNullOrUndefined(e)?this._updateMuteBtn(!t):(this._updateMuteBtn(e),t=e?0:t),this._updateVolumeBar(t)},e.prototype.updateClosedCaptionUI=function(t){this._ccAvailable=t,t?(_.default.classList(this._ccBtn).remove("vp-hide"),_.default.classList(this._ccSettingsNode).remove("vp-vis-hidden"),this._updateCCTooltip(h.default.CAPTIONS_AVAILABLE)):(_.default.classList(this._ccBtn).add("vp-hide"),_.default.classList(this._ccSettingsNode).add("vp-vis-hidden"),this._updateCCTooltip(h.default.CAPTIONS_NOT_AVAILABLE))},e.prototype.updateClosedCaptionButtonState=function(t){t?(_.default.classList(this._ccBtn).add("vp-on"),this._updateCCTooltip(h.default.CAPTIONS_ON)):(_.default.classList(this._ccBtn).remove("vp-on"),this._updateCCTooltip(h.default.CAPTIONS_OFF)),this._ccSettings&&this._ccSettings.updateCCToggleState(t),this._ccAvailable||this._updateCCTooltip(h.default.CAPTIONS_NOT_AVAILABLE)},e.prototype.updateAvailableLanguages=function(t){this._ccSettings&&this._ccSettings.updateAvailableLanguages(t)},e.prototype.onPlayerResize=function(t){this._ccSettings&&this._ccSettings.onPlayerResize(t)},e.prototype.onlanguageChange=function(t){this._view&&this._view.onlanguageChange(t)},e.prototype.updateClosedCaptionStyle=function(t){this._view&&this._view.updateClosedCaptionStyle(t)},e.prototype.onMediaItemCurrent=function(t){},e.prototype.onMediaItemPlaybackStarted=function(t){var e=t.adBreaks;this._isLive?this._setLiveMode():this._setVodMode(),this._syncVolumeUI(),this._renderTitle(),this._renderLogos(),this._sliderAddEventListener(),this._multiAudioContainer&&this._checkForMultiAudio(),this._clearOldAdBreaks(),e&&e.length>0&&this._updateAdBreaks(e)},e.prototype.onMediaItemPlaybackProgress=function(t){var e=t.buffered,n=this._model.playbackState.currentTime,i=this._model.playbackState.playbackMode;e&&this._updateBuffer(e),void 0!==n&&i===d.PlaybackMode.VIDEO&&this._updateProgress(n)},e.prototype.onAdPlaybackStarted=function(){this._syncVolumeUI(),this._hideLogos(),this._hideVisualSeek(),this._sliderRemoveEventListener(),_.default.classList(this._slider).add("vp-disable"),_.default.classList(this._contentType).add("hide"),_.default.classList(this._timeDisplay).add("vp-hide")},e.prototype.onAdPlaybackEnded=function(){this._sliderAddEventListener(),_.default.classList(this._slider).remove("vp-disable"),_.default.classList(this._timeDisplay).remove("vp-hide")},e.prototype.onAdPlaybackProgress=function(t){},e.prototype.getCCElement=function(){return this._view?this._view.getCCElement():null},e.prototype.getMainElement=function(){return this._view.getMainElement()},e.prototype.destroy=function(){this._ccBtnTap&&this._ccBtnTap.destroy(),this._airplayTap&&this._airplayTap.destroy(),this._playTap&&this._playBtn&&(this._playTap.destroy(),this._fullscreenBtn&&this._fullscreenTap&&this._fullscreenTap.destroy(),this._seekTap&&this._seekTap.destroy(),this._sliderRemoveEventListener(),this._unbindVolume()),this._upNextBtnTap&&(this._upNextBtn.removeEventListener("tap",this._onUpNextBtnTap),this._upNextBtnTap.destroy()),this._logoContainerTap&&this._logoContainerTap.destroy(),this._multiAudioContainerTap&&this._multiAudioContainerTap.destroy(),this._multiAudioBtnTap&&this._multiAudioBtnTap.destroy(),this._muteIndicator&&this._unBindMuteIndicator(),this._view.getContentNode().removeEventListener("keydown",this._handleKeyDown,!1),this._sliderTap&&this._sliderTap.destroy()},e.prototype._onDockingChange=function(){var t=this,e=this._model.logos;e&&!_.default.classList(this._logoContainer).contains("vp-hide")&&this._logoContainer.querySelector(".vp-logo")&&Object.keys(e).forEach(function(n){var i=t._logoContainer.querySelector(".vp-logo-type-"+n+" img");t._setLogoDimensions(i,e[n])})},e.prototype._renderLogos=function(){var t=this,e=this._model.logos;this._logoContainer&&e&&(Object.keys(e).forEach(function(n){e[n]&&t._renderLogo(e[n],n)}),_.default.classList(this._logoContainer).remove("vp-hide"))},e.prototype._renderLogo=function(t,e){var n=this;if(t&&t.url){var i=this._logoContainer.querySelector(".vp-logo-type-"+e);i||((i=document.createElement("div")).innerHTML="<img />",i.setAttribute("class","vp-logo vp-logo-type-"+e),this._logoContainerTap=new y.default(i,function(){return n.publish(r.LOGO_CLICK)}),this._logoContainer.appendChild(i));var o=i.querySelector("img"),s=["bottomLeft","bottomRight","topRight","topLeft","off"],a=t.position&&s.indexOf(t.position)>-1?t.position:"bottomRight",u=_.default.classList(i);s.forEach(function(t){t!==a&&u.contains("vp-logo-"+t)&&u.remove("vp-logo-"+t)}),t.fadeOut&&(/^\d+\.?\d*s$/.test(t.fadeOut)?(u.add("vp-logo-fadeout"),i.setAttribute("data-fadeout",t.fadeOut)):console.error("[Controls][showLogo] Invalid value for fadeOut, not applying effect.",t.fadeOut)),u.contains(a)||u.add("vp-logo-"+a),t.url&&o.src!==t.url&&(o.src=t.url,this._setLogoDimensions(o,t))}},e.prototype._setLogoDimensions=function(t,e){var n=this._view.isDocked();e&&e.height&&t&&(t.height=n?Math.min(e.height,this._model.docking.height/10):e.height),e&&e.width&&t&&(t.width=n?Math.min(e.width,this._model.docking.width/10):e.width)},e.prototype._hideLogos=function(){this._logoContainer&&_.default.classList(this._logoContainer).add("vp-hide")},e.prototype._fadeOutLogos=function(){var t=this._logoContainer.querySelectorAll(".vp-logo-fadeout");if(!(t.length<1))for(var e=0,n=t;e<n.length;e++){var i=n[e],r=i&&i.getAttribute("data-fadeout");r&&Object.assign(i.style,{opacity:0,transition:"visibility "+r+" ease-in-out "+r+", opacity "+r+" ease-in-out",visibility:"hidden"})}},e.prototype._setTitle=function(t){var e=this;!this._model.autoplay||this._view.isDocked()&&this._model.docking.showInfoCard||(_.default.classList(this._titleBar).add("vp-title-standard"),this._adjustTitleAndHeaderPositions(!0),this._hideTitleTimer=window.setTimeout(function(){_.default.classList(e._titleBar).add("vp-hide"),e._changeToHeaderTitle(t)},6e3))},e.prototype._renderTitle=function(){switch(this._hideTitleTimer&&clearTimeout(this._hideTitleTimer),this._titleHeader=null,this._updateCurrentTitle(),_.default.classList(this._titleBar).remove("vp-title-standard"),_.default.classList(this._titleBar).remove("vp-secondary"),_.default.classList(this._titleBar).remove("vp-hide"),this._titleHeader&&this._headerTitleBar&&(_.default.classList(this._headerTitleBar).remove("vp-title-header-standard"),_.default.classList(this._headerTitleBar).remove("vp-hide")),this._model.showTitleOnStart||""){case"fadeoutall":this._setTitle(!0);break;case"standard":this._setTitle(!1)}},e.prototype._updateCurrentTitle=function(){var t=this._model.playlist.getCurrentItem();this._updateCurrentHeaderTitle(),this._titleBar.innerHTML=t&&t.title||""},e.prototype._updateCurrentHeaderTitle=function(){var t=this._headerTitleBar;if(this._canUpdateHeaderTitle()){var e=this._titleHeader,n=e&&e.open_label||e&&e.label||"";t.innerHTML=this._formatTitleHeader(n)}else t&&""!==t.innerHTML&&(t.innerHTML="",_.default.classList(t).add("vp-hide"))},e.prototype._adjustTitleAndHeaderPositions=function(t){if(this._canUpdateHeaderTitle()){var e=_.default.classList(this._headerTitleBar);e.remove("vp-hide"),e.add("vp-title-header-standard"),_.default.classList(this._titleBar).add("vp-secondary"),t?e.add("vp-title-shown"):e.remove("vp-title-shown")}},e.prototype._changeToHeaderTitle=function(t){var e=this;if(this._titleHeaderFadeInTimer&&clearTimeout(this._titleHeaderFadeInTimer),this._titleHeaderFadeOutTimer&&clearTimeout(this._titleHeaderFadeOutTimer),this._canUpdateHeaderTitle()){var n=this._headerTitleBar,i=_.default.classList(n);i.remove("vp-title-shown"),i.add("vp-hide");var r=this._titleHeader,o=r&&r.label||"";this._titleHeaderFadeInTimer=window.setTimeout(function(){n.innerHTML=e._formatTitleHeader(o),i.remove("vp-hide"),t&&(e._titleHeaderFadeOutTimer=window.setTimeout(function(){n.innerHTML="",i.add("vp-hide")},5e3))},300)}},e.prototype._canUpdateHeaderTitle=function(){return!(!this._headerTitleBar||!this._titleHeader)},e.prototype._formatTitleHeader=function(t){if(!t||""===t)return"";return""+t.replace(/\*\*([^\*]+(\s[^\*]+)*)\*\*/gi,"<strong>$1</strong>")},e.prototype._onControlsBarChange=function(t){!this._showTitleOnHover||this._view.isDocked()&&this._model.docking.showInfoCard||(t?this._showTitle():(this._hideTitle(),_.default.classList(this._handle).remove("active"),_.default.classList(this._slider).remove("vp-thick-slider"),this._hideVisualSeek()))},e.prototype._showTitle=function(){_.default.classList(this._titleBar).add("vp-title-standard"),_.default.classList(this._titleBar).remove("vp-hide"),this._adjustTitleAndHeaderPositions(!0)},e.prototype._hideTitle=function(){_.default.classList(this._titleBar).add("vp-title-standard"),_.default.classList(this._titleBar).add("vp-hide"),this._adjustTitleAndHeaderPositions(!1)},e.prototype._setLiveMode=function(){_.default.classList(this._slider).add("vp-disable"),_.default.classList(this._timeDisplay).add("vp-hide"),this._liveState&&"live"===this._liveState&&(this._contentType.innerHTML=h.default.LIVE,this._contentType.setAttribute("aria-label",h.default.LIVE),_.default.classList(this._contentType).remove("hide"),_.default.classList(this._titleBar).add("vp-live"))},e.prototype._setVodMode=function(){_.default.classList(this._slider).remove("vp-disable"),_.default.classList(this._timeDisplay).remove("vp-hide"),_.default.classList(this._titleBar).remove("vp-live")},e.prototype._bindEvents=function(){var t=this;if(this._playTap=new y.default(this._playBtn,function(e){e.stopPropagation();var n=t._view.getCurrentViewState(),i=t._model.playlist.getCurrentItem(),o=i&&i.id,s=t._model.isPaused()?"ctrl-play-btn":"ctrl-pause-btn";"end-screen"===n?(t._eventBus.publish(a.RELATED_ITEM_CLICK,o,-1,!1,!1),t._resetTimeLabels()):(t.publish(r.UI_INTERACT,{srcElement:s}),t.publish(r.TOGGLE_PLAY_PAUSE))}),this._fullscreenBtn){this._fullscreenTap=new y.default(this._fullscreenBtn,function(e){e.stopPropagation(),t._view.toggleFullscreen(),t.publish(r.UI_INTERACT,{srcElement:"ctrl-fullscr-btn"})})}this._bottomBarClick=new y.default(this._bottomBar,function(t){t.stopPropagation()}),this._airplayBtn&&(this._airplayTap=new y.default(this._airplayBtn,function(){t._view.showAirplayTargetMenu(),t.publish(r.UI_INTERACT,{srcElement:"ctrl-airplay-btn"})})),this._multiAudioBtn&&(this._multiAudioBtnTap=new y.default(this._multiAudioBtn,function(){_.default.classList(t._multiAudioContainer).remove("vp-hidden"),t.publish(r.UI_INTERACT,{srcElement:"ctrl-multi-audio-btn"})})),this._bindccBtn(),this._handleKeyDown=function(e){t._eventBus.publish(a.KEYDOWN,{keyCode:e.keyCode,shiftDown:e.shiftKey,ctrlDown:e.ctrlKey,altDown:e.altKey,target:e.target,preventDefault:function(){e.preventDefault()}})},this._view.getContentNode().addEventListener("keydown",this._handleKeyDown,!1),this._sliderTap=new y.default(this._slider,function(t){t.stopPropagation()}),this._sliderAddEventListener(),this._bindVolume(),this._bindMuteIndicator()},e.prototype._renderCCSettings=function(){this._ccSettings=new m.default(this,this._model),this._ccSettingsNode=this._ccSettings.create(),s.userAgent.mobile&&_.default.classList(this._ccSettingsNode).add("vp-vis-hidden"),this._menuControls.parentNode.insertBefore(this._ccSettingsNode,this._menuControls.nextSibling)},e.prototype._bindccBtn=function(){var t=this;this._ccBtn&&(this._ccBtnTap=new y.default(this._ccBtn,function(e){if(e.stopPropagation(),t._ccAvailable){var n=!_.default.classList(t._ccBtn).contains("vp-on"),i=!(!t._model.castState||!t._model.castState.connected),o="cc-"+(n?"on":"off")+(i?"-cast":"");t.publish(r.UI_INTERACT,{srcElement:o}),t.publish(r.TOGGLE_CC,n,!0),t.updateClosedCaptionButtonState(n)}}),this._bindccBtnHover())},e.prototype._bindccBtnHover=function(){var t=this;this._mouseOutCCBtnTimeout=null;this._onccBtnHover=function(e){s.userAgent.mobile||(t._preventTouchDefault(e),t._ccSettings.showActiveContainer(),_.default.classList(t._volumeBarContainer).remove("open"))},this._onccBtnLeave=function(e){t._preventTouchDefault(e),t._mouseOutCCBtnTimeout&&clearTimeout(t._mouseOutCCBtnTimeout),t._mouseOutCCBtnTimeout=window.setTimeout(function(){t._ccSettings.hideActiveContainer()},1e3)},this._onccSettingsContainerHover=function(e){s.userAgent.mobile||(t._preventTouchDefault(e),t._mouseOutCCBtnTimeout&&clearTimeout(t._mouseOutCCBtnTimeout))},this._bindScrollOverEvents(this._ccBtn,this._onccBtnHover,this._onccBtnLeave),this._bindScrollOverEvents(this._ccSettingsNode,this._onccSettingsContainerHover,this._onccBtnLeave)},e.prototype._updateCCTooltip=function(t){this._desktopControls&&this._desktopControls.updateCCTooltip(t)},e.prototype._onRelatedItemClick=function(){this._resetTimeLabels(),this._updateCurrentTitle()},e.prototype._resetTimeLabels=function(){this._currentTimeLabel.innerHTML="0:00",this._totalTimeLabel.innerHTML="0:00"},e.prototype._updateFullscreen=function(t){this._fullscreenBtn&&(t?(_.default.classList(this._fullscreenBtn).add("fullscreen"),this._updateFullscreenTooltip(h.default.EXIT_FULLSCREEN)):(_.default.classList(this._fullscreenBtn).remove("fullscreen"),this._updateFullscreenTooltip(h.default.FULLSCREEN_SPACE))),this._fullScreenStreamModeUpdate(t),this.syncAriaState()},e.prototype._updateFullscreenTooltip=function(t){if(this._fullscreenBtn){var e=this._fullscreenBtn.querySelector(".vp-tooltip-content");e&&(e.innerHTML=t)}},e.prototype._sliderAddEventListener=function(){var t=this;this._seekBar&&(this._seekTap=new y.default(this._seekBar,function(e){e.stopPropagation();var n=t._seekBar,i=(e.clientX||e.touches&&e.touches[0]&&e.touches[0].clientX||e.pageX)-(n&&n.getBoundingClientRect().left||0),o=n?i/n.clientWidth:1,s=Math.min(o*t._duration,Math.max(t._duration-1,0));t.publish(r.SEEK,s)})),this._onSliderMove=function(e){t._eventBus.publish(a.SEEK_BAR_MOUSEOVER,e),_.default.classList(t._handle).add("active"),_.default.classList(t._slider).add("vp-thick-slider"),t._updateVisualSeek(e),t._preventTouchDefault(e)},this._onSliderLeave=function(e){t._eventBus.publish(a.SEEK_BAR_MOUSEOUT,e),_.default.classList(t._handle).remove("active"),_.default.classList(t._slider).remove("vp-thick-slider"),t._hideVisualSeek(),t._preventTouchDefault(e)},this._bindScrollOverEvents(this._slider,this._onSliderMove,this._onSliderLeave),this._onSeekDown=function(e){if(!isNaN(t._duration)){_.default.classList(t._handle).add("active"),t._preventTouchDefault(e),t._seeking=!0,t._eventBus.publish(a.CONTROLS_SEEK_START);var n=t._getSeekFraction(e),i=Math.min(n*t._duration,Math.max(t._duration-1,0));t._eventBus.publish(a.CTRL_SEEK,Math.round(i)),t._onSeekMove(e)}},this._onSeekMove=function(e){if(t._seeking){t._preventTouchDefault(e),_.default.classList(t._bottomBar).add("vp-drag"),_.default.classList(t._handle).add("active"),_.default.classList(t._slider).add("vp-thick-slider"),t._updateVisualSeek(e);var n=t._getSeekFraction(e),i=Math.min(n*t._duration,Math.max(t._duration-1,0));i=i>1?i:1,t._playbackBar.setAttribute("style","width: "+100*n+"%;"),t._bufferBar.setAttribute("style","width: 0%;"),t._handle.setAttribute("style","left: "+100*n+"%;"),t._eventBus.publish(a.CONTROLS_SEEKING,i)}},this._onSeekUp=function(e){t._seeking&&(_.default.classList(t._bottomBar).remove("vp-drag"),_.default.classList(t._handle).remove("active"),_.default.classList(t._slider).remove("vp-thick-slider"),t._hideVisualSeek(),t._preventTouchDefault(e),t._seeking=!1,t._eventBus.publish(a.CONTROLS_SEEK_END))},this._bindDragEvents(this._slider,this._onSeekDown,this._onSeekMove,this._onSeekUp)},e.prototype._sliderRemoveEventListener=function(){this._unbindScrollOverEvents(this._slider,this._onSliderMove,this._onSliderLeave),this._unbindDragEvents(this._slider,this._onSeekDown,this._onSeekMove,this._onSeekUp)},e.prototype._preventTouchDefault=function(t){-1!==t.type.indexOf("touch")&&t.preventDefault()},e.prototype._updateAdBreaks=function(t){var e=this;this._duration&&_.default.getAdBreakStartOffset(t).forEach(function(t){if(t.type===u.AdBreakType.MIDROLL||t.type===u.AdBreakType.POSTROLL){var n=document.createElement("div");_.default.classList(n).add("vp-ad-break"),n.style.left=t.startOffset/e._duration*100+"%",e._slider.appendChild(n)}})},e.prototype._clearOldAdBreaks=function(){for(var t=this._slider.querySelectorAll(".vp-ad-break"),e=0;e<t.length;e++)this._slider.removeChild(t[e])},e.prototype._onVideoPlaying=function(){this._fadeOutLogos()},e.prototype._onKeyDown=function(t){var e,n=this._model.volume,i=this._model.playbackState.currentTime,o=this._duration,s=this._model.playbackState.playbackMode;switch(t.keyCode){case 13:this._eventBus.publish(a.TOGGLE_PLAY_PAUSE);break;case 27:this._view.updateViewOnEscPress();break;case 32:this._eventBus.publish(a.TOGGLE_PLAY_PAUSE);break;case 37:s!==d.PlaybackMode.VIDEO||this._isLive||(e=i-5,this._eventBus.publish(a.CONTROLS_SEEKING,e>=0?e:0));break;case 38:var u=n+.05;this.publish(r.SET_VOLUME,u>1?1:u);break;case 39:s!==d.PlaybackMode.VIDEO||this._isLive||(e=i+5,this.publish(r.SEEK,e<=o?e:o));break;case 40:var l=n-.05;this.publish(r.SET_VOLUME,l<0?0:l);break;case 67:if(this._ccBtn){var c=!_.default.classList(this._ccBtn).contains("vp-on");this.publish(r.TOGGLE_CC,c,!0)}break;case 70:this._view.toggleFullscreen();break;case 77:this.publish(r.SET_MUTE,!this._model.mute)}if(t.keyCode>=48&&t.keyCode<=57){var h=(t.keyCode-48)/10;o>0&&this._eventBus.publish(a.CONTROLS_SEEKING,o*h)}},e.prototype._updateProgress=function(t){var e=t/this._duration*100;this._currentTimeLabel&&f.isNumber(t)&&f.isNumber(this._duration)&&(this._currentTimeLabel.innerHTML=_.default.formatTime(t)),this._totalTimeLabel&&f.isNumber(this._duration)&&(this._totalTimeLabel.innerHTML=_.default.formatTime(this._duration)),f.isNumber(t)&&f.isNumber(this._duration)&&(this._playbackBar.setAttribute("style","width: "+e+"%;"),this._seeking||this._handle.setAttribute("style","left: "+e+"%;"),this._slider.setAttribute("aria-valuemax",this._duration.toString()),this._slider.setAttribute("aria-valuenow",t.toString()),this._slider.setAttribute("aria-valuetext",_.default.formatTime(t)+" of "+_.default.formatTime(this._duration)))},e.prototype._updateBuffer=function(t){var e=0;t.length>0&&(e=t.end(0)/this._duration*100),this._bufferBar.setAttribute("style","width: "+e+"%;")},e.prototype._getVisualSeekPlugin=function(t,e){if(!(this._pluginManager&&t&&e&&e.mimetype))return null;if(!this._visualSeekPlugin){var n=this._pluginManager.getPlugin(c.PluginType.VISUAL_SEEK,e.mimetype);this._visualSeekPlugin=n}return this._visualSeekPlugin&&!this._visualSeekPlugin.canSeek(t)&&this._visualSeekPlugin.update(t,e),this._visualSeekPlugin},e.prototype._updateVisualSeek=function(t){var e=this,n=this._model.playlist.getCurrentItem(),i=this._getVisualSeekPlugin(n.id,n.visualSeekData);if(i){var r=this._getSeekFraction(t),o=r*this._duration,s=i.getThumbnailData(n.id,o);if(s&&s.url){var a=this._view.getContentNode();if(!_.default.classList(a).contains("vp-hide-controls")){var u;u=r<.09?.09:r>.91?.91:r,this._visualSeekContainer.style.display="block",this._visualSeekContainer.style.left=100*u+"%";var c=this._visualSeekContainer.querySelector(".vp-vs-time");c&&(c.innerHTML=_.default.formatTime(o));var d=s.height,h=s.index,p=s.url,f=s.width,m=s.isAd,y=this._visualSeekContainer.querySelector(".vp-vs-thumbnail");if(!m)if(y.innerHTML="",i.visualSeekType===l.VisualSeekType.SPRITE){y.style.background="url("+p+")";var v=h%100,g=v%10*f,E=Math.floor(v/10)*d;y.style.backgroundPosition="-"+g+"px -"+E+"px"}else this._lastVisualSeekImage=p,this._visualSeekTimeout=this._visualSeekTimeout||setTimeout(function(){var t=e._visualSeekContainer.querySelector(".vp-vs-thumbnail");e._lastVisualSeekImage&&(t.style.background="url("+e._lastVisualSeekImage+")"),clearTimeout(e._visualSeekTimeout),e._visualSeekTimeout=null},50)}}}},e.prototype._bindDragEvents=function(t,e,n,i){["mousedown","touchstart"].forEach(function(n){t.addEventListener(n,e)}),["mousemove","touchmove"].forEach(function(t){document.addEventListener(t,n)}),["mouseup","touchend"].forEach(function(t){document.addEventListener(t,i)})},e.prototype._unbindDragEvents=function(t,e,n,i){["mousedown","touchstart"].forEach(function(n){t.removeEventListener(n,e)}),["mousemove","touchmove"].forEach(function(t){document.removeEventListener(t,n)}),["mouseup","touchend"].forEach(function(t){document.removeEventListener(t,i)})},e.prototype._bindScrollOverEvents=function(t,e,n){["mouseenter","touchstart"].forEach(function(n){t.addEventListener(n,e)}),["mousemove","touchmove"].forEach(function(n){t.addEventListener(n,e)}),["mouseleave","touchend"].forEach(function(e){t.addEventListener(e,n)})},e.prototype._unbindScrollOverEvents=function(t,e,n){["mouseenter","touchstart"].forEach(function(n){t.removeEventListener(n,e)}),["mousemove","touchmove"].forEach(function(n){t.removeEventListener(n,e)}),["mouseleave","touchend"].forEach(function(e){t.removeEventListener(e,n)})},e.prototype._syncVolumeUI=function(){this._volumeBtn&&this.updateVolumeUI(this._model.volume,this._model.mute)},e.prototype._bindMute=function(){var t=this;this._volumeTap=new y.default(this._volumeBtn,function(e){var n;t._isVolumeInChange||(e.stopPropagation(),t._showVolumeHandle(),t._view.clearAutoHideTimeout(),t._mouseOutVolumeBtnTimeout&&clearTimeout(t._mouseOutVolumeBtnTimeout),n=!t._model.mute,t.publish(r.UI_INTERACT,{srcElement:"ctrl-mute-btn-"+(n?"on":"off")}),t.publish(r.SET_MUTE,n),t._applyCCOnMute(n))})},e.prototype._bindVolumeBar=function(){var t=this;this._volumeBarTap=new y.default(this._volumeIndicator,function(n){n.stopPropagation(),t._showVolumeHandle(),e(n)});var e=function(e){var n=function(e){var n;return n=t._view.getFullscreen()&&(s.userAgent.chrome||s.userAgent.safari)?e.pageY-_.default.getOffsetTopFromEl(t._volumeIndicator,"vp-main"):e.pageY-_.default.getOffsetTopFromDocument(t._volumeIndicator),t._volumeIndicator.getBoundingClientRect().top?1-Math.max(0,Math.min(1,n/t._volumeIndicator.clientHeight)):1}(e);!function(e){t._model.mute!==e&&(t.publish(r.UI_INTERACT,{srcElement:"ctrl-mute-btn-"+(e?"on":"off")}),t.publish(r.SET_MUTE,e))}(0===n),t.publish(r.SET_VOLUME,n)};this._onVolumeBarDown=function(e){t._preventTouchDefault(e),t._isVolumeInChange=!0,t._showVolumeHandle(),t._onVolumeBarMove(e)},this._onVolumeBarMove=function(n){t._isVolumeInChange&&(t._preventTouchDefault(n),t._showVolumeHandle(),e(n),t._onVolumeBtnHover(n))},this._onVolumeBarUp=function(e){t._isVolumeInChange&&(t._preventTouchDefault(e),t._isVolumeInChange=!1)},this._bindDragEvents(this._volumeIndicator,this._onVolumeBarDown,this._onVolumeBarMove,this._onVolumeBarUp)},e.prototype._bindMuteIndicator=function(){var t,e=this;this._muteOnTimeout=function(n){n.stopPropagation(),t||(t=window.setTimeout(function(){e.publish(r.UI_INTERACT,{srcElement:"ctrl-mute-btn-off"}),t=null},600))},this._muteIndicator&&(["mouseenter","touchstart"].forEach(function(t){e._muteIndicator.addEventListener(t,e._muteOnTimeout)}),["mousemove","touchmove"].forEach(function(t){e._muteIndicator.addEventListener(t,e._muteOnTimeout)}))},e.prototype._unBindMuteIndicator=function(){var t=this;this._muteIndicator&&(["mouseenter","touchstart"].forEach(function(e){t._muteIndicator.removeEventListener(e,t._muteOnTimeout)}),["mousemove","touchmove"].forEach(function(e){t._muteIndicator.removeEventListener(e,t._muteOnTimeout)}))},e.prototype._applyCCOnMute=function(t){this._model.ccOnMute&&(t?this.publish(r.TOGGLE_CC,!0,!1):this.publish(r.TOGGLE_CC,!1,!1))},e.prototype._showVolumeHandle=function(){this._volumeHandle&&_.default.classList(this._volumeHandle).add("show")},e.prototype._bindVolumeBtnHover=function(){var t=this;this._mouseOutVolumeBtnTimeout=null;var e=!1;this._onVolumeBtnHover=function(n){t._preventTouchDefault(n),_.default.classList(t._volumeBarContainer).add("open"),e||(t._syncVolumeUI(),e=!0),t._showVolumeHandle(),t._ccSettings&&t._ccSettings.hideActiveContainer()},this._onVolumeBtnLeave=function(e){t._preventTouchDefault(e),t._mouseOutVolumeBtnTimeout&&clearTimeout(t._mouseOutVolumeBtnTimeout),t._mouseOutVolumeBtnTimeout=window.setTimeout(function(){_.default.classList(t._volumeBarContainer).remove("open")},500)},this._onVolumeBarContainerHover=function(e){t._preventTouchDefault(e),t._mouseOutVolumeBtnTimeout&&clearTimeout(t._mouseOutVolumeBtnTimeout)},this._bindScrollOverEvents(this._volumeBtn,this._onVolumeBtnHover,this._onVolumeBtnLeave),this._bindScrollOverEvents(this._volumeBarContainer,this._onVolumeBarContainerHover,this._onVolumeBtnLeave)},e.prototype._bindVolume=function(){var t=this;this._volumeBtn&&this._bindMute(),this._volumeBarContainer&&this._volumeBtn&&(this._bindVolumeBar(),this._bindVolumeBtnHover()),this._multiAudioContainer&&(this._multiAudioContainerTap=new y.default(this._multiAudioContainer,function(e){e.stopPropagation();var n=_.default.findClosest(e.eventTarget,".vp-audio-item",t._multiAudioContainer);if(n){var i=t._multiAudioContainer.querySelector(".vp-audio-item-selected"),o=i&&i.getAttribute("data-name");i&&_.default.classList(i).remove("vp-audio-item-selected"),_.default.classList(n).add("vp-audio-item-selected"),t.publish(r.SET_AUDIO_LANGUAGE,n.getAttribute("data-name"),o)}else"close"===e.eventTarget.getAttribute("data-action")&&_.default.classList(t._multiAudioContainer).add("vp-hidden")}))},e.prototype._unbindVolume=function(){this._volumeBtn&&this._volumeTap.destroy(),this._volumeBarContainer&&(this._volumeBarTap.destroy(),this._unbindDragEvents(this._volumeBarContainer,this._onVolumeBarDown,this._onVolumeBarMove,this._onVolumeBarUp),this._unbindScrollOverEvents(this._volumeBtn,this._onVolumeBtnHover,this._onVolumeBtnLeave),this._unbindScrollOverEvents(this._volumeBarContainer,this._onVolumeBarContainerHover,this._onVolumeBtnLeave))},e.prototype._updateMuteBtn=function(t){var e=this._view.getContentNode();this._volumeBtn&&(t?(_.default.classList(this._volumeBtn).add("muted"),_.default.classList(e).add("vp-muted")):(_.default.classList(this._volumeBtn).remove("muted"),_.default.classList(e).remove("vp-muted"))),this.syncAriaState()},e.prototype._updateVolumeBar=function(t){if(this._volumeBar){var e=Math.ceil(100*(1-t)),n=100-e;this._volumeBar.setAttribute("style","height:"+e+"%"),this._volumeValue.setAttribute("style","height:"+n+"%")}if(this._volumeHandle){var i=Math.ceil((1-(1===t?.99:t))*(this._volumeIndicator.clientHeight-this._volumeHandle.offsetHeight));i>0&&(i=i<=3?0:i,this._volumeHandle.setAttribute("style","top:"+i+"px"))}},e.prototype._checkForMultiAudio=function(){var t=this._model.playlist.getCurrentItem();t&&t.isMultiAudioAvailable()?(this._renderMultiAudioItems(),_.default.classList(this._volumeBarContainer).add("vp-multi-audio-available"),this._multiAudioBtn&&_.default.classList(this._multiAudioBtn).remove("vp-hidden")):(_.default.classList(this._volumeBarContainer).remove("vp-multi-audio-available"),this._multiAudioBtn&&_.default.classList(this._multiAudioBtn).add("vp-hidden"),this._multiAudioContainer.innerHTML="")},e.prototype._renderMultiAudioItems=function(){var t=this._model.playlist.getCurrentItem(),e=_.default.render(g,{isMobile:s.userAgent.mobile,items:t&&t.languages||[]});this._multiAudioContainer.appendChild(e)},e.prototype._getSeekFraction=function(t){var e=((t.clientX||t.touches&&t.touches[0]&&t.touches[0].clientX||t.pageX)-this._slider.getBoundingClientRect().left)/this._slider.clientWidth;return Math.max(0,Math.min(1,e))},e.prototype._hideVisualSeek=function(){this._visualSeekContainer.style.display="none",this._lastVisualSeekImage=""},e.prototype._fullScreenStreamModeUpdate=function(t){var e=this._view.getContentNode(),n=this._view.isStreamMode()||this._view.isMiniStreamMode(),i=this._view.isMiniStreamMode()?"vp-ministream":"vp-stream";n&&(t?_.default.classList(e).remove(i):(_.default.classList(e).add(i),this._desktopControls&&this._desktopControls.resetSettings()))},e.prototype._initAriaProperties=function(){this._playBtn.setAttribute("aria-label",h.default.PLAY_VIDEO),this._slider.setAttribute("aria-label",h.default.SEEK_SLIDER),this._slider.setAttribute("aria-valuemin","0"),this._fullscreenBtn&&this._fullscreenBtn.setAttribute("aria-label",h.default.GO_TO_FULLSCREEN),this._volumeBtn&&(_.default.classList(this._volumeBtn).contains("muted")?this._volumeBtn.setAttribute("aria-label",h.default.UNMUTE):this._volumeBtn.setAttribute("aria-label",h.default.MUTE))},Object.defineProperty(e.prototype,"_duration",{get:function(){return this._model.playbackState.duration},enumerable:!0,configurable:!0}),e}(o.default);e.Controls=E},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(11),u=n(2),l=n(2),c=n(0),d=n(250),h=n(22),p=a.PLAYLIST_POS.BOTTOM,f=a.PLAYLIST_POS.RIGHT,_=a.PLAYLIST_POS.HIDDEN;!function(t){t.UI_INTERACT="playlist-ui-interact"}(r=e.PlaylistViewEvents||(e.PlaylistViewEvents={}));var m=function(t){function e(e,n){var i=t.call(this,"PlaylistController")||this;return i._view=e,i._pluginManager=n,i._rootElem=e.getRootElement(),i._mainElem=e.getMainElement(),i._contentElem=e.getContentNode(),i._model=e.getModel(),i._eventBus=e.getEventBus(),i._seedMediaItem=i._model.playlist.getMediaItemAt(0),i._subKeys={},i._startIndex=0,i._init(),i._shouldShowPlaylist&&(i._model.continuousPlay=!0,i._setContentDimensionsForPlaylist(),i._subKeys[u.FULLSCREEN_CHANGE]=i._eventBus.addEventListener(u.FULLSCREEN_CHANGE,i._onFullScreenChange,i),i._subKeys[l.VideoEvent.ENDED]=i._eventBus.addEventListener(l.VideoEvent.ENDED,i._onVideoEnded,i),i._subKeys[u.METADATA_AVAILABLE]=i._eventBus.addEventListener(u.METADATA_AVAILABLE,i._onMetadataAvailable,i)),i._upNextBtn&&(i._upNextBtnTap=new h.default(i._upNextBtn,i._onUpNextBtnTap.bind(i))),i}return i(e,t),e.prototype.destroy=function(){this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._upNextBtnTap&&(this._upNextBtnTap.destroy(),this._upNextBtnTap=null),this._resetContentDimensionsForPlaylist(),this._subKeys&&(this._eventBus.removeEventListeners(this._subKeys),this._subKeys={})},e.prototype.attachUpNextMouseEvents=function(){var t=this;this._upNextContainer&&this._upNextContainer.addEventListener("mouseover",function(){c.default.classList(t._bottomBar).contains("vp-bottom-upnext")||(c.default.classList(t._bottomBar).add("vp-bottom-upnext"),t._bottomBarContainer.style.top=t._getUpnextBottomContainerTop()+"px",t.publish(r.UI_INTERACT,{srcElement:"ctrl-next-hover"}),t.publish(r.UI_INTERACT,{srcElement:"ui_pl_nxt_hvr"}))}),this._upNextContainer&&this._upNextContainer.addEventListener("mouseout",function(){window.setTimeout(function(){parseInt(window.getComputedStyle(t._hiddenPlaylistNode).zIndex,10)<0&&(c.default.classList(t._bottomBar).remove("vp-bottom-upnext"),t._bottomBarContainer&&t._bottomBarContainer.removeAttribute("style"))},100)})},e.prototype.detachUpNextMouseEvents=function(){var t=this;this._upNextContainer&&this._upNextContainer.addEventListener("mouseover",function(){c.default.classList(t._bottomBar).remove("vp-bottom-upnext"),t._bottomBarContainer&&t._bottomBarContainer.removeAttribute("style")})},e.prototype.togglePlaylistUI=function(t){if(!this._view.getFullscreen()&&this._shouldShowPlaylist&&this._playlistUIPosition!==_){var e=".vp-playlist-mode-"+this._playlistUIPosition,n=this._contentElem&&this._contentElem.querySelector(e);switch(t?c.default.classList(n).add("vp-hide-playlist"):c.default.classList(n).remove("vp-hide-playlist"),this._playlistUIPosition){case f:!0===t?(this._mainElem&&this._mainElem.removeAttribute("style"),this._rootElem&&(this._rootElem.style.width=this._playlistDimensions.mainElem.width+"px")):(this._mainElem&&(this._mainElem.style.width=this._playlistDimensions.mainElem.width+"px"),this._rootElem&&(this._rootElem.style.width=this._playlistDimensions.rootElem.width+"px"));break;case p:!0===t?this._contentElem&&(this._contentElem.style.height=this._playlistDimensions.rootElem.height+"px"):(this._contentElem&&(this._contentElem.style.height=this._playlistDimensions.contentElem.height+"px"),this._rootElem&&(this._rootElem.style.height=this._playlistDimensions.rootElem.height+"px"))}}},e.prototype.getPlaylistRootElement=function(){return this._playlistNode},e.prototype.getPlaylistUIPosition=function(){return this._playlistUIPosition},e.prototype.isPlaylistInStream=function(){return this._isPlaylistInStreamMode},e.prototype.isPlaylistShown=function(){return this._shouldShowPlaylist},e.prototype.onMediaItemLoaded=function(){this._shouldShowPlaylist&&(this._hasPlaylistRendered?this._playlist.syncView():this._render())},e.prototype.onMediaItemPlaybackStarted=function(){this._shouldShowPlaylist&&(this._syncUpNextButton(),this._playlist.onMediaItemPlaybackStarted())},e.prototype.onAdBreakStarted=function(){this._shouldShowPlaylist&&this._enableUpNextButton(!1)},e.prototype.onAdBreakEnded=function(){this._syncUpNextButton()},e.prototype._onVideoEnded=function(){this._enableUpNextButton(!1)},e.prototype._onMetadataAvailable=function(){this._syncUpNextButton()},e.prototype._syncUpNextButton=function(){this._shouldShowPlaylist&&(this._model.playlist.isEndOfPlaylist()?this._enableUpNextButton(!1):this._enableUpNextButton(!0))},e.prototype._enableUpNextButton=function(t){if(this._shouldShowPlaylist&&this._upNEnabled!==t&&this._upNextContainer){var e=this._model.playlist,n=e?e.getCurrentItem():null;t&&n&&!n.isLive()?c.default.classList(this._upNextContainer).remove("disabled"):c.default.classList(this._upNextContainer).add("disabled"),this._upNEnabled=t}},e.prototype._onUpNextBtnTap=function(){if(s.userAgent.mobile&&this._upNextPlist)return this._upNextPlist.style.display="block",void(c.default.classList(this._upNextPlist).contains("open")?(c.default.classList(this._bottomBar).remove("vp-bottom-upnext"),c.default.classList(this._upNextPlist).remove("open"),this._bottomBarContainer&&this._bottomBarContainer.removeAttribute("style")):(c.default.classList(this._upNextPlist).add("open"),this._bottomBarContainer&&(this._bottomBarContainer.style.top=this._getUpnextBottomContainerTop()+"px"),c.default.classList(this._bottomBar).add("vp-bottom-upnext")));this._playlist.upNextBtnTapHandler()},e.prototype._initPlaylistView=function(){var t=this._view.controls;return!!t&&(this._bottomBar=t&&t.getBottomBar(),this._bottomBarContainer=this._bottomBar.querySelector(".vp-bottom-container"),this._upNextBtn=this._bottomBar.querySelector(".vp-upnext-btn"),this._upNextPlist=this._bottomBar.querySelector(".vp-upnext-playlist"),this._upNextContainer=this._bottomBar.querySelector(".vp-upnext-container"),!0)},e.prototype._init=function(){var t,e,n=this._model.playlistUIConfig,i=this._model.playlist.playlistId;(this._hasPlaylistRendered=!1,this._playlistUIPosition=null,this._isPlaylistInStreamMode=!1,this._shouldShowPlaylist=!1,this._playlistId=n&&n.playlistId||i||"",this._playlistAlias=n&&n.playlistAlias||"",n&&!0===n.show&&(this._playlistUIPosition=n.position,!0===n.inStream&&this._playlistUIPosition===f&&(this._isPlaylistInStreamMode=!0),s.userAgent.mobile||(e=this._rootElem&&this._rootElem.clientWidth,t=(t=this._model.uiState&&this._model.uiState.width||e)||0,(this._playlistUIPosition===_&&t>200||this._playlistUIPosition===p&&t>=560||this._playlistUIPosition===f&&e&&(t>=835||e>=835))&&(this._shouldShowPlaylist=!0))),this._shouldShowPlaylist)&&(this._initPlaylistView()||(this._shouldShowPlaylist=!1))},e.prototype._setContentDimensionsForPlaylist=function(){var t,e,n,i,r,o;if(this._shouldShowPlaylist&&this._playlistUIPosition!==_)switch(this._playlistDimensions={rootElem:{height:null,width:null},contentElem:{height:null,width:null},mainElem:{height:null,width:null}},this._playlistUIPosition){case p:e=(t=this._rootElem?this._rootElem.clientHeight:0)+83,this._rootElem&&(this._rootElem.style.height=e+"px"),this._contentElem&&(this._contentElem.style.height=t+"px"),this._contentElemPlaylistHeight=t+"px",this._playlistDimensions.rootElem.height=e,this._playlistDimensions.rootElem.width=this._rootElem?this._rootElem.clientWidth:0,this._playlistDimensions.contentElem.height=this._contentElem?this._contentElem.clientHeight:0,this._eventBus.publish(u.PLAYER_DIMENSION_CHANGE,{width:this._playlistDimensions.rootElem.width,height:e,from:"PlaylistController"});break;case f:n=this._mainElem?this._mainElem.clientWidth:0,i=this._contentElem?this._contentElem.clientWidth:0,r=0,this._isPlaylistInStreamMode?(o=n-276,this._mainElem&&(this._mainElem.style.width=o+"px"),this._mainElemPlaylistWidth=o+"px"):(r=100*(o=i-318)/i,this._mainElem&&(this._mainElem.style.width=r+"%"),this._mainElemPlaylistWidth=r+"%"),this._bindPlaylistWindowResize(),this._playlistDimensions.rootElem.width=this._rootElem?this._rootElem.clientWidth:0,this._playlistDimensions.mainElem.width=o,this._eventBus.publish(u.PLAYER_DIMENSION_CHANGE,{width:o,height:this._rootElem?this._rootElem.clientHeight:0})}},e.prototype._resetContentDimensionsForPlaylist=function(){var t;switch(this._playlistUIPosition){case p:t=(this._rootElem?this._rootElem.clientHeight:0)-83,this._rootElem&&(this._rootElem.style.height=t+"px"),this._playlistDimensions.rootElem.height=t}},e.prototype._getUpnextBottomContainerTop=function(){return(this._contentElem?this._contentElem.clientHeight:0)-(this._bottomBarContainer?this._bottomBarContainer.clientHeight:0)},e.prototype._render=function(){if(!s.userAgent.mobile||this._playlistUIPosition===_){switch(this._playlist=new d.default(this._eventBus,this._view,this._model,this._pluginManager),this._playlistUIPosition){case _:this._playlistNode=this._playlist.create(_),this._hiddenPlaylistNode=this._playlistNode,this._upNextPlist&&this._upNextPlist.appendChild(this._hiddenPlaylistNode),c.default.classList(this._upNextContainer).remove("hide"),s.userAgent.mobile||this.attachUpNextMouseEvents();break;case p:this._hiddenPlaylistNode=this._playlist.create(_),this._playlistNode=this._playlist.create(p),this._upNextPlist&&this._upNextPlist.appendChild(this._hiddenPlaylistNode),this._contentElem&&this._contentElem.appendChild(this._playlistNode),c.default.classList(this._upNextContainer).remove("hide"),c.default.classList(this._upNextPlist).add("hide");break;case f:this._hiddenPlaylistNode=this._playlist.create(_),this._playlistNode=this._playlist.create(f),this._upNextPlist&&this._upNextPlist.appendChild(this._hiddenPlaylistNode),this._contentElem&&this._contentElem.appendChild(this._playlistNode),c.default.classList(this._upNextContainer).remove("hide"),c.default.classList(this._upNextPlist).add("hide")}this._playlist.setPlaylistViewSize(),this._hasPlaylistRendered=!0}},e.prototype._onFullScreenChange=function(){this._view.isDocked()||this._playlistUIPosition!==_&&(!0===this._view.getFullscreen()?this._playlistUIPosition===p?this._contentElem&&(this._contentElem.style.height="100%"):this._playlistUIPosition===f&&this._mainElem&&this._mainElem.style&&(this._mainElem&&(this._mainElem.style.width="100%"),this._mainElem&&(this._mainElem.style.zIndex="1")):this._playlistUIPosition===p?this._contentElem&&(this._contentElem.style.height=this._contentElemPlaylistHeight):this._playlistUIPosition===f&&(this._mainElem&&(this._mainElem.style.width=this._mainElemPlaylistWidth),this._mainElem&&(this._mainElem.style.zIndex="auto")))},e.prototype._onResizeHandler=function(){var t=this._contentElem?this._contentElem.clientWidth:0,e=100*(t-318)/t;t>675&&t<800&&!1===this._view.getFullscreen()&&(this._mainElem&&(this._mainElem.style.width=e+"%"),this._mainElemPlaylistWidth=e+"%")},e.prototype._bindPlaylistWindowResize=function(){this._playlistUIPosition!==f||this._isPlaylistInStreamMode||(this._resizeHandler=this._onResizeHandler.bind(this),window.addEventListener("resize",this._resizeHandler))},e}(o.default);e.PlaylistController=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),r=n(7),o=function(){function t(){this.version="0.1.240",this.mimetype=i.MediaItemMimeType.CONTAINER,this.type=r.PluginType.METADATA}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t.prototype.resolve=function(t,e,n){var r=t.map(function(t){return t.metadata=t.metadata||{},t.metadata.type=i.MediaItemType.CONTAINER,t});n.onComplete(r)},t.prototype.recover=function(t,e,n){},t.prototype.cancel=function(){},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PROVIDER_BRANDING_TEMPLATES={"video.nflhighlights.com":n(282)}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(i),o=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(o).concat([r]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<t.length;r++){var s=t[r];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e){var n={},i=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},r=i(function(){return/msie 9\b/.test(window.navigator.userAgent.toLowerCase())}),o=i(function(){return document.head||document.getElementsByTagName("head")[0]}),s=null,a=0;function u(t,e){for(var i=0;i<t.length;i++){var r=t[i],o=n[r.id];if(o){o.refs++;for(var s=0;s<o.parts.length;s++)o.parts[s](r.parts[s]);for(;s<r.parts.length;s++)o.parts.push(d(r.parts[s],e))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(d(r.parts[s],e));n[r.id]={id:r.id,refs:1,parts:a}}}}function l(t){for(var e=[],n={},i=0;i<t.length;i++){var r=t[i],o=r[0],s={css:r[1],media:r[2],sourceMap:r[3]};n[o]?n[o].parts.push(s):e.push(n[o]={id:o,parts:[s]})}return e}function c(){var t=document.createElement("style"),e=o();return t.type="text/css",e.appendChild(t),t}function d(t,e){var n,i,r;if(e.singleton){var o=a++;n=s||(s=c()),i=h.bind(null,n,o,!1),r=h.bind(null,n,o,!0)}else n=c(),i=function(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(r&&"function"==typeof btoa)try{n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(JSON.stringify(r))+" */",n='@import url("data:text/css;base64,'+btoa(n)+'")'}catch(t){}i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){n.parentNode.removeChild(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}function h(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=function(t,e,n){var i=["/** >>"+e+" **/","/** "+e+"<< **/"],r=t.lastIndexOf(i[0]),o=n?i[0]+n+i[1]:"";if(t.lastIndexOf(i[0])>=0){var s=t.lastIndexOf(i[1])+i[1].length;return t.slice(0,r)+o+t.slice(s)}return t+o}(t.styleSheet.cssText,e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");void 0===(e=e||{}).singleton&&(e.singleton=r());var i=l(t);return u(i,e),function(t){for(var r=[],o=0;o<i.length;o++){var s=i[o];(a=n[s.id]).refs--,r.push(a)}t&&u(l(t),e);for(o=0;o<r.length;o++){var a;if(0===(a=r[o]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete n[a.id]}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.ERR_RESTRICTED_NETWORK_TYPE="Due to rights restrictions, this live stream is only available on cellular data. Turn off wifi to watch.",t.ERR_DRM_UNSUPPORTED_NETWORK_WIFI="Due to license restrictions, this video cannot be played over WiFi on your device. To view this video, turn off WiFi and use your cellular data connection instead.",t.ERR_TITLE_CANNOT_PLAY_VIDEO="Cannot Play Video",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.CLICK="click",t.AUTOPLAY="autoplay",t.API="api",t.CONTINUOUS="continuous",t.HOVER="hover",t.PLAY="play",t.PAUSE="pause",t.SCROLL="scroll",t.SWIPE="swipe",t.BACKGROUND="background"}(e.REQUEST_TYPES||(e.REQUEST_TYPES={})),e.GEMINI_STUB_VIDEO_ID="6bf451fd-11f9-37f9-a54c-d73d795839f6"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.getEnv=function(t){var e="video-api.yql.yahoo.com";switch(t){case"stage":e="video-api-stage.yql.yahoo.com";break;case"beta":e="video.beta.media.yql.yahoo.com";break;default:e="video-api.yql.yahoo.com"}return e},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(8),o=n(46),s=n(23),a=n(292);e.STRUCTURED_PLAYLIST_MIMETYPE="playlist/structured";var u=function(){function t(){this.name="StructuredPlaylistPlugin",this.version="8.0.85",this.mimetype=e.STRUCTURED_PLAYLIST_MIMETYPE,this.type=r.Plugin.PluginType.PLAYLIST}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t.prototype.create=function(t,e,i){var r=this._getTemplateItems(t,e),o=document.createElement("div");return o.innerHTML=a.render({items:r,strings:i}),n(293),Array.prototype.slice.call(o.children)},t.prototype._getTemplateItems=function(t,e){var n=this,i=[];return e.forEach(function(e){if(!n._isBumper(e)&&e&&e.metadata&&e.metadata.thumbnail){var r=n._getSectionLabel(e);r&&i.push({sectionLabel:r,sectionLabelIcon:n._getSectionLabelIconUrl(e)}),i.push({id:e.id,title:n._formatTitle(e.metadata.title),thumbnail:e.metadata.thumbnail,duration:n._formatDuration(e.metadata.duration),provider:e.brandingData?n._formatProvider(t,e.brandingData):"",labelIcon:n._getLabelIconUrl(e)})}}),i},t.prototype._formatDuration=function(t){return t&&o.isNumber(t)?s.default.formatTime(t):""},t.prototype._formatTitle=function(t){var e=i.userAgent.chrome>43;return t?t.length>40&&!e?t.substring(0,40)+"...":t:""},t.prototype._formatProvider=function(t,e){return t===r.Constants.PLAYLIST_POS.RIGHT&&e&&e.branding&&e.branding.providerName?e.branding.providerName:""},t.prototype._getLabelIconUrl=function(t){var e=t.customConfig&&t.customConfig.playlistConfig;return e&&e.label&&e.label.icons?this._getImageUrlByTag(e.label.icons,r.Constants.PLAYLIST_LABEL_ICON_DIMENSION):""},t.prototype._getSectionLabel=function(t){var e=t.customConfig&&t.customConfig.playlistConfig;return e&&e.section&&e.section.label||""},t.prototype._getSectionLabelIconUrl=function(t){var e=t.customConfig&&t.customConfig.playlistConfig;return e&&e.section&&e.section.icons?this._getImageUrlByTag(e.section.icons,r.Constants.PLAYLIST_SECTION_ICON_DIMENSION):""},t.prototype._getImageUrlByTag=function(t,e){if(t)for(var n=0,i=t;n<i.length;n++){var r=i[n];if(r.tag===e)return r.url}return""},t.prototype._isBumper=function(t){return!!(t.customConfig&&t.customConfig.playlistConfig&&t.customConfig.playlistConfig.is_bumper)},t}();e.default=u},function(t,e,n){t.exports=n(126)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(278),o=n(23),s=window,a=["OATH"];o.default.isYahooDomain()&&a.push("YAHOO"),a.forEach(function(t){s[t]=s[t]||{},s[t].VideoPlatform=s[t].VideoPlatform||{},s[t].VideoPlatform.VideoPlayer=r.default,s[t].VideoPlatform.Events=i.Events,"YAHOO"===t&&(s[t].VideoPlatform.API_Events=i.Events)})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(75),r=n(79),o=n(140);e.SimpleBrandingPlugin=o.default;var s=n(80);e.VisualSeekPlugin=s.default;var a=n(11);e.Constants=a;var u=n(2);e.Events=u.API;var l=n(41),c=n(26);e.AdBreakInterfaces=c;var d=n(58);e.AdBreakItemInterfaces=d;var h=n(15);e.MediaItemInterfaces=h;var p=n(81);e.VisualSeekInterfaces=p;var f=n(82);e.Playlist=f.default;var _=n(7);e.Plugin=_;var m=n(5);e.RendererInterfaces=m;var y=n(141);e.Player=y.default,_.AdPluginEvent=l.AdPluginEvent,_.AdPluginPlaybackCapability=l.AdPluginPlaybackCapability,window.VDMS=window.VDMS||{},window.VDMS.Player=y.default,window.VDMS.Plugin=_,window.VDMS.Events=u.API;var v={VdmsAnalytics:r.default,VdmsAnalyticsModel:i.default};e.Analytics=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){void 0===t&&(t="anonymous"),this.name=t,this._events={},this._eventKeyCounter=0}return t.prototype.destroy=function(){this._events={}},t.prototype.addEventListener=function(t,e,n){return this._events?this._subscribe(t,e,n):""},t.prototype.addEventListeners=function(t,e,n){var i=this,r={};return this._events&&t.length?(t.forEach(function(t){var o=e.bind(n,t);r[t]=i._subscribe(t,o,n)}),r):r},t.prototype.on=function(t,e,n){return Array.isArray(t)?this.addEventListeners(t,e,n):this.addEventListener(t,e,n)},t.prototype.removeEventListener=function(t,e){this._events&&t in this._events&&this._events[t].hasOwnProperty(e)&&delete this._events[t][e]},t.prototype.removeEventListeners=function(t){if(this._events&&t)for(var e=0,n=Object.keys(t);e<n.length;e++){var i=n[e],r=t[i];i in this._events&&this._events[i].hasOwnProperty(r)&&(delete this._events[i][r],delete t[i])}},t.prototype.once=function(t,e,n){var i=this,r=this.addEventListener(t,function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];e.apply(n,Array.prototype.slice.call(o,0)),i.removeEventListener(t,r)},this);return r},t.prototype.publish=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._events&&t in this._events){var i=this._events[t];i&&this._invokeSubscriptions(i,t,!1,e);var r=this._events["*"];r&&this._invokeSubscriptions(r,t,!0,e)}},t.prototype._invokeSubscriptions=function(t,e,n,i){for(var r=0,o=Object.keys(t);r<o.length;r++){var s=t[o[r]];if(s)try{var a=s.listener;a&&(n?a.apply(s.subscriber,[e].concat(i)):a.apply(s.subscriber,i))}catch(t){console.error("Error in event handler: ",t.message||t.toString(),t.stack)}}},t.prototype._subscribe=function(t,e,n){this._events[t]||(this._events[t]={});var i=t+"_"+ ++this._eventKeyCounter;return this._events[t][i]={subscriber:n,listener:e},i},t}();e.default=i},function(t,e,n){"use strict";var i=n(76),r={wifi:!0,broadband:!0,dsl:!0,cable:!0};function o(){if("undefined"!=typeof navigator)return(navigator&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)||{}).type}function s(){if(!i.mobile)return!0;var t=i.android&&i.chrome>=50,e=i.ios&&!i.iosWebView&&i.safari>=10;return t||e}t.exports={getConnectionType:o,isAutoplaySupported:s,isAutoplayAllowed:function(t){return!i.mobile||!(!(t=(o()||t||"").replace(/^cs_/i,"").toLowerCase())||!r[t])&&s()}}},function(t,e){e.E_INFO="100",e.E_WARNING="200",e.E_YVAP="300",e.E_PLAYER="400",e.E_PLAYER_FAILOVER="407",e.E_PLAYER_DRM="410",e.E_PLAYER_JS_HLS="430",e.E_SAPI_ABSTRACT="500",e.E_SAPI_STREAM="501",e.E_SAPI_PLAYLIST="502",e.E_SAPI_RELATED="503",e.E_SAPI_POPULAR="504",e.E_SAPI_CLOSEDCAPTION="505",e.E_CAST="800",e.INFO_CODES={E_SAPI_LICENSE_ERROR:"200",E_SAPI_UNAVAILABLE_TEMP:"201",E_SAPI_GEO:"202",E_SAPI_DEVICE:"203",E_SAPI_EMBED:"204",E_SAPI_BLACKOUT:"208",E_SAPI_AUTH_FAILED:"210",E_SAPI_INVALID_AUTH_KEY_VERSION:"211",E_SAPI_GEO_POSITION_REQUIRED:"212",E_SAPI_RESTRICTED_NETWORK_TYPE:"214",E_SAPI_UNSUPPORTED_LIVE_ON_HTML:"305",E_PLAYER_ANDROID_CHROME_REQUIRED:"500",E_PLAYER_FLASH_IS_BLOCKED_SAFARI_STYLE_NONE:"610",E_PLAYER_FLASH_IS_BLOCKED_GENERAL_STYLE_NONE:"611",E_PLAYER_FLASH_IS_BLOCKED_REPLACED_BY_BGINACTIVE:"612",E_PLAYER_FLASH_IS_BLOCKED_POWER_SAVING:"613",E_PLAYER_FLASH_IS_BLOCKED_BLOCKERS_SCREEN:"614",E_PLAYER_NO_COMPATIBLE_FORMAT:"700",E_PLAYER_360_IS_NOT_SUPPORTED:"701"},e.WARNING_CODES={E_PLAYBACK_TIMEOUT:"1",E_RECOVER_LONG_PAUSE:"50",E_LIVE_PLAYBACK_COMPLETE:"800",E_FLASH_CRASHED:"801",E_SWF_TIMEOUT:"802",E_SSL_MISMATCH:"803",E_CSS_DOWNLOAD_FAILED:"804",E_PLAYBACK_FROZEN_DETECTED:"900",E_ER_TRY:"901",E_RECOVERY_STATUS:"902"},e.PLAYER_CODES={E_PLAYER_PLAYBACK_ERROR:"100",E_PLAYER_NOT_ENABLED:"200",E_PLAYER_NOT_UPTO_DATE:"201",E_PLAYER_PTS_DISCONTINUITY:"250",E_PLAYER_RELOAD_FRAGMENT:"251",E_FLASH_LIVE_NOT_SUPPORTED:"252",E_PLAYER_HTML5_PLAYBACK_ERROR:"303",E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED:"304",E_PLAYER_HTML5_PLAYBACK_ERROR_NETWORK:"305",E_PLAYER_HTML5_PLAYBACK_ERROR_DECODE:"306",E_PLAYER_HTML5_PLAYBACK_ERROR_SRC_NOT_SUPPORTED:"307",E_PLAYER_HTML5_PLAYBACK_ERROR_ENCRYPTED:"308",E_PLAYER_HTML5_PLAYBACK_ERROR_PLAY_INITIATED_BEFORE_METADATA_READY:"309",E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_AUTHORIZED:"310",E_PLAYER_HTML5_PLAYBACK_ERROR_URL_NOT_FOUND:"311",E_PLAYER_CMS_JSONP_REQUEST_FAILURE:"101",E_PLAYER_CMS_JSONP_REQUEST_FAILURE_SILENT_FAIL:"102",E_PLAYER_CMS_RESPONSE:"405",E_PLAYER_CMS_JSONP_REQUEST_TIMEOUT:"408",E_PLAYER_CMS_JSONP_REQUEST_TIMEOUT_SILENT_FAIL:"409",E_PLAYER_CMS_XHR_REQUEST_SERVER_CONNECTION_FAILED:"700",E_PLAYER_CMS_XHR_REQUEST_SERVER_CONNECTION_FAILED_TIMEOUT:"701",E_PLAYER_CMS_XHR_REQUEST_RESPONSE_NOT_RECEIVED:"710",E_PLAYER_CMS_XHR_REQUEST_RESPONSE_NOT_RECEIVED_TIMEOUT:"711",E_PLAYER_CMS_XHR_REQUEST_LOAD_FAILED:"720",E_PLAYER_CMS_XHR_REQUEST_LOAD_FAILED_TIMEOUT:"721",E_PLAYER_CMS_XHR_REQUEST_LOAD_FAILED_408:"722",E_PLAYER_CMS_XHR_REQUEST_NOT_COMPLETE:"730",E_PLAYER_CMS_XHR_REQUEST_NOT_COMPLETE_TIMEOUT:"731",E_PLAYER_CMS_XHR_REQUEST_NOT_COMPLETE_408:"732",E_PLAYER_CMS_XHR_REQUEST_ERROR:"740",E_PLAYER_CMS_XHR_REQUEST_TIMEOUT:"750",E_PLAYER_CMS_XHR_REQUEST_CORS_ERROR:"760",E_INTERNAL_VIOLATION:"600",E_INVALID_CONFIGURATION:"601",E_RECOVERY_FAILURE:"602",E_NO_PLUGIN_FOUND:"603",E_NO_RENDERER_FOUND:"604"},e.FLASH_CODES={E_PLAYER_SECURITY_CROSS_DOMAIN_XML_ERROR:2,E_PLAYER_MEDIA_LOAD_FAILURE:7,E_PLAYER_INVALID_F4M:23,E_PLAYER_FLASH_CONNECTION_REJECTED:11,E_PLAYER_FLASH_CONNECTION_APP_INVALID:12,E_PLAYER_FLASH_CONNECTION_FAILED:13,E_PLAYER_FLASH_CONNECTION_TIMEOUT:14,E_PLAYER_FLASH_STREAM_FAILED:15,E_PLAYER_FLASH_STREAM_NOT_FOUND:16,E_FLASH_HLS_FRAGMENT_PARSING_ERROR:55,E_FLASH_HLS_FRAGMENT_HTTP_GET_ERROR:56,E_FLASH_HLS_FRAGMENT_TIMEOUT_ERROR:57,E_FLASH_HLS_FRAGMENT_NW_ERROR:58,E_HLS_CLIENT_DISABLE_COOKIES:59,E_PLAYER_FLASH_ACCESSOR_ERROR:301,E_PLAYER_FLASH_URL_ACCESSOR_ERROR:302},e.PLAYER_DRM_CODES={E_FLASH_DRM_CONTENT_DATA_NOT_SET_ERROR:52,E_FLASH_DRM_TIMEOUT_LOAD_VOUCHER_ERROR:53,E_FLASH_DRM_SYSTEM_UPDATE_ERROR:54,E_PLAYER_DRM_UNSUPPORTED_STREAM_ERROR:601,E_FLASH_DRM_LOWER_BOUND_ERROR:3301,E_FLASH_DRM_UPPER_BOUND_ERROR:3766,E_FLASH_DRM_INCOGNITO_MODE_ERROR:3365,E_FLASH_DRM_VOUCHER_INVALID:3300,E_FLASH_DRM_INTERNAL_ACCESS_FAILURE:3307,E_FLASH_DRM_FILE_SYSTEM_WRITE:3313,E_FLASH_DRM_DEVICE_BINDING:3322,E_FLASH_DRM_INTERNAL_STORES_CORRUPT_SCENARIO_1:3323,E_FLASH_DRM_RESET_LICENSE_FILES:3324,E_FLASH_DRM_INTERNAL_STORES_CORRUPT_SCENARIO_2:3325,E_FLASH_DRM_VOUCHER_EXPIRED:3332,E_FLASH_DRM_INTERNAL_ERROR:3343,E_FLASH_DRM_FAILED_MIGRATING_DATA:3346,E_FLASH_DRM_CHROME_SETTING_ERROR:3370,ERR_DRM_EME_MISSING:"22",ERR_DRM_INIT:"23",ERR_DRM_CONFIG:"24",ERR_DRM_LICENSE_REQUEST:"25",ERR_DRM_CERTPATH_MISSING:"26",ERR_DRM_UNSUPPORTED_BROWSER:"27",ERR_DRM_UNSUPPORTED_OS:"28"},e.PLAYER_JS_HLS_CODES={MEDIA_ERR_ABORTED:"1",MEDIA_ERR_NETWORK:"2",MEDIA_ERR_DECODE:"3",MEDIA_ERR_SRC_NOT_SUPPORTED:"4",ERR_XHR_LOAD:"11",ERR_PLAYLIST_LOAD:"12",ERR_SUBS_LOAD:"13",ERR_SEGMENT_LOAD:"14",ERR_PARTIAL_LOAD:"15",ERR_MASTER_PLAYLIST_PARSE:"16",ERR_MEDIA_PLAYLIST_PARSE:"17",ERR_SEGMENT_PARSE:"18",ERR_API_NO_NODE:"19",ERR_MIMETYPE_NOT_SUPPORTED:"20"},e.SAPI_CODES={E_SAPI_INCOMPATIBLE_FORMAT:"100",E_SAPI_NO_STREAMS_RETURNED:"103",E_SAPI_USER_NOT_AUTHORIZED:"205",E_SAPI_RESTRICTED_TO_INTERNAL:"206",E_SAPI_DRM_RESTRICTED:"207",E_SAPI_UNSUPPORTED_FORMAT:"300",E_SAPI_EXTERNAL_NO_STREAMS:"301",E_SAPI_NO_PLAYABLE_STREAMS:"302",E_SAPI_NOT_FOUND:"400",E_SAPI_TEMP_ERR_JAPI_TIMEOUT:"500",E_SAPI_TEMP_ERR_JAPI_UNKNOWN:"502",E_SAPI_TEMP_ERR_JAPI_CARMOT:"503",E_SAPI_TEMP_ERR_JAPI_UNMAPPED:"550",E_SAPI_EMPTY_ATLAS_ACCOUNT_NAME:"401",E_SAPI_EMPTY_SECURE_KEY:"402",E_SAPI_EMPTY_LIST:"403",E_SAPI_INVALID_DATA:"404",E_SAPI_INVALID_VIDEO:"405",E_SAPI_EMPTY_STREAM_URL:"406",E_SAPI_MISSING_PROVIDER:"501",E_SAPI_SYSTEM_ERROR:"504"},e.CAST_CODES={E_CAST_CONNECTION_REQUEST_FAILED:"1"}},function(t,e,n){"use strict";var i=n(55),r=n(137),o=n(31),s=n(56).scan,a=o.ValidatorResult,u=o.SchemaError,l=o.SchemaContext,c=function t(){this.customFormats=Object.create(t.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(h),this.attributes=Object.create(r.validators)};function d(t){var e="string"==typeof t?t:t.$ref;return"string"==typeof e&&e}c.prototype.customFormats={},c.prototype.schemas=null,c.prototype.types=null,c.prototype.attributes=null,c.prototype.unresolvedRefs=null,c.prototype.addSchema=function(t,e){var n=this;if(!t)return null;var i=s(e||"/",t),r=e||t.id;for(var o in i.id)this.schemas[o]=i.id[o];for(var o in i.ref)this.unresolvedRefs.push(o);return this.unresolvedRefs=this.unresolvedRefs.filter(function(t){return void 0===n.schemas[t]}),this.schemas[r]},c.prototype.addSubSchemaArray=function(t,e){if(e instanceof Array)for(var n=0;n<e.length;n++)this.addSubSchema(t,e[n])},c.prototype.addSubSchemaObject=function(t,e){if(e&&"object"==typeof e)for(var n in e)this.addSubSchema(t,e[n])},c.prototype.setSchemas=function(t){this.schemas=t},c.prototype.getSchema=function(t){return this.schemas[t]},c.prototype.validate=function(t,e,n,r){n||(n={});var o=n.propertyName||"instance",a=i.resolve(n.base||"/",e.id||"");if(!r){(r=new l(e,n,o,a,Object.create(this.schemas))).schemas[a]||(r.schemas[a]=e);var c=s(a,e);for(var d in c.id){var h=c.id[d];r.schemas[d]=h}}if(e){var p=this.validateSchema(t,e,n,r);if(!p)throw new Error("Result undefined");return p}throw new u("no schema specified",e)},c.prototype.validateSchema=function(t,e,n,i){var s,c=new a(t,e,n,i);if("boolean"==typeof e)!0===e?e={}:!1===e&&(e={type:[]});else if(!e)throw new Error("schema is undefined");if(e.extends)if(e.extends instanceof Array){var h={schema:e,ctx:i};e.extends.forEach(this.schemaTraverser.bind(this,h)),e=h.schema,h.schema=null,h.ctx=null,h=null}else e=o.deepMerge(e,this.superResolve(e.extends,i));if(s=d(e)){var p=this.resolve(e,s,i),f=new l(p.subschema,n,i.propertyPath,p.switchSchema,i.schemas);return this.validateSchema(t,p.subschema,n,f)}var _=n&&n.skipAttributes||[];for(var m in e)if(!r.ignoreProperties[m]&&_.indexOf(m)<0){var y=null,v=this.attributes[m];if(v)y=v.call(this,t,e,n,i);else if(!1===n.allowUnknownAttributes)throw new u("Unsupported attribute: "+m,e);y&&c.importErrors(y)}if("function"==typeof n.rewrite){var g=n.rewrite.call(this,t,e,n,i);c.instance=g}return c},c.prototype.schemaTraverser=function(t,e){t.schema=o.deepMerge(t.schema,this.superResolve(e,t.ctx))},c.prototype.superResolve=function(t,e){var n;return(n=d(t))?this.resolve(t,n,e).subschema:t},c.prototype.resolve=function(t,e,n){if(e=n.resolve(e),n.schemas[e])return{subschema:n.schemas[e],switchSchema:e};var r=i.parse(e),s=r&&r.hash,a=s&&s.length&&e.substr(0,e.length-s.length);if(!a||!n.schemas[a])throw new u("no such schema <"+e+">",t);var l=o.objectGetPath(n.schemas[a],s.substr(1));if(void 0===l)throw new u("no such schema "+s+" located in <"+a+">",t);return{subschema:l,switchSchema:e}},c.prototype.testType=function(t,e,n,i,r){if("function"==typeof this.types[r])return this.types[r].call(this,t);if(r&&"object"==typeof r){var o=this.validateSchema(t,r,n,i);return void 0===o||!(o&&o.errors.length)}return!0};var h=c.prototype.types={};h.string=function(t){return"string"==typeof t},h.number=function(t){return"number"==typeof t&&isFinite(t)},h.integer=function(t){return"number"==typeof t&&t%1==0},h.boolean=function(t){return"boolean"==typeof t},h.array=function(t){return Array.isArray(t)},h.null=function(t){return null===t},h.date=function(t){return t instanceof Date},h.any=function(t){return!0},h.object=function(t){return t&&"object"==typeof t&&!(t instanceof Array)&&!(t instanceof Date)},t.exports=c},function(t,e,n){(function(t,i){var r;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,l=36,c=1,d=26,h=38,p=700,f=72,_=128,m="-",y=/^xn--/,v=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=l-c,A=Math.floor,S=String.fromCharCode;function T(t){throw new RangeError(E[t])}function I(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function C(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+I((t=t.replace(g,".")).split("."),e).join(".")}function R(t){for(var e,n,i=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(n=t.charCodeAt(r++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),r--):i.push(e);return i}function P(t){return I(t,function(t){var e="";return t>65535&&(e+=S((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=S(t)}).join("")}function L(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l}function O(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,n){var i=0;for(t=n?A(t/p):t>>1,t+=A(t/e);t>b*d>>1;i+=l)t=A(t/b);return A(i+(b+1)*t/(t+h))}function M(t){var e,n,i,r,o,s,a,h,p,y,v=[],g=t.length,E=0,b=_,S=f;for((n=t.lastIndexOf(m))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&T("not-basic"),v.push(t.charCodeAt(i));for(r=n>0?n+1:0;r<g;){for(o=E,s=1,a=l;r>=g&&T("invalid-input"),((h=L(t.charCodeAt(r++)))>=l||h>A((u-E)/s))&&T("overflow"),E+=h*s,!(h<(p=a<=S?c:a>=S+d?d:a-S));a+=l)s>A(u/(y=l-p))&&T("overflow"),s*=y;S=w(E-o,e=v.length+1,0==o),A(E/e)>u-b&&T("overflow"),b+=A(E/e),E%=e,v.splice(E++,0,b)}return P(v)}function D(t){var e,n,i,r,o,s,a,h,p,y,v,g,E,b,I,C=[];for(g=(t=R(t)).length,e=_,n=0,o=f,s=0;s<g;++s)(v=t[s])<128&&C.push(S(v));for(i=r=C.length,r&&C.push(m);i<g;){for(a=u,s=0;s<g;++s)(v=t[s])>=e&&v<a&&(a=v);for(a-e>A((u-n)/(E=i+1))&&T("overflow"),n+=(a-e)*E,e=a,s=0;s<g;++s)if((v=t[s])<e&&++n>u&&T("overflow"),v==e){for(h=n,p=l;!(h<(y=p<=o?c:p>=o+d?d:p-o));p+=l)I=h-y,b=l-y,C.push(S(O(y+I%b,0))),h=A(I/b);C.push(S(O(h,0))),o=w(n,E,i==r),n=0,++i}++n,++e}return C.join("")}a={version:"1.4.1",ucs2:{decode:R,encode:P},decode:M,encode:D,toASCII:function(t){return C(t,function(t){return v.test(t)?"xn--"+D(t):t})},toUnicode:function(t){return C(t,function(t){return y.test(t)?M(t.slice(4).toLowerCase()):t})}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()}).call(this,n(133)(t),n(30))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var l=t.length;u>0&&l>u&&(l=u);for(var c=0;c<l;++c){var d,h,p,f,_=t[c].replace(a,"%20"),m=_.indexOf(n);m>=0?(d=_.substr(0,m),h=_.substr(m+1)):(d=_,h=""),p=decodeURIComponent(d),f=decodeURIComponent(h),i(s,p)?r(s[p])?s[p].push(f):s[p]=[s[p],f]:s[p]=f}return s};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,a){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),function(s){var a=encodeURIComponent(i(s))+n;return r(t[s])?o(t[s],function(t){return a+encodeURIComponent(i(t))}).join(e):a+encodeURIComponent(i(t[s]))}).join(e):a?encodeURIComponent(i(a))+n+encodeURIComponent(i(t)):""};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],i=0;i<t.length;i++)n.push(e(t[i],i));return n}var s=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";var i=n(31),r=i.ValidatorResult,o=i.SchemaError,s={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,extends:!0}},a=s.validators={};function u(t,e,n,i,r){var o=e.throwError;e.throwError=!1;var s=this.validateSchema(t,r,e,n);return e.throwError=o,!s.valid&&i instanceof Function&&i(s),s.valid}function l(t,e,n,i,r,o){if(this.types.object(t)&&(!e.properties||void 0===e.properties[r]))if(!1===e.additionalProperties)o.addError({name:"additionalProperties",argument:r,message:"additionalProperty "+JSON.stringify(r)+" exists in instance when not allowed"});else{var s=e.additionalProperties||{};"function"==typeof n.preValidateProperty&&n.preValidateProperty(t,r,s,n,i);var a=this.validateSchema(t[r],s,n,i.makeChild(s,r));a.instance!==o.instance[r]&&(o.instance[r]=a.instance),o.importErrors(a)}}a.type=function(t,e,n,i){if(void 0===t)return null;var o=new r(t,e,n,i),s=Array.isArray(e.type)?e.type:[e.type];if(!s.some(this.testType.bind(this,t,e,n,i))){var a=s.map(function(t){return t.id&&"<"+t.id+">"||t+""});o.addError({name:"type",argument:a,message:"is not of a type(s) "+a})}return o},a.anyOf=function(t,e,n,i){if(void 0===t)return null;var s=new r(t,e,n,i),a=new r(t,e,n,i);if(!Array.isArray(e.anyOf))throw new o("anyOf must be an array");if(!e.anyOf.some(u.bind(this,t,n,i,function(t){a.importErrors(t)}))){var l=e.anyOf.map(function(t,e){return t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+e+"]"});n.nestedErrors&&s.importErrors(a),s.addError({name:"anyOf",argument:l,message:"is not any of "+l.join(",")})}return s},a.allOf=function(t,e,n,i){if(void 0===t)return null;if(!Array.isArray(e.allOf))throw new o("allOf must be an array");var s=new r(t,e,n,i),a=this;return e.allOf.forEach(function(e,r){var o=a.validateSchema(t,e,n,i);if(!o.valid){var u=e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+r+"]";s.addError({name:"allOf",argument:{id:u,length:o.errors.length,valid:o},message:"does not match allOf schema "+u+" with "+o.errors.length+" error[s]:"}),s.importErrors(o)}}),s},a.oneOf=function(t,e,n,i){if(void 0===t)return null;if(!Array.isArray(e.oneOf))throw new o("oneOf must be an array");var s=new r(t,e,n,i),a=new r(t,e,n,i),l=e.oneOf.filter(u.bind(this,t,n,i,function(t){a.importErrors(t)})).length,c=e.oneOf.map(function(t,e){return t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+e+"]"});return 1!==l&&(n.nestedErrors&&s.importErrors(a),s.addError({name:"oneOf",argument:c,message:"is not exactly one from "+c.join(",")})),s},a.properties=function(t,e,n,i){if(this.types.object(t)){var o=new r(t,e,n,i),s=e.properties||{};for(var a in s){"function"==typeof n.preValidateProperty&&n.preValidateProperty(t,a,s[a],n,i);var u=Object.hasOwnProperty.call(t,a)?t[a]:void 0,l=this.validateSchema(u,s[a],n,i.makeChild(s[a],a));l.instance!==o.instance[a]&&(o.instance[a]=l.instance),o.importErrors(l)}return o}},a.patternProperties=function(t,e,n,i){if(this.types.object(t)){var o=new r(t,e,n,i),s=e.patternProperties||{};for(var a in t){var u=!0;for(var c in s){if(new RegExp(c).test(a)){u=!1,"function"==typeof n.preValidateProperty&&n.preValidateProperty(t,a,s[c],n,i);var d=this.validateSchema(t[a],s[c],n,i.makeChild(s[c],a));d.instance!==o.instance[a]&&(o.instance[a]=d.instance),o.importErrors(d)}}u&&l.call(this,t,e,n,i,a,o)}return o}},a.additionalProperties=function(t,e,n,i){if(this.types.object(t)){if(e.patternProperties)return null;var o=new r(t,e,n,i);for(var s in t)l.call(this,t,e,n,i,s,o);return o}},a.minProperties=function(t,e,n,i){if(this.types.object(t)){var o=new r(t,e,n,i);return Object.keys(t).length>=e.minProperties||o.addError({name:"minProperties",argument:e.minProperties,message:"does not meet minimum property length of "+e.minProperties}),o}},a.maxProperties=function(t,e,n,i){if(this.types.object(t)){var o=new r(t,e,n,i);return Object.keys(t).length<=e.maxProperties||o.addError({name:"maxProperties",argument:e.maxProperties,message:"does not meet maximum property length of "+e.maxProperties}),o}},a.items=function(t,e,n,i){var o=this;if(this.types.array(t)&&e.items){var s=new r(t,e,n,i);return t.every(function(t,r){var a=Array.isArray(e.items)?e.items[r]||e.additionalItems:e.items;if(void 0===a)return!0;if(!1===a)return s.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=o.validateSchema(t,a,n,i.makeChild(a,r));return u.instance!==s.instance[r]&&(s.instance[r]=u.instance),s.importErrors(u),!0}),s}},a.minimum=function(t,e,n,i){if(this.types.number(t)){var o=new r(t,e,n,i);return(e.exclusiveMinimum&&!0===e.exclusiveMinimum?t>e.minimum:t>=e.minimum)||o.addError({name:"minimum",argument:e.minimum,message:"must have a minimum value of "+e.minimum}),o}},a.maximum=function(t,e,n,i){if(this.types.number(t)){var o=new r(t,e,n,i);return(e.exclusiveMaximum&&!0===e.exclusiveMaximum?t<e.maximum:t<=e.maximum)||o.addError({name:"maximum",argument:e.maximum,message:"must have a maximum value of "+e.maximum}),o}};var c=function(t,e,n,s,a,u){if(this.types.number(t)){var l=e[a];if(0==l)throw new o(a+" cannot be zero");var c=new r(t,e,n,s),d=i.getDecimalPlaces(t),h=i.getDecimalPlaces(l),p=Math.max(d,h),f=Math.pow(10,p);return Math.round(t*f)%Math.round(l*f)!=0&&c.addError({name:a,argument:l,message:u+JSON.stringify(l)}),c}};function d(t,e,n){var r,o=n.length;for(r=e+1;r<o;r++)if(i.deepCompareStrict(t,n[r]))return!1;return!0}a.multipleOf=function(t,e,n,i){return c.call(this,t,e,n,i,"multipleOf","is not a multiple of (divisible by) ")},a.divisibleBy=function(t,e,n,i){return c.call(this,t,e,n,i,"divisibleBy","is not divisible by (multiple of) ")},a.required=function(t,e,n,i){var o=new r(t,e,n,i);return void 0===t&&!0===e.required?o.addError({name:"required",message:"is required"}):this.types.object(t)&&Array.isArray(e.required)&&e.required.forEach(function(e){void 0===t[e]&&o.addError({name:"required",argument:e,message:"requires property "+JSON.stringify(e)})}),o},a.pattern=function(t,e,n,i){if(this.types.string(t)){var o=new r(t,e,n,i);return t.match(e.pattern)||o.addError({name:"pattern",argument:e.pattern,message:"does not match pattern "+JSON.stringify(e.pattern)}),o}},a.format=function(t,e,n,o){if(void 0!==t){var s=new r(t,e,n,o);return s.disableFormat||i.isFormat(t,e.format,this)||s.addError({name:"format",argument:e.format,message:"does not conform to the "+JSON.stringify(e.format)+" format"}),s}},a.minLength=function(t,e,n,i){if(this.types.string(t)){var o=new r(t,e,n,i),s=t.match(/[\uDC00-\uDFFF]/g);return t.length-(s?s.length:0)>=e.minLength||o.addError({name:"minLength",argument:e.minLength,message:"does not meet minimum length of "+e.minLength}),o}},a.maxLength=function(t,e,n,i){if(this.types.string(t)){var o=new r(t,e,n,i),s=t.match(/[\uDC00-\uDFFF]/g);return t.length-(s?s.length:0)<=e.maxLength||o.addError({name:"maxLength",argument:e.maxLength,message:"does not meet maximum length of "+e.maxLength}),o}},a.minItems=function(t,e,n,i){if(this.types.array(t)){var o=new r(t,e,n,i);return t.length>=e.minItems||o.addError({name:"minItems",argument:e.minItems,message:"does not meet minimum length of "+e.minItems}),o}},a.maxItems=function(t,e,n,i){if(this.types.array(t)){var o=new r(t,e,n,i);return t.length<=e.maxItems||o.addError({name:"maxItems",argument:e.maxItems,message:"does not meet maximum length of "+e.maxItems}),o}},a.uniqueItems=function(t,e,n,o){if(this.types.array(t)){var s=new r(t,e,n,o);return t.every(function(t,e,n){for(var r=e+1;r<n.length;r++)if(i.deepCompareStrict(t,n[r]))return!1;return!0})||s.addError({name:"uniqueItems",message:"contains duplicate item"}),s}},a.uniqueItems=function(t,e,n,i){if(this.types.array(t)){var o=new r(t,e,n,i);return t.every(d)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o}},a.dependencies=function(t,e,n,i){if(this.types.object(t)){var o=new r(t,e,n,i);for(var s in e.dependencies)if(void 0!==t[s]){var a=e.dependencies[s],u=i.makeChild(a,s);if("string"==typeof a&&(a=[a]),Array.isArray(a))a.forEach(function(e){void 0===t[e]&&o.addError({name:"dependencies",argument:u.propertyPath,message:"property "+e+" not found, required by "+u.propertyPath})});else{var l=this.validateSchema(t,a,n,u);o.instance!==l.instance&&(o.instance=l.instance),l&&l.errors.length&&(o.addError({name:"dependencies",argument:u.propertyPath,message:"does not meet dependency required by "+u.propertyPath}),o.importErrors(l))}}return o}},a.enum=function(t,e,n,s){if(void 0===t)return null;if(!Array.isArray(e.enum))throw new o("enum expects an array",e);var a=new r(t,e,n,s);return e.enum.some(i.deepCompareStrict.bind(null,t))||a.addError({name:"enum",argument:e.enum,message:"is not one of enum values: "+e.enum.map(String).join(",")}),a},a.const=function(t,e,n,o){if(void 0===t)return null;var s=new r(t,e,n,o);return i.deepCompareStrict(e.const,t)||s.addError({name:"const",argument:e.const,message:"does not exactly match expected constant: "+e.const}),s},a.not=a.disallow=function(t,e,n,i){var o=this;if(void 0===t)return null;var s=new r(t,e,n,i),a=e.not||e.disallow;return a?(Array.isArray(a)||(a=[a]),a.forEach(function(r){if(o.testType(t,e,n,i,r)){var a=r&&r.id&&"<"+r.id+">"||r;s.addError({name:"not",argument:a,message:"is of prohibited type "+a})}}),s):null},t.exports=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(2),a=n(5),u=n(4),l=n(57);!function(t){t.VIDEO_PROGRESS="video-progress"}(r=e.ProgressEvent||(e.ProgressEvent={}));var c=function(t){function e(e,n){var i=t.call(this,"AnalyticsProgressManager")||this;i._player=e,i._model=n,i._totalWatchTime=0,i._evtKeys={},i._segInfo=[],i._seeking=!1,i._progressBeaconTime=0,i._recovering=!1,i._recoveryStatus="",i._bufferingStartTime=null,i._rebufferingTime=0;var r=s.API;return[{evt:r.VIDEO_REQUEST,cb:i._onVideoRequest},{evt:r.PLAYBACK_PAUSE,cb:i._onPause},{evt:r.SEG_INFO_AVAILABLE,cb:i._onSegInfoAvailable},{evt:r.PLAYBACK_TIME_UPDATE,cb:i._onTimeUpdate},{evt:r.PLAYBACK_SEEKING,cb:i._onSeeking},{evt:r.PLAYBACK_SEEK_COMPLETE,cb:i._onSeekComplete},{evt:r.RECOVERY_METADATA_READY,cb:i._onRecoveryStart},{evt:r.BUFFERING_START,cb:i._onBufferingStart},{evt:r.BUFFERING_END,cb:i._onBufferingEnd}].forEach(function(t){i._evtKeys[t.evt]=i._player.addEventListener(t.evt,t.cb,i)}),i}return i(e,t),e.prototype.destroy=function(){this._player.removeEventListeners(this._evtKeys),this._resetProgressIntervals()},e.prototype.updatePlaybackStats=function(t){var e=this._getSegInfoMetrics();t.dur=Math.floor(this._totalWatchTime)||"",t.dur_d=Math.floor(this._totalWatchTime)-Math.floor(this._progressBeaconTime)||0,t.buff_info=e.segInfo||"",t.buf_dur=e.bufDur||0,this._recoveryStatus&&(t.rcvr_status=this._recoveryStatus)},Object.defineProperty(e.prototype,"totalWatchTime",{get:function(){return this._totalWatchTime},enumerable:!0,configurable:!0}),e.prototype._onVideoRequest=function(t,e){this._resetProgressIntervals()},e.prototype._onPause=function(t){t.playbackMode!==a.PlaybackMode.AD&&this._onProgressInterval({beacon:l.BEACONS.PLAYBACK_PROGRESS}),this._onBufferingEnd()},e.prototype._onSeeking=function(t){this._seeking=!0,this._onBufferingEnd()},e.prototype._onSeekComplete=function(){this._seeking=!1,this._model.lastKnownPlaybackTime=this._model.currentTime},e.prototype._onSegInfoAvailable=function(t){this._segInfo=this._segInfo.concat(t.val)},e.prototype._onTimeUpdate=function(t,e){if(!(this._seeking||u.isNullOrUndefined(t)||t<0||e.playbackMode===a.PlaybackMode.AD))if(u.isNullOrUndefined(this._model.lastKnownPlaybackTime))this._model.lastKnownPlaybackTime=t;else if(t>0&&(this._onBufferingEnd(),this._recovering))this._onRecoveryDone();else{var n=t-this._model.lastKnownPlaybackTime;this._model.lastKnownPlaybackTime=t,n>0&&(this._totalWatchTime+=n),this._checkProgress()}},e.prototype._checkProgress=function(){var t=this;l.PROGRESS_BEACON_INTERVALS.forEach(function(e){var n=t._totalWatchTime;(e.recurring&&n>e.lastSent+e.time||!e.recurring&&!e.lastSent&&n>e.time)&&(e.lastSent=Math.floor(n),t._onProgressInterval(e))})},e.prototype._onProgressInterval=function(t){this.publish(r.VIDEO_PROGRESS,t),this._progressBeaconTime=Math.floor(this._totalWatchTime)},e.prototype._resetProgressIntervals=function(){this._segInfo=[],this._totalWatchTime=0,this._progressBeaconTime=0,this._model.lastKnownPlaybackTime=null,l.PROGRESS_BEACON_INTERVALS.forEach(function(t){t.lastSent=null}),this._bufferingStartTime=null,this._recovering=!1,this._rebufferingTime=0},e.prototype._getSegInfoMetrics=function(){var t;return this._recovering?(this._updateRebufferingTime(),t=[{buf_dur:this._rebufferingTime}],this._rebufferingTime=0):t=this._segInfo.splice(0,Math.min(l.MAX_SEG_INFO_ENTRIES_PER_BEACON,this._segInfo.length)),{segInfo:JSON.stringify({seg:t}),bufDur:t.reduce(function(t,e){return e.buf_dur+t},0)}},e.prototype._onBufferingStart=function(){this._bufferingStartTime=Date.now()},e.prototype._onBufferingEnd=function(){this._updateRebufferingTime(),this._bufferingStartTime=null},e.prototype._updateRebufferingTime=function(){this._bufferingStartTime&&(this._rebufferingTime+=Date.now()-this._bufferingStartTime,this._bufferingStartTime=Date.now())},e.prototype._onRecoveryStart=function(){this._recovering=!0,this._recoveryStatus="recovering",this._onProgressInterval({beacon:l.BEACONS.PLAYBACK_PROGRESS})},e.prototype._onRecoveryDone=function(){this._recoveryStatus="recovered",this._onProgressInterval({beacon:l.BEACONS.PLAYBACK_PROGRESS}),this._recovering=!1,this._recoveryStatus=""},e}(o.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=function(){function t(){}return t.sendImageBeacon=function(t){t=i.default.fixProtocol(t);var e=new Image;e.onload=e.onabort=e.onerror=function(){e.onload=e.onabort=e.onerror=null,e=null},e.src=t},t.sendUnloadBeacon=function(e){return e=i.default.fixProtocol(e),navigator&&navigator.sendBeacon?navigator.sendBeacon(e,null):t.sendImageBeacon(e),!0},t.sendIframeBeacon=function(e){e=i.default.fixProtocol(e);var n,r=Math.random(),o=document.querySelector("#vp-beacons"),s="vp-beacons-"+r;return o||(o=t.createBeaconsIframe(document,"vp-beacons"),document.body.appendChild(o)),(n=t.createBeaconsIframe(o.contentDocument,s)).src=e,"complete"===o.contentDocument.readyState?o.contentDocument.body.appendChild(n):o.contentDocument.body.onload=function(){o.contentDocument.body.appendChild(n)},!0},t.createBeaconsIframe=function(t,e){var n=t.createElement("iframe");return n.frameBorder=0,n.width=0,n.height=0,n.marginwidth=0,n.marginheight=0,n.hspace=0,n.vspace=0,n.frameborder=0,n.scrolling="no",n.id=e,n.style.display="none",n.title="",n},t.prepareApiInfo=function(t,e){(e=e||{}).url=t,e.instrument=e.instrument||"none",e.perfInfo="na",e.perfStack="na",e.source="player";var n=e.resourceTiming,i=e.resourceTimingEntries;if(n){var r={};["connectEnd","connectStart","domainLookupEnd","domainLookupStart","duration","fetchStart","redirectEnd","redirectStart","requestStart","responseEnd","responseStart","startTime"].forEach(function(t){r[t]=n[t].toFixed(2)}),e.latency=r&&r.duration||"",e.perfInfo=JSON.stringify(r);var o=[];e.resourceTimingEntries&&n.requestStart-n.connectStart>500&&i.forEach(function(t){t.startTime<n.startTime&&o.push({url:t.name,st:t.startTime.toFixed(2),du:(t.responseEnd-t.startTime).toFixed(2)})}),e.perfStack=0===o.length?"na":JSON.stringify(o)}return e},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(7),r=function(){function t(){this.version="0.1.240",this.type=i.PluginType.BRANDING}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t.prototype.create=function(t){var e=document.createElement("div"),n=this._renderBranding(t);return n?(e.innerHTML=n,e.children[0]):null},t}();e.default=r},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(6),o=n(1),s=n(142),a=n(143),u=n(144),l=n(271),c=n(2),d=n(2),h=n(272),p=n(273),f=n(86),_=n(87),m=n(54),y=n(274),v=n(82),g=n(275),E=n(4),b=n(0),A=n(277),S=n(79),T=n(39).Validator,I=[[c.PLAYBACK_STARTED,c.API.PLAYBACK_START],[d.VideoEvent.PAUSE,c.API.PLAYBACK_PAUSE],[c.PLAYBACK_RESUMED,c.API.PLAYBACK_RESUMED],[d.VideoEvent.TIMEUPDATE,c.API.PLAYBACK_TIME_UPDATE],[c.PLAYBACK_ENDED,c.API.PLAYBACK_COMPLETE],[c.ERROR,c.API.PLAYER_ERROR],[c.WARNING,c.API.PLAYER_WARNING],[c.INFO,c.API.PLAYER_INFO],[c.API_CALLED,c.API.CMS_API_CALLED],[c.METADATA_AVAILABLE,c.API.METADATA_READY],[c.MULTI_LANGUAGES_AVAILABLE,c.API.MULTI_AUDIO_AVAILABLE],[c.VIDEO_REQUEST,c.API.VIDEO_REQUEST],[c.START_SCREEN_RENDERED,c.API.START_SCREEN_RENDERED],[c.HLS_FIRST_TS_LOAD_START,c.API.HLS_FIRST_TS_LOAD_START],[c.HLS_FIRST_TS_FIRST_BYTE_ARRIVE,c.API.HLS_FIRST_TS_FIRST_BYTE_ARRIVE],[c.PLAYBACK_REQUEST,c.API.PLAYBACK_REQUEST],[c.PLAYBACK_STALLED,c.API.PLAYBACK_STALLED],[c.RECOVERY_METADATA_READY,c.API.RECOVERY_METADATA_READY],[c.ABR_DATA_UPDATE,c.API.ABR_DATA_UPDATE],[c.SEG_INFO_AVAILABLE,c.API.SEG_INFO_AVAILABLE],[c.SEGMENT_FIRST_BYTE_LOADED,c.API.SEGMENT_FIRST_BYTE_LOADED],[c.MEDIA_ITEM_METADATA,c.API.MEDIA_ITEM_METADATA],[c.CTRL_PLAYPAUSE,c.API.CTRL_PLAYPAUSE],[c.CTRL_SEEK,c.API.CTRL_SEEK],[c.CTRL_VOLUME,c.API.CTRL_VOLUME],[c.CTRL_SETTINGS,c.API.CTRL_SETTINGS],[c.CTRL_PLAYREQUEST,c.API.CTRL_PLAYREQUEST],[c.CTRL_REPLAY,c.API.CTRL_REPLAY],[c.CONTROLS_AUDIO_CHANGE,c.API.CONTROLS_AUDIO_CHANGE],[c.CCEvent.UI_TOGGLE,c.API.CC_UI_TOGGLE],[c.CCEvent.LANGUAGE_CHANGE,c.API.CC_LANGUAGE_CHANGE],[c.CCEvent.UPDATE_STYLE,c.API.CC_UPDATE_STYLE],[c.CCEvent.SETTINGS,c.API.CC_SETTINGS],[c.THREE_SIXTY_INTERACT,c.API.THREE_SIXTY_INTERACT],[c.THREE_SIXTY_PIE_INTERACT,c.API.THREE_SIXTY_PIE_INTERACT],[d.VideoEvent.SEEKING,c.API.PLAYBACK_SEEKING],[c.PLAYBACK_PROGRESS,c.API.PLAYBACK_PROGRESS],[c.FULLSCREEN_CHANGE,c.API.PLAYER_FULLSCREEN_CHANGE],[c.MEDIA_ITEM_NEED_SOURCE,c.API.MEDIA_ITEM_NEED_SOURCE],[c.MEDIA_ITEM_ERROR,c.API.MEDIA_ITEM_ERROR],[c.MEDIA_ITEM_ADDED,c.API.MEDIA_ITEM_ADDED],[c.MEDIA_ITEM_REMOVED,c.API.MEDIA_ITEM_REMOVED],[c.MEDIA_ITEM_ENDED,c.API.MEDIA_ITEM_ENDED],[c.MEDIA_ITEM_CURRENT,c.API.MEDIA_ITEM_CURRENT],[c.AD_BREAK_STARTED,c.API.AD_BREAK_STARTED],[c.AD_BREAK_ENDED,c.API.AD_BREAK_ENDED],[c.AD_BREAK_ITEM_CURRENT,c.API.AD_BREAK_ITEM_CURRENT],[c.AD_BREAK_ITEM_ENDED,c.API.AD_BREAK_ITEM_ENDED],[c.AD_BREAK_ITEM_ERROR,c.API.AD_BREAK_ITEM_ERROR],[c.AD_BREAK_ITEM_SKIPPED,c.API.AD_BREAK_ITEM_SKIPPED],[c.AD_BREAK_ITEM_CLICKED,c.API.AD_BREAK_ITEM_CLICKED],[c.AD_METRICS,c.API.AD_METRICS],[c.TIMED_METADATA_RECEIVED,c.API.TIMED_METADATA_RECEIVED],[c.OPSS_VISIBILITY_CHANGED,"opss-visibility-changed"]],C=function(t){function e(e,n){var i=t.call(this,"VdmsPlayer")||this;return i._suspendedState=!1,i.version="0.1.240",i.playerType="PLAYER_TYPE",i.language="SCRIPT_LANGUAGE_I18N",i.config=e,i.mediaStore=n,i.guid=b.default.generateGuid(),i._validateConfig(e),i._loadCSS(),i._create(e,n),i}return i(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this._profiler&&this._profiler.destroy(),this._controller&&(this._controller.destroy(),this._controller=null),this._cleanUpAnalytics(),window.removeEventListener("pageshow",this._bfCacheHandler,!1)},Object.defineProperty(e.prototype,"state",{get:function(){return A.PlayerState.PAUSED},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"error",{get:function(){return new Error},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._controls.getVolume()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"audioTracks",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoTracks",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textTracks",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._controls.getDuration()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawDuration",{get:function(){return this._controls.getRawDuration()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._controls.getCurrentTime()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawCurrentTime",{get:function(){return this._controls.getRawCurrentTime()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentDate",{get:function(){return this._controls.getCurrentDate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seekable",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playing",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waiting",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seeking",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return!1},enumerable:!0,configurable:!0}),e.prototype.getThumbnail=function(t){return""},Object.defineProperty(e.prototype,"castingDeviceType",{get:function(){return A.CastDeviceType.NONE},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"castingDeviceName",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"castingConnectionState",{get:function(){return A.CastConnectionState.NOT_CONNECTED},enumerable:!0,configurable:!0}),e.prototype.getChromecastButton=function(){return""},e.prototype.isCastingAvailable=function(t){return!1},e.prototype.startCasting=function(t){return!1},e.prototype.stopCasting=function(){return!1},e.prototype.initialize=function(){this._controller&&this._controller.initialize()},e.prototype.render=function(t){return this._validateState(),this._selector=t,this._controller&&this._controller.render(t),this},e.prototype.setQueryString=function(t){},e.prototype.getMediaItems=function(){return this._mediaItemsAPI.getMediaItems()},e.prototype.removeAllMediaItems=function(){this._mediaItemsAPI.removeAllMediaItems()},e.prototype.removeMediaItems=function(t){this._mediaItemsAPI.removeMediaItems(t)},e.prototype.insertMediaItems=function(t,e){this._mediaItemsAPI.insertMediaItems(t,e)},e.prototype.appendMediaItems=function(t){this._mediaItemsAPI.appendMediaItems(t)},e.prototype.getCurrentMediaItem=function(){return this._mediaItemsAPI.getCurrentMediaItem()},e.prototype.setCurrentMediaItem=function(t){this._mediaItemsAPI.setCurrentMediaItem(t)},e.prototype.getCurrentAdBreak=function(){return this._adBreakAPI.getCurrentAdBreak()},e.prototype.getCurrentAdBreakItem=function(){return this._adBreakAPI.getCurrentAdBreakItem()},e.prototype.play=function(t){void 0===t&&(t=0),this._controls.play(t,null)},e.prototype.pause=function(){this._controls.pause(null)},e.prototype.mute=function(){this._controls.setMute(!0)},e.prototype.unMute=function(){this._controls.setMute(!1)},e.prototype.setVolume=function(t){E.isNumber(t)&&this._controls.setVolume(t)},e.prototype.seek=function(t){this._controls.seek(t)},e.prototype.registerPlugin=function(t){this._controller&&this._controller.registerPlugin(t)},e.prototype.getVideoElement=function(){return this._validateState(),this._controller?this._controller.videoElement:null},e.prototype.suspendState=function(){if(!o.userAgent.desktop&&!this.isSuspended()){this._validateState();var t={boundEvents:this._events,currentTime:this._controls.getCurrentTime(),mediaStore:this.getMediaStore(),playlist:this._controller.getPlaylistItems(),position:this._playlist.getPosition(),selector:this._selector};return this._suspendedState=!0,this.destroy(),t}},e.prototype.resumeState=function(t){this.isSuspended()&&t&&(this._suspendedState=!1,this._create(this.config,t.mediaStore),this._playlist.setItems(t.playlist),this._playlist.setPosition(t.position),this._controller.startTime=t.currentTime,this._events=t.boundEvents)},e.prototype.isSuspended=function(){return this._suspendedState},e.prototype.isRendered=function(){return this._validateState(),!!this._controller&&this._controller.rendered},e.prototype.preload=function(t){this._controls.preload(t)},e.prototype.disableControls=function(){this._controls.disableControls()},e.prototype.enableControls=function(){this._controls.enableControls()},e.prototype.enableCC=function(t){this._controls.enableCC(t)},e.prototype.disableCC=function(){this._controls.disableCC()},e.prototype.isPlaying=function(){return this._controller.isPlayMode()},e.prototype.isPlayMode=function(){return this._controller.isPlayMode()},e.prototype.isLoading=function(){return this._controller.isLoading()},e.prototype.getPlaybackState=function(){return this._controls.getPlaybackState()},e.prototype.getCurrentTime=function(){return this._controls.getCurrentTime()},e.prototype.getTimeRemaining=function(){return this._controls.getTimeRemaining()},e.prototype.setFullscreen=function(t){void 0===t&&(t=!0),this._controls.setFullscreen(t)},e.prototype.getFullscreen=function(){return this._controls.getFullscreen()},e.prototype.getVolume=function(){return this._controls.getVolume()},e.prototype.setMute=function(t){void 0===t&&(t=!0),this._controls.setMute(t)},e.prototype.getMute=function(){return this._controls.getMute()},e.prototype.setLoop=function(t){this._controls.setLoop(t)},e.prototype.setContinuousPlay=function(t){void 0===t&&(t=!0),this._controls.setContinuousPlay(t)},e.prototype.resumeContinuousPlay=function(){this._controls.resumeContinuousPlay()},e.prototype.getCurrentDate=function(){return this._controls.getCurrentDate()},e.prototype.addItems=function(t,e){this._playlist.addItems(t,e)},e.prototype.addMetricsEventListener=function(t,e){return this.addEventListeners(this._externalEvents,t,e)},e.prototype.canPlayManifestString=function(t){return!0},e.prototype.setAudioLanguage=function(t){this._controls.setAudioLanguage(t)},e.prototype.getPlaylist=function(){return this._playlist},e.prototype.getMediaStore=function(){return this._validateState(),{_privateMediaStore:this._controller.mediaStore}},e.prototype.getPlaybackStartDto=function(){var t=this._controller.model,e=this._profiler;return{isResume:t.isResumingFromSavedPosition,initTime:e.startTime,cmsLatency:e.getItem(c.METRICS.CMS_REQUEST),cmsSourceLatency:e.getItem(c.METRICS.CMS_SOURCE_REQUEST),playbackStartLatency:e.getItem(c.METRICS.PLAYBACK_START),autoPlayLatency:e.getItem(c.METRICS.INIT_TO_START),autoPlayAllowed:t.isAutoplayAllowed(),clickToPlayLatency:e.getItem(c.METRICS.CLICK_TO_START),adPluginLatency:e.getItem(c.METRICS.AD_PLUGIN)}},e.prototype.__setError=function(t,e,n,i,r){if(this._validateState(),!this._controller)return null;this._controller.setCustomError(t,e,n,i,r)},e.prototype.updateDockingConfig=function(t,e,n,i,r,o){this._validateState(),this._controller.updateDockingConfig(t,e,n,i,r,o)},e.prototype._validateConfig=function(t){try{var e=new T;e.addSchema(m.streamSchema,"/streamSchema"),e.addSchema(_.sourceSchema,"/sourceSchema"),e.addSchema(f.mediaItemSchema,"/mediaItemSchema"),e.addSchema(y.uiSchema,"/uiSchema"),e.validate(t,p.configSchema,{throwError:!0})}catch(t){var n="Invalid player config: "+t.property+" "+t.message;throw console.error(n),new Error(n)}},e.prototype._create=function(t,e){this._eventBus=new r.default("internal"),this._createAnalytics();var n=null;e&&(n=e._privateMediaStore||null),this._setupApiEvents(),this._profiler=new g.Profiler(t,this._eventBus),this._controller=new u.default(t,n,this.guid,this._eventBus,this._profiler),this._controls=new l.default(this._controller),this._playlist=new v.default(this._controller),this._mediaItemsAPI=new h.default(this._controller),this._adBreakAPI=new a.default(this._controller)},e.prototype._setupApiEvents=function(){var t=this;for(var e in c.API)if(-1===this._externalEvents.indexOf(c.API[e])){var n=c.API[e];I.push([n,n])}I.forEach(function(e){t._createHandler(e)}),this._handleBrowserbfCache()},e.prototype._createHandler=function(t){var e=this,n=t[0],i=t[1];this._eventBus.addEventListener(n,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=Array.prototype.slice.call(t,0),o=e._controller&&e._controller.getEventsDto()||{};r.push(o),setTimeout(function(){e.publish.apply(e,[i].concat(r))})},this)},e.prototype._handleBrowserbfCache=function(){var t=this;this._bfCacheHandler=function(e){e.persisted&&t._reload()},o.userAgent.safari&&window.addEventListener("pageshow",this._bfCacheHandler,!1)},e.prototype._validateState=function(){if(this.isSuspended()||!this._controller)throw new Error("INVALID_STATE_ERR: An attempt was made to use videoplayer instance that is not, or no longer, usable.");return!0},e.prototype._reload=function(){this.destroy(),this._create(this.config,this.mediaStore),this.render(this._selector)},Object.defineProperty(e.prototype,"_externalEvents",{get:function(){return I.map(function(t){return t[1]})},enumerable:!0,configurable:!0}),e.prototype._cleanUpAnalytics=function(){this._analyticsList.forEach(function(t){t.destroy()}),this._analyticsList=[]},e.prototype._createAnalytics=function(){var t=this;this._analyticsList=this._analyticsList||[],!0===this.config.analytics&&this._analyticsList.push(new S.default(this));var e=!1;this._eventBus.addEventListener(c.API.NIELSEN_REQUIRED,function(){if(!e){var n=(t.config.nielsenConfig||{}).nielsenAppId||null;t._analyticsList.push(new s.default(t,n)),e=!0}},this)},e.prototype._loadCSS=function(){var t=this.config.cssTheme,e=b.default.getCssBuildUrl("9ab2bec457".indexOf("local")>-1,"9ab2bec457",t);b.default.loadCssAsset("vp-css",e,function(){b.default.setSingleton("isCSSLoaded",!0)},function(){b.default.setSingleton("isCSSError",!0)})},e}(r.default);e.default=C},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),r=n(2),o=n(0),s="",a="";if("0.1.240".indexOf("local")>-1)s=location.protocol+"//"+location.host,a="/nielsen-iframe.html";else{a=(s="https://assets.video.yahoo.net")+"/playerassets/builds/0.1.240/nielsen-iframe.html"}var u,l,c;e.NIELSEN_IAB_VENDOR_ID=373,function(t){t.linear="1",t.dynamic="2"}(u=e.NielsenAdType||(e.NielsenAdType={})),function(t){t.LOAD_METADATA="loadMetadata",t.SEND_ID3="sendID3",t.END="end"}(l=e.NielsenEvents||(e.NielsenEvents={})),function(t){t.INITIALIZE="initialize",t.SEND_BEACON="sendBeacon"}(c=e.IframeMessageType||(e.IframeMessageType={}));var d=function(){function t(t,e){this._player=t,this._nielsenIframe=null,this._playerId="",this._sentLoadBeacon=!1,this._sentEndBeacon=!1,this._beaconingActive=!1,this._beaconQueue=[],this._iframeLoaded=!1,this._activationSub="",this._hasCMPConsent=!1,this._evtListeners=[{evt:r.API.PLAYBACK_START,cb:this._sendLoadBeacon.bind(this)},{evt:r.API.TIMED_METADATA_RECEIVED,cb:this._onTimedMetadata.bind(this)},{evt:r.API.MEDIA_ITEM_ENDED,cb:this._sendEndBeacon.bind(this)},{evt:r.API.MEDIA_ITEM_ERROR,cb:this._sendEndBeacon.bind(this)}],this._appId="P77FED7E1-92A2-4B10-A9AA-16756377EB20",t?(o.default.initIframeCmp(),this._getVendorConsent(),this._playerId="vp-player-"+Math.floor(1e4*Math.random()),e&&e.length&&(this._appId=e),this._loadNielsenIframe(),this._evtKeys={},this._bindIframeMessageListener(),this._activateBeaconing(),this._activationSub=this._player.addEventListener(r.API.NIELSEN_REQUIRED,this._activateBeaconing.bind(this),this)):console.error("[Nielsen] Cannot initialize Nielsen. Bad player instance!")}return t.prototype.destroy=function(){this._nielsenIframe&&(this._player.removeEventListeners(this._evtKeys),window.removeEventListener("message",this._iframeMessageHandler),this._nielsenIframe=null,this._beaconQueue=null,this._evtKeys={},this._player.removeEventListener(r.API.NIELSEN_REQUIRED,this._activationSub))},t.prototype._activateBeaconing=function(){this._beaconingActive||(this._bindEvents(),this._sentEndBeacon=!1,this._sentLoadBeacon=!1,this._beaconingActive=!0)},t.prototype._deActivateBeaconing=function(){this._beaconingActive&&(this._player.removeEventListeners(this._evtKeys),window.removeEventListener("beforeunload",this._sendEndBeacon.bind(this)),this._sentEndBeacon=!0,this._beaconingActive=!1)},t.prototype._loadNielsenIframe=function(){var t=this;this._nielsenIframe=document.getElementById("vp-nielsen-iframe"),this._nielsenIframe?(this._createSDKInstance(),this._iframeLoaded=!0):(this._nielsenIframe=document.createElement("iframe"),this._nielsenIframe.id="vp-nielsen-iframe",this._nielsenIframe.style.display="none",this._nielsenIframe.onload=function(){t._createSDKInstance(),t._iframeLoaded=!0,t._hasCMPConsent&&t._fireBeacons()},this._nielsenIframe.src=a,document.body.appendChild(this._nielsenIframe))},t.prototype._createSDKInstance=function(){this._sendIframeMessages(c.INITIALIZE,null,{appid:this._appId})},t.prototype._sendIframeMessages=function(t,e,n){if(this._nielsenIframe&&this._nielsenIframe.contentWindow){var i={messageType:t,nielsenEvent:e,payload:n,playerid:this._playerId};this._nielsenIframe.contentWindow.postMessage(i,s)}},t.prototype._bindEvents=function(){var t=this;window.addEventListener("beforeunload",this._sendEndBeacon.bind(this)),this._evtListeners.forEach(function(e){t._evtKeys[e.evt]=t._player.addEventListener(e.evt,e.cb,t)})},t.prototype._bindIframeMessageListener=function(){window.addEventListener?window.addEventListener("message",this._iframeMessageHandler.bind(this)):console.error("[Nielsen] addEventListener not supported")},t.prototype._iframeMessageHandler=function(t){if(t.origin===s){var e=t.data&&t.data.messageType,n=t.data&&t.data.success||!1;if(e&&!n)return void console.error("[Nielsen] "+e+" error.");e===c.SEND_BEACON&&n&&(this._sentLoadBeacon=!0)}},t.prototype._sendNielsenBeacon=function(t,e){var n=this;this._beaconQueue.push(function(){n._sendIframeMessages(c.SEND_BEACON,t,e)}),this._nielsenIframe&&this._iframeLoaded&&this._hasCMPConsent&&this._fireBeacons()},t.prototype._fireBeacons=function(){this._beaconQueue.forEach(function(t){t()}),this._beaconQueue=[]},t.prototype._sendLoadBeacon=function(t){var e=this._player.getCurrentMediaItem(),n=e&&e.id,i={type:"content",channelName:t&&t.brandingData&&t.brandingData.branding&&t.brandingData.branding.providerId?n+";"+t.brandingData.branding.providerId:n,adModel:u.linear};this._sendNielsenBeacon(l.LOAD_METADATA,i)},t.prototype._sendEndBeacon=function(){if(this._sentLoadBeacon&&!this._sentEndBeacon){var t=Date.now()/1e3;this._sendNielsenBeacon(l.END,t),this._sentLoadBeacon=!1,this._deActivateBeaconing()}},t.prototype._onTimedMetadata=function(t){var e=o.default.detectRegexPattern(i.ID3_MATCH_PATTERN.NIELSEN,t);e&&this._sentLoadBeacon&&this._sendNielsenBeacon(l.SEND_ID3,e)},t.prototype._getVendorConsent=function(){var t=this;window.__cmp?window.__cmp("getVendorConsents",new Uint16Array([e.NIELSEN_IAB_VENDOR_ID]),function(n,i){i&&(n&&!n.gdprApplies?t._hasCMPConsent=!0:n&&n.gdprApplies&&(t._hasCMPConsent=n.vendorConsents&&!!n.vendorConsents[e.NIELSEN_IAB_VENDOR_ID])),t._hasCMPConsent?console.log("found user consents for nielsen"):(console.error("did not found user consents for nielsen"),t._deActivateBeaconing())}):(console.error("did not found user consents for nielsen"),this._deActivateBeaconing())},t}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(0),o=function(){function t(t){this._controller=t}return t.prototype.getCurrentAdBreak=function(){var t=this.getCurrentAdBreakItem();return t?t.adBreak:null},t.prototype.getCurrentAdBreakItem=function(){var t=this._controller.getPlayingItem();return r.default.getPlaybackMode(t)===i.PlaybackMode.AD?t:null},t}();e.default=o},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(83),o=n(154),s=n(11),a=n(9),u=n(2),l=n(60),c=n(15),d=n(61),h=n(88),p=n(226),f=n(7),_=n(5),m=n(18),y=n(42),v=n(67),g=n(19),E=n(27),b=n(4),A=n(0),S=n(227),T=n(254),I=n(255),C=n(260),R=n(261),P=n(114),L=n(262),O=n(117),w=n(263),M=n(264),D=n(265),N=n(266),k=n(267),B=n(268),x=n(270),U=function(){function e(t,e,n,i,r){this._defaultPlugins=[],this._firstPlaylistBatchLoaded=!1,this._firstPlay=!0,this._config=t,this._profiler=r,this._eventBus=i,this._eventBus.publish(u.PROFILE_START,[u.METRICS.RENDER_TO_SWF,u.METRICS.VP_CONSTRUCTOR]),this._model=new h.default(t,e,n),this._mediaStore=this._model.mediaStore,this._setupMediaStoreEvents(),this._playerEventsListenerPlugins=[],this._pluginManager=new p.default,this._commandManager=new o.default(this._pluginManager),this._playbackController=new I.PlaybackController(this._model,this._eventBus,this._pluginManager),this._setupPlaybackControllerEvents(),this._model.autoplay&&this._eventBus.publish(u.PROFILE_START,u.METRICS.INIT_TO_START),this._model.fastInitRecoverer&&this._createRecoverer(),this._bindEvents(),this._eventBus.publish(u.PROFILE_END,u.METRICS.VP_CONSTRUCTOR),this._eventBus.publish(u.PROFILE_START,u.METRICS.INIT_RENDER_GAP),this._createVisibilityManager(),this._registerDefaultPlugins()}return e.prototype.initialize=function(){this._metadataController||(this._metadataController=new T.MetadataController(this._commandManager,this._model),this._setupMetadataControllerEvents(),this.fetchMetadata())},e.prototype.fetchMetadata=function(){this._metadataController&&this._metadataController.loadMetadata()},e.prototype.destroy=function(){this._view&&this._view.destroy(),this._destroyRecoverer(),this._eventBus&&this._eventBus.destroy(),this._ccController&&this._ccController.destroy(),this._model&&this._model.destroy(),this._metadataController&&this._metadataController.destroy(),this._playbackController&&this._playbackController.destroy(),this._visibilityManager&&this._visibilityManager.destroy(),this._cleanupDefaultPlugins(),this._pluginManager.destroy(),this._commandManager.destroy()},e.prototype.render=function(t){this._eventBus.publish(u.PROFILE_END,u.METRICS.INIT_RENDER_GAP),this._eventBus.publish(u.PROFILE_START,u.METRICS.CREATE_RENDERER),this._setupVisibilityManagerEvents();var e=b.isString(t)?document.querySelector(t):t;if(null===e&&this._eventBus.publish(u.ERROR,this._createConfigError(a.PLAYER_CODES.E_INVALID_CONFIGURATION,!1,"Invalid DOM node or CSS selector specified. Cannot render player.")),this._view=new S.default(e,this._model,this._eventBus,this._profiler,this._pluginManager,this._playbackController),this._setupViewEvents(),this._model.playerRootElement=e,this._view.render(),this._playlistController=this._view.getPlaylistController(),b.isFunction(r.CCController)&&(this._ccController=new r.CCController(this._eventBus,this._model,this._view),this._setupCCControllerEvents()),this._model.firstCriticalError)this._onError(this._model.firstCriticalError);else{var n=this._model.playlist.getCurrentItem();if(this._playerReadyEventFired=!1,this._playbackController.initNewPlayback(n),this._model.autoplay){var i={type:s.REQUEST_TYPES.AUTOPLAY,action:s.REQUEST_TYPES.AUTOPLAY};this.play(i)}else this._metadataController.loadSource(n);this._eventBus.publish(u.API.PLAYER_RENDERED),this._eventBus.publish(u.PROFILE_END,u.METRICS.CREATE_RENDERER),this._view.setTheme(this._config.cssTheme)}},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},enumerable:!0,configurable:!0}),e.prototype.registerPlugin=function(t){var e=this._model.config,n=e.pluginConfigs&&e.pluginConfigs[t.type]&&e.pluginConfigs[t.type][t.mimetype];switch(t.type){case f.PluginType.AD:n=Object.assign({autoplay:e.autoplay,playerGuid:this._model.guid,timeout:{hard:e.ads.timeout.load,start:e.ads.timeout.start}},n)}this._pluginManager.register(t,n),b.isPlayerPluginEventListener(t)&&this._playerEventsListenerPlugins.push(t)},Object.defineProperty(e.prototype,"rootElement",{get:function(){return this._model.rendered?this._view.getRootElement():null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoElement",{get:function(){return this._model.rendered?this._view.getVideoElement():null},enumerable:!0,configurable:!0}),e.prototype.supportSendBeacon=function(){return!(i.userAgent.ie||i.userAgent.safari||i.userAgent.ios)},e.prototype.play=function(t){void 0===t&&(t=null),this._playbackController.startPlayback(t)},e.prototype.pause=function(t){this._playbackController.pause(t),this._eventBus.publish(u.CTRL_PLAYPAUSE,"pause")},e.prototype.seek=function(t){this._playbackController.seek(t)},e.prototype.recover=function(){this._recoverer&&this._recoverer.recover()},e.prototype.preload=function(t){this._playbackController.preload(t)},e.prototype.disableControls=function(){this._model.rendered&&this._view.disableControls()},e.prototype.enableControls=function(){this._model.rendered&&this._view.enableControls()},e.prototype.enableCC=function(t){this._ccController&&this._ccController.enable(t)},e.prototype.disableCC=function(){this._ccController&&this._ccController.disable()},e.prototype.isPlayMode=function(){var t=this._model.getState();return(t===m.default.VIDEO||t===m.default.WAITING)&&!this._model.isPaused()},e.prototype.isLoading=function(){return this._model.playbackState.videoLoading()},e.prototype.setCustomError=function(t,e,n,i,r){if(/^player-/.test(t)||(t="player-"+t),-1===[u.ERROR,u.WARNING,u.INFO].indexOf(t))throw new Error("invalid error level");if(-1===Object.keys(a.ErrorGroup).map(function(t){return a.ErrorGroup[t]}).indexOf(e))throw new Error("invalid error group");this._eventBus.publish(t,A.default.createErr(e,this._model.playbackState,n,i,r))},Object.defineProperty(e.prototype,"fullscreen",{get:function(){return!!this._model.rendered&&this._view.getFullscreen()},set:function(t){this._model.rendered&&this._view.setFullscreen(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._model.volume},set:function(t){t>0&&!this._model.muteMode&&(this._model.mute=!1),y.default.put(s.LocalStorageKey.VOLUME,{volume:t,mute:this._model.mute}),this._model.rendered&&this._playbackController.setVolume(t),this._view.updateVolumeUI(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._model.rendered?this._playbackController.getCurrentTime():0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawCurrentTime",{get:function(){return this._model.rendered?this._playbackController.getRawCurrentTime():0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mute",{get:function(){return this._model.mute},set:function(t){this._model.muteMode&&this._model.mute||(y.default.put(s.LocalStorageKey.VOLUME,{volume:this._model.volume,mute:t}),this._model.rendered&&this._playbackController.setMute(t),this._view.updateVolumeUI(this._model.volume,t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loop",{set:function(t){this._model.loop=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"continuousPlay",{get:function(){return this._model.continuousPlay},set:function(t){this._model.continuousPlay=t},enumerable:!0,configurable:!0}),e.prototype.resumeContinuousPlay=function(t){this._playbackController.resumeContinuousPlay(t)},Object.defineProperty(e.prototype,"autoplay",{get:function(){return this._model.autoplay},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mediaStore",{get:function(){return this._model.mediaStore},enumerable:!0,configurable:!0}),e.prototype.getPlaybackState=function(){return this._model.getState()},e.prototype.getCurrentMediaItem=function(){return this._model.playlist.getCurrentItem()},e.prototype.getPlaylistItems=function(){return this._model.playlist.getItems().map(function(t){return{id:t.id,mimetype:t.mimetype}})},e.prototype.getPlaylistItemIds=function(){return this._model.playlist.getItemIds()},e.prototype.getPlaylist=function(){return this._model.playlist},Object.defineProperty(e.prototype,"rendered",{get:function(){return this._model.rendered},enumerable:!0,configurable:!0}),e.prototype.setPlaylistPosition=function(t,e,n){this._playbackController.setPlaylistPosition(t,e,n)},e.prototype.sendPrefetchInfo=function(t){var e={url:t.url,source:t.source,latency:t.latency||"na",http_code:t.http_code||"na",resp_len:t.resp_len||"na",instrument:t.instrument||"na",perfInfo:t.perfInfo||"na",perfStack:t.perfStack||"na"};return!(!e.source||!e.url)&&(this._eventBus.publish(u.API_CALLED,e),!0)},e.prototype.removePlaylistItems=function(t,e){this._model.playlist.removeItems(t,e)},e.prototype.error=function(t){t&&this._eventBus.publish(u.ERROR,this._createConfigError(t.code,!1,t.msg))},Object.defineProperty(e.prototype,"docked",{get:function(){return!!this._model.rendered&&this._view.isDocked()},enumerable:!0,configurable:!0}),e.prototype.updateDockingConfig=function(t,e,n,i,r,o){this._model.rendered&&this._view.updateDockingConfig(t,e,n,i,r,o)},e.prototype.dockVideoPlayer=function(){this._model.rendered&&this._view.dockVideoPlayer()},e.prototype.undockVideoPlayer=function(t){this._model.rendered&&this._view.undockVideoPlayer(t)},Object.defineProperty(e.prototype,"startTime",{set:function(t){this._model.startTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentDate",{get:function(){return this._model.rendered?this._playbackController.getCurrentDate():0},enumerable:!0,configurable:!0}),e.prototype.getEventsDto=function(){return this._model.getEventsDto()},e.prototype.getPlayingItem=function(){return this._playbackController.getPlayingItem()},Object.defineProperty(e.prototype,"duration",{get:function(){return this._playbackController.getDuration()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawDuration",{get:function(){return this._playbackController.getRawDuration()},enumerable:!0,configurable:!0}),e.prototype._bindEvents=function(){var t=this;this._eventBus.addEventListener(u.ERROR,this._onError,this),this._eventBus.addEventListener(u.INFO,this._onError,this),this._eventBus.addEventListener(u.WARNING,this._onWarning,this),this._eventBus.addEventListener(u.START_SCREEN_CLICK,this._onStartScreenClick,this),this._eventBus.addEventListener(u.RELATED_ITEM_CLICK,this._onRelatedItemClick,this),this._eventBus.addEventListener(u.TOGGLE_PLAY_PAUSE,this._togglePlayPause,this),this._eventBus.addEventListener(u.CONTROLS_SEEK_START,this._onControlsSeekStart,this),this._eventBus.addEventListener(u.CONTROLS_SEEK_END,this._onControlsSeekEnd,this),this._eventBus.addEventListener(u.CONTROLS_SEEKING,this._onControlsSeeking,this),this._eventBus.addEventListener(u.PLAYBACK_REQUEST,this._onPlaybackRequest,this),this._eventBus.addEventListener(u.PLAYER_DIMENSION_CHANGE,this._onDimensionChange,this),this._eventBus.addEventListener(u.MEDIA_RELOAD_BEGIN,this._onMediaReloadBegin,this),this._eventBus.addEventListener(u.MEDIA_RELOAD_END,this._onMediaReloadEnd,this),this._eventBus.addEventListener(u.API.BITRATE_CHANGE,this._onBitrateChange,this),this._eventBus.addEventListener(u.KEYDOWN,this._onKeyDown,this),this._eventBus.addEventListener(u.BITRATE_LIST_CHANGED,this._onBitrateListChanged,this),this._eventBus.addEventListener(u.PTS_DISCONTINUITY,this._onPTSDiscontinuity,this),this._eventBus.addEventListener(u.RELOAD_FRAGMENT,this._onReloadFragment,this),this._eventBus.addEventListener(u.ER_READY,this._onER,this),this._eventBus.addEventListener(u.CONTENT_LOAD_FINISHED,this._onContentLoadFinished,this),this._eventBus.addEventListener(u.LIVE_RELOAD_MEDIA,this._onReloadMedia,this),this._model.waitingForUserTap&&this._eventBus.once(u.TOUCH_TO_PLAY_RESTRICTION_REMOVED,function(){t._model.waitingForUserTap=!1},this)},e.prototype._registerDefaultPlugins=function(){var t=this;this._defaultPlugins.push(new k.default),this._defaultPlugins.push(new N.default),this._defaultPlugins.push(new x.default),this._defaultPlugins.push(new P.default),this._defaultPlugins.push(new O.default),this._defaultPlugins.push(new w.default),this._defaultPlugins.push(new L.default),this._defaultPlugins.push(new M.default),this._defaultPlugins.push(new D.default),this._defaultPlugins.push(new B.default),this._defaultPlugins.forEach(function(e){t.registerPlugin(e)}),this._pluginManager.defaultPlugins=this._defaultPlugins},e.prototype._cleanupDefaultPlugins=function(){this._defaultPlugins.forEach(function(t){t.destroy()}),this._defaultPlugins=[]},e.prototype._publishToPlugin=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];for(var r=function(i){t(function(){try{i.onPlayerEvent.apply(i,[e].concat(n))}catch(t){console.log(i.mimetype+" has thrown error in method onPlayerEvent",t.message)}})},o=0,s=this._playerEventsListenerPlugins;o<s.length;o++){r(s[o])}},e.prototype._createRecoverer=function(){this._recoverer||(this._recoverer=new C.default(this._eventBus,this._model),this._setupRecovererEvents())},e.prototype._createVisibilityManager=function(){var t={pauseLiveVideo:this._config.pauseLiveVideo,pauseVODVideo:this._config.pauseVODVideo};this._visibilityManager=new R.default(t,this._eventBus,this._model)},e.prototype._setupVisibilityManagerEvents=function(){var t=this;this._visibilityManager.activate(),this._visibilityManager.on(R.VisibilityEvent.PLAY_MEDIA,function(){t.play({type:s.REQUEST_TYPES.API,action:s.REQUEST_TYPES.BACKGROUND})},this),this._visibilityManager.on(R.VisibilityEvent.PAUSE_MEDIA,function(){t.pause({type:s.REQUEST_TYPES.API,action:s.REQUEST_TYPES.BACKGROUND})},this),this._visibilityManager.on(R.VisibilityEvent.PAGE_VISIBILITY_CHANGED,function(e){t._eventBus.publish(u.PAGE_VISIBILITY_CHANGED,e)},this)},e.prototype._notifyVideoStarted=function(){this._notifedVideoStarted||(this._eventBus.publish(u.PROFILE_END,[u.METRICS.PLAYBACK_START,u.METRICS.INIT_TO_START,u.METRICS.CLICK_TO_START]),this._eventBus.publish(u.API.VIDEO_STARTED),this._notifedVideoStarted=!0),this._clearPlaybackTimeout()},e.prototype._togglePlayPause=function(){this._model.castState&&this._model.castState.connected||this._model.getState()===m.default.VIDEO&&(this._model.isPaused()?(this._playbackController.startPlayback({type:s.REQUEST_TYPES.CLICK,action:s.REQUEST_TYPES.PLAY}),this._eventBus.publish(u.CTRL_PLAYPAUSE,"play")):(this.pause({type:s.REQUEST_TYPES.CLICK,action:s.REQUEST_TYPES.PAUSE}),this._eventBus.publish(u.CTRL_PLAYPAUSE,"pause")))},e.prototype._onKeyDown=function(t){var e=t.keyCode,n="key-"+e;32!==e&&38!==e&&40!==e||(t.preventDefault(),this._eventBus.publish(u.API.UI_INTERACT,{srcElement:n}))},e.prototype._onCastConnectionChange=function(t,e){if(t)this._model.playbackState.isVideoPlaying()&&this._playbackController.pauseCurrent();else if(e.playlist_pos===this._model.playlist.position){var n=this._model.playlist.getCurrentItem();this._model.getState()===m.default.VIDEO&&n&&!n.isLive()&&this.seek(n.position),this.play()}else if(b.isNumber(e.playlist_pos)&&"unknown"!==e.playlist_pos)this.setPlaylistPosition(e.playlist_pos,!0);else if(e.media_uuid){var i=this._model.playlist.getItemPosition(e.media_uuid);this.setPlaylistPosition(i>-1?i:0,!0)}else this.play();this._view.syncViewState()},e.prototype._onPlaybackRequest=function(){this._setPlaybackTimeout(),this._createConvivaSession()},e.prototype._setPlaybackTimeout=function(){var t=this,e=this._model.playlist.getCurrentItem();!this._playbackTimeout&&e&&e.state!==c.ItemState.ERROR&&(this._playbackTimeout=window.setTimeout(function(){t._eventBus.publish(u.API.PLAYBACK_TIMEOUT,t._createStreamingError(a.WARNING_CODES.E_PLAYBACK_TIMEOUT,!0,"No playback after 10 seconds of requesting to play on player"))},1e4))},e.prototype._createConvivaSession=function(){var t=this._model.playlist.getCurrentItem();t&&t.rendererType===_.RendererType.HTML5_HLS&&this._eventBus.publish(u.CONVIVA_READY_FOR_SESSION_CREATION,t)},e.prototype._clearPlaybackTimeout=function(){this._playbackTimeout&&clearTimeout(this._playbackTimeout)},e.prototype._onDimensionChange=function(t){this._model.uiState.width=t.width,this._model.uiState.height=t.height,this._view&&this._view.controls&&this._view.controls.onPlayerResize(t)},e.prototype._onStartScreenClick=function(){i.userAgent.mobile&&g.default.autoplaySupported&&this._model.playbackState.mute&&!this._model.muteMode&&(this.mute=!1),this._eventBus.publish(u.CTRL_PLAYREQUEST,"ctp");var t={type:s.REQUEST_TYPES.CLICK,action:s.REQUEST_TYPES.CLICK};this._playbackController.startPlayback(t),this._view.getContentNode().focus(),g.default.hasLoadRestriction&&this._model.autoplay&&v.default&&(this._model.waitingForUserTap=!1)},e.prototype._onRelatedItemClick=function(t,e,n){var i,r=this._model.playlist,o={srcElement:"next-vid-"+e},a=-1===e?u.CTRL_REPLAY:u.CTRL_ENDSCREEN_VID;-1===e&&(o.srcElement="es-rpl"),e>-2&&this._eventBus.publish(u.API.UI_INTERACT,o),this._eventBus.publish(a,{vid:t,vindex:e});var l={type:s.REQUEST_TYPES.CONTINUOUS,action:n?s.REQUEST_TYPES.AUTOPLAY:s.REQUEST_TYPES.CLICK};i=r.getItemPosition(t),this.setPlaylistPosition(i,!0,l)},e.prototype._onError=function(t){var e=this;if(!this._recoverer||this._recoverer.shouldRenderErrorScreen(t)){this._eventBus.publish(u.ERR_NO_RECOVERY,t);try{throw new Error("Stack Trace")}catch(t){}this._model.errors.push(t),this._maybeSkip(function(){var t=e._model.firstCriticalError;t&&(e._playbackController.handleCriticalError(t),e._applyErrorFilters(t),e.disableCC(),e._view&&e._view.syncViewState())})}},e.prototype._onWarning=function(t,e){e&&this._onError(t)},e.prototype._onPTSDiscontinuity=function(t){this._eventBus.publish(u.WARNING,this._createStreamingError(a.PLAYER_CODES.E_PLAYER_PTS_DISCONTINUITY,!0,null,"consecutive frame time diference is "+t))},e.prototype._onReloadFragment=function(t){this._eventBus.publish(u.WARNING,this._createStreamingError(a.PLAYER_CODES.E_PLAYER_RELOAD_FRAGMENT,!0,null,t))},e.prototype._applyErrorFilters=function(t){var e=function(){!E.default.isFlashInstalled()&&i.userAgent.desktop&&(t.category=a.E_PLAYER,t.subcategory=a.PLAYER_CODES.E_PLAYER_NOT_ENABLED)};switch(t.category){case a.E_SAPI_ABSTRACT:case a.E_SAPI_STREAM:case a.E_SAPI_PLAYLIST:case a.E_SAPI_RELATED:case a.E_SAPI_POPULAR:switch(t.subcategory){case a.SAPI_CODES.E_SAPI_UNSUPPORTED_FORMAT:e();break;case a.INFO_CODES.E_SAPI_UNSUPPORTED_LIVE_ON_HTML:i.userAgent.android?(t.category=a.E_INFO,t.subcategory=a.INFO_CODES.E_PLAYER_ANDROID_CHROME_REQUIRED):e();break;case a.SAPI_CODES.E_SAPI_DRM_RESTRICTED:i.userAgent.desktop&&e()}break;case a.E_PLAYER:switch(t.subcategory){case a.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ENCRYPTED:e()}}},e.prototype._initiateAgeGate=function(){},e.prototype._handleIfCriticalAdError=function(t){if(t&&t.category===a.E_WARNING&&t.subcategory===a.WARNING_CODES.E_FLASH_CRASHED){var e=this._model.playbackState.rendererType;return e&&delete this._model.adsRendererTypes[e],!0}return!1},e.prototype._onControlsSeekStart=function(){this._model.isSeeking()||(this._model.setSeeking(!0),this._view.syncViewState())},e.prototype._onControlsSeekEnd=function(){this._model.isSeeking()&&(this._model.isPaused()||this._playbackController.playCurrent(),this._model.setSeeking(!1),this._view.syncViewState())},e.prototype._onControlsSeeking=function(t){this._model.castState&&this._model.castState.connected||this._playbackController.seekCurrent(t)},e.prototype._onBitrateChange=function(t){this._model.bitrate=t},e.prototype._onMediaReloadBegin=function(){this._toggleSpinner(!0)},e.prototype._onMediaReloadEnd=function(){this._toggleSpinner(!1)},e.prototype._toggleSpinner=function(t){this._model.setLoading(t),this._view.syncViewState()},e.prototype._onBitrateListChanged=function(t,e){this._model.bitrates=t,this._model.heights=e},e.prototype._onRecoveryStart=function(){this._model.isLoading()||(this._model.setLoading(!0),this._view.syncViewState());var t=this._model.playlist.getCurrentItem();t&&this._metadataController.recover(t),console.log("[debug][VDMS] Recovery Started")},e.prototype._onRecoveryMetadata=function(t){if(this._recoverer.recovering){var e=this._model.getState();this._playbackController.getCurrentTime()>0&&(this._model.startTime=this._playbackController.getCurrentTime()),this._recoverer.onRecoveryMetadataReady(),this._playbackController.handleSourceAvailable(t),t.recoveryStatus=c.ItemRecoveryStatus.RECOVERED,e===m.default.VIDEO&&this._playbackController.playCurrent(this._model.startTime),console.log("[debug][VDMS] Recovery updated metadata")}else t.recoveryStatus=c.ItemRecoveryStatus.NOT_RECOVERING},e.prototype._onER=function(t){},e.prototype._destroyRecoverer=function(){this._recoverer&&(this._recoverer.destroy(),this._recoverer=null)},e.prototype._maybeSkip=function(t){var e=this,n=this._model&&this._model.playlist&&this._model.playlist.getCurrentItem();switch(n&&n.is360Video()&&(this._model.skipOnError=l.SkipOnError.TIMEBASED),this._model.skipOnError){case l.SkipOnError.ALWAYS:this._maybeSkipImpl(t);break;case l.SkipOnError.TIMEBASED:t(),window.setTimeout(function(){e._maybeSkipImpl()},1e4);break;case l.SkipOnError.NEVER:default:t()}},e.prototype._maybeSkipImpl=function(t){var e=this._model.playlist.getNextPosition(!0,this._model.loop),n=this._model.playlist.position,i=this._model.autoplay||this._model.continuousPlay&&this._model.playbackState.hasStartedPlayback;-1!==e&&e!==n&&(this.setPlaylistPosition(e,i),this._view.syncViewState())},e.prototype._onContentLoadFinished=function(t){if(t){var e,n=this._model.playlist,i=n.getCurrentPosition(),r=n.getNextPosition(!0,this._model.loop);-1!==r&&r!==i&&(e=n.getMediaItemAt(r))&&(e.mayUpdateVideoSession(),this._eventBus.publish(u.RENDERER_PP_NEXT,e))}},e.prototype._onReloadMedia=function(){this._recoverer.recover(4)},e.prototype._createStreamingError=function(t,e,n,i){return A.default.createErr(a.ErrorGroup.Streaming,this._model.playbackState,e?a.E_WARNING:a.E_PLAYER,t,n,i)},e.prototype._createConfigError=function(t,e,n,i){return A.default.createErr(a.ErrorGroup.Configuration,this._model.playbackState,e?a.E_WARNING:a.E_PLAYER,t,n,i)},e.prototype._setupMediaStoreEvents=function(){var t=this,e=this._mediaStore;e.on(d.MediaStoreEvent.MEDIA_ITEM_ADDED,function(e){t._eventBus.publish(u.MEDIA_ITEM_ADDED,e)},this),e.on(d.MediaStoreEvent.MEDIA_ITEM_REMOVED,function(e){t._eventBus.publish(u.MEDIA_ITEM_REMOVED,e)},this)},e.prototype._buildPluginMediaItemProxy=function(t){return t?{id:t.id,duration:t.duration}:null},e.prototype._setupPlaybackControllerEvents=function(){var t=this,e=this._playbackController;e.on(I.PlaybackEvent.PLAY_CAST,function(){},this),e.on(I.PlaybackEvent.PAUSE_CAST,function(){},this),e.on(I.PlaybackEvent.SEEK_CAST,function(){},this),e.on(I.PlaybackEvent.PLAYBACK_ERROR_BEFORE_METADATA_READY,function(){t._eventBus.publish(u.INFO,t._createConfigError(a.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_PLAY_INITIATED_BEFORE_METADATA_READY,!0,"Cannot play before metadata is available"))},this),e.on(I.PlaybackEvent.PLAYLIST_NO_MORE_ITEM_TO_PLAY,function(){t._destroyRecoverer()},this),e.on(I.PlaybackEvent.PLAYBACK_LOADING,function(e){t._view.syncViewState(),t._model.fullscreen&&t._view.setFullscreen(!0)},this),e.on(I.PlaybackEvent.PLAYBACK_PAUSING,function(){t._view.syncViewState()},this),e.on(I.PlaybackEvent.AD_BREAK_STARTED,function(e){t._view.onAdBreakStarted(e),t._view.syncViewState(),t._playlistController.onAdBreakStarted(),t._eventBus.publish(u.AD_BREAK_STARTED,e)},this),e.on(I.PlaybackEvent.AD_BREAK_ENDED,function(e){t._view.onAdBreakEnded(e),t._view.syncViewState(),t._playlistController.onAdBreakEnded(),t._eventBus.publish(u.AD_BREAK_ENDED,e)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_CURRENT,function(e){t._view.onAdBreakItemCurrent(e),t._eventBus.publish(u.AD_BREAK_ITEM_CURRENT,e)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_STARTED,function(e){t._notifyVideoStarted(),t._view.syncViewState(),t._view.onAdBreakItemStarted(e),t._ccController.onAdPlaybackStarted(e)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_SKIPPED,function(e){t._eventBus.publish(u.AD_BREAK_ITEM_SKIPPED,e)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_RESUMED,function(e){t._eventBus.publish(u.PLAYBACK_RESUMED,e?e.id:null)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_ENDED,function(e){t._view.onAdBreakItemEnded(e),t._eventBus.publish(u.AD_BREAK_ITEM_ENDED,e)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_STOPPED,function(t){},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_PLAYBACK_PROGRESS,function(e){t._view.onAdPlaybackProgress(e),t._publishToPlugin(f.PluginPlayerEvent.AD_PLAYBACK_PROGRESS,{currentTime:t._model.playbackState.currentTime,duration:t._model.playbackState.duration}),t._ccController.onAdPlaybackProgress(e)},this),e.on(I.PlaybackEvent.AD_BREAK_ITEM_ERROR,function(e){t._eventBus.publish(u.AD_BREAK_ITEM_ERROR,e)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_CURRENT,function(e){t._view.onMediaItemCurrent(e),t._eventBus.publish(u.MEDIA_ITEM_CURRENT,e)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_PLAYBACK_STARTED,function(e){t._notifyVideoStarted(),t._view.onMediaItemPlaybackStarted(e),t._ccController.onMediaItemPlaybackStarted(),t._playlistController.onMediaItemPlaybackStarted(),t._publishToPlugin(f.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_STARTED,t._buildPluginMediaItemProxy(e)),t._eventBus.publish(u.PLAYBACK_STARTED)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_PLAYBACK_RESUMED,function(e){t._eventBus.publish(u.PLAYBACK_RESUMED,e?e.id:null)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_PLAYBACK_PROGRESS,function(e){t._view.syncViewState(),t._view.onMediaItemPlaybackProgress(e),e&&e.currentTime&&t._publishToPlugin(f.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_PROGRESS,e.currentTime,t._buildPluginMediaItemProxy(e.playingItem))},this),e.on(I.PlaybackEvent.PLAYBACK_RESUME,function(e){t._eventBus.publish(u.PLAYBACK_RESUMED,e?e.id:null),t._view.syncViewState()},this),e.on(I.PlaybackEvent.PLAYBACK_RESUME_VPAID,function(){t._eventBus.publish(u.RESUME_VPAID),t._view.syncViewState()},this),e.on(I.PlaybackEvent.PLAYBACK_PAUSE_VPAID,function(){t._eventBus.publish(u.PAUSE_VPAID)},this),e.on(I.PlaybackEvent.PLAYBACK_ERROR,function(e){t._eventBus.publish(u.PLAYBACK_ERROR,e)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_ERROR,function(e,n){t._eventBus.publish(u.MEDIA_ITEM_ERROR,e)},this),e.on(I.PlaybackEvent.WAITING,function(e){if(e){if(t._recoverer&&t._recoverer.toggleRecoverer(e),e.value&&!e.ignoreBuffering)t._eventBus.publish(u.PROFILE_START,u.METRICS.PLAYBACK_STALLED);else if(!e.ignoreBuffering){t._eventBus.publish(u.PROFILE_END,u.METRICS.PLAYBACK_STALLED);var n=t._profiler.getItem(u.METRICS.PLAYBACK_STALLED);n&&t._eventBus.publish(u.PLAYBACK_STALLED,n.timeDiff?n.timeDiff/1e3:"")}var i=!0===e.value?u.API.BUFFERING_START:u.API.BUFFERING_END;t._eventBus.publish(i)}},this),e.on(I.PlaybackEvent.END_FULLSCREEN,function(){t._view.setFullscreen(!1)},this),e.on(I.PlaybackEvent.PLAYBACK_ERROR_NO_VALID_STREAM,function(){t._eventBus.publish(u.ERROR,A.default.createErr(a.ErrorGroup.Service,t._model.playbackState,a.E_SAPI_STREAM,a.SAPI_CODES.E_SAPI_NO_PLAYABLE_STREAMS))},this),e.on(I.PlaybackEvent.PLAYBACK_ERROR_NO_RENDERER,function(e){t._eventBus.publish(u.ERROR,e)},this),e.on(I.PlaybackEvent.PLAYBACK_SYNC_VIEW,function(){t._view.syncViewState()},this),e.on(I.PlaybackEvent.PLAYBACK_START_BLOCKED,function(){console.warn("Controller: playback start blocked by browser"),t._model.playbackState.paused=!0,t._model.playbackState.loading=!1,t._view.syncViewState(),t._eventBus.publish(u.VideoEvent.PAUSE)},this),e.on(I.PlaybackEvent.RENDERER_SWITCH,function(e,n){i.userAgent.mobile&&t._view.getFullscreen()&&e!==n&&n&&n.exitFullScreen&&n.exitFullScreen(),t._view.syncViewState()},this),e.on(I.PlaybackEvent.RENDERER_TIMEOUT,function(){t._view.syncViewState(),(i.userAgent.safari||i.userAgent.firefox)&&t._view.setBlockedFlashState()},this),e.on(I.PlaybackEvent.RENDERER_CREATED,function(e){t._view.addRendererNode(e.create())},this),e.on(I.PlaybackEvent.MEDIA_ITEM_PLAYBACK_STOPPED,function(e){t._recoverer&&t._recoverer.stopTimers(),t._view.syncViewState(),t._model.continuousPlay||t._view.setFullscreen(!1),t._eventBus.publish(u.MEDIA_ITEM_ENDED,e),t._eventBus.publish(u.PLAYBACK_ENDED,e.id,!1)},this),e.on(I.PlaybackEvent.PLAYLIST_POSITION_HAS_CHANGED,function(e){e&&(t._view.resetState(),t._eventBus.publish(u.API.PLAYLIST_POSITION_CHANGE,t._model.playlist.position))},this),e.on(I.PlaybackEvent.PLAYBACK_ERROR_INCONSISTENT_METADATA,function(){t._eventBus.publish(u.WARNING,t._createStreamingError(a.WARNING_CODES.E_LIVE_PLAYBACK_COMPLETE,!0),!0)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_IS_LOADED,function(e){t._createRecoverer(),t._view.onMediaItemLoaded(e),t._ccController&&t._ccController.onMediaItemLoaded(e);var n=e.customConfig,i=t._config.nielsenConfig;(n&&n.nielsenRequired||i&&i.enableNielsen)&&t._eventBus.publish(u.API.NIELSEN_REQUIRED),t._eventBus.publish(u.MEDIA_ITEM_METADATA,e)},this),e.on(I.PlaybackEvent.SEEKING,function(){t._view.syncViewState(),t._eventBus.publish(u.VideoEvent.SEEKING)},this),e.on(I.PlaybackEvent.SEEKED,function(){t._view.syncViewState(),t._eventBus.publish(u.API.PLAYBACK_SEEK_COMPLETE)},this),e.on(I.PlaybackEvent.MEDIA_ITEM_PLAYBACK_ENDED,function(e,n){t._view.destroyAdsOverlay(),t._ccController.onMediaItemPlaybackEnded(),t._eventBus.publish(u.MEDIA_ITEM_ENDED,e),t._eventBus.publish(u.PLAYBACK_ENDED,e.id,n.ended),t._publishToPlugin(f.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_ENDED,t._buildPluginMediaItemProxy(e))},this),e.on(I.PlaybackEvent.STALLED,function(){t._eventBus.publish(u.VideoEvent.STALLED)},this),e.on(I.PlaybackEvent.LOADSTART,function(){t._eventBus.publish(u.VideoEvent.LOADSTART)},this),e.on(I.PlaybackEvent.LOADEDDATA,function(){t._eventBus.publish(u.VideoEvent.LOADEDDATA)},this),e.on(I.PlaybackEvent.LOADEDMETADATA,function(){t._eventBus.publish(u.VideoEvent.LOADEDMETADATA)},this),e.on(I.PlaybackEvent.PLAY,function(){t._eventBus.publish(u.VideoEvent.PLAY)},this),e.on(I.PlaybackEvent.PLAYING,function(e){t._view.syncViewState(),t._eventBus.publish(u.VideoEvent.PLAYING),console.log("[debug][VDMS] Playing")},this),e.on(I.PlaybackEvent.PAUSE,function(){t._view.syncViewState(),t._eventBus.publish(u.VideoEvent.PAUSE)},this),e.on(I.PlaybackEvent.VOLUMECHANGE,function(){t._eventBus.publish(u.VideoEvent.VOLUMECHANGE)},this),e.on(I.PlaybackEvent.SRC_SWITCHING,function(){t._eventBus.publish(u.VideoEvent.SRC_SWITCHING)},this),e.on(I.PlaybackEvent.SRC_SWITCHED,function(){t._eventBus.publish(u.VideoEvent.SRC_SWITCHED)},this),e.on(I.PlaybackEvent.TIMEUPDATE,function(e){t._eventBus.publish(u.VideoEvent.TIMEUPDATE,e&&e.currentTime)},this),e.on(I.PlaybackEvent.CLICK,function(){if(t._eventBus.publish(u.API.UI_INTERACT,{srcElement:"video-click"}),i.userAgent.desktop&&t._view.controls)if(t._model.playbackState.rendererType===_.RendererType.FLASH||t._model.playbackState.rendererType===_.RendererType.FLASH_SIMPLE){var e=t._model.isPaused()?"play":"pause";t._eventBus.publish(u.CTRL_PLAYPAUSE,e),t._view.setKeyboardFocus()}else t._togglePlayPause()},this),e.on(I.PlaybackEvent.PLAYBACK_PROGRESS,function(e){var n=e.currentItem,i=e.currentTime,r=e.duration,o=e.buffered,s=t._view.getClientVideoDimension();t._model.playerWidth!==s.width&&t._model.playerHeight!==s.height&&(t._model.playerWidth=s.width,t._model.playerHeight=s.height,t._eventBus.publish(u.PLAYER_DIMENSION_CHANGE,{width:t._model.playerWidth,height:t._model.playerHeight})),t._eventBus.publish(u.PLAYBACK_PROGRESS,n.id,i,r,o)},this),e.on(I.PlaybackEvent.PLAYBACK_NEED_MEDIA_ITEM_METADATA,function(e){t._metadataController.loadItem(e)},this),e.on(I.PlaybackEvent.PLAYBACK_NEED_MEDIA_ITEM_SOURCE,function(e){t._metadataController.loadSource(e),t._eventBus.publish(u.MEDIA_ITEM_NEED_SOURCE,e)},this),e.on(I.PlaybackEvent.AD_BREAK_NEED_RESOLVE,function(t,e){},this),e.on(I.PlaybackEvent.AD_METRICS,function(e){t._eventBus.publish(u.AD_METRICS,e)},this),e.on(I.PlaybackEvent.CREATE_OVERLAY_CONTAINER,function(e){e(t._view.createAdsOverlay())},this),this._setupProfilerEvents(e)},e.prototype._setupViewEvents=function(){var t=this,e=this._view;e.on(S.ViewEvent.SKIP_AD_REQUESTED,function(){var e=t.getPlayingItem();e&&A.default.getPlaybackMode(e)===_.PlaybackMode.AD&&t._playbackController.skipAd()},this),e.on(S.ViewEvent.SYNC_PLAYBACK_STATE,function(){t._playbackController.syncPlaybackState()},this),e.on(S.ViewEvent.SYNC_ENTER_FULLSCREEN,function(){t._playbackController.enterFS()},this),e.on(S.ViewEvent.SYNC_EXIT_FULLSCREEN,function(){t._playbackController.exitFS()},this),e.on(S.ViewEvent.SYNC_SHOW_AIRPLAY_TARGET_MENU,function(){t._playbackController.showAirplayTargetMenu()},this),e.on(S.ViewEvent.SEEK,function(e){t._playbackController.seekCurrent(e)},this),e.on(S.ViewEvent.SET_VOLUME,function(e){t.volume=e},this),e.on(S.ViewEvent.SET_MUTE,function(e){t.mute=e},this),e.on(S.ViewEvent.TOGGLE_CC,function(e,n){t._eventBus.publish(u.CCEvent.UI_TOGGLE,e,n),t._ccController.toggleFromUI(e,n)},this),e.on(S.ViewEvent.SET_AUDIO_LANGUAGE,function(e,n){t._eventBus.publish(u.CONTROLS_AUDIO_CHANGE,e,n);var i=t._model.playlist.getCurrentItem();i&&i.setCurrLanguage(e),t._playbackController.setAudioLanguage(e)},this),e.on(S.ViewEvent.UI_INTERACT,function(e){t._eventBus.publish(u.API.UI_INTERACT,e)},this),e.on(S.ViewEvent.TOGGLE_PLAY_PAUSE,function(){t._model.isPaused()?t._playbackController.startPlayback():t._playbackController.pause()},this),e.on(S.ViewEvent.START_SCREEN_CLICK,function(){t._eventBus.publish(u.START_SCREEN_CLICK),t._playbackController.startPlayback()},this),e.on(S.ViewEvent.AD_CLICKED,function(){t._eventBus.publish(u.AD_BREAK_ITEM_CLICKED)},this),e.on(S.ViewEvent.CC_LANGUAGE_CHANGE,function(e){t._ccController.onLanguageChange(e)},this),e.on(S.ViewEvent.CC_STYLE_CHANGE,function(e){t._ccController.updateCCStyle(),e&&t._eventBus.publish(u.CCEvent.UPDATE_STYLE,e)},this),e.on(S.ViewEvent.OPSS_VISIBILITY_CHANGED,function(e,n){t._eventBus.publish(u.OPSS_VISIBILITY_CHANGED,e,n)},this)},e.prototype._setupRecovererEvents=function(){var t=this,e=this._recoverer;e.on(u.ERROR,function(e){t._eventBus.publish(u.ERROR,e)},this),e.on(u.WARNING,function(e){t._eventBus.publish(u.WARNING,e)},this),e.on(C.RecovererEvent.RECOVERY_START,this._onRecoveryStart,this),e.on(C.RecovererEvent.RECOVERY_METADATA_READY,function(){t._eventBus.publish(u.RECOVERY_METADATA_READY)},this)},e.prototype._setupCCControllerEvents=function(){var t=this,e=this._ccController;e.on(r.CCControllerEvent.CC_AVAILABILITY_UPDATE,function(e){t._view.updateClosedCaptionUI(e)},this),e.on(r.CCControllerEvent.CC_LIST_FETCHED,function(e){t._view.controls.updateAvailableLanguages(e)},this),e.on(r.CCControllerEvent.CC_LIST_FETCHED_MOBILE,function(e){t._playbackController.enableMobileNativeCC(e)},this),e.on(r.CCControllerEvent.TOGGLE_SIMPLE_CC_CONTROLS,function(t){},this)},e.prototype._setupMetadataControllerEvents=function(){var t=this,e=this._metadataController;e.on(u.ERROR,this._onError,this),e.on(T.MetadataEvent.METADATA_AVAILABLE,function(e){t._model.playlist.getCurrentItem().equals(e)&&t._view&&t._view.syncViewState(),t._eventBus.publish(u.METADATA_AVAILABLE,e.id),t._playerReadyEventFired||(t._playerReadyEventFired=!0,t._eventBus.publish(u.API.PLAYER_READY)),t._playlistController&&t._playlistController.onMediaItemLoaded()},this),e.on(T.MetadataEvent.SOURCE_AVAILABLE,function(e){t._onSourceMetadataAvailable(e)},this),e.on(T.MetadataEvent.SOURCE_LOAD_FAILED,function(e){t._onError(e),t._recoverer.onMetadataLoadFailed()},this),e.on(T.MetadataEvent.API_INFO_AVAILABLE,function(e){t._eventBus.publish(u.API_CALLED,e)},this),this._setupProfilerEvents(this._metadataController)},e.prototype._setupProfilerEvents=function(t){var e=this;[u.PROFILE_START,u.PROFILE_END].forEach(function(n){t.addEventListener(n,function(t){e._eventBus.publish(n,t)},e)})},e.prototype._onSourceMetadataAvailable=function(t){this._isRecovering(t)?this._onRecoveryMetadata(t):this._playbackController.handleSourceAvailable(t)},e.prototype._isRecovering=function(t){var e=this._model.playlist.getCurrentItem();return t.isRecovering()&&e&&e.equals(t)},e}();e.default=U}).call(this,n(32).setImmediate)},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var i,r=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?i=function(t){e.nextTick(function(){c(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&c(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),i=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},i=function(e){t.port2.postMessage(e)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var t=a.documentElement;i=function(e){var n=a.createElement("script");n.onreadystatechange=function(){c(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():i=function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var s={callback:t,args:e};return o[r]=s,i(r),r++},u.clearImmediate=l}function l(t){delete o[t]}function c(t){if(s)setTimeout(c,0,t);else{var e=o[t];if(e){s=!0;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(n,i)}}(e)}finally{l(t),s=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(30),n(146))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,l=[],c=!1,d=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&p())}function p(){if(!c){var t=a(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++d<e;)u&&u[d].run();d=-1,e=l.length}u=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function _(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new f(t,e)),1!==l.length||c||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=_,r.addListener=_,r.once=_,r.off=_,r.removeListener=_,r.removeAllListeners=_,r.emit=_,r.prependListener=_,r.prependOnceListener=_,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,n){(function(e){var n;n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(this,n(30))},function(t,e){t.exports=function(t){var e=n.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var n=Object.prototype.toString},function(t,e,n){var i=n(150),r=n(151);t.exports=function(t){if(!t)return{};var e={};return r(i(t).split("\n"),function(t){var n=t.indexOf(":"),r=i(t.slice(0,n)).toLowerCase(),o=i(t.slice(n+1));void 0===e[r]?e[r]=o:!function(t){return"[object Array]"===Object.prototype.toString.call(t)}(e[r])?e[r]=[e[r],o]:e[r].push(o)}),e}},function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}},function(t,e,n){"use strict";var i=n(152),r=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){if(!i(e))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=n),"[object Array]"===r.call(t)?function(t,e,n){for(var i=0,r=t.length;i<r;i++)o.call(t,i)&&(null==n?e(t[i],i,t):e.call(n,t[i],i,t))}(t,e,s):"string"==typeof t?function(t,e,n){for(var i=0,r=t.length;i<r;i++)null==n?e(t.charAt(i),i,t):e.call(n,t.charAt(i),i,t)}(t,e,s):function(t,e,n){for(var i in t)o.call(t,i)&&(null==n?e(t[i],i,t):e.call(n,t[i],i,t))}(t,e,s)}},function(t,e,n){"use strict";var i=Function.prototype.toString,r=/^\s*class\b/,o=function(t){try{var e=i.call(t);return r.test(e)}catch(t){return!1}},s=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(a)return function(t){try{return!o(t)&&(i.call(t),!0)}catch(t){return!1}}(t);if(o(t))return!1;var e=s.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var r in i)n.call(i,r)&&(t[r]=i[r])}return t};var n=Object.prototype.hasOwnProperty},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(43),o=n(157),s=function(){function t(t){for(var e in this._pluginManager=t,this._commandMap={},this._eventKeys={},r.CmdName)if(r.CmdName.hasOwnProperty(e)){var n=r.CmdName[e];this._commandMap[n]={}}}return t.prototype.destroy=function(){this.removeAllCommands(),this._commandMap={}},t.prototype.executeCommand=function(t,e,n){var i=this.createCommand(t,e,n);return i&&i.execute(),i},t.prototype.createCommand=function(t,e,n){var s;try{(s=o.create(t,e,n))&&(s.pluginManager=this._pluginManager)}catch(t){console.error("[CommandManager] Could not create command. Error = "+t.toString()),s=null}if(!s)return null;for(var a in s.key=i.default.guid(),r.CmdEvent)if(r.CmdEvent.hasOwnProperty(a)){var u=r.CmdEvent[a],l="on"+t+u;n[l]&&(this._eventKeys[u+t+s.key]=s.addEventListener(u,n[l],n))}return this._commandMap[t][s.key]=s,s},t.prototype.removeCommand=function(t){if(t){var e=this._commandMap[t.cmdName];if(e[t.key]===t){if(delete e[t.key],t.client)for(var n in r.CmdEvent)if(r.CmdEvent.hasOwnProperty(n)){var i=r.CmdEvent[n],o="on"+t.cmdName+i;t.client[o]&&(t.removeEventListener(i,this._eventKeys[i+t.cmdName+t.key]),delete this._eventKeys[i+t.cmdName+t.key])}t.destroy()}}},t.prototype.removeRelatedCommands=function(t){if(this._commandMap.hasOwnProperty(t)){var e=this._commandMap[t];for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i&&this.removeCommand(i)}}},t.prototype.removeAllCommands=function(){for(var t in this._commandMap)this._commandMap.hasOwnProperty(t)&&this.removeRelatedCommands(t)},t.prototype.getCommand=function(t){var e=this._commandMap[t];if(!e)return null;var n=Object.keys(e);return n.length<1?null:e[n[n.length-1]]},t}();e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),o=n(15),s=n(7),a=n(0),u=n(59),l=n(43),c=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.cmdName=l.CmdName.CMD_METADATA_LOAD,i._loading=!1,i._destroyed=!1,i}return i(e,t),e.prototype.destroy=function(){this._destroyed=!0,this.cancel(),t.prototype.destroy.call(this)},e.prototype.execute=function(){if(!this._loading&&!this._destroyed){var t=this.data,e=t.autoplay,n=t.failoverCount,i=t.gdprConsent,u=t.mimetype,c=t.mediaItemDataArr,d=t.rendererCapabilities,h=t.rendererTypes,p=t.sessionId,f=t.thumbnailDimensions,_=t.tryCount,m=this._pluginManager.getPlugin(s.PluginType.METADATA,u),y={autoplay:e,failoverCount:n,gdprConsent:i,rendererCapabilities:d,rendererTypes:h,sessionId:p,thumbnailDimensions:f,tryCount:_};if(m)this._plugin=m,this._loading=!0,this.publish(l.CmdEvent.CMD_PROGRESS,this,c,o.ItemState.FETCHING),m.resolve(c,y,this);else{var v="No metadata plugin found for mimetype = "+u;console.warn("[MetadataLoadCommand] "+v);var g=a.default.createErr(r.ErrorGroup.Service,null,r.E_PLAYER,r.PLAYER_CODES.E_NO_PLUGIN_FOUND,v);this.publish(l.CmdEvent.CMD_ERROR,this,g)}}},e.prototype.cancel=function(){this._plugin&&this._loading&&(this._plugin.cancel(),this._loading=!1)},e.prototype.onProgress=function(t){this._loading&&!this._destroyed&&this.publish(l.CmdEvent.CMD_PROGRESS,this,t)},e.prototype.onComplete=function(t){this._loading&&!this._destroyed&&(this._loading=!1,this.publish(l.CmdEvent.CMD_COMPLETE,this,t))},e.prototype.onError=function(t){if(this._loading&&!this._destroyed&&(this._loading=!1,t.code&&t.code.length)){var e=a.default.createErr(r.ErrorGroup.Service,null,r.E_PLAYER,r.PLAYER_CODES.E_PLAYER_CMS_XHR_REQUEST_RESPONSE_NOT_RECEIVED,t.message);this.publish(l.CmdEvent.CMD_ERROR,this,e)}},e.prototype.onApiCallInfo=function(t){t&&this.publish(l.CmdEvent.CMD_INFO,this,t)},e}(u.default);e.default=c},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),o=n(15),s=n(7),a=n(0),u=n(59),l=n(43),c=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.cmdName=l.CmdName.CMD_SOURCE_METADATA_LOAD,i._loading=!1,i._destroyed=!1,i}return i(e,t),e.prototype.destroy=function(){this._destroyed=!0,this.cancel(),t.prototype.destroy.call(this)},e.prototype.execute=function(){if(!this._loading&&!this._destroyed){var t=this.data,e=t.autoplay,n=t.failoverCount,i=t.gdprConsent,u=t.mimetype,c=t.mediaItemDataArr,d=t.rendererCapabilities,h=t.rendererTypes,p=t.sessionId,f=t.recovering,_=t.thumbnailDimensions,m=t.tryCount,y=this._pluginManager.getPlugin(s.PluginType.SOURCE_METADATA,u),v={autoplay:e,failoverCount:n,gdprConsent:i,rendererCapabilities:d,rendererTypes:h,sessionId:p,thumbnailDimensions:_,tryCount:m};if(y)this._plugin=y,this._loading=!0,this.publish(l.CmdEvent.CMD_PROGRESS,this,c,o.SourceState.FETCHING),!0===f?y.recover(c[0],v,this):y.resolve(c,v,this);else{var g="No source metadata plugin found for mimetype = "+u;console.warn("[SourceMetadataLoadCommand] "+g);var E=a.default.createErr(r.ErrorGroup.Service,null,r.E_PLAYER,r.PLAYER_CODES.E_NO_PLUGIN_FOUND,g);this.publish(l.CmdEvent.CMD_ERROR,this,E)}}},e.prototype.cancel=function(){this._plugin&&this._loading&&(this._plugin.cancel(),this._loading=!1)},e.prototype.onProgress=function(t){this._loading&&!this._destroyed&&this.publish(l.CmdEvent.CMD_PROGRESS,this,t)},e.prototype.onComplete=function(t){this._loading&&!this._destroyed&&(this._loading=!1,this.publish(l.CmdEvent.CMD_COMPLETE,this,t))},e.prototype.onError=function(t){if(this._loading&&!this._destroyed&&(this._loading=!1,t.code&&t.code.length)){var e=a.default.createErr(r.ErrorGroup.Service,null,r.E_PLAYER,t.code,t.message);this.publish(l.CmdEvent.CMD_ERROR,this,e)}},e.prototype.onApiCallInfo=function(t){t&&this.publish(l.CmdEvent.CMD_INFO,this,t)},e}(u.default);e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(43);e.create=function(t,e,n){var r=i[t+"Command"];return r?new r(e,n):null}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=n(0),o=n(38),s=function(){function t(t,e,n,i){var s=this;this._mediaItem=t,e.adBreakId=e.adBreakId||r.default.generateGuid(),this._rawAdBreakData=r.default.deepCopy(e),this._adRendererTypes=n,this._capabilities=i,this.adBreakId=e.adBreakId,Array.isArray(e.adBreakItems)&&(this.adBreakItems=e.adBreakItems.map(function(t){return new o.default(s,t,n,i)})),this._duration=e.duration||0,0===this._duration&&this.adBreakItems&&this.adBreakItems.forEach(function(t){s._duration+=t.duration||0}),this.customInfo=e.customInfo,this.startOffset=e.startOffset,this.type=e.type,this.mimetype=e.mimetype||"",this.backToLiveDuration=e.backToLiveDuration||0,this.startTime=e.startTime||0,this.active=e.active||!0}return Object.defineProperty(t.prototype,"mediaItem",{get:function(){return this._mediaItem},enumerable:!0,configurable:!0}),t.prototype.appendAdBreakItems=function(t){var e=this;t.forEach(function(t){if(!e._isBreakItemExist(t.adBreakItemId)){var n=new o.default(e,t,e._adRendererTypes,e._capabilities);e.adBreakItems.push(n),e._duration+=n.duration||0}})},t.prototype.insertAdBreakItems=function(t,e){var n=this,i=e;t.forEach(function(t){if(!n._isBreakItemExist(t.adBreakItemId)){var e=new o.default(n,t,n._adRendererTypes,n._capabilities);n.adBreakItems.splice(i,0,e),n._duration+=e.duration||0,i++}})},t.prototype.removeAdBreakItems=function(t){var e,n=this,i=this.adBreakItems.length;t.forEach(function(t){n._isBreakItemExist(t.adBreakItemId)&&function(t){for(e=0;e<i;e++)if(n.adBreakItems[e].adBreakItemId===t.adBreakItemId){n._duration-=t.duration||0,n._duration<0&&(n._duration=0),n.adBreakItems.splice(e,1);break}}(t)})},t.prototype.setActive=function(t){i.isBoolean(t)&&(this.active=t)},t.prototype.backToLive=function(){},t.prototype.breakNow=function(){},Object.defineProperty(t.prototype,"rawItemData",{get:function(){return r.default.deepCopy(this._rawAdBreakData)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!0,configurable:!0}),t.prototype.hasResolved=function(){return!(!this.adBreakItems||0===this.adBreakItems.length)},t.prototype._isBreakItemExist=function(t){return this.adBreakItems.some(function(e){return e.adBreakItemId===t})},t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(27),o=n(5),s=document.createElement("video"),a=function(){var t=!1;try{s.canPlayType&&!(t=r.default.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, mp4a.40.2"',s))&&i.userAgent.tv&&(t=r.default.canPlayType("application/vnd.apple.mpegurl",s))}catch(e){t=!1}return i.userAgent.tv&&(window.noHLS&&(t=!1),window.hls&&(t=!0)),t}(),u=function(){var t=!1;try{t=r.default.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"',s)}catch(e){t=!1}return t}(),l=function(){var t=!1;try{t=r.default.canPlayType('video/webm; codecs="vp8, vorbis"',s)}catch(e){t=!1}return i.userAgent.tv&&(t=!1),t}(),c=!i.userAgent.safari,d=function(){var t=[];return i.userAgent.android&&t.push("mp4b"),(a||i.userAgent.android&&r.default.isAndroidVersionAbove4())&&t.push("m3u8"),(c||i.userAgent.android&&r.default.isAndroidVersionAbove4())&&t.push("mpd"),u&&t.push("mp4"),l&&t.push("webm"),t}(),h=function(){var t=d.slice(),e=t.indexOf("mp4b");return e>-1&&t.splice(e+1,0,"mp4"),t.push(""),t}(),p=function(){function t(){}return t.get=function(t){var e=null;switch(t){case o.RendererType.HTML5_HLS:case o.RendererType.HTML5_HLS_360:(e={acceptedProtocols:["http"],preferredFormats:[],acceptedFormats:[],is360Renderer:t===o.RendererType.HTML5_HLS_360,canDecryptAES:!0}).preferredFormats=["mpd","m3u8"],e.acceptedFormats=["mpd","m3u8","m3u8_playlist","m3u8:fmp4"],(i.userAgent.desktop&&!(i.userAgent.firefox&&!i.userAgent.ie&&i.userAgent.firefox<=48)||i.userAgent.android&&i.userAgent.chrome>=53)&&e.preferredFormats.splice(1,0,"fmp4");break;case o.RendererType.HTML5_RAW:case o.RendererType.HTML5_RAW_360:(e={acceptedProtocols:["http"],preferredFormats:d,acceptedFormats:h,is360Renderer:t===o.RendererType.HTML5_RAW_360,canDecryptAES:!0}).preferredFormats=e.preferredFormats.filter(function(t){return"mpd"!==t}),e.acceptedFormats=e.acceptedFormats.filter(function(t){return"mpd"!==t});break;case o.RendererType.HTML5_TV:case o.RendererType.HTML5_TV_TIZEN:case o.RendererType.HTML5_TV_ORSAY:e={acceptedProtocols:["http"],preferredFormats:["m3u8","mp4"],acceptedFormats:["m3u8","m3u8_playlist","mp4"],is360Renderer:!1,canDecryptAES:!0};break;case o.RendererType.FLASH:e={acceptedProtocols:["http","rtmp"],preferredFormats:["m3u8","mp4","flv","f4m","x-flv"],acceptedFormats:["m3u8","m3u8_playlist","mp4","flv","f4m","x-flv",""],is360Renderer:!1,canDecryptAES:!1};break;case o.RendererType.FLASH_SIMPLE:e={acceptedProtocols:["http"],preferredFormats:["mp4","flv","x-flv"],acceptedFormats:["mp4","flv","x-flv",""],is360Renderer:!1,canDecryptAES:!1};break;case o.RendererType.EXTERNAL:e={acceptedProtocols:[],preferredFormats:[],acceptedFormats:[],is360Renderer:!1,canDecryptAES:!1}}return e},t}();e.default=p},function(t,e,n){"use strict";t.exports=s;var i=n(161),r=n(24),o=n(217);function s(t,e){var n=this;n._opts=e||{},n._node="string"==typeof t?document.querySelector(t):t||null,Object.defineProperty(n,"error",{enumerable:!0,get:function(){return n._context?n._context.error:null}}),o.apply()}s.prototype.setSrc=function(t){if(!this._node)throw new r.Error(r.ERR_API_NO_NODE).error;if(t){if(t!==this._metadata){this._metadata=t,this._context&&this.unload();try{this._context=new i(window,this._node,this._metadata,this._opts)}catch(t){console.error("[HlsPlayer][setSrc] Exception = "+t.message+" stack = "+t.stack)}}}else this._node.src=""},s.prototype.getSegInfo=function(){try{return this._context?this._context.getSegInfo():null}catch(t){return console.error("[HlsPlayer][getSegInfo] Exception = "+t.message+" stack = "+t.stack),null}},s.prototype.setQuality=function(t){try{this._context.setABRMode(t)}catch(t){console.error("[HlsPlayer][setQuality] Exception = "+t.message+" stack = "+t.stack)}},s.prototype.setAudioLanguage=function(t){try{this._context.setAudioLanguage(t)}catch(t){console.error("[HlsPlayer][setAudioLanguage] Exception = "+t.message+" stack = "+t.stack)}},s.prototype.unload=function(){this._context&&this._context.destroy(),this._context=null},s.prototype.play=function(t){this._context&&this._context.play(t)},s.prototype.pause=function(){this._context&&this._context.pause()},s.prototype.preload=function(t){this._context&&this._context.preload(t)},s.prototype.getCurrentDate=function(){if(this._context)return this._context.getCurrentDate()||null},s.prototype.destroy=function(){this._context&&this._context.destroy(),this._context=null,this._metadata=null,this._opts=null,this._node=null}},function(t,e,n){"use strict";t.exports=l;var i=n(162),r=n(16),o=n(12),s=n(3),a=n(66).userAgent,u=n(216);function l(t,e,n,i){var o=this;r.call(o,o.constructor.name),o.node=e,o.window=t,o.mediaSource=new t.MediaSource,o._jobQueue=[],o.node.mediaKeys?(o.node.src="",o.node.setMediaKeys(null).then(function(){o._init(t,e,n,i)})):o._init(t,e,n,i)}s.inherits(l,r),l.prototype._init=function(t,e,n,r){this.node.src=t.URL.createObjectURL(this.mediaSource),(r=r||{}).userAgent=a,r.inWorkerScope=!1,r.metadata=n,this.appModel=this.create(u,r),this.controller=this.create(i,n),this.node.load(),this._flushJobQueue()},l.prototype.create=function(){var t=Array.prototype.slice.call(arguments),e=t.shift(),n=Object.create(e.prototype);return n._context=this,e.apply(n,t),n},l.prototype.sendEvent=function(t,e){this.publish(t,e),t&&o.ExternalEvents.indexOf(t)>=0&&this.node.dispatchEvent(this._createCustomEvent(t,e))},l.prototype.getSegInfo=function(){return this.controller?this.controller.getSegInfo():null},l.prototype.notifyError=function(t){this.error=t;var e=this.error.type||"decode";"open"===this.mediaSource.readyState&&this.mediaSource.endOfStream(e),this.controller&&this.controller.destroy()},l.prototype.isMimetypeSupported=function(t){return this.window.MediaSource.isTypeSupported(t)},l.prototype._createCustomEvent=function(t,e){return new this.window.CustomEvent(t,{detail:e,bubbles:!1,cancelable:!1})},l.prototype.setABRMode=function(t){this.controller?this.controller.setABRMode(t):this._jobQueue.push(["setABRMode",[t]])},l.prototype.setAudioLanguage=function(t){this.controller?this.controller.setAudioLanguage(t):this._jobQueue.push(["setAudioLanguage",[t]])},l.prototype.play=function(t){this.controller?this.controller.play(t):this._jobQueue.push(["play",[t]])},l.prototype.pause=function(){this.controller?this.controller.pause():this._jobQueue.push(["pause"])},l.prototype.preload=function(t){this.controller?this.controller.preload(t):this._jobQueue.push(["preload",[t]])},l.prototype.getCurrentDate=function(){return this.controller?this.controller.getCurrentDate():null},l.prototype.destroy=function(){this.controller&&this.controller.destroy(),this.appModel&&this.appModel.destroy(),this.mediaSource=null,r.prototype.destroy.call(this)},l.prototype._flushJobQueue=function(){var t=this,e=t._jobQueue;t._jobQueue=[],e.forEach(function(e){var n=t.controller,i=n[e[0]],r=e.length>1?e[1]:null;i&&"function"==typeof i&&i.apply(n,r)})}},function(t,e,n){"use strict";t.exports=E;var i=n(21),r=i.MessageIds,o=i.MessageTypes,s=n(3),a=n(25),u=n(100),l=n(101),c=n(91),d=n(210),h=n(211),p=n(12).HLSEvent,f=n(213),_=n(34),m=n(214),y=n(29).SynchTypes,v=n(215).LicenseManager,g={SYNCH_BEGIN:"synchBegin",SYNCH_METADATA_READY:"synchMetadataReady",SYNCH_DONE:"synchDone"};function E(t){this._moduleName="Controller",this._instanceId=s.guid(),this._node=this._context.node,this._mediaSource=this._context.mediaSource,this._model=this._context.appModel,this.mediaLoaded=!1,this._preloadProgressSent=!1,this._synchPosition=null,this._sessionId=t?t.sessionId:null,this.VALID_TIME_GAP_BW_HISTROY=6e5,this._videoEventHandler=new d(this._node,this._context.mediaSource,this),this._bufferController=this._context.create(h),this._playbackMetrics=this._context.create(f),this._localStorageHandler=new m,this._updateTimer=new a(250),this._updateTimer.addEventListener(this._update,this),this._jobQueue=[];var e={userAgent:this._model.userAgent,metadata:t,config:this._model.config};if(this._useWorker=this._shouldUseWorker(e),this._useWorker){if(this._worker=this._getWorker(this._moduleName),this._worker)return e.config.inWorkerScope=!0,this._worker.addEventListener("message",this._onMessage.bind(this)),void this._sendMessage(r.CREATE,[e]);this._model.config.useWorker=!1}this._controller=new c(e,this._onCallback.bind(this)),this._useWorker=!1,this._paused=!1,this._pausedOnStreamChange=!1,this._pausedPositionOnStreamChange=null,this._synchPosition=null,this._synchState=g.SYNCH_DONE,this._synchType=null,this._resetSrcBuffersOnSeek=!1}E.prototype.destroy=function(){this._videoEventHandler.destroy(),this._bufferController.destroy(),this._playbackMetrics.destroy(),this._jobQueue=null,this._licenseManager&&this._licenseManager.destroy(),this._updateTimer&&(this._updateTimer.destroy(),this._updateTimer=null),this._useWorker&&this._worker?(this._sendMessage(r.DESTROY),this._worker.terminate()):this._controller.destroy()},E.prototype._shouldUseWorker=function(t){var e=t?t.userAgent:null,n=!t||!t.config||t.config.useWorker;if(!e)return n;if(e.chrome&&!e.win7)return!1;if(e.safariDesktop)return!1;var i=t?t.metadata:null;return!(i&&i.url&&i.url.indexOf(".mpd")>-1)&&(!(e.firefox&&i&&i.streams&&i.streams.length&&"m3u8:fmp4"===i.streams[0].format)&&((!this._isUplynk(i)||!(e.safari||e.edge||e.ie))&&n))},E.prototype._isUplynk=function(t){if(!t)return!1;var e=t.url,n=t.streams&&t.streams.length?t.streams[0].url:null,i=e||n;return!(!i||!i.length)&&((i=i.toLowerCase()).indexOf("uplynk.com")>-1||i.indexOf("downlynk.com")>-1||i.indexOf("uplynk.localhost")>-1||i.indexOf("downlynk.localhost")>-1)},E.prototype.sendVideoEvent=function(t){if(t)switch(t.type){case"play":this._onPlay();break;case"playing":this._onPlaying();break;case"pause":this._onPause();break;case"seeking":this._onSeeking(t);break;case"seeked":this._onSeeked(t);break;case"ended":this._onComplete();break;case"error":this._onError();break;case"timeupdate":this._onTimeUpdate(t);break;case"resize":this._onResize(t)}},E.prototype.onMediaSourceOpen=function(){this.mediaLoaded&&(this._updateTimer.reset(),this._updateTimer.start(),this._jobQueue.length&&this._flushJobQueue())},E.prototype.play=function(t){if(!this._mediaSource||"closed"!==this._mediaSource.readyState&&this.mediaLoaded){var e=this._model.live?this._node.currentTime:this._model.duration,n=t>0&&t<=e?t:null;n&&this._onSynchBegin(n,y.INIT),this._startPlaying()}else this._jobQueue.push([this,this.play,[t]])},E.prototype.pause=function(){!this._mediaSource||"closed"!==this._mediaSource.readyState&&this.mediaLoaded?this._node.pause():this._jobQueue.push([this,this.pause])},E.prototype.preload=function(t){!this._mediaSource||"closed"!==this._mediaSource.readyState&&this.mediaLoaded?this._callMethod("preload",[t]):this._jobQueue.push([this,this.preload,[t]])},E.prototype.setABRMode=function(t){this._callMethod("setABRMode",[t])},E.prototype.setAudioLanguage=function(t){this._callMethod("setAudioLanguage",[t])},E.prototype.getSegInfo=function(){var t={mode:"sync",segInfo:null,bufferLen:null,sessionId:this._sessionId};return this._useWorker&&this._worker?(t.mode="async",this._sendMessage(r.CALL_METHOD,null,"getSegInfo")):t.segInfo=this._controller.getSegInfo(),t.bufferLen=this._model.getBufferLength(),t},E.prototype._onPlay=function(){if(this._model.setDimensions(),!this._mediaSource||"closed"!==this._mediaSource.readyState&&this.mediaLoaded){var t=this._synchPosition;this._pausedPositionOnStreamChange&&(t=this._pausedPositionOnStreamChange,this._pausedPositionOnStreamChange=null),this._paused=!1,this._callMethod("onPlay",[t]),this._playbackMetrics.onPlay()}else this._jobQueue.push([this,this._onPlay])},E.prototype._onPlaying=function(){this._callMethod("onPlaying")},E.prototype._onPause=function(){this._paused=!0,this._callMethod("onPause"),this._playbackMetrics.onPause()},E.prototype._onSeeking=function(t){var e=t.target.currentTime,n=!this._model.live,i=!1,r=this._model.userAgent;r&&r.safariDesktop&&(i=!this._model.live||this._resetSrcBuffersOnSeek),this._bufferController.onSeeking(n,i),this._resetSrcBuffersOnSeek=!1,this._callMethod("onSeeking",[e])},E.prototype._onSeeked=function(t){var e=t.target.currentTime;this._callMethod("onSeeked",[e])},E.prototype._onComplete=function(){this._updateTimer.stop(),this._callMethod("onComplete")},E.prototype._onError=function(){var t=this._node.error?this._node.error.code:null;this._callMethod("onError",[t]),this._bufferController.onError()},E.prototype._onResize=function(){this._model.setDimensions()},E.prototype._onTimeUpdate=function(){this._doUpdate("onTimeUpdate")},E.prototype._update=function(){this.mediaLoaded&&this._doUpdate("onUpdate")},E.prototype._doUpdate=function(t){this._bufferController.process();var e={currentTime:this._node.currentTime,bufferedAndPending:this._bufferController.getBufferedAndPending(),bufferLength:this._model.getBufferLength(),pendingBufferLength:this._bufferController.getPendingBufferLength(),bufferedRanges:this._model.getBufferedDto(),dimensions:this._model.getDimensions(),pixelRatio:this._model.getPixelRatio(),frameStats:this._playbackMetrics.getFpsStats()};this._callMethod(t,[e])},E.prototype._onMediaLoaded=function(){this.mediaLoaded=!0,this._mediaSource&&"closed"===this._mediaSource.readyState||(this._updateTimer.start(),this._jobQueue.length&&this._flushJobQueue())},E.prototype._onSynchBegin=function(t,e){this._synchPosition=t,this._synchState=g.SYNCH_BEGIN,this._synchType=e,this._model.live&&(this._bufferController.resetReadyState(),this._bufferController.clear())},E.prototype._onSynchComplete=function(t){this._synchPosition=null,this._synchState=g.SYNCH_DONE,this._synchType=null,this._model.live&&this._callMethod("onSynchComplete",[t])},E.prototype._flushJobQueue=function(){var t=this._jobQueue;this._jobQueue=[],t.forEach(function(t){var e=t[0],n=t[1],i=t.length>2?t[2]:null;n&&"function"==typeof n&&n.apply(e,i)})},E.prototype._callMethod=function(t,e){this._useWorker&&this._worker?this._sendMessage(r.CALL_METHOD,e,t):this._controller[t].apply(this._controller,e)},E.prototype._getWorker=function(t){if(!t)return null;if(this._useWorker&&"undefined"!=typeof Worker)try{return this._worker||(this._worker=l(u)),this._worker}catch(t){console.log("Cant create web worker")}return null},E.prototype._onMessage=function(t){if(t){var e=t.data?new _(t.data):t;if(e&&e.instanceId===this._instanceId){var n=e.getParam("media");if(n&&this._model.update(n),e.type!==o.EVENT)switch(e.id){case r.CREATE_SRC_BUFFER:this._createSrcBuffers(e.getParam("tracks"));break;case r.APPEND_SRC_BUFFER:this._appendSrcBuffers(e.getParam("tracks"));break;case r.SAVE_AVG_BANDWIDTH:this._setAvgBWToLocalStorage(e.getParam("avgBwInfo"));break;case r.END_OF_STREAM:e.args&&e.args.length&&(this._bufferController.endOfStream(e.getParam("endOfStream")),this._context.sendEvent(p.CONTENT_LOAD_FINISHED,e.args[0]));break;case r.PAUSE_BEFORE_STREAM_CHANGE:this._pauseOnStreamChange(e.getParam("streamType"));break;case r.PLAY_AFTER_STREAM_CHANGE:this._playOnStreamChange();break;case r.DRM_INIT:this._licenseManager||(this._licenseManager=new v(this._controller,this._node,this._context));for(var i=0;i<this._model.drmInfo.length;i++)this._licenseManager.addDrmItem(this._model.drmInfo[i]);break;case r.DRM_LICENSE_INFO:this._licenseManager&&this._licenseManager.addDrmItem(e.getParam("drmItem"))}else this._handleEvent(e.id,e.getParam("eventData"))}}},E.prototype._onCallback=function(t){t.instanceId=this._instanceId,this._onMessage(t)},E.prototype._handleEvent=function(t,e){if(t){switch(t){case p.MEDIA_LOADED:this._onMediaLoaded();break;case p.WAITING:var n=e?e.minBufferTime:.1;this._bufferController.setMinimumBufferTime(n),this._playbackMetrics.updateBufferingInfo(e);break;case p.LIVE_SYNCH:var i=e?e.synchPosition:null,r=e?e.synchType:y.INIT;this._onSynchBegin(i,r);break;case p.SEG_INFO_METRICS_AVAILABLE:e={segInfo:e,bufferLen:this._model.getBufferLength(),sessionId:this._sessionId};break;case p.VTT_SEGMENT_LOADED:e&&(e.sessionId=this._sessionId);break;case p.ERROR:return e.error=new Error(e.message,e.code),void this._context.notifyError(e)}this._context.sendEvent(t,e)}},E.prototype._createSrcBuffers=function(t){var e=this;t&&(!e._mediaSource||"closed"!==e._mediaSource.readyState&&e.mediaLoaded?(e._setMediaSourceDuration(),t.forEach(function(t){e._bufferController.createSourceBuffer(t.type,t.mimeType,t.minBufferTime)})):e._jobQueue.push([e,e._createSrcBuffers,[t]]))},E.prototype._setMediaSourceDuration=function(){this._mediaSource&&!this._mediaSource.duration&&this._model.duration>0&&(this._mediaSource.duration=this._model.duration)},E.prototype._appendSrcBuffers=function(t){var e=this;t&&(t.forEach(function(t){e._bufferController.appendBuffer(t,function(t,n){t&&console.error("[ControllerFacade] Error in appendBuffer Err = "+t.toString()),e._onAppendBufferComplete(t,n)})}),e._model.preloading&&!e._preloadProgressSent&&(e._context.sendEvent(p.PRELOAD_PROGRESS),e._preloadProgressSent=!0))},E.prototype._onAppendBufferComplete=function(){if(!this._model.live&&this._synchState===g.SYNCH_BEGIN){if(!this._bufferController.areSrcBuffersReady())return;return this._bufferController.onSeeking(!0),this._synchState=g.SYNCH_METADATA_READY,void this._callMethod("onSynchMetadataReady",[this._synchPosition])}if(this._synchPosition&&this._bufferController.areSrcBuffersReady()){var t=this._node.seekable,e=this._node.buffered;if(t.length&&e.length){var n=t.start(t.length-1),i=t.end(t.length-1);if(this._synchPosition>=n&&this._synchPosition<=i){for(var r=this._synchPosition,o=0;o<e.length;o++)if(!(r>e.end(o))&&r<e.start(o)){r=e.start(o);break}var s=this._model.userAgent;this._resetSrcBuffersOnSeek=s&&s.safariDesktop&&this._model.live&&this._synchType===y.TIME_GAP;try{this._node.currentTime=r,console.log("[ControllerFacade][_onAppendBufferComplete] setting current time to "+r)}catch(t){console.log("[ControllerFacade][_onAppendBufferComplete] setting current time exception: "+t.toString())}this._onSynchComplete(r)}}}},E.prototype._sendMessage=function(t,e,n){if(this._worker&&t){var i={type:o.MESSAGE,id:t,moduleName:this._moduleName,instanceId:this._instanceId,funcName:n,args:e,timestamp:Date.now()};this._worker.postMessage(i)}},E.prototype._setAvgBWToLocalStorage=function(t){t&&this._localStorageHandler&&this._localStorageHandler.writeProperty("avgBW",t)},E.prototype._playOnStreamChange=function(){this._pausedOnStreamChange&&(this._startPlaying(),this._pausedOnStreamChange=!1,this._context.sendEvent(p.WAITING,{value:!1,bufferInit:!1}))},E.prototype._pauseOnStreamChange=function(t){var e=this._node.currentTime,n=this._model.live;n&&"audio"===t?this._bufferController.clearSrcBuffer(t):this._bufferController.clear(),this._paused||(this._context.sendEvent(p.WAITING,{value:!0,bufferInit:!1}),this._node.pause(),this._pausedOnStreamChange=!0),n?this._pausedPositionOnStreamChange=e:this._node.currentTime=e},E.prototype._startPlaying=function(){var t=this;if(t._node){var e=t._node.play();return e&&"function"==typeof e.catch&&e.catch(function(){t._node.paused&&t._context.sendEvent(p.PLAY_BLOCKED)}),e}},E.prototype.getCurrentDate=function(){return this._model.getCurrentDate()}},function(t,e,n){"use strict";t.exports=o;var i=n(164),r=n(24);function o(t,e){this._data=null,this._demuxConfig=t||{},this._dataListener=e,this._pcrPID=0,this._programMapPID=NaN,this._streamIds={},this._pesStreams={},this._packetsBeforePMT=[],this._state="initial",this._position="start",this._endOfSegment=!1}o.prototype.destroy=function(){this._data=null,this._packetsBeforePMT=[],this._state="initial",this._position="start";var t=this._pesStreams;for(var e in t)t.hasOwnProperty(e)&&t[e].destroy();this._pesStreams={}},o.prototype.append=function(t){if(t){var e=t.length;if(e){var n=null,i=0;this._data&&(i=(n=this._data).length);var o=i+e;return this._data=new Uint8Array(o),n&&this._data.set(n),this._data.set(t,i),-2===this._parse()?{error:r.ERR_SEGMENT_PARSE}:void 0}}},o.prototype.endOfSegment=function(){this._endOfSegment=!0,this._data&&this._data.length<188&&this._handleEndOfSegment()},o.prototype._parse=function(){if(!this._data)return-1;for(var t=0;this._data.length;){var e=this._parsePacket(this._data.subarray(0,188));if(0===e)t++,this._data=this._data.subarray(188),t>=500&&(this._sendDemuxedData(),t=0);else{if(-2!==e)break;var n=this._probeSyncByte(this._data);if(!(n>=0)){console.warn("[TSParser] No sync byte found!");break}this._data=this._data.subarray(n)}}return this._endOfSegment&&0===this._data.length?this._handleEndOfSegment():this._sendDemuxedData(),0},o.prototype._parsePacket=function(t){if(!t||t.length<1)return-1;var e=0,n={};if(71!==t[e++])return-2;if(!t||t.length<188)return-1;var i=t[e++];(n.startIndicator=(64&i)>>6,n.pid=((31&i)<<8)+t[e++],i=t[e++],n.adaptationFieldExists=(32&i)>>5,n.payloadExists=(16&i)>>4,n.adaptationFieldLength=0,n.adaptationFieldExists)&&(n.adaptationFieldLength=t[e++],16&t[e++]&&n.pid===this._pcrPID&&n.adaptationFieldLength>=7&&this._readPCR(t.subarray(e,e+6)),e+=n.adaptationFieldLength-1);return!n.payloadExists||n.adaptationFieldLength>=183?0:(this._parsePayload(t.subarray(e),n),0)},o.prototype._readPCR=function(t){if(t&&!(t.length<6)){var e=0,n=t[e++],i=(128&n)>>>7;n=((n&=127)<<24)+(t[e++]<<16)+(t[e++]<<8)+t[e++];var r=t[e++];e++;var o=2*n+((128&r)>>>7),s=i?-1*Math.pow(2,32)+o:o;this._firstPcr||(this._firstPcr=s)}},o.prototype._parsePayload=function(t,e){var n,i,r;if(t&&e&&!isNaN(e.pid)&&(this._streamIds.aac&&(n=this._streamIds.aac),this._streamIds.avc&&(i=this._streamIds.avc),this._streamIds.id3&&(r=this._streamIds.id3),!(e.pid>=1&&e.pid<=15||8191===e.pid)))switch(e.pid){case 0:this._parsePAT(t,e);break;case this._programMapPID:this._parsePMT(t,e);break;case n:this._parseMediaData("audio",n,t,e);break;case i:this._parseMediaData("video",i,t,e);break;case r:this._parseMediaData("id3",r,t,e),this._sendTimedMetadata();break;default:this._parseUnknownPacket(t,e)}},o.prototype._parsePAT=function(t,e){if(t){var n=0;if(e.startIndicator){var i=t[n++];n+=i}0!==t[n++]&&console.warn("[TSParser] PAT is parsed with table id != 0. PAT parsing may not be correct"),n+=4,n+=3,(t[n++]<<8)+t[n++]>0&&(this._programMapPID=((31&t[n++])<<8)+t[n++]),this._state="patParsed"}},o.prototype._parsePMT=function(t,e){if(t){var n=0;if(e&&e.startIndicator){var i=t[n++];n+=i}2!==t[n++]&&console.warn("[TSParser] PMT is parsed with table id != 2. PMT parsing may not be correct");var r=((15&t[n++])<<8)+t[n++],o=n;n+=2,n+=3,this._pcrPID=((31&t[n++])<<8)+t[n++];var s=((15&t[n++])<<8)+t[n++];n+=s;for(var a=null,u=null,l=0;n-o<r-4;)switch(a=t[n++],u=((31&t[n++])<<8)+t[n++],l=((15&t[n++])<<8)+t[n++],n+=l,a){case 3:case 4:this._streamIds.mp3=u;break;case 15:this._streamIds.aac=u;break;case 27:this._streamIds.avc=u;break;case 21:this._streamIds.id3=u}this._state="pmtParsed"}},o.prototype._parseMediaData=function(t,e,n,r){if(n){var o=this._pesStreams,s=o[e];r.startIndicator?(s||(o[e]=new i(t,e,this._demuxConfig),s=o[e]),s.addPacket(n)):s&&s.append(n)}},o.prototype._parseUnknownPacket=function(t,e){if(t&&!(t.length<4)&&e.startIndicator){var n=0,i=(t[0]<<16)+(t[1]<<8)+t[2],r=t[n++];n+=r;var o=t.length>n?t[n]:NaN;if(1===i){var s=t[3]>>>4;14===s?(this._streamIds.avc=e.pid,this._parseMediaData("video",this._streamIds.avc,t,e)):12!==s&&13!==s||(this._streamIds.aac=e.pid,this._parseMediaData("audio",this._streamIds.aac,t,e))}else 2===o&&this._parsePMT(t,e)}},o.prototype._isReady=function(){var t=!0;for(var e in this._streamIds)if("id3"!==e&&this._streamIds.hasOwnProperty(e)){var n=this._streamIds[e];this._pesStreams[n]&&(t=t&&this._pesStreams[n].isReady())}return t},o.prototype._sendDemuxedData=function(){if(this._isReady()){var t={},e=!1,n=!1,i=this._pesStreams,r=Number.POSITIVE_INFINITY;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];if(s){var a={frames:s.getFrames({keyFrameBoundary:"end"!==this._position}),config:s.getConfig(),streamId:s.streamId};"audio"===s.streamType&&o===this._streamIds.aac.toString()?(t.audio=a,e=t.audio.frames&&t.audio.frames.length):"video"===s.streamType&&o===this._streamIds.avc.toString()&&(t.video=a,n=t.video.frames&&t.video.frames.length)}}e&&(r=Math.min(r,t.audio.frames[0].dts)),n&&(r=Math.min(r,t.video.frames[0].dts)),r!==Number.POSITIVE_INFINITY&&(t.pcr=r),("end"===this._position||e||n)&&(this._dataListener&&this._dataListener({pos:this._position,avData:t}),"start"===this._position&&(this._position="middle"))}},o.prototype._sendTimedMetadata=function(){var t=this,e=t._pesStreams,n=null;Object.keys(e).forEach(function(i){var r=e[i];r&&"id3"===r.streamType&&i===t._streamIds.id3.toString()&&(n=r.getTimedMetadata())}),n&&t._dataListener&&t._dataListener({pos:"timedMetadata",timedMetadata:n})},o.prototype._probeSyncByte=function(t){if(!t)return-1;for(var e=0;e<t.length;e++)if(71===t[e])return e;return-1},o.prototype._handleEndOfSegment=function(){this._position="end";var t=this._pesStreams;for(var e in t)t.hasOwnProperty(e)&&(t[e].endOfSegment(),"id3"===t[e].streamType&&this._sendTimedMetadata());this._sendDemuxedData()}},function(t,e,n){"use strict";t.exports=u;var i=n(64),r=n(165),o=n(90),s=i.AACStream,a=i.AVCStream;function u(t,e,n){this.streamType=t,this.streamId=e,this._packetList=[],this._endOfSegment=!1,this._demuxConfig=n,this._timedMetadata=null,this._id3=new o,"audio"===t?this._stream=new s(this._demuxConfig):"video"===t&&(this._stream=new a(this._demuxConfig))}function l(t){this._data=new r(Uint8Array,t),this.complete=!1}u.prototype.destroy=function(){this._packetList=[],this._stream&&(this._stream.destroy(),this._stream=null)},u.prototype.isReady=function(){var t=!!this._stream&&this._stream.ready;return this._endOfSegment||t},u.prototype.addPacket=function(t){this._packetList.length&&this._parsePacket(),this._packetList.push(new l(t))},u.prototype.append=function(t){var e=this._packetList.length;t&&e&&this._packetList[e-1].append(t)},u.prototype.endOfSegment=function(){this._endOfSegment=!0,this._parsePacket()},u.prototype.getFrames=function(t){return this._stream?this._stream.getFrames(t):null},u.prototype.getTimedMetadata=function(){return this._timedMetadata?this._timedMetadata:null},u.prototype.getConfig=function(){return this._stream?this._stream.getConfig():null},u.prototype._parsePacket=function(){var t=this._packetList.length;if(t){var e=this._packetList[t-1];e.complete=!0,0===e.parse()&&("id3"===this.streamType?this._timedMetadata={payload:this._id3.getID3Payload(e.packetInfo.streamData),pts:this._packetList.length&&this._packetList[0].packetInfo.pts}:this._stream&&this._stream.readFrames(e),this._packetList.pop())}},l.prototype.append=function(t){this._data&&this._data.set(t)},l.prototype.parse=function(){if(this.packetInfo={},!this.complete||!this._data||!this._data.length)return this.packetInfo.result=-1,-1;if(this._data.length<6)return this.packetInfo.result=-2,-2;var t=0;if(1!==(this._data.get(t++)<<16)+(this._data.get(t++)<<8)+this._data.get(t++))return this.packetInfo.result=-3,-3;this.packetInfo.streamId=this._data.get(t++),t+=2,t++;var e=(192&this._data.get(t++))>>6,n=this._data.get(t++);return 2!==e&&3!==e||(this.packetInfo.pts=this._parseTimestamp(this._data.subArray(t,t+5)),this.packetInfo.dts=this.packetInfo.pts,t+=5,n-=5,3===e&&(this.packetInfo.dts=this._parseTimestamp(this._data.subArray(t,t+5)),t+=5,n-=5)),t+=n,this.packetInfo.streamData=this._data.subArray(t),this.packetInfo.result=0,0},l.prototype._parseTimestamp=function(t){if(!t||!t.length)return 0;var e=0,n=(14&t[e++])>>>1,i=(t[e++]<<8)+(254&t[e++])>>>1,r=(t[e++]<<8)+t[e++]>>>1,o=(4&n)>>2,s=2*((n&=3)<<29)+(i<<=15)+r;return o?-1*Math.pow(2,32)+s:s}},function(t,e,n){"use strict";var i=n(14);function r(t,e){this._data=[],this.length=0,this._type=t||Uint8Array,e&&this.set(e)}t.exports=r,r.prototype.destroy=function(){this._data=[],this.length=0},r.prototype.set=function(t){this._data.push(t),this.length=this.length+t.length},r.prototype.get=function(t){if(i.isNullOrUndefined(t)||t<0||t>this.length)throw new Error("[DataManager] Array position out of bounds");for(var e=0,n=0,r=null,o=0;o<this._data.length;o++){var s=this._data[o];if(t<(e+=s.length)){r=s[t-n];break}n+=s.length}return r},r.prototype.subArray=function(t,e){if((i.isNullOrUndefined(e)||e>this.length)&&(e=this.length),i.isNullOrUndefined(t)&&(t=0),t>=e)return new this._type(0);for(var n=e-t,r=new this._type(n),o=0,s=0,a=0,u=0;u<this._data.length;u++){var l=this._data[u];if(a+=l.length,o>0){if(e<=a){r.set(l.subarray(0,n-o),o);break}r.set(l.subarray(0),o),o+=l.length}else{if(t<a&&e<=a){r=l.subarray(t-s,e-s);break}if(t<a){var c=t-s;r.set(l.subarray(c)),o=l.length-c}}s+=l.length}return r}},function(t,e,n){"use strict";t.exports=r;var i=n(167);function r(){this._mp4Content=null,this._mp4Box=new i}r.prototype.destroy=function(){this._mp4Content=null},r.prototype.generate=function(t){if(!t)return null;var e=[t],n=null,i=null,r=null,o=0;if(t.config.shouldInit){var s="audio"===t.type?"mp41":"avc1";o+=(n=this._generateInitSegment(e,s))?n.length:0}t.frames.length&&(o+=(i=this._generateFragmentMetadata(e))?i.length:0,o+=(r=this._generateFragmentData(e))?r.length:0),this._mp4Content=new Uint8Array(o);var a=0;n&&(this._mp4Content.set(n,a),a+=n.length),i&&(this._mp4Content.set(i,a),a+=i.length),r&&(this._mp4Content.set(r,a),a+=r.length);var u=t.frames.length>0?t.frames[t.frames.length-1].duration:0,l=t.endTime+u;return{data:this._mp4Content,type:t.type,codec:t.config.codec,mimeType:t.type+'/mp4; codecs="'+t.config.codec+'"',startTime:t.frames.length?t.startTime/t.config.timescale:0,endTime:t.frames.length?l/t.config.timescale:0,endTimestamp:l}},r.prototype._generateInitSegment=function(t,e){if(!t||!t.length)return null;var n=this._mp4Box.initSegment(t,e);return n||null},r.prototype._generateFragmentMetadata=function(t){var e=this,n=0;return t&&t.length?(t.forEach(function(t){n=t.config.seqNum,t.frames&&t.frames.length&&t.frames.forEach(function(n,i,r){n.size=n.nalUnitSize?n.nalUnitSize+4*n.nalUnits.length:n.data?n.data.length:0,i<r.length-1?n.duration=t.frames[i+1].dts-n.dts:n.duration=i>0?n.dts-t.frames[i-1].dts:t.config.defaultFrameDuration||e._getDefaultDuration(t.type.track.config.timescale),n.duration<0&&console.warn("[Mp4Generator] Type = "+t.type+", Negative frame duration = "+n.duration)})}),e._mp4Box.moof(n,t)):null},r.prototype._generateFragmentData=function(t){var e=this;if(!t||!t.length)return null;var n,i=[],r=0;t.forEach(function(t){"video"===t.type&&t.frames.forEach(function(t){t.normalizedData=new Uint8Array(t.nalUnitSize+4*t.nalUnits.length);var e=new DataView(t.normalizedData.buffer),n=0;t.nalUnits.forEach(function(i){e.setUint32(n,i.data.byteLength),n+=4,t.normalizedData.set(i.data,n),n+=i.data.byteLength}),t.data=t.normalizedData}),(n=e._mp4Box.mdat(t))&&n.length&&(i.push(n),r+=n.length)});var o=new Uint8Array(r),s=0;return i.forEach(function(t){o.set(t,s),s+=t.length}),o},r.prototype._getDefaultDuration=function(t,e){return("audio"===t?.0232199546:.0333333333)*e}},function(t,e,n){"use strict";t.exports=i;function i(){}i.prototype.initSegment=function(t,e){var n=this.ftyp(e),i=this.moov(t),r=new Uint8Array(n.byteLength+i.byteLength);return r.set(n),r.set(i,n.byteLength),r},i.prototype.ftyp=function(t){t=t||"avc1";var e=new Uint8Array([105,115,111,109]),n=new Uint8Array([0,0,0,1]),i=new Uint8Array([t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);return this._box("ftyp",[e,n,i])},i.prototype.moov=function(t){var e=[];e.push(this._mvhd(t[0].config.duration,t[0].config.timescale));for(var n=0;n<t.length;n++)e.push(this._trak(t[n]));return e.push(this._mvex(t)),this._box("moov",e)},i.prototype.moof=function(t,e){var n=[];n.push(this._mfhd(t));for(var i=0;i<e.length;i++){var r=this._traf(e[i]);n.push(r)}return this._box("moof",n)},i.prototype.mdat=function(t){var e=[];if(t&&t.frames)for(var n=0;n<t.frames.length;n++)e.push(t.frames[n].data);return this._box("mdat",e)},i.prototype._mfhd=function(t){var e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,t),this._fullBox("mfhd",0,new Uint8Array(3),[e])},i.prototype._traf=function(t){if(t){var e,n,i=[],r=32,o=this._tfhd(t);return r+=o.length,i.push(o),t.frames&&t.frames.length&&(r+=(e=this._tfdt(t.frames[0].dts)).length,i.push(e)),"video"===t.type&&(r+=(n=this._sdtp(t)).length),i.push(this._trun(t,r)),n&&i.push(n),this._box("traf",i)}},i.prototype._tfhd=function(t){var e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,t.streamId),this._fullBox("tfhd",0,new Uint8Array([0,0,0]),[e])},i.prototype._tfdt=function(t){var e=new Uint8Array(4);return new DataView(e.buffer).setUint32(0,Math.max(0,t)),this._fullBox("tfdt",0,new Uint8Array([0,0,0]),[e])},i.prototype._trun=function(t,e){var n=t.frames||[],i=n.length,r=this._getTrunFlags(n),o=0,s=r[1],a=0;for(a=0;a<4;a++)o+=s&1<<a?1:0;var u=new Uint8Array(4*o*i),l=new DataView(u.buffer);e+=20+u.length+8;var c=this._getTrunHeader(i,e),d=0;for(a=0;a<i;a++){var h=n[a];if(1&s&&(l.setUint32(d,h.duration),d+=4),2&s&&(l.setUint32(d,h.size),d+=4),4&s){var p=(h.flags.isLeading<<2|h.flags.dependsOn)<<24|(h.flags.isDependedOn<<6|h.flags.hasRedundancy<<4|h.flags.paddingValue<<1|h.flags.isNonSyncSample)<<16|(240&h.flags.degradationPriority)<<8|15&h.flags.degradationPriority;l.setUint32(d,p),d+=4}8&s&&(l.setUint32(d,h.pts-h.dts),d+=4)}return this._fullBox("trun",0,r,[c,u])},i.prototype._sdtp=function(t){for(var e=t.frames||[],n=e.length,i=new Uint8Array(n),r=0;r<n;r++){var o=e[r];o.flags&&(i[r]=o.flags.isLeading<<6|o.flags.dependsOn<<4|o.flags.isDependedOn<<2|o.flags.hasRedundancy)}return this._fullBox("sdtp",0,new Uint8Array(3),[i])},i.prototype._getTrunHeader=function(t,e){var n=new Uint8Array(8),i=new DataView(n.buffer);return i.setUint32(0,t),i.setInt32(4,e),n},i.prototype._getTrunFlags=function(t){var e=t.length,n=new Uint8Array(3);return n[2]=1,e&&(void 0!==t[0].duration&&(n[1]|=1),void 0!==t[0].size&&(n[1]|=2),void 0!==t[0].flags&&(n[1]|=4),void 0!==t[0].pts&&(n[1]|=8)),n},i.prototype._mvhd=function(t,e){var n=new Uint8Array(96),i=new DataView(n.buffer);i.setUint32(0,1),i.setUint32(4,2);var r=e||9e4;return i.setUint32(8,r),t&&i.setUint32(12,t),i.setUint32(16,65536),i.setUint16(20,256),i.setUint32(32,65536),i.setUint32(48,65536),i.setUint32(64,1073741824),i.setUint32(92,4294967295),this._fullBox("mvhd",0,new Uint8Array(3),[n])},i.prototype._trak=function(t){t.config.duration=t.config.duration||4294967295;var e=[this._tkhd(t)];return t.config.useEditBox&&e.push(this._edts(t)),e.push(this._mdia(t)),this._box("trak",e)},i.prototype._tkhd=function(t){var e=new Uint8Array(80),n=new DataView(e.buffer);return n.setUint32(8,t.streamId),n.setUint32(16,t.config.duration),n.setUint8(32,"audio"===t.type?1:0),n.setUint32(36,65536),n.setUint32(52,65536),n.setUint32(68,1073741824),n.setUint16(72,t.config.width),n.setUint16(76,t.config.height),this._fullBox("tkhd",0,new Uint8Array([0,0,7]),[e])},i.prototype._edts=function(t){return this._box("edts",[this._elst(t)])},i.prototype._elst=function(t){var e=new Uint8Array(16),n=new DataView(e.buffer);return n.setUint32(0,1),n.setUint32(4,0),n.setUint32(8,t.config.offset),n.setUint16(12,1),n.setUint16(14,0),this._fullBox("elst",0,new Uint8Array(3),[e])},i.prototype._mdia=function(t){return this._box("mdia",[this._mdhd(t),this._hdlr(t.type),this._minf(t)])},i.prototype._mdhd=function(t){var e=new Uint8Array(20),n=new DataView(e.buffer);n.setUint32(0,2),n.setUint32(4,3);var i=t.config.timescale||9e4;return n.setUint32(8,i),n.setUint32(12,t.config.duration),n.setUint16(16,21956),this._fullBox("mdhd",0,new Uint8Array(3),[e])},i.prototype._hdlr=function(t){var e={video:1986618469,audio:1936684398,hint:1751740020},n=new Uint8Array(32),i=new DataView(n.buffer);return i.setUint32(4,e[t]),i.setUint32(20,e[t]),i.setUint32(24,1214344804),i.setUint32(28,1818587648),this._fullBox("hdlr",0,new Uint8Array(3),[n])},i.prototype._minf=function(t){var e="audio"===t.type?this._smhd():this._vmhd();return this._box("minf",[e,this._dinf(),this._stbl(t)])},i.prototype._vmhd=function(){var t=new Uint8Array(8);return this._fullBox("vmhd",0,new Uint8Array([0,0,1]),[t])},i.prototype._smhd=function(){var t=new Uint8Array(4);return this._fullBox("smhd",0,new Uint8Array(3),[t])},i.prototype._dinf=function(){return this._box("dinf",[this._dref()])},i.prototype._dref=function(){var t=new Uint8Array([0,0,0,1]),e=[];return e.push(t),e.push(this._url(new Uint8Array([0,0,1]))),this._fullBox("dref",0,new Uint8Array(3),e)},i.prototype._url=function(t){return this._fullBox("url ",0,t,[])},i.prototype._urn=function(t){return this._fullBox("urn ",0,t,[])},i.prototype._stbl=function(t){return this._box("stbl",[this._stsd(t),this._stts(),this._stsc(),this._stsz(),this._stco()])},i.prototype._stsd=function(t){var e="audio"===t.type?this._audioSample(t):this._videoSample(t),n=new Uint8Array([0,0,0,1]);return this._fullBox("stsd",0,new Uint8Array(3),[n,e])},i.prototype._videoSample=function(t){var e=[];e.push((65280&t.config.ppsLength)>>>8),e.push(255&t.config.ppsLength);try{t.config.ppsLength>0&&(e=e.concat(Array.prototype.slice.call(t.config.pps)))}catch(t){console.warn("[MP4Box][_videoSample] Exception: "+t.toString())}var n=[];n.push((65280&t.config.spsLength)>>>8),n.push(255&t.config.spsLength);try{t.config.spsLength>0&&(n=n.concat(Array.prototype.slice.call(t.config.sps)))}catch(t){console.warn("[MP4Box][_videoSample] Exception: "+t.toString())}var i=new Uint8Array(78),r=new DataView(i.buffer);return r.setUint16(6,1),r.setUint16(24,t.config.width),r.setUint16(26,t.config.height),r.setUint32(28,4718592),r.setUint32(32,4718592),r.setUint16(40,1),r.setUint32(42,259613032),r.setUint32(46,1869557110),r.setUint32(50,1768187247),r.setUint32(54,761818227),r.setUint16(74,24),r.setUint16(76,65535),this._box("avc1",[i,this._box("avcC",[new Uint8Array([1,t.config.profileIndication,t.config.profileCompatibility,t.config.levelIndication,255].concat([255&t.config.numOfSPS|224]).concat(n).concat([255&t.config.numOfPPS]).concat(e))]),this._btrt()])},i.prototype._btrt=function(){var t=new Uint8Array(12);return new DataView(t.buffer).setUint32(0,1875072),this._box("btrt",[t])},i.prototype._audioSample=function(t){var e=new Uint8Array(8),n=new DataView(e.buffer);n.setUint16(6,1);var i=new Uint8Array(20);return(n=new DataView(i.buffer)).setUint16(8,t.config.channels),n.setUint16(10,t.config.sampleSize),n.setUint16(16,t.config.samplingFreq),this._box("mp4a",[e,i,this._esds(t)])},i.prototype._esds=function(t){var e=new Uint8Array(27),n=new DataView(e.buffer);return n.setUint8(0,3),n.setUint8(1,25),n.setUint8(5,4),n.setUint8(6,17),n.setUint8(7,64),n.setUint8(8,21),n.setUint16(10,1536),n.setUint8(20,5),n.setUint8(21,2),n.setUint8(22,t.config.audioObjectTypeIndex<<3|t.config.samplingFreqIndex>>>1),n.setUint8(23,t.config.samplingFreqIndex<<7|t.config.channels<<3),n.setUint8(24,6),n.setUint8(25,1),n.setUint8(26,2),this._fullBox("esds",0,new Uint8Array(3),[e])},i.prototype._stts=function(){var t=new Uint8Array(4);return this._fullBox("stts",0,new Uint8Array(3),[t])},i.prototype._stsc=function(){var t=new Uint8Array(4);return this._fullBox("stsc",0,new Uint8Array(3),[t])},i.prototype._stsz=function(){var t=new Uint8Array(8);return this._fullBox("stsz",0,new Uint8Array(3),[t])},i.prototype._stco=function(){var t=new Uint8Array(4);return this._fullBox("stco",0,new Uint8Array(3),[t])},i.prototype._mvex=function(t){for(var e=[],n=0;n<t.length;n++)e.push(this._trex(t[n]));return this._box("mvex",e)},i.prototype._trex=function(t){var e=new Uint8Array(20),n=new DataView(e.buffer);return n.setUint32(0,t.streamId),n.setUint32(4,1),n.setUint32(16,65537),"video"!==t.type&&(e[e.length-1]=0),this._fullBox("trex",0,new Uint8Array(3),[e])},i.prototype._fullBox=function(t,e,n,i){var r=new Uint8Array(1);r[0]=e;var o=[r,n];return o=o.concat(i),this._box(t,o)},i.prototype._box=function(t,e){var n=0,i=new Uint8Array([t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]),r=0,o=0;for(o=0;o<e.length;o++)r+=e[o].length;var s=new Uint8Array(r+8);for(new DataView(s.buffer,s.byteOffset,s.byteLength).setUint32(0,s.byteLength),s.set(i,4),n=8,o=0;o<e.length;o++)s.set(e[o],n),n+=e[o].length;return s}},function(t,e,n){"use strict";t.exports.StreamingController=g;var i=n(29).Events,r=n(193),o=n(198),s=n(201),a=n(25),u=n(92),l=u.StreamLoader,c=u.Events,d=n(20).StreamTypes,h=n(3),p=n(16),f=n(12).HLSEvent,_=n(50),m=n(17).AbrModes,y=n(21),v=t.exports.Events={STREAM_METADATA_LOADED:"streamMetadataLoaded",STREAM_METADATA_LOAD_ERROR:"streamMetadataLoadError",PRELOAD_COMPLETE:"preloadComplete",SEG_LOAD_PROGRESS:"streamingControllerSegLoadProgress"};function g(){p.call(this,this.constructor.name),this._model=this.__controller.model,this._services=this.__controller.services,this._commandManager=this.__controller.create(_),this._metrics=this._services.segmentMetrics,this._streamLoaders={},this._loadingStreamsTotal=0,this._loadedStreamCount=0,this._streamers={},this._primaryStreamer=null,this._streamerCount=0,this._errorHandler=this.__controller.create(s,this._commandManager),this._errorHandler.addEventListener(this._errorHandler.SWITCH_ON_ERROR,this._onErrorSwitch,this),this._switchManager=this.__controller.create(o),this._switchManager.addEventListener(this._switchManager.SWITCH_BEGIN,this._onSwitchBegin,this),this._switchManager.addEventListener(this._switchManager.SWITCH_END,this._onSwitchEnd,this),this._loadMonitorTimer=new a(1e3*this._model.config.segmentLoadMonitorInterval),this._loadMonitorTimer.addEventListener(this._onLoadMonitor,this),this._streamerEventKeys={},this._jobQueue=[],this._paused=!1,this._switching=!1,this._manualStreamChange=!1,this._switchScenario=this._switchManager.SCENARIOS.STARTUP,this.STATES={ERROR:-1,INITIAL:0,STREAM_METADATA_LOADED:1,INITIALIZED:2},this._state=this.STATES.INITIAL}h.inherits(g,p),g.prototype.loadStream=function(t){var e=this;t&&e._state===e.STATES.INITIAL&&(e._createStreamLoader(t).load(t),e._loadingStreamsTotal++,Object.keys(t.altRenditionGroups).forEach(function(n){var i=t.getAlternateStream(n);i&&i.url&&(e._createStreamLoader(i).load(i),e._loadingStreamsTotal++)}))},g.prototype.loadAllSubtitleStreams=function(){var t=this;if(t._state===t.STATES.INITIAL){var e=[];t._model.streams.forEach(function(n){var i=n.getAlternateStream(d.SUBTITLES);i&&e.indexOf(i.url)<0&&(e.push(i.url),t._createStreamLoader(i).load(i),t._loadingStreamsTotal++)}),t._state=t.STATES.STREAM_METADATA_LOADED,t.publish(v.STREAM_METADATA_LOADED)}},g.prototype._createStreamLoader=function(t){var e=this.__controller.create(l,this._commandManager);return e.addEventListener(c.STREAM_LOADED,this._onStreamLoaded,this),e.addEventListener(c.STREAM_LOAD_ERROR,this._onStreamLoadError,this),this._streamLoaders[t.url]=e,t.type===d.SUBTITLES&&this._loadedStreamCount++,e},g.prototype._destroyStreamLoaders=function(){var t=this;Object.keys(t._streamLoaders).forEach(function(e){var n=t._streamLoaders[e];n&&n.destroy()}),t._streamLoaders={},t._loadingStreamsTotal=0},g.prototype._onStreamLoaded=function(t){if(t){var e=this._streamLoaders[t.url];if(e){if(this._state>=this.STATES.STREAM_METADATA_LOADED)return e.destroy(),delete this._streamLoaders[t.url],void this._model.synchStreamTimelines(t.type);t.type!==d.SUBTITLES&&this._loadedStreamCount++,this._loadedStreamCount>=this._loadingStreamsTotal&&(this._state=this.STATES.STREAM_METADATA_LOADED,this._model.synchStreamTimelines(),this.publish(v.STREAM_METADATA_LOADED)),e.destroy(),delete this._streamLoaders[t.url]}}},g.prototype._onStreamLoadError=function(t,e){t&&t.type===d.SUBTITLES||(this._state=this.STATES.ERROR,this.publish(v.STREAM_METADATA_LOAD_ERROR,e))},g.prototype.init=function(){var t=this;if(t._state!==t.STATES.ERROR&&t._state!==t.STATES.INITIALIZED){var e=t._model.getCurrentLoadingStream();if(e){t._loadedStreamCount=0;var n=t._createStreamer(e);n.addEventListener(i.PRELOAD_COMPLETE,t._onPreloadComplete,t),n.addEventListener(i.LIVE_SYNCH,t._onSynchBegin,t),t._streamers.MAIN=n,t._primaryStreamer=n,t._streamerCount++,Object.keys(e.altRenditionGroups).forEach(function(n){var i=e.getAlternateStream(n);if(i){var r=t._createStreamer(i);r&&(t._streamers[n]=r,t._streamerCount++)}}),t._setAltAudioActive(),t._switchStream(),t._state=t.STATES.INITIALIZED}}},g.prototype.isInitialized=function(){return this._state>=this.STATES.INITIALIZED},g.prototype._createStreamer=function(t){if(!t)return null;var e=r.create(this.__controller,t,this._model.live);return this._addStreamerEventListeners(e),e},g.prototype._destroyStreamers=function(){var t=this;Object.keys(t._streamers).forEach(function(e){t._streamers[e].destroy()}),t._streamers={},t._primaryStreamer=null},g.prototype._addStreamerEventListeners=function(t){var e=this;if(t){var n={};n[i.SEG_LOAD_START]=e._onSegLoadStart,n[i.SEG_LOAD_PROGRESS]=e._onSegLoadProgress,n[i.SEG_LOAD_COMPLETE]=e._onSegLoadComplete,n[i.SEG_LOAD_ERROR]=e._onSegLoadError,n[i.STREAM_LOAD_ERROR]=e._onStreamerStreamLoadError,n[i.STREAM_LOAD_COMPLETE]=e._onStreamerStreamLoadComplete,Object.keys(i).forEach(function(r){var o=i[r];t.addEventListener(o,n[o],e)})}},g.prototype._setAltAudioActive=function(){var t=this._streamers.AUDIO;this._primaryStreamer&&this._primaryStreamer.setAltAudioActive(t&&t.isActive())},g.prototype._callStreamers=function(){var t=this,e=Array.prototype.slice.call(arguments),n=e.shift(),i=t._primaryStreamer;i&&i[n]&&"function"==typeof i[n]&&i[n].apply(i,e),Object.keys(t._streamers).forEach(function(r){r!==d.MAIN&&(i=t._streamers[r])&&i[n]&&"function"==typeof i[n]&&i[n].apply(i,e)})},g.prototype.process=function(){this._callStreamers("process"),this._switchScenario=this._switchManager.SCENARIOS.LOAD},g.prototype.setABRMode=function(t){var e=this._model;e.setABRMode(t)&&e.getABRMode()!==m.AUTO&&(this._manualStreamChange=!0,this.__controller.sendMessage(y.MessageIds.PAUSE_BEFORE_STREAM_CHANGE,["video"],["streamType"]),this._switching=!1,this._switchStream(),this._callStreamers("onManualStreamChange"))},g.prototype.setAudioLanguage=function(t){var e=this._model;if(e.setAudioLanguage(t)){this._manualStreamChange=!0,this.__controller.sendMessage(y.MessageIds.PAUSE_BEFORE_STREAM_CHANGE,["audio"],["streamType"]);var n=d.AUDIO,i=e.getCurrentLoadingStream(),r=i?i.getAlternateStream(n):null,o=this._streamers[n];r&&o&&o.setCurrentStream(r),this._setAltAudioActive(),this._callStreamers("onManualStreamChange")}},g.prototype.getMetrics=function(){return this._metrics.getMetrics()},g.prototype.onPlay=function(t){this._loadMonitorTimer.start(),this._isAllStreamersReady()?(this._callStreamers("onPlay",t),this._paused=!1,this._manualStreamChange=!1):this._jobQueue.push([this,this.onPlay,[t]])},g.prototype.onPlaying=function(){this._callStreamers("onPlaying")},g.prototype.onPause=function(){this._loadMonitorTimer.stop(),this._callStreamers("onPause"),this._paused=!0},g.prototype.onSeeking=function(t){this._model.live||this._switchStream(),this._callStreamers("onSeeking",t)},g.prototype.onSeeked=function(t){this._callStreamers("onSeeked",t)},g.prototype.onComplete=function(){this._metrics.onComplete(),this._callStreamers("onComplete")},g.prototype.onError=function(){this._callStreamers("onError")},g.prototype.onTimeUpdate=function(t){this._callStreamers("onTimeUpdate",t),this._metrics.onTimeUpdate(t)},g.prototype.onSynchMetadataReady=function(t){this._switchStream(),this._callStreamers("onSynchMetadataReady",t)},g.prototype.onSynchComplete=function(){this._callStreamers("onSynchComplete")},g.prototype.onPreloadBegin=function(){this._callStreamers("onPreloadBegin")},g.prototype.onPreloadEnd=function(){this._callStreamers("onPreloadEnd")},g.prototype._onErrorSwitch=function(t){this._switching=!1,this._switchStream(this._switchManager.SCENARIOS.ERROR,{index:t})},g.prototype._onSwitchBegin=function(){var t=this,e=t._model.getCurrentLoadingStream();t._switching=!0,t._primaryStreamer.setCurrentStream(e),Object.keys(e.altRenditionGroups).forEach(function(n){var i=e.getAlternateStream(n);i&&t._streamers[n]&&t._streamers[n].setCurrentStream(i)}),t._setAltAudioActive()},g.prototype._onSwitchEnd=function(){this._switching=!1,this._callStreamers("onSwitchEnd")},g.prototype._onLoadMonitor=function(){var t=this._primaryStreamer?this._primaryStreamer.getSegLoadCommand():null;t&&this._switchStream(this._switchManager.SCENARIOS.MIDSEGMENT,{command:t,position:t.position})},g.prototype._setSegLoadMetrics=function(t,e,n,i,r){var o=this._model.getCurrentLoadingStream(),s=o?o.getSegmentfromSeqNum(e):null,a={bitrateIndex:o?o.index:0,frameRate:o?o.frameRate:30,bytesTotal:n};"firstByte"===t?(a.beginTime=s?s.startTime:NaN,a.switchReason="none",a.observedBitrate=this._services.bandwidthEstimator.averageBandwidth,a.timeToFirstByte=s?s.timeToFirstByte:NaN,a.endTime=s?s.startTime+s.duration:NaN,this._metrics.segmentLoadBegin(e,a)):"end"===t&&(a.perfInfo=r,a.timeToDownload=s?s.totalDownloadTime:NaN,a.segmentInWorker=!!i,this._metrics.segmentLoadEnd(e,a))},g.prototype._resetLoadMonitorTimer=function(){this._loadMonitorTimer.reset(),this._paused||this._errorHandler.running||this._loadMonitorTimer.start()},g.prototype._switchStream=function(t,e){if(t=t||this._switchScenario,!this._switching)if(t!==this._switchManager.SCENARIOS.MIDSEGMENT){var n=e?e.index:null;this._switchManager.switchStream(t,null,n)}else{var i=e?e.command:null,r=e?e.position:null;this._abortAndSwitchStream(t,i,r)}},g.prototype._abortAndSwitchStream=function(t,e,n){if("end"!==n&&(this._primaryStreamer&&this._primaryStreamer.canSwitch(t)&&this._switchManager.switchStream(t,"down"))){console.log("[debug] _abortAndSwitchStream happened");var i=this._primaryStreamer.abortCurrentSegment(e);i&&this._setSegLoadMetrics("end",i),this.process()}},g.prototype._onSegLoadStart=function(){this._resetLoadMonitorTimer()},g.prototype._onSegLoadProgress=function(t,e){if(this._isPrimaryStreamer(t)&&e){this.publish(v.SEG_LOAD_PROGRESS,e.bytesTotal),"firstByte"===e.position&&this._switchManager.switchComplete();var n=e.position,i=e.bytesTotal,r=e.inWorkerScope,o=e.perfInfo,s=e.seqNum;this._setSegLoadMetrics(n,s,i,r,o),this._resetLoadMonitorTimer()}},g.prototype._onSegLoadComplete=function(t){this._checkAndStopErrorHandling(),this._isPrimaryStreamer(t)&&this._switchStream()},g.prototype._onSegLoadError=function(t,e){this._isPrimaryStreamer(t)&&this._setSegLoadMetrics("end",e.seqNum),this._handleError(e.err,e.stream)},g.prototype._onStreamerStreamLoadComplete=function(t,e){if(this._checkAndStopErrorHandling(),this._isPrimaryStreamer(t)||this._model.synchStreamTimelines(t.type),this.__controller.sendEvent(f.STREAM_UPDATED,e),this._jobQueue.length>0&&this._flushJobQueue(),this._manualStreamChange){for(var n=0,i=Object.keys(this._streamers),r=0;r<this._streamerCount;r++)this._streamers[i[r]].isActive()&&n++;++this._loadedStreamCount>=n&&(this._loadedStreamCount=0,this.__controller.sendMessage(y.MessageIds.PLAY_AFTER_STREAM_CHANGE))}},g.prototype._onStreamerStreamLoadError=function(t,e){this._handleError(e.err,e.stream)},g.prototype._handleError=function(t,e){this._loadMonitorTimer.stop(),this._errorHandler.handle(t,e)},g.prototype._checkAndStopErrorHandling=function(){var t=this,e=!0;t._errorHandler.running&&(Object.keys(t._streamers).forEach(function(n){var i=t._streamers[n],r=i?i.getCurrentStream():null;r&&r.type!==d.SUBTITLES&&(e=e&&!i.isInError())}),e&&(t._errorHandler.onLoadComplete(),t._resetLoadMonitorTimer()))},g.prototype._onPreloadComplete=function(){this.onPreloadEnd(),this.publish(v.PRELOAD_COMPLETE)},g.prototype._onSynchBegin=function(t,e){this._isPrimaryStreamer(t)&&this.__controller.sendEvent(f.LIVE_SYNCH,e)},g.prototype._isPrimaryStreamer=function(t){return t&&t.type===d.MAIN},g.prototype._isAllStreamersReady=function(){var t=this;if(t._state!==t.STATES.INITIALIZED)return!1;var e=!0;return Object.keys(t._streamers).forEach(function(n){if(n!==d.SUBTITLES){var i=t._streamers[n];e=e&&(!i.isActive()||i.isStreamReady())}}),e},g.prototype._flushJobQueue=function(){var t=this._jobQueue;this._jobQueue=[],t.forEach(function(t){var e=t[0],n=t[1],i=t.length>2?t[2]:null;n&&"function"==typeof n&&n.apply(e,i)})},g.prototype.destroy=function(){this._destroyStreamers(),this._destroyStreamLoaders(),this._errorHandler&&(this._errorHandler.destroy(),this._errorHandler=null),this._commandManager&&(this._commandManager.destroy(),this._commandManager=null),this._switchManager&&(this._switchManager.destroy(),this._switchManager=null),this._loadMonitorTimer.destroy(),this._jobQueue=[],p.prototype.destroy.call(this)}},function(t,e,n){"use strict";function i(t){t&&(this.startSeqNum=t.startSeqNum,this.startTime=t.startTime,this.cuepointDuration=t.cuepointDuration,this.isCueOutFired=!1,this.isCueOutDetectedFired=!1)}t.exports=i,i.prototype.setCueOutFiredState=function(t){this.isCueOutFired=t},i.prototype.setCueOutDetectedState=function(t){this.isCueOutDetectedFired=t},i.prototype.setCueOutStartTime=function(t){this.startTime=t},i.prototype.dto=function(){var t=this,e={};return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}},function(t,e,n){"use strict";t.exports={ftyp:{fullBox:!1,properties:{majorBrand:{length:32,type:"string"},minorVersion:{length:32},compatibleBrands:{type:"array",itemSchema:{length:32,type:"string"}}}},moov:{fullBox:!1},styp:{fullBox:!1,properties:{majorBrand:{length:32,type:"string"},minorVersion:{length:32},compatibleBrands:{type:"array",itemSchema:{length:32,type:"string"}}}},moof:{fullBox:!1},mdat:{fullBox:!1},sidx:{fullBox:!0,properties:{referenceId:{length:32},timescale:{length:32},earliestPresentationTime:{length:32},firstOffset:{length:32},reserved:{length:16},referenceCount:{length:16},referenceData:{type:"array",lengthField:"referenceCount",itemSchema:{referenceType:{length:1},referencedSize:{length:31},subsegmentDuration:{length:32},startsWithSAP:{length:1},sapType:{length:3},sapDeltaTime:{length:28}}}}},emsg:{fullBox:!0,properties:{schemeIdUri:{type:"string"},value:{type:"string"},timescale:{length:32},presentationTimeDelta:{length:32},eventDuration:{length:32},id:{length:32},message:{type:"array",itemSchema:{length:8}}}},trak:{fullBox:!1,parents:["moov"]},mdia:{fullBox:!1,parents:["trak"]},mvhd:{fullBox:!0,parents:["moov"],properties:{creationTime:{length:32},modificationTime:{length:32},timescale:{length:32},duration:{length:32},rate:{length:32},volume:{length:16},reserved:{length:80},matrix:{type:"array",length:9,itemSchema:{length:32}},preDefined:{length:192},nextTrackId:{length:32}}},mdhd:{fullBox:!0,parents:["mdia"],properties:{creationTime:{length:32},modificationTime:{length:32},timescale:{length:32},duration:{length:32},language:{length:16},preDefined:{length:16}}},esds:{fullBox:!0,parents:["mp4a","enca"],properties:{descriptorTag:{length:8},descriptorLength:{length:8},esId:{length:16},streamPriority:{length:8},decoderConfigDesc:{length:8},decoderConfigLength:{length:8},codecTag:{length:8},streamType:{length:8},bufferSize:{length:8},bufferSize2:{length:16},maxBitrate:{length:32},avgBitrate:{length:32},decoderInfoDescriptor:{length:8},decoderInfoDescriptorLength:{length:8},audioSpecificConfig0:{length:8},audioSpecificConfig1:{length:8},audioSpecificConfig2:{length:8,validator:248,validationProperty:"audioSpecificConfig0",validationResult:40},audioSpecificConfig3:{length:8,validator:248,validationProperty:"audioSpecificConfig0",validationResult:40},slDescriptor:{length:8},slDescriptorLength:{length:8},slValue:{length:8}}},mp4a:{fullBox:!1,parents:["stsd"],payload:28,properties:{reserved0:{length:48},dataReferenceIndex:{length:16},reserved1:{length:32},reserved2:{length:32},channelCount:{length:16},sampleSize:{length:16},predefined:{length:16},reserved3:{length:16},sampleRate:{length:32}}},enca:{fullBox:!1,parents:["stsd"],payload:28,properties:{reserved0:{length:48},dataReferenceIndex:{length:16},reserved1:{length:32},reserved2:{length:32},channelCount:{length:16},sampleSize:{length:16},predefined:{length:16},reserved3:{length:16},sampleRate:{length:32}}},stsd:{fullBox:!0,parents:["stbl"],payload:4,properties:{entryCount:{length:32}}},stbl:{fullBox:!1,parents:["minf"]},minf:{fullBox:!1,parents:["mdia"]},traf:{fullBox:!1,parents:["moof"]},tfdt:{fullBox:!0,parents:["traf"],properties:{baseMediaDecodeTime:{length:32}}},tfhd:{fullBox:!0,parents:["traf"],properties:{trackId:{length:32},baseDataOffset:{length:64,validator:1},sampleDescriptionIndex:{length:32,validator:2},defaultSampleDuration:{length:32,validator:8},defaultSampleSize:{length:32,validator:16},defaultSampleFlags:{length:32,validator:32}}},trun:{fullBox:!0,parents:["traf"],properties:{sampleCount:{length:32},dataOffset:{validator:1,length:32},firstSampleFlags:{validator:4,length:32},sampleData:{type:"array",lengthField:"sampleCount",itemSchema:{sampleDuration:{validator:256,length:32},sampleSize:{validator:512,length:32},sampleFlags:{validator:1024,length:32},sampleCompositionTimeOffset:{validator:2048,length:32}}}}},vttc:{fullBox:!1},vtte:{fullBox:!1},vsid:{fullBox:!1,parents:["vttc"],properties:{sourceId:{length:32}}},ctim:{fullBox:!1,parents:["vttc"],properties:{cueTime:{type:"boxstring"}}},payl:{fullBox:!1,parents:["vttc"],properties:{cueText:{type:"boxstring"}}},iden:{fullBox:!1,parents:["vttc"],properties:{cueId:{type:"boxstring"}}},sttg:{fullBox:!1,parents:["vttc"],properties:{settings:{type:"boxstring"}}}}},function(t,e,n){"use strict";t.exports=r;var i=n(94);function r(){this._cache={}}r.prototype.destroy=function(){var t=this;Object.keys(t._cache).forEach(function(e){var n=t._cache[e];n&&n.destroy()}),t._cache={}},r.prototype.add=function(t){if(!t||!t.url)return null;var e=this._hash(t);return this._cache[e]||(this._cache[e]=new i({name:"init",url:t.url,range:t.range})),this._cache[e]},r.prototype.remove=function(t){if(t&&t.url){var e=this._hash(t);(t=this._cache[e])&&(t.destroy(),delete this._cache[e])}},r.prototype.get=function(t){if(!t||!t.url)return null;var e=this._hash(t);return this._cache[e]},r.prototype.getFirst=function(){var t=Object.keys(this._cache);return t&&t.length?this._cache[t[0]]:null},r.prototype._hash=function(t){var e=t.range,n=e?"_"+e.start+"_"+e.end:"";return t.url+n}},function(t,e,n){"use strict";t.exports=a;var i=n(173),r=n(12).HLSEvent,o=n(20).StreamTypes,s=n(95);function a(t,e,n,a){var u=this;if(u.type=t,u.groupId=e,u._altStreams=[],u._updater=u.__controller.create(s),n){n.forEach(function(t){var e=u.__controller.create(i,t);u._altStreams.push(e),u._updater.addStream(e)});var l=u._selectStream("default");l||(l=u._selectStream("autoSelect")),l&&(u.setCurrentStream(l),l.type===o.SUBTITLES&&u.__controller.sendEvent(r.CC_VTT_AVAILABLE,{sessionId:u.__controller.model.sessionId})),t===o.AUDIO&&(a&&u.setCurrentStreamWithName(a),u._checkMultiLanguages())}u._isValid()||console.warn("[AltRenditionGroup] Not a valid alternative rendition group")}a.prototype._selectStream=function(t){for(var e=0;e<this._altStreams.length;e++)if(this._altStreams[e][t])return this._altStreams[e];return null},a.prototype.destroy=function(){this._altStreams.forEach(function(t){t.destroy()}),this._altStreams=[],this._updater.destroy()},a.prototype.getCurrentStream=function(){return this._currentStream},a.prototype.setCurrentStream=function(t){t&&(this._currentStream=t)},a.prototype.setCurrentStreamWithName=function(t){if(!t||!this._currentStream||t===this._currentStream.name)return!1;for(var e=0;e<this._altStreams.length;e++){var n=this._altStreams[e];if(t===n.name)return this.setCurrentStream(n),!0}return!1},a.prototype.update=function(t){this._updater.update(t)},a.prototype.adjustStartTime=function(t,e){var n=this;n._altStreams.forEach(function(i){i.adjusted||n._updater.adjustStartTime(i,t,e)})},a.prototype.getContainerFormat=function(){return this._currentStream?this._currentStream.containerFormat:null},a.prototype.setContainerFormat=function(t){this._altStreams.forEach(function(e){e.containerFormat||(e.containerFormat=t)})},a.prototype.getDrmInfo=function(){for(var t=[],e=0;e<this._altStreams.length;e++){var n=this._altStreams[e].drmInfo;if(!n)break;for(var i=0;i<n.length;i++)t.push(n[i])}return t},a.prototype._isValid=function(){return!0},a.prototype._checkMultiLanguages=function(){var t=this,e={},n=[];t._altStreams.forEach(function(i){e[i.name]||(e[i.name]=1,n.push({name:i.name,language:i.language,selected:t._currentStream&&i.name===t._currentStream.name}))}),n.length>1&&t.__controller.sendEvent(r.MULTI_LANGUAGES_AVAILABLE,{sessionId:t.__controller.model.sessionId,languages:n})}},function(t,e,n){"use strict";t.exports=d;var i=n(93),r=n(174),o=n(3),s=n(14),a=n(20),u=a.Stream,l=a.StreamTypes,c=n(17).StreamingMode;function d(t){this.constructor.super_.call(this),this._super=this.constructor.super_.prototype,this.segments=[],t&&this.updateConfig(t)}o.inherits(d,u),d.prototype.destroy=function(){this.segments=[],this._super.destroy.call(this)},d.prototype.updateConfig=function(t){var e=this;e._super.updateConfig.call(e,t),t&&(e.type=t.type||e.type,e.groupId=t.groupId||e.groupId,e.language=t.language||e.language,e.name=t.name||e.name,e.default=s.isNullOrUndefined(t.default)?e.default:t.default,e.autoSelect=s.isNullOrUndefined(t.autoSelect)?e.autoSelect:t.autoSelect,e.forced=s.isNullOrUndefined(t.forced)?e.forced:t.forced);var n=i;e.type===l.SUBTITLES&&(n=e.streamingMode===c.DASH&&"mp4"===t.containerFormat?i:r),t.segmentInfoList&&t.segmentInfoList.length&&(e.segments=t.segmentInfoList.map(function(t){return t.bitrate=e.bitrate,t.sessionId=e.sessionId,t.cdn=e.cdn,e.__controller.create(n,t)})),e.segments.length&&(e.startSeqNum=e.segments[0].seqNum,e.endSeqNum=e.segments[e.segments.length-1].seqNum),e.adjusted=e.type===l.MAIN||e.adjusted},d.prototype.equals=function(t){return!!t&&(this.url===t.url&&this.groupId===t.groupId&&this.name===t.name)},d.prototype.setStreamIndex=function(){},d.prototype.dto=function(){}},function(t,e,n){"use strict";function i(t){t&&(this.discontinuity=t.discontinuity,this.seqNum=t.sequenceNum,this.startTime=t.startTime,this.programDateTime=t.programDateTime,this.url=t.url,this.duration=t.duration),this.clockReference=0,this.localCueTime=0,this.mpegTSTime=0,this.offset=0,this.adjustedTime=0}t.exports=i,i.prototype.destroy=function(){this.data=null},i.prototype.toObject=function(){var t={};return t.discontinuity=this.discontinuity,t.sequenceNum=this.seqNum,t.startTime=this.startTime,t.programDateTime=this.programDateTime,t.url=this.url,t.duration=this.duration,t.playlistUrl=this.playlistUrl,t.clockReference=this.clockReference,t.localCueTime=this.localCueTime,t.mpegTSTime=this.mpegTSTime,t.data=this.data,t.offset=this.offset,t.adjustedTime=this.adjustedTime,t},i.prototype.parseSegment=function(){if(this.data){var t=this.data.split("\n");if(!(t.length<=0)&&0===t[0].indexOf("WEBVTT")){for(var e=Math.floor((Math.pow(2,33)-1)/90),n=0,i=0,r=1;r<t.length;r++){var o=t[r].trim();if(0===o.indexOf("X-TIMESTAMP-MAP")){var s=new RegExp(/LOCAL[:=]([^,]+)/),a=new RegExp(/MPEGTS[:=]([^,]+)/);i=0,n=0;var u=s.exec(o);if(u&&u.length>=2){var l=u[1].split(":");if(l&&l.length>=3){var c=l[2].split("."),d=0,h=0;c&&c.length>=2&&(d=parseInt(c[0]),h=parseInt(c[1])),i=1e3*(3600*l[0]+60*l[1]+d)+h,i%=e}}var p=a.exec(o);p&&p.length>=2&&(n=parseFloat(p[1]),n=Math.round(n/90)),this.clockReference=this.pcr(),this.localCueTime=i,this.mpegTSTime=n,null!==this.clockReference&&void 0!==this.clockReference||console.warn("[VTTSegment] PCR is not available")}else if(o.indexOf("--\x3e")>=0){var f=o.split("--\x3e");if(f){var _=f[0].split(":");if(_){var m=1e3*(3600*parseInt(_[0])+60*parseInt(_[1])+parseFloat(_[2]));null!==this.clockReference&&void 0!==this.clockReference||(this.clockReference=m%e+this.mpegTSTime)}}break}}this.adjustedTime=n-i-this.clockReference+this.offset}}},i.prototype.pcr=function(){if(!this.__controller)return 0;var t=this.__controller.model,e=t.getPCR();if("number"!=typeof e)return null;if(e=e/this.__controller.model.timescale*1e3,t.live&&e<0){var n=-Math.floor(Math.pow(2,32)/90),i=Math.floor((Math.pow(2,32)-1)/90);e=Math.abs(e-n)+i}return e},i.prototype.isBuffered=function(){return!!this.data}},function(t,e,n){"use strict";var i=n(10).CmdNames,r=n(176);t.exports.create=function(t,e,n){for(var o in i){if(i.hasOwnProperty(o))if(i[o]===t)return new(0,r[t+"Command"])(e,n)}return null}},function(t,e,n){"use strict";t.exports={Command:n(10),MediaLoadCommand:n(177),StreamLoadCommand:n(178),LicenseLoadCommand:n(179),SegmentLoadCommand:n(97),Mp4InitSegmentLoadCommand:n(189),SubtitleSegmentLoadCommand:n(190),ErrorHandleCommand:n(191)}},function(t,e,n){"use strict";t.exports=l;var i=n(3),r=n(35).Events,o=n(10),s=o.Command,a=o.CmdNames,u=o.CmdEvents;function l(t,e){if(!t||!t.url||!t.controller)throw new Error("Invalid argument: data argument of the command is not complete");s.call(this,t,e),this.name=a.CMD_MEDIA_LOAD,this._loader=t.controller.services.getNewLoader(t)}i.inherits(l,s),l.prototype.destroy=function(){this._loader.destroy(),s.prototype.destroy.call(this)},l.prototype.execute=function(){var t=this,e=t.data.url;t._loader.addEventListener(r.COMPLETE,function(e){t.publish(u.CMD_COMPLETE,t,e)},t),t._loader.addEventListener(r.ERROR,function(e){t.publish(u.CMD_ERROR,t,e)},t),t._loader.load(e)},l.prototype.cancel=function(){}},function(t,e,n){"use strict";t.exports=l;var i=n(3),r=n(35).Events,o=n(10),s=o.Command,a=o.CmdNames,u=o.CmdEvents;function l(t,e){if(!(t&&t.stream&&t.stream.url&&t.controller))throw new Error("Invalid argument: data argument of the command is not complete");s.call(this,t,e),this.name=a.CMD_STREAM_LOAD,this._loader=t.controller.services.getNewLoader(t.retryOpts)}i.inherits(l,s),l.prototype.destroy=function(){this._loader.destroy(),s.prototype.destroy.call(this)},l.prototype.execute=function(){var t=this,e=t.data.stream.url;t._loader.addEventListener(r.COMPLETE,function(n){t.publish(u.CMD_COMPLETE,t,{data:n.data,headers:n.headers,streamUrl:e,stream:t.data.stream})},t),t._loader.addEventListener(r.ERROR,function(e){t.publish(u.CMD_ERROR,t,e)},t),t._loader.load(e)},l.prototype.cancel=function(){}},function(t,e,n){"use strict";t.exports=l;var i=n(3),r=n(35).Events,o=n(10),s=o.Command,a=o.CmdNames,u=o.CmdEvents;function l(t,e){if(!t||!t.controller)throw new Error("Invalid argument: data argument of the command is not complete");s.call(this,t,e),this._maxRetries=1,this._retryExclusion=[403],this.name=a.CMD_LICENSE_LOAD,this._loader=t.controller.services.getNewLoader(this._configureLoaderOptions())}i.inherits(l,s),l.prototype.destroy=function(){this._loader.destroy(),s.prototype.destroy.call(this)},l.prototype.execute=function(){var t=this,e=t.data.url;t._loader.addEventListener(r.COMPLETE,function(e){t.publish(u.CMD_COMPLETE,t,e)},t),t._loader.addEventListener(r.ERROR,function(e){t.publish(u.CMD_ERROR,t,e)},t),t._loader.load(e,t.data.challenge)},l.prototype.cancel=function(){},l.prototype._configureLoaderOptions=function(){return{method:"POST",responseType:"arraybuffer",headerFields:this.data.headerFields,url:this.data.url,maxRetries:this._maxRetries,retryExclusion:this._retryExclusion}}},function(t,e,n){"use strict";t.exports=u;var i=n(181),r=n(36),o=n(3),s=n(16),a=n(187);function u(t){if(!t)throw new Error("Invalid argument: data argument of the ProcessorChain is not complete");var e=this;e._config=t,e._preProcessor=null,e._processor=null,s.call(e,e.constructor.name),t.encryptionData&&(e._preProcessor=e.__controller.create(a,t.encryptionData)),e._processor=i.create(e.__controller,t.containerFormat,t),e._preProcessor&&e._processor.setSource(e._preProcessor),e._first=e._preProcessor||e._processor,e._last=e._processor,e._last&&(e._last.addEventListener(r.DATA_PROCESS_PROGRESS,function(t,n){e.publish(r.DATA_PROCESS_PROGRESS,t,n)},e),e._last.addEventListener(r.DATA_PROCESS_COMPLETE,function(t){e.publish(r.DATA_PROCESS_COMPLETE,t)},e),e._last.addEventListener(r.DATA_PROCESS_ERROR,function(){e.publish(r.DATA_PROCESS_ERROR)},e))}o.inherits(u,s),u.prototype.destroy=function(){this._preProcessor&&(this._preProcessor.destroy(),this._preProcessor=null),this._processor&&(this._processor.destroy(),this._processor=null),this._first=null,this._last=null,s.prototype.destroy.call(this)},u.prototype.append=function(t){this._first&&this._first.append(t)},u.prototype.close=function(){this._first&&this._first.close()},u.prototype.endOfSegment=function(){this._first&&this._first.endOfSegment()}},function(t,e,n){"use strict";var i=n(182),r=n(184),o=n(186);t.exports.create=function(t,e,n){if(!t||!e||"function"!=typeof t.create)return null;var s;switch(e){case"mp4":s=o;break;case"aac":s=r;break;default:case"ts":s=i}return t.create(s,n)}},function(t,e,n){"use strict";t.exports=a;var i=n(183),r=n(3),o=n(16),s=n(36);function a(t){o.call(this,this.constructor.name),this._config=t,this._hlsTransformer=this.__controller.create(i,t,this._onTransformProgress.bind(this))}r.inherits(a,o),a.prototype.destroy=function(){this._hlsTransformer.destroy(),o.prototype.destroy.call(this)},a.prototype.setSource=function(t){this._source=t,this._addEventListeners()},a.prototype._addEventListeners=function(){var t=this;t._source&&(t._source.addEventListener(s.DATA_PROCESS_PROGRESS,function(e){t.append(e)},t),t._source.addEventListener(s.DATA_PROCESS_COMPLETE,function(){t.endOfSegment()},t),t._source.addEventListener(s.DATA_PROCESS_ERROR,function(e){t.publish(s.DATA_PROCESS_ERROR,e)},t))},a.prototype.close=function(){this._hlsTransformer.close()},a.prototype.append=function(t){this._hlsTransformer.append(t)},a.prototype.endOfSegment=function(){this._hlsTransformer.endOfSegment()},a.prototype._onTransformProgress=function(t){var e;t&&(this.publish(s.DATA_PROCESS_PROGRESS,t),t.getParam&&(e=t.getParam("parsedInfo")),"end"===(e?e.position:t.position)&&this.publish(s.DATA_PROCESS_COMPLETE,t))}},function(t,e,n){"use strict";t.exports=u;var i=n(63),r=n(21),o=n(3),s=n(98),a=n(34);function u(t,e){if(this._model=this.__controller.model,this._useWorker=this._model.config.useWorker,this._userAgent=this._model.userAgent,this._moduleName="HlsTransformer",this._instanceId=o.guid(),this._properties=t,this._callback=e,this.MIN_BUFFER_LENGTH=5,this._shouldUseWorker()){if(this._worker=this.__controller.services.getWorker(this._moduleName),this._worker)return this._worker.addEventListener("message",this._onMessage.bind(this)),void this._sendMessage(r.MessageIds.CREATE,[t]);this._model.config.useWorker=!1}this._transformer=new i(t,e),this._useWorker=!1}u.prototype.destroy=function(){this._useWorker&&this._worker?this._sendMessage(r.MessageIds.DESTROY):this._transformer.destroy()},u.prototype.close=function(){this._useWorker&&this._worker?this._sendMessage(r.MessageIds.CALL_METHOD,null,"close"):this._transformer.close()},u.prototype.append=function(t){this._useWorker&&this._worker?this._sendMessage(r.MessageIds.CALL_METHOD,[t],"append",[t.buffer]):this._transformer.append(t)},u.prototype.endOfSegment=function(){this._useWorker&&this._worker?this._sendMessage(r.MessageIds.CALL_METHOD,null,"endOfSegment"):this._transformer.endOfSegment()},u.prototype._onMessage=function(t){if(t){var e=t.data?new a(t.data):t;if(e&&e.instanceId===this._instanceId&&(e.id===r.MessageIds.APPEND_SRC_BUFFER||e.id===r.MessageIds.TIMED_METADATA)){var n=e.getParam("parsedInfo");n&&(n.inWorkerScope=!0),this._callback(e)}}},u.prototype._shouldUseWorker=function(){return!!this._useWorker&&(this._userAgent.chrome&&!this._userAgent.win7?this._useWorker=!(this.__controller&&this.__controller.getState()>=s.PLAY_REQUESTED)||this._model.bufferLength>this.MIN_BUFFER_LENGTH:this._useWorker=!1,this._useWorker)},u.prototype._sendMessage=function(t,e,n,i){if(this._worker&&t){var o={type:r.MessageTypes.MESSAGE,id:t,moduleName:this._moduleName,instanceId:this._instanceId,funcName:n,args:e,timestamp:Date.now()};this._worker.postMessage(o,i)}}},function(t,e,n){"use strict";t.exports=c;var i=n(185),r=n(3),o=n(14),s=n(16),a=n(36),u=n(64).AACStream,l=n(12).HLSEvent.PCR_AVAILABLE;function c(t){s.call(this,this.constructor.name),this._config=t,this._data=null,this._position="start",this._stream=new u,this._endOfSegment=!1,this._eventKeys={},this._converter=this.__controller.create(i,t,this._onTransformProgress.bind(this)),this._lastAudioTimestamp=t.lastAudioTimestamp,this._lastAudioFrameDuration=t.lastAudioFrameDuration,o.isNullOrUndefined(this._config.pcr)&&(this._eventKeys[l]=this.__controller.addEventListener(l,this._onPcrAvailable,this))}r.inherits(c,s),c.prototype.destroy=function(){this.close(),this._converter.destroy(),this._stream.destroy(),s.prototype.destroy.call(this)},c.prototype.setSource=function(t){this._source=t,this._addEventListeners()},c.prototype._addEventListeners=function(){var t=this;t._source&&(t._source.addEventListener(a.DATA_PROCESS_PROGRESS,function(e){t.append(e)},t),t._source.addEventListener(a.DATA_PROCESS_COMPLETE,function(){t.endOfSegment()},t),t._source.addEventListener(a.DATA_PROCESS_ERROR,function(e){t.publish(a.DATA_PROCESS_ERROR,e)},t))},c.prototype.close=function(){this._data=null,this.__controller.removeEventListener(l,this._eventKeys[l]),this._converter.close()},c.prototype.append=function(t){if(t){var e=t.length;if(e){var n=null,i=0;this._data&&(i=(n=this._data).length);var r=i+e;this._data=new Uint8Array(r),n&&this._data.set(n),this._data.set(t,i),this._parse()}}},c.prototype._onPcrAvailable=function(t){this._config.pcr=t,this._parse(),this.__controller.removeEventListener(l,this._eventKeys[l])},c.prototype._parse=function(){var t=this._config.pcr;if(!o.isNullOrUndefined(t)){if(this._data&&this._data.length>0){var e;e=this._lastAudioTimestamp&&this._lastAudioFrameDuration?t+this._lastAudioTimestamp+this._lastAudioFrameDuration:t+this._config.startTime*this._config.timescale;var n=this._stream.readFramesFromBitstream(this._data,e);this._data=this._data.subarray(n)}var i=this._stream.getLastFrameDetails();i&&(this._lastAudioTimestamp=i.timestamp-t,this._lastAudioFrameDuration=i.duration),(this._stream.ready||this._endOfSegment)&&this._sendFrames()}},c.prototype._sendFrames=function(){var t=this._stream.getFrames(),e=t&&t.length>0;if("end"===this._position||e){var n=e?t[0].dts:null,i={audio:{frames:t,config:this._stream.getConfig()},pcr:n};this._converter.processSegmentData({avData:i,pos:this._position}),"start"===this._position&&(this._position="middle")}},c.prototype.endOfSegment=function(){this._position="end",this._endOfSegment=!0,this._parse(),this._converter.endOfSegment()},c.prototype._onTransformProgress=function(t,e){var n;t&&(this.publish(a.DATA_PROCESS_PROGRESS,t,e),t.getParam&&(n=t.getParam("parsedInfo")),"end"===(n?n.position:t.position)&&this.publish(a.DATA_PROCESS_COMPLETE))}},function(t,e,n){"use strict";t.exports=o;var i=n(3),r=n(63);function o(t,e){t.noDemux=!0,this.constructor.super_.call(this,t,e),this._super=this.constructor.super_.prototype}i.inherits(o,r),o.prototype.destroy=function(){this._super.destroy.call(this)}},function(t,e,n){"use strict";t.exports=f;var i=n(14),r=n(3),o=n(16),s=n(36),a=n(49),u=n(90),l=n(21),c=n(34),d=n(89),h=n(64).NAL_UNIT_TYPES,p=n(20).StreamTypes;function f(t){o.call(this,this.constructor.name),this._data=null,this._config=t,this._id3Parser=new u,this._mp4Parser=new a,this._seiParser=new d}r.inherits(f,o),f.prototype.destroy=function(){this._data=null,this._mp4Parser.destroy(),this._seiParser.destroy(),o.prototype.destroy.call(this)},f.prototype.setSource=function(t){this._source=t,this._addEventListeners()},f.prototype._addEventListeners=function(){var t=this;t._source&&(t._source.addEventListener(s.DATA_PROCESS_PROGRESS,function(e){t.append(e)},t),t._source.addEventListener(s.DATA_PROCESS_COMPLETE,function(){t.endOfSegment()},t),t._source.addEventListener(s.DATA_PROCESS_ERROR,function(e){t.publish(s.DATA_PROCESS_ERROR,e)},t))},f.prototype.close=function(){this._data=null},f.prototype.append=function(t){if(t){var e=t.length;if(e){var n=null,i=0;this._data&&(i=(n=this._data).length);var r=i+e;this._data=new Uint8Array(r),n&&this._data.set(n),this._data.set(t,i),this._probeData()}}},f.prototype._probeData=function(){for(;this._data&&this._data.length>=8;){var t=this._data.length,e=new DataView(this._data.buffer),n=this._mp4Parser.parse(this._data,"styp"),i=this._mp4Parser.parse(this._data,"emsg"),r=this._mp4Parser.parse(this._data,"moof"),o=this._mp4Parser.parse(this._data,"ftyp"),a=this._mp4Parser.parse(this._data,"moov");if(o&&a){this._config.userAgent.android&&this._fixAndroidAAC();var u=[];o&&u.push(o),a&&u.push(a);var l=this._getFragmentStart(u),c=this._getFragmentEnd(u),d=new Uint8Array(this._data.buffer.slice(l,c));this.publish(s.DATA_PROCESS_PROGRESS,{position:"init",data:d}),this._data.length>c?this._data=new Uint8Array(this._data.buffer.slice(c)):this._data=null}else{if(!r)return void console.warn("[Fmp4SegmentDataProcessor] Segment does not contain MOOF");var h=this._mp4Parser.findBoxOffset(e,"mdat");if(h<0)return void console.warn("[Fmp4SegmentDataProcessor] Segment does not contain MDAT header");var f=this._mp4Parser.parseHeader(e,"mdat",h),_=[];n&&_.push(n),i&&_.push(i),r&&_.push(r),f&&_.push(f);var m=this._getFragmentStart(_),y=this._getFragmentEnd(_);if(t<y)return;var v=this._getDefaultSampleDuration(),g=this._config.timescale,E=this._getSamplesAndDuration(),b=this._getBaseTime(),A=this._getTotalDuration(E,v);if(this._config.dash){var S=Math.round(this._config.startTime*g),T=this._config.segDuration*g;b!==S&&(b=S,this._setBaseTime(b)),A!==T&&(this._alignSegmentDuration(E,T),A=T)}var I=null;this._config.type!==p.MAIN&&this._config.type!==p.VIDEO||(I=this._parseCea608(h,E,b,g));var C=new Uint8Array(this._data.buffer.slice(m,y));this._position="firstByte"===this._position?"start":"middle",this.publish(s.DATA_PROCESS_PROGRESS,{position:this._position,data:C,cea608TrackData:I,baseTime:b,defaultSampleDuration:v,totalDuration:A,samples:E.samples}),this._config.dash&&i&&this._processMetadata(i),this._data.length>y?this._data=new Uint8Array(this._data.buffer.slice(y)):this._data=null}}},f.prototype.endOfSegment=function(){this._probeData(),this.publish(s.DATA_PROCESS_COMPLETE)},f.prototype._getFragmentStart=function(t){if(!t||!t.length)return 0;var e=Number.POSITIVE_INFINITY;return t.forEach(function(t){e=Math.min(e,t.boxOffset)}),e},f.prototype._getFragmentEnd=function(t){if(!t||!t.length)return 0;var e=0,n=t[0];return t.forEach(function(t){e<t.boxOffset&&(e=t.boxOffset,n=t)}),n.boxOffset+n.boxSize},f.prototype._getBaseTime=function(){var t=this._mp4Parser.parse(this._data,"tfdt");return t?t.baseMediaDecodeTime:0},f.prototype._setBaseTime=function(t){this._mp4Parser.setSingleProp(this._data,"tfdt",{name:"baseMediaDecodeTime",value:t,length:32})},f.prototype._alignSegmentDuration=function(t,e){if(t&&t.totalDuration){var n=e-t.totalDuration,i=t.samples[t.samples.length-1],r=i.duration+n;r<0&&(console.warn("segment duration adjustment greater than a single sample  "+r+" > "+i.duration),r=0),this._mp4Parser.setSingleProp(this._data,"trun",{name:"sampleDuration",value:r,length:32,pos:-1})}},f.prototype._getDefaultSampleDuration=function(){var t=this._mp4Parser.parse(this._data,"tfhd");return t&&t.defaultSampleDuration>0?t.defaultSampleDuration:0},f.prototype._getTotalDuration=function(t,e){return t.totalDuration?t.totalDuration:t.samples.length*e},f.prototype._getSamplesAndDuration=function(){var t=[],e=0,n=this._mp4Parser.parse(this._data,"trun");if(n&&n.sampleData)for(var r=n.sampleData.length,o=n.sampleData,s=0;s<r;s++){var a={};o[s].sampleDuration&&(a.duration=o[s].sampleDuration,e+=a.duration),o[s].sampleSize&&(a.size=o[s].sampleSize),o[s].sampleFlags&&(a.flags=o[s].sampleFlags),i.isNullOrUndefined(o[s].sampleCompositionTimeOffset)||(a.cto=o[s].sampleCompositionTimeOffset),t.push(a)}return{samples:t,totalDuration:e}},f.prototype._processMetadata=function(t){if(t){var e=this._convertFromMediaTimeScale(t.presentationTimeDelta,t.timescale),n=t.message&&this._id3Parser.extractID3FromMessage(t.message),i={payload:n&&this._id3Parser.getID3Payload(n),timestamp:this._config.startTime+e},r=new c({type:l.MessageTypes.MESSAGE,id:l.MessageIds.TIMED_METADATA});r.putParam("timedMetadata",i),this.publish(s.DATA_PROCESS_PROGRESS,r)}},f.prototype._convertFromMediaTimeScale=function(t,e){return 0===e?0:t/e},f.prototype._fixAndroidAAC=function(){var t=this._mp4Parser.parse(this._data,"esds");if(t){var e=t.audioSpecificConfig0>>3,n=t.audioSpecificConfig0<<1&14|t.audioSpecificConfig1>>7&1,i=t.audioSpecificConfig1>>3&7;if(5===e){var r=(e=2)<<3|(14&n)>>1,o=(1&n)<<7|i<<3;console.log("[debug] alternating esds box for andriod"),this._mp4Parser.setSingleProp(this._data,"esds",{name:"audioSpecificConfig0",value:r,length:8}),this._mp4Parser.setSingleProp(this._data,"esds",{name:"audioSpecificConfig1",value:o,length:8}),this._mp4Parser.setSingleProp(this._data,"esds",{name:"audioSpecificConfig2",value:0,length:8}),this._mp4Parser.setSingleProp(this._data,"esds",{name:"audioSpecificConfig3",value:0,length:8})}}},f.prototype._parseCea608=function(t,e,n,i){for(var r=[],o=this._data.slice(t+8),s=n,a=0,u=0,l=0;l<e.samples.length;l++){var c=e.samples[l];for(u+=c.size;a<u&&a<o.length;){var d=o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3];if((15&o[a+=4])===h.AD_INFO_SEI)for(var p=this._seiParser.parse(o,a+1),f=0;f<p.length;f++){var _=p[f];_.pts=s+c.cto,_.dts=s,_.timescale=i,r.push(_)}a+=d}s+=c.duration}return r}},function(t,e,n){"use strict";t.exports=l;var i=n(36),r=n(3),o=n(16),s="AES-CBC",a="Key Import is rejected",u="Decryption is rejected";function l(){this._userAgent=this.__controller.model.userAgent,o.call(this,this.constructor.name),"undefined"==typeof window?this._crypto=crypto||msCrypto:this._crypto=window.crypto||window.msCrypto,this._crypto=this._crypto.subtle||this._crypto.webkitSubtle,this._data=null,this._key=null,this._cryptoAlgo={name:s,length:128,iv:null}}r.inherits(l,o),l.prototype.destroy=function(){this.close(),o.prototype.destroy.call(this)},l.prototype.close=function(){this._data=null,this._buffer=null,this._key=null,this._cryptoKey=null},l.prototype.append=function(t){t&&("key"===t.type?this._setKey(t):this._appendData(t))},l.prototype._appendData=function(t){if(t)if(this._buffer){var e=new Uint8Array(this._buffer.byteLength+t.byteLength);e.set(new Uint8Array(this._buffer),0),e.set(new Uint8Array(t),this._buffer.byteLength),this._buffer=e}else this._buffer=t},l.prototype._setKey=function(t){var e=this;t?(t.initVector||(t.initVector=e._getInitVectorFromSeqNum(t.seqNum)),e._key=t,e._cryptoAlgo.iv=e._hexToByte(t.initVector).buffer,11!==e._userAgent.ie?e._crypto.importKey("raw",t.data,e._cryptoAlgo,!0,["decrypt"]).then(function(t){e._cryptoKey=t,e._decryptAndAppend()},function(t){e._onError(a,t)}):e._importKeyInIE(t)):console.warn("[EncryptedSegmentDataProcessor][_setKey] key is absent")},l.prototype._importKeyInIE=function(t){var e=this,n=e._crypto.importKey("raw",t.data,e._cryptoAlgo,!0,["decrypt"]);n?(n.onerror=function(t){e._onError(a,t)},n.oncomplete=function(t){e._cryptoKey=t&&t.target?t.target.result:null,e._decryptAndAppend()}):e._onError("Key Import operation is not created in IE-11")},l.prototype._decryptAndAppend=function(){var t=this;if(t._cryptoKey&&t._buffer&&t._buffer.byteLength&&t._endOfSegment){var e=t._buffer.buffer,n=e.byteLength-e.byteLength%16,i=e.slice(0,n);t._buffer=new Uint8Array(e.slice(n)),11!==t._userAgent.ie?t._crypto.decrypt(t._cryptoAlgo,t._cryptoKey,i).then(function(e){t._sendDecryptedData(e)},function(e){t._onError(u,e)}).catch(function(e){t._onError("Exception",e.toString())}):t._decryptInIE(i)}},l.prototype._decryptInIE=function(t){var e=this;if(e._cryptoKey&&t){var n=e._crypto.decrypt(e._cryptoAlgo,e._cryptoKey,t);n?(n.onerror=function(t){e._onError(u,t)},n.oncomplete=function(t){t&&t.target&&e._sendDecryptedData(t.target.result)}):e._onError("Decryption operation is not created in IE-11")}},l.prototype._sendDecryptedData=function(t){this.publish(i.DATA_PROCESS_PROGRESS,new Uint8Array(t)),this._endOfSegment&&(0===this._buffer.byteLength?this.publish(i.DATA_PROCESS_COMPLETE):this._decryptAndAppend())},l.prototype._hexToByte=function(t){for(var e=[],n=0,i=(t=t.substr(2)).length;n<i;n+=2)e.push(parseInt(t.substr(n,2),16));return new Uint8Array(e)},l.prototype.endOfSegment=function(){this._endOfSegment=!0,this._key&&this._cryptoKey&&this._decryptAndAppend()},l.prototype._onError=function(t,e){console.warn(t+": reason = "+e),this.publish(i.DATA_PROCESS_ERROR)},l.prototype._getInitVectorFromSeqNum=function(t){for(var e="0x",n=(t=t||0).toString(16),i=n.length<32?32-n.length:0,r=0;r<i;r++)e+="0";return e+=n}},function(t,e,n){"use strict";function i(){try{this._window=this.getWindow()}catch(t){this._window=null}this._isSupported=!1,this._window&&this._window.performance&&"function"==typeof this._window.performance.clearResourceTimings&&"function"==typeof this._window.performance.getEntriesByName&&(this._isSupported=!0,this._window.performance.onresourcetimingbufferfull=this._clearResourceTiming.bind(this))}t.exports=i,e.entryTypes=["mark","measure","navigation","frame","resource","server"],i.prototype.getWindow=function(){return window},i.prototype._clearResourceTiming=function(){this._isSupported&&this._window.performance.clearResourceTimings()},i.prototype.getPerformanceTiming=function(t,n,i){var r,o={};if(!t||!n&&!i)return null;if(i&&e.entryTypes.indexOf(i)<0)return null;if(!this._isSupported)return null;if(!(r=n?this._window.performance.getEntriesByName(n,i||void 0):this._window.performance.getEntriesByType(i))||!r.length)return null;var s=r[r.length-1];return t.forEach(function(t){o[t]=s[t]}),o},i.prototype.destroy=function(){this._isSupported&&this._window&&(this._window.performance.onresourcetimingbufferfull=null),this._window=null,this._isSupported=!1}},function(t,e,n){"use strict";t.exports=u;var i=n(3),r=n(10),o=r.CmdNames,s=r.CmdEvents,a=n(97);function u(t,e){this._stream=t.stream,this._chunks=[],this._comboLoad=!!t.comboLoad,this._initSegment=t.initSegment,this._segment=t.segment,this._cached=t.cached,this._super=this.constructor.super_.prototype,this.constructor.super_.call(this,t,e),this._url=t.initSegment.url,this.name=o.CMD_MP4_INIT_SEGMENT_LOAD}i.inherits(u,a),u.prototype.destroy=function(){this._chunks=[],this._super.destroy.call(this)},u.prototype._validateData=function(t){if(!(t&&t.controller&&t.stream&&t.initSegment&&t.initSegment.url))throw new Error("Invalid argument: data argument of the command is not complete")},u.prototype._prepareChunks=function(){if(this._chunks.push(this._initSegment),this._comboLoad){var t=this._stream.getMp4Chunk("sidx"),e=this._stream.getMp4Chunk("first");t&&this._chunks.push(t),e&&this._segment&&this._chunks.push(e)}},u.prototype._configureLoaderOptions=function(){var t={responseType:"arraybuffer",isChunkedLoad:!0,minChunkSize:1e3,headerFields:{}};this._prepareChunks();var e=-1,n=-1;if(this._chunks.length){var i=this._chunks[0].range,r=this._chunks[this._chunks.length-1].range;i&&r&&(e=i.start,n=r.end)}if(e>=0&&n>=0&&(t.headerFields.Range="bytes="+e+"-"+n,this._contentLength=n-e+1),"atlas"===(this._stream.cdn||this._segment&&this._segment.cdn)){var o=this._stream.sessionId||this._segment&&this._segment.sessionId;t.headerFields.Accept="*/*; X-PB-SESSION-ID="+o}return t},u.prototype._createSegmentLoadProcessor=function(){this._segment&&this._super._createSegmentLoadProcessor.call(this)},u.prototype._loadSegmentData=function(){!this._comboLoad&&this._cached&&this._initSegment.loaded?this._onLoadComplete():this._super._loadSegmentData.call(this)},u.prototype._onProgress=function(t,e){t&&(this._comboLoad?this._onComboLoadProgress(t,e):this._onInitSegmentLoadProgress(t,e))},u.prototype._onComboLoadProgress=function(t,e){if(t){var n=0,i=t.byteLength,r=t;e!==this._bytesTotal&&this._onBytesLoaded(e);for(var o=null,a=0;a<this._chunks.length;a++){if(o=this._chunks[a],!r)return;if(o.loaded||(n+=o.append(r),"first"===o.name&&this._segmentDataProcessor&&this._segmentDataProcessor.append(r),o.loaded&&"first"!==o.name&&this.publish(s.CMD_PROGRESS,this,{chunk:o,stream:this._stream,comboLoad:this._comboLoad})),n>=i)return;if(n>0&&(r=t.subarray(n)),!o.loaded)return}}},u.prototype._onInitSegmentLoadProgress=function(t,e){e!==this._bytesTotal?this._onBytesLoaded(e):this._segmentDataProcessor.append(t)},u.prototype._onLoadComplete=function(){if(!this._comboLoad){var t=this._chunks[0];t&&(t.loaded=!0,this.publish(s.CMD_PROGRESS,this,{chunk:t,stream:this._stream,comboLoad:this._comboLoad}),this.publish(s.CMD_COMPLETE,this,{stream:this._stream,comboLoad:this._comboLoad}))}this._super._onLoadComplete.call(this)},u.prototype._onDataProcessComplete=function(){this.publish(s.CMD_COMPLETE,this,{stream:this._stream,comboLoad:this._comboLoad})},u.prototype._onDataProcessProgress=function(t,e){if(t){if(!this._comboLoad){var n=this._chunks[0];return n&&!n.loaded&&n.append(t.data),void this.publish(s.CMD_PROGRESS,this,{chunk:n,stream:this._stream,comboLoad:this._comboLoad})}t.stream=this._stream,t.chunk={name:"first"},this._super._onDataProcessProgress.call(this,t,e)}},u.prototype._getTotalDownloadTime=function(){return 0},u.prototype.getSegment=function(){return this._segment}},function(t,e,n){"use strict";t.exports=c;var i=n(3),r=n(35).Events,o=n(12).HLSEvent,s=n(10),a=s.Command,u=s.CmdNames,l=s.CmdEvents;function c(t,e){if(!(t&&t.controller&&t.subtitleStream&&t.segment))throw new Error("Invalid Argument: data arg is incomplete");a.call(this,t,e),this.name=u.CMD_SUBTITLE_SEGMENT_LOAD,this._stream=t.subtitleStream,this.__controller=t.controller,this._segment=t.segment||null,this._eventKeys={},this._setupLoader()}i.inherits(c,a),c.prototype.destroy=function(){this._loader.destroy(),this.__controller.removeEventListeners(this._eventKeys),a.prototype.destroy.call(this)},c.prototype.execute=function(){this._segment&&this._loader&&this._loader.load(this._segment.url)},c.prototype.cancel=function(){},c.prototype._setupLoader=function(){var t=this;t._loader=t.__controller.services.getNewLoader();t._loader.addEventListener(r.COMPLETE,function(e){t._onLoadComplete(e)},t),t._loader.addEventListener(r.ERROR,function(e){t.publish(l.CMD_ERROR,t,e)},t)},c.prototype._onLoadComplete=function(t){if(this._segment){this._segment.data=t.data;var e=this._segment.pcr();void 0!==e&&null!==e?this._parse():this.__controller.addEventListener(o.PCR_AVAILABLE,this._parse,this)}},c.prototype._parse=function(){this._segment.parseSegment(),this.publish(l.CMD_COMPLETE,this,{data:this._segment.toObject(),url:this._segment.url})}},function(t,e,n){"use strict";t.exports=h;var i=n(3),r=n(10),o=r.Command,s=r.CmdNames,a=r.CmdEvents,u=n(25),l=n(17).AbrModes,c=n(14),d=n(24);function h(t,e){var n=this;if(!t||c.isNullOrUndefined(t.streamIndex)||!t.controller)throw new Error("Invalid argument: data argument of the command is not complete");o.call(n,t,e),n.name=s.CMD_ERROR_HANDLE,n.__controller=n.data.controller,n._model=n.__controller.model,n.ERR_INTERVAL_AFTER_BUFFER_EMPTY=1e4,n._errorHandlingTimer=new u(n.ERR_INTERVAL_AFTER_BUFFER_EMPTY,1),n._errorHandlingTimer.addEventListener(function(){n._errorHandlingTimer.destroy(),n._publishError()},n),n._init(t.streamIndex),n._selectedStreamIndex=-1}i.inherits(h,o),h.prototype.destroy=function(){this._errorHandlingTimer&&this._errorHandlingTimer.destroy(),o.prototype.destroy.call(this)},h.prototype.execute=function(t){if(t>=0&&this._retryIndexList.length){var e=this._retryIndexList.indexOf(t);this._retryIndexList.splice(e,1)}if(!this._errorHandlingTimer.running||(console.log("[ErrorHandlerCommand] Error handler timer is still running"),-1===this._selectedStreamIndex||t===this._selectedStreamIndex))if(this.data.error&&this.data.error.code===d.ERR_XHR_LOAD_FORBIDDEN[0])this._publishError();else{if(this._model.getABRMode()===l.AUTO){if(this._retryIndexList.length){var n=this._retryIndexList.shift();return this.publish(a.CMD_PROGRESS,this,{index:n}),console.log("[ErrorHandlerCommand] Switch to "+n),void(this._selectedStreamIndex=n)}if(0!==this._model.currentLoadingStreamIndex)return this.publish(a.CMD_PROGRESS,this,{index:0}),console.log("[ErrorHandlerCommand] Retry index list is empty and switch to 0"),void(this._selectedStreamIndex=0)}this._model.bufferLength>.15?console.log("[ErrorHandlerCommand] Buffer is not empty"):this._errorHandlingTimer.start()}},h.prototype.cancel=function(){},h.prototype._init=function(t){if(this._retryIndexList=[],!(t<0||t>=this._model.streams.length)){var e,n=t;for(e=n-1;e>=0;e--)this._retryIndexList.push(e);for(e=n+1;e<this._model.streams.length;e++)this._retryIndexList.push(e)}},h.prototype._publishError=function(){console.log("[ErrorHandleCommand] Error handling failed"),this.publish(a.CMD_ERROR,this)}},function(t,e,n){"use strict";function i(t){this._sendVttEventCB=t,this._segment=null,this._inXdsMode=!1,this._currentChannelIndex=0,this._channels=[],this._currentChannel=null,this._lastData1=0,this._lastData2=0,this._current608ChannelIndex=0,this._popOnDisplayRows=[],this._captionStartTime=0,this._captionEndTime=0,this._captionCurrentTime=0,this._hasCaptionDisplayData=!1,this._maxCC608Duration=4}t.exports=i,i.prototype.destroy=function(){this._sendVttEventCB=null},i.prototype.parse=function(t,e){this._segment=e;for(var n=0;n<t.length;n++)this._parseData(t[n]);this._segment=null},i.prototype._parseData=function(t){if(this._hasOddParity(t.data1)&&this._hasOddParity(t.data2)&&(this._captionCurrentTime=t.pts/t.timescale,t.data1&=127,t.data2&=127,0!==t.data1||0!==t.data2))if(t.data1>=1&&t.data1<=14&&1===t.fieldType&&(this._inXdsMode=!0),15===t.data1&&this._inXdsMode&&1===t.fieldType)this._inXdsMode=!1;else{if(t.data1>=16&&t.data1<31){if(this._checkForDuplicateCommands(t.data1,t.data2))return;if(8!=(8&t.data1)&&0===t.fieldType?this._updateCurrentChannel(0):8==(8&t.data1)&&0===t.fieldType?this._updateCurrentChannel(1):8!=(8&t.data1)&&1===t.fieldType?this._updateCurrentChannel(2):8==(8&t.data1)&&1===t.fieldType&&this._updateCurrentChannel(3),null===this._currentChannel)return;this._processPreambleAddressCode(t),this._processMidrowCode(t),this._processMiscCodes(t);var e=119&t.data1;17===e&&48==(112&t.data2)?this._processSpecialChars(15&t.data2):18!==e&&26!==e||64&t.data2?19!==e&&27!==e||64&t.data2||this._processExtendedPortugueseGermanDanish(63&t.data2):this._processExtendedSpanishFrench(63&t.data2)}else{if(this._inXdsMode&&1===t.fieldType)return;if(t.data1>=32&&t.data1<=126){if(0===t.fieldType&&2===this._currentChannelIndex?this._updateCurrentChannel(0):0===t.fieldType&&3===this._currentChannelIndex?this._updateCurrentChannel(1):1===t.fieldType&&0===this._currentChannelIndex?this._updateCurrentChannel(2):1===t.fieldType&&1===this._currentChannelIndex&&this._updateCurrentChannel(3),null===this._currentChannel)return;var n=this._convertAsciiTo608(t.data1);if(this._currentChannel.appendChar(n),t.data2>=32&&t.data2<=126){var i=this._convertAsciiTo608(t.data2);this._currentChannel.appendChar(i)}}}this._lastData1=t.data1,this._lastData2=t.data2}},i.prototype._processPreambleAddressCode=function(t){var e=119&t.data1,n=96&t.data2;17===e&&64===n?(this._currentChannel.startNewRow(1),this._decodeCCStyle(t.data2)):17===e&&96===n?(this._currentChannel.startNewRow(2),this._decodeCCStyle(t.data2)):18===e&&64===n?(this._currentChannel.startNewRow(3),this._decodeCCStyle(t.data2)):18===e&&96===n?(this._currentChannel.startNewRow(4),this._decodeCCStyle(t.data2)):21===e&&64===n?(this._currentChannel.startNewRow(5),this._decodeCCStyle(t.data2)):21===e&&96===n?(this._currentChannel.startNewRow(6),this._decodeCCStyle(t.data2)):22===e&&64===n?(this._currentChannel.startNewRow(7),this._decodeCCStyle(t.data2)):22===e&&96===n?(this._currentChannel.startNewRow(8),this._decodeCCStyle(t.data2)):23===e&&64===n?(this._currentChannel.startNewRow(9),this._decodeCCStyle(t.data2)):23===e&&96===n?(this._currentChannel.startNewRow(10),this._decodeCCStyle(t.data2)):16===e&&64===n?(this._currentChannel.startNewRow(11),this._decodeCCStyle(t.data2)):19===e&&64===n?(this._currentChannel.startNewRow(12),this._decodeCCStyle(t.data2)):19===e&&96===n?(this._currentChannel.startNewRow(13),this._decodeCCStyle(t.data2)):20===e&&64===n?(this._currentChannel.startNewRow(14),this._decodeCCStyle(t.data2)):20===e&&96===n&&(this._currentChannel.startNewRow(15),this._decodeCCStyle(t.data2))},i.prototype._processMidrowCode=function(t){17===(119&t.data1)&&32==(112&t.data2)&&(this._decodeCCStyle(t.data2),this._currentChannel.appendChar(" "))},i.prototype._processMiscCodes=function(t){var e=119&t.data1;20===e&&32===t.data2?this._currentChannel.setMode(r.POP_ON_MODE):20===e&&33===t.data2?this._currentChannel.backspace():20===e&&36===t.data2?this._currentChannel.clearEndOfRow():20===e&&37===t.data2?this._currentChannel.setMode(r.ROLL_UP_MODE,2):20===e&&38===t.data2?this._currentChannel.setMode(r.ROLL_UP_MODE,3):20===e&&39===t.data2?this._currentChannel.setMode(r.ROLL_UP_MODE,4):20===e&&41===t.data2?this._currentChannel.setMode(r.PAINT_ON_MODE):20===e&&44===t.data2?this._currentChannel.eraseDisplayMemory():20===e&&45===t.data2?this._currentChannel.linebreak():20===e&&46===t.data2?this._currentChannel.eraseNondisplayMemory():20===e&&47===t.data2?this._currentChannel.endOfCaption():23===e&&33===t.data2?this._currentChannel.setIndent(1):23===e&&34===t.data2?this._currentChannel.setIndent(2):23===e&&35===t.data2&&this._currentChannel.setIndent(3)},i.prototype._processSpecialChars=function(t){var e=["®","°","½","¿","™","¢","£","♪","à"," ","è","â","ê","î","ô","û"],n=t;n<0||n>=e.length||this._currentChannel.appendChar(e[n])},i.prototype._processExtendedSpanishFrench=function(t){var e=["Á","É","Ó","Ú","Ü","ü","´","¡","*","'","-","©","℠","·",'"','"',"À","Â","Ç","È","Ê","Ë","ë","Î","Ï","ï","Ô","Ù","ù","Û","«","»"],n=t-32;n<0||n>=e.length||this._currentChannel.appendChar(e[n])},i.prototype._processExtendedPortugueseGermanDanish=function(t){var e=["Ã","ã","Í","Ì","ì","Ò","ò","Õ","õ","{","}","\\","^","_","|","~","Ä","ä","Ö","ö","ß","¥","¤","¦","Å","å","Ø","ø","┌","┐","└","┘"],n=t-32;n<0||n>=e.length||this._currentChannel.appendChar(e[n])},i.prototype._hasOddParity=function(t){return[0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0][t]},i.prototype._convertAsciiTo608=function(t){return 42===t?"á":92===t?"é":94===t?"í":95===t?"ó":96===t?"ú":123===t?"ç":124===t?"÷":125===t?"Ñ":126===t?"ñ":String.fromCharCode(t)},i.prototype._checkForDuplicateCommands=function(t,e){return this._lastData1===t&&this._lastData2===e},i.prototype._decodeCCStyle=function(t){if(16==(16&t)){var e=0;0==(14&t)?e=0:2==(14&t)?e=4:4==(14&t)?e=8:6==(14&t)?e=12:8==(14&t)?e=16:10==(14&t)?e=20:12==(14&t)?e=24:14==(14&t)&&(e=28),this._currentChannel.setColumn(e)}else 14==(14&t)&&this._currentChannel.setItalic();1==(1&t)&&this._currentChannel.setUnderlined()},i.prototype._updateCurrentChannel=function(t){this._channels[t]||(this._channels[t]=new o(t,this.onFlipMemories.bind(this),this.onEraseDisplayMemory.bind(this),this.onLinebreak.bind(this))),this._currentChannelIndex=t,this._currentChannel=this._channels[t]},i.prototype.getChannel=function(t){return this._channels[t]},i.prototype.translate608RowToVTTLine=function(t){var e=[10,15.33,20.66,26,31.33,36.66,42,47.33,52.66,58,63.33,68.66,74,79.33,84.66];return t<1||t>e.length?e[0]:e[t-1]},i.prototype.translate608ColumnToVTTPosition=function(t){var e=0;return t<=4?e=10:t>=5&&t<=8?e=20:t>=9&&t<=12?e=30:t>=13&&t<=16?e=40:t>=17&&t<=20?e=50:t>=21&&t<=24?e=60:t>=25&&t<=29?e=70:t>=29&&(e=80),e},i.prototype.onFlipMemories=function(t){this._hasCaptionDisplayData&&this.onEraseDisplayMemory(t);var e=this.getChannel(t);if(e.getMode()===r.POP_ON_MODE){if(this._captionStartTime=this._captionCurrentTime,t===this._current608ChannelIndex){var n=this._popOnDisplayRows;this._popOnDisplayRows=e.getCaptionRows(),e.setCaptionRows(n);for(var i=0;i<this._popOnDisplayRows.length;i++)this._popOnDisplayRows[i]&&this._popOnDisplayRows[i].hasCaptionData()&&(this._hasCaptionDisplayData=!0)}e.eraseNondisplayMemory()}},i.prototype._getWebVttSettings=function(t,e){var n=[];n.push("snapToLines:false"),n.push("align:start");var i="line:"+this.translate608RowToVTTLine(e)+"%";n.push(i);var r="position:"+this.translate608ColumnToVTTPosition(t)+"%";return n.push(r),n},i.prototype._getRowTextAndAdjacent=function(t,e,n){for(var i=e[t].toString();t<e.length-1;){var r=e[t+1];if(r&&r.hasCaptionData()){var o=r.toString();o.length>0&&(i+="\n"+o),n&&r.reset(),t++}else t++}return{rowIdx:t,rowText:i}},i.prototype.onEraseDisplayMemory=function(t){var e=this.getChannel(t),n=e.getMode();if(t===this._current608ChannelIndex){if(n===r.POP_ON_MODE){this._captionEndTime=this._captionCurrentTime;for(var i=0;i<this._popOnDisplayRows.length;i++){var o=this._popOnDisplayRows[i];if(o&&o.hasCaptionData()){var s=o.getStartPosition(),a=this._getWebVttSettings(s,i+1),u=this._getRowTextAndAdjacent(i,this._popOnDisplayRows,!0);i=u.rowIdx;var l=u.rowText;this._captionEndTime-this._captionStartTime>this._maxCC608Duration&&(this._captionEndTime=this._captionStartTime+this._maxCC608Duration),this._publishAsWebVTT(l,a),this._captionStartTime+=.001,o.reset()}}}else n===r.ROLL_UP_MODE||n===r.PAINT_ON_MODE?(this._captionEndTime>this._captionStartTime&&(this._captionStartTime=this._captionEndTime),this._publishRollUpAndPaintOn(t),e.eraseNondisplayMemory()):n&&(e.eraseNondisplayMemory(),console.warn("CEA-608 Caption Mode: "+n+" Not Currently Supported"));this._hasCaptionDisplayData=!1}else e.eraseNondisplayMemory()},i.prototype.onLinebreak=function(t){if(t===this._current608ChannelIndex){var e=this.getChannel(t).getMode();e!==r.ROLL_UP_MODE&&e!==r.PAINT_ON_MODE||(this._captionEndTime>this._captionStartTime&&(this._captionStartTime=this._captionEndTime),this._publishRollUpAndPaintOn(t))}},i.prototype._publishRollUpAndPaintOn=function(t){for(var e=this.getChannel(t).getCaptionRows(),n=0;n<e.length;n++){var i=e[n];if(i&&i.hasCaptionData()){var r=this._getWebVttSettings(12,n),o=this._getRowTextAndAdjacent(n,e,!1);n=o.rowIdx;var s=o.rowText;this._captionEndTime=this._captionStartTime+1.5,this._publishAsWebVTT(s,r),this._captionStartTime+=.001}}this._captionStartTime=-1},i.prototype._publishAsWebVTT=function(t,e){var n="WEBVTT\nX-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0\n\n";n+=this._toHMS(this._captionStartTime),n+=" --\x3e ",n+=this._toHMS(this._captionEndTime);for(var i=0;i<e.length;i++)n+=" "+e[i];if(n+="\n",n+=t+"\n",this._sendVttEventCB){var r={discontinuity:this._segment.discontinuity,sequenceNum:this._segment.seqNum,startTime:this._segment.startTime,programDateTime:this._segment.programDateTime,url:this._segment.url,duration:this._segment.duration,clockReference:0,localCueTime:0,mpegTSTime:0,data:n,offset:0,adjustedTime:0};this._sendVttEventCB(r)}},i.prototype._toHMS=function(t){var e=Math.floor(t/60/60);e=this._doubleDigit(e);var n=Math.floor(t/60%60);n=this._doubleDigit(n);var i=(t%60).toFixed(3);return e+":"+n+":"+(i=this._doubleDigit(i))},i.prototype._doubleDigit=function(t){return t<10&&(t="0"+t),t};var r={POP_ON_MODE:0,ROLL_UP_MODE:1,PAINT_ON_MODE:3};function o(t,e,n,i){this._channelNum=t,this._rollupRows=0,this._rows=[],this._currentRowIndex=null,this._currentRow=null,this._mode=null,this._onFlipMemories=e,this._onEraseDisplayMemory=n,this._onLinebreak=i}function s(){this._startPos=32,this._endPos=-1,this._isUnderlined=!1,this._isItalic=!1,this._characterPosition=0,this._characters=[],this.MAX_CHARS=32}function a(){this.character="",this.isUnderlined=!1,this.isItalic=!1}o.prototype.setMode=function(t,e){this._mode=t,e<2?e=2:e>4&&(e=4),this._rollupRows=e},o.prototype.getMode=function(){return this._mode},o.prototype._doRollup=function(t){if(!(t<1||t>15)){(t<this._rollupRows||null===this._currentRowIndex)&&(this._currentRowIndex=this._rollupRows);for(var e=this._rows[0],n=0;n<this._rows.length;n++)n<this._rows.length-1?this._rows[n]=this._rows[n+1]:this._rows[n]=e,(n>this._currentRowIndex||this._currentRowIndex-this._rollupRows>0&&n<this._currentRowIndex-this._rollupRows)&&this._rows[n]&&this._rows[n].reset()}},o.prototype._notifyPaintOn=function(){this._onLinebreak&&this._onLinebreak(this._channelNum)},o.prototype.startNewRow=function(t){if(!(t<1||t>15)){this._mode===r.ROLL_UP_MODE?this._doRollup(t):this._mode===r.PAINT_ON_MODE&&this._notifyPaintOn(),this._currentRowIndex=t,this._currentRow=this.getCaptionRow(t),this._currentRow.reset()}},o.prototype.getCaptionRows=function(){return this._rows},o.prototype.setCaptionRows=function(t){this._rows=t},o.prototype.setIndent=function(t){this._currentRow&&this._currentRow.tabIndex(t)},o.prototype.setColumn=function(t){this._currentRow&&this._currentRow.columnIndex(t)},o.prototype.setItalic=function(){this._currentRow&&this._currentRow.setIsItalic(!0)},o.prototype.setUnderlined=function(){this._currentRow&&this._currentRow.setIsUnderlined(!0)},o.prototype.appendChar=function(t){this._currentRow&&this._currentRow.writeChar(t)},o.prototype.linebreak=function(){this._onLinebreak&&this._onLinebreak(this._channelNum)},o.prototype.eraseNondisplayMemory=function(){for(var t=0;t<this._rows.length;t++)this._rows[t]&&this._rows[t].reset()},o.prototype.clearEndOfRow=function(){this._currentRow&&this._currentRow.clearToEnd()},o.prototype.backspace=function(){this._currentRow&&this._currentRow.backspace()},o.prototype.eraseDisplayMemory=function(){this._onEraseDisplayMemory(this._channelNum)},o.prototype.endOfCaption=function(){this._onFlipMemories(this._channelNum)},o.prototype.getCaptionRow=function(t){if(t<1||t>15)return null;var e=t-1;return this._rows[e]||(this._rows[e]=new s),this._rows[e]},s.prototype.reset=function(){this._isItalic=!1,this._isUnderlined=!1;for(var t=0;t<this._characters.length;t++)this._characters[t]&&this._characters[t].reset();this._characterPosition=0,this._startPos=32,this._endPos=-1},s.prototype.clearToEnd=function(){for(var t=this._characterPosition;t<this._characters.length;t++)this._characters[t]&&this._characters[t].reset()},s.prototype.columnIndex=function(t){t<0||t>=this.MAX_CHARS||(this._characterPosition=t)},s.prototype.tabIndex=function(t){this._incrementPosition(t)},s.prototype.writeChar=function(t){var e=this._characters[this._characterPosition];e||(this._characters[this._characterPosition]=new a,e=this._characters[this._characterPosition]),e.setValue(t,this._isItalic,this._isUnderlined),this._characterPosition<this._startPos&&(this._startPos=this._characterPosition),this._characterPosition>this._endPos&&(this._endPos=this._characterPosition),this._incrementPosition(1)},s.prototype.backspace=function(){this._characterPosition>0&&(this._characters[this._characterPosition].reset(),this._characterPosition--)},s.prototype._incrementPosition=function(t){this._characterPosition+t<this.MAX_CHARS?this._characterPosition+=t:this._characterPosition=this.MAX_CHARS-1},s.prototype.setIsItalic=function(t){this._isItalic=t},s.prototype.setIsUnderlined=function(t){this._isUnderlined=t},s.prototype.hasCaptionData=function(){return 32!==this._startPos||-1!==this._endPos},s.prototype.getCharacterAt=function(t){return t<0||t>=this.MAX_CHARS?null:this._characters[t]},s.prototype.getStartPosition=function(){return this._startPos},s.prototype.getEndPosition=function(){return this._endPos},s.prototype.toString=function(){var t="",e=!1,n=!1;if(this.hasCaptionData())for(var i=this._startPos;i<=this._endPos;i++){var r=this.getCharacterAt(i);r.isItalic&&!n?(t+="<i>",n=!0):n&&!r.isItalic&&(t+="</i>",n=!1),r.isUnderlined&&!e?(t+="<u>",e=!0):e&&!r.isUnderlined&&(t+="</u>",e=!1),"&"===r.character?t+="&amp;":"<"===r.character?t+="&lt;":">"===r.character?t+="&gt;":t+=r.character}return e&&(t+="</u>",e=!1),n&&(t+="</i>",n=!1),t},a.prototype.reset=function(){this.character="",this.isItalic=!1,this.isUnderlined=!1},a.prototype.setValue=function(t,e,n){this.character=t,this.isItalic=e,this.isUnderlined=n}},function(t,e,n){"use strict";var i=n(194),r=n(195),o=n(65),s=n(196),a=n(197),u=n(20).StreamTypes,l=i.TsStreamer,c=i.TsLiveStreamer,d=r.SubtitleStreamer,h=r.SubtitleLiveStreamer,p=o.Fmp4Streamer,f=o.Fmp4LiveStreamer,_=s.AacStreamer,m=s.AacLiveStreamer,y=a.Fmp4SubtitleStreamer,v=a.Fmp4SubtitleLiveStreamer;t.exports.create=function(t,e,n){if(!t||!e||"function"!=typeof t.create)return null;var i,r=e.type===u.SUBTITLES;switch(e.containerFormat){case"vtt":i=n?h:d;break;case"aac":i=n?m:_;break;case"mp4":i=r?n?v:y:n?f:p;break;case"ts":i=n?c:l}return i?t.create(i,e):null}},function(t,e,n){"use strict";t.exports.TsStreamer=l,t.exports.TsLiveStreamer=c;var i=n(3),r=n(29).Streamer,o=n(51),s=n(10).CmdNames,a=n(14),u=n(21);function l(t,e){this._creator(t,e)}function c(t,e){this._creator(t,e),this.SEGMENT_OFFSET=2}i.inherits(l,r),i.inherits(c,o),c.prototype._creator=l.prototype._creator=function(t,e){this.constructor.super_.call(this,t,e),this._super=this.constructor.super_.prototype,this.processOnlyMetadata=!1,this.lastAudioTimestamp=NaN,this.lastAudioFrameDuration=NaN,this._initMp4State(),this._commandName=s.CMD_SEGMENT_LOAD,this.primary=!0;var n=this.__controller.getMinimumBufferTime(),i=[{codec:"avc1.640021",type:"video",mimeType:'video/mp4; codecs="avc1.640021"',minBufferTime:n}];t&&t.hasAudio&&i.push({codec:"mp4a.40.2",type:"audio",mimeType:'audio/mp4; codecs="mp4a.40.2"',minBufferTime:n}),this.__controller.sendMessage(u.MessageIds.CREATE_SRC_BUFFER,[i],["tracks"]),this._state=this.STATES.INITIALIZED},c.prototype.destroy=l.prototype.destroy=function(){this._initMp4State(),this._super.destroy.call(this)},c.prototype.onSeeking=l.prototype.onSeeking=function(t){this.lastAudioTimestamp=NaN,this._super.onSeeking.call(this,t)},c.prototype.onSwitchBegin=l.prototype.onSwitchBegin=function(){this._initMp4State(),this._super.onSwitchBegin.call(this)},c.prototype._beforeLoadSegment=l.prototype._beforeLoadSegment=function(){this._initMp4State()},c.prototype._getSegmentLoadCmdData=l.prototype._getSegmentLoadCmdData=function(t){return{segment:this._model.getSegment(this._model.currentLoadingStreamIndex,t),stream:this._currentStream,state:{mp4:this._mp4State,lastAudioTimestamp:this.lastAudioTimestamp,lastAudioFrameDuration:this.lastAudioFrameDuration,isAltAudioActive:this._isAltAudioActive},onlyMetadata:this.processOnlyMetadata}},c.prototype.onSegmentLoadProgress=l.prototype.onSegmentLoadProgress=function(t,e,n){if(e){var i=e.getParam?e.getParam("parsedInfo"):null;i&&(a.isNumber(i.pcr)&&this._model.setPCR(i.pcr),a.isNumber(i.startOffsetTimestamp)&&this._model.setStartOffset(i.startOffsetTimestamp),a.isNumber(i.lastAudioTimestamp)&&(this.lastAudioTimestamp=i.lastAudioTimestamp),a.isNumber(i.lastAudioFrameDuration)&&(this.lastAudioFrameDuration=i.lastAudioFrameDuration)),this._super.onSegmentLoadProgress.call(this,t,e,n)}},c.prototype._sendToBuffer=l.prototype._sendToBuffer=function(t,e){var n=this;t&&(n._super._sendToBuffer.call(n,t,e),t.forEach(function(t){n._mp4State[t.type].shouldInit=!1}))},c.prototype.onSynchMetadataReady=l.prototype.onSynchMetadataReady=function(t){this.processOnlyMetadata=!1,this._super.onSynchMetadataReady.call(this,t)},c.prototype.onManualStreamChange=l.prototype.onManualStreamChange=function(){this._initMp4State(),this.lastAudioTimestamp=NaN,this._super.onManualStreamChange.call(this)},c.prototype._initMp4State=l.prototype._initMp4State=function(){this._mp4State={audio:{shouldInit:!0,seqNum:0},video:{shouldInit:!0,seqNum:0}}},c.prototype._printLoadMessage=l.prototype._printLoadMessage=function(t,e){console.log("["+this.constructor.name+"] Loading segment: seq num = "+t.seqNum+", index = "+e.index+", bitrate = "+e.bitrate+", startTime = "+t.startTime+", range = ["+e.startSeqNum+", "+e.endSeqNum+"], buffer = "+this._model.bufferLength)},l.prototype.onSynchBegin=function(){this.processOnlyMetadata=!0},c.prototype._synch=function(t){this.lastAudioTimestamp=NaN,this._super._synch.call(this,t)}},function(t,e,n){"use strict";t.exports.SubtitleStreamer=u,t.exports.SubtitleLiveStreamer=l;var i=n(3),r=n(29).Streamer,o=n(51),s=n(10).CmdNames,a=n(12).HLSEvent;function u(t,e){this._creator(t,e)}function l(t,e){this._creator(t,e)}i.inherits(u,r),i.inherits(l,o),l.prototype._creator=u.prototype._creator=function(t,e){this.constructor.super_.call(this,t,e),this._super=this.constructor.super_.prototype,this._buffered={},this._commandName=s.CMD_SUBTITLE_SEGMENT_LOAD,this.primary=!1,this._state=t.isReady()?this.STATES.INITIALIZED:this.STATES.NONE},l.prototype.destroy=u.prototype.destroy=function(){this._buffered={},this._super.destroy.call(this)},l.prototype.onPlay=u.prototype.onPlay=function(t){this._super.onPlay.call(this,t)},l.prototype.onTimeUpdate=u.prototype.onTimeUpdate=function(t){this._lastPlayedTime=t},l.prototype._isBufferFull=u.prototype._isBufferFull=function(){return this._getBufferLength(this._lastPlayedTime)>=this._maxBuffer},l.prototype._isTotalBufferFull=u.prototype._isTotalBufferFull=function(){return this._getBufferLength()>=this._model.config.maxTotalBuffer},l.prototype._getSegmentLoadCmdData=u.prototype._getSegmentLoadCmdData=function(t){var e=this._currentStream;return e?{subtitleStream:e,segment:e.getSegmentfromSeqNum(t),live:this._model.live}:{}},l.prototype.onSubtitleSegmentLoadComplete=u.prototype.onSubtitleSegmentLoadComplete=function(t,e){if(e){var n=e.data;this.__controller.sendEvent(a.VTT_SEGMENT_LOADED,n),this._buffered[n.sequenceNum]={start:n.startTime,end:n.startTime+n.duration}}this._super.onSegmentLoadComplete.call(this,t)},l.prototype.onSubtitleSegmentLoadError=u.prototype.onSubtitleSegmentLoadError=function(t){console.warn("[Streamer] Subtitle segment failed to load."),this._state=this.STATES.NONE,this._commandManager.removeCommand(t)},l.prototype._getFirstNonBufferedSeqNum=u.prototype._getFirstNonBufferedSeqNum=function(t){var e=this._currentStream,n=t;if(!isNaN(n))for(;this._buffered[n];)n++;return!this._live&&n>e.endSeqNum?(this._setEndOfStream(!0),e.endSeqNum):n},l.prototype._getBufferLength=u.prototype._getBufferLength=function(t){var e=this._currentStream,n=e.getSeqNumBeforePosition(t);if(isNaN(n))return 0;for(var i=0;n<=e.endSeqNum;n++){var r=this._buffered[n];if(!r)break;i=r.end-t}return i},l.prototype._getTotalBufferLength=u.prototype._getTotalBufferLength=function(){var t=this,e=0;return Object.keys(t._buffered).forEach(function(n){var i=t._buffered[n];i&&(e+=i.end-i.start)}),e},l.prototype._printLoadMessage=u.prototype._printLoadMessage=function(){var t=this._currentStream;console.log("["+this.constructor.name+"] Loading segment: seq num = "+this._seqNum+", groupId = "+t.groupId+", name = "+t.name+", range = ["+t.startSeqNum+", "+t.endSeqNum+"], buffer = "+this._model.bufferLength)},l.prototype._getBufferedRangeIndex=u.prototype._getBufferedRangeIndex=function(){},l.prototype._sendToBuffer=u.prototype._sendToBuffer=function(){},l.prototype.onSynchMetadataReady=u.prototype.onSynchMetadataReady=function(){},l.prototype.setABRMode=u.prototype.setABRMode=function(){},l.prototype.canSwitch=u.prototype.canSwitch=function(){return!0}},function(t,e,n){"use strict";t.exports.AacStreamer=u,t.exports.AacLiveStreamer=l;var i=n(3),r=n(29).Streamer,o=n(51),s=n(21),a=n(14);function u(t,e){this._creator(t,e)}function l(t,e){this._creator(t,e)}i.inherits(u,r),i.inherits(l,o),l.prototype._creator=u.prototype._creator=function(t,e){this.constructor.super_.call(this,t,e),this._super=this.constructor.super_.prototype,this.processOnlyMetadata=!1,this.lastAudioTimestamp=NaN,this.lastAudioFrameDuration=NaN,this.primary=!1,this._codec="mp4a.40.2",this._trackType="audio",this._initMp4State();var n=[{type:this._trackType,mimeType:this._trackType+'/mp4; codecs="'+this._codec+'"',minBufferTime:this.__controller.getMinimumBufferTime()}];this.__controller.sendMessage(s.MessageIds.CREATE_SRC_BUFFER,[n],["tracks"]),this._state=this.STATES.INITIALIZED},l.prototype.destroy=u.prototype.destroy=function(){this._super.destroy.call(this)},l.prototype.onSeeking=u.prototype.onSeeking=function(t){this.lastAudioTimestamp=NaN,this._super.onSeeking.call(this,t)},l.prototype.onSwitchBegin=u.prototype.onSwitchBegin=function(){this._initMp4State(),this._super.onSwitchBegin.call(this)},l.prototype.onManualStreamChange=u.prototype.onManualStreamChange=function(){this._initMp4State(),this.lastAudioTimestamp=NaN,this._super.onManualStreamChange.call(this)},l.prototype._beforeLoadSegment=u.prototype._beforeLoadSegment=function(){this._initMp4State()},l.prototype._getSegmentLoadCmdData=u.prototype._getSegmentLoadCmdData=function(t){if(!this.isActive())return null;var e=this._currentStream;return{segment:e.getSegmentfromSeqNum(t),stream:e,state:{mp4:this._mp4State,lastAudioTimestamp:this.lastAudioTimestamp,lastAudioFrameDuration:this.lastAudioFrameDuration},onlyMetadata:this.processOnlyMetadata}},l.prototype.onSegmentLoadProgress=u.prototype.onSegmentLoadProgress=function(t,e,n){if(e){var i=e.getParam?e.getParam("parsedInfo"):null;i&&(a.isNumber(i.lastAudioTimestamp)&&(this.lastAudioTimestamp=i.lastAudioTimestamp),a.isNumber(i.lastAudioFrameDuration)&&(this.lastAudioFrameDuration=i.lastAudioFrameDuration)),this._super.onSegmentLoadProgress.call(this,t,e,n)}},l.prototype._initMp4State=u.prototype._initMp4State=function(){this._mp4State={video:{shouldInit:!0,seqNum:0},audio:{shouldInit:!0,seqNum:0}}},l.prototype._printLoadMessage=u.prototype._printLoadMessage=function(t,e){console.log("["+this.constructor.name+"]["+e.type+"] Loading segment: seq num = "+t.seqNum+", index = "+e.index+", name = "+e.name+", startTime = "+t.startTime+", range = ["+e.startSeqNum+", "+e.endSeqNum+"], buffer = "+this._model.bufferLength)},l.prototype._synch=function(t){this.lastAudioTimestamp=NaN,this.isActive()&&this._super._synch.call(this,t)}},function(t,e,n){"use strict";t.exports.Fmp4SubtitleStreamer=l,t.exports.Fmp4SubtitleLiveStreamer=c;var i=n(3),r=n(65).Fmp4Streamer,o=n(65).Fmp4LiveStreamer,s=n(49),a=n(14),u=n(12).HLSEvent;function l(t){r.call(this,t),this._init()}function c(t){o.call(this,t),this._init()}i.inherits(l,r),i.inherits(c,o),l.prototype.destroy=function(){this._mp4Parser=null,this._data="",r.prototype.destroy.call(this)},c.prototype.destroy=function(){this._mp4Parser=null,this._data="",o.prototype.destroy.call(this)},c.prototype._init=l.prototype._init=function(){this._trackType="subtitle",this._mp4Parser=new s,this._insertVttHeader()},c.prototype._beforeLoadSegment=l.prototype._beforeLoadSegment=function(t){this._insertVttHeader(),r.prototype._beforeLoadSegment.call(this,t)},c.prototype.onSegmentLoadProgress=l.prototype.onSegmentLoadProgress=function(t,e){var n=this,i=n._currentStream;if(e&&i&&i.timescale){var r=e.stream;if((!r||i.equals(r))&&"firstByte"!==e.position){var o=n._mp4Parser.extractVttCaptions(e.data);if(o.length){var s=n._mp4Parser.parse(e.data,"trun"),a=s?s.sampleData:[];if(a.length===o.length){var u=n._mp4Parser.parse(e.data,"tfdt"),l=u?u.baseMediaDecodeTime:0,c=l=1e3*l/i.timescale;o.forEach(function(t,e){var r=a[e],o=r?1e3*r.sampleDuration/i.timescale:0;if(t.cueText){var s=n._toMillisec(t.cueTime)+l,u=null!==s?s+o:c+o;n._data+="\n"+n._toDateTime(s)+" --\x3e "+n._toDateTime(u),n._data+="\n"+t.cueText+"\n"}c+=o}),n._data+="\n"}else console.warn("[Fmp4SubtitleStreamer] CC sample count should equal the vttc count")}}}},c.prototype.onSegmentLoadComplete=l.prototype.onSegmentLoadComplete=function(t,e){var n=this._currentStream;if(n){var i=n.getSegmentfromSeqNum(this._seqNum);i&&this.__controller.sendEvent(u.VTT_SEGMENT_LOADED,this._dto(i))}this._super.onSegmentLoadComplete.call(this,t,e),this._data=""},c.prototype._insertVttHeader=l.prototype._insertVttHeader=function(){this._data="WEBVTT\nX-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0\n\n"},c.prototype._toMillisec=l.prototype._toMillisec=function(t){var e=null;if(!t)return e;var n=t.split(":");if(n&&n.length>=3){var i=n[2].split("."),r=0,o=0;i&&i.length>=2&&(r=parseInt(i[0]),o=parseInt(i[1])),e=1e3*(3600*n[0]+60*n[1]+r)+o}return e},c.prototype._toDateTime=l.prototype._toDateTime=function(t){var e="";if(a.isNullOrUndefined(t))return e;function n(t){return t<10?"0"+t:""+t}var i=Math.floor(t/1e3),r=Math.floor(t-1e3*i),o=Math.floor(i/3600);i-=3600*o;var s=Math.floor(i/60);return i-=60*s,e=n(o)+":"+n(s)+":"+n(i)+"."+function(t){return t<10?"00"+t:t<100?"0"+t:""+t}(r)},c.prototype._dto=l.prototype._dto=function(t){var e={};return t&&(e.discontinuity=t.discontinuity,e.sequenceNum=t.seqNum,e.startTime=t.startTime,e.programDateTime=t.programDateTime,e.url=t.url,e.duration=t.duration,e.clockReference=0,e.localCueTime=0,e.mpegTSTime=0,e.data=this._data,e.offset=0,e.adjustedTime=0),e},c.prototype._printLoadMessage=l.prototype._printLoadMessage=function(){},c.prototype._sendInitSegment=l.prototype._sendInitSegment=function(t){this._currentStream.activeInitSegment=t},c.prototype._addDrmItem=l.prototype._addDrmItem=function(){}},function(t,e,n){"use strict";t.exports=c;var i=n(199),r=n(17).AbrModes,o=n(16),s=n(3),a=n(12).HLSEvent,u=n(200),l=n(99).ResolutionRule;function c(){this._model=this.__controller.model,this._abrController=this.__controller.create(i),this._abrInputData={estimatedBandwidthInBps:0,bitrateList:[],currentIndex:0,bufferLength:0},this._eventKeys={},this._onMediaLoaded(),this.SWITCH_BEGIN="switchBegin",this.SWITCH_END="switchEnd",this.SCENARIOS={STARTUP:"startup",LOAD:"load",ERROR:"error",MIDSEGMENT:"mid-segment"},this.switching=!0,this._useAnalytics=this._model.config.sendAbrAnalytics,this._analytics=new u,o.call(this,this.constructor.name),this._eventKeys[a.MEDIA_LOADED]=this.__controller.addEventListener(a.MEDIA_LOADED,this._onMediaLoaded,this)}s.inherits(c,o),c.prototype.destroy=function(){this._abrController.destroy(),this.__controller.removeEventListeners(this._eventKeys),this._analytics.destroy(),o.prototype.destroy.call(this)},c.prototype.switchStream=function(t,e,n){var i=this;i._model.getABRMode()!==r.AUTO&&i._model.streams.forEach(function(t,e){i._model.getUserReqBitrate()===t.bitrate&&(n=e)});var o,s=i._model.currentLoadingStreamIndex,a=i._prepareAbrInput();return o="number"==typeof n?n:i._abrController.getNextStreamIndex(a,t===i.SCENARIOS.STARTUP),i._useAnalytics&&(i._analytics.nextIndex=o,i._analytics.scenario=t,i._updateAnalytics(a),t===i.SCENARIOS.LOAD&&i._sendAnalyticsData()),!(o<0)&&(o!==s&&((!e||!("up"===e&&o<s||"down"===e&&o>s))&&(i._model.setCurrentLoadingStream(o),i.switching=!0,i.publish(i.SWITCH_BEGIN,o),i._useAnalytics&&i._analytics.switchCount++,console.log("[SwitchManager] Stream switched to: [index = "+o+", bitrate = "+i._abrInputData.bitrateList[o]+"]"),!0)))},c.prototype.switchComplete=function(){this.switching=!1,this.publish(this.SWITCH_END)},c.prototype._prepareAbrInput=function(){this._prepareBitrateList();var t=this._abrInputData,e=this.__controller.services.bandwidthEstimator,n=this._model.dimensions;return t.estimatedBandwidthInBps=1e3*e.averageBandwidth*1e3,t.currentIndex=this._model.currentLoadingStreamIndex,t.bufferLength=this._model.bufferLength,t.displayWidth=isNaN(n.width)?640:n.width,t.displayHeight=isNaN(n.height)?360:n.height,t.pixelRatio=this._model.pixelRatio,t.is360=this._model.is360,t.streams=this._model.streams,t.segmentLength=this._model.getSegmentLength(),t},c.prototype._onMediaLoaded=function(){this._prepareBitrateList()},c.prototype._updateAnalytics=function(t){var e=Date.now();this._analytics.pixelRatio=(new l).getPixelRatio({is360:this._model.is360}),this._analytics.baseTime||(this._analytics.baseTime=e),t&&(this._analytics.currentIndex=t.currentIndex,this._analytics.displayHeight=t.displayHeight,this._analytics.displayWidth=t.displayWidth,this._analytics.estimatedBandwidth=Math.floor(t.estimatedBandwidthInBps/1e3),this._analytics.bufferLength=t.bufferLength,this._analytics.time=e-this._analytics.baseTime);var n={};n.bl=this._model.bufferLength.toFixed(2),n.sc=this._analytics.scenario?this._analytics.scenario.charAt(0):"",n.dw=t?t.displayWidth:NaN,n.dh=t?t.displayHeight:NaN,n.eb=t?Math.floor(t.estimatedBandwidthInBps/1e3):NaN,n.ci=this._analytics.currentIndex,n.ni=this._analytics.nextIndex,n.pr=this._analytics.pixelRatio.toFixed(2),n.time=this._analytics.time,this._analytics.push(n)},c.prototype.addBufferingEntry=function(t,e,n){if(t>=0){var i={bl:this._model.bufferLength.toFixed(2),sc:"b",mbt:t.toFixed(1),br:Math.floor(n),eb:Math.floor(e),ci:this._model.currentLoadingStreamIndex,time:this._analytics.baseTime?Date.now()-this._analytics.baseTime:0};this._analytics.push(i)}},c.prototype._sendAnalyticsData=function(){this.__controller.sendEvent(a.ABR_DATA_UPDATED,this._analytics.getDto()),this._analytics.reset()},c.prototype._prepareBitrateList=function(){var t=this;t._model.streams&&!t._abrInputData.bitrateList.length&&(t._abrInputData.bitrateList=[],t._model.streams.forEach(function(e){t._abrInputData.bitrateList.push("VBR"===e.rcMode.toUpperCase()?e.avgBitrate:e.bitrate)}))}},function(t,e,n){"use strict";t.exports=r;var i=n(99);function r(){this._rules=[],this._rules.push(new i.BandwidthRule),this._rules.push(new i.BufferRule),this._rules.push(new i.ResolutionRule)}r.prototype.destroy=function(){this._rules=[]},r.prototype.getNextStreamIndex=function(t,e){if(!i.validateAbrInput(t))return console.warn("[AbrController] ABR input data is not valid / complete"),-1;if(e)return(new i.StartupRule).getNextStreamIndex(t);var n=Number.MAX_VALUE;return this._rules.forEach(function(e){var i=e.getNextStreamIndex(t);i<0||(n=Math.min(n,i))}),n===Number.MAX_VALUE?-1:n}},function(t,e,n){"use strict";function i(){this.reset(),this.switchCount=0}t.exports=i,i.prototype.destroy=function(){this._list=[]},i.prototype.reset=function(){this.scenario="",this.estimatedBandwidth=NaN,this.currentIndex=NaN,this.displayWidth=NaN,this.displayHeight=NaN,this.pixelRatio=1,this.bufferLength=0,this.nextIndex=NaN,this.reason="",this._list=[],this.time=NaN},i.prototype.push=function(t){t&&this._list.push(t)},i.prototype.getDto=function(){var t={};return t.sc=this.scenario.charAt(0),t.ci=this.currentIndex,t.dw=this.displayWidth,t.dh=this.displayHeight,t.pr=this.pixelRatio.toFixed(2),t.eb=this.estimatedBandwidth.toFixed(3),t.bl=this.bufferLength.toFixed(2),t.swc=this.switchCount,t.ted=this._list.slice(),t.ni=this.nextIndex,t.rs=this.reason,t.time=this.time,t}},function(t,e,n){"use strict";t.exports=a;var i=n(16),r=n(3),o=n(10).CmdNames,s=n(20).StreamTypes;function a(t){this._model=this.__controller.model,this._commandManager=t,this.SWITCH_ON_ERROR="switchOnError",this._error=null,i.call(this,this.constructor.name),this.running=!1}r.inherits(a,i),a.prototype.destroy=function(){this._model=null,this._commandManager=null,this._error=null,this.running=!1},a.prototype.handle=function(t,e){if(t&&e&&e.type!==s.SUBTITLES){var n=e.index;this._error=t;var i={streamIndex:n,error:t};this.running=!0;var r=this._commandManager.getCommand(o.CMD_ERROR_HANDLE);r?r.execute(n):this._commandManager.executeCommand(o.CMD_ERROR_HANDLE,i,this)}},a.prototype.onErrorHandleProgress=function(t,e){this.publish(this.SWITCH_ON_ERROR,e.index)},a.prototype.onErrorHandleError=function(t){this.running=!1,this._commandManager.removeCommand(t),this.__controller.notifyError(this._error)},a.prototype.onLoadComplete=function(){this.running=!1;var t=this._commandManager.getCommand(o.CMD_ERROR_HANDLE);this._commandManager.removeCommand(t)}},function(t,e,n){"use strict";t.exports=r;var i=n(12).HLSEvent;function r(){this._model=this.__controller.model,this._buffering=!1,this._error=!1,this._timeAtBufferEmpty=NaN,this._waitingEvtObj={},this._paused=!0,this._lastTime=-1,this.MIN_BUFFER_TO_PLAY=1,this.MIN_TIME_TO_BUFFER_CHECK=150,this.BUFFER_REPORT_THRESHOLD=20,this.MIN_BUFFER_TIME_UPPER_BOUND=5,this.WEIGHT=.5,this._bufferInit=!0,this._seeking=!1,this._resetMeasurements()}r.prototype.onPlayRequested=function(){this._setBufferEmpty()},r.prototype.destroy=function(){},r.prototype.checkBuffering=function(t){var e=this._model.bufferLength,n=this._model.currentTime,i=this._model.duration;if(!(isFinite(i)&&n+.05>i)){var r=this._getBufferCheckDelta();!t&&r<this.MIN_TIME_TO_BUFFER_CHECK||(!(e<=.02||this._lastKnownVideoTime===n&&e<this.MIN_BUFFER_TO_PLAY)||this._paused||this._model.preloading||this._buffering?!isNaN(this._timeAtBufferEmpty)&&n>this._timeAtBufferEmpty&&this._setBufferFull():this._setBufferEmpty(),this._lastKnownVideoTime=n,this._lastBufferCheckTime=Date.now())}},r.prototype.onPlaying=function(){this._paused=!1},r.prototype.onPause=function(){this._paused=!0,this._buffering&&(this._waitingEvtObj.bufferInit=!0,this._setBufferFull())},r.prototype.onSeeking=function(){this._seeking=!0},r.prototype.onSeeked=function(){this._seeking=!1},r.prototype.onTimeUpdate=function(){this._buffering&&this.checkBuffering(!0)},r.prototype.onVideoSync=function(t){this._lastKnownVideoTime=t},r.prototype.onError=function(){this._buffering&&this._setBufferFull()},r.prototype.onComplete=function(){this._buffering&&this._setBufferFull(),this._resetMeasurements()},r.prototype._setBufferEmpty=function(){if(!this._buffering){this._buffering=!0;var t=this.getMinimumBufferTime();this._setBufferingStartTime(),this._timeAtBufferEmpty=this._model.currentTime,this._seeking&&(this._bufferInit=!0),this._waitingEvtObj={value:this._buffering,bufferInit:this._bufferInit,minBufferTime:t},this.__controller.sendEvent(i.WAITING,this._waitingEvtObj)}},r.prototype._setBufferFull=function(){this._buffering&&(this._buffering=!1,this._timeAtBufferEmpty=NaN,this._waitingEvtObj={value:!1,waitTime:this._getRebufferingTime(),bufferInit:this._bufferInit,minBufferTime:.1},this.__controller.sendEvent(i.WAITING,this._waitingEvtObj),this._waitingEvtObj={},this._bufferInit=!1)},r.prototype.getMinimumBufferTime=function(){var t=this.__controller.services.bandwidthEstimator.instantaneousBandwidth,e=this._model.getCurrentLoadingStream(),n=e?e.bitrate/1e6:0,i=this._model.config.minBufferTime;return i=this._model.live?i.live:i.vod,this._model.config.variableMinBuffer&&n&&!isNaN(t)?this._calculateMinimumBufferTime(t/n,i):i},r.prototype._calculateMinimumBufferTime=function(t,e){var n=this.MIN_BUFFER_TIME_UPPER_BOUND;if(e>=n)return e;var i=Math.max(e,0);if(t>=1)return i;var r=t*n;return 1*Math.max(i,n-r*this.WEIGHT).toFixed(1)},r.prototype._getBufferCheckDelta=function(){var t=Date.now();return this._lastBufferCheckTime=this._lastBufferCheckTime||t,t-this._lastBufferCheckTime},r.prototype._setBufferingStartTime=function(){var t=this._getBufferCheckDelta(),e=this._getVideoProgressDelta();this._bufferingStartTime=Date.now()-Math.max(t-e,0)},r.prototype._getRebufferingTime=function(){var t=this._getVideoProgressDelta(),e=Math.max(Date.now()-this._bufferingStartTime-t,0);return this._waitingEvtObj.bufferInit?0:e<this.BUFFER_REPORT_THRESHOLD?0:e},r.prototype._getVideoProgressDelta=function(){var t=0;return this._lastKnownVideoTime&&(t=1e3*(this._model.currentTime-this._lastKnownVideoTime).toFixed(3)),t},r.prototype._resetMeasurements=function(){this._lastBufferCheckTime=null,this._lastKnownVideoTime=null},r.prototype.isBuffering=function(){return this._buffering}},function(t,e,n){"use strict";t.exports=c;var i=n(204),r=n(49),o=n(207),s=n(208),a=n(35),u=n(100),l=n(101);function c(){this._model=this.__controller.model,this._workerMap={},this.bandwidthEstimator=new o,this.segmentMetrics=this.__controller.create(s),this.metadataParser=this.__controller.create(i),this.mp4BoxParser=new r}c.prototype.destroy=function(){var t=this;t.bandwidthEstimator.destroy(),t.segmentMetrics.destroy(),t.metadataParser.destroy(),t._workerMap&&Object.keys(t._workerMap).forEach(function(e){t._workerMap[e].terminate()})},c.prototype.getNewLoader=function(t){var e=this._model,n=e.config,i=e.userAgent,r=e.inWorkerScope;(t=t||{}).maxRetries=t.maxRetries||n.maxRetries,t.requestTimeout=t.requestTimeout||n.requestTimeout,t.chunkedRequestTimeout=t.chunkedRequestTimeout||n.chunkedRequestTimeout,t.useMSStream=!!i&&(i.ie||i.edge),t.stopStreamLoadOnError=t.stopStreamLoadOnError||n.stopStreamLoadOnError;var o=null;try{o=a.getLoader(new a.LoadRequest(t),t.window,r)}catch(t){console.warn("[Services] Loader instantiation failed. error = "+t.toString()),o=null}return o},c.prototype.getWorker=function(t){if(!t)return null;if(this._model.config.useWorker&&"undefined"!=typeof Worker)try{return this._workerMap[t]||(this._workerMap[t]=l(u)),this._workerMap[t]}catch(t){console.log("Cant create web worker")}return null}},function(t,e,n){"use strict";t.exports=a;var i=n(17).StreamingMode,r=n(17).MetadataTypes,o=n(205),s=n(206);function a(){this.ERRORS={INVALID_M3U8:1,EMPTY_DATA:2,NO_SEGMENTS:3},this.mpdParser=new o}a.prototype.destroy=function(){this.mpdParser.destroy()},a.prototype.parse=function(t){if(!t)return null;return t.type===r.STRUCTURED?(new s).parseStructuredMetadata(t):this._parseRawMetadata(t)},a.prototype._parseRawMetadata=function(t){var e={},n=t.rawData;return""!==n&&n?-1!==n.indexOf("<MPD")?(t.streamingMode=i.DASH,this.mpdParser.parse(t)):-1!==n.indexOf("#EXTM3U")?(t.streamingMode=i.HLS,(new s).parse(t)):(console.warn("UNKNOWN SOURCE FORMAT"),e.error=this.ERRORS.INVALID_M3U8,e):(e.error=this.ERRORS.EMPTY_DATA,e)}},function(t,e,n){"use strict";t.exports=s;var i=n(17).StreamingMode,r=n(20).StreamTypes,o=n(3);function s(){this._cuepointList=[],this._parsedDom=null,this._check="blah",this._upLynkPrefix=null,this._startTimeOffset=null,this.ERRORS={INVALID_MPD:1,EMPTY_DATA:2,NO_SEGMENTS:3}}s.prototype.destroy=function(){},s.prototype._iso8601ToMS=function(t){return t?Date.parse(t):0},s.prototype._presentationTimeToMS=function(t){var e=0;if(t&&"P"===t.charAt(0)){t.match(/[\d|.|\+]+[A-Z]/g).forEach(function(t){var n=t.charAt(t.length-1),i=parseFloat(t,10);"S"===n?i*=1e3:"M"===n?i*=6e4:"H"===n&&(i*=36e5),e+=i})}else t&&!isNaN(t)&&(e=parseFloat(t,10));return e},s.prototype._formatPathNumber=function(t,e){if(void 0===t||void 0===e)return"";if("08d"===t){for(var n=e.toString();n.length<8;)n="0"+n;return n}return console.warn("[MpdParser] unknown path format: "+t),e},s.prototype._generateSegmentInfo=function(t,e,n,i,r,o){var s={brEndOffset:-1,brStartOffset:-1,containerFormat:"mp4",discontinuity:0,duration:t/1e3,levelIndex:0,periodId:e,sequenceNum:n,startTime:i/1e3,url:r,initSegment:{url:o}};return null===this._startTimeOffset?(this._startTimeOffset=s.startTime,s.startTime=0):(s.startTime-=this._startTimeOffset,s.startTime=Math.round(1e3*s.startTime)/1e3),s},s.prototype._createStreamInfo=function(t,e,n,o,s,a,u,l){var c=this._getStreamType(e),d=this._getTimeScale(n),h=this._getSegmentDurationMS(n),p=s>h?s/d:h/d,f={groupId:n.id,bitrate:parseInt(n.bandwidth),codecs:[n.codecs],containerFormat:"mp4",drmInfo:[],duration:o/1e3,hasAudio:c===r.AUDIO,hasEndList:!s&&o>0,height:c===r.VIDEO?n.height:0,segmentInfoList:[],type:c,width:c===r.VIDEO?n.width:0,streamingMode:i.DASH,initSegment:{url:l},url:u,targetDuration:p};if(c===r.AUDIO?(f.audioCodec=n.codecs,f.language=e.lang,f.autoSelect=!1,f.default=!1,f.groupId=n.id,f.channels=n.audioChannnelConfiguration?n.audioChannnelConfiguration.value:0):c===r.VIDEO?(f.audioGroupId="audio",f.subtitlesGroupId="subs",f.videoCodec=n.codecs):c===r.SUBTITLES&&(f.language=e.lang,f.groupId=n.id,f.codec=n.codecs,f.autoSelect=!1,f.subtitlesCodec=n.codecs),e.drm.length>0){for(var _={},m=0;m<e.drm.length;m++){var y=e.drm[m];_.periodId=t.id;var v={prefix:null!==this._upLynkPrefix?this._upLynkPrefix:"",pssh:y.pssh};"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===y.schemeIdUri?(v.type="wv",_.widevine=v):"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95"===y.schemeIdUri&&(v.type="pr",v.pro=y.pro,_.playready=v)}f.drmInfo.push(_)}return f},s.prototype._getTimeScale=function(t){return t.segmentList?parseInt(t.segmentList.timescale,10):t.segmentTemplate?parseInt(t.segmentTemplate.timescale,10):1e3},s.prototype._getSegmentDurationMS=function(t){return t.segmentList?parseInt(t.segmentList.duration,10):t.segmentTemplate?parseInt(t.segmentTemplate.duration,10):0},s.prototype._createSegmentList=function(t,e,n,i,r,s,a,u){var l=new RegExp(/\$Number%([\d|.|\+]*[a-zA-Z])\$/),c=t.startMS,d=t.durationMS,h=this._getSegmentDurationMS(e),p=[],f="";if(e.segmentList)for(var _=0;_<e.segmentList.segments.length;_++){var m=e.segmentList.segments[_],y=Math.min(h,d);d-=y,f=n&&!o.isAbsoluteUrl(m)?n+m:m,p.push(this._generateSegmentInfo(y,t.id,_,c,f,i)),c+=y}else if(e.segmentTemplate){var v=e.segmentTemplate,g=parseInt(v.startNumber,10),E=0,b=Math.ceil(t.durationMS/h),A=0,S=0,T=0;if("dynamic"===u?(A=Math.min(Math.floor((s-t.startMS)/h),b),S=Math.max(Math.floor((s-t.startMS-a)/h),1)):(A=b,S=1),A<=0||S>A)E=0;else{var I=S-1;g+=I,E=A===S?1:A-S+1,T=t.startMS+I*h,d-=I*h,E<0&&(console.warn("Calculated segmentCount < 0"),E=0)}for(var C=v.media.replace("$RepresentationID$",e.id),R=l.test(C)?C.match(l)[1]:"",P=g;P<E+g;P++){var L=C.replace(l,this._formatPathNumber(R,P)),O=Math.min(h,d);d-=O,f=n&&!o.isAbsoluteUrl(L)?n+L:L;var w=this._generateSegmentInfo(O,t.id,P-g,T,f,i);p.push(w),T+=O}}return p},s.prototype._getInitSegmentUrl=function(t,e){var n=null;return t.segmentList?n=t.segmentList.initialization.sourceURL:t.segmentTemplate&&(n=t.segmentTemplate.initialization.replace("$RepresentationID$",t.id)),e&&!o.isAbsoluteUrl(n)?e+n:n},s.prototype._getXmlDocument=function(t){return(new DOMParser).parseFromString(t,"application/xml")},s.prototype.parse=function(t){var e=this,n={};if(!t)return null;var o=e._getXmlDocument(t.rawData);if(null===o||null===o.documentElement||void 0===o.documentElement)return console.warn("[MpdParser] failed to parse mpd"),n.error=e.ERRORS.INVALID_MPD,n;if("MPD"!==o.documentElement.nodeName)return console.warn("[MpdParser] invalid root node: %s",o.documentElement.nodeName),n.error=e.ERRORS.INVALID_MPD,n;t.headers&&t.headers.length>0&&t.headers.forEach(function(t){"x-uplynk-prefix"===t.name&&(e._upLynkPrefix=t.value)}),e._parsedDom=o,e._appendAttributes(o.documentElement,n);var s=e._iso8601ToMS(n.publishTime),a=e._getNowGMT(s);n.streamingMode=i.DASH,n.drm=!1,n.reloadUrl=t.url;for(var u=[],l=o.documentElement.childNodes,c=0;c<l.length;c++){var d=l[c];if(1===d.nodeType)if("Period"===d.nodeName){var h=e._parsePeriod(d);null!==h&&u.push(h)}else"Location"===d.nodeName&&(n.reloadUrl=d.childNodes[0].nodeValue)}for(var p=[],f=[],_=[],m=e._presentationTimeToMS(n.mediaPresentationDuration),y=e._presentationTimeToMS(n.minimumUpdatePeriod),v=e._presentationTimeToMS(n.suggestedPresentationDelay),g=e._iso8601ToMS(n.availabilityStartTime),E=0,b=-1,A=0;A<u.length;A++){var S=u[A];S.startMS=e._getPeriodStartMS(S,g,E),-1===b&&(b=S.startMS);var T=A+1<u.length?u[A+1]:null;S.endMS=e._getPeriodEndMS(S,S.startMS,g,T,b,m,y,a),S.durationMS=S.endMS-S.startMS;for(var I=0;I<S.adaptationSets.length;I++)for(var C=S.adaptationSets[I],R=e._getStreamType(C),P=0;P<C.representations.length;P++){var L=C.representations[P],O=L.baseURL?L.baseURL:C.baseURL,w=e._getInitSegmentUrl(L,O),M=e._createStreamInfo(S,C,L,m,y,n.type,n.reloadUrl,w),D=e._createSegmentList(S,L,O,w,b,a,v,n.type);D.length>0&&(Array.prototype.push.apply(M.segmentInfoList,D),R===r.VIDEO?e._appendStreamInfoToGroup(p,M):R===r.AUDIO?e._appendStreamInfoToGroup(f,M):R===r.SUBTITLES&&e._appendStreamInfoToGroup(_,M)),C.drm.length>0&&(n.drm=!0)}E+=S.durationMS}this._setAltTrackDefault(f),this._setAltTrackDefault(_);var N={AUDIO:{audio:f},SUBTITLES:{subs:_}};return n.streamInfoList=p,n.renditionGroups=N,n},s.prototype._setAltTrackDefault=function(t){t&&t.length>0&&(t[0].autoSelect=!0,t[0].default=!0)},s.prototype._appendStreamInfoToGroup=function(t,e){for(var n=0;n<t.length;n++)if(t[n].groupId===e.groupId)return void this._appendStreamInfo(t[n],e);e.index=t.length,t.push(e)},s.prototype._getStreamType=function(t){return"video/mp4"===t.mimeType?r.VIDEO:"audio/mp4"===t.mimeType?r.AUDIO:"application/mp4"===t.mimeType&&"text"===t.contentType?r.SUBTITLES:r.VIDEO},s.prototype._appendStreamInfo=function(t,e){for(var n=t.segmentInfoList[t.segmentInfoList.length-1].sequenceNum+1,i=0;i<e.segmentInfoList.length;i++){var r=e.segmentInfoList[i];r.sequenceNum=n+i,t.segmentInfoList.push(r)}for(var o=0;o<e.drmInfo.length;o++)t.drmInfo.push(e.drmInfo[o]);e.bitrate>t.bitrate&&(t.bitrate=e.bitrate)},s.prototype._appendAttributes=function(t,e){for(var n=t.attributes,i=0;i<n.length;i++)e[n[i].nodeName]=n[i].nodeValue;return n.length},s.prototype._parsePeriod=function(t){var e={adaptationSets:[]};this._appendAttributes(t,e);for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(1===i.nodeType)if("AssetIdentifier"===i.nodeName){var r={};this._appendAttributes(i,r),e.assetIdentifier=r}else if("AdaptationSet"===i.nodeName){var o=this._parseAdaptationSet(i);null!==o&&e.adaptationSets.push(o)}}return e},s.prototype._parseAdaptationSet=function(t){var e={representations:[],drm:[]};this._appendAttributes(t,e);for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(1===i.nodeType)if("Role"===i.nodeName){var r={};this._appendAttributes(i,r),e.role=r}else if("BaseURL"===i.nodeName)e.baseURL=i.childNodes[0].nodeValue;else if("ContentProtection"===i.nodeName){var o=this._parseContentProtection(i);null!==o&&e.drm.push(o)}else if("Representation"===i.nodeName){var s=this._parseRepresentation(i);null!==s&&e.representations.push(s)}else"SupplementalProperty"===i.nodeName||console.warn("Ignored Adaptation Set Element: %s",i.nodeName)}return e},s.prototype._parseContentProtection=function(t){var e={};this._appendAttributes(t,e);for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(1===i.nodeType)if(-1!==i.nodeName.indexOf("pssh"))e.pssh=i.childNodes[0].nodeValue;else if("mspr:pro"===i.nodeName)e.pro=i.childNodes[0].nodeValue;else if("ms:laurl"===i.nodeName){var r={};this._appendAttributes(i,r),e.laurl=r}else console.warn("Ignored ContentProtection Element: %s",i.nodeName)}return e},s.prototype._parseRepresentation=function(t){var e={};this._appendAttributes(t,e);for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(1===i.nodeType)if("AudioChannelConfiguration"===i.nodeName){var r={};this._appendAttributes(i,r),e.audioChannnelConfiguration=r}else if("BaseURL"===i.nodeName)e.baseURL=i.childNodes[0].nodeValue;else if("SegmentTemplate"===i.nodeName){var o={};this._appendAttributes(i,o),e.segmentTemplate=o}else if("SegmentList"===i.nodeName){var s=this._parseSegmentList(i);null!==s&&(e.segmentList=s)}else console.warn("Ignored Representation Element: %s",i.nodeName)}return e},s.prototype._parseSegmentList=function(t){var e={segments:[]};this._appendAttributes(t,e);for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(1===i.nodeType)if("Initialization"===i.nodeName){var r={};this._appendAttributes(i,r),e.initialization=r}else if("SegmentURL"===i.nodeName){var o=i.getAttribute("media");null!==o&&e.segments.push(o)}else console.warn("Ignored Segment List Element: %s",i.nodeName)}return e},s.prototype._getPeriodStartMS=function(t,e,n){return t.start?e+this._presentationTimeToMS(t.start):n},s.prototype._getPeriodEndMS=function(t,e,n,i,r,o,s,a){return t.duration?e+this._presentationTimeToMS(t.duration):i&&i.start?n+this._presentationTimeToMS(i.start):o?n+r+o:s+a},s.prototype._getNowGMT=function(t){var e=Date.now();return this._localRemoteTimeDiff||(this._localRemoteTimeDiff=e-t),e-this._localRemoteTimeDiff}},function(t,e,n){"use strict";t.exports=l;var i=n(17),r=i.MetadataTypes,o=i.StreamingMode,s=n(20).StreamTypes,a="#EXT-X-MEDIA:TYPE=SUBTITLES,",u="#EXT-X-MEDIA-SEQUENCE:";function l(){this._cuepointList=[],this.ERRORS={INVALID_M3U8:1,EMPTY_DATA:2,NO_SEGMENTS:3}}l.prototype.parse=function(t){if(!t)return null;return t.type===r.STRUCTURED?this.parseStructuredMetadata(t):this._parseRawMetadata(t)},l.prototype._parseRawMetadata=function(t){var e={},n=t.rawData;if(""===n||!n)return e.error=this.ERRORS.EMPTY_DATA,e;var i=n.split("\n");return 0!==i[0].indexOf("#EXTM3U")?(e.error=this.ERRORS.INVALID_M3U8,e):n.indexOf("#EXTINF:")>0?this._parseMediaPlaylist(i,t):n.indexOf("#EXT-X-STREAM-INF:")>0?this._parseMasterPlaylist(i,t):(e.error=this.ERRORS.INVALID_M3U8,e)},l.prototype.parseStructuredMetadata=function(t){var e=this,n={};return n.streamInfoList=e.parseStreamInfo(t.streams),t.hasStreamMetadata&&n.streamInfoList.forEach(function(t){t.segmentInfoList=e.parseSegmentInfo(t.hlsInfo,t.initSegment,t.index),t.duration=0,t.segmentInfoList.forEach(function(e){t.duration+=e.duration}),t.hasEndList=!0,t.targetDuration=t.hlsInfo.segment_duration}),t.hasAltStreamMetadata&&(n.renditionGroups={},t.altStreams.forEach(function(t){var i,r=t.manifestContent;r&&0===r.indexOf(a)?((i=e._extractSubtitles(r,t.host)).type=s.SUBTITLES,i.containerFormat="vtt"):(i=e.parseStreamInfo([t])[0]).hlsInfo&&(i.segmentInfoList=e.parseSegmentInfo(i.hlsInfo,i.initSegment)),e._buildRenditionGroupsInfo(n.renditionGroups,i)})),n},l.prototype._parseMasterPlaylist=function(t,e){for(var n=[],i={},r=e.url,o=e.cdn,s=0;s<t.length;s++){var a=null,u=t[s].trim();if(0===u.indexOf("#EXT-X-STREAM-INF:")){a=this._parseStreamAttributes(this._getAttributes(u.substr("#EXT-X-STREAM-INF:".length)));do{u=t[++s]}while(u.match(/^\s*$/));a.url=this._extractURL(u,r),a.cdn=o,n.push(a)}else 0===u.indexOf("#EXT-X-MEDIA:")&&(u=u.replace(/"/g,""),a=this._parseAlternateStreamAttributes(this._getAttributes(u.substr("#EXT-X-MEDIA:".length)),r),this._buildRenditionGroupsInfo(i,a))}return{streamInfoList:n,renditionGroups:i}},l.prototype._buildRenditionGroupsInfo=function(t,e){if(e.type&&e.groupId){var n=t[e.type];n||(n=t[e.type]={});var i=n[e.groupId];i&&i.length?i.push(e):n[e.groupId]=[e]}},l.prototype._getAttributes=function(t){for(var e={},n=t.indexOf("=");-1!==n;){var i=t.substr(0,n),r=0;'"'===(t=t.substr(n+1)).charAt(0)?(r=t.substr(1).indexOf('"'),e[i]=t.substr(1,r),t=t.substr(r+3)):(r=-1===(r=t.indexOf(","))?t.length:r,e[i]=t.substr(0,r),t=t.substr(r+1)),n=t.indexOf("=")}return e},l.prototype._parseMediaPlaylist=function(t,e){var n={},i={},r=[],a=[],l={streamInfoList:[],renditionGroups:{}};if(!t||!t.length)return l;var c=e.url,d=e.index;i.discontinuity=!1,i.sequenceNum=0,i.startTime=0,i.programDateTime=0,i.brStartOffset=-1,i.brEndOffset=-1,i.levelIndex=d,n.discontinuitySeqNum=0,n.index=d,n.targetDuration=0,n.hasEndList=!1,n.url=c,n.duration=0,n.containerFormat="",n.streamingMode=o.HLS;for(var h=0;h<t.length;h++){var p=t[h].trim();if(!p.match(/^\s*$/)){if(0===p.indexOf(u)&&(n.seqNum=parseInt(p.substr(u.length)),i.sequenceNum=n.seqNum),0===p.indexOf("#EXT-X-DISCONTINUITY-SEQUENCE:"))n.discontinuitySeqNum=parseInt(p.substr("#EXT-X-DISCONTINUITY-SEQUENCE:".length));else if(0===p.indexOf("#EXT-X-DISCONTINUITY"))i.discontinuity=!0;else if(0===p.indexOf("#EXT-X-TARGETDURATION:"))n.targetDuration=parseFloat(p.substr("#EXT-X-TARGETDURATION:".length));else if(0===p.indexOf("#EXT-X-MAP")){var f=this._parseIndexSegmentData(p,c);i.initSegment=f}else if(0===p.indexOf("#EXT-X-KEY"))i.encryptionData=this._parseSegmentKeyData(p,c);else if(0===p.indexOf("#EXT-X-PROGRAM-DATE-TIME:"))i.programDateTime=this._parseProgramDateTime(p);else if(0===p.indexOf("#EXTINF:")){var _=p.indexOf(",");i.duration=-1===_?parseFloat(p.substr("#EXTINF:".length)):parseFloat(p.substr("#EXTINF:".length,_-"#EXTINF:".length)),n.duration+=i.duration;do{p=t[++h].trim()}while(p.match(/^\s*$/));if(0===p.indexOf("#EXT-X-BYTERANGE:")){var m=p.substr("#EXT-X-BYTERANGE:".length,p.length-"#EXT-X-BYTERANGE:".length),y=m.indexOf("@");i.brStartOffset=parseInt(m.substr(y+1,m.length-y-1)),i.brEndOffset=i.brStartOffset+parseInt(m.substr(0,y))-1;do{p=t[++h].trim()}while(p.match(/^\s*$/))}i.url=this._extractURL(p,c),i.containerFormat=this._getContainerFormat(i.url),n.containerFormat=i.containerFormat,r.push(this._copySegmentInfo(i)),i.startTime+=i.duration,i.sequenceNum++,i.programDateTime=0,i.brStartOffset=-1,i.brEndOffset=-1,i.encryptionData&&(i.encryptionData.initVector=null)}else 0===p.indexOf("#EXT-X-ENDLIST")&&(n.hasEndList=!0);if(p.indexOf("#EXT-X-CUE-OUT:")>=0){var v=this._createCueOutSegment(i.sequenceNum,p);a.push(v)}}}if(r.length&&(n.segmentInfoList=r,n.initSegment=r[0].initSegment),a.length&&(n.cuepointList=a),e.streamType&&e.streamType!==s.MAIN){var g=l.renditionGroups;n.type=e.streamType,n.groupId=e.groupId,n.name=e.name,this._buildRenditionGroupsInfo(g,n)}else l.streamInfoList.push(n);return l},l.prototype._parseStreamAttributes=function(t){if(!t)return null;var e={streamingMode:o.HLS};return Object.keys(t).forEach(function(n){var i=t[n];switch(n){case"BANDWIDTH":e.bitrate=1*i;break;case"AVERAGE-BANDWIDTH":e.avgBitrate=1*i;break;case"RESOLUTION":var r=i.split("x");e.width=parseInt(r[0]),e.height=parseInt(r[1]);break;case"CODECS":e.codecs=i.split(","),e.hasAudio=-1!==i.indexOf("mp4a");break;case"AUDIO":e.audioGroupId=i.replace(/"/g,"");break;case"VIDEO":e.videoGroupId=i.replace(/"/g,"");break;case"SUBTITLES":e.subtitlesGroupId=i.replace(/"/g,"");break;case"CLOSED-CAPTIONS":e.ccGroupId=i.replace(/"/g,"")}}),e},l.prototype._getContainerFormat=function(t,e){var n=null;return t&&t.length?t.indexOf(".ts")>-1?n="ts":t.indexOf(".mp4")>-1||t.indexOf(".m4s")>-1?n="mp4":t.indexOf(".aac")>-1?n="aac":t.indexOf(".vtt")>-1&&(n="vtt"):e&&(e.indexOf("mp2t")>-1?n="ts":e.indexOf("mp4")>-1?n="mp4":e.indexOf("aac")>-1?n="aac":e.indexOf("vtt")>-1&&(n="vtt")),n},l.prototype._extractURL=function(t,e){var n=null;return"http://"===t.substr(0,7)||"https://"===t.substr(0,8)?t:(e.indexOf("?")>-1&&(e=e.substr(0,e.indexOf("?"))),"/"===t.substr(0,1)?e.substr(0,e.indexOf("//")+2)+(n=e.substr(e.indexOf("//")+2)).substr(0,n.indexOf("/"))+t:e.substr(0,e.lastIndexOf("/")+1)+t)},l.prototype._extractSubtitles=function(t,e){var n=(t=t.replace(/"/g,"")).substr(a.length).split(",");return this._parseSubtitleAttributes(n,t,e)},l.prototype._parseSubtitleAttributes=function(t,e,n){var i=this,r={};return t&&t.length&&(t.forEach(function(t){t.indexOf("GROUP-ID")>-1?r.groupId=t.split("=")[1]:t.indexOf("LANGUAGE")>-1?r.language=t.split("=")[1]:t.indexOf("NAME")>-1?r.name=t.split("=")[1]:t.indexOf("AUTOSELECT")>-1?r.autoSelect="YES"===t.split("=")[1]:t.indexOf("DEFAULT")>-1?r.default="YES"===t.split("=")[1]:t.indexOf("URI")>-1?r.url=i._extractURL(t.substr(4),n):t.indexOf("FORCED")>-1&&(r.forced="YES"===t.split("=")[1])}),r.streamingMode=o.HLS),r},l.prototype._parseAlternateStreamAttributes=function(t,e){var n=this;if(!t)return null;var i={streamingMode:o.HLS};return Object.keys(t).forEach(function(r){var o=t[r];switch(r){case"TYPE":i.type=o,i.type===s.SUBTITLES&&(i.containerFormat="vtt");break;case"GROUP-ID":i.groupId=o;break;case"LANGUAGE":i.language=o;break;case"NAME":i.name=o;break;case"AUTOSELECT":i.autoSelect="YES"===o;break;case"DEFAULT":i.default="YES"===o;break;case"FORCED":i.forced="YES"===o;break;case"URI":i.url=n._extractURL(o,e)}}),i},l.prototype._copyVTTInfo=function(t){var e={};return e.discontinuity=t.discontinuity,e.sequenceNum=t.sequenceNum,e.startTime=t.startTime,e.programDateTime=t.programDateTime,e.url=t.url,e.duration=t.duration,e},l.prototype._parseIndexSegmentData=function(t,e){if(!t)return null;for(var n={},i=t.substr("#EXT-X-MAP".length+1).split(","),r=0;r<i.length;r++){var o=i[r].split("=");if(0===o[0].indexOf("URI"))n.url=this._extractURL(i[r].substr(5,i[r].length-6),e);else if(0===o[0].indexOf("BYTERANGE")){var s=o[1].indexOf("@");n.range={start:parseInt(o[1].substr(s+1,o[1].length-s-2)),end:parseInt(o[1].substr(1,s-1)-1)}}}return n},l.prototype._parseSegmentKeyData=function(t,e){if(!t)return null;for(var n={},i=t.substr("#EXT-X-KEY".length+1).split(","),r=0;r<i.length;r++){var o=i[r].split("=");0===o[0].indexOf("URI")?n.keyUri=this._extractURL(i[r].substr(5,i[r].length-6),e):0===o[0].indexOf("METHOD")?n.method=o[1]:0===o[0].indexOf("IV")&&(n.initVector=o[1])}return n},l.prototype._parseProgramDateTime=function(t){if(!t)return 0;var e,n,i=t.substr("#EXT-X-PROGRAM-DATE-TIME:".length).split("T"),r=i[0].split("-"),o=parseInt(r[0]),s=parseInt(r[1])-1,a=parseInt(r[2]),u=i[1],l=0;if(u.indexOf("Z")>=0)e=u.substr(0,u.indexOf("Z")).split(":");else if(u.indexOf("+")>=0){var c=u.split("+");e=c[0].split(":"),n=c[1].split(":"),l=-1}else if(u.indexOf("-")>=0){var d=u.split("-");e=d[0].split(":"),n=d[1].split(":"),l=1}var h=0,p=0,f=0;(e&&(h=parseInt(e[0]),p=parseInt(e[1]),f=parseFloat(e[2])),n)&&(h=(24+h+l*parseInt(n[0]))%24,(p+=l*parseInt(n[1]))>=60?(h++,p-=60):p<0&&(h--,p+=60));return new Date(Date.UTC(o,s,a,h,p,f)).getTime()},l.prototype._copySegmentInfo=function(t){var e={};e.discontinuity=t.discontinuity,e.sequenceNum=t.sequenceNum,e.startTime=t.startTime,e.programDateTime=t.programDateTime,e.brStartOffset=t.brStartOffset,e.brEndOffset=t.brEndOffset,e.containerFormat=t.containerFormat,e.levelIndex=t.levelIndex,e.url=t.url,e.duration=t.duration;var n=t.encryptionData;n&&(e.encryptionData={keyUri:n.keyUri,method:n.method,initVector:n.initVector});var i=t.initSegment;return i&&(e.initSegment={url:i.url},i.range&&(e.initSegment.range={start:i.range.start,end:i.range.end})),e},l.prototype.parseStreamInfo=function(t){var e=this;if(!t)return null;var n=[];return t.forEach(function(t,i){var r=t.host;t.path&&""!==t.path?r+=t.path:t.url&&(r=t.url);var a={streamingMode:o.HLS,bitrate:1e3*t.bitrate,avgBitrate:t.avgBitrate?1e3*t.avgBitrate:0,channels:t.channels,height:t.height,width:t.width,url:r,index:i,hlsInfo:t.hls_info,cdn:t.cdn,rcMode:t.rcMode||"cbr",format:t.format,audioCodec:t.acodec,videoCodec:t.vcodec,autoSelect:t.auto_select,default:t.default,type:(t.type||s.MAIN).toUpperCase(),name:t.name,groupId:t.group_id,language:t.language,forced:t.forced};if(t.alt_renditions&&(a.audioGroupId=t.alt_renditions.audio_group_id,a.videoGroupId=t.alt_renditions.video_group_id,a.subtitlesGroupId=t.alt_renditions.subtitle_group_id,a.ccGroupId=t.alt_renditions.cc_group_id),a.hlsInfo&&a.hlsInfo.mp4_url){var u=a.hlsInfo;a.initSegment={url:u.mp4_url},u.init_segment_offset>=0&&u.init_segment_length>=0&&(a.initSegment.range={start:u.init_segment_offset,end:u.init_segment_offset+u.init_segment_length-1}),a.sidxOffset=u.sidx_offset,a.sidxLength=u.sidx_length,a.firstSegOffset=u.first_segment_offset,a.firstSegLength=u.first_segment_length}if(t.manifestContent&&t.manifestContent.indexOf("SUBTITLES")>-1){var l=t.manifestContent.split('SUBTITLES="')[1];a.subtitlesGroupId=l.substr(0,l.indexOf('"'))}if(a.hlsInfo){var c=a.hlsInfo.ts_url||a.hlsInfo.mp4_url;a.containerFormat=e._getContainerFormat(c,a.hlsInfo.mime_type)}n.push(a)}),n},l.prototype.parseSegmentInfo=function(t,e,n){if(!t)return null;var i=[],r={brStartOffset:-1,brEndOffset:-1,programDateTime:0,discontinuity:!1};r.sequenceNum=t.start_index,r.startTime=0,r.initSegment=e;var o="";t.ts_url&&(o=t.ts_url.indexOf("?")>=0?"&":"?");for(var s=0;s<t.segments_count;s++){if(t.ts_url)if(t.ts_url.indexOf("_xx.ts")>=0){var a="_"+r.sequenceNum.toString()+".ts";r.url=t.ts_url.replace("_xx.ts",a),r.url=r.url+o+"yh=1"}else r.url=t.ts_url+o+"num="+r.sequenceNum.toString();else r.url=t.mp4_url,0===s&&(r.brStartOffset=t.first_segment_offset,r.brEndOffset=r.brStartOffset+t.first_segment_length-1);r.levelIndex=n,r.duration=t.segment_duration,s===t.segments_count-1&&(r.duration=t.last_segment_duration),r.containerFormat=this._getContainerFormat(r.url,t.mime_type),i.push(this._copySegmentInfo(r)),r.sequenceNum++,r.startTime+=r.duration,r.brStartOffset=-1,r.brEndOffset=-1}return i},l.prototype._cueoutTimeParser=function(t){var e=t.split(":"),n=0;return e.length>1&&(n=1e3*parseFloat(e[1])),n},l.prototype._createCueOutSegment=function(t,e){var n=t;if(!(n<0)){var i=this._cueoutTimeParser(e),r={};return r.startSeqNum=n,r.startTime=NaN,r.cuepointDuration=i,r}}},function(t,e,n){"use strict";function i(){this.COLLECTION_INTERVAL=100,this.MIN_SAMPLE_SIZE=5e4,this.SAMPLE_QUEUE_LENGTH=40,this.INSTANCE_SAMPLE_QUEUE_LENGTH=15,this.BW_ADJUSTMENT_FACTOR=.8,this._samplesQueue=[],this._instanceSamplesQueue=[],this.averageBandwidth=0,this.instantaneousBandwidth=0}t.exports=i,i.prototype.destroy=function(){this._samplesQueue=[],this._instanceSamplesQueue=[],this.averageBandwidth=0,this.instantaneousTotalBandwidth=0},i.prototype.addSample=function(t){if(t&&!(t.time<=0)){this._addSingleSample(t);var e=0,n=this._samplesQueue.length,i=n*(n+1)/2,r=1/i;this._samplesQueue.forEach(function(t,n){e+=(n+1)*r*t.bandwidth}),this.averageBandwidth=this.BW_ADJUSTMENT_FACTOR*e,e=0,n=this._instanceSamplesQueue.length,r=1/(i=n*(n+1)/2),this._instanceSamplesQueue.forEach(function(t,n){e+=(n+1)*r*t.bandwidth}),this.instantaneousBandwidth=this.BW_ADJUSTMENT_FACTOR*e}},i.prototype._addSingleSample=function(t){!t||t.time<=0||(t.bandwidth=t.size/t.time*.008,t.bandwidth=Math.min(60,t.bandwidth),this._samplesQueue.push(t),this._instanceSamplesQueue.push(t),this._samplesQueue.length>this.SAMPLE_QUEUE_LENGTH&&this._samplesQueue.shift(),this._instanceSamplesQueue.length>this.INSTANCE_SAMPLE_QUEUE_LENGTH&&this._instanceSamplesQueue.shift())},i.prototype.replaceSamples=function(t,e){var n=t&&e?t/e*.008:0;if(n>0){this.averageBandwidth=n,this._samplesQueue=[];for(var i=Math.min(Math.ceil(e/this.COLLECTION_INTERVAL),this.SAMPLE_QUEUE_LENGTH),r=0;r<i;r++){var o={bandwidth:n};this._samplesQueue.push(o)}}}},function(t,e,n){"use strict";t.exports=r;var i=n(12).HLSEvent;function r(){this._model=this.__controller.model,this._ignoreBuffering=!1,this._buffering=!1,this._loadedList=[],this._renderedList=[],this._loadingSegment=null,this._renderingSegment=null,this._eventKeys={},this._prevAvgBandwidth=NaN,this._registerListeners(),this._playbackPosition=0,this._bufferingTime=0,this._timeUpdateTimestamp=0,this._isFirstSegment=!0}r.prototype.destroy=function(){this._loadedList=[],this._renderedList=[],this._renderingSegment=null,this._loadingSegment=null,this._removeListeners()},r.prototype._registerListeners=function(){this._eventKeys[i.WAITING]=this.__controller.addEventListener(i.WAITING,this._onWaiting,this)},r.prototype._removeListeners=function(){this.__controller.removeEventListeners(this._eventKeys)},r.prototype.onComplete=function(){this.segmentRenderNext()},r.prototype.onTimeUpdate=function(t){var e=this._model.getCurrentPlayingStream();if(this._playbackPosition=t,this.updateRenderState(this._renderingSegment,this._playbackPosition),this._model.live&&e&&e.cuepoints.length>0&&this.cuepointEventDispatcher(this._playbackPosition,e.cuepoints),t>0&&this._renderingSegment){var n=this._findTimedMetadataAtCurrentTime();n&&this.__controller.sendEvent(i.TIMED_METADATA_READY,n.payload)}},r.prototype._findTimedMetadataAtCurrentTime=function(){var t=this,e=t._renderingSegment.seqNum,n=t._model.timedMetadataStore[e],i=t._playbackPosition;if(!n||!n.length)return null;t._model.live&&Object.keys(t._model.timedMetadataStore).forEach(function(n){n>e||t._model.timedMetadataStore[n].every(function(e){return i-e.timestamp>=t._model.config.pastBufferLengthLimit.live})&&delete t._model.timedMetadataStore[n]});if(i<n[0].timestamp||i>n[n.length-1].timestamp+.6)return null;for(var r=null,o=n.length-1;o>=0;o--){var s=n[o],a=(1e4*i-1e4*s.timestamp)/1e4;if(a>=0&&a<=.6){if(s.recent)continue;r=s;break}}return r&&(r.recent=!0,setTimeout(function(){delete r.recent},600)),r},r.prototype._onWaiting=function(t){t&&(t.bufferInit||(t.value?this._onBufferingBegin():this._onBufferingEnd(t.waitTime)))},r.prototype.segmentLoadBegin=function(t,e){if(e){var n=new function(){this.seqNum=-1,this.beginTime=NaN,this.endTime=NaN,this.bitrateIndex=-1,this.switchReason="none",this.bufferCount=0,this.bufferTime=0,this.timeToFirstByte=0,this.timeToDownload=0,this.timeToRequest=0,this.observedBitrate=0,this.actualBitrate=0,this.frameDrop=0,this.frameRateSum=0,this.frameRateSampleCount=0,this.frameRate=30};n.seqNum=t,n.beginTime=e.beginTime,n.timeToFirstByte=e.timeToFirstByte,n.bitrateIndex=Math.max(0,e.bitrateIndex),n.switchReason=e.switchReason,n.frameRate=e.frameRate,n.observedBitrate=1e3*e.observedBitrate,n.endTime=e.endTime,n.perfInfo={},n.actualBitrate=e.endTime!==e.beginTime?.008*e.bytesTotal/(e.endTime-e.beginTime):0,this._loadingSegment&&this._loadedList.push(this._loadingSegment),this._loadingSegment=n,(this._renderingSegment&&t===this._renderingSegment.seqNum||!this._renderingSegment)&&this.segmentRenderNext(n)}},r.prototype.segmentLoadEnd=function(t,e){var n=this._loadingSegment;n&&n.seqNum===t?(e&&(n.timeToDownload=e.timeToDownload,n.perfInfo=e.perfInfo,n.segmentInWorker=e.segmentInWorker,n.actualBitrate=n.endTime!==n.beginTime?.008*e.bytesTotal/(n.endTime-n.beginTime):0),this._loadedList.push(n),this._loadingSegment=null):console.log("[SegmentMetrics] Loaded segment not same as loading segment")},r.prototype.segmentRenderNext=function(t){this._renderingSegment&&(this._renderedList.push(this._renderingSegment),this._renderingSegment=null,this.__controller.sendEvent(i.SEGMENT_RENDERED)),t&&(this._renderingSegment=t,this._model.setCurrentPlayingStream(t.bitrateIndex))},r.prototype.updateRenderState=function(t,e){if(!(isNaN(e)||e<=0)&&(t||(t=this._getNextSegment(e))&&this.segmentRenderNext(t),t&&(this._frameStats&&(t.frameDrop=this._frameStats.frameDrop,t.frameRateSum+=Number(this._frameStats.frameRate.toFixed(2)),t.frameRateSampleCount++),!(e>=t.beginTime&&e<t.endTime)))){var n=this._getNextSegment(e);if(n&&(this.segmentRenderNext(n),n.bitrateIndex!==t.bitrateIndex)){var r=this._model.streams,o={bitrate:Math.round(r[n.bitrateIndex].bitrate/1e3),reason:n.switchReason,oldFrameRate:t.frameRate,newFrameRate:n.frameRate};this.__controller.sendEvent(i.STREAM_SWITCHED,o)}}},r.prototype.updateFrameStats=function(t){t&&(this._frameStats=t)},r.prototype._getNextSegment=function(t){if(this._loadingSegment&&t>=this._loadingSegment.beginTime&&t<this._loadingSegment.endTime)return this._loadingSegment;if(this._loadedList.length)for(var e=this._loadedList.length-1;e>=0;e--)if(t>=this._loadedList[e].beginTime&&t<this._loadedList[e].endTime)return this._loadedList[e];return null},r.prototype._onBufferingBegin=function(){this._buffering||(this._buffering=!0,this._renderingSegment!==this._loadingSegment&&console.log("Playing and loading segment seq num do not match! Playing = "+this._renderingSegment.seqNum+", loading = "+(this._loadingSegment?this._loadingSegment.seqNum:"null")))},r.prototype._onBufferingEnd=function(t){if(this._buffering){this._rebufferingStartTime=NaN,this._buffering=!1;var e=this._renderingSegment,n=e&&!isNaN(t)&&t>0;e&&(e.bufferTime+=n?t:0,e.bufferCount+=n?1:0)}},r.prototype.getMetrics=function(){var t=this._renderingSegment,e=[];if(this._renderedList.length){for(var n=0;n<this._renderedList.length;n++)e.push(this._dto(this._renderedList[n]));this._renderedList=[]}return t&&(e.push(this._dto(t)),t.bufferCount=0,t.bufferTime=0,t.timeToFirstByte=NaN,t.timeToDownload&&(t.timeToDownload=NaN)),e},r.prototype._dto=function(t){if(!t)return null;var e=this._model.streams;t.bitrateIndex=e.length>0?Math.min(t.bitrateIndex,e.length-1):0;var n=e[t.bitrateIndex].bitrate/1e3,i=e[t.bitrateIndex].avgBitrate/1e3;return t.bufferTime>0&&!t.bufferCount?t.bufferCount=1:!t.bufferTime&&t.bufferCount>0&&(t.bufferCount=0),{seq_num:t.seqNum,max_b:n,avg_b:i,ib:n,ob:t.observedBitrate.toFixed(2),ab:Math.round(t.actualBitrate),num_buf:t.bufferCount,buf_dur:t.bufferTime,req_t:t.timeToRequest,fb_dl_t:t.timeToFirstByte,req_dl_t:t.timeToDownload,drop_f:t.frameDrop,avg_fr:(t.frameRateSum/t.frameRateSampleCount).toFixed(2)}},r.prototype.getMetricsBandwidthInfo=function(){var t=this.__controller.services.bandwidthEstimator,e=t.averageBandwidth===this._prevAvgBandwidth?0:t.averageBandwidth;return this._prevAvgBandwidth!==t.averageBandwidth&&(this._prevAvgBandwidth=t.averageBandwidth),e},r.prototype.cuepointEventDispatcher=function(t,e){var n,r=e.length,o=r-1;if(r>0){if(this.shouldFireCueDetectedEvent(t,e[o]))return e[o].setCueOutDetectedState(!0),n={cuepointDuration:e[o].cuepointDuration,timeGapBeforeCUEOUT:e[o].startTime-t},void this.__controller.sendEvent(i.CUEPOINT_DETECTED,n);if(this.shouldFireCueOutEvent(t,e[o]))return e[o].setCueOutFiredState(!0),n={cuepointDuration:e[o].cuepointDuration,cuepointPlayedTime:t-e[o].startTime},void this.__controller.sendEvent(i.CUEPOINT_STARTED,n)}},r.prototype.shouldFireCueDetectedEvent=function(t,e){return!!e.startTime&&(!e.isCueOutDetectedFired&&e.startTime>t)},r.prototype.shouldFireCueOutEvent=function(t,e){if(!e.startTime)return!1;var n=this._getCurrentPlayingSeqNum(t);return!e.isCueOutFired&&n===e.startSeqNum&&t>e.startTime},r.prototype._getCurrentPlayingSeqNum=function(t){var e=this._model.getCurrentPlayingStream(),n=e?e.segments:null;if(n){if(1===n.length)return n[0].seqNum;for(var i=n.length-1;i>=0;i--)if(t>=n[i].startTime)return n[i].seqNum}return null}},function(t,e,n){"use strict";var i=n(102),r={wifi:!0,broadband:!0,dsl:!0,cable:!0};function o(){if("undefined"!=typeof navigator)return(navigator&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)||{}).type}function s(){if(!i.mobile)return!0;var t=i.android&&i.chrome>=50,e=i.ios&&!i.iosWebView&&i.safari>=10;return t||e}t.exports={getConnectionType:o,isAutoplaySupported:s,isAutoplayAllowed:function(t){return!i.mobile||!(!(t=(o()||t||"").replace(/^cs_/i,"").toLowerCase())||!r[t])&&s()}}},function(t,e,n){"use strict";function i(t,e,n){t&&e&&n&&(this._node=t,this._client=n,this._mediaSource=e,this._addEventListeners())}t.exports=i,i.prototype.destroy=function(){this._removeEventListeners()},i.prototype._addEventListeners=function(){var t=this;t._videoEventHandler=t._onNativeVideoEvent.bind(t),t._videoNativeEvents=["play","playing","pause","seeking","seeked","ended","error","timeupdate"],t._videoNativeEvents.forEach(function(e){t._node.addEventListener(e,t._videoEventHandler)}),t._mediaSourceOpenHandler=t._onMediaSourceOpen.bind(t),t._mediaSource.addEventListener("sourceopen",t._mediaSourceOpenHandler),window.addEventListener("resize",t._videoEventHandler)},i.prototype._removeEventListeners=function(){var t=this;t._videoNativeEvents.forEach(function(e){t._node.removeEventListener(e,t._videoEventHandler)}),t._mediaSource.removeEventListener("sourceopen",t._mediaSourceOpenHandler),window.removeEventListener("resize",t._videoEventHandler)},i.prototype._onNativeVideoEvent=function(t){this._client.sendVideoEvent(t)},i.prototype._onMediaSourceOpen=function(t){this._client.onMediaSourceOpen(t)}},function(t,e,n){"use strict";t.exports=o;var i=n(212),r=n(24);function o(){this._node=this._context.node,this._mediaSource=this._context.mediaSource,this._switchManager=null,this._sourceBuffers=[],this._error=!1,this._model=this._context.appModel,this._pastBufferLengthLimit=this._model.config.pastBufferLengthLimit}o.prototype.destroy=function(){this._abortBuffer(),this._sourceBuffers=[]},o.prototype.setSwitchManager=function(t){this._switchManager=t},o.prototype.process=function(){this._areSourceBuffersClosed()&&"open"===this._mediaSource.readyState&&(console.log("[BufferController] End of stream"),this._mediaSource.endOfStream())},o.prototype.onError=function(){this._error=!0},o.prototype.onSeeking=function(t,e){console.log("[BufferController][onSeeking] resetSrcBuffers = "+e),t&&this._abortBuffer(),e&&this._recreateSrcBuffers()},o.prototype._getSourceBuffer=function(t){for(var e=0;e<this._sourceBuffers.length;e++)if(t===this._sourceBuffers[e].type)return this._sourceBuffers[e];return null},o.prototype.setMinimumBufferTime=function(t){console.log("[BufferController][setMinimumBufferTime] minBufferTime = "+t),this._sourceBuffers.forEach(function(e){e.setMinBufferTime(t)})},o.prototype.createSourceBuffer=function(t,e,n){if(!this._mediaSource||this._error)return console.warn("[BufferController][createSourceBuffer] Source buffer could not be created"),null;var o=this._getSourceBuffer(t);if(!o)if(this._context.isMimetypeSupported(e)){o=this._context.create(i,this._mediaSource,t,e),this._sourceBuffers.push(o);var s=this._model.config.minBufferTime,a=isNaN(n)?this._model.live?s.live:s.vod:n;this.setMinimumBufferTime(a)}else{var u=new r.Error(r.ERR_MIMETYPE_NOT_SUPPORTED);this._context.notifyError(u)}return o},o.prototype._removeSrcBuffers=function(){if(this._mediaSource&&!this._error)for(;this._sourceBuffers.length>0;){this._sourceBuffers.shift().destroy()}else console.warn("[BufferController][_removeSrcBuffers] Source buffer could not be removed")},o.prototype._recreateSrcBuffers=function(){var t=this,e=[];t._mediaSource&&!t._error&&"open"===t._mediaSource.readyState&&(t._sourceBuffers.forEach(function(t){e.push({type:t.type,mimeType:t.mimeType})}),t._removeSrcBuffers(),e.forEach(function(e){t.createSourceBuffer(e.type,e.mimeType,NaN)}))},o.prototype._abortBuffer=function(){this._mediaSource&&!this._error&&this._sourceBuffers.forEach(function(t){t.abort()})},o.prototype.clear=function(t,e){if(this._mediaSource&&!this._error)if(t){if(!(t&&t.end-t.start<10)&&e){e.clearBuffer(t.start,t.end,function(t){t&&console.log("Failed to clear ",e.type,". Error: ",t.message)})}}else this._sourceBuffers.forEach(function(t){t.clearAll()})},o.prototype.clearSrcBuffer=function(t,e){var n=this._getSourceBuffer(t);if(n)if(e){n.clearBuffer(e.start,e.end,function(e){e&&console.log("Failed to clear ",t,". Error: ",e.message)})}else n.clearAll()},o.prototype.appendBuffer=function(t,e){var n=this,i=n.createSourceBuffer(t.type,t.mimeType);i&&!n._error?t.data&&t.data.length&&i.appendBuffer(t.data,t.startTime,t.endTime,t.onlyMetadata,function(t,i){n._onAppendBufferComplete(t,i),e(t,i)}):console.warn("[BufferController][appendBuffer] Mp4 data is not pushed to buffer")},o.prototype.endOfStream=function(t){this._sourceBuffers.forEach(function(e){e.setEndOfStream(t)})},o.prototype._areSourceBuffersClosed=function(){if(!this._sourceBuffers.length)return!1;var t=!0;return this._sourceBuffers.forEach(function(e){t=t&&"closed"===e.state}),t},o.prototype.getPendingBufferLength=function(){var t=0;return this._sourceBuffers.forEach(function(e){var n=e.getTotalPendingBufferLength();t<n&&(t=n)}),t},o.prototype.getBufferedAndPending=function(){var t={};return this._sourceBuffers.forEach(function(e){var n=e.getTotalPendingBufferLength(),i=e.getBufferLength();-1!==e.mimeType.indexOf("video")?t.video={buffered:i,pending:n,mimeType:e.mimeType}:t.audio={buffered:i,pending:n,mimeType:e.mimeType}}),t},o.prototype.resetReadyState=function(){this._sourceBuffers.forEach(function(t){t.ready=!1})},o.prototype.areSrcBuffersReady=function(){for(var t=0;t<this._sourceBuffers.length;t++)if(!this._sourceBuffers[t].ready)return!1;return!0},o.prototype._onAppendBufferComplete=function(t,e){e&&(this.clear(this._getPastBufferRange(e),e),this.clear(this._getFutureBufferRange(e),e))},o.prototype._getPastBufferRange=function(t){var e=this._node.currentTime,n=null;try{n=t.buffer.buffered}catch(t){console.log("Error from src buffer: "+t.toString()),n=null}var i=0,r=0,o=this._model.live?this._pastBufferLengthLimit.live:this._pastBufferLengthLimit.vod;return n&&n.length&&(i=n.start(0),r=Math.max(e-o,0)),{start:i,end:r}},o.prototype._getFutureBufferRange=function(t){var e=this._node.currentTime,n=null;try{n=t.buffer.buffered}catch(t){console.log("Error from src buffer: "+t.toString()),n=null}var i=this._model.live?this._pastBufferLengthLimit.live:this._pastBufferLengthLimit.vod,r={start:0,end:0};return n&&n.length>1&&e+i<n.start(1)&&(r.start=n.start(1),r.end=n.end(1)),r}},function(t,e,n){"use strict";t.exports=s;var i=.1,r="append",o="remove";function s(t,e,n){var r=this;r._node=r._context.node,r._destroyed=!1,r.type=e,r.mimeType=n,r._mediaSource=t,r.buffer=t.addSourceBuffer(n),r._appendQueue=[],r._removeQueue=[],r._waitingList=[],r._endOfStream=!1,r._minBufferTime=i,r.ready=!1,r.TIMESTAMP_COMPARE_EPSILON=.065,r.GOP_LENGTH=2,r._transferCompleteHandler=r._onTransferComplete.bind(r),r.buffer.addEventListener("updateend",r._transferCompleteHandler),r._errorHandler=function(){console.warn("Error from Source buffer"),r.abort()},r.buffer.addEventListener("error",r._errorHandler),r.state="open"}s.prototype.destroy=function(){this.remove(),this._appendQueue=[],this._removeQueue=[],this._waitingList=[],this.state="closed"},s.prototype.remove=function(){this._destroyed||(this._destroyed=!0,this.abort(),this.buffer.removeEventListener("updateend",this._transferCompleteHandler),this.buffer.removeEventListener("error",this._errorHandler),"closed"!==this._mediaSource.readyState&&this._mediaSource.removeSourceBuffer(this.buffer))},s.prototype.setMinBufferTime=function(t){this._minBufferTime=Math.max(i,t)},s.prototype.appendBuffer=function(t,e,n,i,o){if(!this._destroyed){var s={type:r,cb:o,buffer:t,startTime:e,endTime:n,time:n-e,onlyMetadata:i||!1};this._appendQueue.push(s),this._processSourceBufferTasks()}},s.prototype.clearBuffer=function(t,e,n){if(this._destroyed||t>=e)return n("["+this.constructor.name+"] Invalid remove buffer call");var i={type:o,cb:n,startTime:t,endTime:Math.round(1e3*parseFloat(e))/1e3};this._removeQueue.push(i),this._processSourceBufferTasks()},s.prototype.abort=function(){if("open"!==this._mediaSource.readyState||this._destroyed)console.warn("MSE ready state is not open to attempt abort() on src buffer");else{this._appendQueue=[],this._removeQueue=[],this._waitingList=[];try{this.buffer.abort()}catch(t){console.log("["+this.constructor.name+"] exception during abort buffer")}}},s.prototype.clearAll=function(){if("closed"!==this._mediaSource.readyState&&!this._destroyed){this.abort();try{var t=this.buffer.buffered,e=t.length?t.start(0):0,n=t.length?t.end(t.length-1):0;n>e&&this.buffer.remove(e,n)}catch(t){console.log("["+this.constructor.name+"][clear] Error = "+t.toString())}}},s.prototype.setEndOfStream=function(t){this._endOfStream=t,this._destroyed||(t?(this._markClosedOnComplete(),this._processSourceBufferTasks()):this.state=this._appendQueue.length?this.state:"empty")},s.prototype._markClosedOnComplete=function(){this._endOfStream&&"empty"===this.state&&!this._waitingList.length&&(this.state="closed")},s.prototype._onTransferComplete=function(){if(!this._destroyed){if(this.ready=!0,this._waitingList.length)this._waitingList.shift().cb(null,this);this._appendQueue.length||(this.state="empty"),this._processSourceBufferTasks(),this._markClosedOnComplete()}},s.prototype._processSourceBufferTasks=function(){for(;this._removeQueue.length;){if(this.buffer.updating)return;this._performTask(this._removeQueue.shift())}for(;this._appendQueue.length;){if(this.buffer.updating)return;var t=this.getBufferLength()+this.getTotalPendingBufferLength(),e=this._appendQueue.length&&this._appendQueue[0]&&this._appendQueue[0].onlyMetadata;if(!this._endOfStream&&t<this._minBufferTime&&!e)return;this._performTask(this._appendQueue.shift())}},s.prototype._performTask=function(t){if(t&&t.type)try{t.type===r?this.buffer.appendBuffer(t.buffer):t.type===o&&this.buffer.remove(t.startTime,t.endTime),this._waitingList.push(t),this.state="updating"}catch(e){if(console.warn("["+this.constructor.name+"] exception during source buffer operation: "+e.toString()),"QuotaExceededError"===e.name)this._clearOnQuotaExceed()&&t.type===r&&this._appendQueue.unshift(t)}},s.prototype._clearOnQuotaExceed=function(){var t=this._node.buffered,e=t.length>0?t.start(0):NaN,n=this._node.currentTime-this.GOP_LENGTH;return n>e?(console.log("[SourceBufferManager]["+this.type+"] Clearing from ",e," to ",n),this.buffer.remove(e,n),!0):(console.warn("[SourceBufferManager] Could not clear buffer on QuotaExceedError"),!1)},s.prototype.getTotalPendingBufferLength=function(){var t=0;return this._appendQueue.forEach(function(e){e&&e.time&&(t+=e.time)}),t},s.prototype.getBufferLength=function(){var t,e=this._context.node,n=this.TIMESTAMP_COMPARE_EPSILON,i=0,r=e.currentTime,o=null;try{o=this.buffer.buffered;for(var s=0;o&&s<o.length;s++)if(r+n>=o.start(s)&&r<o.end(s)){t=s;break}t>=0&&o&&o.length&&(i=o.end(t)-r)}catch(t){console.warn("[SourceBufferManager] Exception = "+t.toString())}return i}},function(t,e,n){"use strict";t.exports=o;var i=n(12).HLSEvent,r=n(25);function o(){this._model=this._context.appModel,this._node=this._context.node,this._mediaInfo={currentStreamBitrate:0,frameDrop:0,frameRateSum:0,frameRateSampleCount:0,currentKbps:0,deliveryProtocol:this._getDeliveryProtocol(),bufferingCount:0,totalBufferingTime:0,streamingMode:this._model.streamingMode},this.FRAMERATE_SAMPLE_SIZE=4,this._frameRateStats={prevTotalFrames:0,prevTotalDroppedFrames:0,prevFrameRateMeasuredTime:0,frameRateSampleCollector:[],currentFrameRate:0},this._timer=new r(1e3),this._timer.addEventListener(this._sendInfoUpdate,this)}o.prototype.destroy=function(){this._mediaInfo=null,this._timer.destroy()},o.prototype.onPlay=function(){this._timer.start()},o.prototype.onPause=function(){this._timer.stop()},o.prototype.updateBufferingInfo=function(t){t&&(t.value||t.bufferInit||(this._mediaInfo.bufferingCount++,this._mediaInfo.totalBufferingTime+=t.waitTime))},o.prototype._sendInfoUpdate=function(){var t=this._model.streams,e=this._mediaInfo,n=this._model.getCurrentPlayingStream(),r=this.getFpsStats();n&&(e.currentStreamIndex=this._model.currentPlayingStreamIndex,e.currentStreamBitrate=n.bitrate/1e3,e.mediaWidth=n.width,e.mediaHeight=n.height),t.length&&(e.qualityLevels=t.length,e.minBitRate=t[0].bitrate,e.maxBitRate=t[e.qualityLevels-1].bitrate),e.bufferLength=this._model.getBufferLength().toFixed(2),e.bufferLength<=5&&console.warn("[debug]WARNING: buf len below 5, bufLen = "+e.bufferLength),e.frameRate=r.frameRate.toFixed(2),e.droppedFrames=r.droppedFrames,e.currentKbps=(1e3*this._model.currentKbps).toFixed(0),e.streamingMode=this._model.streamingMode,e.drm=this._model.drmRequired,e.drmsys=this._model.licenseType,this._model.infoUpdateSent=!0,this._context.sendEvent(i.INFO_UPDATE,{mediaInfo:this._mediaInfo})},o.prototype.getWindow=function(){return window},o.prototype._getDeliveryProtocol=function(){var t=this.getWindow();return t&&t.location&&t.location.protocol?t.location.protocol.slice(0,-1):"http"},o.prototype.getFpsStats=function(){var t,e,n=this._node,i=0,r=this._frameRateStats,o=n.currentTime-r.prevFrameRateMeasuredTime,s=this._fpsBrowserSupport(),a=0;return(s.isWebKitFpsAvailable||s.isNonWebKitFpsAvailable)&&(t=s.isWebKitFpsAvailable?n:n.getVideoPlaybackQuality(),e=s.isWebKitFpsAvailable?t.webkitDecodedFrameCount:t.totalVideoFrames,a=s.isWebKitFpsAvailable?t.webkitDroppedFrameCount:t.droppedVideoFrames,(i=r.prevFrameRateMeasuredTime>0&&0!==o?(e-r.prevTotalFrames-(a-r.prevTotalDroppedFrames))/o:r.currentFrameRate)&&r.frameRateSampleCollector.push(i),this._calculateCurrentFrameRate(),r.prevTotalFrames=e,r.prevTotalDroppedFrames=a,r.prevFrameRateMeasuredTime=n.currentTime),{frameRate:r.currentFrameRate,droppedFrames:a}},o.prototype._fpsBrowserSupport=function(){var t=this._node;return{isWebKitFpsAvailable:void 0!==t.webkitDecodedFrameCount,isNonWebKitFpsAvailable:"function"==typeof t.getVideoPlaybackQuality}},o.prototype._calculateCurrentFrameRate=function(){var t=this._frameRateStats.frameRateSampleCollector;if(t.length>=this.FRAMERATE_SAMPLE_SIZE){var e=t.reduce(function(t,e){return t+e});this._frameRateStats.currentFrameRate=e/t.length,t.splice(0,t.length)}}},function(t,e,n){"use strict";function i(){this.LOCALSTORAGE_PREFIX="com.yahoo.yep",this._islocalStorageAvailable=this._islocalStorageSupported()}t.exports=i,i.prototype._islocalStorageSupported=function(){return"localStorage"in window&&null!==window.localStorage},i.prototype.writeProperty=function(t,e){this._islocalStorageAvailable&&(e=JSON.stringify(e),t=this.LOCALSTORAGE_PREFIX+"."+t,window.localStorage.setItem(t,e))},i.prototype.readProperty=function(t){if(!t||!t.length)return null;if(this._islocalStorageAvailable){t=this.LOCALSTORAGE_PREFIX+"."+t;var e=JSON.parse(window.localStorage.getItem(t));return e||null}return null}},function(t,e,n){"use strict";t.exports.LicenseManager=u;var i=n(3),r=n(24),o=n(50),s=n(10).CmdNames,a=n(25);function u(t,e,n){this._commandName=s.CMD_LICENSE_LOAD,this.LICENSE_TYPE_NONE=0,this.LICENSE_TYPE_WIDEVINE=1,this.LICENSE_TYPE_PLAYREADY=2,this._licenseType=0,this.playreadyKeySystem={keySystem:"com.microsoft.playready",supportedConfig:[{initDataTypes:["keyids","cenc"],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a"',robustness:""}],videoCapabilities:[{contentType:'video/mp4; codecs="avc1"',robustness:""}]}]},this.widevineKeySystem={keySystem:"com.widevine.alpha",supportedConfig:[{label:"foo",initDataTypes:["cenc"],sessionTypes:["temporary"],audioCapabilities:[{contentType:'audio/mp4; codecs="mp4a.40.5"',robustness:"SW_SECURE_CRYPTO"}],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.640028"',robustness:"HW_SECURE_ALL"},{contentType:'video/mp4; codecs="avc1.640028"',robustness:"SW_SECURE_CRYPTO"},{contentType:'video/mp4; codecs="avc1.4d001f"',robustness:"HW_SECURE_ALL"},{contentType:'video/mp4; codecs="avc1.4d001f"',robustness:"SW_SECURE_CRYPTO"},{contentType:'video/mp4; codecs="avc1.42000d"',robustness:"HW_SECURE_ALL"},{contentType:'video/mp4; codecs="avc1.42000d"',robustness:"SW_SECURE_CRYPTO"}]}]},this.LICENSE_STATUS_DONE="DONE",this.LICENSE_STATUS_LOADING="LOADING",this.LICENSE_STATUS_NEW="NEW_REQ",this._commandManager=t.create(o),this._keySessions=[],window.addEventListener("beforeunload",this._closeSessions.bind(this)),this._video=e,this._context=n,this._keyServerPrefix=null,this._mediaKeys=null,this._mediaKeysError=null,this._keyRequests=[],this._timer=new a(250),this._timer.addEventListener(this._checkMediaKeys,this),this._generateRequestsCompleted=0,this._controller=t,this._initMediaKeys()}u.prototype.addDrmItem=function(t){i.isDrmItemContained(t,this._keyRequests)||(t.status=this.LICENSE_STATUS_NEW,this._keyRequests.push(t),this._processPendingKeys(this))},u.prototype._initMediaKeys=function(){var t=this;t._mediaKeys=null,navigator.requestMediaKeySystemAccess?navigator.requestMediaKeySystemAccess(t.widevineKeySystem.keySystem,t.widevineKeySystem.supportedConfig).then(function(e){t._licenseType=t.LICENSE_TYPE_WIDEVINE,t._context.appModel.licenseType="widevine",console.log("LicenseManger possible configurations for this device - ",e.getConfiguration()),e.createMediaKeys().then(function(e){t._onMediaKeyAcquired(t,e)},function(){t._mediaKeysError={type:r.ERR_DRM_INIT,message:"LicenseManager - createMediaKeys() failed for Widevine"}})},function(){navigator.requestMediaKeySystemAccess(t.playreadyKeySystem.keySystem,t.playreadyKeySystem.supportedConfig).then(function(e){t._licenseType=t.LICENSE_TYPE_PLAYREADY,t._context.appModel.licenseType="playready",e.createMediaKeys().then(function(e){t._onMediaKeyAcquired(t,e)},function(){t._mediaKeysError={type:r.ERR_DRM_INIT,message:"LicenseManager - createMediaKeys() failed for PlayReady"}})},function(){t._mediaKeysError={type:r.ERR_DRM_CONFIG,message:"LicenseManager - Your browser/system does not support the requested configurations for playing DRM protected content."}})}):t._mediaKeysError={type:r.ERR_DRM_EME_MISSING,message:"LicenseManager - Browser EME components not detected! (also check URL for HTTPS)"}},u.prototype._onMediaKeyAcquired=function(t,e){t._mediaKeys=e,t._timer.start()},u.prototype._checkMediaKeys=function(){var t=this;t._video.mediaKeys||(t._timer.stop(),t._video.setMediaKeys(t._mediaKeys).then(function(){t._processPendingKeys(t)},function(e){t._mediaKeysError={type:r.ERR_DRM_INIT,message:"LicenseManager - "+e}}))},u.prototype._processPendingKeys=function(t){if(null===t._mediaKeys&&null!==t._mediaKeysError)return t._notifyError(t._mediaKeysError.type,t._mediaKeysError.message),void(t._mediaKeysError=null);if(null!==t._mediaKeys)for(var e=0;e<t._keyRequests.length;e++){var n=t._keyRequests[e];n.status===t.LICENSE_STATUS_NEW&&(t._licenseType===t.LICENSE_TYPE_WIDEVINE?(n.widevine.initData=i.base64ToBuffer(n.widevine.pssh),n.widevine.initDataType="cenc",n.status=t.LICENSE_STATUS_LOADING,t._getNewKeySession(t,n.widevine)):t._licenseType===t.LICENSE_TYPE_PLAYREADY&&(n.playready.initData=i.base64ToBuffer(n.playready.pssh),n.playready.initDataType="cenc",n.status=t.LICENSE_STATUS_LOADING,t._getNewKeySession(t,n.playready)))}else console.log("LicenseManager - _processPendingKeys(), EME MediaKeys not yet available to be able to process pending key requests")},u.prototype._getNewKeySession=function(t,e){var n=t._mediaKeys.createSession("temporary");t._keySessions.push(n),n.addEventListener("message",function(n){t._downloadNewKey(t,e,n)},!1);var i=n.generateRequest(e.initDataType,e.initData);i.then(function(){t._generateRequestsCompleted++,t._generateRequestsCompleted===t._keyRequests.length&&t._controller.onGenerateRequestComplete()}),i.catch(function(e){t._notifyError(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - keySession.generateRequest() failed: "+e)})},u.prototype._getLicenseUrl=function(t,e){return t._licenseType===t.LICENSE_TYPE_PLAYREADY?e.prefix+"/pr":t._licenseType===t.LICENSE_TYPE_WIDEVINE?e.prefix+"/wv":""},u.prototype._downloadNewKey=function(t,e,n){var i=t._getLicenseUrl(t,e),r=t._parseKeyMessage(t,n.message);t._commandManager.executeCommand(t._commandName,{challenge:r.challenge,headerFields:r.headerFields,url:i,drmInfo:e,event:n},t)},u.prototype._parseKeyMessage=function(t,e){var n,o={};if(t._licenseType===t.LICENSE_TYPE_PLAYREADY){var s=(new DOMParser).parseFromString(String.fromCharCode.apply(null,new Uint16Array(e)),"application/xml");s.getElementsByTagName("Challenge")[0]?n=i.base64ToBuffer(s.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue).buffer:t._notifyError(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - Cannot find <Challenge> in key message");var a=s.getElementsByTagName("name"),u=s.getElementsByTagName("value");a.length!==u.length&&t._notifyError(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - Playready: Mismatched header <name>/<value> pair in key message");for(var l=0;l<a.length;l++)o[a[l].childNodes[0].nodeValue]=u[l].childNodes[0].nodeValue}else t._licenseType===t.LICENSE_TYPE_WIDEVINE&&(n=e);return{challenge:n,headerFields:o}},u.prototype.onLicenseLoadComplete=function(t,e){var n=this,i=t.data?t.data.event:null,o=t.data?t.data.drmInfo:null;i.target.update(e.data).catch(function(t){n._notifyError(r.ERR_DRM_LICENSE_REQUEST,"LicenseManager - call to MediaKeySession.update() failed: "+t)}),console.log("LicenseManager - finished license update for DRM playback");for(var s=0;s<n._keyRequests.length;s++)n._keyRequests[s].widevine.pssh!==o.pssh&&n._keyRequests[s].playready.pssh!==o.pssh||(n._keyRequests[s].status=n.LICENSE_STATUS_DONE)},u.prototype.onLicenseLoadError=function(){this._notifyError(r.ERR_XHR_LOAD,"LicenseManager - XHR failed")},u.prototype._notifyError=function(t,e){var n=new r.Error(t,e);this._context.notifyError(n),console.error(e)},u.prototype._closeSessions=function(){for(var t=0;t<this._keySessions.length;t++)this._keySessions[t].close().then(function(){console.log("LicenseManager session closed")});this._keySessions=[]},u.prototype.destroy=function(){this._pssh=null,this._mediaKeys=null,this._keyRequests=[],this._closeSessions(),this._timer.destroy()}},function(t,e,n){"use strict";t.exports=s;var i=n(96),r=n(14),o=n(17).StreamingMode;function s(t){if(!t||!t.userAgent)throw new Error("Invalid/incomplete configuration to AppModel");this.configure(t),this.streams=[],this.altRenditionGroups=[],this.live=!1,this.duration=0,this.timescale=9e4,this.TIMESTAMP_COMPARE_EPSILON=.065,this.PIXEL_RATIO_360=6,this.currentPlayingStreamIndex=0,this.currentLoadingStreamIndex=0,this.preloading=!1,this.currentKbps=0,this.infoUpdateSent=!0,this.streamingMode=o.HLS,this.drmRequired=!1,this.drmInfo=[],this.licenseType="none",this.is360=t.metadata&&t.metadata.is360||!1,this.setDimensions(t.dimensions)}s.prototype.destroy=function(){this.config=null,this.streams=[],this.altRenditionGroups=[]},s.prototype.configure=function(t){var e=this;e.config=e.config||r.deepCopy(i),e.userAgent=t.userAgent,t&&Object.keys(t).forEach(function(n){e.config.hasOwnProperty(n)&&(e.config[n]=t[n])}),e.config.demux.startChunkWithKeyFrame=!(e.userAgent.chrome&&e.userAgent.chrome>=50),e.config.demux.useTimer=!(e.userAgent.chrome||e.userAgent.ie||e.userAgent.edge)},s.prototype.update=function(t){var e=this;t&&(Object.keys(t).forEach(function(n){("currentKbps"!==n||t.currentKbps||e.infoUpdateSent)&&e.hasOwnProperty(n)&&(e[n]=t[n])}),e.infoUpdateSent=!1)},s.prototype.setDimensions=function(t){var e=this._context.node;this._dimensions=t||{width:e?e.clientWidth:0,height:e?e.clientHeight:0}},s.prototype.getBufferLength=function(){var t,e,n=this._context.node,i=n.buffered,r=0,o=n.currentTime;if(0===o){for(t=0;t<i.length;t++)r+=i.end(t)-i.start(t);return r}var s=this._context.mediaSource;r=1/0;for(var a=0;a<s.activeSourceBuffers.length;a++){var u=this._getBufferLengthInSrcBuffer(o,s.activeSourceBuffers[a]);u>=0&&(r=Math.min(r,u))}for(t=0;t<i.length;t++)if(o>=i.start(t)&&o<i.end(t)){e=t;break}return e>=0&&i.length&&(r=Math.min(i.end(e)-o,r)),r===1/0&&(r=0),r},s.prototype._getBufferLengthInSrcBuffer=function(t,e){if(!e)return-1;for(var n,i=e.buffered,r=0,o=0;o<i.length;o++)if(t>=i.start(o)&&t<i.end(o)){n=o;break}return n>=0&&i.length&&(r=i.end(n)-t),r},s.prototype.getBufferedDto=function(){for(var t=this._context.node.buffered,e={length:t.length,ranges:[]},n=0;n<t.length;n++)e.ranges[n]={start:t.start(n),end:t.end(n)};return e},s.prototype.getCurrentPlayingStream=function(){return this.streams&&this.streams.length&&this.currentPlayingStreamIndex>=0&&this.currentPlayingStreamIndex<this.streams.length?this.streams[this.currentPlayingStreamIndex]:null},s.prototype.getDimensions=function(){return this._dimensions},s.prototype.getPixelRatio=function(){var t=1;try{window&&(t=window.devicePixelRatio)}catch(e){t=1}return t||(t=1),this.is360&&(t*=this.PIXEL_RATIO_360),t},s.prototype.getCurrentDate=function(){var t=this.getCurrentPlayingStream(),e=this._context.node.currentTime,n=t?t.segments:null;if(n)for(var i=n.length-1;i>=0;i--)if(n[i].programDateTime>0&&e>=n[i].startTime){var r=parseInt(1e3*(e-n[i].startTime));return n[i].programDateTime+r}}},function(t,e,n){"use strict";var i=n(218);e.apply=function(){r()};var r=function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=window.document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}!i.ie&&window.CustomEvent||(t.prototype=window.Event.prototype,window.CustomEvent=t)}},function(t,e,n){"use strict";t.exports=n(66).userAgent},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(105),r=n(68),o=n(44),s=n(108),a=n(37),u=n(110),l=n(111),c=n(112),d=n(113),h=function(){function t(){}return t.getRendererTypes=function(){for(var t=[],e=0,n=[o.default,a.default,r.default,i.default,s.default,u.default,d.default,c.default,l.default];e<n.length;e++){var h=n[e];h&&h.canUse()&&t.push(h.type)}return t},t.getAdRendererTypes=function(){for(var t=[],e=0,n=[o.default,a.default,r.default,i.default,d.default,c.default,l.default];e<n.length;e++){var s=n[e];s&&s.canUse()&&t.push(s.type)}return t},t}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(33),o=n(45),s=8e3,a=/^#(EXT-X-MEDIA-SEQUENCE|EXTINF|EXT-X-CUE-OUT(?:-CONT)?|EXT-X-CUE-IN|EXT-X-ENDLIST):?([0-9\.]+)?(?:\/([0-9\.]+)?)?,?$/,u=function(){function t(t,e){this._model=e,this._eventBus=t,this._segments={},this._events=[],this._processedCueOuts={},this._processedCueIns={},this._trackedCueOutSeqNum=null,this._masterPlaylist="",this._mediaPlaylist="",this._processingTime=0,this._refreshPlaylistTimer=new o.default(s),this._bindEvents()}return t.prototype.destroy=function(){this._stopCueTracking(),this._refreshPlaylistTimer.destroy(),this._cueOutTimeUpdater.destroy()},t.prototype.updatePlaylistURLs=function(t,e){this._masterPlaylist=t,this._mediaPlaylist=e},t.prototype._initCueTracking=function(t,e){var n=this;this._getMediaPlaylist(t,e,function(i,r){i||(n._extractCuePoints(r),n._refreshPlaylistTimer.addEventListener(o.default.TIMER_EVENT,n._onUpdate.bind(n,t,e),n),n._refreshPlaylistTimer.start())}),this._stopCueTracking()},t.prototype._onUpdate=function(t,e){this._initCueTracking(t,e)},t.prototype._stopCueTracking=function(){this._refreshPlaylistTimer.stop()},t.prototype._extractCuePoints=function(t){for(var e=t.split("\n"),n=0;e.length;){var r=e.shift(),o=r?r.match(a):null;if(o)switch(o[1]){case"EXT-X-MEDIA-SEQUENCE":n=parseInt(o[2],10);break;case"EXTINF":if(n++,this._segments[n]){this._processingTime=this._segments[n].end;break}var s=parseFloat(o[2]);this._processingTime+=s,this._segments[n]={dur:s,end:this._processingTime};break;case"EXT-X-CUE-OUT":this._processingTime=0,this._processedCueOuts[n]||(this._trackedCueOutSeqNum=n,this._processedCueOuts[n]=!0);break;case"EXT-X-CUE-IN":if(!this._processedCueIns[n]){var u=Math.round(this._processingTime);this._events.push({type:i.API.CUEPOINT_STOPPED,seqNum:n,cueOutSeqNum:this._trackedCueOutSeqNum,time:u}),this._processedCueIns[n]=!0,this._onCueInDetected(u,this._trackedCueOutSeqNum)}break;case"EXT-X-ENDLIST":this._stopCueTracking()}}},t.prototype._checkCues=function(t,e){var n=null,r=-1;if(this._events.forEach(function(i,o){t>=i.time&&e===i.cueOutSeqNum&&(n=i,r=o)}),n){this._events=this._events.slice(r+1);var o=[n.type];n.type===i.API.CUEPOINT_STOPPED&&o.push(n.time),this._eventBus.publish.apply(this._eventBus,o)}},t.prototype._bindEvents=function(){var t=this,e=null;this._onCueInDetected=function(n,r){r===e&&t._eventBus.publish(i.CUEIN_DETECTED,n)},this._eventBus.addEventListener(i.API.CUEPOINT_STARTED,function(n,i,r){e=r.cueoutStartSeqNum,t._mediaPlaylist=t._getBitrateStreamUrl(r.cueoutStreamIndex)||t._mediaPlaylist,t._initCueTracking(t._masterPlaylist,t._mediaPlaylist),t._stopCueOutTimeUpdater();var s=0;t._cueOutTimeUpdater=new o.default(1e3),t._cueOutTimeUpdater.addEventListener(o.default.TIMER_EVENT,function(){t._checkCues(++s,e)},t),t._cueOutTimeUpdater.start()},this),this._eventBus.addEventListener(i.API.CUEPOINT_STOPPED,this._onCuePointEnded,this),this._eventBus.addEventListener(i.AD_BREAK_ENDED,this._onCuePointEnded,this)},t.prototype._stopCueOutTimeUpdater=function(){this._cueOutTimeUpdater&&(this._cueOutTimeUpdater.stop(),this._cueOutTimeUpdater.destroy())},t.prototype._getBitrateStreamUrl=function(t){if(!this._model)return null;var e=this._model.playlist,n=e&&e.getCurrentItem(),i=n&&n.streamProfiles||[];return(i=i.filter(function(t){return"stream"===t.type}))[t]?i[t].url:null},t.prototype._onCuePointEnded=function(){this._stopCueOutTimeUpdater(),this._stopCueTracking(),this._events.length=0},t.prototype._getMediaPlaylist=function(t,e,n){var i=this;if(this._masterPlaylist=t,e)return this._mediaPlaylist=e,void this._fetchPlaylist(this._mediaPlaylist,n);r.default.ajax(this._masterPlaylist,{method:"GET",context:this,successHandler:function(t){return i._mediaPlaylist=i._getPlaylistUrl(t),""!==i._mediaPlaylist?i._fetchPlaylist(i._mediaPlaylist,n):n("bad mpl url")},failureHandler:function(t){return n(t)}})},t.prototype._fetchPlaylist=function(t,e){if(!t.match(/^https?:/)){var n=this._masterPlaylist.match(/^(https?:.*\/).*?\.m3u8?/),i=n&&n.length?n[1]:null;i&&(t=i+t)}r.default.ajax(t,{method:"GET",context:this,successHandler:function(t){return e(null,t)},failureHandler:function(t){return e(t)}})},t.prototype._getPlaylistUrl=function(t){for(var e=t.split("\n");e.length;){var n=e.shift();if(n&&n.match(/^[^#].*\.m3u8.*?$/))return n}return""},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),r=n(2),o=n(33),s=n(0),a=function(){function t(t,e){var n=this;this._video=t,this._certificatePath=null,this._certificateData=null,this._errorCB=e,this._video.addEventListener("webkitneedkey",function(t){n._onWebKitNeedKey(t.target,t.initData)})}return t.prototype.load=function(t){var e=this;this._certificatePath=t||"https://assets.video.yahoo.net/fairplay.cer",null!==this._certificatePath&&""!==this._certificatePath?void 0!==window.WebKitMediaKeys?o.default.ajax(this._certificatePath,{method:"GET",context:this,headers:{Pragma:"Cache-Control: no-cache","Cache-Control":"max-age=0"},responseType:"arraybuffer",successHandler:function(t){e._onCertificateLoaded(t)},failureHandler:function(t){e._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Failed to retrieve the server certificate for Fairplay DRM. "+t,i.DRM_DEBUG_CODES.CERT_LOAD_FAILED)}}):this._errorCB(r.ERROR,i.ErrorGroup.Configuration,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"No Fairplay browser support detected. Cannot play."):this._errorCB(r.ERROR,i.ErrorGroup.Configuration,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"No Fairplay certificate path given. Cannot play.")},t.prototype._onCertificateLoaded=function(t){this._certificateData=new Uint8Array(t),console.info("[FairplayLicenseManager] Certificate retrieved successfully")},t.prototype._onWebKitNeedKey=function(t,e){var n=this;if(null!==e)if(null!==this._certificateData){var o=this._getSPCUrl(e),s=this._extractContentId(o),a=this._concatInitDataIdAndCertificate(e,s);if(!t.webkitKeys){var u=this._selectKeySystem();t.webkitSetMediaKeys(new WebKitMediaKeys(u))}t.webkitKeys||this._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Could not create EME MediaKeys for Fairplay DRM");var l=t.webkitKeys.createSession("video/mp4",a);l?(l.contentId=s,l.destinationURL=o,l.addEventListener("webkitkeymessage",function(t){n._licenseRequestReady(t.target,t.message)}),l.addEventListener("webkitkeyadded",function(t){n._onkeyadded()}),l.addEventListener("webkitkeyerror",function(t){n._onkeyerror()})):this._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Could not create key session for Fairplay DRM",i.DRM_DEBUG_CODES.KEY_SESSION_FAILED)}else this._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Fairplay DRM is requesting a key, but no certificate data available.");else this._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Fairplay DRM is requesting a key, but no init data available.")},t.prototype._extractContentId=function(t){var e=document.createElement("a");return e.href=t,e.search.substr(1).split("&")[0].split("=")[1]},t.prototype._getSPCUrl=function(t){var e=s.default.array16ToString(t).replace("skd://","https://");return e=e.substring(1,e.length)},t.prototype._concatInitDataIdAndCertificate=function(t,e){"string"==typeof e&&(e=s.default.stringToArray16(e));var n=0,i=new ArrayBuffer(t.byteLength+4+e.byteLength+4+this._certificateData.byteLength),r=new DataView(i);new Uint8Array(i,n,t.byteLength).set(t),n+=t.byteLength,r.setUint32(n,e.byteLength,!0),n+=4;var o=new Uint8Array(i,n,e.byteLength);return o.set(e),n+=o.byteLength,r.setUint32(n,this._certificateData.byteLength,!0),n+=4,new Uint8Array(i,n,this._certificateData.byteLength).set(this._certificateData),new Uint8Array(i,0,i.byteLength)},t.prototype._selectKeySystem=function(){return WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")?"com.apple.fps.1_0":(this._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Fairplay DRM Key System not supported"),null)},t.prototype._licenseRequestReady=function(t,e){var n=this;console.info("[FairplayLicenseManager] Requesting Fairplay key for asset "+t.contentId);var a={spc:s.default.base64EncodeUint8Array(e),assetId:t.contentId};o.default.ajax(t.destinationURL,{method:"POST",body:JSON.stringify(a),context:this,responseTypeJson:!0,beforeSend:function(e){e.session=t},successHandler:function(t,e,i,r){n._licenseRequestLoaded(t,r.session)},failureHandler:function(t){n._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Fairplay DRM license request failed. "+t,i.DRM_DEBUG_CODES.LICENSE_REQUEST_FAILED)}})},t.prototype._licenseRequestLoaded=function(t,e){e.update(s.default.base64DecodeUint8Array(t.ckc))},t.prototype._onkeyerror=function(){this._errorCB(r.ERROR,i.ErrorGroup.Streaming,i.E_WARNING,i.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED,"Fairplay DRM decryption key error was encountered")},t.prototype._onkeyadded=function(){console.info("[FairplayLicenseManager] Fairplay decryption key was added to session.")},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(42),r=10,o=20,s=function(){function t(t,e,n,i){var s=this;this._videoTag=t,this._availableBitrates=e?e.sort(function(t,e){return t-e}):[],this.reservoirLength=n||r,this.cushionLength=i||o,this.currentBitrate=0,this._bufferingEventsForBitrates={},this._availableBitrates.forEach(function(t){s._bufferingEventsForBitrates[t]=0}),t&&t.addEventListener("waiting",function(){s._bufferingEventsForBitrates[s.currentBitrate]=s._bufferingEventsForBitrates[s.currentBitrate]+1},!1)}return t.prototype.setTargetBitrate=function(t){i.default.put("yvpTargetBitrate",t)},t.prototype.getTargetBitrate=function(){var t=i.default.get("yvpTargetBitrate");return(t=parseInt(t,10))||(t=900,this.setTargetBitrate(900)),t},t.prototype.getBufferOccupancy=function(){for(var t=this._videoTag.buffered,e=this._videoTag.currentTime,n=0,i=0;i<t.length;i++){var r=t.start(i),o=t.end(i);return r<=e&&o>=e&&(n=o-e)>=this._videoTag.length-e?Number.MAX_VALUE:n}return n},t.prototype.getRecommendedBitrate=function(t,e,n){e=e||this._availableBitrates,n=void 0===n?this.getBufferOccupancy():n;var i=e[t=void 0===t?e.indexOf(this.currentBitrate):t],r=e[0],o=e[e.length-1],s=i===o?o:e[t+1],a=i===r?r:e[t-1],u=this._getIdealRecommendedBitrate(e,n),l=i;return u>=s?l=this._findMaxLessEqualIdealRate(e,u):u<=a&&(l=this._findMinGreaterEqualIdealRate(e,u)),l},t.prototype.getNumberOfBufferingsForBitrate=function(t){return this._bufferingEventsForBitrates[t]},t.prototype._getIdealRecommendedBitrate=function(t,e){if(e===Number.MAX_VALUE)return this.currentBitrate;var n=t[0];if(e>this.reservoirLength){var i=t[0],r=(t[t.length-1]-i)/this.cushionLength;n=(e-this.reservoirLength)*r+i}return n},t.prototype._findMaxLessEqualIdealRate=function(t,e){for(var n=t.length-1;n>=0;n--){var i=t[n];if(i<=e)return i}return t[0]},t.prototype._findMinGreaterEqualIdealRate=function(t,e){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(r>=e)return r}return t[t.length-1]},t}();e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(11),u=n(45);!function(t){t.WAITING="waiting",t.SEG_INFO_AVAILABLE="seg-info-available"}(r=e.RebufferingEvent||(e.RebufferingEvent={}));var l=function(t){function e(){var e=t.call(this,"Html5RawRebufferingManager")||this;return e._waitingEventTimer=null,e._waitingTime=0,e._bufferingStartTime=null,e._segInfoTime=0,e.reset(),e}return i(e,t),e.prototype.destroy=function(){this._clearWaitingEventTimer()},e.prototype.init=function(t){t&&(this._node=t,this.reset(),this._handleWaitingEvent())},e.prototype.onSeeking=function(){this._checkBuffering()},e.prototype.onEnded=function(){this._clearWaitingEventTimer()},e.prototype.reset=function(){this._ignoreBuffering=!0,this.playbackStuck=!1,this._timeAtBufferEmpty=NaN,this._lastKnownPlaybackTime=0,this._lastBufferCheckTime=null,this._waitingTime=0,this._segInfoTime=0,this._bufferingStartTime=null},e.prototype.publishWaitingEvent=function(t){if((!this.playbackStuck||!t)&&(this.playbackStuck||t)){var e={type:"waiting",value:t,ignoreBuffering:this._ignoreBuffering};this.publish(r.WAITING,e),this.playbackStuck=t,t?(this._timeAtBufferEmpty=this._node&&this._node.currentTime||0,this._ignoreBuffering||(this._bufferingStartTime=Date.now())):(this._ignoreBuffering=!1,this._timeAtBufferEmpty=NaN,this._bufferingStartTime&&(this._waitingTime+=Date.now()-this._bufferingStartTime,this._bufferingStartTime=null))}},e.prototype._handleWaitingEvent=function(){this._clearWaitingEventTimer(),this._waitingEventTimer=new u.default(250),this._waitingEventTimer.on(u.default.TIMER_EVENT,this._onTimer,this),this._waitingEventTimer.start()},e.prototype._onTimer=function(){this._checkBuffering(),this._getSegInfoDelta()>5e3&&(this._sendSegInfo(),this._segInfoTime=0)},e.prototype._checkBuffering=function(t){if(void 0===t&&(t=!1),this&&this._node){var e=this._getBufferCheckDelta();if(t||!(e<150)){var n=this._node.currentTime,i=!1;if(s.userAgent.safari>=6){var r=0;this._node.buffered&&this._node.buffered.length>0&&(r=this._node.buffered.end(this._node.buffered.length-1)),i=this._node.readyState!==a.VIDEO_TAG_READY_STATES.HAVE_ENOUGH_DATA||r>0&&r+1<this._node.duration&&r<n}n!==this._lastKnownPlaybackTime&&!i||this._node.paused?!isNaN(this._timeAtBufferEmpty)&&n>this._timeAtBufferEmpty&&this.publishWaitingEvent(!1):this.playbackStuck||(this._ignoreBuffering=n<=.02,this.publishWaitingEvent(!0)),this._lastKnownPlaybackTime=n,this._lastBufferCheckTime=Date.now()}}else this._clearWaitingEventTimer()},e.prototype._getBufferCheckDelta=function(){var t=Date.now();return this._lastBufferCheckTime=this._lastBufferCheckTime||t,t-this._lastBufferCheckTime},e.prototype._getSegInfoDelta=function(){var t=Date.now();return this._segInfoTime=this._segInfoTime||t,t-this._segInfoTime},e.prototype._sendSegInfo=function(){this.publish(r.SEG_INFO_AVAILABLE,{val:[{buf_dur:this._waitingTime}]}),this._waitingTime=0},e.prototype._clearWaitingEventTimer=function(){this._waitingEventTimer&&(this._waitingEventTimer.destroy(),this._waitingEventTimer=null)},e}(o.default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4),r=n(61),o=function(){function t(t){this.position=-1,this._itemKeys=[],this._mediaStore=t}return t.prototype.destroy=function(){this._itemKeys=[],this.position=-1},t.prototype.addItems=function(t){if(t&&t.length){for(var e=0,n=t;e<n.length;e++){var i=n[e],o=this._mediaStore.addItem(i);this.contains(o)||(this._itemKeys.push(o),this._mediaStore.publish(r.MediaStoreEvent.MEDIA_ITEM_ADDED,o))}this._itemKeys.length&&-1===this.position&&(this.position=0)}},t.prototype.addItemAtIndex=function(t,e){if(t&&void 0!==e&&!(e<0)){var n=this._mediaStore.addItem(t);this.contains(n)||(this._itemKeys.splice(e,0,n),this._mediaStore.publish(r.MediaStoreEvent.MEDIA_ITEM_ADDED,n)),this._itemKeys.length&&-1===this.position&&(this.position=0)}},t.prototype.removeItems=function(t,e){var n=this;this._itemKeys.slice(t,t+e).forEach(function(t){return n._mediaStore.publish(r.MediaStoreEvent.MEDIA_ITEM_REMOVED,t)}),this._itemKeys.splice(t,e),this.position>=t+e?this.position-=e:t<=this.position&&this.position<t+e&&(this.position=-1)},t.prototype.update=function(t){var e=this,n=[];return t?(t.forEach(function(t){e._mediaStore.getByData(t)&&n.push(e._mediaStore.updateItem(t))}),n):n},t.prototype.updateMediaItemsState=function(t,e){var n=this;t&&t.forEach(function(t){n._mediaStore.updateItemState(t,e)})},t.prototype.updateMediaItemsSourceState=function(t,e){var n=this;t&&t.forEach(function(t){n._mediaStore.updateItemSourceState(t,e)})},t.prototype.contains=function(t){return this._itemKeys.indexOf(t)>=0},t.prototype.getMediaItemAt=function(t){return t<0||t>=this._itemKeys.length?null:this._mediaStore.get(this._itemKeys[t])},t.prototype.getMediaItemById=function(t){return t?this._mediaStore.getById(t):null},t.prototype.getMediaItemBySessionId=function(t){return t?this._mediaStore.getBySessionId(t):null},t.prototype.getCurrentItem=function(){return this.getMediaItemAt(this.position)},t.prototype.appendItem=function(t){if(t){var e=this._itemKeys.length;return this._itemKeys.push(t.key),e}return-1},t.prototype.getItems=function(){for(var t=[],e=0;e<this._itemKeys.length;e++){var n=this.getMediaItemAt(e);n&&t.push(n)}return t},t.prototype.getItemIds=function(){for(var t=[],e=0;e<this._itemKeys.length;e++){var n=this.getMediaItemAt(e);n&&t.push(n.id)}return t},t.prototype.getItemPosition=function(t){for(var e=0,n=0,i=this._itemKeys;n<i.length;n++){if(0===i[n].indexOf(t))return e;e++}return-1},Object.defineProperty(t.prototype,"size",{get:function(){return this._itemKeys.length},enumerable:!0,configurable:!0}),t.prototype.setPosition=function(t){i.isNumber(t)&&(this.position=t)},t.prototype.getNextPosition=function(t,e,n){if((n=n||{}).looped=!1,n.ended=!1,-1===this.position)return-1;if(!this._itemKeys.length)return-1;var i=this.position+1;if(n.playlistLoop&&i===this._itemKeys.length)return n.looped=!0,0;if(t){if(i<this._itemKeys.length)return i;if(e&&i===this._itemKeys.length)return n.looped=!0,0}return!t&&e?(n.looped=!0,this.position):(n.ended=!0,-1)},t.prototype.getCurrentPosition=function(){return this.position},t.prototype.isEndOfPlaylist=function(){return this.position===this._itemKeys.length-1},Object.defineProperty(t.prototype,"playlistId",{get:function(){return this._playlistId},set:function(t){this._playlistId=t},enumerable:!0,configurable:!0}),t.prototype._addError=function(t,e){var n=new Error(t);if(!e)throw n;e.push(n)},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(){this.width=640,this.height=360,this.startScreenRendered=!1,this.isDocked=!1,this.isCSSLoaded=!1,this.deviceOrientation=null,this.isFullscreen=!1}}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(7),r=n(4),o=function(){function t(){this._pluginMap={},this._defaultPlugins=[]}return t.prototype.destroy=function(){this._pluginMap={},this._defaultPlugins=[]},t.prototype.register=function(t,e){if(r.isNullOrUndefined(t))throw new Error("Plugin instance is null");if(!this._isValidPlugin(t))throw new Error("Plugin interface is invalid or incomplete");if(this.getPlugin(t.type,t.mimetype))throw new Error("Plugin with same type and mimetype exists");this._pluginMap[t.type]||(this._pluginMap[t.type]=[]),this._pluginMap[t.type].push(t);try{t.prepare(e)}catch(t){}},Object.defineProperty(t.prototype,"defaultPlugins",{get:function(){return this._defaultPlugins},set:function(t){this._defaultPlugins=t},enumerable:!0,configurable:!0}),t.prototype.getExternalPlugins=function(){var t=this,e={},n=function(n){if(i._pluginMap.hasOwnProperty(n)){var r=i._pluginMap[n].filter(function(e){return!function(e){return t._defaultPlugins.some(function(t){return e.mimetype===t.mimetype&&e.type===t.type})}(e)});e[n]||(e[n]=[]),r.forEach(function(t){e[n].push(t)})}},i=this;for(var r in this._pluginMap)n(r);return e},t.prototype.getPlugin=function(t,e){var n=this._pluginMap[t];if(!n)return null;for(var i=0,r=n;i<r.length;i++){var o=r[i];if(o&&o.mimetype===e)return o}return null},t.prototype._isValidPlugin=function(t){if(!t||r.isNullOrUndefined(t.mimetype)||!r.isString(t.mimetype)||r.isNullOrUndefined(t.type)||!this._isValidType(t.type)||r.isNullOrUndefined(t.prepare)||!r.isFunction(t.prepare)||r.isNullOrUndefined(t.destroy)||!r.isFunction(t.destroy))return!1;switch(t.type){case i.PluginType.METADATA:return this._isValidMetadataPlugin(t);case i.PluginType.SOURCE_METADATA:return this._isValidSourceMetadataPlugin(t);case i.PluginType.AD:return r.isAdPlugin(t);case i.PluginType.VISUAL_SEEK:return this._isValidVisualSeekPlugin(t);case i.PluginType.BRANDING:return this._isValidBrandingPlugin(t);case i.PluginType.PLAYLIST:return this._isValidPlaylistPlugin(t)}return!1},t.prototype._isValidType=function(t){return t===i.PluginType.METADATA||t===i.PluginType.SOURCE_METADATA||t===i.PluginType.AD||t===i.PluginType.VISUAL_SEEK||t===i.PluginType.BRANDING||t===i.PluginType.PLAYLIST},t.prototype._isValidMetadataPlugin=function(t){return!(!t||r.isNullOrUndefined(t.resolve)||!r.isFunction(t.resolve)||r.isNullOrUndefined(t.recover)||!r.isFunction(t.recover)||r.isNullOrUndefined(t.cancel)||!r.isFunction(t.cancel))},t.prototype._isValidSourceMetadataPlugin=function(t){return!(!t||r.isNullOrUndefined(t.resolve)||!r.isFunction(t.resolve)||r.isNullOrUndefined(t.recover)||!r.isFunction(t.recover)||r.isNullOrUndefined(t.cancel)||!r.isFunction(t.cancel))},t.prototype._isValidVisualSeekPlugin=function(t){return!(!t||r.isNullOrUndefined(t.getThumbnailData)||r.isNullOrUndefined(t.update)||!r.isFunction(t.getThumbnailData)||!r.isFunction(t.update))},t.prototype._isValidBrandingPlugin=function(t){return!(!t||r.isNullOrUndefined(t.create)||!r.isFunction(t.create))},t.prototype._isValidPlaylistPlugin=function(t){return!(!t||!r.isFunction(t.create))},t}();e.default=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o,s,a,u=n(6),l=n(1),c=n(228),d=n(229),h=n(233),p=n(235),f=n(115),_=n(241),m=n(242),y=n(244),v=n(246),g=n(248),E=n(22),b=n(11),A=n(11),S=n(9),T=n(2),I=n(2),C=n(18),R=n(19),P=n(4),L=n(0),O=n(60),w=n(116),M=n(5),D=n(252),N=n(253);L.default.insertCssIntoHead(".vp-vis-hidden { visibility: hidden;} .vp-disp-none { display: none;}"),function(t){t.END_SCREEN="end-screen",t.ERROR="error",t.VIDEO="video",t.START_SCREEN="start-screen",t.BLOCKED="blocked"}(r=e.ViewState||(e.ViewState={})),function(t){t.LOADING="loading",t.SWITCHING="switching",t.PLAYING="playing",t.PAUSED="paused",t.CASTING="casting"}(o||(o={})),function(t){t.NORMAL="normal",t.SMALL="smallscreen",t.VERY_SMALL="verysmallscreen"}(s||(s={})),function(t){t[t.SMALL_WIDTH=350]="SMALL_WIDTH",t[t.SMALL_HEIGHT=210]="SMALL_HEIGHT",t[t.VERY_SMALL_WIDTH=200]="VERY_SMALL_WIDTH",t[t.VERY_SMALL_HEIGHT=175]="VERY_SMALL_HEIGHT"}(a||(a={}));var k,B=["webkitfullscreenchange","mozfullscreenchange","msfullscreenchange","MSFullscreenChange","fullscreenchange"];!function(t){t.SYNC_PLAYBACK_STATE="view-sync-playback-state",t.SYNC_VIDEO_END="view-sync-video-end",t.SYNC_ENTER_FULLSCREEN="view-sync-enter-fullscreen",t.SYNC_EXIT_FULLSCREEN="view-sync-exit-fullscreen",t.SYNC_SHOW_AIRPLAY_TARGET_MENU="view-sync-show-airplay-target-menu",t.SEEK="view-seek",t.SET_VOLUME="view-set-volume",t.SET_MUTE="view-set-mute",t.TOGGLE_CC="view-toggle-cc",t.CC_LANGUAGE_CHANGE="view-cc-language-change",t.CC_STYLE_CHANGE="view-cc-style-change",t.TOGGLE_PLAY_PAUSE="view-toggle-play-pause",t.SET_AUDIO_LANGUAGE="view-set-audio-language",t.START_SCREEN_CLICK="start-screen-click",t.UI_INTERACT="view-ui-interact",t.SKIP_AD_REQUESTED="view--ad-skip-requested",t.AD_CLICKED="view-ad-clicked",t.OPSS_VISIBILITY_CHANGED="view-opss-visibility-changed"}(k=e.ViewEvent||(e.ViewEvent={}));var x=function(t){function e(e,n,i,r,a,u){var c=t.call(this,"View")||this;c._rootElem=e,c._model=n,c._eventBus=i,c._profiler=r,c._pluginManager=a,c._playbackController=u,c._viewSize=s.NORMAL,c._isFullScreen=!1,c._isDocked=!1,c._lastScrollY=0;var d=0,h=0;return c._rootElem&&(d=c._rootElem.clientWidth,h=c._rootElem.clientHeight,c._viewSize=c._getViewSize(d,h)),c._eventBus.addEventListener(T.VideoEvent.SRC_SWITCHING,function(){c._setFlag(o.SWITCHING,!0)},c),c._eventBus.addEventListener(T.VideoEvent.SRC_SWITCHED,function(){c._setFlag(o.SWITCHING,!1)},c),c._eventBus.publish(T.PLAYER_DIMENSION_CHANGE,{height:c._rootElem?c._rootElem.clientHeight||1:0,width:d||1}),c._eventBus.addEventListener(T.API.PLAYER_MUTE_CHANGE,c._onMuteChange,c),c._eventBus.addEventListener(T.UP_NEXT_PG_CLICK,c._onUpnextPgClick,c),c._eventBus.addEventListener(T.PLAYER_DIMENSION_CHANGE,c._onDimensionChange,c),c._eventBus.addEventListener(T.Device.ORIENTATION_CHANGE,c._onOrientationChange,c),l.userAgent.mobile&&R.default.canPlayInline&&(c._model.uiState.deviceOrientation=c._getDeviceOrientation(),c._bindWindowResize()),c}return i(e,t),e.prototype.render=function(){var t=this;this._model.rendered=!0,this._contentElem=L.default.render(D,{enableDocking:this._model.docking&&(this._model.docking.enableOnScrollDown||this._model.docking.enableOnScrollUp)}),this._mainElem=this._contentElem.querySelector(".vp-main"),this._rootElem&&this._rootElem.appendChild(this._contentElem),L.default.classList(this._contentElem).add(this._viewSize),Object.keys(l.userAgent).filter(function(t){return l.userAgent[t]}).forEach(function(e){"os"===e&&(e=l.userAgent.os),"ie"===e&&L.default.classList(t._contentElem).add("vp-"+e.toLowerCase()+l.userAgent[e]),L.default.classList(t._contentElem).add("vp-browser-"+e.toLowerCase())}),R.default.deviceType&&L.default.classList(this._contentElem).add("vp-device-"+R.default.deviceType),l.userAgent.mobile&&R.default.canPlayInline&&L.default.classList(this._contentElem).add("vp-browser-playsinline"),this._model.chromeless||P.isFunction(y.default)&&(this._loadingScreen=new y.default(this._eventBus)),this._loadingScreen&&this._mainElem&&this._mainElem.appendChild(this._loadingScreen.create()),this._model.showControls&&R.default.canPlayInline&&(this._controls=new f.Controls(this._eventBus,this,this._model,this._pluginManager),this._setupControls());var e=function(e){t._mouseMoveHandler()},n=function(e){t._mouseOutHandler(e)};this._bindMouseEvents=function(){t._lastMouseMoveCoordinates={},t._lastTarget=t._contentElem,t._contentElem.addEventListener("mousemove",function(n){t._lastMouseMoveCoordinates.x!==n.clientX&&t._lastMouseMoveCoordinates.y!==n.clientY&&(e(),t._lastMouseMoveCoordinates.x=n.clientX,t._lastMouseMoveCoordinates.y=n.clientY,t._lastTarget=n.target)}),t._contentElem.addEventListener("mouseover",function(n){var i=null;t._lastTarget&&(i=t._lastTarget.parentElement),!i||L.default.classList(i).contains("vp-play-controls")||L.default.classList(i).contains("vp-menu-controls")||e()}),t._contentElem.addEventListener("mouseout",function(e){var i=null,r=t._contentElem.getBoundingClientRect();t._lastTarget&&(i=t._lastTarget.parentElement),i&&(L.default.classList(i).contains("vp-play-controls")||L.default.classList(i).contains("vp-menu-controls")||n(e),(L.default.classList(i).contains("vp-play-controls")||L.default.classList(i).contains("vp-menu-controls"))&&(e.clientX<=r.left||e.clientX>=r.right||e.clientY>=r.bottom)&&n(e))})},this._bindTouchEvents=function(){var t=this;this._playerSurfaceTap=new E.default(this._contentElem,function(){(!t.getFullscreen()||l.userAgent.android&&L.default.getFullscreenElement()===t._contentElem)&&t.toggleControlsVisibility()}),this._eventBus.addEventListener(T.CONTROLS_SEEKING,function(){t._autoHideControlsTimeout&&clearTimeout(t._autoHideControlsTimeout),t._autoHideControlsTimeout=window.setTimeout(t._onAutoHideControls.bind(t),5e3)},this)},l.userAgent.tv||l.userAgent.mobile?l.userAgent.mobile&&this._controls&&R.default.canPlayInline&&this._bindTouchEvents():this._bindMouseEvents(),this._unbindMouseEvents=function(){t._contentElem.removeEventListener("mousemove",e),t._contentElem.removeEventListener("mouseover",e),t._contentElem.removeEventListener("mouseout",n)},P.isFunction(this._handleFullscreenChange.bind)&&(this._fullscreenChangeEventHandler=this._handleFullscreenChange.bind(this),B.forEach(function(e){document.addEventListener(e,t._fullscreenChangeEventHandler)})),this._initAdsView(),this._playlistController=new w.PlaylistController(this,this._pluginManager),this._setupPlaylistControllerEvents(),this._bindDockingScrollListener(),this._rendererController=null,this._easterEgg=new _.default("NORMAL",function(){t._openSimSim||(t._openSimSim=new v.default(t._model,t._eventBus,t._profiler,t._rendererController,t._adsDiagnostics,t._pluginManager),t._adsDiagnostics=null,t._mainElem&&t._mainElem.appendChild(t._openSimSim.create()),t._setupOpssEventListeners()),t._openSimSim.render()}),this.createAdsInfoPanel=function(e){t._adsEasterEgg||(t._adsEasterEgg=new _.default("AD",function(){t._adsInfoPanel||(t._adsInfoPanel=new c.default(t._model,t._eventBus,t._profiler,e),t._mainElem&&t._mainElem.appendChild(t._adsInfoPanel.create())),t._adsInfoPanel.show()}))},l.userAgent.desktop&&this._mainElem&&this._mainElem.addEventListener("contextmenu",function(e){t._model.playbackState.rendererType!==M.RendererType.HTML5_HLS&&t._model.playbackState.rendererType!==M.RendererType.HTML5_RAW||e.preventDefault()});var i=document.querySelector("#vp-css");l.userAgent.ie&&l.userAgent.ie<=10&&setTimeout(function(){i&&i.sheet.cssRules&&i.sheet.cssRules.length>0?t._onCssLoadSuccess():t._onCssLoadError()},150),l.userAgent.ie&&l.userAgent.ie<=10||!this._model.uiState||this._model.uiState.isCSSLoaded||(!0===L.default.getSingleton("isCSSLoaded")?this._onCssLoadSuccess():!0===L.default.getSingleton("isCSSError")?this._onCssLoadError():i&&(i.addEventListener("error",this._onCssLoadError.bind(this)),i.addEventListener("load",this._onCssLoadSuccess.bind(this)))),this._branding=new p.default(this._eventBus,this,this._model,this._pluginManager)},e.prototype.getEventBus=function(){return this._eventBus},e.prototype.getModel=function(){return this._model},e.prototype.getAdsOverlay=function(){return this._adsOverlay},e.prototype.setBlockedFlashState=function(){this._setViewState(r.BLOCKED)},e.prototype.toggleControlsVisibility=function(){L.default.classList(this._contentElem).contains("vp-hide-controls")?(L.default.classList(this._contentElem).remove("vp-hide-controls"),this._eventBus.publish(T.CONTROLS_BAR_CHANGE,!0,!0),this._objectOverlay&&L.default.classList(this._objectOverlay).remove("vp-overlay-hide-cursor"),this._autoHideControlsTimeout&&clearTimeout(this._autoHideControlsTimeout),this._model.playbackState.seeking||(this._autoHideControlsTimeout=window.setTimeout(this._onAutoHideControls.bind(this),5e3))):(L.default.classList(this._contentElem).add("vp-hide-controls"),this._eventBus.publish(T.CONTROLS_BAR_CHANGE,!1,!1))},e.prototype.updateAdDiagnostics=function(t){this._adsDiagnostics=t},e.prototype.isDocked=function(){return this._isDocked},e.prototype.dockVideoPlayer=function(){var t=window.scrollY,e=!0,n=this._model.docking.width,i=this._model.docking.height;if(this._lastScrollY>t&&(e=!1),this._model.docking.enableOnScrollDown===e&&this._model.docking.enableOnScrollUp!==e&&!this._fsDocked&&(this._model.docking.enableOnMuted||!this._model.mute)&&!(l.userAgent.mobile&&this._model.docking.mobile&&this._model.docking.mobile.disable)){if(this._preDockedWidth=this._contentElem.clientWidth,this._preDockedHeight=this._contentElem.clientHeight,n===b.DOCKED_PLAYER_FULL){if(this._model.uiState.deviceOrientation===A.Orientation.LANDSCAPE)return;n=window.innerWidth,i=this._preDockedHeight/this._preDockedWidth*n}if(this._isDocked=!0,this._updateDockedElements(),this._playlistController.togglePlaylistUI(!0),L.default.classList(this._contentElem).add("vp-docked"),this._model.docking.showInfoCard&&L.default.classList(this._contentElem).add("vp-docked-show-meta"),this._model.docking.fadeInAnimation){if(L.default.classList(this._contentElem).add("vp-docked-fadein"),L.default.classList(this._rootElem).add("vp-docked-mode"),(a=l.userAgent.mobile&&this._model.docking.mobile?this._model.docking.mobile.position||{}:this._model.docking.position||{}).top>-1&&(this._contentElem.style.top=a.top+"px"),a.bottom>-1&&a.top<0){var r=0;this._model.docking.showInfoCard&&(r=84),this._contentElem.style.bottom=r+a.bottom+"px"}a.right>-1&&a.left<0&&(this._contentElem.style.right=a.right+"px"),a.left>-1&&(this._contentElem.style.left=a.left+"px")}else{this._setContentElementFixed();var o=this._contentElem.getBoundingClientRect(),s=document.querySelector("body");if(!s)return;var a,u=s.clientWidth,c=window.innerHeight,d=0,h=0;if((a=this._model.docking.position||{}).top>-1&&(h=a.top,this._contentElem.style.top="0px"),a.bottom>-1){var p=0;this._model.docking.showInfoCard&&(p=84),h=c-i-p-a.bottom,this._contentElem.style.bottom=""}a.right>-1&&(d=u-o.left-n-a.right,this._contentElem.style.right=""),a.left>-1&&(d=a.left,this._contentElem.style.left="0px"),this._contentElem.style.transform="translate3d("+d+"px, "+h+"px, 0)",L.default.classList(this._contentElem).add("vp-docked-animated"),L.default.classList(this._rootElem).add("vp-docked-mode")}this._contentElem.style.width=n+"px",this._contentElem.style.height=i+"px",this._eventBus.publish(T.API.PLAYER_VIEWPORT_CHANGE,!1),this._eventBus.publish(T.PLAYER_DIMENSION_CHANGE,{width:n,height:i}),this._model.uiState.isDocked=!0,this._eventBus.publish(T.API.PLAYER_DOCKED_CHANGE,!0)}},e.prototype.undockVideoPlayer=function(t){var e=this;void 0===t&&(t=!1),L.default.classList(this._contentElem).remove("vp-docked"),L.default.classList(this._contentElem).remove("vp-docked-show-meta"),this._model.docking.fadeInAnimation?(L.default.classList(this._contentElem).remove("vp-docked-fadein"),this._contentElem.style.top="",this._contentElem.style.right="",this._contentElem.style.bottom="",this._contentElem.style.left="",this._contentElem.style.width="",this._contentElem.style.height=""):(this._contentElem.style.transform="translate3d(0, 0, 0)",this._setContentElementFixed()),this._isDocked=!1,this._playlistController.togglePlaylistUI(!1),t&&!this._model.isPaused()&&this._eventBus.publish(T.TOGGLE_PLAY_PAUSE),window.setTimeout(function(){e._isDocked||(e._model.uiState.isDocked=!1,e._model.docking.fadeInAnimation||(e._contentElem.style.width="",e._contentElem.style.height="",L.default.classList(e._contentElem).remove("vp-docked-animated"),e._contentElem.style.position="",e._contentElem.style.transform="",e._contentElem.style.top="",e._contentElem.style.right="",e._contentElem.style.bottom="",e._contentElem.style.left=""),e._dockedBg&&(e._rootElem.removeChild(e._dockedBg),e._dockedBg=null),L.default.classList(e._rootElem).remove("vp-docked-mode"),e._eventBus.publish(T.API.PLAYER_VIEWPORT_CHANGE,!0),e._eventBus.publish(T.PLAYER_DIMENSION_CHANGE,{width:e._preDockedWidth,height:e._preDockedHeight})),e._eventBus.publish(T.API.PLAYER_DOCKED_CHANGE,!1)},250)},e.prototype.updateDockingConfig=function(t,e,n,i,r,o){"boolean"==typeof t&&(this._model.docking.enableOnScrollDown=t),"boolean"==typeof e&&(this._model.docking.enableOnScrollUp=e),this._model.docking.position=this._model.docking.position||{},isNaN(n)||(this._model.docking.position.top=n),isNaN(i)||(this._model.docking.position.right=i),isNaN(r)||(this._model.docking.position.left=r),isNaN(o)||(this._model.docking.position.bottom=o),t||e?(this._bindDockingScrollListener(),this._isDocked&&this.dockVideoPlayer()):(this._removeDockingScrollListener(),this._isDocked&&this.undockVideoPlayer())},e.prototype.createAdsOverlay=function(){if(this._adsOverlay)return this._adsOverlay.node.innerHTML="",this._adsOverlay.node;if(!this._mainElem||l.userAgent.mobile||this._model.chromeless)return null;this._adsOverlay=new d.default(this._eventBus,this);var t=this._adsOverlay.create(),e=this._mainElem.querySelector(".vp-adview-wrapper");return e?this._mainElem.insertBefore(t,e):this._mainElem.appendChild(t),t},e.prototype.destroyAdsOverlay=function(){this._adsOverlay&&this._adsOverlay.destroy()},e.prototype.showAirplayTargetMenu=function(){this.publish(k.SYNC_SHOW_AIRPLAY_TARGET_MENU)},e.prototype.getContentNode=function(){return this._contentElem},e.prototype.getOpenSimSim=function(){return this._openSimSim},e.prototype.getMainElement=function(){return this._mainElem},e.prototype.getCCElement=function(){return this._mainElem?this._mainElem.querySelector(".vp-cc-element"):null},e.prototype.getRootElement=function(){return this._rootElem},e.prototype.getVideoElement=function(){return this._rootElem&&this._rootElem.getElementsByTagName("video")[0]},e.prototype.setKeyboardFocus=function(){this._contentElem.focus()},e.prototype.updateViewOnEscPress=function(){this._openSimSim&&this._openSimSim.isOpen()?this._openSimSim.close():this._adsInfoPanel&&this._adsInfoPanel.isOpen()?this._adsInfoPanel.close():this.getFullscreen()&&this.setFullscreen(!1)},e.prototype.disableControls=function(){L.default.classList(this._contentElem).add("vp-disable-controls")},e.prototype.enableControls=function(){L.default.classList(this._contentElem).remove("vp-disable-controls")},e.prototype.hideContentRenderer=function(t){t?L.default.classList(this._contentElem).add("vp-hide-content-on"):L.default.classList(this._contentElem).remove("vp-hide-content-on")},e.prototype.resetState=function(){this._destroyStartScreen(),this._destroyEndScreen(),this._destroyBranding()},e.prototype.syncViewState=function(){var t=this._model,e=t.playlist&&t.playlist.getCurrentItem(),n=t.playbackState,i=t.castState,s=i&&i.connected,a=r.START_SCREEN;this._setFlag(o.CASTING,s),s&&(i.mediaLoaded&&!i.paused?L.default.classList(this._contentElem).add("vp-cast-playing"):L.default.classList(this._contentElem).remove("vp-cast-playing"));var u=L.default.classList(this._contentElem).contains("vp-flag-"+o.LOADING);switch(this._setFlag(o.LOADING,t.isLoading()),!u&&t.isLoading()?this._eventBus.publish(T.API.LOADING_BEGIN):u&&!t.isLoading()&&this._eventBus.publish(T.API.LOADING_END),t.getState()){case C.States.INIT:case C.States.WAITING:a=r.START_SCREEN;var c=!t.autoplay||t.waitingForUserTap,d=e&&(e.hasThumbnail()&&!l.userAgent.mobile||e.fetchFinished());if(c&&d){var h=t.continuousPlay&&0!==t.playlist.position,p=t.skipOnError===O.SkipOnError.ALWAYS||t.skipOnError===O.SkipOnError.TIMEBASED;h&&p&&n.hasStartedPlayback||this._renderStartScreen()}break;case C.States.VIDEO:this._syncMode(n),this._syncPlaybackState(),a=r.VIDEO;break;case C.States.END:this._model.continuousPlay||this.setFullscreen(!1),n.criticalError?(t.chromeless?this._eventBus.publish(T.API.PLAYER_ERROR,n.criticalError):this._renderErrorScreen(n.criticalError,e,t.guid),a=r.ERROR):(this._renderEndScreen(n.previousItem),a=r.END_SCREEN)}this._currentViewState=a,this._setViewState(a),this._synchAriaState(),this._branding&&this._branding.syncState()},e.prototype.getCurrentViewState=function(){return this._currentViewState},e.prototype.setFullscreen=function(t){var e=this._contentElem,n=e.requestFullscreen||e.webkitRequestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen,i=document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen;t?(l.userAgent.ios?this.publish(k.SYNC_ENTER_FULLSCREEN):l.userAgent.android&&!this._controls?this.publish(k.SYNC_ENTER_FULLSCREEN):n?n.call(e):this._enterLightbox(),this._eventBus.publish(T.CTRL_FULLSCREEN,"ON")):(l.userAgent.ios?this.publish(k.SYNC_EXIT_FULLSCREEN):i?i.call(document):this._exitLightbox(),this._eventBus.publish(T.CTRL_FULLSCREEN,"OFF")),this._isFullScreen===t||n||i||(this._handleFullscreenChange(),this._eventBus.publish(T.FULLSCREEN_CHANGE,t),this._isFullScreen=t),t&&l.userAgent.mobile&&R.default.autoplaySupported&&this._model.playbackState.mute&&!this._model.muteMode&&this.publish(k.SET_MUTE,!1),this._synchAriaState()},e.prototype.getFullscreen=function(){var t=L.default.getFullscreenElement(),e=this._playbackController.getActiveRenderer(),n=l.userAgent.mobile&&(document.isFullScreen||document.webkitIsFullScreen)||l.userAgent.ios&&e&&e.node&&e.node.webkitDisplayingFullscreen,i=document.querySelector("body");return t===this._contentElem||i&&L.default.classList(i).contains("vp-lightbox")||n},e.prototype.toggleFullscreen=function(){this.setFullscreen(!this.getFullscreen())},e.prototype.updateVolumeUI=function(t,e){this._controls&&this._controls.updateVolumeUI(t,e)},e.prototype.updateClosedCaptionUI=function(t){this._controls&&this._controls.updateClosedCaptionUI(t)},e.prototype.clearAutoHideTimeout=function(){this._autoHideControlsTimeout&&window.clearTimeout(this._autoHideControlsTimeout)},e.prototype.setOverlayActive=function(t){t?L.default.classList(this._contentElem).add("vp-overlay-active"):L.default.classList(this._contentElem).remove("vp-overlay-active")},e.prototype.destroyFullscreenChangeListeners=function(){var t=this;this._fullscreenChangeEventHandler&&B.forEach(function(e){document.removeEventListener(e,t._fullscreenChangeEventHandler)})},e.prototype.getClientVideoDimension=function(){return{width:this._contentElem.clientWidth,height:this._contentElem.clientHeight}},Object.defineProperty(e.prototype,"controls",{get:function(){return this._controls},enumerable:!0,configurable:!0}),e.prototype.getPlaylistController=function(){return this._playlistController},e.prototype.isStreamMode=function(){return l.userAgent.desktop&&(this._viewSize===s.SMALL||L.default.classList(this._contentElem).contains("vp-stream"))},e.prototype.isMiniStreamMode=function(){return l.userAgent.desktop&&(this._viewSize===s.VERY_SMALL||L.default.classList(this._contentElem).contains("vp-ministream"))},e.prototype.addRendererNode=function(t){var e=this.getMainElement();if(e){if(L.default.classList(t).contains("vp-external-video")){for(var n=0,i=e.children[n];n<e.children.length&&"video"!==i.tagName.toLowerCase();)i=e.children[++n];if(i&&"video"===i.tagName.toLowerCase())return void e.insertBefore(t,i)}e.appendChild(t)}},e.prototype.onMediaItemLoaded=function(t){t.isLive()?L.default.classList(this._contentElem).add("vp-live"):L.default.classList(this._contentElem).remove("vp-live"),this.isStreamMode()&&!this.getFullscreen()&&L.default.classList(this._contentElem).add("vp-stream"),this.isMiniStreamMode()&&!this.getFullscreen()&&L.default.classList(this._contentElem).add("vp-ministream"),this._controls&&this._controls.onMediaItemLoaded(t)},e.prototype.onMediaItemCurrent=function(t){this._controls&&this._controls.onMediaItemCurrent(t)},e.prototype.onMediaItemPlaybackStarted=function(t){(this._model.docking.enableOnScrollDown||this._model.docking.enableOnScrollUp)&&this._isDocked&&this._updateDockedElements(),this._controls&&this._controls.onMediaItemPlaybackStarted(t)},e.prototype.onMediaItemPlaybackProgress=function(t){this._controls&&this._controls.onMediaItemPlaybackProgress(t)},e.prototype.onAdBreakStarted=function(t){this._adsView.onAdBreakStart(t)},e.prototype.onAdBreakEnded=function(t){this._adsView.onAdBreakEnd(t)},e.prototype.onAdBreakItemCurrent=function(t){this._adsView.onAdBreakItemCurrent(t)},e.prototype.onAdBreakItemStarted=function(t){this._controls&&this._controls.onAdPlaybackStarted()},e.prototype.onAdBreakItemEnded=function(t){this._controls&&this._controls.onAdPlaybackEnded()},e.prototype.onAdPlaybackProgress=function(t){var e=t.playingItem,n=this._model.playbackState.currentTime,i=this._model.playbackState.duration;e&&P.isNumber(n)&&P.isNumber(i)&&this._controls&&this._controls.onAdPlaybackProgress(t)},e.prototype.setTheme=function(t){t&&L.default.classList(this._contentElem).add(t)},e.prototype.onlanguageChange=function(t){this.publish(k.CC_LANGUAGE_CHANGE,t)},e.prototype.updateClosedCaptionStyle=function(t){this.publish(k.CC_STYLE_CHANGE,t)},e.prototype.destroy=function(){this._controls&&this._controls.destroy(),this._easterEgg&&this._easterEgg.destroy(),this._adsEasterEgg&&this._adsEasterEgg.destroy(),this._errorScreen&&this._errorScreen.destroy(),this._loadingScreen&&this._loadingScreen.destroy(),this._adsView&&this._adsView.destroy(),this._playlistController&&this._playlistController.destroy(),this._rendererController&&this._rendererController.destroy(),this._startScreen&&this._startScreen.destroy(),this._playerSurfaceTap&&this._playerSurfaceTap.destroy(),this.destroyAdsOverlay(),this.destroyFullscreenChangeListeners(),l.userAgent.tv||l.userAgent.mobile||!this._unbindMouseEvents||this._unbindMouseEvents(),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this._openSimSim&&this._openSimSim.destroy(),this._adsInfoPanel&&this._adsInfoPanel.destroy(),this._rootElem&&(this._rootElem.innerHTML=""),this._removeDockingScrollListener()},e.prototype._onOrientationChange=function(t){this._model.uiState.deviceOrientation=t,this._model.uiState.isDocked&&this._model.docking.width===b.DOCKED_PLAYER_FULL&&t===A.Orientation.LANDSCAPE&&!this.getFullscreen()&&this.undockVideoPlayer(!0)},e.prototype._bindWindowResize=function(){this._resizeHandler=this._onResizeHandler.bind(this),window.addEventListener("resize",this._resizeHandler)},e.prototype._getDeviceOrientation=function(){var t=A.Orientation.LANDSCAPE;return window.innerHeight>window.innerWidth&&(t=A.Orientation.PORTRAIT),t},e.prototype._onResizeHandler=function(){this._eventBus.publish(T.Device.ORIENTATION_CHANGE,this._getDeviceOrientation())},e.prototype._bindDockingScrollListener=function(){this._detectViewportChangeHandler&&this._removeDockingScrollListener(),(!(l.userAgent.ie>0&&l.userAgent.ie<10)&&!l.userAgent.mobile||l.userAgent.mobile&&R.default.canPlayInline)&&this._model.docking&&(this._model.docking.enableOnScrollDown||this._model.docking.enableOnScrollUp)&&(this._detectViewportChangeHandler=this._detectViewportChange.bind(this),window.addEventListener("scroll",this._detectViewportChangeHandler))},e.prototype._removeDockingScrollListener=function(){this._detectViewportChangeHandler&&(window.removeEventListener("scroll",this._detectViewportChangeHandler),this._detectViewportChangeHandler=null)},e.prototype._detectViewportChange=function(){var t=window.pageYOffset;if(t!==this._lastScrollY&&!this._isFullScreen){this._lastScrollY=t;var e=L.default.getElementViewability(this._rootElem)>=this._model.docking.threshold;e||this._isDocked||this._model.getState()!==C.States.VIDEO||this._model.isPaused()?e&&this._isDocked&&this.undockVideoPlayer():this.dockVideoPlayer()}},e.prototype._initAdsView=function(){var t=this;return this._adsView||(this._adsView=new h.default(this._pluginManager),this._adsView.addEventListener(h.AdsViewEvent.SKIP_AD_REQUESTED,function(){t.publish(k.SKIP_AD_REQUESTED)},this),this._adsView.addEventListener(h.AdsViewEvent.CLICKED,function(){t.publish(k.AD_CLICKED)},this),this._mainElem.appendChild(this._adsView.create())),this._adsView},e.prototype._setContentElementFixed=function(){var t=this._rootElem.getBoundingClientRect(),e=document.querySelector("body");if(e){var n=e.clientWidth,i=this._model.docking.position||{};i.top>-1&&(this._contentElem.style.top=t.top+"px"),i.bottom>-1&&(this._contentElem.style.bottom=t.bottom+"px"),i.right>-1&&(this._contentElem.style.right=n-t.right+"px"),i.left>-1&&(this._contentElem.style.left=t.left+"px"),this._contentElem.style.width=this._preDockedWidth+"px",this._contentElem.style.height=this._preDockedHeight+"px",this._contentElem.style.position="fixed"}},e.prototype._updateDockedElements=function(){var t=this;if(this._model.docking.enableOnScrollDown||this._model.docking.enableOnScrollUp){this._dockedMetaTitleElem&&this._dockedBg||(this._dockedMetaTitleElem=this._contentElem.querySelector(".vp-docked-title"),this._dockedMetaProviderElem=this._contentElem.querySelector(".vp-docked-provider"),this._dockedBg=document.createElement("div"),this._dockedBg.setAttribute("class","vp-docked-bg"),this._dockedBgImg=document.createElement("img"),this._dockedBgImg.setAttribute("class","vp-docked-img"),this._dockedBgOverlay=document.createElement("div"),this._dockedBgOverlay.setAttribute("class","vp-docked-overlay"),this._dockedBgOverlayText=document.createElement("div"),this._dockedBgOverlayText.setAttribute("class","vp-docked-overlay-text"),this._dockedBgOverlayText.innerHTML="Scroll back up to restore default view.",this._dockedBgOverlay.appendChild(this._dockedBgOverlayText),this._dockedBg.appendChild(this._dockedBgImg),this._dockedBg.appendChild(this._dockedBgOverlay),this._dockedCloseButton||(this._dockedCloseButton=document.createElement("div"),this._dockedCloseButton.setAttribute("class","vp-docked-close-button"),this._dockedCloseButtonTap=new E.default(this._dockedCloseButton,function(e){e.stopPropagation(),t.undockVideoPlayer(!t._model.isPaused()),t.publish(k.UI_INTERACT,{srcElement:"ui_pop_close_clk"})})),this._mainElem&&this._mainElem.appendChild(this._dockedCloseButton),this._rootElem&&this._rootElem.appendChild(this._dockedBg));var e=this._model.playlist.getCurrentItem();e&&(e.thumbnail&&this._dockedBgImg.setAttribute("src",e.thumbnail),this._dockedMetaTitleElem&&e.title&&(this._dockedMetaTitleElem.innerHTML=e.title))}},e.prototype._onCssLoadSuccess=function(){var t,e=this.getContentNode().querySelectorAll(".vp-vis-hidden"),n=e.length;for(t=0;t<n;t++)L.default.classList(e[t]).remove("vp-vis-hidden");this._model.uiState.isCSSLoaded=!0},e.prototype._onCssLoadError=function(){var t,e=this.getContentNode().querySelectorAll(".vp-vis-hidden"),n=e.length;for(t=0;t<n;t++)L.default.classList(e[t]).add("vp-disp-none");this._model.uiState.isCSSLoaded=!1,this._eventBus.publish(T.WARNING,L.default.createErr(S.ErrorGroup.Streaming,this._model.playbackState,S.E_WARNING,S.WARNING_CODES.E_CSS_DOWNLOAD_FAILED),!1)},e.prototype._setViewState=function(t){var e="vp-state-"+t,n=L.default.classList(this._contentElem);Object.keys(r).forEach(function(t){var i="vp-state-"+r[t];n.contains(i)&&i!==e&&n.remove(i)}),n.contains(e)||n.add(e)},e.prototype._setFlag=function(t,e){var n=L.default.classList(this._contentElem),i="vp-flag-"+t,r=n.contains(i);e?r||n.add(i):r&&n.remove(i)},e.prototype._renderStartScreen=function(){var t=this._model,e=t.playlist.getCurrentItem();e&&!this._startScreen&&(t.showStartScreen&&(this._startScreen=new g.StartScreen(this._eventBus),this._setupStartScreenEvents(),this._mainElem&&this._mainElem.appendChild(this._startScreen.create(e,t))),this._eventBus.publish(T.START_SCREEN_RENDERED))},e.prototype._destroyStartScreen=function(){var t=this._startScreen&&this._startScreen.node;t&&(this._mainElem&&this._mainElem.removeChild(t),this._startScreen&&(this._startScreen.destroy(),this._startScreen=null))},e.prototype._renderEndScreen=function(t){var e=this;if(t){var n=this._model.showReplayOnlyEndScreen;if(!this._contentElem.querySelector(".vp-end-replay")){var i=L.default.render(N,{});this._endScreenTap=new E.default(i,function(){e._eventBus.publish(T.RELATED_ITEM_CLICK,t.id,-1,!1,!1)}),this._mainElem&&this._mainElem.appendChild(i),this._endScreenNode=i}!this._startScreen&&n&&this._renderStartScreen(),this._eventBus.publish(T.END_SCREEN_RENDERED),this.publish(k.UI_INTERACT,{srcElement:"es-view"})}},e.prototype._destroyEndScreen=function(){this._endScreenNode&&this._mainElem&&(this._mainElem.removeChild(this._endScreenNode),this._endScreenNode=null),this._endScreenTap&&this._endScreenTap.destroy()},e.prototype._renderErrorScreen=function(t,e,n){if(!this._errorScreen){this._errorScreen=new m.default(this._eventBus);var i=e?e.thumbnail:null,r=i||"",o=L.default.getAssetUrl(this._model.isLocal(),this._model.version,"flash_download_logo.svg");if(this._model.isLocal())o="assets/flash_download_logo.svg";else o=("https:"===document.location.protocol?"https://s.yimg.com":"http://l.yimg.com")+"/rx/builds/"+this._model.version+"/assets/flash_download_logo.svg";if(e=e||this._model.playlist.getCurrentItem(),this._mainElem){var s=e&&e.videoSession||"";this._mainElem.appendChild(this._errorScreen.create(t,n,s,r,o))}this.publish(k.UI_INTERACT,{srcElement:"err-view-"+t.category+"-"+t.subcategory})}},e.prototype._synchAriaState=function(){this._controls&&this._controls.syncAriaState()},e.prototype._enterLightbox=function(){var t=document.querySelector("body");if(t&&!L.default.classList(t).contains("vp-lightbox")){for(var e=this._contentElem.parentNode;e&&"BODY"!==e.nodeName;)L.default.classList(e).add("vp-lightbox-ancestor"),e=e.parentNode;L.default.classList(t).add("vp-lightbox")}},e.prototype._exitLightbox=function(){var t=document.querySelector("body");if(t&&L.default.classList(t).contains("vp-lightbox")){L.default.classList(t).remove("vp-lightbox");for(var e=this._contentElem.parentNode;e&&"BODY"!==e.nodeName;)L.default.classList(e).remove("vp-lightbox-ancestor"),e=e.parentNode}},e.prototype._onMuteChange=function(t){t?L.default.classList(this._contentElem).add("vp-muted"):L.default.classList(this._contentElem).remove("vp-muted")},e.prototype._mouseMoveHandler=function(){this._autoHideControlsTimeout&&window.clearTimeout(this._autoHideControlsTimeout),L.default.classList(this._contentElem).remove("vp-hide-controls"),this._objectOverlay&&L.default.classList(this._objectOverlay).remove("vp-overlay-hide-cursor"),this._model.isSeeking()||this._model.isPaused()||(this._autoHideControlsTimeout=window.setTimeout(this._onAutoHideControls.bind(this),5e3)),this._eventBus.publish(T.CONTROLS_BAR_CHANGE,!0,!0),this.getFullscreen()||this._eventBus.publish(I.CCEvent.POSITION_FLOAT,!0)},e.prototype._mouseOutHandler=function(t){"mouseout"===t.type&&(this._autoHideControlsTimeout&&window.clearTimeout(this._autoHideControlsTimeout),L.default.classList(this._contentElem).add("vp-hide-controls"),this._eventBus.publish(T.CONTROLS_BAR_CHANGE,!1,!1),this.getFullscreen()||this._eventBus.publish(I.CCEvent.POSITION_FLOAT,!1))},e.prototype._onAutoHideControls=function(){this._objectOverlay=this._contentElem&&this._contentElem.querySelector(".vp-object-overlay"),this._autoHideControlsTimeout&&(window.clearTimeout(this._autoHideControlsTimeout),this._autoHideControlsTimeout=null),L.default.classList(this._contentElem).add("vp-hide-controls"),this._eventBus.publish(T.CONTROLS_BAR_CHANGE,!1,!0)},e.prototype._onUpnextPgClick=function(){this._autoHideControlsTimeout&&window.clearTimeout(this._autoHideControlsTimeout),this._model.isSeeking()||(this._autoHideControlsTimeout=window.setTimeout(this._onAutoHideControls.bind(this),5e3))},e.prototype._handleFullscreenChange=function(){var t=this.getFullscreen();t?(L.default.classList(this._contentElem).add("vp-state-fullscreen"),this._isDocked&&(this._fsDocked=!0,this.undockVideoPlayer())):(L.default.classList(this._contentElem).remove("vp-state-fullscreen"),(this._isDocked||this._fsDocked)&&(this._fsDocked=!1)),this._isFullScreen!==t&&(this._model.uiState.isFullscreen=t,this._eventBus.publish(T.FULLSCREEN_CHANGE,t),this._isFullScreen=t)},e.prototype._onDimensionChange=function(t){var e,n=t.width||1,i=t.height||1,r=this._getViewSize(n,i);(this.isStreamMode()||this.isMiniStreamMode())&&r===s.NORMAL&&this._removeStreamMode(),l.userAgent.desktop&&(r===s.VERY_SMALL?L.default.classList(this._contentElem).add("vp-ministream"):r===s.SMALL&&(L.default.classList(this._contentElem).add("vp-stream"),this._playlistController.detachUpNextMouseEvents(),(e=this.getContentNode().querySelector(".vp-upnext-playlist"))&&L.default.classList(e).add("hide")))},e.prototype._removeStreamMode=function(){var t,e=this.getContentNode();L.default.classList(e).remove("vp-ministream"),L.default.classList(e).remove("vp-stream"),this._playlistController.attachUpNextMouseEvents(),(t=this.getContentNode().querySelector(".vp-upnext-playlist"))&&L.default.classList(t).remove("hide")},e.prototype._getViewSize=function(t,e){var n=s.NORMAL;return(t<=a.VERY_SMALL_WIDTH||e<=a.VERY_SMALL_HEIGHT)&&(n=s.VERY_SMALL),(t<=a.SMALL_WIDTH&&t>a.VERY_SMALL_WIDTH||e<=a.SMALL_HEIGHT&&e>a.VERY_SMALL_HEIGHT)&&(n=s.SMALL),n},e.prototype._viewUIInteract=function(t){this.publish(k.UI_INTERACT,t)},e.prototype._syncMode=function(t){var e=this.getContentNode(),n="vp-mode-"+this._model.playbackState.playbackMode,i=L.default.classList(e);Object.keys(M.PlaybackMode).forEach(function(t){var e="vp-mode-"+M.PlaybackMode[t];i.contains(e)&&e!==n&&i.remove(e)}),i.contains(n)||i.add(n)},e.prototype._syncPlaybackState=function(){!this._model.isPaused()?(this._setFlag(o.PLAYING,!0),this._setFlag(o.PAUSED,!1)):(this._setFlag(o.PLAYING,!1),this._setFlag(o.PAUSED,!0)),this.publish(k.SYNC_PLAYBACK_STATE)},e.prototype._setupControls=function(){var t=this,e=this._controls,n=e?e.create():null;n&&Object.keys(n).forEach(function(e){t._mainElem&&n[e]&&t._mainElem.appendChild(n[e])}),e.on(f.ControlsEvent.SEEK,function(e){t.publish(k.SEEK,e)},this),e.on(f.ControlsEvent.SET_VOLUME,function(e){t.publish(k.SET_VOLUME,e)},this),e.on(f.ControlsEvent.SET_MUTE,function(e){t.publish(k.SET_MUTE,e)},this),e.on(f.ControlsEvent.TOGGLE_CC,function(e,n){t.publish(k.TOGGLE_CC,e,n)},this),e.on(f.ControlsEvent.SET_AUDIO_LANGUAGE,function(e,n){t.publish(k.SET_AUDIO_LANGUAGE,e,n)},this),e.on(f.ControlsEvent.UI_INTERACT,function(e){t._viewUIInteract(e)},this),e.on(f.ControlsEvent.TOGGLE_PLAY_PAUSE,function(){t.publish(k.TOGGLE_PLAY_PAUSE)},this),e.on(f.ControlsEvent.LOGO_CLICK,function(){t._model.playbackState.state===C.States.INIT?t.publish(k.START_SCREEN_CLICK):t.publish(k.TOGGLE_PLAY_PAUSE)},this)},e.prototype._setupPlaylistControllerEvents=function(){var t=this;this._playlistController.on(w.PlaylistViewEvents.UI_INTERACT,function(e){t._viewUIInteract(e)},this)},e.prototype._setupStartScreenEvents=function(){var t=this,e=this._startScreen;e.on(g.StartScreenEvent.UI_INTERACT,function(e){t._viewUIInteract(e)},this),e.on(g.StartScreenEvent.START_SCREEN_CLICK,function(){t.publish(k.START_SCREEN_CLICK)},this)},e.prototype._setupOpssEventListeners=function(){var t=this;this._openSimSim.on(v.OpssEvent.VISIBILITY_CHANGED,function(e,n){t.publish(k.OPSS_VISIBILITY_CHANGED,e,n)},this)},e.prototype._destroyBranding=function(){this._branding&&this._branding.destroy()},e}(u.default);e.default=x},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e,n,i){this._model=t,this._eventBus=e,this._profiler=n,this._adsDiagnostics=i}return t.prototype.create=function(){return document.createElement("div")},t.prototype.show=function(){},t.prototype.isOpen=function(){return!1},t.prototype.close=function(){},t.prototype.destroy=function(){},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(230),o=function(){function t(t,e){this._eventBus=t,this._viewRootEl=e.getRootElement()||null}return t.prototype.create=function(){return this.node=i.default.render(r,{}),this.node},t.prototype.destroy=function(){this.node&&this.node.parentNode&&this.node.parentNode.removeChild(this.node),this._viewRootEl=null,this._eventBus=null,this.node=null},t}();e.default=o},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-ads-overlay'></div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){!function(t){var e=/\S/,n=/\"/g,i=/\n/g,r=/\r/g,o=/\\/g,s=/\u2028/,a=/\u2029/;function u(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function l(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function c(t,e,n){if(e.charAt(n)!=t.charAt(0))return!1;for(var i=1,r=t.length;i<r;i++)if(e.charAt(n+i)!=t.charAt(i))return!1;return!0}t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(n,i){var r=n.length,o=0,s=null,a=null,d="",h=[],p=!1,f=0,_=0,m="{{",y="}}";function v(){d.length>0&&(h.push({tag:"_t",text:new String(d)}),d="")}function g(n,i){if(v(),n&&function(){for(var n=!0,i=_;i<h.length;i++)if(!(n=t.tags[h[i].tag]<t.tags._v||"_t"==h[i].tag&&null===h[i].text.match(e)))return!1;return n}())for(var r,o=_;o<h.length;o++)h[o].text&&((r=h[o+1])&&">"==r.tag&&(r.indent=h[o].text.toString()),h.splice(o,1));else i||h.push({tag:"\n"});p=!1,_=h.length}function E(t,e){var n="="+y,i=t.indexOf(n,e),r=l(t.substring(t.indexOf("=",e)+1,i)).split(" ");return m=r[0],y=r[r.length-1],i+n.length-1}for(i&&(i=i.split(" "),m=i[0],y=i[1]),f=0;f<r;f++)0==o?c(m,n,f)?(--f,v(),o=1):"\n"==n.charAt(f)?g(p):d+=n.charAt(f):1==o?(f+=m.length-1,"="==(s=(a=t.tags[n.charAt(f+1)])?n.charAt(f+1):"_v")?(f=E(n,f),o=0):(a&&f++,o=2),p=f):c(y,n,f)?(h.push({tag:s,n:l(d),otag:m,ctag:y,i:"/"==s?p-m.length:f+y.length}),d="",f+=y.length-1,o=0,"{"==s&&("}}"==y?f++:u(h[h.length-1]))):d+=n.charAt(f);return g(p,!0),h};var d={_t:!0,"\n":!0,$:!0,"/":!0};function h(t,e){for(var n=0,i=e.length;n<i;n++)if(e[n].o==t.n)return t.tag="#",!0}function p(t,e,n){for(var i=0,r=n.length;i<r;i++)if(n[i].c==t&&n[i].o==e)return!0}function f(t){var e=[];for(var n in t.partials)e.push('"'+m(n)+'":{name:"'+m(t.partials[n].name)+'", '+f(t.partials[n])+"}");return"partials: {"+e.join(",")+"}, subs: "+function(t){var e=[];for(var n in t)e.push('"'+m(n)+'": function(c,p,t,i) {'+t[n]+"}");return"{ "+e.join(",")+" }"}(t.subs)}t.stringify=function(e,n,i){return"{code: function (c,p,i) { "+t.wrapMain(e.code)+" },"+f(e)+"}"};var _=0;function m(t){return t.replace(o,"\\\\").replace(n,'\\"').replace(i,"\\n").replace(r,"\\r").replace(s,"\\u2028").replace(a,"\\u2029")}function y(t){return~t.indexOf(".")?"d":"f"}function v(t,e){var n="<"+(e.prefix||"")+t.n+_++;return e.partials[n]={name:t.n,partials:{}},e.code+='t.b(t.rp("'+m(n)+'",c,p,"'+(t.indent||"")+'"));',n}function g(t,e){e.code+="t.b(t.t(t."+y(t.n)+'("'+m(t.n)+'",c,p,0)));'}function E(t){return"t.b("+t+");"}t.generate=function(e,n,i){_=0;var r={code:"",subs:{},partials:{}};return t.walk(e,r),i.asString?this.stringify(r,n,i):this.makeTemplate(r,n,i)},t.wrapMain=function(t){return'var t=this;t.b(i=i||"");'+t+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(t,e,n){var i=this.makePartials(t);return i.code=new Function("c","p","i",this.wrapMain(t.code)),new this.template(i,e,this,n)},t.makePartials=function(t){var e,n={subs:{},partials:t.partials,name:t.name};for(e in n.partials)n.partials[e]=this.makePartials(n.partials[e]);for(e in t.subs)n.subs[e]=new Function("c","p","t","i",t.subs[e]);return n},t.codegen={"#":function(e,n){n.code+="if(t.s(t."+y(e.n)+'("'+m(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(e.nodes,n),n.code+="});c.pop();}"},"^":function(e,n){n.code+="if(!t.s(t."+y(e.n)+'("'+m(e.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(e.nodes,n),n.code+="};"},">":v,"<":function(e,n){var i={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,i);var r=n.partials[v(e,n)];r.subs=i.subs,r.partials=i.partials},$:function(e,n){var i={subs:{},code:"",partials:n.partials,prefix:e.n};t.walk(e.nodes,i),n.subs[e.n]=i.code,n.inPartial||(n.code+='t.sub("'+m(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=E('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+y(t.n)+'("'+m(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=E('"'+m(t.text)+'"')},"{":g,"&":g},t.walk=function(e,n){for(var i,r=0,o=e.length;r<o;r++)(i=t.codegen[e[r].tag])&&i(e[r],n);return n},t.parse=function(e,n,i){return function e(n,i,r,o){var s,a=[],u=null,l=null;for(s=r[r.length-1];n.length>0;){if(l=n.shift(),s&&"<"==s.tag&&!(l.tag in d))throw new Error("Illegal content in < super tag.");if(t.tags[l.tag]<=t.tags.$||h(l,o))r.push(l),l.nodes=e(n,l.tag,r,o);else{if("/"==l.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+l.n);if(u=r.pop(),l.n!=u.n&&!p(l.n,u.n,o))throw new Error("Nesting error: "+u.n+" vs. "+l.n);return u.end=l.i,a}"\n"==l.tag&&(l.last=0==n.length||"\n"==n[0].tag)}a.push(l)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return a}(e,0,[],(i=i||{}).sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,n){n=n||{};var i=t.cacheKey(e,n),r=this.cache[i];if(r){var o=r.partials;for(var s in o)delete o[s].instance;return r}return r=this.generate(this.parse(this.scan(e,n.delimiters),e,n),e,n),this.cache[i]=r}}(e)},function(t,e,n){!function(t){function e(t,e,n){var i;return e&&"object"==typeof e&&(void 0!==e[t]?i=e[t]:n&&e.get&&"function"==typeof e.get&&(i=e.get(t))),i}t.Template=function(t,e,n,i){t=t||{},this.r=t.code||this.r,this.c=n,this.options=i||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,n){return""},v:function(t){return t=u(t),a.test(t)?t.replace(n,"&amp;").replace(i,"&lt;").replace(r,"&gt;").replace(o,"&#39;").replace(s,"&quot;"):t},t:u,render:function(t,e,n){return this.ri([t],e||{},n)},ri:function(t,e,n){return this.r(t,e,n)},ep:function(t,e){var n=this.partials[t],i=e[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[t].base=i,n.subs){for(key in e.stackText||(e.stackText={}),n.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);i=function(t,e,n,i,r,o){function s(){}function a(){}var u;s.prototype=t,a.prototype=t.subs;var l=new s;for(u in l.subs=new a,l.subsText={},l.buf="",i=i||{},l.stackSubs=i,l.subsText=o,e)i[u]||(i[u]=e[u]);for(u in i)l.subs[u]=i[u];for(u in r=r||{},l.stackPartials=r,n)r[u]||(r[u]=n[u]);for(u in r)l.partials[u]=r[u];return l}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=i,i},rp:function(t,e,n,i){var r=this.ep(t,n);return r?r.ri(e,n,i):""},rs:function(t,e,n){var i=t[t.length-1];if(l(i))for(var r=0;r<i.length;r++)t.push(i[r]),n(t,e,this),t.pop();else n(t,e,this)},s:function(t,e,n,i,r,o,s){var a;return(!l(t)||0!==t.length)&&("function"==typeof t&&(t=this.ms(t,e,n,i,r,o,s)),a=!!t,!i&&a&&e&&e.push("object"==typeof t?t:e[e.length-1]),a)},d:function(t,n,i,r){var o,s=t.split("."),a=this.f(s[0],n,i,r),u=this.options.modelGet,c=null;if("."===t&&l(n[n.length-2]))a=n[n.length-1];else for(var d=1;d<s.length;d++)void 0!==(o=e(s[d],a,u))?(c=a,a=o):a="";return!(r&&!a)&&(r||"function"!=typeof a||(n.push(c),a=this.mv(a,n,i),n.pop()),a)},f:function(t,n,i,r){for(var o=!1,s=!1,a=this.options.modelGet,u=n.length-1;u>=0;u--)if(void 0!==(o=e(t,n[u],a))){s=!0;break}return s?(r||"function"!=typeof o||(o=this.mv(o,n,i)),o):!r&&""},ls:function(t,e,n,i,r){var o=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(u(t.call(e,i)),e,n)),this.options.delimiters=o,!1},ct:function(t,e,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,n)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,n,i,r,o,s){var a,u=e[e.length-1],l=t.call(u);return"function"==typeof l?!!i||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(l,u,n,a.substring(r,o),s)):l},mv:function(t,e,n){var i=e[e.length-1],r=t.call(i);return"function"==typeof r?this.ct(u(r.call(i)),i,n):r},sub:function(t,e,n,i){var r=this.subs[t];r&&(this.activeSub=t,r(e,n,this,i),this.activeSub=!1)}};var n=/&/g,i=/</g,r=/>/g,o=/\'/g,s=/\"/g,a=/[&<>\"\']/;function u(t){return String(null===t||void 0===t?"":t)}var l=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(114),a=n(41),u=n(69),l=n(7),c=n(4),d=n(0);!function(t){t.CTA_TRIGGERED="ads-view--cta-triggered",t.CLICKED="ads-view--ui-clicked",t.SKIP_AD_REQUESTED="ads-view--skip-ad-requsted"}(r=e.AdsViewEvent||(e.AdsViewEvent={}));var h=function(t){function e(e){var n=t.call(this,"AdsView")||this;return n._pluginManager=e,n._activeAdViewAdPlugin=null,n._stopListeningUIEvents=d.default.noop,n._defaultAdViewAdPlugin=n._getAdPluginByMimetype(s.default.mimetype),n}return i(e,t),Object.defineProperty(e.prototype,"node",{get:function(){return this._adViewWrapperEl},enumerable:!0,configurable:!0}),e.prototype.create=function(){return this._adViewWrapperEl?this._adViewWrapperEl:(this._adViewWrapperEl=document.createElement("div"),d.default.classList(this._adViewWrapperEl).add("vp-adview-wrapper"),d.default.classList(this._adViewWrapperEl).add("vp-hidden"),this._adViewWrapperEl)},e.prototype.onAdBreakStart=function(t){this._show()},e.prototype.onAdBreakEnd=function(t){this._hide(),this._cleanupAdView(),this._setActiveAdViewAdPlugin(null)},e.prototype.onAdBreakItemCurrent=function(t){this._currAdItemSkipAllowed=!1,this._cleanupAdView();var e=t.adBreak,n=e.adBreakItems.indexOf(t);if(t.interactionConfig&&t.interactionConfig.chromeless)this._setActiveAdViewAdPlugin(null);else{this._setActiveAdViewAdPlugin(this._getNextAdViewPlugin(t));var i=this._activeAdViewAdPlugin.renderUI(t.rawItemData,{position:n,total:e.adBreakItems.length,adBreakDuration:e.duration});i?this._adViewWrapperEl.appendChild(i):this._setActiveAdViewAdPlugin(null)}},e.prototype.destroy=function(){this._hide(),this._cleanupAdView(),this._setActiveAdViewAdPlugin(null),this._defaultAdViewAdPlugin=null,this._pluginManager=null,this._adViewWrapperEl=null},e.prototype._show=function(){this._adViewWrapperEl&&d.default.classList(this._adViewWrapperEl).remove("vp-hidden")},e.prototype._hide=function(){this._adViewWrapperEl&&d.default.classList(this._adViewWrapperEl).add("vp-hidden")},e.prototype._cleanupAdView=function(){this._activeAdViewAdPlugin&&this._activeAdViewAdPlugin.unrenderUI(),this._adViewWrapperEl&&(this._adViewWrapperEl.innerHTML="")},e.prototype._onAdUIEvent=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];switch(e){case a.AdPluginUIEvent.CTA_TRIGGERED:this.publish(r.CTA_TRIGGERED);break;case a.AdPluginUIEvent.CLICKED:this.publish(r.CLICKED);break;case a.AdPluginUIEvent.SKIP_AD:this.publish(r.SKIP_AD_REQUESTED)}},e.prototype._setActiveAdViewAdPlugin=function(t){t!==this._activeAdViewAdPlugin&&(this._stopListeningUIEvents(),t?(this._activeAdViewAdPlugin=t,this._stopListeningUIEvents=u.listenEventDispatcherEvts(this._activeAdViewAdPlugin,Object.keys(a.AdPluginUIEvent).map(function(t){return a.AdPluginUIEvent[t]}),this._onAdUIEvent.bind(this))):(this._activeAdViewAdPlugin=null,this._stopListeningUIEvents=d.default.noop))},e.prototype._enableClickBlocking=function(t){this._adViewWrapperEl&&d.default.classList(this._adViewWrapperEl)[t?"add":"remove"]("vp-block-pointer-evts")},e.prototype._getNextAdViewPlugin=function(t){var e=this._getAdPluginByMimetype(t.adPluginMimeType);return e&&c.isAdViewAdPlugin(e)&&e.canRenderUI(t.rawItemData)?e:this._defaultAdViewAdPlugin},e.prototype._getAdPluginByMimetype=function(t){return t?this._pluginManager.getPlugin(l.PluginType.AD,t):null},e}(o.default);e.default=h},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b('<div class="vp-adview-simple">'),i.b("\n"+n),i.b('    <div class="vp-adbreak-progress">'),i.b("\n"+n),i.b("        <span>Ad 1/3: 15s</span>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b('    <div class="vp-adbreakitem-cta">'),i.b("\n"+n),i.b('        <div class="vp-adview-btn">Get Now</div>'),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),r=n(2),o=n(7),s=n(18),a=r.API.PLAYER_DOCKED_CHANGE,u=r.FULLSCREEN_CHANGE,l=function(){function t(t,e,n,i){this._eventBus=t,this._view=e,this._model=n,this._pluginManager=i}return t.prototype.syncState=function(){var t=this._model.getState();t===s.States.INIT||t===s.States.WAITING||t===s.States.VIDEO?this._render():t===s.States.END&&this._remove()},t.prototype.destroy=function(){this._remove()},t.prototype._render=function(){var t=this._model.playlist&&this._model.playlist.getCurrentItem();if(this._pluginManager&&t&&t.brandingData&&!this._brandingElem){var e=this._pluginManager.getPlugin(o.PluginType.BRANDING,t.brandingData.mimetype),n=e&&e.create(t.brandingData);n&&(this._brandingElem=n,this._brandingElem.style.visibility="hidden",this._addBrandingToPage(),this._brandingElemHeight=this._brandingElem.offsetHeight,this._setBrandedContentHeight(),this._brandingElem.style.visibility=null,this._handleEvents())}},t.prototype._addBrandingToPage=function(){var t=this._view.getContentNode(),e=this._view.getPlaylistController(),n=e.getPlaylistRootElement(),r=e.isPlaylistShown(),o=e.getPlaylistUIPosition();r&&o===i.PLAYLIST_POS.BOTTOM&&n?n.parentNode.insertBefore(this._brandingElem,n):t.appendChild(this._brandingElem)},t.prototype._handleEvents=function(){var t=this;this._contentHeightEventKeys||(this._contentHeightEventKeys=this._eventBus.on([a,u],function(e){t._contentHeightTimeout&&(window.clearTimeout(t._contentHeightTimeout),t._contentHeightTimeout=null),e===u?t._contentHeightTimeout=window.setTimeout(function(){t._contentHeightTimeout=null,t._setBrandedContentHeight()},700):t._setBrandedContentHeight()},this))},t.prototype._remove=function(){var t=this._view.getMainElement();t&&(t.style.height="100%"),this._brandingElem&&(this._brandingElem.parentNode.removeChild(this._brandingElem),this._brandingElem=null,this._brandingElemHeight=null,this._removeEvents())},t.prototype._removeEvents=function(){this._contentHeightEventKeys&&(this._eventBus.removeEventListeners(this._contentHeightEventKeys),this._contentHeightEventKeys=null)},t.prototype._setBrandedContentHeight=function(){var t=this._view.getContentNode(),e=this._view.getMainElement();this._brandingElem&&this._brandingElemHeight&&t&&e&&(e.style.height="calc(100% - "+this._brandingElemHeight+"px)")},t}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r,o,s,a,u,l,c,d,h=n(83),p=n(28),f=n(42),_=n(0),m=n(115),y=n(22);!function(t){t.Main=".vp-ccsettings-main",t.Extra=".vp-ccsettings-extra",t.Options=".vp-ccsettings-options"}(i=e.SettingsSubContainers||(e.SettingsSubContainers={})),function(t){t.Toggle=".vp-ccsettings-toggle",t.ToggleLabel='.vp-ccsettings-listitem[data-item-type="Closed Captions"] .vp-ccsettings-value',t.LanguageListItem='.vp-ccsettings-listitem[data-item-type="Caption Languages"]',t.HeaderListItem='.vp-ccsettings-listitem[data-item-type="header"]',t.Item=".vp-ccsettings-item",t.Value=".vp-ccsettings-value",t.ListItem=".vp-ccsettings-listitem",t.ListOptions=".vp-ccsettings-listoptions",t.Pointer=".vp-ccsettings-pointer",t.CheckMark=".vp-ccsettings-checkmark",t.Preview="vp-ccsettings-preview"}(r=e.ItemClasses||(e.ItemClasses={})),function(t){t.Plain="none",t.Dropshadow="dropshadow",t.Raised="raised",t.Depressed="depressed",t.Uniform="uniform"}(o=e.CCEffects||(e.CCEffects={})),function(t){t.Top="top",t.Bottom="bottom"}(s=e.CCPosition||(e.CCPosition={})),function(t){t["Extra Small"]="16",t.Small="20",t.Medium="24",t.Large="28",t["Extra Large"]="32"}(a=e.CCFontSize||(e.CCFontSize={})),function(t){t.Georgia="Georgia, serif",t["Palatino Linotype"]='"Palatino Linotype", "Book Antiqua", Palatino, serif',t["Times New Roman"]='"Times New Roman", Times, serif',t.Helvetica="Helvetica, sans-serif",t.Arial="Arial, Helvetica, sans-serif",t["Arial Black"]='"Arial Black", Gadget, sans-serif',t["Comic Sans MS"]='"Comic Sans MS", cursive, sans-serif',t.Impact="Impact, Charcoal, sans-serif",t["Lucida Sans Unicode"]='"Lucida Sans Unicode", "Lucida Grande", sans-serif',t.Tahoma="Tahoma, Geneva, sans-serif",t["Trebuchet MS"]='"Trebuchet MS", Helvetica, sans-serif',t.Verdana="Verdana, Geneva, sans-serif",t["Courier New"]='"Courier New", Courier, monospace',t["Lucida Console"]='"Lucida Console", Monaco, monospace'}(u=e.CCFontFamily||(e.CCFontFamily={})),function(t){t.White="#FFFFFF",t.Grey="#E7E7E7",t.Black="#000000",t.Red="#FC2525",t.Green="#29FD2F",t.Blue="#2524FB",t.Cyan="#2CFEFE",t.Yellow="#FEF149",t.Magenta="#EC369C"}(l=e.CCFontColor||(e.CCFontColor={})),function(t){t.White="#FFFFFF",t["Light Gray"]="#c7c7c7",t.Gray="#919191",t["Dark Gray"]="#5b5b5b",t.Black="#000000",t.Red="#FC2424",t.Green="#29FD2F",t.Blue="#2424FB",t.Cyan="#2CFDFD",t.Yellow="#FDF048",t.Magenta="#EC359B"}(c=e.CCBackgroundColor||(e.CCBackgroundColor={})),function(t){t.Transparent="0",t["25%"]="25",t["50%"]="50",t["75%"]="75",t["100%"]="100"}(d=e.CCBackgroundTransparency||(e.CCBackgroundTransparency={}));var v={Effects:o,Position:s,"Font Size":a,"Font Family":u,"Font Color":l,"Background Color":c,"Background Transparency":d};e.ExtraSettingsDefaultValues={Effects:"Plain",Position:"Bottom","Font Size":"Medium","Font Family":"Helvetica","Font Color":"White","Background Color":"Black","Background Transparency":"75%"},e.DEFAULT_CC_DATA={selectedLang:"en-us",langList:["en-us"]},e.ACTIVATION_CLASSES={OPEN:"vp-open",VISBILITYHIDDEN:"vp-vis-hide",VISBILITYSHOW:"vp-vis-show",ACTIVE:"vp-active",ON:"vp-on"},e.MIN_PLAYER_DIMENSION={WIDTH:604,HEIGHT:340};var g=n(237),E=n(238),b=function(){function t(t,e){this._controls=t,this._model=e}return t.prototype.create=function(){this._syncLocalStoragePrefs(),this._settingsContainer=_.default.render(g,{strings:p}),this._renderMainMenu(),this._activeContainer=this._mainSettingContainer,this._renderExtraSettings(),this._currentOptionType=null,this.updateAvailableLanguages(e.DEFAULT_CC_DATA),this._ccPreviewElement=document.createElement("div"),this._ccPreviewElement.innerHTML="Captions will look like this",_.default.classList(this._ccPreviewElement).add(r.Preview),_.default.classList(this._ccPreviewElement).add("vp-vis-hidden");var t=this._controls.getMainElement();return t&&t.appendChild(this._ccPreviewElement),this.syncMenuUI(),this.onPlayerResize(this._model.uiState),this._settingsContainer},t.prototype.syncMenuUI=function(){this._updateExtraMenu(),this._updateExtraSettingOptionMenu(),this._updateLanguageMenu()},t.prototype.showActiveContainer=function(){this._changeActiveContainerTimer&&clearTimeout(this._changeActiveContainerTimer),this._ccPointer&&_.default.classList(this._ccPointer).add(e.ACTIVATION_CLASSES.OPEN),this._activeContainer&&_.default.classList(this._activeContainer).add(e.ACTIVATION_CLASSES.OPEN)},t.prototype.hideActiveContainer=function(){var t=this;this._ccPointer&&_.default.classList(this._ccPointer).remove(e.ACTIVATION_CLASSES.OPEN),this._activeContainer&&_.default.classList(this._activeContainer).remove(e.ACTIVATION_CLASSES.OPEN),this._changeActiveContainerTimer&&clearTimeout(this._changeActiveContainerTimer),this._changeActiveContainerTimer=window.setTimeout(function(){t._activeContainer=t._mainSettingContainer},1e4)},t.prototype.updateCCToggleState=function(t){var n=this._mainSettingsSelector.ccToggleNode,i=this._mainSettingsSelector.ccToggleLabel;t?_.default.classList(n).add(e.ACTIVATION_CLASSES.ON):_.default.classList(n).remove(e.ACTIVATION_CLASSES.ON),i.innerHTML=t?"ON":"OFF"},t.prototype.destroy=function(){this._tapList.forEach(function(t){return t.destroy()}),this._optionMenuTaps.forEach(function(t){return t.destroy()}),this._tapList=null,this._optionMenuTaps=null,this._currentOptionType=null,this._ccSettingCurrentValues=null,this._availableLanguages=null,this._currentLanguage=null,this._mainSettingsSelector=null,this._optionsSelector=null,this._settingsContainer=null,this._mainSettingContainer=null,this._extraSettingContainer=null,this._optionsContainer=null,this._activeContainer=null,this._ccPointer=null},t.prototype.updateAvailableLanguages=function(t){this._availableLanguages=this._availableLanguages||[],this._currentLanguage=t.selectedLang||this._currentLanguage,t&&t.langList&&t.langList.length&&(this._availableLanguages=t.langList),this._updateLanguageMenu()},t.prototype.onPlayerResize=function(t){t&&t.width&&t.height&&(t.width>=e.MIN_PLAYER_DIMENSION.WIDTH&&t.height>=e.MIN_PLAYER_DIMENSION.HEIGHT?this._settingsContainer&&_.default.classList(this._settingsContainer).remove(e.ACTIVATION_CLASSES.VISBILITYHIDDEN):this._settingsContainer&&_.default.classList(this._settingsContainer).add(e.ACTIVATION_CLASSES.VISBILITYHIDDEN))},t.prototype._showCCPreview=function(){var t=this;if(this._ccElement=this._controls.getCCElement(),this._ccElement){var n=this._ccElement.querySelector("span").style,i=this._ccElement.style;this._ccPreviewElement.style.fontFamily=i.fontFamily,this._ccPreviewElement.style.fontSize=i.fontSize,this._ccPreviewElement.style.top=this._model.ccUserPreferences.ccPos===s.Top?"5%":"",this._ccPreviewElement.style.bottom=this._model.ccUserPreferences.ccPos===s.Bottom?"16%":"",this._ccPreviewElement.style.left=i.left||"2.5%",this._ccPreviewElement.style.color=i.color,this._ccPreviewElement.style.textShadow=i.textShadow,this._ccPreviewElement.style.backgroundColor=n.backgroundColor,this._ccElement.style.visibility="hidden",_.default.classList(this._ccPreviewElement).add(e.ACTIVATION_CLASSES.ACTIVE),this._ccPreviewTimeout&&clearTimeout(this._ccPreviewTimeout),this._ccPreviewTimeout=window.setTimeout(function(){t._ccElement.style.visibility="visible",_.default.classList(t._ccPreviewElement).remove(e.ACTIVATION_CLASSES.ACTIVE)},2e3)}},t.prototype._syncLocalStoragePrefs=function(){var t=f.default.get(h.CC_LOCAL_STORAGE)?f.default.get(h.CC_LOCAL_STORAGE).ccSettingsMenu:null;t||h.CCController.saveCCSettingsToLocalStorage({ccSettingsMenu:e.ExtraSettingsDefaultValues}),this._ccSettingCurrentValues=t||e.ExtraSettingsDefaultValues},t.prototype._updateLanguageMenu=function(){var t=h.CCController.getLanguageForCode(this._currentLanguage),e=this._mainSettingsSelector.languageNode.querySelector(r.Value);e&&(e.innerHTML=t),this._currentOptionType&&"Language"===this._currentOptionType&&this._updateListCheckMark(t)},t.prototype._updateExtraSettingOptionMenu=function(){if(this._currentOptionType){var t=this._ccSettingCurrentValues[this._currentOptionType];this._updateListCheckMark(t)}},t.prototype._updateListCheckMark=function(t){var n=this._optionsContainer.querySelectorAll(r.ListItem);Array.prototype.forEach.call(n,function(n){var i=n.querySelector(r.CheckMark);n.dataset.itemType!==t?(_.default.classList(n).remove(e.ACTIVATION_CLASSES.ACTIVE),_.default.classList(i).remove(e.ACTIVATION_CLASSES.VISBILITYSHOW)):(_.default.classList(n).add(e.ACTIVATION_CLASSES.ACTIVE),_.default.classList(i).add(e.ACTIVATION_CLASSES.VISBILITYSHOW))})},t.prototype._updateExtraMenu=function(){var t=this,e=this._extraSettingContainer.querySelectorAll(r.ListItem);Array.prototype.forEach.call(e,function(e){var n=e.dataset.itemType;"header"!==n&&(e.querySelector(r.Value).innerHTML=function(t){return t.replace(/\s/g,"&nbsp;")}(t._ccSettingCurrentValues[n]))})},t.prototype._renderMainMenu=function(){this._mainSettingContainer=this._settingsContainer.querySelector(i.Main),this._ccPointer=this._settingsContainer.querySelector(r.Pointer),this._mainSettingsSelector={headerNode:this._mainSettingContainer.querySelector(r.HeaderListItem),ccToggleNode:this._mainSettingContainer.querySelector(r.Toggle),ccToggleLabel:this._mainSettingContainer.querySelector(r.ToggleLabel),languageNode:this._mainSettingContainer.querySelector(r.LanguageListItem)},this._bindMainMenu()},t.prototype._bindMainMenu=function(){var t=this;this._tapList=[],this._tapList.push(new y.default(this._mainSettingsSelector.headerNode,function(){t._onSubSettingsOpen(i.Extra)})),this._tapList.push(new y.default(this._mainSettingsSelector.languageNode,function(){t._renderLanguageContainer(),t._onSubSettingsOpen(i.Options)})),this._tapList.push(new y.default(this._mainSettingsSelector.ccToggleNode,this._onCCToggleClick.bind(this)))},t.prototype._renderLanguageContainer=function(){var t=this;this._renderOptionHeader("Language",i.Main);var e=this._optionsContainer.querySelector(r.ListOptions);this._availableLanguages.forEach(function(n){var i=h.CCController.getLanguageForCode(n),r=t._renderListItem(!1,i,null);e.appendChild(r),t._optionMenuTaps.push(new y.default(r,function(){t._onLanguageItemClick(n)}))}),this._currentOptionType="Language",this._updateLanguageMenu()},t.prototype._onLanguageItemClick=function(t){this._currentLanguage=t,this._controls.onlanguageChange(t),this._controls.updateClosedCaptionButtonState(!0),this._updateLanguageMenu()},t.prototype._onCCToggleClick=function(){var t=_.default.classList(this._mainSettingsSelector.ccToggleNode).contains(e.ACTIVATION_CLASSES.ON)||!1;this._controls.publish(m.ControlsEvent.TOGGLE_CC,!t,!0),this._controls.updateClosedCaptionButtonState(!t)},t.prototype._renderExtraSettings=function(){var t=this;this._extraSettingContainer=this._settingsContainer.querySelector(i.Extra),this._optionsContainer=this._settingsContainer.querySelector(i.Options),this._optionsSelector={headerNode:this._optionsContainer.querySelector(r.HeaderListItem),headerValue:this._optionsContainer.querySelector(r.Item)},this._tapList.push(new y.default(this._extraSettingContainer.firstElementChild,function(){t._onSubSettingsOpen(i.Main)}));var e=this._extraSettingContainer.querySelector(r.ListOptions);Object.keys(this._ccSettingCurrentValues).forEach(function(n){var r=t._renderListItem(!0,n,t._ccSettingCurrentValues[n]);e.appendChild(r);var o=r.dataset.itemType;t._tapList.push(new y.default(r,function(){t._onSubSettingsOpen(i.Options),t._renderOptionsContainer(o)}))})},t.prototype._renderListItem=function(t,e,n){return _.default.render(E,{caratRequired:t,itemContent:e,valueContent:n,valueRequired:!!n})},t.prototype._onSubSettingsOpen=function(t){var n=this;Object.keys(i).map(function(r){var o=n._settingsContainer.querySelector(i[r]);i[r]===t?(_.default.classList(o).add(e.ACTIVATION_CLASSES.OPEN),n._activeContainer=o):_.default.classList(o).remove(e.ACTIVATION_CLASSES.OPEN)})},t.prototype._renderOptionHeader=function(t,e){var n=this;this._optionMenuTaps&&this._optionMenuTaps.length&&this._optionMenuTaps.forEach(function(t){return t.destroy()}),this._optionMenuTaps=[];var i=this._optionsContainer.querySelector(r.ListOptions),o=i.querySelectorAll(r.ListItem);Array.prototype.forEach.call(o,function(t){"header"!==t.dataset.itemType&&i.removeChild(t)}),this._optionMenuTaps.push(new y.default(this._optionsSelector.headerNode,function(){n._onSubSettingsOpen(e)})),this._optionsSelector.headerValue.innerHTML=t},t.prototype._renderOptionsContainer=function(t){var e=this;this._renderOptionHeader(t,i.Extra);var n=v[t],o=this._optionsContainer.querySelector(r.ListOptions);Object.keys(n).map(function(i){var r=e._renderListItem(!1,i,null);o.appendChild(r),e._optionMenuTaps.push(new y.default(r,function(){var r=n[i];e._updateCCSettings(t,r,i)}))}),this._currentOptionType=t,this._updateListCheckMark(this._ccSettingCurrentValues[t])},t.prototype._updateCCSettings=function(t,e,n){if(this._model.ccUserPreferences){var i,r=this._model.ccUserPreferences;switch(t){case"Effects":r.fontEffect=e;break;case"Position":r.ccPos=e;break;case"Font Size":r.fontSize=Number(e),i="size: "+e;break;case"Font Family":r.fontName=e,i="font: "+e;break;case"Font Color":r.fontColor=e;break;case"Background Color":r.bgColor=e;break;case"Background Transparency":try{var o=Number(e);r.bgOpacity=o/100,i="opacity: "+o}catch(t){return}}this._controls.updateClosedCaptionStyle(i),this._ccSettingCurrentValues[t]=n,h.CCController.saveCCSettingsToLocalStorage({ccSettings:r,ccSettingsMenu:this._ccSettingCurrentValues}),this.syncMenuUI(),this._showCCPreview()}},t}();e.default=b},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-ccsettings-container' tabindex='0'>"),i.b("\n"+n),i.b("    <div class='vp-ccsettings-main'>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listitem' data-item-type='header'>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-item' tabindex='0'>More Captions Settings</div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-caret-icon right'></div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-divider'></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listitem' data-item-type='Caption Languages'>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-item' tabindex='0'>Caption Languages</div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-value' tabindex='0'>English</div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-caret-icon right'></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listitem' data-item-type='Closed Captions'>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-item' tabindex='0'>Closed Captions</div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-value' tabindex='0'>ON</div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-toggle vp-on' tabindex='0'>"),i.b("\n"+n),i.b("                <div class='vp-ccsettings-toggle-handle' tabindex='0'></div>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-ccsettings-extra'>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listitem' data-item-type='header'>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-caret-icon left'></div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-item' tabindex='0'>More Captions Settings</div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-value' tabindex='0'></div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-divider'></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listoptions'></div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-ccsettings-options'>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listitem' data-item-type='header'>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-caret-icon left'></div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-item' tabindex='0'></div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-value' tabindex='0'></div>"),i.b("\n"+n),i.b("            <div class='vp-ccsettings-divider'></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-ccsettings-listoptions'></div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-ccsettings-pointer'></div>"),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-ccsettings-listitem' data-item-type='"),i.b(i.v(i.f("itemContent",t,e,0))),i.b("' >"),i.b("\n"+n),i.b("    <div class='vp-ccsettings-checkmark'></div>"),i.b("\n"+n),i.b("    <div class='vp-ccsettings-item' tabindex='0'>"),i.b(i.v(i.f("itemContent",t,e,0))),i.b("</div>"),i.b("\n"+n),i.s(i.f("valueRequired",t,e,1),t,e,0,212,290,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("    <div class='vp-ccsettings-value' tabindex='0'>"),i.b(i.v(i.f("valueContent",t,e,0))),i.b("</div>"),i.b("\n"+n)}),t.pop()),i.s(i.f("caratRequired",t,e,1),t,e,0,331,391,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("    <div class='vp-ccsettings-caret-icon right'></div>"),i.b("\n"+n)}),t.pop()),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div>"),i.b("\n"+n),i.b("    <div class='vp-top-bar vp-vis-hidden'>"),i.b("\n"+n),i.b("        <div class='vp-content-type hide' tabindex='0'></div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-playing-item-title-header vp-vis-hidden'></div>"),i.b("\n"+n),i.b("    <div class='vp-playing-item-title vp-vis-hidden'></div>"),i.b("\n"+n),i.b("    <div class='vp-logos vp-vis-hidden vp-hide' aria-hidden='true'></div>"),i.b("\n"+n),i.b("    <div class='vp-bottom-bar vp-vis-hidden'>"),i.b("\n"+n),i.s(i.f("isMobile",t,e,1),t,e,1,0,0,"")||(i.b("            <div class='vp-slider' role='slider' tabindex='0'>"),i.b("\n"+n),i.b("                <div class='vp-slider-extension' aria-hidden='true'></div>"),i.b("\n"+n),i.b("                <div class='vp-handle'></div>"),i.b("\n"+n),i.b("                <div class='vp-buffer-bar'></div>"),i.b("\n"+n),i.b("                <div class='vp-playback-bar'></div>"),i.b("\n"+n),i.b("                <div class='vp-visual-seek'>"),i.b("\n"+n),i.b("                    <div class='vp-vs-thumbnail'></div>"),i.b("\n"+n),i.b("                    <div class='vp-vs-time'></div>"),i.b("\n"+n),i.b("                </div>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n)),i.b("        <div class='vp-bottom-container'>"),i.b("\n"+n),i.s(i.f("isMobile",t,e,1),t,e,0,960,1581,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("                <div class='vp-slider' role='slider' tabindex='0'>"),i.b("\n"+n),i.b("                    <div class='vp-slider-extension' aria-hidden='true'></div>"),i.b("\n"+n),i.b("                    <div class='vp-handle'>"),i.b("\n"+n),i.b('                        <div class="vp-handle-touch-target"></div>'),i.b("\n"+n),i.b("                    </div>"),i.b("\n"+n),i.b("                    <div class='vp-buffer-bar'></div>"),i.b("\n"+n),i.b("                    <div class='vp-playback-bar'></div>"),i.b("\n"+n),i.b("                    <div class='vp-visual-seek'>"),i.b("\n"+n),i.b("                        <div class='vp-vs-thumbnail'></div>"),i.b("\n"+n),i.b("                        <div class='vp-vs-time'></div>"),i.b("\n"+n),i.b("                    </div>"),i.b("\n"+n),i.b("                </div>"),i.b("\n"+n)}),t.pop()),i.b("            <div class='vp-play-controls'>"),i.b("\n"+n),i.b("                <div class='vp-play-btn' role='button' tabindex='0'></div>"),i.b("\n"+n),i.b("                <div class='vp-upnext-container hide'>"),i.b("\n"+n),i.b("                    <div class='vp-upnext-btn' role='button'>"),i.b("\n"+n),i.b("                    </div>"),i.b("\n"+n),i.b("                    <div class='vp-upnext-playlist' role='dialog'>"),i.b("\n"+n),i.b("                        <div class='vp-hover-elem'></div>"),i.b("\n"+n),i.b("                    </div>"),i.b("\n"+n),i.b("                </div>"),i.b("\n"+n),i.b("                <div class='vp-time-container' tabindex='-1' aria-hidden='true'>"),i.b("\n"+n),i.b("                    <div class='vp-current-time "),i.s(i.f("isMobile",t,e,1),t,e,0,2174,2186,"{{ }}")&&(i.rs(t,e,function(t,e,n){n.b(" vp-pb-time ")}),t.pop()),i.b("'></div>"),i.b("\n"+n),i.b("                    <div class='vp-total-time "),i.s(i.f("isMobile",t,e,1),t,e,0,2267,2279,"{{ }}")&&(i.rs(t,e,function(t,e,n){n.b(" vp-pb-time ")}),t.pop()),i.b("'></div>"),i.b("\n"+n),i.b("                </div>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n),i.b("            <div class='vp-menu-controls'>"),i.b("\n"+n),i.b("                <div class='vp-airplay-btn button vp-hidden' role='button' tabindex='0' aria-label='"),i.b(i.v(i.d("strings.AIRPLAY",t,e,0))),i.b("'></div>"),i.b("\n"+n),i.b("                <div class='vp-cc-btn button vp-hide' role='button' tabindex='0' aria-label='"),i.b(i.v(i.d("strings.CC",t,e,0))),i.b("'></div>"),i.b("\n"+n),i.b("                <div class='vp-volume-btn button' role='button' tabindex='0'>"),i.b("\n"+n),i.s(i.f("isMobile",t,e,1),t,e,1,0,0,"")||(i.b("                    <div class='vp-volume-bar-container'>"),i.b("\n"+n),i.b("                        <div class='vp-multi-audio'></div>"),i.b("\n"+n),i.b("                        <div class='vp-volume-level'>"),i.b("\n"+n),i.b("                            <div class='vp-volume-bar'>"),i.b("\n"+n),i.b("                                <div class='vp-volume-handle'></div>"),i.b("\n"+n),i.b("                            </div>"),i.b("\n"+n),i.b("                            <div class='vp-volume-value'></div>"),i.b("\n"+n),i.b("                        </div>"),i.b("\n"+n),i.b("                    </div>"),i.b("\n"+n)),i.b("                </div>"),i.b("\n"+n),i.b("                <div class='vp-chromecast-btn button' role='button' tabindex='0' style='display:none;' aria-label='"),i.b(i.v(i.d("strings.CHROMECAST",t,e,0))),i.b("'></div>"),i.b("\n"+n),i.b("                <div class='vp-fullscreen-btn button' role='button' tabindex='0'></div>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-cast-overlay vp-vis-hidden'>"),i.b("\n"+n),i.b("        <div>"),i.b("\n"+n),i.b("            <div class='cast-overlay-header'>"),i.b("\n"+n),i.b("                <div class='cast-device-info'>"),i.b("\n"+n),i.b("                    <p class='cast-device-name'>"),i.b(i.v(i.d("strings.CAST_PLAYING_RECEIVER",t,e,0))),i.b("</p>"),i.b("\n"+n),i.b("                    <small class='cast-device-type'>"),i.b(i.v(i.d("strings.CHROMECAST",t,e,0))),i.b("</small>"),i.b("\n"+n),i.b("                </div>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n),i.b("            <div class='cast-overlay-content'></div>"),i.b("\n"+n),i.b("            <div class='cast-overlay-footer'>"),i.b("\n"+n),i.b("                <small class='cast-disconnect-btn'>"),i.b(i.v(i.d("strings.DISCONNECT",t,e,0))),i.b("</small>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-mute-indicator vp-vis-hidden'></div>"),i.b("\n"+n),i.b("    <div class='vp-object-overlay vp-vis-hidden'></div>"),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div>"),i.b("\n"+n),i.s(i.f("isMobile",t,e,1),t,e,0,23,228,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("        <div class='vp-audio-header'>"),i.b("\n"+n),i.b("            <span class='vp-audio-list-title'>Audio Track</span>"),i.b("\n"+n),i.b('            <span class="vp-audio-list-close" data-action="close">&#x2715;</span>'),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n)}),t.pop()),i.s(i.f("items",t,e,1),t,e,0,256,556,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("        <div class='vp-audio-item "),i.s(i.f("selected",t,e,1),t,e,0,304,326,"{{ }}")&&(i.rs(t,e,function(t,e,n){n.b("vp-audio-item-selected")}),t.pop()),i.b("' data-selected=\""),i.b(i.v(i.f("selected",t,e,0))),i.b('" data-language="'),i.b(i.v(i.f("language",t,e,0))),i.b('" data-name="'),i.b(i.v(i.f("name",t,e,0))),i.b('">'),i.b("\n"+n),i.b("            <span class='vp-audio-item-title'>"),i.b(i.v(i.f("name",t,e,0))),i.b("</span>"),i.b("\n"+n),i.b("            <span class='vp-audio-item-check'></span>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n)}),t.pop()),i.b("</div>"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.UP="up",t.DOWN="down",t.LEFT="left",t.RIGHT="right",t.TAP="tap"}(i||(i={}));var r={AD:[{combination:[38,38,40,40,191],alt:!0},{combination:[40,40,38,38,37,39,37,39]}],NORMAL:[{combination:[79,80,69,78,83,73,77,83,73,77]},{combination:[79,80,83,83]},{combination:[37,37,39,39,13],alt:!0},{combination:[38,38,40,40,37,39,37,39]}]},o={AD:[i.LEFT,i.RIGHT,i.UP,i.DOWN,i.TAP,i.TAP,i.TAP],NORMAL:[i.UP,i.DOWN,i.LEFT,i.RIGHT,i.TAP,i.TAP]},s=function(){function t(t,e){this._touches=[],this._numAltPressedKeydowns=0,this._longestPassphraseLength=0,this._keyPressed=[],this._cb=e,this._type=t,this._passPhrases=r[this._type],this._bindTouchEvents(),this._bindKeys()}return t.prototype.destroy=function(){document.removeEventListener("keydown",this._onKeyDownListener,!1),document.removeEventListener("touchstart",this._touchstart,!1),document.removeEventListener("touchmove",this._touchmove,!1),document.removeEventListener("touchend",this._touchend,!1)},t.prototype._bindKeys=function(){var t=this;this._numAltPressedKeydowns=0,this._longestPassphraseLength=0,this._passPhrases.forEach(function(e){e.length=e.combination.length,e.value=e.length?e.combination.toString():null,e.length>t._longestPassphraseLength&&(t._longestPassphraseLength=e.length)}),this._onKeyDownListener=this._onKeyDown.bind(this),document.addEventListener("keydown",this._onKeyDownListener,!1)},t.prototype._onKeyDown=function(t){var e=this;this._numAltPressedKeydowns=t.altDown||t.altKey?this._numAltPressedKeydowns+1:0,this._keyPressed.push(t.keyCode),this._keyPressed.length>this._longestPassphraseLength&&this._keyPressed.shift(),this._passPhrases.some(function(t){var n=e._keyPressed.slice(Math.max(e._keyPressed.length-t.length,0)).toString()===t.value;return t.alt?n&&e._numAltPressedKeydowns>t.length:n})&&this._cb()},t.prototype._touchstart=function(t){this._startX=t.changedTouches[0].pageX,this._startY=t.changedTouches[0].pageY,this._stopX=0,this._stopY=0},t.prototype._touchmove=function(t){if(1===t.touches.length){var e=t.touches[0];this._stopX=e.pageX,this._stopY=e.pageY}},t.prototype._touchend=function(){var t,e=o[this._type];this._stopX||this._stopY?t=Math.abs(this._startX-this._stopX)>Math.abs(this._startY-this._stopY)?this._startX-this._stopX<0?i.RIGHT:i.LEFT:this._startY-this._stopY<0?i.DOWN:i.UP:t=i.TAP;this._touches.push(t),this._touches.length>e.length&&this._touches.shift(),this._touches.length===e.length&&this._touches.every(function(t,n){return t===e[n]})&&this._cb()},t.prototype._bindTouchEvents=function(){this._touchstart=this._touchstart.bind(this),this._touchmove=this._touchmove.bind(this),this._touchend=this._touchend.bind(this),document.addEventListener("touchstart",this._touchstart,!1),document.addEventListener("touchmove",this._touchmove,!1),document.addEventListener("touchend",this._touchend,!1)},t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),r=n(243),o=function(){function t(t){this._eventBus=t}return t.prototype.create=function(t,e,n,o,s){this.node=i.default.render(r,{title:t.title,message:t.message,rep:t.rep,guid:{guid:e},sessionId:{videoSession:n},imageSrc:o,showBgImage:!!o});var a=this.node.querySelector(".vp-error-message"),u=t.errorInfo&&t.errorInfo.msg;return a&&u&&(a.innerHTML=u),i.default.classList(this.node).remove("vp-vis-hidden"),this.node},t.prototype.destroy=function(){this.node=null},t}();e.default=o},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-error-screen vp-vis-hidden'>"),i.b("\n"+n),i.b("    <img class='vp-error-screen-image "),i.s(i.f("showBgImage",t,e,1),t,e,0,98,105,"{{ }}")&&(i.rs(t,e,function(t,e,n){n.b("vp-show")}),t.pop()),i.b("' src='"),i.b(i.v(i.f("imageSrc",t,e,0))),i.b("'>"),i.b("\n"+n),i.b("    <div class='vp-error-screen-background'></div>"),i.b("\n"+n),i.b("    <div class='vp-error-title'>"),i.b(i.v(i.f("title",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("    <div class='vp-error-desc vp-error-message'>"),i.b(i.t(i.f("message",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("    <div class='vp-error-code'>"),i.b(i.v(i.f("rep",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=n(0),o=n(245),s=function(){function t(t){this._eventBus=t}return t.prototype.create=function(){return this.node=r.default.render(o,{}),this._eventBus.addEventListener(i.API.LOADING_BEGIN,this._onLoadingScreenVisible,this),this._eventBus.addEventListener(i.API.LOADING_END,this.hide,this),this.node},t.prototype.hide=function(){this.node&&r.default.classList(this.node).remove("vp-show-spinner")},t.prototype.destroy=function(){this.node=null},t.prototype._onLoadingScreenVisible=function(){this.node&&(r.default.forceDOMRedrawOnElement(this.node),r.default.classList(this.node).add("vp-show-spinner"))},t}();e.default=s},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-loading-screen vp-vis-hidden'>"),i.b("\n"+n),i.b("    <div class='vp-loading-spinner vp-spinner-icon'></div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(85),u=n(2),l=n(2),c=n(5),d=n(28),h=n(19),p=n(4),f=n(0),_=n(22),m=n(247);!function(t){t.VISIBILITY_CHANGED="visibility-changed"}(r=e.OpssEvent||(e.OpssEvent={}));var y=function(t){function e(e,n,i,r,o,s,a){var l=t.call(this,"OpenSimSim")||this;l._html5eventsSubscriptionKeys={},l._model=e,l._eventBus=n,l._profiler=i,l._rendererController=r,l._adsDiagnostics=o,l._pluginManager=s,l._isSwfReady=!1,l._playbackInfo={},l._oldUuid=null;var c=console;return l._logger=a||c.log.bind(c),l._timestamps=[],l._history={bitrate:{title:"Bit Rate History",data:[]},speed:{title:"Download Speed History",data:[]},bufferLength:{title:"Buffer Length History",data:[]},frameRate:{title:"Frame Rate History",data:[]}},l._eventBus.addEventListener(u.PLAYBACK_INFO,function(t){l._playbackInfo=t,l._timestamps.push(Date.now()/1e3),l._history.bitrate.data.push(parseFloat(t.currentStreamBitrate)),l._history.speed.data.push(parseFloat(t.currentKbps)),l._history.bufferLength.data.push(parseFloat(t.bufferLength)),l._history.frameRate.data.push(parseFloat(t.frameRate?t.frameRate:0)),l._updateInfo()},l),l._eventBus.addEventListener(u.SWF_READY,function(){l._isSwfReady=!0},l),l._eventBus.addEventListener(u.YVAP_INFO_UPDATE,function(t){l._yvapDom=t},l),l._eventBus.addEventListener(u.API.PLAYLIST_POSITION_CHANGE,function(){l._updateBasicMediaItemInfo()},l),l._eventBus.addEventListener(u.RENDERER_SWITCHED,l._onRendererSwitched,l),l._eventBus.addEventListener(u.YVAP_MIDROLL_CACHE_UPDATE,l._updateMidrollCacheStats,l),l}return i(e,t),e.prototype.create=function(){var t=this;this._node=f.default.render(m,{version:this._model.version,strings:d.default}),this._midrollCacheStats=this._node.querySelector(".vp-midrollcache-data"),this._adsInfoArea=this._node.querySelector(".vp-adsinfopanel-adsinfo");var e=this._node.querySelector(".ad-info-table");if(e){var n=this._adInfoTableTemplate=this._node.removeChild(e);if(n){var i=n.querySelector("div.vp-tablerow");i&&(this._adInfoRowTemplate=n.removeChild(i))}}var r=this._node.querySelector(".vp-opensimsim-close-btn");r&&(this._closeTap=new _.default(r,function(e){e.stopPropagation(),t.close()}));var o=this._node.querySelector(".vp-profile-btn");o&&(this._profileTap=new _.default(o,function(e){e.stopPropagation(),t._profiler.render(t._yvapDom)})),this._updatePlatformInfo(),this._tableTap=new _.default(this._adsInfoArea,function(e){var n=e.eventSource||e.eventTarget;if(n&&"linkbtn"===n.className)try{t._logAdDiagnosticsById(n.parentNode.parentNode.customData.playbackId)}catch(t){}});var s=this._node.querySelector(".vp-section-expand-config");s&&(this._expandTap=new _.default(s,function(){var e=t._node.querySelector(".vp-opensimsim-current-config");e&&t._showHide(e,s)}));var a=this._node.querySelector(".vp-section-expand-plugins");a&&(this._expandPluginsTap=new _.default(a,function(){var e=t._node.querySelector(".vp-opensimsim-current-plugins");e&&t._showHide(e,a)}));var u=this._node.querySelector(".vp-section-expand-ads");u&&(this._expandAdsTap=new _.default(u,function(){var e=t._node.querySelector(".vp-adsinfopanel-adsinfo");e&&t._showHide(e,u)}));var l=this._node.querySelector(".vp-section-expand-hosting");l&&(this._expandHostingTap=new _.default(l,function(){var e=t._node.querySelector(".vp-opensimsim-hosting-config");e&&t._showHide(e,l)}));var c=this._node.querySelector(".vp-section-expand-context");return c&&(this._expandContextTap=new _.default(c,function(){var e=t._node.querySelector(".vp-opensimsim-current-context");e&&t._showHide(e,c)})),this._node},e.prototype.render=function(){this._handleHTML5Info(),this._renderHostingInfo(),this._renderExpInfo(),this._renderPluginsInfo(),this._updateBasicMediaItemInfo(),this._updateInfo(),this._adsDiagnostics&&(this._drawAdInfoTables(),this._registerAdDataUpdateCallbacks()),this._node.style.display="block",this.publish(r.VISIBILITY_CHANGED,!0,this._node)},e.prototype.isOpen=function(){return"none"!==this._node.style.display},e.prototype.close=function(){this._node.style.display="none",this.publish(r.VISIBILITY_CHANGED,!1,this._node),this._toggleHTML5Info(!1),this._adsDiagnostics&&this._unregisterAdDataUpdateCallbacks()},e.prototype.destroy=function(){this._toggleHTML5Info(!1),this._closeTap&&this._closeTap.destroy(),this._profileTap&&this._profileTap.destroy(),this._tableTap&&this._tableTap.destroy()},e.prototype.fetchInfo=function(){return{history:this._history,playbackInfo:this._playbackInfo,profile:this._profiler}},e.prototype._updateMidrollCacheStats=function(t){var e="",n={retryCount:"retries",targetAdsDuration:"target",totalUniqueAds:"num_uniq",totalDuplicatedAds:"num_dup",totalNoAds:"num_noad",uniqueAdsDuration:"uniq_dur"};Object.keys(t).forEach(function(i){e+=function(t,e){return"<div class='floated-item'>"+t+":<span> "+e+"</span></div>"}(n[i]||i,t[i])}),this._midrollCacheStats&&(this._midrollCacheStats.innerHTML=e)},e.prototype._showHide=function(t,e){var n=f.default.classList(t).contains("vp-hide"),i=f.default.classList(t).contains("vp-adsinfopanel-adsinfo"),r=i?this._node.querySelector(".vp-adinfo-section"):null;if(n){if(f.default.classList(t).remove("vp-hide"),f.default.classList(e).remove("vp-expanded"),f.default.classList(e).add("vp-collapsed"),i){r&&f.default.classList(r).remove("vp-hide");var o=this._node.querySelector(".vp-inviewport");o&&this._setViewPort(o)}}else f.default.classList(t).add("vp-hide"),f.default.classList(e).remove("vp-collapsed"),f.default.classList(e).add("vp-expanded"),i&&r&&f.default.classList(r).add("vp-hide")},e.prototype._setViewPort=function(t){t&&t.scrollIntoView()},e.prototype._drawAdInfoTables=function(){var t=this;this._adsInfoArea&&(this._adsInfoArea.innerHTML="");var e=this._adsDiagnostics.getAllAdDiagnostics();Object.keys(e).forEach(function(n){t._drawAdDiagnosticsTable(e[n],n)})},e.prototype._drawAdDiagnosticsTable=function(t,e){var n=this,i=this._adInfoTableTemplate.cloneNode(!0);i.children[0].innerHTML="<strong>MEDIA UUID: </strong>"+e,Object.keys(t).forEach(function(e){var r=t[e];n._insertAdsDiagnosticsRow(i,r)}),i.setAttribute("relvideo",e),this._oldUuid=e,this._adsInfoArea&&this._adsInfoArea.appendChild(i)},e.prototype._insertAdsDiagnosticsRow=function(t,e){if(t&&e){var n=this._adInfoRowTemplate.cloneNode(!0);if(e){var i=e.playbackId,r=e.clipId;n.setAttribute("apbid",i),n.customData={playbackId:i,uuid:r,adstate:e.adstate};var o=n.querySelector(".adPbId");o&&(o.innerHTML=i);var s=n.querySelector(".addur");s&&(s.innerHTML=e.duration);var a=n.querySelector(".adposition");a&&(a.innerHTML=e.position);var u=n.querySelector(".crId");u&&(u.innerHTML=e.creativeId);var l=n.querySelector(".vCrId");l&&(l.innerHTML=e.vastCreativeId);var c=n.querySelector(".bId");c&&(c.innerHTML=e.bookingId),this._updateAdStateInRow(n,e.adstate),t.rowCount=void 0===t.rowCount?0:t.rowCount+1,t.rowCount%2!=0&&f.default.classList(n).add("vp-altrow")}else f.default.classList(n).add("emptyrow");t.appendChild(n)}},e.prototype._updateAdStateInRow=function(t,e){var n=f.default.classList(t);"playing"===e?n.add("currad"):n.contains("currad")&&n.remove("currad");var i=t.querySelector(".pbstate");i&&((n=f.default.classList(i)).remove("st-"+t.customData.adstate),t.customData.adstate=e,n.add("st-"+e),i.innerHTML=e)},e.prototype._registerAdDataUpdateCallbacks=function(){this._adsDiagnostics.registerAdStateChangeListener(this._onAdStateChange.bind(this)),this._adsDiagnostics.registerAdDataAvailableListener(this._onAdDataAvailable.bind(this))},e.prototype._unregisterAdDataUpdateCallbacks=function(){this._adsDiagnostics.registerAdStateChangeListener(null),this._adsDiagnostics.registerAdDataAvailableListener(null)},e.prototype._onAdStateChange=function(t,e,n){if(this._adsInfoArea){var i=this._adsInfoArea.querySelector("[apbid="+t+"]");i&&this._updateAdStateInRow(i,e)}},e.prototype._onAdDataAvailable=function(t){this._drawAdInfoTables(),this._oldUuid=t.clipId},e.prototype._handleHTML5Info=function(t){this._isHTML5()?(t=t||this._rendererController&&this._rendererController.getActiveRenderer())&&(this._videoNode=t.node,this._toggleHTML5Info(!0)):this._toggleHTML5Info(!1)},e.prototype._renderHostingInfo=function(){var t=this._node.querySelector(".vp-opensimsim-hosting"),e=window.VDMS,n=e&&e.VideoPlatform&&e.VideoPlatform.PlayerHosting||"local";t&&(t.innerHTML=JSON.stringify(n,void 0,2))},e.prototype._renderPluginsInfo=function(){var t=this._pluginManager.getExternalPlugins(),e=this._node.querySelector(".vp-opensimsim-plugins"),n="",i=function(e){t.hasOwnProperty(e)&&t[e].forEach(function(t){n+="<div><span class='vp-details'>"+e+": </span>"+t.mimetype+" - "+t.version+"</div>"})};for(var r in t)i(r);e&&(e.innerHTML=n)},e.prototype._renderExpInfo=function(){var t=this._model.inputConfig,e=this._node.querySelector(".vp-opensimsim-expSiteName");e&&(e.innerHTML="<span class='vp-details'>site: </span>"+t.site);var n=this._node.querySelector(".vp-opensimsim-expName");n&&(n.innerHTML="<span class='vp-details'>expName: </span>"+t.expName);var i=this._node.querySelector(".vp-opensimsim-expBucketName");i&&(i.innerHTML="<span class='vp-details'>expBucketName: </span>"+t.expBucket);var r=this._node.querySelector(".vp-opensimsim-expType");r&&(r.innerHTML="<span class='vp-details'>expType: </span>"+t.expType)},e.prototype._onRendererSwitched=function(t){this._handleHTML5Info(t.active),this._updateBasicMediaItemInfo(),this._updateInfo()},e.prototype._isHTML5=function(){if(s.userAgent.tv)return!0;var t=this._model.playbackState.rendererType;return!(!s.userAgent.safari||t!==c.RendererType.HTML5_HLS&&t!==c.RendererType.HTML5_RAW)},e.prototype._renderGraph=function(t,e,n,i,r){for(var o=e.length-1,s=0,a=t[o],u=e[o],l=e[o],c=o-1;c>=0;c--)if(u=Math.min(u,e[c]),l=Math.max(l,e[c]),c>0&&a-t[c-1]>45){s=c;break}var d=t[s];u>0&&(u=0),u===l&&(l=u+1),n.save(),n.translate(40,r),n.scale((i-40)/45,-1*r/(l-u)),n.beginPath(),n.moveTo(0,e[s]-u);for(var h=s+1;h<e.length;h++)n.lineTo(t[h]-d,e[h]-u);n.restore(),n.lineWidth=1,n.lineCap="round",n.lineJoin="round",n.strokeStyle="white",n.stroke(),n.font="8pt Monospace",n.fillStyle="white",n.fillText(l.toFixed(1),0,10),n.fillText(u.toFixed(1),0,60)},e.prototype._generateHtmlFromKeyValues=function(t){var e="";return Object.keys(t).forEach(function(n){var i=t[n];e+="<div><span class='vp-details'>"+n+":</span> "+i+"</div>"}),e},e.prototype._generateConfigHTML=function(t,e){var n=this,i="";return Object.keys(t).forEach(function(r){var o=t[r];o&&"object"==typeof o?isNaN(r)?(i+="<div>"+r+" :</div>",i+='<div style="padding-left: 10px">'+n._generateConfigHTML(o)+"</div>"):i+="<div>"+n._generateConfigHTML(o,r)+"</div>":i+="<div>"+(e?e+" : ":"")+r+" : "+o+"</div>"}),i},e.prototype._generateHtmlTitle=function(t){return'<div class="vp-opensimsim-title">'+t+"</div>"},e.prototype._updatePlatformInfo=function(){var t={OS:s.userAgent.os,Mobile:s.userAgent.mobile,"User Agent":s.userAgent.ua};s.userAgent.mobile&&(t["Can Play Inline"]=h.default.canPlayInline,t["Autoplay Supported"]=h.default.autoplaySupported,h.default.autoplaySupported&&(t["Has Native Autoplay Support"]=h.default.hasNativeAutoplaySupport),t["Network Info Available"]=h.default.network.available,t["Network Connection Type (SAPI)"]=h.default.network.connectionType,t["Network Connection Type (User Agent)"]=s.capabilities.getConnectionType()||"n/a",t["Is Mobile Network"]="boolean"==typeof h.default.network.mobile?h.default.network.mobile:"n/a");var e=this._node.querySelector(".vp-opensimsim-platform");e&&(e.innerHTML=this._generateHtmlFromKeyValues(t))},e.prototype._updateBasicMediaItemInfo=function(){var t=this._model.playlist.getCurrentItem(),e=this._node.querySelector(".vp-opensimsim-uuid");e&&(e.innerHTML="<span class='vp-details'>UUID:</span> "+(t?t.id:"")),(e=this._node.querySelector(".vp-sessionId"))&&(e.innerHTML="<span class='vp-details'>SessionId:</span> "+(t?t.videoSession:"none")),this._isHTML5()&&!s.userAgent.samsung&&((e=this._node.querySelector(".vp-opensimsim-url"))&&(t&&t.isLive()?e.innerHTML="Master Playlist URL : "+this._videoNode.currentSrc:s.userAgent.tv&&(e.innerHTML="Current Source URL : "+this._videoNode.currentSrc)),(e=this._node.querySelector(".vp-opensimsim-config"))&&(e.innerHTML=this._generateHtmlTitle("Config")+this._generateConfigHTML(this._model.inputConfig)))},e.prototype._updateInfo=function(){var t=this,e=this._model.playlist.getCurrentItem(),n=this._playbackInfo,i=n.deliveryProtocol;e&&(i+=" / "+e.getType());var r=this._node.querySelector(".vp-opensimsim-graphs");r&&(r.innerHTML=""),Object.keys(this._history).forEach(function(e){var n=t._history[e].data;if(n.some(function(t){return p.isNumber(t)})){var i=document.createElement("div");f.default.classList(i).add("vp-opensimsim-graph");var o=document.createElement("div");o.innerHTML=t._history[e].title,i.appendChild(o);var s=document.createElement("canvas");s.width=150,s.height=60,i.appendChild(s),r&&r.appendChild(i);var a=s.getContext("2d");a&&t._renderGraph(t._timestamps,n,a,150,60)}});var o={"Total Quality Levels":n.qualityLevels,"Encoding Method":e&&e.streams.length>0?e.streams[0].rcMode:"na","Current Bitrate":n.currentStreamBitrate+" kbps",Protocol:i,CDN:e?e.getCDN():"","Recovery count":e?e.failoverCount:0,"Buffer Length":n.bufferLength+" secs","Frame Rate":n.frameRate,"Download Speed":n.currentKbps+" kbps","Dropped Frames":n.droppedFrames,"Media Size":n.mediaWidth+" x "+n.mediaHeight,"Buffering Count":0,"Total buffering time":"",Protected:n.drm?"Yes":"No"};e&&e.rendererType===c.RendererType.HTML5_HLS&&(o["Buffering Count"]=n.bufferingCount,o["Total buffering time"]=n.totalBufferingTime+" ms");var s=this._node.querySelector(".vp-opensimsim-detail");if(s&&(s.innerHTML=this._generateHtmlFromKeyValues(o)),s=this._node.querySelector(".vp-opensimsim-renderertype")){var a=this._model.playbackState.rendererType||"(no renderer yet)";a=a===c.RendererType.HTML5_HLS?a+" "+this._model.jshlsVersion:a,s.innerHTML="<span class='vp-details'>Renderer Type:</span> "+a}(s=this._node.querySelector(".vp-opensimsim-profile"))&&(s.innerHTML=JSON.stringify(this._model.inputConfig,void 0,2))},e.prototype._toggleHTML5Info=function(t){var e=this._node.querySelector(".vp-opensimsim-tv");if(this._unsubscribeToHTML5Events(),this._clearHTML5Timers(),e&&(e.innerHTML=""),t&&e){e.innerHTML+='<div class="vp-opensimsim-url"></div>',e.innerHTML+=this._generateHtmlTitle("HTML5 Video States");if(e.innerHTML+=this._generateHtmlFromKeyValues({"Current Time":'<span class="vp-opensimsim-time"></span>',"Playback State":'<span class="vp-opensimsim-playback"></span>',"Player State":'<span class="vp-opensimsim-state"></span>',"Buffering State":'<span class="vp-opensimsim-buffering"></span>',"Network State":'<span class="vp-opensimsim-network"></span>',"Ready State":'<span class="vp-opensimsim-ready"></span>',"Error State":'<span class="vp-opensimsim-error">none</span>'}),s.userAgent.tv&&p.isFunction(a.default)){e.innerHTML+=this._generateHtmlTitle("VTT Info");e.innerHTML+=this._generateHtmlFromKeyValues({"VTT Index":'<span class="vp-opensimsim-vttindex"></span>',"VTT URL":'<span class="vp-opensimsim-vtturl"></span>',"STREAM BITRATES":'<span class="vp-opensimsim-bitrate-list"></span>'})}e.innerHTML+='<div class="vp-opensimsim-config"></div>',this._setupHTML5Timers(),this._subscribeToHTML5Events()}},e.prototype._unsubscribeToHTML5Events=function(){var t=this;this._html5eventsSubscriptionKeys&&Object.keys(this._html5eventsSubscriptionKeys).forEach(function(e){t._eventBus.removeEventListener(e,t._html5eventsSubscriptionKeys[e])}),this._html5eventsSubscriptionKeys={}},e.prototype._subscribeToHTML5Events=function(){var t=this;this._html5eventsSubscriptionKeys[l.VideoEvent.TIMEUPDATE]=this._eventBus.addEventListener(l.VideoEvent.TIMEUPDATE,function(e){var n=t._node.querySelector(".vp-opensimsim-time");n&&(n.innerHTML=e)},this);["PLAYING","PAUSE","SEEKING","SEEKED"].forEach(function(e){t._html5eventsSubscriptionKeys[e]=t._eventBus.addEventListener(l.VideoEvent[e],function(){var n=t._node.querySelector(".vp-opensimsim-playback");n&&(n.innerHTML=e)},t)}),this._html5eventsSubscriptionKeys[l.VideoEvent.WAITING]=this._eventBus.addEventListener(l.VideoEvent.WAITING,function(e){var n=t._node.querySelector(".vp-opensimsim-buffering");n&&(n.innerHTML=e.value)},this);var e=[null,"aborted","network","decode","source not supported"];this._html5eventsSubscriptionKeys[l.VideoEvent.ERROR]=this._eventBus.addEventListener(l.VideoEvent.ERROR,function(n){var i=t._node.querySelector(".vp-opensimsim-error");i&&(i.innerHTML=e[n.code]||"")},this),s.userAgent.tv&&p.isFunction(a.default)&&(this._html5eventsSubscriptionKeys[u.VTT_SEGMENT_LOADED]=this._eventBus.addEventListener(u.VTT_SEGMENT_LOADED,function(e,n,i,r){var o=t._node.querySelector(".vp-opensimsim-vttindex");o&&(o.innerHTML=i);var s=t._node.querySelector(".vp-opensimsim-vtturl");s&&(s.innerHTML=r)},this),this._html5eventsSubscriptionKeys[u.CTV.GET_BITRATE_FOR_OPSS]=this._eventBus.addEventListener(u.CTV.GET_BITRATE_FOR_OPSS,function(e){var n=t._node.querySelector(".vp-opensimsim-bitrate-list");n&&(n.innerHTML="Bitrates : "+JSON.stringify(e))},this))},e.prototype._setupHTML5Timers=function(){var t=this;this._playerStateTimer=window.setInterval(function(){var e=t._node.querySelector(".vp-opensimsim-state");e&&(e.innerHTML=t._model.getState())},1e3);var e=["network empty","network idle","network loading","network no source"];if(!s.userAgent.samsung){this._networkStateTimer=window.setInterval(function(){var n=e[t._videoNode.networkState],i=t._node.querySelector(".vp-opensimsim-network");i&&(i.innerHTML=n)},1e3);var n=["have nothing","have metadata","have current data","have future data","have enough data"];this._readyStateTimer=window.setInterval(function(){var e=t._node.querySelector(".vp-opensimsim-ready");e&&(e.innerHTML=n[t._videoNode.readyState])},1e3)}},e.prototype._clearHTML5Timers=function(){this._playerStateTimer&&window.clearInterval(this._playerStateTimer),this._networkStateTimer&&window.clearInterval(this._networkStateTimer),this._readyStateTimer&&window.clearInterval(this._readyStateTimer)},e.prototype._logAdDiagnosticsById=function(t){var e=this._adsDiagnostics.getAdDiagnosticsById(t);this._logger("[ad diagnostics]",e)},e}(o.default);e.default=y},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-opensimsim' style='display: none'>"),i.b("\n"+n),i.b("    <button class='vp-opensimsim-close-btn vp-close-btn'></button>"),i.b("\n"+n),i.b("    <div class='vp-opensimsim-info'>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title'>VDMS PLAYER</div>"),i.b("\n"+n),i.b("        <div>"),i.b(i.v(i.f("version",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("        <div class='vp-nav'>"),i.b("\n"+n),i.b("            <span class='vp-profile-btn'>Profile</span>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title'>CURRENT MEDIA</div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-renderertype'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-uuid'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-lmsid'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-tv'></div>"),i.b("\n"+n),i.b("        <br>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-graphs'></div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-detail'></div>"),i.b("\n"+n),i.b("        <div class='vp-swf-ready'></div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title vp-section-expand-context vp-expanded'>CONTEXT</div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-current-context vp-hide'>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-expSiteName'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-expBucketName'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-expName'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-expType'></div>"),i.b("\n"+n),i.b("            <div><span class='vp-details'>Page SpaceID: </span>"),i.b(i.v(i.f("spaceId",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("            <div class='vp-sessionId'></div>"),i.b("\n"+n),i.b("            <div class='vp-videoSpaceId'></div>"),i.b("\n"+n),i.b("            <div class='vp-opensimsim-platform'></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        \x3c!-- <div class='vp-profile-btn'>Profile</div> --\x3e"),i.b("\n"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title vp-section-expand-plugins vp-expanded'>PLUGINS</div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-current-plugins vp-hide'>"),i.b("\n"+n),i.b("            <pre class='vp-opensimsim-plugins'></pre>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title vp-section-expand-config vp-expanded'>PLAYER CONFIG</div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-current-config vp-hide'>"),i.b("\n"+n),i.b("            <pre class='vp-opensimsim-profile'></pre>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title vp-section-expand-hosting vp-expanded'>HOSTING CONFIG</div>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-hosting-config vp-hide'>"),i.b("\n"+n),i.b("            <pre class='vp-opensimsim-hosting'></pre>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"),i.b("\n"+n),i.b("        \x3c!-- <div class='vp-opensimsim-title'>AD CONTEXT</div> --\x3e"),i.b("\n"+n),i.b("        <div class='vp-inviewport'>"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-title vp-section-expand-ads vp-expanded'>AD HISTORY CONTEXT</div>"),i.b("\n"+n),i.b("        \x3c!-- <br> --\x3e"),i.b("\n"+n),i.b("        <div class='vp-adinfo-section vp-hide' style=\"padding-bottom: 15px;\">"),i.b("\n"+n),i.b("            <div class='vp-details'>Midroll Cache Stats: <div class='vp-midrollcache-data'></div></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"+n),i.b("        <div class='vp-adsinfopanel-adsinfo vp-hide'><div style='text-align: center;'>YVAP disabled!!</div></div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"),i.b("\n"+n),i.b("    <section class='ad-info-table vp-table'>"),i.b("\n"),i.b("\n"+n),i.b("        <div class='vp-opensimsim-adinfo-uuid'>"),i.b("</div>"),i.b("\n"+n),i.b("        <header class='vp-tablerow'>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>position</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>dur</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>adPbId</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>crId</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>vCrId</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>bId</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>State</div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell vp-tablecell-header'>log</div>"),i.b("\n"+n),i.b("        </header>"),i.b("\n"+n),i.b("        <div class='vp-tablerow'>"),i.b("\n"+n),i.b("            <div class='adposition vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='addur vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='adPbId vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='crId vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='vCrId vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='bId vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='pbstate vp-tablecell'></div>"),i.b("\n"+n),i.b("            <div class='vp-tablecell'><button class='linkbtn'>log</button></div>"),i.b("\n"+n),i.b("        </div>"),i.b("\n"),i.b("\n"+n),i.b("    </section>"),i.b("\n"),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(28),u=n(0),l=n(22),c=n(249);!function(t){t.UI_INTERACT="start-screen-ui-interact",t.START_SCREEN_CLICK="start-screen-click"}(r=e.StartScreenEvent||(e.StartScreenEvent={}));var d=function(t){function e(e){var n=t.call(this,"StartScreen")||this;return n._eventBus=e,n}return i(e,t),e.prototype.create=function(t,e){var n=this,i=e.startScreenConfig,o={showTitle:i.showTitle&&t.title,showButton:i.showButton,showDescription:i.showDescription&&t.description,showProvider:!1},d=t.thumbnail;this.node=u.default.render(c,{item:t,config:o,width:e.uiState.width,height:e.uiState.height,imageSrc:d,strings:a.default,show:e.uiState&&e.uiState.isCSSLoaded});return this._startScreenTap=new l.default(this.node,function(){var t=function(){n.publish(r.START_SCREEN_CLICK),n.publish(r.UI_INTERACT,{srcElement:"startScreen"})};s.userAgent.htc_one?window.setTimeout(t,500):t()}),this.node},e.prototype.destroy=function(){this._startScreenTap&&(this._startScreenTap.destroy(),this._startScreenTap=null)},e}(o.default);e.StartScreen=d},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-start-screen "),i.s(i.f("show",t,e,1),t,e,1,0,0,"")||i.b("vp-vis-hidden vp-disp-none"),i.b("' tabindex='-1'>"),i.b("\n"+n),i.b("    <img class='vp-start-screen-image' src='"),i.b(i.v(i.f("imageSrc",t,e,0))),i.b("' width='"),i.b(i.v(i.f("width",t,e,0))),i.b("' height='"),i.b(i.v(i.f("height",t,e,0))),i.b("' aria-hidden='true'>"),i.b("\n"+n),i.s(i.d("config.showButton",t,e,1),t,e,0,231,350,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("        <div class='vp-start-screen-button' tabindex='0' aria-label='"),i.b(i.v(i.d("strings.PLAY_VIDEO",t,e,0))),i.b("' role='button'></div>"),i.b("\n"+n)}),t.pop()),i.b("    <div class='vp-start-screen-bar-wrapper'>"),i.b("\n"+n),i.b("        <div class='vp-start-screen-bar' tabindex='-1'>"),i.b("\n"+n),i.s(i.d("config.showProvider",t,e,1),t,e,0,511,618,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("                <h4 class='vp-start-screen-provider' tabindex='1'>"),i.b(i.v(i.d("item.provider.name",t,e,0))),i.b("</h4>"),i.b("\n"+n)}),t.pop()),i.s(i.d("config.showTitle",t,e,1),t,e,0,676,772,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("                <h3 class='vp-start-screen-title' tabindex='2'>"),i.b(i.v(i.d("item.title",t,e,0))),i.b("</h3>"),i.b("\n"+n)}),t.pop()),i.s(i.d("config.showDescription",t,e,1),t,e,0,833,939,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("                <p class='vp-start-screen-description' tabindex='3'>"),i.b(i.v(i.d("item.description",t,e,0))),i.b("</p>"),i.b("\n"+n)}),t.pop()),i.b("        </div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(11),o=n(116),s=n(2),a=n(7),u=n(28),l=n(0),c=n(22),d=n(251),h=function(){function t(t,e,n,i){this._eventBus=t,this._view=e,this._model=n,this._pluginManager=i,this._eventBus.addEventListener(s.PLAYER_DIMENSION_CHANGE,this._onDimensionChange,this),this._eventBus.addEventListener(s.FULLSCREEN_CHANGE,this._onFullscreenChange,this),this._playlistController=this._view.getPlaylistController(),this._onPlaylistItemTapBound=this._onPlaylistItemTap.bind(this)}return t.prototype.create=function(t){if(-1===[r.PLAYLIST_POS.BOTTOM,r.PLAYLIST_POS.RIGHT,r.PLAYLIST_POS.HIDDEN].indexOf(t))return null;var e="vp-playlist-mode-"+t;this._count=t===r.PLAYLIST_POS.HIDDEN?r.PLAYLIST_HIDDEN_COUNT_PER_PAGE:r.PLAYLIST_COUNT_PER_PAGE,this._playlisItemIdx=0,this._positionLeft=0,this._scrollLeft=0,this._taps=[],this._theme=this._getTheme(t),this._mode=t;var n=l.default.render(d,{strings:u,modeClass:e,isHiddenMode:t===r.PLAYLIST_POS.HIDDEN||!1,theme:this._theme,streamModeClass:""});return this._model.uiState&&this._model.uiState.isCSSLoaded&&l.default.classList(n).remove("vp-vis-hidden"),this._updatePlaylistNodes(n),this._renderPlaylist(),this._bindEvents(!0),n},t.prototype.syncView=function(){this._renderPlaylist()},t.prototype.upNextBtnTapHandler=function(){if(!this._model.playlist.isEndOfPlaylist()){var t=this._model.playlist.position+1,e=this._model.playlist.getMediaItemAt(t).id;this._eventBus.publish(o.PlaylistViewEvents.UI_INTERACT,{srcElement:"ctrl-next-click"}),this._eventBus.publish(o.PlaylistViewEvents.UI_INTERACT,{srcElement:"ui_pl_nxt_clk"}),this._eventBus.publish(s.RELATED_ITEM_CLICK,e,t,!1);var n=this._mode===r.PLAYLIST_POS.RIGHT;this._setCurrentVideoItemUI(this._mode,n)}},t.prototype.destroy=function(){var t=this;(this._destroyPageTaps(),this._taps&&this._taps.forEach(function(t){t.destroy()}),this._taps=[],this._playlist)&&this._getItemNodes().forEach(function(e){e.removeEventListener("tap",t._onPlaylistItemTapBound)})},t.prototype.setPlaylistViewSize=function(){this._listWidth=this._playlistStrip.offsetWidth,this._numPgItems=Math.floor(this._listWidth/r.PLAYLIST_ITEM_WIDTH),this._pgNextDisabled=this._numPgItems>=this._model.playlist.getItems().length,this._syncPgBtns()},t.prototype.onMediaItemPlaybackStarted=function(){var t;t=this._view.getFullscreen()?r.PLAYLIST_POS.HIDDEN:this._mode,this._setCurrentVideoItemUI(t,!0)},t.prototype._onPlaylistItemTap=function(t){l.default.classList(this._node).remove("open");var e=this._getItemNodes().indexOf(t.target);this._eventBus.publish(s.RELATED_ITEM_CLICK,t.target.getAttribute("data-id"),e,!1),this._eventBus.publish(o.PlaylistViewEvents.UI_INTERACT,{srcElement:"ui_pl_thmb_clk"}),this.onMediaItemPlaybackStarted()},t.prototype._renderPlaylist=function(){var t=this._model.playlist.getItems();t&&0!==t.length&&(this._positionLeft=0,this._scrollLeft=0,this._taps=[],this._playlist.parentElement.scrollLeft=0,this._pgPrevDisabled=!0,this._pgNextDisabled=!1,this._syncPgBtns(),this._renderPlaylistItems(t))},t.prototype._syncPgBtns=function(){this._pgPrevDisabled?l.default.classList(this._pgPrev).add("disabled"):l.default.classList(this._pgPrev).remove("disabled"),this._pgNextDisabled?l.default.classList(this._pgNext).add("disabled"):l.default.classList(this._pgNext).remove("disabled")},t.prototype._bindEvents=function(t){var e=this;if(this._pgPrevTap=new c.default(this._pgPrev),this._pgPrev.addEventListener("tap",function(){e._onPageBtnTap(!1)}),this._pgNextTap=new c.default(this._pgNext),this._pgNext.addEventListener("tap",function(){e._onPageBtnTap(!0)}),this._mode===r.PLAYLIST_POS.RIGHT&&!i.userAgent.mobile){var n=function(t){var n=e._playlist.scrollTop,i=e._playlist.scrollHeight,r=e._playlist.offsetHeight,o="DOMMouseScroll"===t.type?-40*t.detail:t.wheelDelta,s=o>0,a=function(){return t.stopPropagation(),t.preventDefault(),t.returnValue=!1,!1};return!s&&-o>i-r-n?(e._playlist.scrollTop=i,a()):!(s&&o>n)||(e._playlist.scrollTop=0,a())};this._playlistStrip.addEventListener("mousewheel",n),this._playlistStrip.addEventListener("DOMMouseScroll",n)}},t.prototype._renderPlaylistItems=function(t){var e=this,n=t&&t.filter(function(t){var n='.vp-playlist-item[data-id="'+t.id+'"]';return!e._playlist.querySelector(n)})||[],i=this._pluginManager.getPlugin(a.PluginType.PLAYLIST,this._model.playlistUIConfig.mimetype);if(i){var r=i.create(this._mode,n,u),o=document.createDocumentFragment();r.forEach(function(t,n){e._taps.push(new c.default(t,n)),t.addEventListener("tap",e._onPlaylistItemTapBound),o.appendChild(t)}),this._playlist.appendChild(o),this.setPlaylistViewSize(),l.default.classList(this._playlistContainer).remove("vp-pl-loading"),this._view.getFullscreen()||this._setCurrentVideoItemUI(this._mode,!1)}},t.prototype._onPageBtnTap=function(t){var e=this._view.getFullscreen();if((this._mode!==r.PLAYLIST_POS.RIGHT||e)&&(!this._pgNextDisabled||!this._pgPrevDisabled)){this._eventBus.publish(s.UP_NEXT_PG_CLICK);var n="next-";n=t?n+"right":n+"left",this._eventBus.publish(o.PlaylistViewEvents.UI_INTERACT,{srcElement:n}),this._listWidth=this._playlist.offsetWidth;var i=((this._playlist.children.length>12?this._playlist.children.length:10)-this._numPgItems)*r.PLAYLIST_ITEM_WIDTH,a=this._scrollLeft%this._listWidth;if(!this._pgPrevDisabled||t)!t&&a&&(a=-1*(this._listWidth-a)),this._scrollLeft>=i&&t||(this._positionLeft=t?this._positionLeft-this._listWidth:this._positionLeft+this._listWidth,this._scrollLeft=t?this._scrollLeft+this._listWidth:this._scrollLeft-this._listWidth,this._positionLeft+=a,this._scrollLeft-=a,this._scrollLeft>0?this._pgPrevDisabled=!1:this._pgPrevDisabled=!0,this._scrollLeft<=i&&this._scrollLeft>0?this._pgNextDisabled=!0:this._pgNextDisabled=!1,this._syncPgBtns(),this._playlistStrip.scrollLeft=this._scrollLeft)}},t.prototype._setCurrentVideoItemUI=function(t,e){var n=this._model.playlist.getCurrentItem(),i=n&&n.id,o=this._playlist.querySelector(".vp-currently-playing"),s='.vp-playlist-item[data-id="'+i+'"]',a=this._playlist.querySelector(s);if(o&&(l.default.classList(o).remove("vp-currently-playing"),t!==r.PLAYLIST_POS.RIGHT)){var u=o.querySelector(".vp-pl-title"),c=o.querySelector(".vp-pl-dur"),d=o.querySelector(".vp-playlist-item-gradient"),h=o.querySelector(".vp-now-playing");l.default.classList(u).remove("vp-show"),l.default.classList(c).remove("vp-hide"),l.default.classList(d).remove("vp-playlist-item-gradient-duration"),l.default.classList(h).remove("vp-show")}if(a){var p=a.offsetLeft,f=a.offsetWidth;if(l.default.classList(a).add("vp-currently-playing"),t!==r.PLAYLIST_POS.RIGHT){var _=a.querySelector(".vp-pl-dur"),m=a.querySelector(".vp-playlist-item-gradient"),y=a.querySelector(".vp-now-playing");l.default.classList(_).add("vp-hide"),l.default.classList(m).add("vp-playlist-item-gradient-duration"),l.default.classList(y).add("vp-show");var v=f+r.PLAYLIST_ITEM_MARGIN_RIGHT;p=t===r.PLAYLIST_POS.HIDDEN?p+v:p,this._playlist.parentElement.scrollLeft=p}else if(t===r.PLAYLIST_POS.RIGHT&&e){var g=a.offsetTop;this._playlist.scrollTop=g-5}this._playlist.parentElement.scrollLeft>0?this._pgPrevDisabled=!1:this._pgPrevDisabled=!0,this._syncPgBtns()}},t.prototype._getTheme=function(t){var e,n=this._model.playlistUIConfig&&this._model.playlistUIConfig.theme||"dark";switch(t){case r.PLAYLIST_POS.BOTTOM:case r.PLAYLIST_POS.RIGHT:e=n;break;case r.PLAYLIST_POS.HIDDEN:e="dark";break;default:e="dark"}return e},t.prototype._updatePlaylistNodes=function(t){this._node=t,this._playlist=t.querySelector(".vp-playlist-strip-list"),this._playlistStrip=t.querySelector(".vp-playlist-strip"),this._playlistContainer=t,this._pgPrev=t.querySelector(".vp-playlist-pg-btn-prev"),this._pgNext=t.querySelector(".vp-playlist-pg-btn-next"),this._playlistLoader=t.querySelector(".vp-pl-loader-bg")},t.prototype._onFullscreenChange=function(){var t,e,n,i,o,s,a=this,u=this._view.getFullscreen(),d=this._view.getContentNode();if(this._onDimensionChange(),this._playlistController.isPlaylistShown()&&this.setPlaylistViewSize(),this._mode===r.PLAYLIST_POS.BOTTOM||this._mode===r.PLAYLIST_POS.RIGHT){if(o=d.querySelector(".vp-upnext-playlist"),t=d.querySelector(".vp-playlist-mode-hidden"),e=d.querySelector(".vp-playlist-mode-"+this._mode),n=t.querySelector(".vp-playlist-strip-list"),i=e.querySelector(".vp-playlist-strip-list"),u)n.innerHTML=i.innerHTML,i.innerHTML="",l.default.classList(o).remove("hide"),l.default.classList(t).remove("vp-pl-loading"),this._updatePlaylistNodes(t),this._playlistController&&this._playlistController.attachUpNextMouseEvents(),setTimeout(function(){a._setCurrentVideoItemUI(r.PLAYLIST_POS.HIDDEN,!0)},500);else{i.innerHTML=n.innerHTML,n.innerHTML="",s=this._mode===r.PLAYLIST_POS.RIGHT,l.default.classList(o).add("hide"),this._updatePlaylistNodes(e),this._playlistController&&this._playlistController.detachUpNextMouseEvents();var h=this._playlist.querySelector(".vp-currently-playing");h&&l.default.classList(h).remove("vp-hide"),setTimeout(function(){a._setCurrentVideoItemUI(a._mode,s)},500)}this._destroyPageTaps(),this._taps&&this._taps.forEach(function(t){t.destroy()}),this._taps=[],this._bindEvents(!1),this._getItemNodes().forEach(function(t){a._taps.push(new c.default(t)),t.addEventListener("tap",a._onPlaylistItemTapBound)})}},t.prototype._onDimensionChange=function(){var t=this;this._playlistController.isPlaylistShown()&&(this._scrollLeft=0,this._positionLeft=0,setTimeout(function(){t.setPlaylistViewSize()},1e3))},t.prototype._destroyPageTaps=function(){this._pgNextTap&&this._pgNext&&(this._pgNextTap.destroy(),this._pgPrev.removeEventListener("tap",this._onPageBtnTap),this._pgNext.removeEventListener("tap",this._onPageBtnTap))},t.prototype._getItemNodes=function(){return Array.prototype.slice.call(this._playlist.querySelectorAll(".vp-playlist-item"),0)},t}();e.default=h},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div tabindex='0' class='vp-playlist-container "),i.b(i.v(i.f("modeClass",t,e,0))),i.b(" vp-pl-loading vp-playlist-theme-"),i.b(i.v(i.f("theme",t,e,0))),i.b(" "),i.b(i.v(i.f("streamModeClass",t,e,0))),i.b(" vp-vis-hidden'>"),i.b("\n"+n),i.s(i.f("isHiddenMode",t,e,1),t,e,0,156,216,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b('    <div class="vp-upnext-title">'),i.b(i.v(i.d("strings.UP_NEXT",t,e,0))),i.b("</div>"),i.b("\n"+n)}),t.pop()),i.b('    <div class="vp-playlist-pg-btn vp-playlist-pg-btn-prev disabled"></div>'),i.b("\n"+n),i.b('    <div class="vp-playlist-pg-btn vp-playlist-pg-btn-next"></div>'),i.b("\n"+n),i.b('    <div class="vp-playlist-strip">'),i.b("\n"+n),i.b('        <ul class="vp-playlist-strip-list strip-animate">'),i.b("\n"),i.b("\n"+n),i.b("        </ul>"),i.b("\n"+n),i.b('        <div class="vp-pl-loader-bg"></div>'),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b('    <div class="vp-pl-loader vp-spinner-icon"></div>'),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div tabindex='0' class='vp-content vp-hide-controls' aria-label='Yahoo Video Player'>"),i.b("\n"+n),i.b("    <div class='vp-main' tabindex='0'></div>"),i.b("\n"+n),i.b("    <div class='vp-docked-meta'>"),i.b("\n"+n),i.b('        <div class="vp-docked-title"></div>'),i.b("\n"+n),i.b('        <div class="vp-docked-provider"></div>'),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}})},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-end-screen vp-end-replay'>"),i.b("\n"+n),i.b('    <div class="vp-end-rep-icon"></div>'),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(6),a=n(43),u=n(9),l=n(2),c=n(15),d=n(4),h=n(0);!function(t){t.METADATA_AVAILABLE="metadata-available",t.SOURCE_AVAILABLE="metadata-source-available",t.SOURCE_LOAD_FAILED="metadata-source-load-failed",t.API_INFO_AVAILABLE="api-info-available"}(o=e.MetadataEvent||(e.MetadataEvent={}));var p=function(t){function e(e,n){var i=t.call(this,"MetadataController")||this;return i._commandManager=e,i._model=n,i._mediaStore=n.mediaStore,i}return i(e,t),e.prototype.destroy=function(){this._commandManager.removeRelatedCommands(a.CmdName.CMD_METADATA_LOAD),this._commandManager.removeRelatedCommands(a.CmdName.CMD_SOURCE_METADATA_LOAD),t.prototype.destroy.call(this)},e.prototype.loadItem=function(t){var e=t.rawItemData;this._commandManager.executeCommand(a.CmdName.CMD_METADATA_LOAD,r({mimetype:t.mimetype,mediaItemDataArr:[e]},this._getCommandData()),this)},e.prototype.loadSource=function(t){var e=t.rawItemData;this.publish(l.PROFILE_START,l.METRICS.CMS_SOURCE_REQUEST),this._commandManager.executeCommand(a.CmdName.CMD_SOURCE_METADATA_LOAD,r({mimetype:t.mimetype,mediaItemDataArr:[e]},this._getCommandData()),this)},e.prototype.recover=function(t){var e=t.rawItemData;this._commandManager.executeCommand(a.CmdName.CMD_SOURCE_METADATA_LOAD,r({mimetype:t.mimetype,mediaItemDataArr:[e],recovering:!0},this._getCommandData()),this)},e.prototype.loadMetadata=function(){var t=this,e=this._model.playlist.getItems();if(e&&e.length){var n=[];e.forEach(function(t){n.push(t.rawItemData)});var i={};n.forEach(function(t){var e=t.mimetype;i[e]||(i[e]=[]),i[e].push(t)}),this._isCurrentItemLoading(n)&&this.publish(l.PROFILE_START,l.METRICS.CMS_REQUEST),Object.keys(i).forEach(function(e){t._commandManager.executeCommand(a.CmdName.CMD_METADATA_LOAD,r({mimetype:e,mediaItemDataArr:i[e]},t._getCommandData()),t)})}},e.prototype.onSourceMetadataLoadComplete=function(t,e){var n=this;this.publish(l.PROFILE_END,l.METRICS.CMS_SOURCE_REQUEST),this._commandManager.removeCommand(t),this._model.playlist.update(e).forEach(function(t){t.setSourceState(c.SourceState.HAS_DATA),n.publish(o.SOURCE_AVAILABLE,t)})},e.prototype.onSourceMetadataLoadProgress=function(t,e,n){n&&this._model.playlist.updateMediaItemsSourceState(e,n)},e.prototype.onSourceMetadataLoadError=function(t,e){this._commandManager.removeCommand(t);var n=h.default.createErr(u.ErrorGroup.Configuration,this._model.playbackState,e.category,e.subcategory,e.message);this.publish(o.SOURCE_LOAD_FAILED,n)},e.prototype.onMetadataLoadComplete=function(t,e){var n=this;this._commandManager.removeCommand(t),this._transformMetadata(e),this._isCurrentItemLoading(e)&&this.publish(l.PROFILE_END,l.METRICS.CMS_REQUEST),this._model.playlist.update(e).forEach(function(t){t.setState(c.ItemState.HAS_DATA),n.publish(o.METADATA_AVAILABLE,t)})},e.prototype.onMetadataLoadProgress=function(t,e,n){n&&this._model.playlist.updateMediaItemsState(e,n)},e.prototype.onMetadataLoadInfo=function(t,e){e&&this.publish(o.API_INFO_AVAILABLE,e)},e.prototype.onSourceMetadataLoadInfo=function(t,e){e&&this.publish(o.API_INFO_AVAILABLE,e)},e.prototype.onMetadataLoadError=function(t,e){this._commandManager.removeCommand(t);var n=h.default.createErr(u.ErrorGroup.Configuration,this._model.playbackState,e.category,e.subcategory,e.message);this.publish(l.ERROR,n)},e.prototype._isCurrentItemLoading=function(t){var e=this._model.playlist.getCurrentItem();return e&&t&&t.length&&t.some(function(t){return t.id===e.id})},e.prototype._getCommandData=function(){var t=this._model,e={autoplay:t.autoplay,gdprConsent:t.consent,rendererCapabilities:t.capabilities,rendererTypes:t.rendererTypes,thumbnailDimensions:t.thumbnailDimensions},n=this._model.playlist.getCurrentItem();return n&&(n.videoSession&&(e.sessionId=n.videoSession),d.isNumber(n.tryCount)&&(e.tryCount=n.tryCount),d.isNumber(n.failoverCount)&&(e.failoverCount=n.failoverCount)),e},e.prototype._transformMetadata=function(t){t&&t.forEach(function(t){t.metadata&&(t.metadata.title=h.default.sanitizeAndUnescape(t.metadata.title),t.metadata.description=h.default.sanitizeAndUnescape(t.metadata.description))})},e}(s.default);e.MetadataController=p},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(256),u=n(257),l=n(11),c=n(9),d=n(2),h=n(26),p=n(38),f=n(62),_=n(259),m=n(18),y=n(19),v=n(4),g=n(0);!function(t){t.PLAY_CAST="play-cast",t.PAUSE_CAST="pause-cast",t.SEEK_CAST="seek-cast",t.SRC_SWITCHING="playback-src-switching",t.SRC_SWITCHED="playback-src-switched",t.CLICK="playback-video-click",t.PAUSE="playback-paused",t.PLAYBACK_ERROR="playback-error",t.LOADEDMETADATA="playback-loadedmetadata",t.LOADEDDATA="playback-loadeddata",t.STALLED="playback-stalled",t.LOADSTART="playback-loadstart",t.PLAY="playback-play",t.PLAYING="playback-playing",t.SEEKING="playback-seeking",t.SEEKED="playback-seeked",t.VOLUMECHANGE="playback-volumechange",t.WAITING="playback-waiting",t.TIMEUPDATE="playback-timeupdate",t.END_FULLSCREEN="playback-endfullscreen",t.PLAYBACK_START_NOT_ALLOWED="playback-start-not-allowed",t.PLAYBACK_START_BLOCKED="playback-play-blocked",t.PLAYBACK_RESUME="playback-resume",t.PLAYBACK_RESUME_VPAID="playback-resume-vpaid",t.PLAYBACK_PAUSE_VPAID="playback-pause-vpaid",t.PLAYBACK_NEW_ATTEMPT="playback-new-attempt",t.PLAYBACK_REQUEST="playback-request",t.PLAYBACK_LOADING="playback-loading",t.PLAYBACK_PAUSING="playback-pausing",t.PLAYBACK_STARTED="playback-started",t.PLAYBACK_ERROR_NO_VALID_STREAM="playback-error-no-valid-stream",t.PLAYBACK_ERROR_BEFORE_METADATA_READY="playback-error-before-metadata-ready",t.PLAYBACK_ERROR_INCONSISTENT_METADATA="playback-error-inconsistent-metadata",t.PLAYBACK_ERROR_NO_RENDERER="playback-error-no-renderer",t.PLAYBACK_SYNC_VIEW="playback-sync-view",t.PLAYBACK_PROGRESS="playback-progress",t.PLAYBACK_NEED_MEDIA_ITEM_METADATA="playback-need-media-item-metadata",t.PLAYBACK_NEED_MEDIA_ITEM_SOURCE="playback-need-media-item-source",t.MODE_CHANGE="playback-mode-change",t.RENDERER_SWITCH="playback-renderer-switch",t.RENDERER_TIMEOUT="playback-renderer-timeout",t.RENDERER_CREATED="playback-renderer-created",t.SET_PLAYLIST_POSITION_BEFORE="playback-set-playlist-position-before",t.STOP_CURRENT_PLAYBACK="playback-stop-current-playback",t.MEDIA_ITEM_IS_LOADED="playback-media-item-is-loaded",t.MEDIA_ITEM_CURRENT="playback-media-item-current",t.MEDIA_ITEM_PLAYBACK_STARTED="playback-media-item-started",t.MEDIA_ITEM_PLAYBACK_RESUMED="playback-media-item-resumed",t.MEDIA_ITEM_PLAYBACK_PROGRESS="playback-media-item-progress",t.MEDIA_ITEM_PLAYBACK_ENDED="playback-media-item-ended",t.MEDIA_ITEM_PLAYBACK_STOPPED="playback-media-item-stopped",t.MEDIA_ITEM_ERROR="playback-media-item-error",t.PLAYLIST_POSITION_HAS_CHANGED="playback-playlist-position-has-changed",t.PLAYLIST_NO_MORE_ITEM_TO_PLAY="playback-playlist-no-more-item-to-play",t.AD_BREAK_STARTED="playback-ad-break-started",t.AD_BREAK_ENDED="playback-ad-break-ended",t.AD_BREAK_NEED_RESOLVE="playback-ad-break-need-resolve",t.AD_BREAK_ITEM_CURRENT="playback-ad-break-item-current",t.AD_BREAK_ITEM_PLAYBACK_STARTED="playback-ad-break-item-started",t.AD_BREAK_ITEM_PLAYBACK_SKIPPED="playback-ad-break-item-skipped",t.AD_BREAK_ITEM_PLAYBACK_RESUMED="playback-ad-break-item-resumed",t.AD_BREAK_ITEM_PLAYBACK_PROGRESS="playback-ad-break-item-progress",t.AD_BREAK_ITEM_PLAYBACK_ENDED="playback-ad-break-item-ended",t.AD_BREAK_ITEM_PLAYBACK_STOPPED="playback-ad-break-item-stopped",t.AD_BREAK_ITEM_ERROR="playback-ad-break-item-error",t.CREATE_OVERLAY_CONTAINER="playback-create-overlay-container",t.AD_METRICS="ad-metrics"}(r=e.PlaybackEvent||(e.PlaybackEvent={}));var E=function(t){function e(e,n,i){var r=t.call(this,"PlaybackController")||this;return r._firstClickToStartPlayCalled=!1,r._firstPlay=!0,r._hasNotifiedItemStarted=!1,r._playbackProgressCalled=!1,r._waitMetadataBeforePlay=!1,r._waitTapRestrictionRemoved=!1,r._mediaUnloaded=!1,r._model=e,r._eventBus=n,r._playbackStarted={},r._rendererController=new u.RendererController(e,n,i),r._setupRendererControllerEvents(),r._playbackState=new _.default,r._setupPlaybackState(),r._adPlaybackController=new a.AdPlaybackController(e,i),r._setupAdPlaybackControllerEvents(),r._eventBus.addEventListener(d.PAGE_VISIBILITY_CHANGED,r._handleVisibilityChange,r),r}return i(e,t),e.prototype.startPlayback=function(t){var e=this;if(void 0===t&&(t=null),this._model.playbackState.shouldPlay=!0,this._model.getState()===m.default.VIDEO)return this._playCurrent(0),void this._adPlaybackController.resumeClientAdStartTimer();var n=this._model.playlist.getCurrentItem();if(n&&this._model.rendered&&!this._model.playbackState.attemptingPlayback())if(this._model.autoplay||this._firstClickToStartPlayCalled||(this._firstClickToStartPlayCalled=!0,this.publish(d.PROFILE_START,d.METRICS.CLICK_TO_START)),this._model.castState&&this._model.castState.connected)this.publish(r.PLAY_CAST);else{if(t&&(this._model.requestType=t.type,t.action&&g.default.isValidRequestAction(t.action)&&(this._model.requestAction=t.action)),!this._isPlaybackStartAllowed())return this._model.showStartScreen=!0,this._model.autoplay=!1,void this.enterInitState();this._model.waitingForUserTap?this._waitTapRestrictionRemoved||(this._waitTapRestrictionRemoved=!0,this._waitToPlaySubscriptionKey=this.once(d.TOUCH_TO_PLAY_RESTRICTION_REMOVED,function(){e._waitTapRestrictionRemoved=!1,e.startPlayback(t)},this)):(this._spinnerMonitorStartTime=null,this._model.isPaused()?this._model.playbackState.isVpaidAdPlaying()?(this._model.setPaused(!1),this.publish(r.PLAYBACK_RESUME_VPAID)):this.playCurrent():y.default.autoplaySupported||n.fetchFinished()?this._startNewPlayback(n):this.publish(r.PLAYBACK_ERROR_BEFORE_METADATA_READY))}},e.prototype.playCurrent=function(t){this._rendererController.play(t)},e.prototype.handleSourceAvailable=function(t){var e=this._model.playlist.getCurrentItem();e&&e.equals(t)&&this._loadSourceOfMediaItem(t)},e.prototype.handleAdBreakResolved=function(t,e){this._adPlaybackController.handleAdBreakResolved(t,e)},e.prototype.skipAd=function(){this._rendererController.skip()},e.prototype.handleCriticalError=function(t){this._clearPlaybackTimeout(),this._model.playbackState.criticalError=t,this._handleMediaItemPlaybackStopped(),this._rendererController.endVideo(),this._rendererController.stopMedia()},e.prototype.pause=function(t){if(this._model.playbackState.shouldPlay=!1,this._model.playbackState.hasRendererPlayCalled&&this._model.rendered){var e=this._model.castState;if(e&&e.connected&&!e.paused)this.publish(r.PAUSE_CAST);else{if(this._waitToPlaySubscriptionKey)return this.removeEventListener(d.TOUCH_TO_PLAY_RESTRICTION_REMOVED,this._waitToPlaySubscriptionKey),void delete this._waitToPlaySubscriptionKey;if(t&&(this._model.requestType=t.type,g.default.isValidRequestAction(t.action)&&(this._model.requestAction=t.action)),this._model.playbackState.isVpaidAdPlaying())return this.publish(r.PLAYBACK_PAUSE_VPAID),void this._onActiveRendererPause();this._model.playbackState.attemptingPlayback()&&(this.pauseCurrent(),this._clearPlaybackTimeout())}}},e.prototype.pauseCurrent=function(){this._rendererController.pause()},e.prototype.seek=function(t){this._model.rendered&&(this._model.castState&&this._model.castState.connected?this.publish(r.SEEK_CAST,t):this._model.getState()===m.default.VIDEO&&this._rendererController.seek(t))},e.prototype.seekCurrent=function(t){if(this._model.rendered&&this._model.getState()===m.default.VIDEO){var e=this._getRawSeekSeconds(t);this.seek(e)}},e.prototype.syncPlaybackState=function(){this._rendererController.syncPlaybackState()},e.prototype.getRawCurrentTime=function(){return this._rendererController.getCurrentTime()},e.prototype.getCurrentTime=function(){return this._currentTime||0},e.prototype.preload=function(t){if(this._model.rendered){var e=this._model.playlist.getCurrentItem();v.isNumber(t)&&e&&t>0&&t<=e.duration&&this._rendererController.preload(t)}},e.prototype.getCurrentDate=function(){return this._rendererController.getCurrentDate()},e.prototype.rewindAfterEnd=function(t){this._rendererController.rewindAfterEnd(t)},e.prototype.getRawDuration=function(){return this._rendererController.getDuration()},e.prototype.getDuration=function(){var t=this.getPlayingItem();if(!t){var e=this._model.playlist.getCurrentItem();return e?e.duration:NaN}if(t instanceof f.default)return t.duration;if(t instanceof p.default){if(t.instream)return t.duration;var n=this.getRawDuration();return isNaN(n)?t.duration:n}return NaN},e.prototype.enterFS=function(){this._rendererController.enterFS()},e.prototype.exitFS=function(){this._rendererController.exitFS()},e.prototype.showAirplayTargetMenu=function(){this._rendererController.showAirplayTargetMenu()},e.prototype.setQuality=function(t){this._rendererController.setQuality(t)},e.prototype.setVolume=function(t){var e=this._model.volume;this._model.volume=t,this._rendererController.setVolume(t),this._eventBus.publish(d.CTRL_VOLUME,e),this._eventBus.publish(d.API.PLAYER_VOLUME_CHANGE,t)},e.prototype.setMute=function(t){this._model.mute=t,this._rendererController.setMute(t),this._eventBus.publish(d.API.PLAYER_MUTE_CHANGE,t)},e.prototype.setAudioLanguage=function(t){this._rendererController.setAudioLanguage(t)},e.prototype.stopMedia=function(){this._rendererController.stopMedia()},e.prototype.enableMobileNativeCC=function(t){this._rendererController.enableMobileNativeCC(t)},e.prototype.resumeContinuousPlay=function(t){this._model.continuousPlay=!0;var e={skipWatchedVideos:this._model.skipWatchedVideos};if(this._model.getState()===m.default.END){var n=this._model.playlist.getNextPosition(this._model.continuousPlay,this._model.loop,e);-1!==n&&this.setPlaylistPosition(n,!0,t)}},e.prototype.setPlaylistPosition=function(t,e,n){if(this._model.rendered){var i=this._model.playlist,o=i.getCurrentItem(),s=i.getMediaItemAt(t);if(o&&o.equals(s)&&this._model.playbackState.isInitializing())console.warn("There is already ongoing attempt to play same item");else{this.stopCurrentPlayback(),this._model.errors=[],this._model.playbackState.criticalError=null,i.position=t;var a=i.getCurrentItem();a?(this.initNewPlayback(a),e&&this.startPlayback(n),this.publish(r.PLAYLIST_POSITION_HAS_CHANGED,a)):this.publish(r.PLAYLIST_NO_MORE_ITEM_TO_PLAY),this.publish(r.PLAYBACK_SYNC_VIEW)}}},e.prototype.initNewPlayback=function(t){this.enterInitState(),this._requestVideo(t)},e.prototype.enterInitState=function(){this._model.setState(m.default.INIT),this._resetPlaybackStates(),this.publish(r.PLAYBACK_SYNC_VIEW)},e.prototype.getPlayingItem=function(){var t=this._getLoadedPlayableItem();return t instanceof f.default&&this._adPlaybackController.getPlayingInstreamAd()||t},e.prototype.stopCurrentPlayback=function(){var t=this.getPlayingItem();t instanceof p.default?(this.publish(r.AD_BREAK_ITEM_PLAYBACK_STOPPED,t),this._adPlaybackController.handleAdBreakItemEnded(t)):t instanceof f.default&&(this.publish(r.MEDIA_ITEM_PLAYBACK_STOPPED,t),t.position=0,this._model.playbackState.looped=!1,this._model.startTime=NaN,this._handleMediaItemPlaybackStopped(t));var e=this._model.playlist.getCurrentItem();this._setCurrentMediaType(e&&e.getStreamType()||""),this._resetPlaybackStarted(),this._rendererController.endVideo(),this._rendererController.stopMedia()},e.prototype.getActiveRenderer=function(){return this._rendererController.getActiveRenderer()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this._adPlaybackController.destroy()},e.prototype._setLoadingMode=function(t){this._resetPlaybackStates(),this._model.setState(m.default.VIDEO),this._model.setLoading(!0),this.publish(r.PLAYBACK_LOADING,t)},e.prototype._setPauseMode=function(){this._model.setPaused(!0),this._model.setLoading(!1),this.publish(r.PLAYBACK_PAUSING)},e.prototype._startNewPlayback=function(t){return this._currentMediaItem=t,this._resetPlayedFlags(),this._resetPlaybackStates(),this.publish(d.PROFILE_START,d.METRICS.PLAYBACK_START),t.isContainer()?(this._adPlaybackController.startTracking(t),t.adBreaks&&t.adBreaks.length||!t.adConfig?t.hasNativeAd()?this._adPlaybackController.playClientAdBreaks(h.AdBreakType.NATIVE):t.hasStreams()?this._startPlaying(t):console.warn("No playable media in item's container"):(this._adPlaybackController.prepareAdsForItem(t),this._adPlaybackController.playClientAdBreaks(h.AdBreakType.NATIVE)),void this.publish(r.PLAYBACK_SYNC_VIEW)):t.hasSource()?(this._startPlaying(t),void this.publish(r.PLAYBACK_SYNC_VIEW)):(this._model.setState(m.default.WAITING),this._model.setLoading(!0),this._waitMetadataBeforePlay=!0,this.publish(r.PLAYBACK_NEED_MEDIA_ITEM_SOURCE,t),void this.publish(r.PLAYBACK_SYNC_VIEW))},e.prototype._getLoadedPlayableItem=function(){var t=this._rendererController.getActiveRenderer();return t?t.getPlayableItem():null},e.prototype._loadSourceOfMediaItem=function(t){var e=this;if(t.hasLiveStreams()&&t.hasLiveStateForVod())this.publish(r.PLAYBACK_ERROR_INCONSISTENT_METADATA);else{if(this._model.playbackState.loadedItem=t,this._adPlaybackController.prepareAdsForItem(t),t.hasMetadata())this._model.playbackState.attemptingPlayback()||this._mediaUnloaded||this._model.firstCriticalError||this.enterInitState();else if(!(this._model&&this._model.playlist&&this._model.playlist.getCurrentItem()).equals(t))return;var n=t.position||this._model.startTime;this._rendererController.prepareNextRenderer(t,function(i){if(i)return e._clearPlaybackTimeout(),void e.publish(r.PLAYBACK_ERROR_NO_RENDERER,i);if(e._hasNotifiedItemStarted=!1,e._rendererController.preloadNextRenderer(t,n)){if(e._waitMetadataBeforePlay){if(e._waitMetadataBeforePlay=!1,!e._isPlaybackStartAllowed())return void e.publish(r.PLAYBACK_START_NOT_ALLOWED);e._startPlaying(t)}}else e.publish(r.PLAYBACK_ERROR_NO_VALID_STREAM)}),this.publish(r.MEDIA_ITEM_IS_LOADED,t),this._mediaUnloaded=!1}},e.prototype._startPlaying=function(t){t===this._model.playlist.getCurrentItem()&&(this._hasCriticalError()||(this._model.setState(m.default.VIDEO),this._model.setLoading(!0),this.publish(r.PLAYBACK_REQUEST,t.id),this._model.playbackState.hasStartedPlayback=!0,this._firstPlay=!1,this._adPlaybackController.startTracking(t),this.publish(d.PROFILE_START,d.METRICS.AD_PLUGIN),this._adPlaybackController.playClientAdBreaks(h.AdBreakType.PREROLL),this.publish(r.PLAYBACK_SYNC_VIEW)))},e.prototype._startPlayingItem=function(t){var e=this;if(this._resetPlayedFlags(),t===this._model.playlist.getCurrentItem()){this._setCurrentMediaType(t.getStreamType()),this.publish(d.PROFILE_END,d.METRICS.AD_PLUGIN),t.restartIfNeeded();var n=this._model.startTime||0;t.isLongForm()&&isNaN(this._model.startTime)&&t.position>0&&(this._model.isResumingFromSavedPosition=!0,n=t.position),this._rendererController.prepareNextRenderer(t,function(i){i?e._clearPlaybackTimeout():e._rendererController.preloadNextRenderer(t,n)?e._rendererController.switchAndPlayNextRenderer(n):e.publish(r.PLAYBACK_ERROR_NO_VALID_STREAM)})}},e.prototype._startPlayingAdBreakItem=function(t){var e=this;this.publish(r.AD_BREAK_ITEM_CURRENT,t),t.streams&&0!==t.streams.length?this._rendererController.prepareNextRenderer(t,function(n){e._rendererController.preloadNextRenderer(t)?e._rendererController.switchAndPlayNextRenderer():e._handleAdBreakItemError(t)}):this._handleAdBreakItemError(t,new Error("No valid streams found"))},e.prototype._playCurrent=function(t){this.playCurrent(t),this._model.playbackState.hasCurrentItemPlayed||this._setLoadingMode(t),this._model.playbackState.hasRendererPlayCalled=!0},e.prototype._isPlaybackStartAllowed=function(){if(!this._firstPlay)return!0;var t=this._model.playlist.getCurrentItem();return!(this._model.requestType===l.REQUEST_TYPES.AUTOPLAY&&this._model.autoplay&&t&&t.blockAutoplay)&&(!s.userAgent.mobile||this._isMobilePlaybackStartAllowed())},e.prototype._isMobilePlaybackStartAllowed=function(t){return void 0===t&&(t={}),!(this._model.requestType!==l.REQUEST_TYPES.CLICK&&!this._model.isAutoplayAllowed())},e.prototype._resetPlayedFlags=function(){this._model.playbackState.hasCurrentItemPlayed=!1,this._model.playbackState.hasRendererPlayCalled=!1},e.prototype._hasCriticalError=function(){for(var t=0,e=this._model.errors;t<e.length;t++){var n=e[t];if(n.category||n.subcategory)return n}return null},e.prototype._handleIfCriticalAdError=function(t){if(t&&t.category===c.E_WARNING&&t.subcategory===c.WARNING_CODES.E_FLASH_CRASHED){var e=this._model.playbackState.rendererType;return e&&delete this._model.adsRendererTypes[e],!0}return!1},e.prototype._clearPlaybackTimeout=function(){this._playbackTimeout&&clearTimeout(this._playbackTimeout)},e.prototype._setupRendererControllerEvents=function(){var t=this;this._rendererController.on(u.RendererControllerEvent.RENDERER_SWITCH,function(e,n){t.publish(r.RENDERER_SWITCH,e,n)},this),this._rendererController.on(u.RendererControllerEvent.RENDERER_TIMEOUT,function(){t.publish(r.RENDERER_TIMEOUT)},this),this._rendererController.on(u.RendererControllerEvent.RENDERER_CREATED,function(e){t.publish(r.RENDERER_CREATED,e)},this),this._rendererController.on(u.RendererControllerEvent.RENDERER_READY_TO_PLAY,function(e){t._model.playbackState.shouldPlay?t._playCurrent(e):(t._setPauseMode(),t._adPlaybackController.pauseClientAdStartTimer())},this),this._handleActiveRendererEvents()},e.prototype._setupPlaybackState=function(){this._playbackState.mute=this._model.config.mute||!1,this._model.setPlaybackState(this._playbackState)},e.prototype._resetPlaybackStarted=function(){this._playbackStarted={}},e.prototype._requestVideo=function(t){t&&(t.mayUpdateVideoSession(),t.useVideoSession(),this._eventBus.publish(d.VIDEO_REQUEST,!1),this.publish(r.MEDIA_ITEM_CURRENT,t))},e.prototype._resetPlaybackStates=function(){this._model.setPaused(!1),this._model.setSeeking(!1),this._model.setLoading(!1)},e.prototype._handleMediaItemPlaybackStopped=function(t){t&&(t.position=0,this._model.playbackState.previousItem=t,this.rewindAfterEnd(t.isLive())),this._model.setState(m.default.END),this._model.endVideo(),this._resetPlaybackStates()},e.prototype._handleNewPlaybackStarted=function(t){this._playbackProgressCalled=!1,this._playbackStarted[t.id]=!0,t instanceof f.default?this.publish(r.MEDIA_ITEM_PLAYBACK_STARTED,t,this.getCurrentTime()):t instanceof p.default&&this._adPlaybackController.handleAdBreakItemPlaybackStarted(t),this._model.startTime=NaN},e.prototype._handleAdBreakItemError=function(t,e){this.publish(r.AD_BREAK_ITEM_ERROR,t,e),this._adPlaybackController.handleAdBreakItemError(t)},e.prototype._onActiveRendererClick=function(){this.publish(r.CLICK)},e.prototype._onActiveRendererPlaying=function(){this.publish(d.PROFILE_END,d.METRICS.AD_PLUGIN),this._model.playbackState.hasCurrentItemPlayed=!0;var t=this.getPlayingItem();this._playbackState.playingItem=t,this._model.playbackState.videoLoading()&&(s.userAgent.android||(this._model.setLoading(!1),this.publish(r.PLAYBACK_SYNC_VIEW))),this._model.isPaused()&&(this._model.setPaused(!1),this._longPauseTimeout&&clearTimeout(this._longPauseTimeout),t instanceof f.default?this.publish(r.MEDIA_ITEM_PLAYBACK_RESUMED,t):t instanceof p.default&&this.publish(r.AD_BREAK_ITEM_PLAYBACK_RESUMED,t)),t&&!this._playbackStarted[t.id]&&this._handleNewPlaybackStarted(t),this.publish(r.PLAYING,t)},e.prototype._onActiveRendererTimeupdate=function(t){var e=t.currentTime,n=t.duration,i=t.buffered;s.userAgent.android&&!this._playbackProgressCalled&&(this._model.setLoading(!1),this.publish(r.PLAYBACK_SYNC_VIEW),this._playbackProgressCalled=!0),this._adPlaybackController.updatePlaybackProgress({currentTime:e,playingItem:this._getLoadedPlayableItem()});var o=this.getPlayingItem();if(this._playbackState.playingItem=o,o&&(this._updateCurrentTime(o,e),o instanceof f.default&&(o.position=e),v.isNumber(e)&&v.isNumber(n)&&!(e>n+1))){if(o.getDuration()||o.isLive()||o.setDuration(n),this._playbackState.duration=this.getDuration(),this._model.isLoading()&&(!s.userAgent.safari||s.userAgent.safari<6)){this._spinnerMonitorStartTime?e-this._spinnerMonitorStartTime>=1.5&&(this._spinnerMonitorStartTime=null,this._model.setLoading(!1),this.publish(r.PLAYBACK_SYNC_VIEW)):this._spinnerMonitorStartTime=e}else this._spinnerMonitorStartTime=null;var a={playingItem:o,currentTime:e,duration:n,buffered:i};o instanceof f.default?this.publish(r.MEDIA_ITEM_PLAYBACK_PROGRESS,a):o instanceof p.default&&this.publish(r.AD_BREAK_ITEM_PLAYBACK_PROGRESS,a),this.publish(r.PLAYBACK_PROGRESS,{currentItem:o,currentTime:e,duration:n,buffered:i}),this.publish(r.TIMEUPDATE,t)}},e.prototype._updateCurrentTime=function(t,e){var n;t instanceof f.default&&(n=this._getCurrentTimeForMediaItem(t,e)),t instanceof p.default&&(n=this._getCurrentTimeForAdBreakItem(t,e)),this._currentTime=n,this._playbackState.currentTime=n},e.prototype._getCurrentTimeForMediaItem=function(t,e){for(var n=e,i=t.adBreaks,r=i&&i.length||0,o=0;o<r;o++){var s=i[o];if(!(e>=s.startOffset))break;s.adBreakItems.forEach(function(t){t.instream&&(n-=t.duration)})}return n},e.prototype._getCurrentTimeForAdBreakItem=function(t,e){var n=e,i=t.adBreak;if(t.instream){n=e-i.startOffset;for(var r=i.adBreakItems,o=0,s=r.length;o<s;o++){var a=r[o];if(t.adBreakItemId===a.adBreakItemId)break;a.instream&&(n-=a.duration)}}return n},e.prototype._getRawSeekSeconds=function(t){var e=this._getLoadedPlayableItem(),n=t;if(e instanceof f.default)for(var i=e.adBreaks,r=i&&i.length||0,o=0;o<r;o++){var s=i[o];if(!(s.startOffset<=n))break;s.adBreakItems.forEach(function(t){t.instream&&(n+=t.duration)})}return n},e.prototype._onActiveRendererSeeking=function(t){this._model.setLoading(!0),this.publish(r.SEEKING,t)},e.prototype._onActiveRendererSeeked=function(t){this._model.setLoading(!1),this._spinnerMonitorStartTime=null,this.publish(r.SEEKED,t)},e.prototype._handleMediaItemEnded=function(t){this._resetPlaybackStarted();var e=this._model.playlist,n=e.getCurrentItem();if(n&&n===t){this._adPlaybackController.onMediaItemPlaybackEnded(t);var i=this._model.continuousPlay,o=this._model.loop,s={playlistLoop:this._model.playlistLoop,skipWatchedVideos:this._model.skipWatchedVideos,looped:!1,ended:!1},a=e.getNextPosition(i,o,s);if(this.publish(r.MEDIA_ITEM_PLAYBACK_ENDED,t,s),this._model.stopAtLastFrame)return this.pauseCurrent(),void this._onActiveRendererPause();if(this._handleMediaItemPlaybackStopped(n),-1!==a){var u=void 0;(i||o)&&(u={type:l.REQUEST_TYPES.CONTINUOUS,action:l.REQUEST_TYPES.AUTOPLAY}),this.setPlaylistPosition(a,i||o,u),this._model.playbackState.looped=s.looped}else this._model.skipWatchedVideos&&(this._model.continuousPlay=!1),this._eventBus.publish(d.API.PLAYLIST_COMPLETE);this.publish(r.PLAYBACK_SYNC_VIEW)}},e.prototype._onActiveRendererEnded=function(){var t=this.getPlayingItem();t instanceof f.default?this._handleMediaItemEnded(t):t instanceof p.default&&this._adPlaybackController.handleAdBreakItemEnded(t)},e.prototype._onActiveRendererPause=function(){var t=this;this._model.getState()!==m.default.INIT&&this._model.getState()!==m.default.END&&(this._model.setPaused(!0),this._shouldHandleLongPause()&&(this._longPauseTimeout=window.setTimeout(function(){t._unloadMedia(),clearTimeout(t._longPauseTimeout)},2e4)),this.publish(r.PAUSE))},e.prototype._onActiveRendererError=function(t){var e=this.getPlayingItem();e instanceof f.default?this.publish(r.MEDIA_ITEM_ERROR,e,t):e instanceof p.default&&this._handleAdBreakItemError(e,t)},e.prototype._onActiveRendererWaiting=function(t){if(t){if(!s.userAgent.tv){var e=t.value;this._model.setLoading(e),this.publish(r.PLAYBACK_SYNC_VIEW)}this.publish(r.WAITING,t)}},e.prototype._onActiveRendererStalled=function(){this.publish(r.STALLED)},e.prototype._onActiveRendererLoadStart=function(){this.publish(r.LOADSTART)},e.prototype._onActiveRendererPlay=function(){this._shouldHandleLongPause()&&this._reloadMedia(),this.publish(r.PLAY)},e.prototype._onActiveRendererVolumeChange=function(){this.publish(r.VOLUMECHANGE)},e.prototype._onActiveRendererLoadedData=function(){this.publish(r.LOADEDDATA)},e.prototype._onActiveRendererLoadedMetadata=function(){this.publish(r.LOADEDMETADATA)},e.prototype._onActiveRendererSrcSwitching=function(){this.publish(r.SRC_SWITCHING)},e.prototype._onActiveRendererSrcSwitched=function(){this.publish(r.SRC_SWITCHED)},e.prototype._onActiveRendererPlayBlocked=function(){this.publish(r.PLAYBACK_START_BLOCKED)},e.prototype._onActiveRendererSkipped=function(){var t=this.getPlayingItem();t instanceof p.default&&this.publish(r.AD_BREAK_ITEM_PLAYBACK_SKIPPED,t)},e.prototype._onActiveRenderEndFullscreen=function(){this.publish(r.END_FULLSCREEN)},e.prototype._handleActiveRendererEvents=function(){var t=this._rendererController;t.on(u.ActiveRendererEvent.CLICK,this._onActiveRendererClick,this),t.on(u.ActiveRendererEvent.PLAYING,this._onActiveRendererPlaying,this),t.on(u.ActiveRendererEvent.TIMEUPDATE,this._onActiveRendererTimeupdate,this),t.on(u.ActiveRendererEvent.PAUSE,this._onActiveRendererPause,this),t.on(u.ActiveRendererEvent.SEEKING,this._onActiveRendererSeeking,this),t.on(u.ActiveRendererEvent.SEEKED,this._onActiveRendererSeeked,this),t.on(u.ActiveRendererEvent.ENDED,this._onActiveRendererEnded,this),t.on(u.ActiveRendererEvent.ERROR,this._onActiveRendererError,this),t.on(u.ActiveRendererEvent.WAITING,this._onActiveRendererWaiting,this),t.on(u.ActiveRendererEvent.STALLED,this._onActiveRendererStalled,this),t.on(u.ActiveRendererEvent.LOADSTART,this._onActiveRendererLoadStart,this),t.on(u.ActiveRendererEvent.PLAY,this._onActiveRendererPlay,this),t.on(u.ActiveRendererEvent.VOLUMECHANGE,this._onActiveRendererVolumeChange,this),t.on(u.ActiveRendererEvent.LOADEDDATA,this._onActiveRendererLoadedData,this),t.on(u.ActiveRendererEvent.LOADEDMETADATA,this._onActiveRendererLoadedMetadata,this),t.on(u.ActiveRendererEvent.SRC_SWITCHING,this._onActiveRendererSrcSwitching,this),t.on(u.ActiveRendererEvent.SRC_SWITCHED,this._onActiveRendererSrcSwitched,this),t.on(u.ActiveRendererEvent.PLAYBACK_START_BLOCKED,this._onActiveRendererPlayBlocked,this),t.on(u.ActiveRendererEvent.SKIPPED,this._onActiveRendererSkipped,this),t.on(u.ActiveRendererEvent.END_FULLSCREEN,this._onActiveRenderEndFullscreen,this)},e.prototype._setupAdPlaybackControllerEvents=function(){var t=this;this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_NEED_RESOLVE,function(e,n){t.publish(r.AD_BREAK_NEED_RESOLVE,e,n)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_PLAY,function(e){t._startPlayingAdBreakItem(e)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_CLIENT_COMPLETED,function(e,n){switch(e){case h.AdBreakType.PREROLL:t._startPlayingItem(n);break;case h.AdBreakType.NATIVE:}},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_CLIENT_TIMEOUT,function(e,n){switch(e){case h.AdBreakType.PREROLL:t._startPlayingItem(n)}},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_STARTED,function(e){t.publish(r.AD_BREAK_STARTED,e)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_ENDED,function(e){var n=e.type;switch(e.setActive(!1),n){case h.AdBreakType.PREROLL:e.adBreakItems[e.adBreakItems.length-1].instream&&t.publish(r.MEDIA_ITEM_PLAYBACK_STARTED,e.mediaItem);break;case h.AdBreakType.NATIVE:t._handleMediaItemEnded(e.mediaItem)}t.publish(r.AD_BREAK_ENDED,e)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_STARTED,function(e){t._playbackState.playingItem=e,e.instream&&t.publish(r.AD_BREAK_ITEM_CURRENT,e),console.log("[debug][VDMS] AD Started"),t.publish(r.AD_BREAK_ITEM_PLAYBACK_STARTED,e)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_ITEM_ENDED,function(e){console.log("[debug][VDMS] AD Finished"),t.publish(r.AD_BREAK_ITEM_PLAYBACK_ENDED,e)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_BREAK_SKIP,function(e,n){if(n){var i=e.startOffset+e.duration;i=(1e4*i+11)/1e4,t.seek(i)}},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.AD_METRICS,function(e){t.publish(r.AD_METRICS,e)},this),this._adPlaybackController.on(a.AdPlaybackControllerEvent.CREATE_OVERLAY_CONTAINER,function(e){t.publish(r.CREATE_OVERLAY_CONTAINER,e)},this)},e.prototype._handleVisibilityChange=function(t){this._shouldHandleLongPause()&&(t?this._model.isPaused()||this._reloadMedia():this._unloadMedia())},e.prototype._unloadMedia=function(){this._mediaUnloaded||(console.log("[debug] PlaybackController media unload"),this._longPauseTimeout&&clearTimeout(this._longPauseTimeout),this.stopMedia(),this._mediaUnloaded=!0)},e.prototype._reloadMedia=function(){this._mediaUnloaded&&(console.log("[debug] PlaybackController media reload"),this._eventBus.publish(d.LIVE_RELOAD_MEDIA))},e.prototype._shouldHandleLongPause=function(){var t=this._model.playlist.getCurrentItem();return this._model.liveUnloadOnPause&&s.userAgent.safari&&s.userAgent.iosVersion&&t&&t.isLive()},e.prototype._setCurrentMediaType=function(t){this._model.playbackState.currentMediaType=t},e}(o.default);e.PlaybackController=E},function(t,e,n){"use strict";var i,r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var o,s=n(6),a=n(41),u=n(69),l=n(26),c=n(7),d=n(45),h=n(4),p=n(0);!function(t){t.AD_BREAK_NEED_RESOLVE="ad-break-need-resolve",t.AD_BREAK_ITEM_NEED_SOURCE="ad-break-item-need-source",t.AD_BREAK_ITEM_PLAY="ad-break-item-play",t.AD_BREAK_STARTED="ad-break-started",t.AD_BREAK_ENDED="ad-break-ended",t.AD_BREAK_ITEM_STARTED="ad-break-item-started",t.AD_BREAK_ITEM_ENDED="ad-break-item-ended",t.AD_BREAK_SKIP="ad-break-skip",t.AD_CLIENT_COMPLETED="ad-client-completed",t.AD_CLIENT_TIMEOUT="ad-client-timeout",t.CREATE_OVERLAY_CONTAINER="create-overlay-container",t.AD_METRICS="ad-metrics",t.AD_DIAGNOSTICS="ad-diagnostics"}(o=e.AdPlaybackControllerEvent||(e.AdPlaybackControllerEvent={})),e.AdAnalyticsEventMap=((i={})[a.AdPlayerEvent.PLAYING]="ad_dlv",i[a.AdPlayerEvent.PLAY_REQUESTED]="ad_beg",i[a.AdPlayerEvent.PLAY_COMPLETE]="ad_comp",i[a.AdPlayerEvent.PLAYBACK_ERROR]="ad_err",i);var f=function(t){function n(e,n){var i=t.call(this,"AdPlaybackController")||this;return i._model=e,i._pluginsManager=n,i._playingInstreamAdBreakItem=null,i._toResolveAdBreaks={},i._clientAdBreakItems={},i._adPlugin=null,i._stopListeningAdPluginEvents=p.default.noop,i._adBreakFetchInProgress={},i._clientAdStartTimer=new d.default(1e3*i._model.config.ads.timeout.start,1),i._timerEvtKey=i._clientAdStartTimer.addEventListener(d.default.TIMER_EVENT,i._onClientAdTimeout,i),i}return r(n,t),n.prototype.prepareAdsForItem=function(t){if(t.adConfig&&t.adConfig.mimetype){var e=this._pluginsManager.getPlugin(c.PluginType.AD,t.adConfig.mimetype);if(this._setActiveAdPlugin(e),this._adPlugin&&h.isAdResolverAdPlugin(this._adPlugin)){var n=t.key;this._adBreakFetchInProgress[n]=t,this._adPlugin.fetchAdBreaks({refId:n,config:t.adConfig.value})}}else this._setActiveAdPlugin(null)},n.prototype.startTracking=function(t){var e=this;this._cleanUpAdClientTracking(),this._mediaItem=t,this._toResolveAdBreaks={},this._clientAdBreakItems={},this._triggeredAdBreaks=[],this._triggeredAdBreakItems=[],this._waitToResolveAdBreakIds={},this._nativeAdBreakItems=[],this._instreamAdBreakItemsData=[],this._playedAdBreakItemIds=[],this._currentAdBreakItem=null,this._hasOngoingAttemptedAdPlayback=!1,this._playingInstreamAdBreakItem=null,this._clientAdTimeoutType=null,this._clientAdTimeoutItem=null,this._mediaItem.adBreaks&&(this._clientAdStartTimer.reset(),this._mediaItem.adBreaks.forEach(function(t){e._classifyAdBreak(t)}))},n.prototype.resolveAdBreaks=function(t){var e=this,n=this._toResolveAdBreaks[t];h.isAdResolverAdPlugin(this._adPlugin)&&n&&0!==n.length&&n.forEach(function(t){e._waitToResolveAdBreakIds[t.adBreakId]||(e._waitToResolveAdBreakIds[t.adBreakId]=t.mediaItem,e._adPlugin.resolveAdBreak(t.rawItemData))})},n.prototype.getPlayingInstreamAd=function(){return this._playingInstreamAdBreakItem||null},n.prototype.updatePlaybackProgress=function(t){var e=t.currentTime;if(t.playingItem===this._mediaItem){var n=this._findInstreamAdBreakItemAtTime(e);if(n!==this._playingInstreamAdBreakItem){var i=this._playingInstreamAdBreakItem;this._playingInstreamAdBreakItem=n,this._handleInstreamAdBreakItemItemSwitch(i,n)}}},n.prototype.onMediaItemPlaybackEnded=function(t){},n.prototype.playClientAdBreaks=function(t){var e=this;this._model.playbackState.currentMediaType=t;var n=Object.keys(this._adBreakFetchInProgress).map(function(t){return e._adBreakFetchInProgress[t]}).some(function(t){return t===e._mediaItem}),i=this._mediaItem;if(this._startClientAdStartTimer(t,i),!n){var r=this._toResolveAdBreaks[t]||[],s=this._clientAdBreakItems[t]||[];if(0===r.length&&0===s.length)return this._cleanUpAdClientTracking(),void this.publish(o.AD_CLIENT_COMPLETED,t,i);this.resolveAdBreaks(t),this._playNextClientAdBreakItem(t)}},n.prototype.pauseClientAdStartTimer=function(){this._clientAdStartTimer&&this._clientAdStartTimer.stop()},n.prototype.resumeClientAdStartTimer=function(){this._clientAdStartTimer&&0!==this._clientAdStartTimer.startTime&&this._clientAdStartTimer.start()},n.prototype.handleAdBreakResolved=function(t,e){delete this._waitToResolveAdBreakIds[e.adBreakId],t===this._mediaItem&&(this._classifyAdBreak(e),this._hasOngoingAttemptedAdPlayback||this._playNextClientAdBreakItem(e.type))},n.prototype.handleAdBreakItemPlaybackStarted=function(t){t.instream||(this._stopClientAdStartTimer(),this.publish(o.AD_BREAK_ITEM_STARTED,t))},n.prototype.handleAdBreakItemEnded=function(t){this._onAdBreakItemEnded(t,!1,!1)},n.prototype.handleAdBreakItemError=function(t){this._onAdBreakItemEnded(t,!0,!1)},n.prototype.stopCurrentPlayback=function(t){this.publish(o.AD_BREAK_ENDED,t&&t.adBreak||null)},n.prototype.destroy=function(){t.prototype.destroy.call(this),this._clientAdStartTimer.removeEventListener(d.default.TIMER_EVENT,this._timerEvtKey),this._clientAdStartTimer.destroy(),this._adBreakFetchInProgress=null},n.prototype._onAdBreakItemEnded=function(t,e,n){if(!t.instream){this._adDlvBeaconFired=!1,e&&this.publish(o.AD_METRICS,{evt:"ad_err"}),this.publish(o.AD_BREAK_ITEM_ENDED,t),this._currentAdBreakItem=null;var i=t.adBreak;i.type===l.AdBreakType.NATIVE||this._model.loop||(n||t===i.adBreakItems[i.adBreakItems.length-1])&&this.publish(o.AD_BREAK_ENDED,i),n||this._playNextClientAdBreakItem(i.type)}},n.prototype._findInstreamAdBreakItemAtTime=function(t){for(var e=0,n=this._instreamAdBreakItemsData.length-1;e<=n;){var i=e+Math.floor((n-e)/2),r=this._instreamAdBreakItemsData[i];if(t>=r.startOffset&&t<r.endOffset)return r.adBreakItem;t>r.endOffset?e=i+1:n=i-1}return null},n.prototype._handleInstreamAdBreakItemItemSwitch=function(t,e){if(e&&!t){if(e===e.adBreak.adBreakItems[0]){if(!e.adBreak.active)return this._playingInstreamAdBreakItem=null,void this.publish(o.AD_BREAK_SKIP,e.adBreak,!0);this.publish(o.AD_BREAK_STARTED,e.adBreak)}this.publish(o.AD_BREAK_ITEM_STARTED,e)}!e&&t&&(this.publish(o.AD_BREAK_ITEM_ENDED,t),t===t.adBreak.adBreakItems[t.adBreak.adBreakItems.length-1]&&this.publish(o.AD_BREAK_ENDED,t.adBreak)),e&&t&&(this.publish(o.AD_BREAK_ITEM_ENDED,t),this.publish(o.AD_BREAK_ITEM_STARTED,e))},n.prototype._classifyAdBreak=function(t){var e=this,n=t.type;this._toResolveAdBreaks[n]=this._toResolveAdBreaks[n]||[],this._clientAdBreakItems[n]=this._clientAdBreakItems[n]||[],t.hasResolved()?t.adBreakItems.forEach(function(i,r){if(i.instream){var o=0===r?t.startOffset:e._instreamAdBreakItemsData[e._instreamAdBreakItemsData.length-1].endOffset;e._instreamAdBreakItemsData.push({adBreakItem:i,startOffset:o,endOffset:o+i.duration})}else e._clientAdBreakItems[n].push(i)}):this._toResolveAdBreaks[n].push(t)},n.prototype._cleanUpAdClientTracking=function(){this._stopClientAdStartTimer(),this._mediaItem&&delete this._adBreakFetchInProgress[this._mediaItem.key],this._waitToResolveAdBreakIds={},this._hasOngoingAttemptedAdPlayback=!1},n.prototype._playNextClientAdBreakItem=function(t){var e,n=this,i=this._clientAdBreakItems[t],r=i.filter(function(t){return-1===n._playedAdBreakItemIds.indexOf(t.adBreakItemId)});if(!(e=t===l.AdBreakType.NATIVE&&this._model.loop?i[0]:r[0]))return Object.keys(this._waitToResolveAdBreakIds).length>0?void 0:(this._cleanUpAdClientTracking(),void this.publish(o.AD_CLIENT_COMPLETED,t,this._mediaItem));this._hasOngoingAttemptedAdPlayback=!0,this._playedAdBreakItemIds.push(e.adBreakItemId),e===e.adBreak.adBreakItems[0]&&this.publish(o.AD_BREAK_STARTED,e.adBreak),this._currentAdBreakItem=e,this.publish(o.AD_BREAK_ITEM_PLAY,e)},n.prototype._startClientAdStartTimer=function(t,e){this._stopClientAdStartTimer(),this._clientAdTimeoutType=t,this._clientAdTimeoutItem=e,this._clientAdStartTimer.start()},n.prototype._onClientAdTimeout=function(){var t=this._clientAdTimeoutType,e=this._clientAdTimeoutItem;this._currentAdBreakItem&&this._onAdBreakItemEnded(this._currentAdBreakItem,!0,!0),this._cleanUpAdClientTracking(),this.publish(o.AD_CLIENT_TIMEOUT,t,e)},n.prototype._stopClientAdStartTimer=function(){this._clientAdStartTimer.reset(),this._clientAdTimeoutType=null,this._clientAdTimeoutItem=null},n.prototype._handleAdPluginEvent=function(t,e){for(var n,i,r=this,s=[],u=2;u<arguments.length;u++)s[u-2]=arguments[u];switch(e){case a.AdPluginEvent.AD_BREAK_RESOLVED:if(n=s[0],!(i=this._waitToResolveAdBreakIds[n.adBreakId]))return;var c=i.updateAdBreak(n,this._model.adsRendererTypes,this._model.capabilities);this.handleAdBreakResolved(i,c);break;case a.AdPluginEvent.AD_BREAK_RESOLVE_ERROR:n=s[0],delete this._waitToResolveAdBreakIds[n.adBreakId];break;case a.AdPluginEvent.AD_BREAKS_AVAILABLE:var d=s[0];if(i=this._adBreakFetchInProgress[d.refId],delete this._adBreakFetchInProgress[d.refId],!i||!d.refId||!d.adBreaks)return;i.addAdBreaks(d.adBreaks),i.adBreaks.forEach(function(t){r._classifyAdBreak(t)}),i.adBreaks.some(function(t){return t.type===l.AdBreakType.NON_LINEAR})&&h.isAdOverlayRendererAdPlugin(t)&&this.publish(o.CREATE_OVERLAY_CONTAINER,function(e){e&&t.setNonlinearAdContainer(e)}),i===this._mediaItem&&i===this._clientAdTimeoutItem&&this._clientAdStartTimer&&this._clientAdTimeoutType&&this.playClientAdBreaks(this._clientAdTimeoutType);break;case a.AdPluginEvent.DIAGNOSTICS:var p=s[0];this.publish(o.AD_DIAGNOSTICS,p)}this._sendAnalyticsEvent(e,s&&s[0])},n.prototype._setActiveAdPlugin=function(t){t!==this._adPlugin&&(this._stopListeningAdPluginEvents(),t?(this._adPlugin=t,this._stopListeningAdPluginEvents=u.listenEventDispatcherEvts(this._adPlugin,Object.keys(a.AdPluginEvent).map(function(t){return a.AdPluginEvent[t]}),this._handleAdPluginEvent.bind(this))):(this._adPlugin=null,this._stopListeningAdPluginEvents=p.default.noop))},n.prototype._sendAnalyticsEvent=function(t,n){var i=n&&n.evt||e.AdAnalyticsEventMap[t];if(i){if(i===e.AdAnalyticsEventMap[a.AdPlayerEvent.PLAYING]){if(!0===this._adDlvBeaconFired)return;this._adDlvBeaconFired=!0}var r;(r=n&&"object"==typeof n?Object.assign({},n):{}).evt=r.evt||i,this.publish(o.AD_METRICS,r)}},n}(s.default);e.AdPlaybackController=f},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o,s,a=n(6),u=n(1),l=n(38),c=n(62),d=n(19),h=n(4),p=n(0),f=n(9),_=n(7),m=n(258),y=n(105),v=n(68),g=n(44),E=n(108),b=n(37),A=n(110),S=n(111),T=n(112),I=n(5),C=n(113);!function(t){t.RENDERER_SWITCH="renderer-switch",t.RENDERER_CREATED="renderer-created",t.RENDERER_TIMEOUT="error-timeout",t.RENDERER_READY_TO_PLAY="renderer-ready-to-play"}(r=e.RendererControllerEvent||(e.RendererControllerEvent={})),function(t){t.CLICK="renderer-click",t.SRC_SWITCHING="renderer-active-src-switching",t.SRC_SWITCHED="renderer-active-src-switched",t.PLAYBACK_START_BLOCKED="renderer-active-play-blocked",t.SKIPPED="renderer-active-item-skipped",t.PAUSE="renderer-active-paused",t.ENDED="renderer-active-ended",t.ERROR="renderer-active-video-error",t.LOADEDMETADATA="renderer-active-loadedmetadata",t.LOADEDDATA="renderer-active-loadeddata",t.STALLED="renderer-active-stalled",t.LOADSTART="renderer-active-loadstart",t.PLAY="renderer-active-play",t.PLAYING="renderer-active-playing",t.SEEKING="renderer-active-seeking",t.SEEKED="renderer-active-seeked",t.TIMEUPDATE="renderer-active-timeupdate",t.VOLUMECHANGE="renderer-active-volumechange",t.WAITING="renderer-active-waiting",t.END_FULLSCREEN="renderer-active-endfullscreen"}(o=e.ActiveRendererEvent||(e.ActiveRendererEvent={})),function(t){t.SRC_SWITCHING="renderer-next-src-switching",t.SRC_SWITCHED="renderer-next-src-switched",t.PAUSE="renderer-next-paused",t.ENDED="renderer-next-ended",t.ERROR="renderer-next-video-error",t.LOADEDMETADATA="renderer-next-loadedmetadata",t.LOADEDDATA="renderer-next-loadeddata",t.STALLED="renderer-next-stalled",t.LOADSTART="renderer-next-loadstart",t.PLAY="renderer-next-play",t.PLAYING="renderer-next-playing",t.SEEKING="renderer-next-seeking",t.SEEKED="renderer-next-seeked",t.TIMEUPDATE="renderer-next-timeupdate",t.VOLUMECHANGE="renderer-next-volumechange",t.WAITING="renderer-next-waiting"}(s=e.NextRendererEvent||(e.NextRendererEvent={}));var R=function(t){function e(e,n,i){var r=t.call(this,"RendererController")||this;return r._pluginManager=i,r._model=e,r._eventBus=n,r._flashRenderer=null,r._flashSimpleRenderer=null,r._activeRenderer=null,r._nextRenderer=null,r._nextRendererSignature=null,r._nextRendererPreloadSignature=null,r._inactiveRenderers={},r._rendererSubKeys={},r._nextRendererSubKeys={},r._rendererSwitchingSupported=r._isRendererSwitchingSupported(),r._waitingForReady=!1,r._bindEvents(),r}return i(e,t),e.prototype.prepareNextRenderer=function(t,e){var n=this;if(e||(e=function(){}),t){var i=this._findBestExternalPlayer(t),o=i?I.RendererType.EXTERNAL:t.rendererType;if(o){var s=this._generateRendererSignature(t);if(this._nextRendererSignature!==s)!this._rendererSwitchingSupported&&this._activeRenderer&&this._activeRenderer.type===o&&this._activeRenderer.type!==I.RendererType.EXTERNAL||t.isRecovering()&&this._activeRenderer?this._nextRenderer=this._activeRenderer:(this._nextRenderer=o===I.RendererType.EXTERNAL?this._setupExternalRenderer(i):this._setupRenderer(o),this._bindNextRendererEvents(this._nextRenderer)),this._nextRendererSignature=s,this._waitingForReady=!0,this._nextRenderer.waitForReady(function(t){n._waitingForReady=!1,t&&(n.publish(r.RENDERER_TIMEOUT),n._nextRenderer&&n._destroyRenderer(n._nextRenderer)),e(t)});else{if(this._waitingForReady)return;e()}}else{var a=p.default.createErr(f.ErrorGroup.Configuration,this._model.playbackState,f.E_PLAYER,f.PLAYER_CODES.E_NO_RENDERER_FOUND,"","no renderer type is applicable for the playable item");e(a)}}else e(new Error("no playable item to be rendered"))},e.prototype.preloadNextRenderer=function(t,e,n,i){var r=this;if(void 0===e&&(e=0),void 0===n&&(n=!1),void 0===i&&(i=!1),!t)return!1;var o=this._generateRendererSignature(t);if(this._nextRendererSignature!==o)return this.prepareNextRenderer(t,function(){r.preloadNextRenderer(t,e,n,i)}),!0;var s=this._generateRendererSignature(t,e);if(this._nextRendererPreloadSignature===s)return!0;if(this._nextRenderer){this._nextRendererPreloadSignature=s;var a=this._nextRenderer.setPlayableItem(t,e);if(a&&n&&this._nextRenderer.type===I.RendererType.HTML5_HLS){var u={startOffset:t.customConfig&&t.customConfig.playbackStart||NaN,bufferLimit:this._model.forcePreloadBufferLimit||30};this._nextRenderer.preload(u)}return a}return!1},e.prototype.switchAndPlayNextRenderer=function(t,e){void 0===e&&(e=!1),this.switchToNextRenderer(e),this.publish(r.RENDERER_READY_TO_PLAY,t)},e.prototype.switchToNextRenderer=function(t){void 0===t&&(t=!1),this._nextRenderer&&(delete this._inactiveRenderers[this._nextRenderer.type],this._unbindNextRendererEvents(this._nextRenderer),this.switchToRenderer(this._nextRenderer,t),this._nextRendererSignature=null,this._nextRendererPreloadSignature=null)},e.prototype.didRendererTimeOut=function(){return!(!this._activeRenderer||!this._activeRenderer.timedOut)},e.prototype.getActiveRenderer=function(){return this._activeRenderer},e.prototype.getNextRendererNode=function(){return this._nextRenderer&&this._nextRenderer.node||null},e.prototype.syncPlaybackState=function(){this._activeRenderer&&(this._activeRenderer.paused=this._model.isPaused(),this._activeRenderer.seeking=this._model.isSeeking())},e.prototype.rewindAfterEnd=function(t){if(this._activeRenderer)if(t)switch(this._activeRenderer.type){case I.RendererType.HTML5_RAW:case I.RendererType.HTML5_HLS:this._activeRenderer.node&&(this._activeRenderer.node.src="")}else this._activeRenderer.seek(0)},e.prototype.play=function(t){this._activeRenderer&&this._activeRenderer.play(t)},e.prototype.pause=function(){this._activeRenderer&&(this._activeRenderer.type===I.RendererType.HTML5_TV_TIZEN||this._activeRenderer.type===I.RendererType.HTML5_TV_ORSAY||(h.isFunction(this._activeRenderer.pause)?this._activeRenderer.pause():this._activeRenderer.node&&this._activeRenderer.node.pause()))},e.prototype.preload=function(t){this._nextRenderer&&this._nextRenderer.type===I.RendererType.HTML5_HLS&&this._nextRenderer.preload(t)},e.prototype.getCurrentDate=function(){return this._activeRenderer&&this._activeRenderer.getCurrentDate()||0},e.prototype.endVideo=function(){this._activeRenderer&&(this._activeRenderer.ended||(this._activeRenderer.ended=!0,this._activeRenderer.type===I.RendererType.HTML5_TV_TIZEN||this._activeRenderer.type===I.RendererType.HTML5_TV_ORSAY||(h.isFunction(this._activeRenderer.stop)?this._activeRenderer.stop():this._activeRenderer.node&&this._activeRenderer.node.pause())))},e.prototype.seek=function(t){this._activeRenderer&&this._activeRenderer.seek(t)},e.prototype.getCurrentTime=function(){return this._activeRenderer?this._activeRenderer.getCurrentTime():0},e.prototype.getDuration=function(){return this._activeRenderer?this._activeRenderer.getDuration():NaN},e.prototype.setQuality=function(t){this._activeRenderer&&this._activeRenderer.setQuality(t)},e.prototype.enterFS=function(){this._activeRenderer&&this._activeRenderer.enterFullScreen&&this._activeRenderer.enterFullScreen()},e.prototype.exitFS=function(){this._activeRenderer&&this._activeRenderer.exitFullScreen&&this._activeRenderer.exitFullScreen()},e.prototype.showAirplayTargetMenu=function(){this._activeRenderer&&this._activeRenderer.showAirplayTargetMenu&&this._activeRenderer.showAirplayTargetMenu()},e.prototype.setVolume=function(t){this._activeRenderer&&this._activeRenderer.setVolume(t)},e.prototype.setMute=function(t){this._activeRenderer&&this._activeRenderer.setMute(!!t)},e.prototype.setAudioLanguage=function(t){this._activeRenderer&&this._activeRenderer.setAudioLanguage&&this._activeRenderer.setAudioLanguage(t)},e.prototype.stopMedia=function(){if(this._activeRenderer)return this._activeRenderer.stopMedia()},e.prototype.skip=function(){this._activeRenderer&&h.isFunction(this._activeRenderer.skip)&&this._activeRenderer.skip()},e.prototype.switchToRenderer=function(t,e){this._unbindActiveRendererEvents(this._activeRenderer);var n=this._activeRenderer,i=n&&n!==t;i&&u.userAgent.mobile&&this.exitFS(),this._setActiveRenderer(t),this._model.playbackState.rendererType=t.type,this.setVolume(this._model.volume),this.setMute(this._model.mute),this._bindActiveRendererEvents(this._activeRenderer),i&&(n.type===I.RendererType.HTML5_HLS_360||n.type===I.RendererType.HTML5_RAW_360||n.type===I.RendererType.EXTERNAL?p.default.classList(n.container).remove("vp-renderer-active"):n.node&&p.default.classList(n.node).remove("vp-renderer-active"),e?this._destroyRenderer(n):this._addToInactiveRenderers(n)),this._toggleRendererOperation(t,!0),t.type===I.RendererType.HTML5_HLS_360||t.type===I.RendererType.HTML5_RAW_360||t.type===I.RendererType.EXTERNAL?p.default.classList(t.container).add("vp-renderer-active"):t.node&&p.default.classList(t.node).add("vp-renderer-active"),this.publish(r.RENDERER_SWITCH,n,t)},e.prototype.enableMobileNativeCC=function(t){this._activeRenderer&&this._activeRenderer.enableMobileNativeCC&&this._activeRenderer.enableMobileNativeCC(t)},e.prototype.destroy=function(){this._activeRenderer&&this._activeRenderer.destroy(),this._nextRenderer&&this._nextRenderer.destroy()},e.prototype._bindEvents=function(){},e.prototype._bindActiveRendererEvents=function(t){var e=this;t&&(this._rendererSubKeys[I.CustomRendererEvent.SRC_SWITCHING]=t.on(I.CustomRendererEvent.SRC_SWITCHING,function(){e.publish(o.SRC_SWITCHING)},this),this._rendererSubKeys[I.CustomRendererEvent.SRC_SWITCHED]=t.on(I.CustomRendererEvent.SRC_SWITCHED,function(){e.publish(o.SRC_SWITCHED)},this),this._rendererSubKeys[I.CustomRendererEvent.CLICK]=t.on(I.CustomRendererEvent.CLICK,function(){e.publish(o.CLICK)},this),this._rendererSubKeys[I.CustomRendererEvent.PLAY_BLOCKED]=t.on(I.CustomRendererEvent.PLAY_BLOCKED,function(){e.publish(o.PLAYBACK_START_BLOCKED)},this),this._rendererSubKeys[I.CustomRendererEvent.SKIPPED]=t.on(I.CustomRendererEvent.SKIPPED,function(){e.publish(o.SKIPPED)},this),this._rendererSubKeys[I.CustomRendererEvent.RENDERER_END_FULLSCREEN]=t.on(I.CustomRendererEvent.RENDERER_END_FULLSCREEN,function(){e.publish(o.END_FULLSCREEN)},this),this._rendererSubKeys[I.RendererEvent.PAUSE]=t.on(I.RendererEvent.PAUSE,function(){e.publish(o.PAUSE)},this),this._rendererSubKeys[I.RendererEvent.ENDED]=t.on(I.RendererEvent.ENDED,function(){e.publish(o.ENDED)},this),this._rendererSubKeys[I.RendererEvent.ERROR]=t.on(I.RendererEvent.ERROR,function(t){e.publish(o.ERROR,t)},this),this._rendererSubKeys[I.RendererEvent.LOADEDMETADATA]=t.on(I.RendererEvent.LOADEDMETADATA,function(){e.publish(o.LOADEDMETADATA)},this),this._rendererSubKeys[I.RendererEvent.LOADEDDATA]=t.on(I.RendererEvent.LOADEDDATA,function(){e.publish(o.LOADEDDATA)},this),this._rendererSubKeys[I.RendererEvent.STALLED]=t.on(I.RendererEvent.STALLED,function(){e.publish(o.STALLED)},this),this._rendererSubKeys[I.RendererEvent.LOADSTART]=t.on(I.RendererEvent.LOADSTART,function(){e.publish(o.LOADSTART)},this),this._rendererSubKeys[I.RendererEvent.PLAY]=t.on(I.RendererEvent.PLAY,function(){e.publish(o.PLAY)},this),this._rendererSubKeys[I.RendererEvent.PLAYING]=t.on(I.RendererEvent.PLAYING,function(){e.publish(o.PLAYING)},this),this._rendererSubKeys[I.RendererEvent.SEEKING]=t.on(I.RendererEvent.SEEKING,function(t){e.publish(o.SEEKING,t)},this),this._rendererSubKeys[I.RendererEvent.SEEKED]=t.on(I.RendererEvent.SEEKED,function(t){e.publish(o.SEEKED,t)},this),this._rendererSubKeys[I.RendererEvent.TIMEUPDATE]=t.on(I.RendererEvent.TIMEUPDATE,function(t){e.publish(o.TIMEUPDATE,t)},this),this._rendererSubKeys[I.RendererEvent.VOLUMECHANGE]=t.on(I.RendererEvent.VOLUMECHANGE,function(){e.publish(o.VOLUMECHANGE)},this),this._rendererSubKeys[I.RendererEvent.WAITING]=t.on(I.RendererEvent.WAITING,function(t){e.publish(o.WAITING,t)},this))},e.prototype._unbindActiveRendererEvents=function(t){t&&(t.removeEventListeners(this._rendererSubKeys),this._rendererSubKeys={})},e.prototype._bindNextRendererEvents=function(t){var e=this;t&&t!==this._activeRenderer&&(this._nextRendererSubKeys[I.RendererEvent.ERROR]=t.on(I.RendererEvent.ERROR,function(t){e.publish(s.ERROR,t)},this),this._nextRendererSubKeys[I.RendererEvent.LOADEDMETADATA]=t.on(I.RendererEvent.LOADEDMETADATA,function(){e.publish(s.LOADEDMETADATA)},this),this._nextRendererSubKeys[I.RendererEvent.LOADEDDATA]=t.on(I.RendererEvent.LOADEDDATA,function(){e.publish(s.LOADEDDATA)},this),this._nextRendererSubKeys[I.RendererEvent.LOADSTART]=t.on(I.RendererEvent.LOADSTART,function(){e.publish(s.LOADSTART)},this),this._nextRendererSubKeys[I.RendererEvent.SEEKING]=t.on(I.RendererEvent.SEEKING,function(t){e.publish(s.SEEKING,t)},this),this._nextRendererSubKeys[I.RendererEvent.SEEKED]=t.on(I.RendererEvent.SEEKED,function(t){e.publish(s.SEEKED,t)},this),this._nextRendererSubKeys[I.RendererEvent.WAITING]=t.on(I.RendererEvent.WAITING,function(t){e.publish(s.WAITING,t)},this))},e.prototype._unbindNextRendererEvents=function(t){t&&(t.removeEventListeners(this._nextRendererSubKeys),this._nextRendererSubKeys={})},e.prototype._createRenderer=function(t){var e=this._model,n=this._eventBus,i=this._inactiveRenderers[t];if(i)return i.bindCustomEvents(),i;switch(t){case I.RendererType.FLASH:if(this._flashRenderer)return this._flashRenderer;i=new y.default(n,e),this._flashRenderer=i;break;case I.RendererType.FLASH_SIMPLE:if(this._flashSimpleRenderer)return this._flashSimpleRenderer;i=new v.default(n,e),this._flashSimpleRenderer=i;break;case I.RendererType.HTML5_HLS:i=new g.default(n,e);break;case I.RendererType.HTML5_RAW_360:i=new A.default(n,e);break;case I.RendererType.HTML5_HLS_360:i=new E.default(n,e);break;case I.RendererType.EXTERNAL:i=new m.default;break;case I.RendererType.HTML5_TV:i=new S.default(n,e);break;case I.RendererType.HTML5_TV_ORSAY:i=new T.default(n,e);break;case I.RendererType.HTML5_TV_TIZEN:i=new C.default(n,e);break;case I.RendererType.HTML5_RAW:default:i=new b.default(n,e)}return this.publish(r.RENDERER_CREATED,i),t!==I.RendererType.FLASH&&t!==I.RendererType.FLASH_SIMPLE&&this._model.showControls&&!d.default.canPlayInline&&i.node&&(i.node.controls=!0),this._setInactiveRenderer(i,t),i},e.prototype._setupRenderer=function(t){return this._createRenderer(t)},e.prototype._setupExternalRenderer=function(t){if(this._activeRenderer&&this._activeRenderer.type===I.RendererType.EXTERNAL&&this._activeRenderer.getExternalPlayer()===t)return this._activeRenderer;var e=this._setupRenderer(I.RendererType.EXTERNAL);return e.setExternalPlayer(t),e},e.prototype._addToInactiveRenderers=function(t){var e,n=[I.RendererType.HTML5_RAW_360,I.RendererType.HTML5_HLS_360];t&&(e=t.type,this._toggleRendererOperation(t,!1),this._inactiveRenderers[e]||-1!==n.indexOf(e)?e!==I.RendererType.FLASH&&e!==I.RendererType.FLASH_SIMPLE&&t.destroy():this._setInactiveRenderer(t,e))},e.prototype._toggleRendererOperation=function(t,e){if(t)switch(t.type){case I.RendererType.FLASH:case I.RendererType.FLASH_SIMPLE:e?t.bindPlaybackEvents():(t.stopMedia(),t.unbindPlaybackEvents());break;default:e?(t.detachNode&&t.detachNode(),t.reattachNode&&t.reattachNode()):(t.detachNode&&t.detachNode(),t.stopMedia&&t.stopMedia())}},e.prototype._findBestExternalPlayer=function(t){if(!(t instanceof l.default&&t.adPluginMimeType))return null;if(!this._model.config.ads.preferExternalPlayback)return null;var e,n=this._pluginManager.getPlugin(_.PluginType.AD,t.adPluginMimeType);if(!n||!h.isExternalPlayer(n))return null;var i=(e=n).getCapabilities(),r=!1,o=!1;return t.streams.forEach(function(t){/\.m3u8/.test(t.url)?r=!0:/\.(?:mp4|webm)/.test(t.url)&&(o=!0)}),r&&i.indexOf(I.ExternalPlayerCapability.RENDER_HLS)>-1||o&&i.indexOf(I.ExternalPlayerCapability.RENDER_PDL)>-1?e:null},e.prototype._generateRendererSignature=function(t,e){var n,i=[];if(e||(e=0),i.push(t.rendererType),i.push(e),t instanceof l.default){i.push("ad"),i.push(t.adBreakItemId),t.adPluginMimeType&&i.push(t.adPluginMimeType),(n=t.streams)&&n.length>0&&i.push(n[0].url);var r=t.adBreak;r&&(i.push(r.adBreakId),i.push(r.adBreakItems.length))}else t instanceof c.default&&(i.push("mediaItem"),i.push(t.id),(n=t.streams)&&n.length>0&&i.push(n[0].url));return i.join("|")},e.prototype._handleAdvancePreparePreloadNextRenderer=function(t){var e=this;t&&t.rendererType===I.RendererType.HTML5_HLS&&this.prepareNextRenderer(t,function(n){n||e._nextRenderer===e._activeRenderer||t.isLive()||e.preloadNextRenderer(t,0,!0,!0)})},e.prototype._isRendererSwitchingSupported=function(){var t=u.userAgent.mobile&&!d.default.hasNativeAutoplaySupport;return!(u.userAgent.tv||u.userAgent.ios||t)},e.prototype._destroyRenderer=function(t){return t.type===I.RendererType.FLASH_SIMPLE?this._flashSimpleRenderer=null:t.type===I.RendererType.FLASH&&(this._flashRenderer=null),delete this._inactiveRenderers[t.type],t.destroy()},e.prototype._setActiveRenderer=function(t){t&&(this._activeRenderer=t,t.setActive(!0))},e.prototype._setInactiveRenderer=function(t,e){t&&(this._inactiveRenderers[e]=t,t.setActive(!1))},e}(a.default);e.RendererController=R},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(1),s=n(69),a=n(104),u=n(19),l=n(0),c=n(5);o.userAgent.mobile&&u.default.hasNativeAutoplaySupport&&(r=a.default.getPool());var d=0,h=function(t){function e(){var n=t.call(this,"external-renderer")||this;return n.type=e.type,n.timedOut=!1,n._stopPlayerEvtListening=l.default.noop,n}return i(e,t),e.canUse=function(){return!0},Object.defineProperty(e.prototype,"mimetype",{get:function(){return this._externalPlayer?this._externalPlayer.mimetype:void 0},enumerable:!0,configurable:!0}),e.prototype.create=function(t){return this.node=t instanceof HTMLVideoElement?t:r?r.get():l.default.createVideoNode(),this.node.setAttribute("id","vp-ext-rndr-"+ ++d),l.default.classList(this.node).add("vp-html5-video"),this.container=document.createElement("div"),this.container.setAttribute("id",l.default.generateGuid()),l.default.classList(this.container).add("vp-external-video"),this.container.appendChild(this.node),this.container},e.prototype.getExternalPlayer=function(){return this._externalPlayer},e.prototype.setExternalPlayer=function(t){this._externalPlayer&&this._externalPlayer!==t&&this._unbindExternalPlayerEvents(),this._externalPlayer=t,this._bindExternalPlayerEvents()},e.prototype.play=function(t){this._externalPlayer&&(this._currentPlayableItem?this._externalPlayer.play(this._currentPlayableItem.rawItemData):console.warn("[ExternalRenderer] play() failed. no playable item set"))},e.prototype.preload=function(t){},e.prototype.setPlayableItem=function(t,e){return void 0===e&&(e=0),!!t&&(this._currentPlayableItem=t,this._mode=l.default.getPlaybackMode(t),!!this._externalPlayer&&(this._playbackError=null,this._externalPlayer.preparePlayback(this._currentPlayableItem.rawItemData,this.node,this.container),!this._playbackError))},e.prototype.waitForReady=function(t){t&&t()},e.prototype.seek=function(t){this._externalPlayer&&this._externalPlayer.seek(t)},e.prototype.pause=function(){this._externalPlayer&&this._externalPlayer.pause()},e.prototype.skip=function(){this._externalPlayer&&this._externalPlayer.skip()},e.prototype.getCurrentDate=function(){return null},e.prototype.getCurrentTime=function(){return this._externalPlayer?this._externalPlayer.getCurrentTime():0},e.prototype.getDuration=function(){return this._externalPlayer?this._externalPlayer.getDuration():0},e.prototype.setQuality=function(t){},e.prototype.enterFullScreen=function(){if(this.node){var t=this.node,e=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitEnterFullscreen;e&&e.call(this.node)}},e.prototype.exitFullScreen=function(){if(this.node){var t=document.exitFullscreen||document.webkitExitFullscreen;t?t.call(document):this.node.webkitExitFullscreen&&this.node.webkitExitFullscreen()}},e.prototype.setVolume=function(t){this._externalPlayer&&this._externalPlayer.setVolume(t)},e.prototype.setMute=function(t){this._externalPlayer&&this._externalPlayer.mute(t)},e.prototype.setAudioLanguage=function(t){},e.prototype.stopMedia=function(){return!!this._externalPlayer&&(this._externalPlayer.stop(),!0)},e.prototype.bindCustomEvents=function(){},e.prototype.destroy=function(){this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this._externalPlayer&&(this._unbindExternalPlayerEvents(),this._externalPlayer=null)},e.prototype.bindPlaybackEvents=function(){this._externalPlayer},e.prototype.detachNode=function(){this.node&&this.node.pause()},e.prototype.reattachNode=function(){},e.prototype.setActive=function(t){this._active=t,t||(this._externalPlayer&&this._externalPlayer.unload(),this.container.innerHTML="",this.container.appendChild(this.node))},e.prototype.unbindPlaybackEvents=function(){this._externalPlayer},e.prototype.showAirplayTargetMenu=function(){},e.prototype._bindExternalPlayerEvents=function(){this._externalPlayer&&(this._stopPlayerEvtListening=s.listenEventDispatcherEvts(this._externalPlayer,Object.keys(c.ExternalPlayerEvent).map(function(t){return c.ExternalPlayerEvent[t]}),this._handleExternalPlayerEvt.bind(this)))},e.prototype._unbindExternalPlayerEvents=function(){this._stopPlayerEvtListening(),this._stopPlayerEvtListening=l.default.noop},e.prototype._handleExternalPlayerEvt=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];switch(e!==c.ExternalPlayerEvent.TIME_UPDATE&&console.log.apply(console,["~~ [ExternalPlayer] event",e].concat(n)),e){case c.ExternalPlayerEvent.TIME_UPDATE:this.publish(c.RendererEvent.TIMEUPDATE,{currentTime:this._externalPlayer.getCurrentTime(),duration:this._externalPlayer.getDuration(),buffered:this.node.buffered});break;case c.ExternalPlayerEvent.PLAYBACK_ERROR:var r=n[0]||this.node.error;this._playbackError=r||{},this.publish(c.RendererEvent.ERROR,r);break;case c.ExternalPlayerEvent.ITEM_LOADED:this.publish(c.RendererEvent.LOADSTART);break;case c.ExternalPlayerEvent.MUTE_CHANGED:case c.ExternalPlayerEvent.VOLUME_CHANGED:this.publish(c.RendererEvent.VOLUMECHANGE,{volume:this._externalPlayer.getVolume(),mute:this._externalPlayer.isMuted()});break;case c.ExternalPlayerEvent.PLAY_REQUESTED:this.ended=!1;break;case c.ExternalPlayerEvent.PLAYING:this.paused=!1,this.ended=!1,this.publish(c.RendererEvent.PLAYING);break;case c.ExternalPlayerEvent.PAUSED:this.paused=!0,this.publish(c.RendererEvent.PAUSE);break;case c.ExternalPlayerEvent.PLAY_COMPLETE:this.ended=!0,this.publish(c.RendererEvent.ENDED);break;case c.ExternalPlayerEvent.SKIPPED:this.publish(c.CustomRendererEvent.SKIPPED)}},e.type=c.RendererType.EXTERNAL,e}(c.Renderer);e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),r=n(0),o=function(){function t(){this.mute=!1,this.volume=.5,this.ad=null,this.state=i.States.INIT,this.paused=!1,this.seeking=!1,this.loading=!0,this.criticalError=null,this.previousItem=null,this.looped=!1,this.loadedItem=null,this.loadedAdBreakItem=null,this.rendererType=null,this.hasStartedPlayback=!1,this.hasCurrentItemPlayed=!1,this.hasRendererPlayCalled=!1,this._currentMediaType="",this.shouldPlay=!0}return Object.defineProperty(t.prototype,"playingItem",{get:function(){return this._playableItem},set:function(t){this._playableItem=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._currentTime},set:function(t){this._currentTime=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},set:function(t){this._duration=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playbackMode",{get:function(){return r.default.getPlaybackMode(this._playableItem)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentMediaType",{get:function(){return this._currentMediaType},set:function(t){this._currentMediaType=t},enumerable:!0,configurable:!0}),t.prototype.attemptingPlayback=function(){return this.isVideoPlaying()||this.state===i.States.WAITING},t.prototype.isVideoPlaying=function(){return this.videoSet()&&!this.paused},t.prototype.videoSet=function(){return this.state===i.States.VIDEO},t.prototype.isOnCriticalError=function(){return!(this.state!==i.States.END||!this.criticalError)},t.prototype.isInitializing=function(){return this.state===i.States.INIT||this.state===i.States.WAITING},t.prototype.videoLoading=function(){return this.videoSet()&&this.loading},t.prototype.isAdPlaying=function(){return!(!this.videoSet()||!this.ad)},t.prototype.isVpaidAdPlaying=function(){return!1},t}();e.default=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(9),a=n(2),u=n(15),l=n(45),c=n(4),d=n(0),h=["200","400","501","430"],p=["7","57","304","307"],f=["700","701","710","711","720","721","722","730","731","732","740","750","760"],_=["103","500","502","503","550","403","404","504"],m=["11","12","13","14"];!function(t){t.RECOVERY_START="recovery-start",t.RECOVERY_METADATA_READY="recovery-metadata-ready"}(r=e.RecovererEvent||(e.RecovererEvent={}));var y=function(t){function e(e,n){var i=t.call(this,"Recoverer")||this;return i._eventBus=e,i._model=n,i._eventKeys={},i._recovering=!1,i._reset(),i._recoveryState=0,i._eventKeys[a.ERROR]=i._eventBus.addEventListener(a.ERROR,i._onError,i),i}return i(e,t),e.prototype.recover=function(t){if(!this._model.playbackState.ad&&0===this._recoveryState){this._stopFrozenDetectionTimer(),this._recovering||(this._recovering=!0,this.publish(a.WARNING,d.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,s.E_WARNING,s.WARNING_CODES.E_RECOVERY_STATUS,null,"recovering"))),4===t&&this.publish(a.WARNING,d.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,s.E_WARNING,s.WARNING_CODES.E_RECOVER_LONG_PAUSE,null,"Recovering from long pause on live")),this._recoveryState=t||3;var e=this._getCurrentItem();e&&(e.failoverCount++,e.recoveryStatus=u.ItemRecoveryStatus.RECOVERING,console.log("Recoverer.recover(): recoveryState is ",this._recoveryState)),this.publish(r.RECOVERY_START)}},e.prototype.shouldRenderErrorScreen=function(t){return!!t&&(h.indexOf(t.category.toString())<0||p.indexOf(t.subcategory.toString())<0&&f.indexOf(t.subcategory.toString())<0&&_.indexOf(t.subcategory.toString())<0&&m.indexOf(t.subcategory.toString())<0)},e.prototype.destroy=function(){var t=this;this._deactivate(),Object.keys(this._eventKeys).forEach(function(e){t._eventBus.removeEventListener(e,t._eventKeys[e])}),this._eventKeys={}},e.prototype.stopTimers=function(){this._stopFrozenDetectionTimer(),this._stopCdnDownTimer(),this._stopRecoveryFailureTimer()},e.prototype.toggleRecoverer=function(t){t&&t.value?this._activate(1):(this._recovering&&this.publish(a.WARNING,d.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,s.E_WARNING,s.WARNING_CODES.E_RECOVERY_STATUS,null,"recovered")),this._deactivate())},e.prototype.onRecoveryMetadataReady=function(){if(this._recoveryState)this.publish(a.WARNING,d.default.createErr(s.ErrorGroup.Streaming,this._model.playbackState,s.E_WARNING,s.WARNING_CODES.E_PLAYBACK_FROZEN_DETECTED,null,this._recoveryState.toString())),this.publish(r.RECOVERY_METADATA_READY),this._reset();else{var t=this._getCurrentItem();t&&t.failoverCount--}},e.prototype.onMetadataLoadFailed=function(){this._recovering&&this._restartTimer()},Object.defineProperty(e.prototype,"recovering",{get:function(){return this._recovering},enumerable:!0,configurable:!0}),e.prototype._reset=function(){this._recoveryTimeoutVal=1e4*Math.random()+1e4,this._recoveryTimeoutIncr=2e3,this._stopFrozenDetectionTimer()},e.prototype._getCurrentItem=function(){return this._model.playlist?this._model.playlist.getCurrentItem():null},e.prototype._activate=function(t){this._startRecoveryFailureTimer(),1!==t?this.recover(t):this._startTimer(this._recoveryTimeoutVal)},e.prototype._deactivate=function(){this._reset(),this.stopTimers(),this._recovering=!1,this._recoveryState=0},e.prototype._onError=function(t){var e=this,n=2;if(t){if(_.indexOf(t.subcategory.toString())>0?n=9:t.subcategory.toString()!==s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_SRC_NOT_SUPPORTED&&t.subcategory.toString()!==s.PLAYER_CODES.E_PLAYER_HTML5_PLAYBACK_ERROR_ABORTED||(n=5),t.debugMessage)switch(t.debugMessage){case s.DRM_DEBUG_CODES.KEY_SESSION_FAILED:n=6;break;case s.DRM_DEBUG_CODES.LICENSE_REQUEST_FAILED:n=7;break;case s.DRM_DEBUG_CODES.CERT_LOAD_FAILED:n=8}if(this._shouldRecover(t)){if("400"===t.category.toString()&&"7"===t.subcategory.toString())return this._stopCdnDownTimer(),this._cdnDownTimer=new l.default(1e4*Math.random(),1),this._cdnDownTimer.addEventListener(l.default.TIMER_EVENT,function(){e._activate(n)},this),void this._cdnDownTimer.start();this._activate(n)}}},e.prototype._shouldRecover=function(t){if(!t)return!1;var e=this._getCurrentItem();return!((f.indexOf(t.subcategory.toString())>=0||t.category===s.E_SAPI_STREAM)&&e&&e.failoverCount>0)&&!this.shouldRenderErrorScreen(t)},e.prototype._startTimer=function(t){var e=this;this._stopFrozenDetectionTimer(),this._frozenDetectionTimer=new l.default(t,1),this._frozenDetectionTimer.addEventListener(l.default.TIMER_EVENT,function(){e.recover(e._recoveryState?e._recoveryState:1)},this),this._frozenDetectionTimer.start(),console.log("Recoverer._startTimer(): timer started with ",t)},e.prototype._restartTimer=function(t){(t=!!c.isNullOrUndefined(t)||t)&&(this._recoveryTimeoutVal+=this._recoveryTimeoutIncr,this._recoveryTimeoutIncr*=2),this._startTimer(this._recoveryTimeoutVal)},e.prototype._startRecoveryFailureTimer=function(){var t=this;this._recoveryFailureTimer||(this._recoveryFailureTimer=new l.default(1e3*this._model.recoveryFailureTimeout,1),this._recoveryFailureTimer.addEventListener(l.default.TIMER_EVENT,function(){var e=d.default.createErr(s.ErrorGroup.Streaming,t._model.playbackState,s.E_PLAYER,s.PLAYER_CODES.E_RECOVERY_FAILURE,null,t._recoveryState.toString());console.log("Recovery failed: ",t._recoveryState),t.publish(a.ERROR,e),t._deactivate()},this),this._recoveryFailureTimer.start())},e.prototype._stopFrozenDetectionTimer=function(){this._frozenDetectionTimer&&(this._frozenDetectionTimer.destroy(),this._frozenDetectionTimer=null)},e.prototype._stopCdnDownTimer=function(){this._cdnDownTimer&&(this._cdnDownTimer.destroy(),this._cdnDownTimer=null)},e.prototype._stopRecoveryFailureTimer=function(){this._recoveryFailureTimer&&(this._recoveryFailureTimer.destroy(),this._recoveryFailureTimer=null)},e.prototype._onBufferGrowthDetected=function(){var t=this._getCurrentItem();t&&!t.isLive()&&this._restartTimer(!1)},e}(o.default);e.default=y},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),s=n(1),a=n(2),u=n(18),l=n(45);!function(t){t.PAGE_VISIBILITY_CHANGED="page-visibility-changed",t.PLAY_MEDIA="play-media",t.PAUSE_MEDIA="pause-media"}(r=e.VisibilityEvent||(e.VisibilityEvent={}));var c=[{prop:"hidden",name:"visibilitychange"},{prop:"mozHidden",name:"mozvisibilitychange"},{prop:"webkitHidden",name:"webkitvisibilitychange"},{prop:"msHidden",name:"msvisibilitychange"}],d=function(t){function e(e,n,i){var r=t.call(this,"VisibilityManager")||this;return r._eventBus=n,r._model=i,r._videoPausedByEvent=!1,r._isWindowInFocus=!0,r._blurTimer=null,r._focusTimer=null,r._visibilityEventName=null,r._hidden="hidden",r._pauseLiveVideo=void 0===e.pauseLiveVideo||e.pauseLiveVideo,r._pauseVODVideo=void 0===e.pauseVODVideo||e.pauseVODVideo,r._visibilityEventName=r._getDocumentVisibilityEventName(),r}return i(e,t),e.prototype.destroy=function(){this._visibilityEventName&&(document.removeEventListener(this._visibilityEventName,this._onBrowserTabChange,!1),this._visibilityEventName=null),this._clearBlurTimer(),this._clearFocusTimer()},e.prototype.activate=function(){this._visibilityEventName&&(this._onBrowserTabChange=this._onBrowserTabChange.bind(this),document.addEventListener(this._visibilityEventName,this._onBrowserTabChange,!1)),this._eventBus.addEventListener(a.VideoEvent.TIMEUPDATE,this._onTimeUpdate,this)},e.prototype._getDocumentVisibilityEventName=function(){var t=c.filter(function(t){return t.prop in document}),e=t&&t[0];return e?(this._hidden=e.prop,e.name):null},e.prototype._getDocumentHiddenState=function(){return document[this._hidden]},e.prototype._onBrowserTabChange=function(){this.publish(r.PAGE_VISIBILITY_CHANGED,!this._getDocumentHiddenState()),this._isVideoNeedToPause()&&(this._getDocumentHiddenState()&&this._isVideoPlaying()&&this._isMuteRequirementMet()?this._pauseVideoAfterDelay():(this._play(),this._clearFocusTimer()))},e.prototype._onTimeUpdate=function(){this._isVideoNeedToPause()&&(this._getDocumentHiddenState()&&this._isVideoPlaying()&&this._isMuteRequirementMet()?this._pauseVideoAfterDelay():this._clearBlurTimer())},e.prototype._pauseVideoAfterDelay=function(){var t=this;this._blurTimer||(this._blurTimer=new l.default(5e3,1),this._blurTimer.on(l.default.TIMER_EVENT,function(){t._videoPausedByEvent=!0,t.publish(r.PAUSE_MEDIA),t._clearBlurTimer(),t._focusTimer=new l.default(100),t._focusTimer.on(l.default.TIMER_EVENT,function(){t._getDocumentHiddenState()||t._play(),t._clearFocusTimer()},t),t._focusTimer.start()},this),this._blurTimer.start())},e.prototype._isVideoNeedToPause=function(){var t=this._model.playlist.getCurrentItem(),e=t&&t.isLive()||!1;return this._pauseLiveVideo&&e||this._pauseVODVideo&&!e},e.prototype._isVideoPlaying=function(){return this._model.playbackState.isVideoPlaying()},e.prototype._isMuteRequirementMet=function(){return s.userAgent.mobile||this._model.mute},e.prototype._play=function(){!this._getDocumentHiddenState()&&this._videoPausedByEvent&&this._model.getState()===u.default.VIDEO&&this._isMuteRequirementMet()&&(this._videoPausedByEvent=!1,this.publish(r.PLAY_MEDIA)),this._clearBlurTimer()},e.prototype._clearBlurTimer=function(){this._blurTimer&&(this._blurTimer.destroy(),this._blurTimer=null)},e.prototype._clearFocusTimer=function(){this._focusTimer&&(this._focusTimer.destroy(),this._focusTimer=null)},e}(o.default);e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(41),r=n(26),o=n(58),s=n(7),a={adBreakId:"0.0.0.1158043937",adBreakItems:[{adBreakItemId:"0b0f3c7b47c64a559081a2d4b7640da6",customInfo:null,duration:30,instream:!1,interactionConfig:{allowSeek:!1,allowSkipOffset:5,chromeless:!1,clickUrl:"https://example.org/ad"},source:{streams:[{url:"https://c-23edd8520f5647099732938c4bec17c5.http.atlas.cdn.yimg.com/gemini/pr/video_HMzqVHTAOQmThwSwC9ziqz2EtNcXc_w87xpYFH8j359qBRPZLeSiBxIsyWceSslDW43qM1M579E-~A_1.mp4"}]},type:o.AdBreakItemType.AD}],backToLiveDuration:0,customInfo:null,duration:30,startOffset:0,startTime:0,type:r.AdBreakType.PREROLL},u={adBreakId:"0.0.0.4594585498",adBreakItems:[{adBreakItemId:"0b0f3c7b47c64a559081a2d4b7640da6",customInfo:null,duration:10,instream:!1,source:{streams:[{url:""}]},type:o.AdBreakItemType.AD}],backToLiveDuration:0,customInfo:null,duration:10,startOffset:10,startTime:10,type:r.AdBreakType.NON_LINEAR},l="adplugin/dummy",c=["ended","error","loadedmetadata","loadeddata","pause","stalled","loadstart","play","playing","seeking","seeked","timeupdate","volumechange","waiting"],d=0,h=function(){function t(){this.version="0.1.240",this.type=s.PluginType.AD,this.mimetype=l,this._videoEl=null,this._currentAdItem=null,this._container=null,this._ended=!1,this._playbackPrepared=!1,this._loadedAd=null,this._currentVol=1,this._isMuted=!1,this._impressionFired=!1,this._stoppingVideo=!1,this._skipRequested=!1,this._renderedNonLinearAdsMap={},this._trackTimeUpdateForNonLinearRendering=!1,this._currentMediaAdBreaks=[],this._events={},this._videoEventListener=this._videoEventListener.bind(this),this._onRendererClick=this._onRendererClick.bind(this)}return t.prototype.prepare=function(t){},t.prototype.destroy=function(){},t.prototype.canRenderUI=function(t){return!(!t||!t.customInfo||"aries-ad"!==t.customInfo.customAdType)},t.prototype.renderUI=function(t,e){var n="",i=Math.random().toString(36).substring(2);return n="aries-ad"===t.customInfo.customAdType?'\n            <style>\n                .vp-adview-aries-ad .aries-header {\n                    background-color: #000;\n                    position: absolute;\n                    width: 100%;\n                    height: 50px;\n                    opacity: 0.5;\n                }\n                .vp-adview-aries-ad .aries-title {\n                    border-radius: 3px;\n                    color: #7f97f8;\n                    position: absolute;\n                    left: 12px;\n                    top: 15px;\n                    padding: 2px 5px;\n                    font-size: 12px;\n                }\n                .vp-adview-aries-ad .aries-title .aries-title-str {\n                    text-decoration: underline;\n                    font-weight: 500;\n                }\n                .vp-adview-aries-ad .aries-cta {\n                    position: absolute;\n                    right: 12px;\n                    top: 12px;\n                }\n                .vp-adview-aries-ad .aries-cta .aries-btn {\n                    border-radius: 3px;\n                    background-color: #7f97f8;\n                    color: #000;\n                    padding: 4px 6px;\n                    font-size: 14px;\n                    pointer-events: auto;\n                }\n            </style>\n            <div class="vp-adview-aries-ad">\n                <div class="aries-header"></div>\n                <div class="aries-title">\n                    <span>Aries Native Ad: </span><span class="aries-title-str">'+(t.customInfo.title||"")+'</span>\n                </div>\n                <div class="aries-cta">\n                    <div class="aries-btn">'+(t.customInfo.cta||"Learn")+"</div>\n                </div>\n            </div>\n            ":'\n            <style>\n                .dummy-adview-header h6 { border-bottom: 1px solid #ccc }\n                .dummy-adview-cta { border: 0;}\n                .dummy-brand {\n                    writing-mode: vertical-rl;\n                    text-orientation: upright;\n                    float: right;\n                }\n            </style>\n            <article class="dummy-adview-header">\n                <span>Ad</span> <span class="">1/5</span> <span class="dummy-adview-timeleft"></span> sec\n            </article>\n            <article class="dummy-adview-footer">\n                <button class="dummy-adview-cta">Learn More</button>\n            </article>\n            <p class="dummy-brand">Dummy Ad UI</p>\n            ',this._renderedAdUI=document.createElement("div"),this._renderedAdUI.setAttribute("id",i),this._renderedAdUI.innerHTML=n,this._renderedAdUI},t.prototype.unrenderUI=function(){},t.prototype.setNonlinearAdContainer=function(t){this._nonLinearAdsContainer=t},t.prototype.onPlayerEvent=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];switch(t){case s.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_PROGRESS:if(this._trackTimeUpdateForNonLinearRendering){var i=e[0];this._maybeRenderNonLinearAdBreak(i)}break;case s.PluginPlayerEvent.MEDIA_ITEM_PLAYBACK_ENDED:this._nonLinearAdsContainer.innerHTML="",this._nonLinearAdsContainer=null,this._renderedNonLinearAdsMap={},this._trackTimeUpdateForNonLinearRendering=!1,this._currentMediaAdBreaks.length=0}},t.prototype.getCapabilities=function(){return[i.AdPluginPlaybackCapability.RENDER_PDL]},t.prototype.fetchAdBreaks=function(t){var e=this,n=t.refId,o=t.config;if(o&&o.nativeAdsRawResponse){var s=0,a=o.nativeAdsRawResponse.ads.map(function(t,e){return s+=t.duration,{adBreakItemId:"native-ad-item-"+e,adPluginMimeType:"adplugin/dummy",duration:t.duration,type:"ad",source:{streams:[{url:t.stream}]},customInfo:{customAdType:"aries-ad",title:t.title,cta:t.cta}}}),u={adBreakId:"native-ad-1",startOffset:0,type:r.AdBreakType.NATIVE,duration:s,adBreakItems:a};this._currentMediaAdBreaks=[u],this._dispatchEvent(i.AdPluginEvent.AD_BREAKS_AVAILABLE,{refId:n,adBreaks:this._currentMediaAdBreaks})}else this._currentMediaAdBreaks=this._getDummyAdBreaks(),this._trackTimeUpdateForNonLinearRendering=this._currentMediaAdBreaks.some(function(t){return t.type===r.AdBreakType.NON_LINEAR}),setTimeout(function(){e._dispatchEvent(i.AdPluginEvent.METRICS,{evt:"ad_call"}),e._dispatchEvent(i.AdPluginEvent.AD_BREAKS_AVAILABLE,{refId:n,adBreaks:e._currentMediaAdBreaks})},30)},t.prototype.resolveAdBreak=function(t){var e=this;if(!(t.adBreakItems.length>0)){var n=t.type===r.AdBreakType.NON_LINEAR,o=n?1:2,s=n?u:a;t.adBreakItems=Array.isArray(t.adBreakItems)?t.adBreakItems:[];for(var c=0;c<o;c++){var h=JSON.parse(JSON.stringify(s)).adBreakItems[0];h.adBreakItemId="dummy_ad_break_item_"+ ++d,h.adPluginMimeType=l,t.duration+=h.duration,t.adBreakItems.push(h)}setTimeout(function(){e._dispatchEvent(i.AdPluginEvent.AD_BREAK_RESOLVED,t)},30)}},t.prototype.addEventListener=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.removeEventListener=function(t,e){if(this._events[t])for(var n=0,i=this._events[t].length;n<i;n++)if(this._events[t][n]===e){this._events[t].splice(n,1);break}},t.prototype.preparePlayback=function(t,e,n){if(e)if(this._videoEl&&!this._videoEl.paused&&this.stop(),e!==this._videoEl&&(this._unbindEvents(this._videoEl),this._videoEl=e,this._bindEvents(this._videoEl)),this._playbackPrepared=!1,this._impressionFired=!1,this._ended=!1,this._stoppingVideo=!1,this._skipRequested=!1,this._loadedAd=null,this._container=n,this._currentAdItem=t,t.source&&t.source.streams&&t.source.streams.length){var r=t.source.streams.filter(function(t){return/\.(?:mp4|webm)/.test(t.url)});r.length?(this._loadedAd=t,this._videoEl.src=r[0].url,this._videoEl.load(),this._playbackPrepared=!0,this._container.addEventListener("click",this._onRendererClick),this._dispatchEvent(i.AdPluginEvent.ITEM_LOADED,t)):this._dispatchEvent(i.AdPluginEvent.PLAYBACK_ERROR,t,new Error("compatible streams missing"))}else this._dispatchEvent(i.AdPluginEvent.PLAYBACK_ERROR,t,new Error("streams missing"))},t.prototype.play=function(t){this._videoEl&&this._playbackPrepared?(this._videoEl.play(),this._dispatchEvent(i.AdPluginEvent.PLAY_REQUESTED,this._loadedAd)):console.warn("[DummyAdPlugin] play() error:"+(this._videoEl?"playback not prepared":"no video elem set!"))},t.prototype.pause=function(){this._videoEl&&this._videoEl.pause()},t.prototype.seek=function(t){this._videoEl&&(this._videoEl.currentTime=t)},t.prototype.stop=function(){this._videoEl&&!this._ended&&(this._stoppingVideo=!0,this._videoEl.pause(),this._videoEl.src="",this._videoEl.load())},t.prototype.skip=function(){this._skipRequested=!0,this.stop()},t.prototype.mute=function(t){this._videoEl&&(this._isMuted=t,this._videoEl.muted=t)},t.prototype.isMuted=function(){return!!this._videoEl&&this._videoEl.muted},t.prototype.setVolume=function(t){this._videoEl&&(this._currentVol=t,this._videoEl.volume=t)},t.prototype.getVolume=function(){return this._videoEl?this._videoEl.volume:1},t.prototype.getCurrentTime=function(){return this._videoEl?this._videoEl.currentTime:0},t.prototype.getDuration=function(){return this._videoEl?this._videoEl.duration:0},t.prototype.unload=function(){this.stop(),this._container.removeEventListener("click",this._onRendererClick),this._videoEl=null,this._container=null,this._currentAdItem=null},t.prototype._onRendererClick=function(){this._videoEl.paused?this._videoEl.play():(this._videoEl.pause(),this._currentAdItem.interactionConfig&&this._currentAdItem.interactionConfig.clickUrl&&window.open(this._currentAdItem.interactionConfig.clickUrl))},t.prototype._dispatchEvent=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(this._events[t])for(var r=0,o=this._events[t].length;r<o;r++)(e=this._events[t])[r].apply(e,n)},t.prototype._bindEvents=function(t){var e=this;t&&c.forEach(function(n){t.addEventListener(n,e._videoEventListener)})},t.prototype._unbindEvents=function(t){var e=this;t&&c.forEach(function(n){t.removeEventListener(n,e._videoEventListener)})},t.prototype._getDummyAdBreaks=function(){var t=[],e=JSON.parse(JSON.stringify(a));e.adBreakId="dummy_preroll_break_1",e.mimetype=l,e.type=r.AdBreakType.PREROLL,e.duration=0,e.startOffset=0,e.adBreakItems.length=0;var n=JSON.parse(JSON.stringify(a));n.adBreakId="dummy_midroll_break_1",n.mimetype=l,n.type=r.AdBreakType.MIDROLL,n.duration=0,n.startOffset=15,n.adBreakItems.length=0;var i=JSON.parse(JSON.stringify(u));return i.adBreakId="dummy_overlay_break_1",i.mimetype=l,i.duration=0,i.startOffset=30,i.adBreakItems.length=0,t.push(e),t.push(n),t.push(i),t},t.prototype._maybeRenderNonLinearAdBreak=function(t){var e=this;this._currentMediaAdBreaks.forEach(function(n){n.type===r.AdBreakType.NON_LINEAR&&(t<n.startOffset&&t>n.startOffset-1?e.resolveAdBreak(n):t>n.startOffset&&t<n.startOffset+n.duration?e._renderNonLinearAdBreak(n):(t>n.startOffset+n.duration||t<n.startOffset)&&e._unrenderNonLinearAdBreak(n))})},t.prototype._renderNonLinearAdBreak=function(t){var e=this;if(!this._renderedNonLinearAdsMap[t.adBreakId]&&t.adBreakItems&&t.adBreakItems.length){var n=this._renderedNonLinearAdsMap[t.adBreakId]={};t.adBreakItems.forEach(function(t){e._renderNonLinearAdItem(t,e._nonLinearAdsContainer,n)})}},t.prototype._unrenderNonLinearAdBreak=function(t){var e=this;if(this._renderedNonLinearAdsMap[t.adBreakId]){var n=this._renderedNonLinearAdsMap[t.adBreakId];t.adBreakItems.forEach(function(t){e._unrenderNonLinearAdItem(t,n)}),delete this._renderedNonLinearAdsMap[t.adBreakId]}},t.prototype._renderNonLinearAdItem=function(t,e,n){if(t&&e){var r=e.querySelector("#dummy-overlay-ad-styles");r||((r=document.createElement("style")).setAttribute("id","dummy-overlay-ad-styles"),r.innerHTML="\n                div.dummy-overlay-ad {\n                    background-color: rgba(22, 135, 255, 0.55);\n                    cursor: pointer;\n                    height: 55px;\n                    width: 60%;\n                    position: absolute;\n                    bottom: 54px;\n                    left: 50%;\n                    transform: translateX(-50%)\n                }\n            ",e.appendChild(r));var o=document.createElement("div");o.classList.add("dummy-overlay-ad"),e.appendChild(o);var s=o.style.backgroundColor;o.onclick=function(){o.style.backgroundColor="red"!==o.style.backgroundColor?"red":s},n[t.adBreakItemId]={item:t,overlay:o},this._dispatchEvent(i.AdPluginEvent.NONLINEAR_AD_RENDERED,{adBreakItem:t})}},t.prototype._unrenderNonLinearAdItem=function(t,e){var n=e[t.adBreakItemId].overlay;if(n){n.onclick=null;var r=n.parentElement;if(r&&(r.removeChild(n),!r.querySelector(".dummy-overlay-ad"))){var o=r.querySelector("#dummy-overlay-ad-styles");r.removeChild(o)}delete e[t.adBreakItemId],this._dispatchEvent(i.AdPluginEvent.NONLINEAR_AD_CLEARED,{adBreakItem:t})}},t.prototype._handleVideoEnded=function(){this._skipRequested&&this._dispatchEvent(i.AdPluginEvent.SKIPPED,this._loadedAd),this._ended=!0,this._dispatchEvent(i.AdPluginEvent.PLAY_COMPLETE,this._loadedAd)},t.prototype._videoEventListener=function(t){if(!this._ended){var e=t.type,n=t.target;switch(e){case"timeupdate":this._dispatchEvent(i.AdPluginEvent.TIME_UPDATE,n.currentTime,n.duration),!this._impressionFired&&n.currentTime>3&&(this._impressionFired=!0,this._dispatchEvent(i.AdPluginEvent.METRICS,{evt:"ad_impression"}));break;case"ended":this._handleVideoEnded();break;case"error":if(this._stoppingVideo&&n.error&&4===n.error.code){this._handleVideoEnded();break}this._dispatchEvent(i.AdPluginEvent.PLAYBACK_ERROR,n.error);break;case"playing":this._dispatchEvent(i.AdPluginEvent.PLAYING,this._loadedAd);break;case"pause":this._stoppingVideo?this._handleVideoEnded():this._dispatchEvent(i.AdPluginEvent.PAUSED,this._loadedAd);break;case"volumechange":n.muted!==this._isMuted?this._dispatchEvent(i.AdPluginEvent.MUTE_CHANGED,n.muted):n.volume!==this._currentVol&&this._dispatchEvent(i.AdPluginEvent.VOLUME_CHANGED,n.volume)}}},t}();e.default=h},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),o=n(7),s=function(t){function e(){var e=t.call(this)||this;return e.mimetype=r.MediaItemMimeType.CONTAINER,e.type=o.PluginType.SOURCE_METADATA,e}return i(e,t),e}(n(117).default);e.default=s},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),r=n(7),o={id:"6b972eae-d38f-3dd8-8edd-cbcc8d011ded",mimetype:"media/dummy",metadata:{description:"Getting a handle on your spending is the linchpin in crafting a viable retirement plan.",duration:359,title:"How Much Will You Spend in Retirement?",thumbnail:"https://media.zenfs.com/en-US/video/morningstar_993/82a973fefacee4a6453cdd3d0201cb32",type:i.MediaItemType.VOD,videoTypes:[]}},s=function(){function e(){this.version="0.1.240",this.mimetype="media/dummy",this.type=r.PluginType.METADATA}return e.prototype.prepare=function(){},e.prototype.destroy=function(){},e.prototype.resolve=function(e,n,i){new Promise(function(e,n){try{t(function(){e(o)})}catch(t){n(t)}}).then(function(t){i.onComplete([t])}).catch(function(t){console.warn(t);var e={code:"1",message:t.toString()};i.onError(e)})},e.prototype.recover=function(t,e,n){},e.prototype.cancel=function(){},e}();e.default=s}).call(this,n(32).setImmediate)},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),r=n(7),o={id:"6b972eae-d38f-3dd8-8edd-cbcc8d011ded",mimetype:"media/dummy",metadata:{description:"Getting a handle on your spending is the linchpin in crafting a viable retirement plan.",duration:359,title:"How Much Will You Spend in Retirement?",thumbnail:"https://media.zenfs.com/en-US/video/morningstar_993/82a973fefacee4a6453cdd3d0201cb32",type:i.MediaItemType.VOD,videoTypes:[]},source:{streams:[{url:"https://edgecast-vod.yahoo.net/tripleplay4us/morningstar_993/data_zurEohCROAgK6-EqdlOAAIilWfEpIrQCHPio7iv9tNqR10TRO1-J_a3n86yRETqbG5jyjBm1cYI-~A3_34.m3u8",live:!1}]},adConfig:{mimetype:"adplugin/dummy",value:{status:{code:"OK"},rids:["5b055cf3868e8001c0ce8ceb"],aeg:[[{rid:"5b055cf3868e8001c0ce8ceb",url:"https://control-test-ec.adaptv.advertising.com/a/h/_2JTaTCrWEY+uCMYb2KK5XX9JxQsoPLbA6rc+znsxXm_uUWALVdHLfpJwmLgzlF0?cb=[CACHE_BREAKER]&pageUrl=http%3A%2F%2Faol.com&eov=eov&ctx.plid=5afc75ea3a04293dad9f1a1f&ctx.container_height=[CONTAINER_HEIGHT]&ctx.container_width=[CONTAINER_WIDTH]&gdpr=[GDPR]&gdpr_consent=[EUCONSENT]&lat=[LOCATION_LAT]&lon=[LOCATION_LON]&a.sdk=O2&mnc=[MNC]&pi.sound=[SOUND]&pi.sideviewInitiation=&spot_id=0&apid=[APID]&pi.autoInitiation=[AUTO_INITIATION]&session_id=[USID]&moatViewableOpportunity=[MOAT_PREBID]&p.vw.viewable=[P_VW_VIEWABLE]&pi.sideview=0&mcc=[MCC]&p.vw.viewableOpportunity=[P_VW_VIEWABLE_OPPORTUNITY]&a.d.pageUrl=&p.vw.active=[P_VW_ACTIVE]&width=[VIDEO_WIDTH]&a.ip=69.147.100.13&adapViewableOpportunity=[ADAP_VIEWABLE_OPPORTUNITY]&height=[VIDEO_HEIGHT]&pi.flashonpage=[FLASH_SUPPORT]&o2token=AAABY5NnbJTtTCwD_nMR7b-T0J3bbLBmWbo3Pw%3D%3D",adEngineType:"VAST",vendor:"569fa372e4b0e41110650e54",rcid:"5512a39b09eab108e072da23",name:"Test Unified Player - Ads test",usesShim:!1,useInlinePlayer:!1,adTypes:["Preroll"]}]],txid:"b7fd7e1d-dfbc-4415-aa2a-d7f69ed5d78b",apid:"O20b8295f4-5f80-11e8-9a8e-02425510c2bf",slot:"AVAIL",adxResult:"SHOW_ADS",usid:"96d299d4-9f22-419b-84be-5e68fe813386"}}},s=function(){function e(){this.version="0.1.240",this.mimetype="media/dummy",this.type=r.PluginType.SOURCE_METADATA}return e.prototype.prepare=function(){},e.prototype.destroy=function(){},e.prototype.resolve=function(e,n,i){new Promise(function(e,n){try{t(function(){e(o)})}catch(t){n(t)}}).then(function(t){i.onComplete([t])}).catch(function(t){console.warn(t);var e={code:"1",message:t.toString()};i.onError(e)})},e.prototype.recover=function(t,e,n){},e.prototype.cancel=function(){},e}();e.default=s}).call(this,n(32).setImmediate)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),r=n(7),o=n(33),s="content.uplynk.com",a={title:"",description:"",thumbnail:"",duration:0,type:i.MediaItemType.VOD},u=function(){function t(){this.version="0.1.240",this.mimetype=i.MediaItemMimeType.UPLYNK,this.type=r.PluginType.METADATA,this._cancelRequests=[],this._assetInfoFetched={},o.default.preconnect("preconnect-uplynk","//"+s)}return t.prototype.prepare=function(){},t.prototype.resolve=function(t,e,n){var i=this;if(Array.isArray(t)&&0!==t.length){var r=t.map(function(t){return new Promise(function(e,r){i._resolveMediaItem(t,e,r,n)})});this._cancelled=!1;var o=function(){i._cancelled=!0};this._cancelRequests.push(o),Promise.all(r).then(function(t){i._cancelled||(i._removeCancelRequest(o),n.onComplete(t))}).catch(function(t){if(console.warn(t),!i._cancelled){i._removeCancelRequest(o);var e={code:"1",message:t.toString()};n.onError(e)}})}},t.prototype.recover=function(t,e,n){},t.prototype.cancel=function(){this._cancelRequests.forEach(function(t){t()}),this._cancelRequests=[]},t.prototype.destroy=function(){this.cancel()},t.prototype._resolveMediaItem=function(t,e,n,r){var o=this,s=t.id,u=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t&&t.length?t[0]:null,s=t.length?t[4]:null,a=t.length?t[5]:null;o._cancelled||r.onApiCallInfo({url:a&&a.url||null,perfObj:s}),n(i)},l=function(n,i,u,l){t.metadata=t.metadata||{},t.metadata.title=n.meta&&n.meta.title||n.desc||a.title,t.metadata.description=n.desc||a.description,t.metadata.thumbnail=n.poster_url||a.thumbnail,t.metadata.duration=n.duration||a.duration,t.visualSeekData=t.visualSeekData||{mimetype:"visualseek/uplynk"},t.visualSeekData.assetInfo={maxSlice:n.max_slice,sliceDuration:n.slice_dur,thumbPrefix:n.thumb_prefix,thumbs:n.thumbs},o._assetInfoFetched[s]=!0,o._cancelled||r.onApiCallInfo({url:l&&l.url||null,perfObj:u}),e(t)};!function(){var n=t.metadata;if(!n||n.type!==i.MediaItemType.LIVE_CHANNEL&&n.type!==i.MediaItemType.LIVE_EVENT||o._setDefaultItemMetadata(t),o._hasAllRequiredMeta(t)||o._assetInfoFetched[s])return e(t);o._makeAssetInfoRequest(t,l,u)}()},t.prototype._makeAssetInfoRequest=function(t,e,n){var i=t.customConfig&&t.customConfig.sid,r="https://"+s+"/player/assetinfo/{assetid}.json".replace("{assetid}",t.id)+(i?"?pbs="+i:"");this._makeRequest(r,e,n)},t.prototype._makeRequest=function(t,e,n){var i=this,r=o.default.ajax(t,{context:this,successHandler:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];i._removeCancelRequest(r),e.apply(void 0,t)},failureHandler:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i._removeCancelRequest(r),n.apply(void 0,t)},withCookie:!1,responseTypeJson:!0,collectPerfData:!0});this._cancelRequests.push(r)},t.prototype._removeCancelRequest=function(t){if(t){var e=this._cancelRequests.indexOf(t);e>=0&&this._cancelRequests.splice(e,1)}},t.prototype._setDefaultItemMetadata=function(t){for(var e in t.metadata=t.metadata||{},a)void 0===t.metadata[e]&&(t.metadata[e]=a[e])},t.prototype._hasAllRequiredMeta=function(t){return!(!t||!t.metadata||void 0===t.metadata.title||void 0===t.metadata.description||void 0===t.metadata.thumbnail||void 0===t.metadata.duration)},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(39),r=n(26),o=n(58),s=n(15),a=n(7),u=n(33),l=n(4),c="content.uplynk.com",d={$schema:"http://json-schema.org/draft-06/schema#",type:"object",properties:{playURL:{type:"string"}},required:["playURL"]},h=function(){function t(){this.version="0.1.240",this.mimetype=s.MediaItemMimeType.UPLYNK,this.type=a.PluginType.SOURCE_METADATA,this._cancelRequests=[],this._gdprParams={},this._recovering=!1,this._cancelled=!1,u.default.preconnect("preconnect-uplynk","//"+c)}return t.prototype.prepare=function(){},t.prototype.resolve=function(t,e,n){var i=this;if(Array.isArray(t)&&0!==t.length){this._gdprParams=this._getGdprParams(e.gdprConsent);var r=t.map(function(t){return new Promise(function(e,r){i._resolveMediaItem(t,e,r,n)})});this._cancelled=!1;var o=function(){i._cancelled=!0};this._cancelRequests.push(o),Promise.all(r).then(function(t){i._cancelled||(i._removeCancelRequest(o),n.onComplete(t))}).catch(function(t){if(console.warn(t),!i._cancelled){i._removeCancelRequest(o);var e={code:"1",message:t.toString()};n.onError(e)}}),this._recovering=!1}},t.prototype.recover=function(t,e,n){t&&(this._recovering=!0,this.resolve([t],e,n))},t.prototype.cancel=function(){this._cancelRequests.forEach(function(t){t()}),this._cancelRequests=[]},t.prototype.destroy=function(){this.cancel()},t.prototype._resolveMediaItem=function(t,e,n,r){var o=this;this._hasValidSource(t)&&!this._recovering?e(t):this._makePreplayRequest(t,function(a,u,l,c){var h=a&&i.validate(a,d);if(!h||!h.valid)return n("Invalid preplay response");var p=a.sid,f=t.metadata,_=f&&(f.type===s.MediaItemType.LIVE_EVENT||f.type===s.MediaItemType.LIVE_CHANNEL);t.source={streams:[{url:a.playURL,live:_}]},t.customConfig=t.customConfig||{},t.customConfig.sid=p,t.customConfig.prefix=a.prefix,a.ads&&a.ads.breaks&&a.ads.breaks.length>0&&(t.adBreaks=o._transformAdBreaks(a.ads.breaks,a.ads.breakOffsets),t.visualSeekData=t.visualSeekData||{mimetype:"visualseek/uplynk"},t.visualSeekData.adBreaks=t.adBreaks),o._cancelled||r.onApiCallInfo({url:c&&c.url||null,perfObj:l}),e(t)},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t&&t.length?t[0]:null,s=t.length?t[4]:null,a=t.length?t[5]:null;o._cancelled||r.onApiCallInfo({url:a&&a.url||null,perfObj:s}),n(i)})},t.prototype._makePreplayRequest=function(t,e,n){var i="/api/v3/preplay/{assetid}.json",r=t.metadata;r&&r.type===s.MediaItemType.LIVE_CHANNEL?i="/api/v3/preplay/channel/{assetid}.json":r&&r.type===s.MediaItemType.LIVE_EVENT&&(i="/api/v3/preplay/event/{assetid}.json");var o=t.customConfig||{},a="https://"+c+i.replace("{assetid}",t.id)+(o.preplay&&o.preplay.qs?"?"+o.preplay.qs:"");this._makeRequest(a,e,n)},t.prototype._makeRequest=function(t,e,n){var i=this,r=u.default.ajax(t,{context:this,successHandler:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];i._removeCancelRequest(r),e.apply(void 0,t)},failureHandler:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i._removeCancelRequest(r),n.apply(void 0,t)},withCookie:!1,responseTypeJson:!0,collectPerfData:!0});this._cancelRequests.push(r)},t.prototype._removeCancelRequest=function(t){if(t){var e=this._cancelRequests.indexOf(t);e>=0&&this._cancelRequests.splice(e,1)}},t.prototype._hasValidSource=function(t){return!!(t.source&&t.source.streams&&t.source.streams.length)},t.prototype._transformAdBreaks=function(t,e){var n=this;return t.map(function(t){var i=e&&e.find(function(e){if(e&&e.timeOffset===t.timeOffset)return!0})||{};return{adBreakId:t.breakId||"",duration:t.duration||0,startOffset:t.timeOffset||0,type:n._mapAdBreakPosition(t.position),adBreakItems:n._transformAds(t.ads),customInfo:{index:i.index}}})},t.prototype._transformAds=function(t){return t.map(function(t){return{adBreakItemId:t.creative||"",duration:t.duration||0,type:o.AdBreakItemType.AD,instream:!0,interactionConfig:{allowSeek:!1,allowSkipOffset:0,chromeless:!1},customInfo:{}}})},t.prototype._mapAdBreakPosition=function(t){return"preroll"===t?r.AdBreakType.PREROLL:"midroll"===t?r.AdBreakType.MIDROLL:"postroll"===t?r.AdBreakType.POSTROLL:null},t.prototype._getGdprParams=function(t){return{gdpr:t&&!l.isNullOrUndefined(t.gdprApplies)?t.gdprApplies:"",euconsent:t&&t.consentData||""}},t}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(11),o=n(7),s=n(4),a=n(0),u=n(269),l=function(){function t(){this.version="0.1.240",this.mimetype="playlist/simple",this.type=o.PluginType.PLAYLIST}return t.prototype.prepare=function(){},t.prototype.destroy=function(){},t.prototype.create=function(t,e,n){var i=this._getTemplateItems(t,e),r=document.createElement("div");return r.innerHTML=u.render({items:i,strings:n}),Array.prototype.slice.call(r.children)},t.prototype._formatDuration=function(t){return t&&s.isNumber(t)?a.default.formatTime(t):""},t.prototype._formatTitle=function(t){var e=i.userAgent.chrome>43;return t?t.length>40&&!e?t.substring(0,40)+"...":t:""},t.prototype._formatProvider=function(t,e){return t===r.PLAYLIST_POS.RIGHT&&e&&e.branding&&e.branding.providerName?e.branding.providerName:""},t.prototype._getTemplateItems=function(t,e){var n=this,i=[];return e.forEach(function(e){e&&e.metadata&&e.metadata.thumbnail&&i.push({id:e.id,title:n._formatTitle(e.metadata.title),thumbnail:e.metadata.thumbnail,duration:n._formatDuration(e.metadata.duration),provider:n._formatProvider(t,e.brandingData)})}),i},t}();e.default=l},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.s(i.f("items",t,e,1),t,e,0,10,562,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b('<li class="vp-playlist-item" data-id=\''),i.b(i.v(i.f("id",t,e,0))),i.b("'>"),i.b("\n"+n),i.b('    <img class="vp-playlist-item-image" src=\''),i.b(i.v(i.f("thumbnail",t,e,0))),i.b("'/>"),i.b("\n"+n),i.b('    <div class="vp-playlist-border"></div>'),i.b("\n"+n),i.b('    <div class="vp-playlist-item-gradient">'),i.b("\n"+n),i.b('        <div class="vp-pl-meta">'),i.b("\n"+n),i.b("            <span class='vp-pl-title'>"),i.b(i.v(i.f("title",t,e,0))),i.b("</span>"),i.b("\n"+n),i.b("            <span class='vp-now-playing'>"),i.b(i.v(i.d("strings.NOW_PLAYING",t,e,0))),i.b("</span>"),i.b("\n"+n),i.s(i.f("provider",t,e,1),t,e,0,392,470,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("                <span class='vp-pl-provider'>"),i.b(i.v(i.f("provider",t,e,0))),i.b("</span>"),i.b("\n"+n)}),t.pop()),i.b("        </div>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("    <div class='vp-pl-dur'>"),i.b(i.v(i.f("duration",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("</li>"),i.b("\n"+n)}),t.pop()),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),o=n(0),s=function(t){function e(){var e=t.call(this)||this;return e.mimetype="visualseek/uplynk",e._visualSeekMetadataMap={},e}return i(e,t),e.prototype.destroy=function(){this._visualSeekMetadataMap={}},e.prototype.canSeek=function(t){return t&&!!this._visualSeekMetadataMap[t]},e.prototype.update=function(t,e){var n=this._visualSeekMetadataMap[t]||{};n.assetInfo=e&&e.assetInfo||n.assetInfo,n.adBreaks=e&&e.adBreaks||n.adBreaks,this._visualSeekMetadataMap[t]=n},e.prototype.getThumbnailData=function(t,e,n){if(!r.isString(t)||!r.isNumber(e))return null;var i=this._visualSeekMetadataMap[t].assetInfo;if(!(i&&i.thumbs&&i.thumbPrefix&&i.sliceDuration&&i.maxSlice))return null;var o=this.getUrl(t,e,n);return{isAd:"AD"===o,url:o,width:this.getWidth(t,n),height:this.getHeight(t,n)}},e.prototype.getUrl=function(t,e,n){var i=this._visualSeekMetadataMap[t],r=i.assetInfo,s=r.thumbPrefix,a=this.getThumbInfo(t,n),u=e,l=0,c=!1,d=null,h=0;if(i.adBreaks&&i.adBreaks.length){if(i.adBreaks.some(function(t){if(t.startOffset<e&&t.startOffset+t.duration>e)return c=!0,!0;if(t.startOffset<=e)l+=t.duration,d=t;else if(t.startOffset>e)return!0;return!1}),c)return"AD";h=d&&d.customInfo&&d.customInfo.index||0,u=Math.max(0,u-l)}var p=Math.floor(u/r.sliceDuration)+h;p=Math.min(p,r.maxSlice);var f=o.default.decimalToHexString(p,8,"0");return s+a.prefix+f+".jpg"},e.prototype.getWidth=function(t,e){return this.getThumbInfo(t).width},e.prototype.getHeight=function(t,e){return this.getThumbInfo(t).height},e.prototype.getThumbInfo=function(t,e){void 0===e&&(e=128);var n=this._visualSeekMetadataMap[t].assetInfo.thumbs;return n&&n.length?1===n.length?n[0]:n.find(function(t){return t.width===e})||n[0]:{width:0,height:0,prefix:""}},e}(n(80).default);e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(11),r=n(18),o=n(0),s=function(){function t(t){this._controller=t,this._model=t.model}return t.prototype.play=function(t,e){this._controller.getPlaybackState()===r.States.INIT&&t>0&&t<this.getDuration()&&(this._controller.startTime=t);var n={type:i.REQUEST_TYPES.API,action:null};e&&o.default.isValidRequestAction(e.requestAction)&&(n.action=e.requestAction),this._controller.play(n)},t.prototype.pause=function(t){var e={type:i.REQUEST_TYPES.API,action:null};t&&o.default.isValidRequestAction(t.requestAction)&&(e.action=t.requestAction),this._controller.pause(e)},t.prototype.preload=function(t){this._controller.preload(t)},t.prototype.seek=function(t){this._controller.seek(t)},t.prototype.disableControls=function(){this._controller.disableControls()},t.prototype.enableControls=function(){this._controller.enableControls()},t.prototype.enableCC=function(t){this._controller.enableCC(t)},t.prototype.disableCC=function(){this._controller.disableCC()},t.prototype.isPlaying=function(){return this._controller.isPlayMode()},t.prototype.isPlayMode=function(){return this._controller.isPlayMode()},t.prototype.getPlaybackState=function(){return this._controller.getPlaybackState()},t.prototype.isLoading=function(){return this._controller.isLoading()},t.prototype.getDuration=function(){return this._controller.duration},t.prototype.getRawDuration=function(){return this._controller.rawDuration},t.prototype.getCurrentTime=function(){return this._controller.currentTime},t.prototype.getRawCurrentTime=function(){return this._controller.rawCurrentTime},t.prototype.getTimeRemaining=function(){return this.getDuration()-this.getCurrentTime()},t.prototype.setFullscreen=function(t){this._controller.fullscreen=t},t.prototype.getFullscreen=function(){return this._controller.fullscreen},t.prototype.setVolume=function(t){t=(t=t<0?0:t)>1?1:t,this._controller.volume=t},t.prototype.getVolume=function(){return this._controller.volume},t.prototype.setMute=function(t){this._controller.mute=t},t.prototype.getMute=function(){return this._controller.mute},t.prototype.setLoop=function(t){this._controller.loop=t},t.prototype.setContinuousPlay=function(t){this._controller.continuousPlay=t},t.prototype.resumeContinuousPlay=function(){var t={type:i.REQUEST_TYPES.API};this._controller.resumeContinuousPlay(t)},t.prototype.getCurrentDate=function(){return this._controller.currentDate},t.prototype.setAudioLanguage=function(t){},t}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._controller=t,this._playlist=this._controller.getPlaylist()}return t.prototype.getMediaItems=function(){return this._playlist.getItems()},t.prototype.removeAllMediaItems=function(){var t=this._playlist.size;this._playlist.removeItems(0,t)},t.prototype.removeMediaItems=function(t){var e=this;t.forEach(function(t){var n=e._playlist.getItemPosition(t.id);e._playlist.removeItems(n,1)})},t.prototype.insertMediaItems=function(t,e){if(Array.isArray(t)){for(var n=this._shouldPrefetchMetadata(t),i=e,r=0,o=t;r<o.length;r++){var s=o[r];this._playlist.addItemAtIndex(s,i),i++}n&&this._controller.fetchMetadata()}},t.prototype.appendMediaItems=function(t){if(Array.isArray(t)){var e=this._shouldPrefetchMetadata(t);this._playlist.addItems(t),e&&this._controller.fetchMetadata()}},t.prototype.getCurrentMediaItem=function(){return this._playlist.getCurrentItem()},t.prototype.setCurrentMediaItem=function(t){if(this._controller.mediaStore.get(t.id)){var e=this._playlist.getItemPosition(t.id);this._playlist.setPosition(e)}else this._playlist.addItems([t]),this._controller.fetchMetadata(),this._playlist.setPosition(this._playlist.size-1)},t.prototype._shouldPrefetchMetadata=function(t){var e=this._controller.mediaStore;return t.filter(function(t){var n=t.id;return null===e.get(n)}).length>0},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.configSchema={$schema:"http://json-schema.org/draft-06/schema#",type:"object",properties:{adPlaybackOnly:{type:"boolean"},analytics:{type:"boolean"},autoplay:{type:"boolean"},casting:{type:"boolean"},continuousPlay:{type:"boolean"},enableRecovery:{type:"boolean"},fullscreen:{type:"boolean"},height:{type:"number"},lang:{type:"string"},loop:{type:"boolean"},mediaItems:{type:"array",items:[{$ref:"/mediaItemSchema"}],minItems:1},mute:{type:"boolean"},preload:{type:"boolean"},region:{type:"string"},site:{type:"string"},skipOnError:{type:"string",enum:["always","timebased","never"]},stopBufferingOnPause:{type:"boolean"},ui:{$ref:"/uiSchema"},width:{type:"number"},ads:{type:"object",properties:{timeout:{type:"object",properties:{load:{type:"number",minimum:1},start:{type:"number",minimum:1}}}}}},required:["mediaItems"]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uiSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/uiSchema",type:"object",properties:{ccOnMute:{type:"boolean"},chromeless:{type:"boolean"},docking:{type:"object",properties:{enableOnMuted:{type:"boolean"},enableOnScrollDown:{type:"boolean"},enableOnScrollUp:{type:"boolean"},fadeInAnimation:{type:"boolean"},height:{type:"number"},position:{type:"object",properties:{bottom:{type:"number"},left:{type:"number"},right:{type:"number"},top:{type:"number"}}},showInfoCard:{type:"boolean"},threshold:{type:"number"},width:{type:"number"}}},endScreen:{type:"object",properties:{show:{type:"boolean"}}},playlist:{type:"object",properties:{inStream:{type:"boolean"},show:{type:"boolean"},position:{type:"string",enum:["right","bottom","hidden"]},theme:{type:"string",enum:["dark","light"]}}},showControls:{type:"boolean"},showFullscreenButton:{type:"boolean"},startScreen:{type:"object",properties:{show:{type:"boolean"},showButton:{type:"boolean"},showDescription:{type:"boolean"},showProvider:{type:"boolean"},showTitle:{type:"boolean"}}},title:{type:"object",properties:{showOnHover:{type:"boolean"},showOnStart:{type:"string"}}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(4),o=n(0),s=n(2),a=n(276),u=function(){function t(t,e){this._config=t,this.startTime=Date.now(),this._profileItems=[],this._eventBus=e,this._eventKeys={},this._handleEvents()}return t.prototype.getItem=function(t){var e=this._findItem(t);return e>-1?this._profileItems[e]:null},t.prototype.render=function(t){var e,n=this._profileItems.slice(0);n.forEach(function(t){t.startWidth=t.startTime/4,t.barWidth=t.timeDiff/4});try{e=JSON.parse(JSON.stringify(this._config))}catch(t){e={}}var r=o.default.render(a,{config:JSON.stringify(e,null,2),profileItems:n});if(t){var s=document.createElement("div");s.appendChild(r),s.appendChild(t),r=s}if(i.userAgent.mobile)document.write(r.innerHTML);else{var u=window.open();u&&u.document.write(r.innerHTML)}},t.prototype.destroy=function(){this._eventBus.removeEventListeners(this._eventKeys)},t.prototype._findItem=function(t){for(var e=0;e<this._profileItems.length;e++){var n=this._profileItems[e];if(t.type===n.type)return e}return-1},t.prototype._handleEvents=function(){var t=this;this._eventKeys[s.PROFILE_START]=this._eventBus.addEventListener(s.PROFILE_START,function(e){void 0===e&&(e=[]),(e=r.isArray(e)?e:[e]).forEach(function(e){t._start(e)})},this),this._eventKeys[s.PROFILE_END]=this._eventBus.addEventListener(s.PROFILE_END,function(e){void 0===e&&(e=[]);for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];(e=r.isArray(e)?e:[e]).forEach(function(e){t._end.apply(t,[e].concat(n))})},this)},t.prototype._start=function(t){var e=this._findItem(t);e>-1&&this._profileItems.splice(e,1),this._profileItems.push({type:t.type,desc:t.desc,startTime:Date.now()-this.startTime,endTime:void 0})},t.prototype._end=function(t,e,n){void 0===e&&(e=Date.now()),void 0===n&&(n=!0);var i=this.getItem(t);e||(e=Date.now(),n=!0),i&&void 0===i.endTime&&(i.endTime=n?e-this.startTime:e,i.timeDiff=i.endTime-(i.startTime||0))},t}();e.Profiler=u},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div>"),i.b("\n"+n),i.b("    <pre>"),i.b("\n"+n),i.b(i.v(i.f("config",t,e,0))),i.b("\n"+n),i.b("    </pre>"),i.b("\n"+n),i.b("    <table border='1'>"),i.b("\n"+n),i.b("        <style>"),i.b("\n"+n),i.b("            .bars {"),i.b("\n"+n),i.b("                white-space: nowrap;"),i.b("\n"+n),i.b("            }"),i.b("\n"+n),i.b("            .bars div {"),i.b("\n"+n),i.b("                display: inline-block;"),i.b("\n"+n),i.b("                height: 25px;"),i.b("\n"+n),i.b("            }"),i.b("\n"+n),i.b("            .bar {"),i.b("\n"+n),i.b("                background-color: #714fff;"),i.b("\n"+n),i.b("                border: 1px solid #000;"),i.b("\n"+n),i.b("            }"),i.b("\n"+n),i.b("        </style>"),i.b("\n"+n),i.b("        <tr>"),i.b("\n"+n),i.b("            <th>Type</th>"),i.b("\n"+n),i.b("            <th>Description</th>"),i.b("\n"+n),i.b("            <th>Start</th>"),i.b("\n"+n),i.b("            <th>End</th>"),i.b("\n"+n),i.b("            <th>Diff</th>"),i.b("\n"+n),i.b("            <th>Bar</th>"),i.b("\n"+n),i.b("        </tr>"),i.b("\n"+n),i.s(i.f("profileItems",t,e,1),t,e,0,602,1024,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("            <tr>"),i.b("\n"+n),i.b("                <td>"),i.b(i.v(i.f("type",t,e,0))),i.b("</td>"),i.b("\n"+n),i.b("                <td>"),i.b(i.v(i.f("desc",t,e,0))),i.b("</td>"),i.b("\n"+n),i.b("                <td>"),i.b(i.v(i.f("startTime",t,e,0))),i.b("</td>"),i.b("\n"+n),i.b("                <td>"),i.b(i.v(i.f("endTime",t,e,0))),i.b("</td>"),i.b("\n"+n),i.b("                <td>"),i.b(i.v(i.f("timeDiff",t,e,0))),i.b("</td>"),i.b("\n"+n),i.b("                <td class='bars'>"),i.b("\n"+n),i.b("                    <div style='width: "),i.b(i.v(i.f("startWidth",t,e,0))),i.b("px;'></div>"),i.b("\n"+n),i.b("                    <div class='bar' style='width: "),i.b(i.v(i.f("barWidth",t,e,0))),i.b("px;'></div>"),i.b("\n"+n),i.b("                </td>"),i.b("\n"+n),i.b("            </tr>"),i.b("\n"+n)}),t.pop()),i.b("    </table>"),i.b("\n"+n),i.b("</div>"),i.b("\n"),i.fl()},partials:{},subs:{}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.PAUSED="paused",t.PLAYING="playing",t.WAITING="waiting"}(e.PlayerState||(e.PlayerState={})),function(t){t.NONE="none",t.AIRPLAY="airplay",t.CHROMECAST="chromecast",t.HDMI="hdmi"}(e.CastDeviceType||(e.CastDeviceType={})),function(t){t.NOT_CONNECTED="not-connected",t.CONNECTING="connecting",t.CONNECTED="connected"}(e.CastConnectionState||(e.CastConnectionState={}))},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(6),o=n(39),s=n(8),a=n(279),u=n(307),l=n(309),c=n(310),d=n(311),h=n(312),p=n(313),f=n(314),_=n(315),m=n(316),y=n(317),v=n(318),g=n(319),E=n(23),b=function(t){function e(e,n){var i=t.call(this,"OathPlayer")||this;return i._selector="",i.version="8.0.85",i.playerType="desktop",i.jshlsVer="1.1.210",i.vdmsVer="0.1.240",i._oathConfig=e,e=E.default.isLegacyConfig(e)?E.default.transformLegacyConfig(e):e,i._validateConfig(e),i._controller=new a.default(e,n,i),i._controller.initialize(),i._controls=new u.default(i._controller),i._playlist=new g.default(i._controller.getPlaylist()),i._exposeApis(),i}return i(e,t),e.prototype.render=function(t){return this._selector=t,this._controller.render(t),this},e.prototype.destroy=function(){this._controller.destroy(),t.prototype.destroy.call(this)},e.prototype.getCurrentTime=function(){return this._controller.getCurrentTime()},e.prototype.getCurrentDate=function(){return this._controller.getCurrentDate()},e.prototype.getVolume=function(){return this._controller.getVolume()},e.prototype.setQueryString=function(t){},e.prototype.removeAllMediaItems=function(){return!0},e.prototype.play=function(t){void 0===t&&(t=0),this._controls.play(t,null)},e.prototype.pause=function(){this._controls.pause(null)},e.prototype.mute=function(){this._controls.setMute(!0)},e.prototype.unMute=function(){this._controls.setMute(!1)},e.prototype.setVolume=function(t){this._controls.setVolume(t)},e.prototype.seek=function(t){this._controls.seek(t)},e.prototype.getMediaStore=function(){return this._controller.getMediaStore()},e.prototype.isPlaying=function(){return this._controller.isPlayMode()},e.prototype.isPlayMode=function(){return this._controller.isPlayMode()},e.prototype.isDocked=function(){return this._controller.isDocked()},e.prototype.isLoading=function(){return this._controller.isLoading()},e.prototype.getVideoElement=function(){return this._controller.getVideoElement()},e.prototype.updateDockingConfig=function(t,e,n,i,r,o){this._controller.updateDockingConfig(t,e,n,i,r,o)},e.prototype.on=function(e,n,i){var r,o=this;if(Object.keys(s.Events).some(function(t){return s.Events[t]===e})){var a=this._controller.addVdmsListener(e,n);r=function(){o._controller.removeVdmsListener(e,a)}}else{var u=t.prototype.addEventListener.call(this,e,n,i);r=function(){t.prototype.removeEventListener.call(o,e,u)}}return r.detach=r,r},e.prototype.suspend=function(){this._controller.suspend()},e.prototype.resume=function(){this._controller.resume(),this._playlist.playlist=this._controller.getPlaylist()},e.prototype.updateGeoConfig=function(t){this._controller.updateGeoConfig(t)},e.prototype.getPlaybackStartDto=function(){return this._controller.getPlaybackStartDto()},Object.defineProperty(e.prototype,"guid",{get:function(){return this._controller&&this._controller.guid||""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oathConfig",{get:function(){return this._oathConfig},enumerable:!0,configurable:!0}),e.prototype._exposeApis=function(){if(E.default.isOathDomain()){this.playlist=this._playlist,this.controls=this._controls,this.config=this._oathConfig}},e.prototype._validateConfig=function(t){try{var e=new o.Validator;e.addSchema(l.baseconfigSchema,"/baseconfigSchema"),e.addSchema(c.closedcaptionsSchema,"/closedcaptionsSchema"),e.addSchema(d.cmsSchema,"/cmsSchema"),e.addSchema(p.ctvSchema,"/ctvSchema"),e.addSchema(_.metricsSchema,"/metricsSchema"),e.addSchema(m.playbackSchema,"/playbackSchema"),e.addSchema(y.uiSchema,"/uiSchema"),e.addSchema(v.yvapSchema,"/yvapSchema"),e.addSchema(f.failoverSchema,"/failoverSchema"),e.validate(t,h.configSchema,{throwError:!0})}catch(t){var n="Invalid player config: "+t.property+" "+t.message;throw console.error(n),new Error(n)}},e}(r.default);e.default=b},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};Object.defineProperty(e,"__esModule",{value:!0});var o=n(280),s=n(6),a=n(1),u=n(8),l=n(47),c=n(281),d=n(287),h=n(291),p=n(124),f=n(294),_=n(295),m=n(297),y=n(298),v=n(299),g=n(301),E=n(302),b=n(121),A=n(303),S=n(305),T=function(t){function e(e,n,i){var r=t.call(this,"OathController")||this;return r._plugins=[],r._suspendedStateData=null,r._networkRestrictionVerifier=null,r._config=e,r._mediaStore=n,r._player=i,r._model=new g.default(e,n),r._playlistController=new v.default(r._model),r._config.analytics=!1,r._vdmsPlayer=r._createPlayer(),r._analytics=new _.default(r._player),r._marketingPx=new y.default(r._player),r._comscoreAnalytics=new m.default(r._player),r._view=new S.default,r._vdmsPlayer.on(u.Events.PLAYBACK_START,r._onMediaItemPlaybackStarted,r),r}return i(e,t),e.prototype.destroy=function(){this._model.destroy(),this._vdmsPlayer.destroy(),this._analytics.destroy(),this._vdmsPlayerProxy&&this._vdmsPlayerProxy.destroy(),this._networkRestrictionVerifier&&(this._networkRestrictionVerifier.destroy(),this._networkRestrictionVerifier=null),t.prototype.destroy.call(this)},e.prototype.initialize=function(){var t=this;this._vdmsPlayer.addMetricsEventListener(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=Array.prototype.slice.call(e,0,e.length-1),o=e[e.length-1],s=t._model.getEventsDto();s.playerVersion=t._player.version,t._player.publish.apply(t._player,i.concat(r({},o,s)))},this),this._bindEvents(),this._registerPlugins(),this._vdmsPlayer.initialize()},e.prototype.render=function(t){this._vdmsPlayer.render(t)},e.prototype.getCurrentTime=function(){return this._vdmsPlayer.getCurrentTime()},e.prototype.getCurrentDate=function(){return this._vdmsPlayer.getCurrentDate()},e.prototype.getVolume=function(){return this._vdmsPlayer.getVolume()},e.prototype.getMediaStore=function(){return this._vdmsPlayer.getMediaStore()},e.prototype.getCurrentMediaItem=function(){return this.getPlaylist().getCurrentItem()},e.prototype.getPlaybackState=function(){return this._vdmsPlayer.getPlaybackState()},e.prototype.play=function(t){return this._vdmsPlayer.play(t)},e.prototype.setStartTime=function(t){this.seek(t)},e.prototype.pause=function(t){this._vdmsPlayer.pause()},e.prototype.preload=function(t){console.error("PRELOAD is not implemented")},e.prototype.seek=function(t){this._vdmsPlayer.seek(t)},e.prototype.disableControls=function(){this._vdmsPlayer.disableControls()},e.prototype.enableControls=function(){this._vdmsPlayer.enableControls()},e.prototype.enableCC=function(t){return this._vdmsPlayer.enableCC(t)},e.prototype.disableCC=function(){return this._vdmsPlayer.disableCC()},e.prototype.isPlayMode=function(){return this._vdmsPlayer.isPlayMode()},e.prototype.isLoading=function(){return this._vdmsPlayer.isLoading()},e.prototype.setFullscreen=function(t){this._vdmsPlayer.setFullscreen(t)},e.prototype.getFullscreen=function(){return this._vdmsPlayer.getFullscreen()},e.prototype.setVolume=function(t){this._vdmsPlayer.setVolume(t)},e.prototype.setMute=function(t){this._vdmsPlayer.setMute(t)},e.prototype.getMute=function(){return this._vdmsPlayer.getMute()},e.prototype.setLoop=function(t){return this._vdmsPlayer.setLoop(t)},e.prototype.setContinuousPlay=function(t){return this._vdmsPlayer.setContinuousPlay(t)},e.prototype.resumeContinuousPlay=function(t){this._vdmsPlayer.resumeContinuousPlay()},e.prototype.setAudioLanguage=function(t){this._vdmsPlayer.setAudioLanguage(t)},e.prototype.isDocked=function(){return this._vdmsPlayer._controller.docked},e.prototype.addVdmsListener=function(t,e){return this._vdmsPlayer.addEventListener(t,e,this._player)},e.prototype.removeVdmsListener=function(t,e){return this._vdmsPlayer.removeEventListener(t,e)},e.prototype.getPlaybackStartDto=function(){return this._vdmsPlayer.getPlaybackStartDto()},e.prototype.updateDockingConfig=function(t,e,n,i,r,o){this._vdmsPlayer.updateDockingConfig(t,e,n,i,r,o)},e.prototype.getPlaylist=function(){return this._vdmsPlayer.getPlaylist()},e.prototype.suspend=function(){var t=this._vdmsPlayer.suspendState();t&&(this._suspendedStateData=t,this._destroyPlugins())},e.prototype.resume=function(){this._suspendedStateData&&(this._vdmsPlayer.resumeState(this._suspendedStateData),this._registerPlugins(),this._vdmsPlayer.initialize(),this._vdmsPlayer.render(this._suspendedStateData.selector),this._playlistController.playlist=this.getPlaylist(),this._suspendedStateData=null)},e.prototype.updateGeoConfig=function(t){this._model.updateGeoConfig(t)},e.prototype.getVideoElement=function(){return this._vdmsPlayer.getVideoElement()},Object.defineProperty(e.prototype,"guid",{get:function(){return this._vdmsPlayer&&this._vdmsPlayer.guid||""},enumerable:!0,configurable:!0}),e.prototype._createPlayer=function(t){void 0===t&&(t=!0);var e=this._config,n=e.mediaItems;e.playlist;if(this._model.playlistId&&(!n||0===n.length)){var i=this._createPlayerProxy();return this._resolvePlaylistId(),i}return this._createVdmsPlayer()},e.prototype._createPlayerProxy=function(){return this._vdmsPlayer?this._vdmsPlayer:(this._vdmsPlayerProxy=new A.default,this._vdmsPlayerProxy.getProxy())},e.prototype._createVdmsPlayer=function(){var t=new u.Player(this._config,this._mediaStore);return this._playlistController.playlist=t.getPlaylist(),this._model.guid=t.guid,t},e.prototype._onMediaItemPlaybackStarted=function(t){var e=t.brandingData&&t.brandingData.branding,n=e&&e.providerId,i=navigator.platform.toLowerCase(),r=["mac"].some(function(t){return i.indexOf(t)>-1}),o=t.isLive&&"nfl_season_live_game_761"===n;a.userAgent.mobile&&o&&r&&this._vdmsPlayer.__setError("info","P","100","203")},e.prototype._resolvePlaylistId=function(){var t=this;this._vdmsPlayerProxy&&this._playlistController.fetchMore(function(e,n){t._vdmsPlayerProxy&&(!e&&n&&(t._config.mediaItems=n),t._vdmsPlayer=t._createVdmsPlayer(),t._vdmsPlayerProxy.execute(t._vdmsPlayer),t._vdmsPlayerProxy.destroy(),t._vdmsPlayerProxy=void 0)})},e.prototype._bindEvents=function(){this._vdmsPlayer.on(u.Events.PLAYBACK_START,this._handlePlaybackStart,this),this._vdmsPlayer.on(u.Events.PLAYER_RENDERED,this._handlePlayerRendered,this),this._vdmsPlayer.on(u.Events.MEDIA_ITEM_METADATA,this._handleMediaItemMetadataAvailable,this),this._vdmsPlayer.on(u.Events.MEDIA_ITEM_ENDED,this._handleMediaItemEnded,this),this._vdmsPlayer.once("opss-visibility-changed",this._handleOpssVisibilityChanged,this)},e.prototype._handlePlaybackStart=function(){this._playlistController.onPlaybackStart()},e.prototype._handlePlayerRendered=function(){this._playlistController.onPlayerRendered()},e.prototype._handleMediaItemMetadataAvailable=function(t,e){this._networkRestrictionVerifier&&(this._networkRestrictionVerifier.destroy(),this._networkRestrictionVerifier=null),t.customConfig&&t.customConfig.allowedConnectionTypes&&(this._networkRestrictionVerifier=new E.default(this._model,t.rawItemData),this._scheduleNextNetworkRestrictionVerification())},e.prototype._handleMediaItemEnded=function(){this._networkRestrictionVerifier&&(this._networkRestrictionVerifier.destroy(),this._networkRestrictionVerifier=null)},e.prototype._handleOpssVisibilityChanged=function(t,e){var n={version:this._player.version,config:this._player.oathConfig};this._view.updateOathPlayerOpss(t,e,n)},e.prototype._scheduleNextNetworkRestrictionVerification=function(t){var e=this;void 0===t&&(t=18e4),this._networkRestrictionVerifier&&this._networkRestrictionVerifier.scheduleVerification(function(t){t?e._scheduleNextNetworkRestrictionVerification():e._vdmsPlayer.__setError("info","R",l.errorCodes.E_PLAYER,l.errorCodes.INFO_CODES.E_SAPI_RESTRICTED_NETWORK_TYPE,b.default.ERR_RESTRICTED_NETWORK_TYPE)},t)},e.prototype._registerPlugins=function(){var t=this;this._plugins.push(new c.default),this._plugins.push(new d.default(this._model)),this._plugins.push(new h.default(this._model)),this._plugins.push(new f.default),this._plugins.push(new o.VrmAdPlugin),this._plugins.push(new p.default),this._plugins.forEach(function(e){t._vdmsPlayer.registerPlugin(e)})},e.prototype._destroyPlugins=function(){this._plugins.forEach(function(t){t.destroy()}),this._plugins=[]},e}(s.default);e.default=T},function(module,exports,__webpack_require__){(function(global){var Oa="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},Ua="undefined"!=typeof window&&window===this?this:void 0!==global&&null!=global?global:this;function $a(t,e){if(e){var n=Ua;t=t.split(".");for(var i=0;i<t.length-1;i++){var r=t[i];r in n||(n[r]={}),n=n[r]}(e=e(i=n[t=t[t.length-1]]))!=i&&null!=e&&Oa(n,t,{configurable:!0,writable:!0,value:e})}}function ab(){ab=function(){},Ua.Symbol||(Ua.Symbol=Bb)}$a("String.prototype.startsWith",function(t){return t||function(t,e){if(null==this)throw new TypeError("The 'this' value for String.prototype.startsWith must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var n=this+"",i=n.length,r=(t+="").length;e=Math.max(0,Math.min(0|e,n.length));for(var o=0;o<r&&e<i;)if(n[e++]!=t[o++])return!1;return o>=r}});var Bb=function(){var t=0;return function(e){return"jscomp_symbol_"+(e||"")+t++}}();function Cb(){ab();var t=Ua.Symbol.iterator;t||(t=Ua.Symbol.iterator=Ua.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&Oa(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return Ib(this)}}),Cb=function(){}}function Ib(t){var e=0;return Jb(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})}function Jb(t){return Cb(),(t={next:t})[Ua.Symbol.iterator]=function(){return this},t}function Ob(t,e){Cb(),t instanceof String&&(t+="");var n=0,i={next:function(){if(n<t.length){var r=n++;return{value:e(r,t[r]),done:!1}}return i.next=function(){return{done:!0,value:void 0}},i.next()}};return i[Symbol.iterator]=function(){return i},i}function Pb(t){Cb();var e=t[Symbol.iterator];return e?e.call(t):Ib(t)}function Sb(t,e){return Object.prototype.hasOwnProperty.call(t,e)}$a("Array.prototype.keys",function(t){return t||function(){return Ob(this,function(t){return t})}}),$a("WeakMap",function(t){function e(t){if(this.Sh=(o+=Math.random()+1).toString(),t){ab(),Cb(),t=Pb(t);for(var e;!(e=t.next()).done;)e=e.value,this.set(e[0],e[1])}}function n(t){Sb(t,r)||Oa(t,r,{value:{}})}function i(t){var e=Object[t];e&&(Object[t]=function(t){return n(t),e(t)})}if(function(){if(!t||!Object.seal)return!1;try{var e=Object.seal({}),n=Object.seal({}),i=new t([[e,2],[n,3]]);return 2==i.get(e)&&3==i.get(n)&&(i.delete(e),i.set(n,4),!i.has(e)&&4==i.get(n))}catch(t){return!1}}())return t;var r="$jscomp_hidden_"+Math.random();i("freeze"),i("preventExtensions"),i("seal");var o=0;return e.prototype.set=function(t,e){if(n(t),!Sb(t,r))throw Error("WeakMap key fail: "+t);return t[r][this.Sh]=e,this},e.prototype.get=function(t){return Sb(t,r)?t[r][this.Sh]:void 0},e.prototype.has=function(t){return Sb(t,r)&&Sb(t[r],this.Sh)},e.prototype.delete=function(t){return!(!Sb(t,r)||!Sb(t[r],this.Sh))&&delete t[r][this.Sh]},e}),$a("Map",function(t){function e(){var t={};return t.Xd=t.next=t.head=t}function n(t,e){var n=t.Ud;return Jb(function(){if(n){for(;n.head!=t.Ud;)n=n.Xd;for(;n.next!=n.head;)return n=n.next,{done:!1,value:e(n)};n=null}return{done:!0,value:void 0}})}function i(t,e){var n=e&&typeof e;"object"==n||"function"==n?o.has(e)?n=o.get(e):(n=""+ ++s,o.set(e,n)):n="p_"+e;var i=t.Dh[n];if(i&&Sb(t.Dh,n))for(t=0;t<i.length;t++){var r=i[t];if(e!=e&&r.key!=r.key||e===r.key)return{id:n,list:i,index:t,$a:r}}return{id:n,list:i,index:-1,$a:void 0}}function r(t){if(this.Dh={},this.Ud=e(),this.size=0,t){t=Pb(t);for(var n;!(n=t.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!t||"function"!=typeof t||!t.prototype.entries||"function"!=typeof Object.seal)return!1;try{var e=Object.seal({x:4}),n=new t(Pb([[e,"s"]]));if("s"!=n.get(e)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var i=n.entries(),r=i.next();return!r.done&&r.value[0]==e&&"s"==r.value[1]&&!((r=i.next()).done||4!=r.value[0].x||"t"!=r.value[1]||!i.next().done)}catch(t){return!1}}())return t;ab(),Cb();var o=new WeakMap;r.prototype.set=function(t,e){var n=i(this,t=0===t?0:t);return n.list||(n.list=this.Dh[n.id]=[]),n.$a?n.$a.value=e:(n.$a={next:this.Ud,Xd:this.Ud.Xd,head:this.Ud,key:t,value:e},n.list.push(n.$a),this.Ud.Xd.next=n.$a,this.Ud.Xd=n.$a,this.size++),this},r.prototype.delete=function(t){return!(!(t=i(this,t)).$a||!t.list)&&(t.list.splice(t.index,1),t.list.length||delete this.Dh[t.id],t.$a.Xd.next=t.$a.next,t.$a.next.Xd=t.$a.Xd,t.$a.head=null,this.size--,!0)},r.prototype.clear=function(){this.Dh={},this.Ud=this.Ud.Xd=e(),this.size=0},r.prototype.has=function(t){return!!i(this,t).$a},r.prototype.get=function(t){return(t=i(this,t).$a)&&t.value},r.prototype.entries=function(){return n(this,function(t){return[t.key,t.value]})},r.prototype.keys=function(){return n(this,function(t){return t.key})},r.prototype.values=function(){return n(this,function(t){return t.value})},r.prototype.forEach=function(t,e){for(var n,i=this.entries();!(n=i.next()).done;)n=n.value,t.call(e,n[1],n[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var s=0;return r}),$a("Array.prototype.find",function(t){return t||function(t,e){t:{var n=this;n instanceof String&&(n=String(n));for(var i=n.length,r=0;r<i;r++){var o=n[r];if(t.call(e,o,r,n)){t=o;break t}}t=void 0}return t}}),$a("Array.prototype.fill",function(t){return t||function(t,e,n){var i=this.length||0;for(0>e&&(e=Math.max(0,i+e)),(null==n||n>i)&&(n=i),0>(n=Number(n))&&(n=Math.max(0,i+n)),e=Number(e||0);e<n;e++)this[e]=t;return this}});var Tb="function"==typeof Object.assign?Object.assign:function(t,e){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)Sb(i,r)&&(t[r]=i[r])}return t};$a("Object.assign",function(t){return t||Tb}),$a("Array.from",function(t){return t||function(t,e,n){Cb(),e=null!=e?e:function(t){return t};var i=[],r=t[Symbol.iterator];if("function"==typeof r){t=r.call(t);for(var o=0;!(r=t.next()).done;)i.push(e.call(n,r.value,o++))}else for(r=t.length,o=0;o<r;o++)i.push(e.call(n,t[o],o));return i}});var Ub=window;function Vb(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={yk:i,LD:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.LD=!0,r.exports}var n={};return e.LH=t,e.c=n,e.d=function(t,n,i){e.YD(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n||4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(i,r,function(e){return t[e]}.bind(null,r));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.YD=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.$H=281)}([,function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function t(){if(1>arguments.length||"object"!==e(arguments[0]))return!1;if(2>arguments.length)return arguments[0];var n,i,r,o,s=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(a){if("object"===(void 0===a?"undefined":e(a)))for(n in a)n in a&&(r=s[n],(i=a[n])!==s&&("object"!==(void 0===i?"undefined":e(i))||null===i?s[n]=i:i instanceof Date?s[n]=new Date(i.getTime()):(o="object"!==(void 0===r?"undefined":e(r))||null===r?Array.isArray(i)?[]:{}:Array.isArray(i)?Array.isArray(r)?r:[]:Array.isArray(r)?{}:r,s[n]=t(o,i))))}),s}},function(t,e,n){var i=n(1)(i||{},{g:{C:{}}});i.g.C={Mf:"actionTracker",si:"adBlockerSniffer",$d:"adConfigEntry",mv:"adContainer",ya:"adContainerProvider",pd:"adEngine",wv:"adManager",Ua:"adSystem",gl:"adTimeLogger",Lg:"adTracker",Qb:"adsConfig",Nv:"autoplayDetector",wp:"bitrateTracker",jl:"bufferedCalculator",X:"config",Zv:"contextReporting",Re:"debugInfo",ac:"display",Ga:"dom",na:"environment",mb:"errorTracker",za:"eventBus",Tf:"externalTracker",bc:"flashDetector",Ti:"flashRunner",tl:"flvRunner",Wi:"geminiMacrosResolver",Vf:"geminiPixelsTracker",yw:"heartbeatTracker",ul:"hostWindowProvider",Bw:"hwmTracker",Gw:"inViewManager",Sb:"injector",zl:"insecureRunner",Ew:"interactionTracker",Vg:"intersectionViewability",aj:"metricsHandler",bj:"moatIvtResolver",Tb:"moatViewability",$w:"pageTracker",vd:"parametersCombine",hj:"pluginEventBus",kx:"posterOptimisationTracker",nx:"videoTag",Kl:"primalTracker",wx:"rootContainer",Ol:"secureRunner",Yf:"slotOpportunityHandler",Ya:"smartViewability",Ha:"urls",Xe:"videoTagProvider",vj:"videoTracker",bh:"videoTrackerManager",ey:"viewabilityMonitor",wd:"viewabilitySubject"},e.vdb={g:{C:i.g.C}},e.default=i.g.C,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{log:{},yc:{},A:{},ha:{},f:{G:{}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i.yc=n(189).vdb.yc,i.A=n(4).vdb.A,i.ha=n(85).vdb.ha,i.f.G=n(24).vdb.f.G,function(t){function e(t){return 10>t?"0"+t:t}function n(n,i,o){if(s.indexOf(n)>=t.Na.Mh()&&window.console){var u=new Date,l=u.getMilliseconds();o=[e(u.getHours())+":"+e(u.getMinutes())+":"+e(u.getSeconds())+"."+(10>l?"00"+l:100>l?"0"+l:l),"["+n+"]",i+":"+(t.Na.mi?" "+t.Na.mi:"")].concat(Array.prototype.slice.apply(o)),u=n.toLowerCase(),window.console[u]||(u="log"),"object"===(void 0===(u=window.console[u])?"undefined":r(u))&&(u=Function.prototype.bind.call(u,window.console)),u&&u.apply(window.console,o)}for(u=0;u<a.length;u++)a[u](n,i,o)}var o=i.yc,s=[o.Qi,o.Zi,o.Bj,o.La],a=[],u={};t.Na=i.A.Class.extend({N:function(t){this.name=t},debug:function(){n(o.Qi,this.name,arguments)},info:function(){n(o.Zi,this.name,arguments)},warn:function(){n(o.Bj,this.name,arguments)},error:function(){n(o.La,this.name,arguments)}}),t.I=function(e){return u[e]||(u[e]=new t.Na(e)),u[e]},t.Na.mi="",t.Na.Mh=function(){if(void 0===t.Na.mh){var e=parseInt(i.f.G.eb("aolplayerloglvl"));t.Na.mh=isNaN(e)?Number(i.ha["logger.level"]):e}return t.Na.mh},t.Mz=function(t){a.push(t)}}(i.log),e.vdb={log:i.log},e.default=i.log,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{A:{}});(function(t){t.Zz=function(){var t=window,e=t.Array.prototype;void 0===(t=t.Function.prototype).bind&&(t.bind=function(t){var n=this,i=e.slice.call(arguments,1);return function(){return n.apply(t||null,i.concat(e.slice.call(arguments)))}})},t.Zz();var e=!1,n=/xyz/.test(function(){return"xyz"})?/\b_super\b/:/.*/;t.Class=function(){},t.Class.extend=function t(i,r){function o(){!e&&this.N&&this.N.apply(this,arguments)}var s=this.prototype;e=!0;var a=new this;for(var u in e=!1,i)a[u]="function"==typeof i[u]&&"function"==typeof s[u]&&n.test(i[u])?function(t,e){return function(){var n=this._super;this._super=s[t];try{return e.apply(this,arguments)}finally{this._super=n}}}(u,i[u]):i[u];return o.prototype=a,o.prototype.constructor=o,o.extend=t,r&&0<r.length&&(o.W=r),this.W&&0<this.W.length&&(o.W=o.W?o.W.concat(this.W):this.W),o}})((i=t(n(28).vdb,i||{})).A),e.vdb={A:i.A},e.default=i.A,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{u:{},g:{Ac:{}},Wa:{},f:{U:{},M:{},G:{}},Promise:{},B:{S:{}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(i=t(n(28).vdb,i||{})).g.Ac=n(183).vdb.g.Ac,i.Wa=n(132).vdb.Wa,i.f.U=n(55).vdb.f.U,i.f.M=n(43).vdb.f.M,i.f.G=n(24).vdb.f.G,i.Promise=n(23).vdb.Promise,i.B.S=n(83).vdb.B.S,i.u=function(){function t(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}var e=window.getComputedStyle||function(t){return t.currentStyle},n=function t(e,n,r){var o=n.shift();return n.length?i.u.Ce(e[o])||Array.isArray(e[o])?t(e[o],n,r):r:void 0===e[o]?r:e[o]};return{aB:function(t,e){return t[e=this.Tm(t,e)]},Tm:function(t,e){for(var n,i,r=0,o=t.length-1;r<=o;)if(0>(i=e(t[n=r+Math.floor((o-r)/2)],n,t)))r=n+1;else{if(!(0<i))return n;o=n-1}return-1},round:function(t){return~~(t+(0<t?.5:-.5))},DE:function(t,e){return e=Math.pow(10,e),Math.round(t*e)/e},Ah:function(t){t&&(window.Promise?window.Promise.resolve().then(t):setTimeout(t,1))},Ru:function(t,e){return t.sort(function(t,n){return(e?1:-1)*(t.width*t.height-n.width*n.height)})},Pm:function(t){var e=i.u.xb.Ge()?"playsinline muted":"";return new i.Wa(t).co('<video %PLAY_INLINE% style="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 0; margin: 0; z-index: 1;"></video>'.replace("%PLAY_INLINE%",e))},IB:function(t){var e=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16);return t=parseInt(t.slice(5,7),16),130>Math.sqrt(e*e*.241+n*n*.691+t*t*.068)?"White":"Black"},QC:function(){return"BackCompat"===document.compatMode?document.body.clientWidth:document.documentElement.clientWidth},PC:function(){return"BackCompat"===document.compatMode?document.body.clientHeight:document.documentElement.clientHeight},bB:function(t){return(t=t.match(/\d+\.\d+\.\d+/))&&t[0]||"latest"},RB:function(t,e){return t=t.split("/").pop(),e||((e=t.split(".")).pop(),t=e.join(".")),t},hd:function(t){return t.split(".").pop()},contains:function(t,e){for(var n in t)if(t[n]===e)return!0;return!1},on:function(t){return"html5-vpaid"+(!0===t?",swf":"")},uB:function(t){t instanceof Date||(t=new Date(t));var e=new Date,n=e.getFullYear()-t.getFullYear();return t.setFullYear(e.getFullYear()),t.getTime()>e.getTime()&&--n,n},pE:function(){var t=Array(16);try{if(window.crypto&&window.crypto.getRandomValues){var e=new Uint32Array(4);return function(){var t=[],n=-1;for(window.crypto.getRandomValues(e);16>++n;)t[n]=e[n>>2]>>>8*(3&n)&255;return t}}}catch(t){}return function(){for(var e,n=-1;16>++n;)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}}(),mf:function(){var t=/Android (\d+(?:\.\d+)+)/.exec(navigator.userAgent),e=!!navigator.userAgent.match("Android")&&1;if(t){t=t[1].split("."),e=0;for(var n=1,i=0;i<t.length;i++)e+=parseInt(t[i])/n,n*=10}return function(){return e}}(),Qc:function(){var t;return function(e){return t&&!e||(e=/CPU OS (.*) like Mac OS X/.exec(navigator.userAgent),t=!!navigator.userAgent.match("iPad")&&1,e&&(t=+e[1].replace(/_/,".").replace(/_/g,""))),t}}(),Vd:function(){var t;return function(e){return t&&!e||(e=/iPhone OS (.*) like Mac OS X/.exec(navigator.userAgent),t=!(!navigator.userAgent.match("iPod")&&!navigator.userAgent.match("iPhone"))&&1,e&&(t=+e[1].replace(/_/,".").replace(/_/g,""))),t}}(),Hk:function(){return i.u.mf()||i.u.Vd()||i.u.Qc()||i.u.$h()||i.u.ai()},CA:function(){return!i.u.Hk()},DD:function(){return 360>=Math.min(screen.width,screen.height)},Uh:function(){var t=navigator.userAgent;return/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i.test(t)||/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i.test(t)},$h:function(){return/Windows Phone/i.test(navigator.userAgent)},ai:function(){return/(?=.*\bWindows\b)(?=.*\bARM\b)/i.test(navigator.userAgent)},tD:function(){return!!(i.u.Vd()||i.u.Uh()||i.u.$h())},HD:function(){return i.u.Qc()||i.u.mf()&&!i.u.Uh()||i.u.ai()},Be:0<=navigator.userAgent.indexOf("MSIE ")||0<=navigator.userAgent.indexOf("Trident/"),lD:0<=navigator.userAgent.indexOf("Edge"),Hn:0<=navigator.userAgent.toLowerCase().indexOf("firefox"),VC:"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints,LF:function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}(),$t:function(t){return"function"!=typeof t.getAttribute||"function"!=typeof t.appendChild},Ef:function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},qE:function(t,e){if(Array.isArray(t))for(var n;-1!==(n=t.indexOf(e));)t.splice(n,1);return t},In:function(e){return t(e,"Function")},Ce:function(e){return t(e,"Object")},Tn:function(e){return t(e,"String")},Jn:function(e){return t(e,"HTMLCollection")},Nn:function(e){return t(e,"NodeList")},En:function(t){return Array.isArray(t)||i.u.Jn(t)||i.u.Nn(t)},hD:function(e){return t(e,"ClientRect")||t(e,"DOMRect")},Bb:function(t){return void 0!==t&&null!==t?i.u.En(t)?t:[t]:[]},qA:function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===e)return!0;return!1},$B:function(t){var n=e(t);return t.clientWidth-(parseInt(n.paddingLeft)+parseInt(n.paddingRight))},uf:function(t){var n=e(t);return t.clientHeight-(parseInt(n.paddingTop)+parseInt(n.paddingBottom))},Je:function(t,e){t=i.u.Bb(t);for(var n=0;n<t.length;++n)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[n].style[r]=e[r])},createElement:function(t,e,n,i){var o;for(o in t=n?n.ownerDocument.createElement(t):window.vdb.te&&window.vdb.te.createElement?window.vdb.te.createElement(t):document.createElement(t),e=e||{})if(Object.prototype.hasOwnProperty.call(e,o)){var s=e[o];null!==s&&("style"===o&&"object"===(void 0===s?"undefined":r(s))?this.Je(t,s):t.setAttribute(o,Array.isArray(s)?s.join(" "):s))}return i&&(t.innerHTML=i),n&&n.appendChild(t),t},yn:function(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},lf:function(t,e){t=i.u.Bb(t),e=i.u.Bb(e);for(var n=0;n<t.length;++n){for(var r=[],o=0;o<e.length;++o)i.u.yn(t[n],e[o])||r.push(e[o]);t[n].className=(t[n].className+" "+r.join(" ")).trim()}},Ie:function(t,e){t=i.u.Bb(t),e=i.u.Bb(e);for(var n=0;n<t.length;++n)if(t[n]&&t[n].className)for(var r=0;r<e.length;++r)t[n].className=t[n].className.replace(new RegExp("(^|\\s+)"+e[r]+"(\\s+|$)","g")," ").trim()},Nk:function(t,e,n){i.u.Ie(t,e),i.u.lf(t,n)},pF:function(t,e,n){n?i.u.lf(t,e):i.u.Ie(t,e)},SE:function(t){return t.replace(/@func-iri-prefix/g,i.u.Hn?location.href.replace(location.hash,""):"")},Nz:function(){var t=["webkit","moz","MS","o",""],e=t.length;return function(n,i,r){for(var o=-1;++o<e;)""===t[o]&&(i=i.toLowerCase()),n.addEventListener(t[o]+i,r)}}(),FC:function(t,n,i){for(var r,o=(t.parentNode||{}).firstChild,s=[];o;)o!==t&&(1!==o.nodeType||n&&!(0<o.clientHeight)||i&&("absolute"===(r=e(o).position)||"fixed"===r)||s.push(o)),o=o.nextSibling;return s},Rc:function(t){if(Array.isArray(t)&&0<t.length)return!1;if(i.u.Ce(t))for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},extend:function(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]},Os:function(t){return Array.isArray(t)&&(t=t.slice()),t},gE:function(t){if("true"==t||"1"==t)var e=!0;else"false"!=t&&"0"!=t||(e=!1);return e},yF:function(t,e,n){var r=t.length,o=e.clientHeight,s=n||function(){var t=i.u.uf(e);return e.style.height="auto",t}();i.u.uf(e)>s?function r(a,u){var l=t.substring(0,u).trim();e.innerHTML=l,i.u.uf(e)>s?a===u?(e.innerHTML=l.substring(0,l.length-4)+"...",n||(e.style.height=o+"px")):r(u,u-Math.ceil((a-u)/2)):1==a-u?(e.innerHTML=l.substring(0,l.length-3)+"...",n||(e.style.height=o+"px")):r(a,a-Math.floor((a-u)/2))}(r,Math.floor(r/2)):n||(e.style.height=o+"px")},nC:function(t){var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n},nF:function(t,e){return new i.Promise(function(n){i.B.S.Da(t,e,function(t){n(t)})})},xu:function(t){return new i.Promise(function(e,n){setTimeout(function(){n(Error("timeout "+t+" ms reached"))},t)})},zB:function(){var t=navigator.languages&&navigator.languages[0];return t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),t):null},Oh:function(t,e,i){return n(t||{},e.slice(),i)},getComputedStyle:e.bind(this),YC:function(){try{return window&&window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}catch(t){return!1}},rA:function(t){var e=t.ownerDocument;if(i.u.Qc()||i.u.Vd()){var n=e.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),t.setSelectionRange(0,999999),t=e.execCommand("copy",!1),r.removeAllRanges()}else t.select(),t=e.execCommand("copy");return t},wo:function(t){for(var e,n="",i=0;i<t.length;i++)e=null===t[i]?"":t[i].toString(),t[i]instanceof Date&&(e=t[i].toLocaleString()),0<=(e=e.replace(/"/g,'""')).search(/("|,|\n)/g)&&(e='"'+e+'"'),0<i&&(n+=","),n+=e;return n+"\n"},WA:function(t,e){for(var n="",i=0;i<e.length;i++)n+=this.wo(e[i]);n=new Blob([n],{type:"text/csv;charset=utf-8;"}),navigator.msSaveBlob?navigator.msSaveBlob(n,t):void 0!==(e=document.createElement("a")).download&&(n=URL.createObjectURL(n),e.setAttribute("href",n),e.setAttribute("download",t),e.style.visibility="hidden",document.body.appendChild(e),e.click(),document.body.removeChild(e))},ma:function(t){return!(!t||"function"!=typeof t)&&(0>String(Function.prototype.toString).indexOf("[native code]")?t!==Function.prototype.toString&&null:0<=String(t).indexOf("[native code]"))},bk:function(t){var e=i.f.M.tb();try{if(t&&"function"==typeof t)if(t instanceof e.Function)var n=!0;else{var r=t.toString();r&&(n=!(!(r=new t.constructor("return window; ")())||!r.top))}}catch(t){}return!!n}}}(),function(t){var e={},n=navigator.userAgent.toLowerCase(),r=navigator.platform.toLowerCase(),o=n.match(/(samsungbrowser|edge)[\s\/:]([\w\d\.]+)/);if(o||(o=n.match(/(opera|ie|trident|firefox|fxios|chrome|crios|version|fban)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)),o){var s=o[0].match(/(chrome|crios)\/(.*?)\s/);s&&(o=[null,"chrome",s[2]])}else o=[null,"unknown",0];s=("ie"===o[1]||"trident"===o[1])&&document.documentMode,e.name="version"===o[1]?o[3]:o[1],e.version=s||parseFloat("opera"===o[1]&&o[4]?o[4]:o[2]),e.platform={name:n.match(/ip(?:ad|od|hone)/)?"ios":(n.match(/(?:webos|android)/)||r.match(/mac|win|linux/)||["other"])[0],version:t.mf()||t.Qc()||t.Vd()||""},e.ZA={OF:!!document.evaluate,Rz:!!window.EE,query:!!document.querySelector,json:!!window.JSON},e.Yh=function(){return/android|blackberry|iphone|ipad|ipod|opera mini|iemobile/i.test(n)},e.Kn=function(){return e.platform.name===i.g.Ac.nq},e[e.name]=!0,e[e.name+parseInt(e.version,10)]=!0,e.platform[e.platform.name]=!0,e.Ge=function(){var n=e.Kn();return!e.Yh()||t.Qc()||n&&"safari"===e.name&&10<=e.version||n&&"chrome"===e.name&&54<=e.version||n&&"fxios"===e.name&&10.3<=e.version||n&&"fban"===e.name||!!e.platform.android&&"chrome"===e.name&&53<=e.version||!!e.platform.android&&"firefox"===e.name||!!e.platform.android&&"samsungbrowser"===e.name&&6.2<=e.version},t.xb=e}(i.u),function(t){var e=/\/\/(.+)\.uplynk\.com\//i,n={mp4:"video/mp4",ogg:"video/ogg",ogv:"video/ogg",webm:"video/webm",m3u:"application/vnd.apple.mpegurl",m3u8:"application/vnd.apple.mpegurl"},o=["mp3"],s=[];t.SD=function(t){var e=(t=t.split("?"))[0];return e=e.substring(e.lastIndexOf(".")+1).toLowerCase(),!(e=n[e])&&1<t.length&&(e=(t=i.u.Eh(t[1])).enc||(t.type+"").replace(".",""),e=n[e]),e},t.eD=function(t){t=i.f.G.hd(t);for(var e=0;e<o.length;++e)if(o[e]===t)return!0;return!1},t.VB=function(t){if(t.videoUrls)for(var e=0,n=(t=t.videoUrls).length;e<n;++e)if(i.u.Af(t[e]))return e;return-1},t.Af=function(t){return"m3u8"===i.f.G.hd(t)},t.SC=function(t){var e,n;for(e=0;e<t.length;e++){var r=i.u.Oh(t[e],["videoUrls"],[]);for(n=0;n<r.length;n++)if(i.u.Af(r[n]))return!0}return!1},t.TC=function(t){var e,n,r=0;for(e=0;e<t.length;e++){var o=i.u.Oh(t[e],["videoUrls"],[]);for(n=0;n<o.length;n++){if(!i.u.Af(o[n]))return!1;r++}}return 0<r},t.JD=function(t){return e.test(t)},t.Tc=function(t){if(!t)return null;if("string"==typeof t)return t;var e=[];if(t&&"object"===(void 0===t?"undefined":r(t)))for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];if(0===i||i&&"function"!=typeof i){var o=encodeURIComponent(n)+"=";o+=encodeURIComponent(String(i)),e.push(o)}}return e.join("&")},t.Eh=function(t){var e={};if(t){e={},t=t.split("&");for(var n=0;n<t.length;n++){var i=t[n].split("="),r=i[0];try{r=decodeURIComponent(r)}catch(t){}try{var o;1<i.length&&(o=decodeURIComponent(i[1])),e[r]=o}catch(t){}}}return e},t.ku=function(t){for(var e,n=[],r=0;r<t.length;r++)(e=i.u.Tc(t[r]))&&n.push(e);return n.join("&")},t.Cf=function(t){var e=Array.prototype.toJSON;if(delete Array.prototype.toJSON,window.JSON&&window.JSON.stringify)try{var n=JSON.stringify(t,void 0,void 0)}catch(t){}else n=window.JSON&&window.JSON.encode?window.JSON.encode(t):String.valueOf(t);return e&&(Array.prototype.toJSON=e),n},t.Yz=function(t){return window.btoa(t)},t.Ds=function(t){return window.atob(t)},t.Za=function(t,e){for(var n in e=e||{},t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.FE=function(t,e){for(var n in e=e||{},t)Object.prototype.hasOwnProperty.call(t,n)&&void 0===e[n]&&(e[n]=t[n]);return e},t.Ke=function(t){if(""===t)return 0;var e=0;(t=(t=t.split(".")[0]).split(":")).reverse();for(var n=[1,60,3600],i=0;i<t.length;i++)e+=t[i]*n[i];return e},t.Wt=function(t,e,n){var i=t.createElement("script");i.type="text/javascript",i.src=e,function(t,e){function n(){function e(){}t.onerror=e,t.onreadystatechange=e,t.onload=e,t.parentNode.removeChild(t)}t.onload=function(){for(var i=t.src,r=0;r<s.length;r++)s[r](i);n(),null!=e&&e(!0)},t.onerror=function(){n(),null!=e&&e(!1)},t.onreadystatechange=function(){"complete"!==t.readyState&&"loaded"!==t.readyState||t.onload()}}(i,n),t.getElementsByTagName("head")[0].appendChild(i)},t.As=function(t){"function"==typeof t&&s.push(t)},t.VD=function(t){var e=Array.prototype.slice,n=e.call(arguments,0);return n.shift(),function(){var i=n.concat(e.call(arguments,0));t.apply(null,i)}},t.Qt=function(t,e){return null!=t?t:e},t.find=function(t,e){for(var n,i=t.length>>>0,r=0;r<i;r++)if(e(n=t[r],r,t))return n},t.$A=function(t,e,n){if(!t||void 0===t.length)throw new TypeError(t+" is not an array!");if("function"!=typeof e)throw new TypeError(e+" is not a function!");for(var i=[],r=t.length,o=0;o<r;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i},t.Sm=function(t,e,n){n=n||{};var i,r={};for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(i)){var o=i;n.modify&&(o=n.modify(o)),!1!==n.mF&&(o=o.toLowerCase()),r[o]=t[i]}return r},t.mt=function(e,n){n=n||"";var i=i||{};return i.modify=i.modify?function(t){return t.split(n)[1]}:null,t.Sm(e,function(t){return 0===t.indexOf(n)},i)},t.EC=function(){return window.s_265&&window.s_265.channel},t.CB=function(){var t=window.rapidConfig&&window.rapidConfig.keys&&window.rapidConfig.keys.st_sec;return t||(t=i.f.G.Dc(i.f.M.Ab())),t}}(i.u),e.vdb={u:i.u},e.default=i.u,e.__esModule=!0},,,,,function(t,e,n){var i=(t=n(1))(i||{},{B:{S:{},nb:{}},A:{},Ma:{}});i.A=n(4).vdb.A,i.B=t(n(133).vdb.B,i.B||{}),i.B.nb=n(188).vdb.B.nb,i.Ma=n(84).vdb.Ma,function(t){t.S=i.A.Class.extend({Z:function(){this.Qa?this.Qa.Z():void 0!==this.vb.nodeType?i.B.removeEventListener(this.vb,this.af,this.Ed):this.vb.removeEventListener(this.af,this.Ed,this.wh)},link:function(){var t=arguments||[];if(!arguments.length)return this;this.Qa||(this.Qa=new i.B.nb(this));for(var e=0;e<t.length;++e){var n=t[e];n.Qa?this.Qa.bo(n.Qa):this.Qa.wb(n)}return this.Qa.Mm(),this}}),t.S.bind=function(e,n,r,o,s){o=!!o,s=!!s;var a=new t.S;return a.vb=e,a.af=n,a.ih=r,a.wh=o,a.rh=s,a.Ed=function(){this.rh&&this.Z(),this.ih&&this.ih.apply(window,arguments)}.bind(a),void 0!==e.nodeType?i.B.addEventListener(e,n,a.Ed):e.addEventListener(n,a.Ed,o),a},t.S.Da=function(e,n,i){return t.S.bind(e,n,i,void 0,!0)},t.S.empty=function(){var e=new t.S;return e.vb=new i.Ma,e.af="DOESN'T_MATTER",e.wh=!0,e.rh=!0,e},t.S.group=function(e){for(var n=t.S.empty(),i=0;i<arguments.length;i++){var r=arguments[i];r.length?(r=t.S.group.apply(null,r),n.link(r)):n.link(r)}return n}}(i.B),e.vdb={B:{S:i.B.S}},e.default=i.B.S,e.__esModule=!0},,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,r),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).data.adType=i,n.ys=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){return new e(this.type,this.ys,this.data)},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(27)).default),e.default=t,t.lp="Ads.Resolve.Error",t.od="Ads.Blocker.Complete",t.bp="Ads.Blocker.Request",t.hv="Ads.Blocker.Started",t.hp="Ads.Engines.Load",t.Zc="Ads.Engine.Ready",t.ui="Ads.Engine.Run",t.Yc="Ads.Engine.Complete",t.sc="Ads.Engine.Interaction",t.Of="Ads.Engine.LinearChange",t.RF="Ads.Engine.None",t.QF="Ads.Loaded",t.ae="Ads.Ad.Loaded",t.Rf="Ads.Ad.Starting",t.Fa="Ads.Ad.Started",t.Yb="Ads.Ad.Finished",t.Jc="Ads.Ad.Paused",t.Pf="Ads.Ad.Resumed",t.Pe="Ads.Ad.VolumeChanged",t.fp="Ads.Ad.Click",t.dl="Ads.Ad.Quartile",t.Zb="Ads.Ad.TimeUpdate",t.Mg="Ads.Ad.Waiting",t.Bv="adshowcompanions",t.Cv="Ads.Ad.ShowIcon",t.uv="Ads.Ad.HideIcon",t.Qf="Ads.Ad.Skipped",t.Oe="Ads.Ad.SkippableStateChange",t.Ev="Ads.Ad.SubtitlesFound"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(337));e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.zn=function(t){var e={};t=t.childNodes;for(var n=0;n<t.length;n++){var i=t[n],r=i.nodeName;1===i.nodeType&&(e[r]||(e[r]=i))}return e},t.ZC=function(t){t=t.childNodes;for(var e=0;e<t.length;e++){var n=t[e];if(1===n.nodeType&&"VASTAdTagURI"===n.nodeName)return n}return null},t.Sa=function(t,e){var n={};t=t.childNodes;for(var i=0;i<t.length;i++){var r=t[i],o=r.nodeName;1!==r.nodeType||e&&0<e.length&&0>e.indexOf(o)||(n[o]||(n[o]=[]),n[o].push(r))}return n},t.UC=function(t){return!!t&&(3===t.nodeType||2===t.nodeType||!!t.hasChildNodes()&&!t.firstElementChild)},t.Xa=function(t){return function t(e){for(var n,r="",o=0;null!=(n=e[o++]);)n.nodeType===i.default.TEXT_NODE||n.nodeType===i.default.CDATA_SECTION_NODE?(n=n.nodeValue&&n.nodeValue.trim())&&(r+=n):n.nodeType!==i.default.COMMENT_NODE&&(r+=t(n.childNodes));return r}([t])},t}()},,,,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){return t&&t.__esModule?t:{default:t}}(n(27));var i=Symbol(),r=Symbol(),o=Symbol();t=function(t){function e(n,o,s,a){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,a),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[i]=o,n[r]=s,n.Kd=[],n.bu=!0,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.NE=function(t){t.bu=!1,this[o]=t},e.prototype.Nh=function(){return this[i]||null},e.prototype.ve=function(){return this[r]||null},e.prototype.At=function(){return this[o]||null},e.prototype.clone=function(){return new e(this.type,this[i],this[r],this.data)},e.prototype.toString=function(){return"VastEvent{type="+this.type+", recordCount="+this.Kd.length+"}"},e}(t.default),e.default=t,t.Ci="VastEventAttempt",t.vc="VastEventImpression",t.kb="VastEventClick",t.La="VastEventError"},function(t,e,n){var i=(t=n(1))(i||{},{u:{},g:{Ac:{}},Wa:{},f:{U:{},M:{},G:{}},Promise:{},B:{S:{}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(i=t(n(28).vdb,i||{})).g.Ac=n(183).vdb.g.Ac,i.Wa=n(132).vdb.Wa,i.f.U=n(55).vdb.f.U,i.f.M=n(43).vdb.f.M,i.f.G=n(24).vdb.f.G,i.Promise=n(23).vdb.Promise,i.B.S=n(83).vdb.B.S,i.u=function(){function t(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}var e=window.getComputedStyle||function(t){return t.currentStyle},n=function t(e,n,r){var o=n.shift();return n.length?i.u.Ce(e[o])||Array.isArray(e[o])?t(e[o],n,r):r:void 0===e[o]?r:e[o]};return{aB:function(t,e){return t[e=this.Tm(t,e)]},Tm:function(t,e){for(var n,i,r=0,o=t.length-1;r<=o;)if(0>(i=e(t[n=r+Math.floor((o-r)/2)],n,t)))r=n+1;else{if(!(0<i))return n;o=n-1}return-1},round:function(t){return~~(t+(0<t?.5:-.5))},DE:function(t,e){return e=Math.pow(10,e),Math.round(t*e)/e},Ah:function(t){t&&(window.Promise?window.Promise.resolve().then(t):setTimeout(t,1))},Ru:function(t,e){return t.sort(function(t,n){return(e?1:-1)*(t.width*t.height-n.width*n.height)})},Pm:function(t){var e=i.u.xb.Ge()?"playsinline muted":"";return new i.Wa(t).co('<video %PLAY_INLINE% style="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 0; margin: 0; z-index: 1;"></video>'.replace("%PLAY_INLINE%",e))},IB:function(t){var e=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16);return t=parseInt(t.slice(5,7),16),130>Math.sqrt(e*e*.241+n*n*.691+t*t*.068)?"White":"Black"},QC:function(){return"BackCompat"===document.compatMode?document.body.clientWidth:document.documentElement.clientWidth},PC:function(){return"BackCompat"===document.compatMode?document.body.clientHeight:document.documentElement.clientHeight},bB:function(t){return(t=t.match(/\d+\.\d+\.\d+/))&&t[0]||"latest"},RB:function(t,e){return t=t.split("/").pop(),e||((e=t.split(".")).pop(),t=e.join(".")),t},hd:function(t){return t.split(".").pop()},contains:function(t,e){for(var n in t)if(t[n]===e)return!0;return!1},on:function(t){return"html5-vpaid"+(!0===t?",swf":"")},uB:function(t){t instanceof Date||(t=new Date(t));var e=new Date,n=e.getFullYear()-t.getFullYear();return t.setFullYear(e.getFullYear()),t.getTime()>e.getTime()&&--n,n},pE:function(){var t=Array(16);try{if(window.crypto&&window.crypto.getRandomValues){var e=new Uint32Array(4);return function(){var t=[],n=-1;for(window.crypto.getRandomValues(e);16>++n;)t[n]=e[n>>2]>>>8*(3&n)&255;return t}}}catch(t){}return function(){for(var e,n=-1;16>++n;)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}}(),mf:function(){var t=/Android (\d+(?:\.\d+)+)/.exec(navigator.userAgent),e=!!navigator.userAgent.match("Android")&&1;if(t){t=t[1].split("."),e=0;for(var n=1,i=0;i<t.length;i++)e+=parseInt(t[i])/n,n*=10}return function(){return e}}(),Qc:function(){var t;return function(e){return t&&!e||(e=/CPU OS (.*) like Mac OS X/.exec(navigator.userAgent),t=!!navigator.userAgent.match("iPad")&&1,e&&(t=+e[1].replace(/_/,".").replace(/_/g,""))),t}}(),Vd:function(){var t;return function(e){return t&&!e||(e=/iPhone OS (.*) like Mac OS X/.exec(navigator.userAgent),t=!(!navigator.userAgent.match("iPod")&&!navigator.userAgent.match("iPhone"))&&1,e&&(t=+e[1].replace(/_/,".").replace(/_/g,""))),t}}(),Hk:function(){return i.u.mf()||i.u.Vd()||i.u.Qc()||i.u.$h()||i.u.ai()},CA:function(){return!i.u.Hk()},DD:function(){return 360>=Math.min(screen.width,screen.height)},Uh:function(){var t=navigator.userAgent;return/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i.test(t)||/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i.test(t)},$h:function(){return/Windows Phone/i.test(navigator.userAgent)},ai:function(){return/(?=.*\bWindows\b)(?=.*\bARM\b)/i.test(navigator.userAgent)},tD:function(){return!!(i.u.Vd()||i.u.Uh()||i.u.$h())},HD:function(){return i.u.Qc()||i.u.mf()&&!i.u.Uh()||i.u.ai()},Be:0<=navigator.userAgent.indexOf("MSIE ")||0<=navigator.userAgent.indexOf("Trident/"),lD:0<=navigator.userAgent.indexOf("Edge"),Hn:0<=navigator.userAgent.toLowerCase().indexOf("firefox"),VC:"ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints,LF:function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}(),$t:function(t){return"function"!=typeof t.getAttribute||"function"!=typeof t.appendChild},Ef:function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},qE:function(t,e){if(Array.isArray(t))for(var n;-1!==(n=t.indexOf(e));)t.splice(n,1);return t},In:function(e){return t(e,"Function")},Ce:function(e){return t(e,"Object")},Tn:function(e){return t(e,"String")},Jn:function(e){return t(e,"HTMLCollection")},Nn:function(e){return t(e,"NodeList")},En:function(t){return Array.isArray(t)||i.u.Jn(t)||i.u.Nn(t)},hD:function(e){return t(e,"ClientRect")||t(e,"DOMRect")},Bb:function(t){return void 0!==t&&null!==t?i.u.En(t)?t:[t]:[]},qA:function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===e)return!0;return!1},$B:function(t){var n=e(t);return t.clientWidth-(parseInt(n.paddingLeft)+parseInt(n.paddingRight))},uf:function(t){var n=e(t);return t.clientHeight-(parseInt(n.paddingTop)+parseInt(n.paddingBottom))},Je:function(t,e){t=i.u.Bb(t);for(var n=0;n<t.length;++n)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[n].style[r]=e[r])},createElement:function(t,e,n,i){var o;for(o in t=n?n.ownerDocument.createElement(t):window.vdb.te&&window.vdb.te.createElement?window.vdb.te.createElement(t):document.createElement(t),e=e||{})if(Object.prototype.hasOwnProperty.call(e,o)){var s=e[o];null!==s&&("style"===o&&"object"===(void 0===s?"undefined":r(s))?this.Je(t,s):t.setAttribute(o,Array.isArray(s)?s.join(" "):s))}return i&&(t.innerHTML=i),n&&n.appendChild(t),t},yn:function(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},lf:function(t,e){t=i.u.Bb(t),e=i.u.Bb(e);for(var n=0;n<t.length;++n){for(var r=[],o=0;o<e.length;++o)i.u.yn(t[n],e[o])||r.push(e[o]);t[n].className=(t[n].className+" "+r.join(" ")).trim()}},Ie:function(t,e){t=i.u.Bb(t),e=i.u.Bb(e);for(var n=0;n<t.length;++n)if(t[n]&&t[n].className)for(var r=0;r<e.length;++r)t[n].className=t[n].className.replace(new RegExp("(^|\\s+)"+e[r]+"(\\s+|$)","g")," ").trim()},Nk:function(t,e,n){i.u.Ie(t,e),i.u.lf(t,n)},pF:function(t,e,n){n?i.u.lf(t,e):i.u.Ie(t,e)},SE:function(t){return t.replace(/@func-iri-prefix/g,i.u.Hn?location.href.replace(location.hash,""):"")},Nz:function(){var t=["webkit","moz","MS","o",""],e=t.length;return function(n,i,r){for(var o=-1;++o<e;)""===t[o]&&(i=i.toLowerCase()),n.addEventListener(t[o]+i,r)}}(),FC:function(t,n,i){for(var r,o=(t.parentNode||{}).firstChild,s=[];o;)o!==t&&(1!==o.nodeType||n&&!(0<o.clientHeight)||i&&("absolute"===(r=e(o).position)||"fixed"===r)||s.push(o)),o=o.nextSibling;return s},Rc:function(t){if(Array.isArray(t)&&0<t.length)return!1;if(i.u.Ce(t))for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},extend:function(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]},Os:function(t){return Array.isArray(t)&&(t=t.slice()),t},gE:function(t){if("true"==t||"1"==t)var e=!0;else"false"!=t&&"0"!=t||(e=!1);return e},yF:function(t,e,n){var r=t.length,o=e.clientHeight,s=n||function(){var t=i.u.uf(e);return e.style.height="auto",t}();i.u.uf(e)>s?function r(a,u){var l=t.substring(0,u).trim();e.innerHTML=l,i.u.uf(e)>s?a===u?(e.innerHTML=l.substring(0,l.length-4)+"...",n||(e.style.height=o+"px")):r(u,u-Math.ceil((a-u)/2)):1==a-u?(e.innerHTML=l.substring(0,l.length-3)+"...",n||(e.style.height=o+"px")):r(a,a-Math.floor((a-u)/2))}(r,Math.floor(r/2)):n||(e.style.height=o+"px")},nC:function(t){var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n},nF:function(t,e){return new i.Promise(function(n){i.B.S.Da(t,e,function(t){n(t)})})},xu:function(t){return new i.Promise(function(e,n){setTimeout(function(){n(Error("timeout "+t+" ms reached"))},t)})},zB:function(){var t=navigator.languages&&navigator.languages[0];return t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),t):null},Oh:function(t,e,i){return n(t||{},e.slice(),i)},getComputedStyle:e.bind(this),YC:function(){try{return window&&window.MediaSource&&"function"==typeof window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}catch(t){return!1}},rA:function(t){var e=t.ownerDocument;if(i.u.Qc()||i.u.Vd()){var n=e.createRange();n.selectNodeContents(t);var r=window.getSelection();r.removeAllRanges(),r.addRange(n),t.setSelectionRange(0,999999),t=e.execCommand("copy",!1),r.removeAllRanges()}else t.select(),t=e.execCommand("copy");return t},wo:function(t){for(var e,n="",i=0;i<t.length;i++)e=null===t[i]?"":t[i].toString(),t[i]instanceof Date&&(e=t[i].toLocaleString()),0<=(e=e.replace(/"/g,'""')).search(/("|,|\n)/g)&&(e='"'+e+'"'),0<i&&(n+=","),n+=e;return n+"\n"},WA:function(t,e){for(var n="",i=0;i<e.length;i++)n+=this.wo(e[i]);n=new Blob([n],{type:"text/csv;charset=utf-8;"}),navigator.msSaveBlob?navigator.msSaveBlob(n,t):void 0!==(e=document.createElement("a")).download&&(n=URL.createObjectURL(n),e.setAttribute("href",n),e.setAttribute("download",t),e.style.visibility="hidden",document.body.appendChild(e),e.click(),document.body.removeChild(e))},ma:function(t){return!(!t||"function"!=typeof t)&&(0>String(Function.prototype.toString).indexOf("[native code]")?t!==Function.prototype.toString&&null:0<=String(t).indexOf("[native code]"))},bk:function(t){var e=i.f.M.tb();try{if(t&&"function"==typeof t)if(t instanceof e.Function)var n=!0;else{var r=t.toString();r&&(n=!(!(r=new t.constructor("return window; ")())||!r.top))}}catch(t){}return!!n}}}(),function(t){var e={},n=navigator.userAgent.toLowerCase(),r=navigator.platform.toLowerCase(),o=n.match(/(samsungbrowser|edge)[\s\/:]([\w\d\.]+)/);if(o||(o=n.match(/(opera|ie|trident|firefox|fxios|chrome|crios|version|fban)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)),o){var s=o[0].match(/(chrome|crios)\/(.*?)\s/);s&&(o=[null,"chrome",s[2]])}else o=[null,"unknown",0];s=("ie"===o[1]||"trident"===o[1])&&document.documentMode,e.name="version"===o[1]?o[3]:o[1],e.version=s||parseFloat("opera"===o[1]&&o[4]?o[4]:o[2]),e.platform={name:n.match(/ip(?:ad|od|hone)/)?"ios":(n.match(/(?:webos|android)/)||r.match(/mac|win|linux/)||["other"])[0],version:t.mf()||t.Qc()||t.Vd()||""},e.ZA={OF:!!document.evaluate,Rz:!!window.EE,query:!!document.querySelector,json:!!window.JSON},e.Yh=function(){return/android|blackberry|iphone|ipad|ipod|opera mini|iemobile/i.test(n)},e.Kn=function(){return e.platform.name===i.g.Ac.nq},e[e.name]=!0,e[e.name+parseInt(e.version,10)]=!0,e.platform[e.platform.name]=!0,e.Ge=function(){var n=e.Kn();return!e.Yh()||t.Qc()||n&&"safari"===e.name&&10<=e.version||n&&"chrome"===e.name&&54<=e.version||n&&"fxios"===e.name&&10.3<=e.version||n&&"fban"===e.name||!!e.platform.android&&"chrome"===e.name&&53<=e.version||!!e.platform.android&&"firefox"===e.name||!!e.platform.android&&"samsungbrowser"===e.name&&6.2<=e.version},t.xb=e}(i.u),function(t){var e=/\/\/(.+)\.uplynk\.com\//i,n={mp4:"video/mp4",ogg:"video/ogg",ogv:"video/ogg",webm:"video/webm",m3u:"application/vnd.apple.mpegurl",m3u8:"application/vnd.apple.mpegurl"},o=["mp3"],s=[];t.SD=function(t){var e=(t=t.split("?"))[0];return e=e.substring(e.lastIndexOf(".")+1).toLowerCase(),!(e=n[e])&&1<t.length&&(e=(t=i.u.Eh(t[1])).enc||(t.type+"").replace(".",""),e=n[e]),e},t.eD=function(t){t=i.f.G.hd(t);for(var e=0;e<o.length;++e)if(o[e]===t)return!0;return!1},t.VB=function(t){if(t.videoUrls)for(var e=0,n=(t=t.videoUrls).length;e<n;++e)if(i.u.Af(t[e]))return e;return-1},t.Af=function(t){return"m3u8"===i.f.G.hd(t)},t.SC=function(t){var e,n;for(e=0;e<t.length;e++){var r=i.u.Oh(t[e],["videoUrls"],[]);for(n=0;n<r.length;n++)if(i.u.Af(r[n]))return!0}return!1},t.TC=function(t){var e,n,r=0;for(e=0;e<t.length;e++){var o=i.u.Oh(t[e],["videoUrls"],[]);for(n=0;n<o.length;n++){if(!i.u.Af(o[n]))return!1;r++}}return 0<r},t.JD=function(t){return e.test(t)},t.Tc=function(t){if(!t)return null;if("string"==typeof t)return t;var e=[];if(t&&"object"===(void 0===t?"undefined":r(t)))for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];if(0===i||i&&"function"!=typeof i){var o=encodeURIComponent(n)+"=";o+=encodeURIComponent(String(i)),e.push(o)}}return e.join("&")},t.Eh=function(t){var e={};if(t){e={},t=t.split("&");for(var n=0;n<t.length;n++){var i=t[n].split("="),r=i[0];try{r=decodeURIComponent(r)}catch(t){}try{var o;1<i.length&&(o=decodeURIComponent(i[1])),e[r]=o}catch(t){}}}return e},t.ku=function(t){for(var e,n=[],r=0;r<t.length;r++)(e=i.u.Tc(t[r]))&&n.push(e);return n.join("&")},t.Cf=function(t){var e=Array.prototype.toJSON;if(delete Array.prototype.toJSON,window.JSON&&window.JSON.stringify)try{var n=JSON.stringify(t,void 0,void 0)}catch(t){}else n=window.JSON&&window.JSON.encode?window.JSON.encode(t):String.valueOf(t);return e&&(Array.prototype.toJSON=e),n},t.Yz=function(t){return window.btoa(t)},t.Ds=function(t){return window.atob(t)},t.Za=function(t,e){for(var n in e=e||{},t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.FE=function(t,e){for(var n in e=e||{},t)Object.prototype.hasOwnProperty.call(t,n)&&void 0===e[n]&&(e[n]=t[n]);return e},t.Ke=function(t){if(""===t)return 0;var e=0;(t=(t=t.split(".")[0]).split(":")).reverse();for(var n=[1,60,3600],i=0;i<t.length;i++)e+=t[i]*n[i];return e},t.Wt=function(t,e,n){var i=t.createElement("script");i.type="text/javascript",i.src=e,function(t,e){function n(){function e(){}t.onerror=e,t.onreadystatechange=e,t.onload=e,t.parentNode.removeChild(t)}t.onload=function(){for(var i=t.src,r=0;r<s.length;r++)s[r](i);n(),null!=e&&e(!0)},t.onerror=function(){n(),null!=e&&e(!1)},t.onreadystatechange=function(){"complete"!==t.readyState&&"loaded"!==t.readyState||t.onload()}}(i,n),t.getElementsByTagName("head")[0].appendChild(i)},t.As=function(t){"function"==typeof t&&s.push(t)},t.VD=function(t){var e=Array.prototype.slice,n=e.call(arguments,0);return n.shift(),function(){var i=n.concat(e.call(arguments,0));t.apply(null,i)}},t.Qt=function(t,e){return null!=t?t:e},t.find=function(t,e){for(var n,i=t.length>>>0,r=0;r<i;r++)if(e(n=t[r],r,t))return n},t.$A=function(t,e,n){if(!t||void 0===t.length)throw new TypeError(t+" is not an array!");if("function"!=typeof e)throw new TypeError(e+" is not a function!");for(var i=[],r=t.length,o=0;o<r;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i},t.Sm=function(t,e,n){n=n||{};var i,r={};for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(i)){var o=i;n.modify&&(o=n.modify(o)),!1!==n.mF&&(o=o.toLowerCase()),r[o]=t[i]}return r},t.mt=function(e,n){n=n||"";var i=i||{};return i.modify=i.modify?function(t){return t.split(n)[1]}:null,t.Sm(e,function(t){return 0===t.indexOf(n)},i)},t.EC=function(){return window.s_265&&window.s_265.channel},t.CB=function(){var t=window.rapidConfig&&window.rapidConfig.keys&&window.rapidConfig.keys.st_sec;return t||(t=i.f.G.Dc(i.f.M.Ab())),t}}(i.u),e.vdb={u:i.u},e.default=i.u,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{C:{}}});i.g.C={Mf:"actionTracker",si:"adBlockerSniffer",$d:"adConfigEntry",mv:"adContainer",ya:"adContainerProvider",pd:"adEngine",wv:"adManager",Ua:"adSystem",gl:"adTimeLogger",Lg:"adTracker",Qb:"adsConfig",Nv:"autoplayDetector",wp:"bitrateTracker",jl:"bufferedCalculator",X:"config",Zv:"contextReporting",Re:"debugInfo",ac:"display",Ga:"dom",na:"environment",mb:"errorTracker",za:"eventBus",Tf:"externalTracker",bc:"flashDetector",Ti:"flashRunner",tl:"flvRunner",Wi:"geminiMacrosResolver",Vf:"geminiPixelsTracker",yw:"heartbeatTracker",ul:"hostWindowProvider",Bw:"hwmTracker",Gw:"inViewManager",Sb:"injector",zl:"insecureRunner",Ew:"interactionTracker",Vg:"intersectionViewability",aj:"metricsHandler",bj:"moatIvtResolver",Tb:"moatViewability",$w:"pageTracker",vd:"parametersCombine",hj:"pluginEventBus",kx:"posterOptimisationTracker",nx:"videoTag",Kl:"primalTracker",wx:"rootContainer",Ol:"secureRunner",Yf:"slotOpportunityHandler",Ya:"smartViewability",Ha:"urls",Xe:"videoTagProvider",vj:"videoTracker",bh:"videoTrackerManager",ey:"viewabilityMonitor",wd:"viewabilitySubject"},e.vdb={g:{C:i.g.C}},e.default=i.g.C,e.__esModule=!0},,function(t,e,n){var i=n(1)(i||{},{log:{},yc:{},A:{},ha:{},f:{G:{}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i.yc=n(189).vdb.yc,i.A=n(4).vdb.A,i.ha=n(85).vdb.ha,i.f.G=n(24).vdb.f.G,function(t){function e(t){return 10>t?"0"+t:t}function n(n,i,o){if(s.indexOf(n)>=t.Na.Mh()&&window.console){var u=new Date,l=u.getMilliseconds();o=[e(u.getHours())+":"+e(u.getMinutes())+":"+e(u.getSeconds())+"."+(10>l?"00"+l:100>l?"0"+l:l),"["+n+"]",i+":"+(t.Na.mi?" "+t.Na.mi:"")].concat(Array.prototype.slice.apply(o)),u=n.toLowerCase(),window.console[u]||(u="log"),"object"===(void 0===(u=window.console[u])?"undefined":r(u))&&(u=Function.prototype.bind.call(u,window.console)),u&&u.apply(window.console,o)}for(u=0;u<a.length;u++)a[u](n,i,o)}var o=i.yc,s=[o.Qi,o.Zi,o.Bj,o.La],a=[],u={};t.Na=i.A.Class.extend({N:function(t){this.name=t},debug:function(){n(o.Qi,this.name,arguments)},info:function(){n(o.Zi,this.name,arguments)},warn:function(){n(o.Bj,this.name,arguments)},error:function(){n(o.La,this.name,arguments)}}),t.I=function(e){return u[e]||(u[e]=new t.Na(e)),u[e]},t.Na.mi="",t.Na.Mh=function(){if(void 0===t.Na.mh){var e=parseInt(i.f.G.eb("aolplayerloglvl"));t.Na.mh=isNaN(e)?Number(i.ha["logger.level"]):e}return t.Na.mh},t.Mz=function(t){a.push(t)}}(i.log),e.vdb={log:i.log},e.default=i.log,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{$b:{}}});i.g.$b={be:"All",Qe:"Bumper",bd:"Midroll",fb:"Overlay",gb:"Preroll"},e.vdb={g:{$b:i.g.$b}},e.default=i.g.$b,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{Promise:{},A:{},f:{G:{}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(i=t(n(28).vdb,i||{})).A=n(4).vdb.A,i.f.G=n(24).vdb.f.G,function(t){function e(){}function n(t){if("object"!==r(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this.Ib=0,this.lc=void 0,this.ic=[],l(t,this)}function o(t,e){for(;3===t.Ib;)t=t.lc;0===t.Ib?t.ic.push(e):c(function(){var n=1===t.Ib?e.ho:e.hi;if(null===n)(1===t.Ib?s:a)(e.Df,t.lc);else{try{var i=n(t.lc)}catch(t){return void a(e.Df,t)}s(e.Df,i)}},1)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":r(e))||"function"==typeof e)){var i=e.then;if(e instanceof n)return t.Ib=3,t.lc=e,void u(t);if("function"==typeof i)return void l(function(t,e){return function(){t.apply(e,arguments)}}(i,e),t)}t.Ib=1,t.lc=e,u(t)}catch(e){a(t,e)}}function a(t,e){for(var n,r=0,o=t.ic.length;!n&&r<o;r++)n=t.ic[r].hi;!n&&i.f.G.eb&&"1"===i.f.G.eb("logpromisereject")&&window.console&&console.error(e),t.Ib=2,t.lc=e,u(t)}function u(t){for(var e=0,n=t.ic.length;e<n;e++)o(t,t.ic[e]);t.ic=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,a(e,t))})}catch(t){n||(n=!0,a(e,t))}}var c=window.Promise?function(t){window.Promise.resolve().then(t)}:setTimeout,d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};n.prototype.catch=function(t){return this.then(null,t)},n.prototype.then=function(t,i){var r=new n(e);return o(this,new function(t,e,n){this.ho="function"==typeof t?t:null,this.hi="function"==typeof e?e:null,this.Df=n}(t,i,r)),r},n.prototype.finally=function(t){return new n(function(e){e(t)},function(e){e(t)})},n.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&d(arguments[0])?arguments[0]:arguments);return new n(function(e,n){function i(s,a){try{if(a&&("object"===(void 0===a?"undefined":r(a))||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){i(s,t)},n)}t[s]=a,0==--o&&e(t)}catch(t){n(t)}}if(0===t.length)return e([]);for(var o=t.length,s=0;s<t.length;s++)i(s,t[s])})},n.resolve=function(t){return t&&"object"===(void 0===t?"undefined":r(t))&&t.constructor===n?t:new n(function(e){e(t)})},n.reject=function(t){return new n(function(e,n){n(t)})},n.race=function(t){return new n(function(e,n){for(var i=0,r=t.length;i<r;i++)t[i].then(e,n)})},n.Wo=function(t,e){return function(){var i=Array.prototype.slice.apply(arguments);return(t=t||n.resolve()).then(e.bind.apply(e,[this].concat(i)))}},n.Wo(null,function(){})(),t.Promise=n}(i),e.vdb={Promise:i.Promise},e.default=i.Promise,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{G:{},pb:{},M:{},U:{}}});i.f.pb=n(184).vdb.f.pb,i.f.M=n(43).vdb.f.M,i.f.U=n(55).vdb.f.U,i.f.G=function(){function t(t){var e=document.createElement("a");return e.href=t,{protocol:e.protocol,hostname:e.hostname,port:e.port,host:e.host,origin:e.origin||e.protocol+"//"+e.hostname,pathname:e.pathname,query:e.search}}function e(t){return void 0!==t?t:i.f.M.Ab()}return{Jk:t,hd:function(e){if(!e||"string"!=typeof e)return"";var n=(e=t(e).pathname||"").lastIndexOf(".");return-1!==n?e.substring(n+1).toLowerCase():""},Nb:function(t){return t?i.f.U.startsWith(e(t),"https"):i.f.M.Nb()},Dc:function(t){return(t=/(?:(?:[\w]+:)?\/\/)?([^?#\/:]+)/.exec(e(t)))?t[1]:""},eb:function(t,n){return i.f.pb.eb(t,e(n))},MC:function(t,e){for(var n=0;n<e.length;n++){var i=e[n];t+=(-1===t.indexOf("?")?"?":"&")+i.key+"="+i.value}return t}}}(),e.vdb={f:{G:i.f.G}},e.default=i.f.G,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={$o:{da:124},kv:{da:102,code:301,description:"URI reached a timeout as defined by the video player.",la:9402},qv:{da:100,description:"Ad entries loading timeout, ajax error or parsing error"},dG:{code:202,description:"Video player expecting different duration"},kw:{da:5122,code:100,description:"Empty response",la:9401},Vp:{da:104,code:401,description:"File not found. Unable to find Linear/MediaFile from URI",la:9521},uw:{da:114,code:400,description:"General    Linear    error. Video player is unable to display the Linear Ad",la:9524},vw:{code:500,description:"General NonLinearAds error."},ww:{da:203,code:901,description:"General VPAID error.",la:9416},aq:{da:5130,code:300,description:"General Wrapper error",la:9413},Cw:{da:203,code:901,description:"Failed to inject GoogleIMA3 Dependencies.",la:9570},iq:{da:203,code:901,description:"Failed to initialize GoogleIMA3 adManager.",la:9571},$i:{da:114,code:405,description:"Problem displaying MediaFile.",la:9521},sG:{da:114,code:402,description:"Timeout of MediaFile URI",la:9521},Uw:{da:125,code:303,description:"No ads VAST response after one or more Wrappers. Also includes number of empty VAST responses from fallback.",la:9432},Vw:{da:1,code:303,description:"No ads VAST response ",la:9432},Xw:{da:120,code:403,description:"Couldn’t find MediaFile that is supported by this video player, based on the attributes of the MediaFile element.",la:9412},zq:{code:502,description:"Unable to fetch NonLinearAds/NonLinear resource."},Sw:{code:501,description:"Unable to display non-linear ad because creative dimensions do not align with creative display area"},Aq:{code:503,description:"Could not find NonLinear resource with supported type."},Cx:{da:121,code:401,description:"SSL mismatch",la:9521},sj:{da:112,code:900,description:"Undefined error."},Rx:{da:108,code:100,description:"VAST parsing error",la:9401},jr:{da:5125,code:101,description:"VAST schema validation",la:9411},MG:{da:5125,code:102,description:"VAST version not supported",la:9411},gy:{da:203,code:901,description:"VPAID ad init error",la:9416},hy:{da:204,code:901,description:"VPAID ad init timeout",la:9526},iy:{da:202,code:901,description:"VPAID ad load error",la:9416},jy:{da:201,code:901,description:"VPAID ad renderer error",la:9416},ky:{da:301,code:901,description:"VPAID ad start error",la:9416},ly:{da:302,code:304,description:"VPAID ad start timeout",la:9522},my:{da:8121,code:901,description:"VPAID swf download error",la:9416},Mr:{da:125,code:302,description:"Wrapper limit reached, as defined by the video player. Too many Wrapper responses have been received with no InLine response.",la:9413},Xl:{da:105,code:301,description:"Timeout of VAST URI provided in Wrapper element, or of VAST URI provided in a subsequent Wrapper element. (URI was either unavailable or reached a timeout as defined by the video player.)",la:9402}}},,function(t,e,n){var i=n(1)(i||{},{B:{Event:{}},A:{}});i.A=n(4).vdb.A,i.B.Event=i.A.Class.extend({type:null,data:null,target:null,N:function(t,e){this.type=t,this.data=e||{}},clone:function(){return new i.B.Event(this.type)},toString:function(){return"Event{type="+this.type+"}"}}),i.B.Event.Va="complete",e.vdb={B:{Event:i.B.Event}},e.default=i.B.Event,e.__esModule=!0},function(t,e,n){n(1)(i||{},{});var i=window.vdb||{};window.vdb=i,e.vdb={},e.default=i,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{G:{},pb:{},M:{},U:{}}});i.f.pb=n(184).vdb.f.pb,i.f.M=n(43).vdb.f.M,i.f.U=n(55).vdb.f.U,i.f.G=function(){function t(t){var e=document.createElement("a");return e.href=t,{protocol:e.protocol,hostname:e.hostname,port:e.port,host:e.host,origin:e.origin||e.protocol+"//"+e.hostname,pathname:e.pathname,query:e.search}}function e(t){return void 0!==t?t:i.f.M.Ab()}return{Jk:t,hd:function(e){if(!e||"string"!=typeof e)return"";var n=(e=t(e).pathname||"").lastIndexOf(".");return-1!==n?e.substring(n+1).toLowerCase():""},Nb:function(t){return t?i.f.U.startsWith(e(t),"https"):i.f.M.Nb()},Im:function(t){return i.f.M.Nb()&&(t=i.f.U.Mk(t,"http://","https://")),t},Dc:function(t){return(t=/(?:(?:[\w]+:)?\/\/)?([^?#\/:]+)/.exec(e(t)))?t[1]:""},eb:function(t,n){return i.f.pb.eb(t,e(n))},MC:function(t,e){for(var n=0;n<e.length;n++){var i=e[n];t+=(-1===t.indexOf("?")?"?":"&")+i.key+"="+i.value}return t}}}(),e.vdb={f:{G:i.f.G}},e.default=i.f.G,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{Ma:{},A:{},log:{}});i.A=n(4).vdb.A,i.log=n(21).vdb.log,i.Ma=i.A.Class.extend({N:function(){this.Gb={},this.Ze=[],this.Fd=i.log.I("EventBus")},addEventListener:function(t,e,n){var i=this.Gb[t];i||(i=[],this.Gb[t]=i),i.push({yf:e,priority:n||0})},removeEventListener:function(t,e){t=this.Gb[t]||[];for(var n=0;n<t.length;n++)t[n].yf===e&&(t.splice(n,1),n--)},Jz:function(t){this.Ze.push(t)},dispatchEvent:function(t){var e;if("string"==typeof t)var n=t,i=Array.prototype.slice.call(arguments,1);else n=t.type,t.target=this,i=Array.prototype.slice.call(arguments,0);var r=this.Gb[n];if(r){(r=r.slice()).sort(function(t,e){return e.priority-t.priority});var o=0;for(e=r.length;o<e;o++)this.Nj(n,i,r[o].yf)}for(o=0,e=this.Ze.length;o<e;o++)this.Ze[o].call({},n,i)},Nj:function(t,e,n){try{n.apply({},e)}catch(n){this.Fd.error(n,"event",{type:t,args:e})}},Ao:function(){for(var t in this.Fd.info("Removing all listeners."),this.Gb)Array.isArray(this.Gb[t])&&delete this.Gb[t]}}),e.vdb={Ma:i.Ma},e.default=i.Ma,e.__esModule=!0},,,,function(t,e,n){var i=n(1)(i||{},{g:{wj:{}}});i.g.wj={vc:"impression",ql:"creativeView",mj:"start",Xg:"midpoint",$c:"firstQuartile",dd:"thirdQuartile",Va:"complete",Cl:"mute",Tl:"unmute",gj:"pause",CG:"rewind",Uq:"resume",sw:"fullscreen",Up:"exitFullscreen",hx:"playerExpand",fx:"playerCollapse",Ri:"expand",Rg:"collapse",Zk:"acceptInvitation",Qg:"close",Ax:"skip",kb:"click",Ll:"progress"},e.vdb={g:{wj:i.g.wj}},e.default=i.g.wj,e.__esModule=!0},,,,,,,,,function(t,e,n){var i=n(1)(i||{},{f:{M:{},Aa:{}}});i.f.Aa=n(185).vdb.f.Aa,i.f.M=function(t){return{tb:function(){return t},Ab:function(t){return i.f.Aa.Ab(t)},Pc:function(t){return i.f.Aa.Pc(t)},vf:function(t){return i.f.Aa.vf(t)},Nb:function(){return i.f.Aa.Nb()},OB:function(){var t=this.Pc();try{return t.document.referrer}catch(t){return null}},rC:function(){return t.performance},Nt:function(){return t.navigator.userAgent},Bf:function(){try{return t.self!==t.top}catch(t){return!0}},Ft:function(){for(var e=t.self,n=0;e!==t.top&&e.parent;){try{if(e.parent&&e.parent.location&&!e.parent.location.href)throw Error("HandleSafari")}catch(t){if(!(2>n))break;n++}e=e.parent}return n}}}(window),e.vdb={f:{M:i.f.M}},e.default=i.f.M,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={jp:"ad_loaded_timeout",np:"ad_started_timeout",xp:"break_loaded_timeout",Ki:"clickThru",Sg:"companionClick",Sf:"companionDisplay",LINEAR_CHANGE:"linearChange",LOADED:"loaded",fc:"stopped",$f:"iab_viewable",dh:"iab_detection_failed",eh:"iab_detection_started"}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Gg=function(t){return t&&t.nodeName===this.xe()&&t.hasChildNodes()&&t.firstElementChild},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(218)).default),e.default=t},,,,,,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={qd:"VASTAdError",Yb:"VASTAdFinished",vi:"VASTAdFinishedForce",sc:"VASTAdInteraction",ae:"VASTAdLoaded",kp:"VASTAdLoading",Jc:"VASTAdPaused",Av:"VASTAdRequested",Pf:"VASTAdResumed",Fa:"VASTAdStarted",Rf:"VASTAdStarting",Zb:"VASTAdTimeUpdate",Pe:"VASTAdVolumeChanged",Mg:"VASTAdWaiting",Yv:"VASTCompanionAdDied",Bp:"VASTCompanionAdStarted",Va:"VASTAdEngineComplete",pl:"VASTContentPauseRequested",vc:"VASTAdImpression"}},function(t,e,n){var i=n(1)(i||{},{ga:{},Promise:{}});i.Promise=n(23).vdb.Promise,i.ga=function(){function t(){var t=this;t.ig=new i.Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.Ea=function(){return this.ig},t}(),e.vdb={ga:i.ga},e.default=i.ga,e.__esModule=!0},,,function(t,e,n){var i=n(1)(i||{},{f:{U:{}}});i.f.U={Rc:function(t){return!t||""===i.f.U.trim(t)},bA:function(t,e){return t&&t.substring(0,t.lastIndexOf("."))+"."+e},trim:function(t,e){return i.f.U.Zn(i.f.U.Pk(t,e),e)},Zn:function(t,e){return null==e&&(e="\\s"),t&&t.replace(new RegExp("^["+e+"]+","g"),"")},Pk:function(t,e){return null==e&&(e="\\s"),t&&t.replace(new RegExp("["+e+"]+$","g"),"")},startsWith:function(t,e){return t&&0===t.indexOf(e)},endsWith:function(t,e){var n=t&&t.lastIndexOf(e);return-1!==n&&n===t.length-e.length},Mk:function(t,e,n){return t&&t.replace(new RegExp(e,"g"),n)},sE:function(t){return t&&t.replace(/.*?:\/\//g,"")},PA:function(t,e,n){return"string"==typeof t&&"string"==typeof e&&(!0===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e)},Hm:function(t){if(t)return(t=t.toLowerCase()).charAt(0).toUpperCase()+t.slice(1)},repeat:function(t,e){var n="";if(0>e)throw new RangeError("repeat count must be non-negative");if(1/0===e)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(268435456<=t.length*e)throw new RangeError("repeat count must not overflow maximum string size");for(var i=0;i<e;i++)n+=t;return n}},e.vdb={f:{U:i.f.U}},e.default=i.f.U,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{cc:{}}});i.g.cc={Uf:"flash",cq:"html5",Yg:"o2unit",Fq:"VRM_plgn",Bx:"smart",ah:"VDMS"},e.vdb={g:{cc:i.g.cc}},e.default=i.g.cc,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Dl=e.nl=e.Vl=e.Sp=e.jq=e.rp=e.Ql=e.oj=void 0,t=i(t=n(109));var r=n(110),o=i(r),s=i(r=n(13)),a=i(n=n(73));n=e.oj=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=this.Ch();return e.url=a.default.trim(s.default.Xa(t)),e},e.prototype.Ch=function(){return new o.default},e}(t.default),e.Ql=new n("Survey"),e.rp=new n("Attempt"),e.jq=new n("Impression"),e.Sp=new n("Error"),e.Vl=new n("VASTAdTagURI"),e.nl=new n("CompanionClickThrough"),e.Dl=new n("NonLinearClickThrough")},,,,function(t,e,n){var i=n(1)(i||{},{B:{Kc:{},Event:{}}});i.B.Event=n(193).vdb.B.Event,i.B.Kc=i.B.Event.extend({data:null,Gm:null,N:function(t,e,n){this._super(t,!0,!0),this.data=e,this.Gm=n}}),function(t){t.uj="Reporting.Video.Play",t.Ux="Reporting.Video.Decile",t.Vx="Reporting.Video.HWM",t.el="Reporting.Ad.Request",t.bl="Reporting.Ad.Engine.Request",t.ti="Reporting.Ad.Engine.Response",t.$k="Reporting.Ad.Engine.Flow",t.ov="Reporting.Ad.Early.Stop",t.Ne="Reporting.Ad.Issue",t.wi="Reporting.Ad.Slot.Opportunity",t.ac="Reporting.Basic.Display",t.kb="Reporting.Basic.Click",t.La="Reporting.Basic.Error"}(i.B.Kc),e.vdb={B:{Kc:i.B.Kc}},e.default=i.B.Kc,e.__esModule=!0},,,,,,,,,,,function(t,e,n){var i=n(1)(i||{},{g:{rd:{}}});i.g.rd={Rp:"VIDEO",hq:"IMA",Jl:"PREBID",Ul:"VAST",Vi:"GEMINI"},e.vdb={g:{rd:i.g.rd}},e.default=i.g.rd,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{U:{}}});i.f.U={Rc:function(t){return!t||""===i.f.U.trim(t)},bA:function(t,e){return t&&t.substring(0,t.lastIndexOf("."))+"."+e},trim:function(t,e){return i.f.U.Zn(i.f.U.Pk(t,e),e)},Zn:function(t,e){return null==e&&(e="\\s"),t&&t.replace(new RegExp("^["+e+"]+","g"),"")},Pk:function(t,e){return null==e&&(e="\\s"),t&&t.replace(new RegExp("["+e+"]+$","g"),"")},startsWith:function(t,e){return t&&0===t.indexOf(e)},endsWith:function(t,e){var n=t&&t.lastIndexOf(e);return-1!==n&&n===t.length-e.length},Mk:function(t,e,n){return t&&t.replace(new RegExp(e,"g"),n)},sE:function(t){return t&&t.replace(/.*?:\/\//g,"")},PA:function(t,e,n){return"string"==typeof t&&"string"==typeof e&&(!0===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e)},Hm:function(t){if(t)return(t=t.toLowerCase()).charAt(0).toUpperCase()+t.slice(1)},repeat:function(t,e){var n="";if(0>e)throw new RangeError("repeat count must be non-negative");if(1/0===e)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(268435456<=t.length*e)throw new RangeError("repeat count must not overflow maximum string size");for(var i=0;i<e;i++)n+=t;return n}},e.vdb={f:{U:i.f.U}},e.default=i.f.U,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{qa:{},M:{},ke:{}}});i.f.M=n(43).vdb.f.M,i.f.ke=n(301).vdb.f.ke,i.f.qa=function(){function t(t){try{var e=t.document.hasFocus&&t.document.hasFocus()}catch(t){}return e}function e(){return!(!t(n.tb())&&!t(n.tb().top))}var n=i.f.M,r=i.f.ke.RC(n.tb().document);return{hasFocus:e,Fc:function(){return!!e()||!1===n.tb().document[r.hidden]||"visible"===n.tb().document[r.visibilityState]},EH:function(){return r.KF}}}(),e.vdb={f:{qa:i.f.qa}},e.default=i.f.qa,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{M:{},Aa:{}}});i.f.Aa=n(185).vdb.f.Aa,i.f.M=function(t){return{tb:function(){return t},Ab:function(t){return i.f.Aa.Ab(t)},Pc:function(t){return i.f.Aa.Pc(t)},vf:function(t){return i.f.Aa.vf(t)},Nb:function(){return i.f.Aa.Nb()},OB:function(){var t=this.Pc();try{return t.document.referrer}catch(t){return null}},rC:function(){return t.performance},Nt:function(){return t.navigator.userAgent},Bf:function(){try{return t.self!==t.top}catch(t){return!0}},Ft:function(){for(var e=t.self,n=0;e!==t.top&&e.parent;){try{if(e.parent&&e.parent.location&&!e.parent.location.href)throw Error("HandleSafari")}catch(t){if(!(2>n))break;n++}e=e.parent}return n}}}(window),e.vdb={f:{M:i.f.M}},e.default=i.f.M,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{ads:{Hi:{}}});i.ads.Hi={LOADED:"loaded",Lr:"win",Dx:"starting",STARTED:"started",Sv:"boost",FINISHED:"finished",tq:"killed",SKIPPED:"skipped",Ug:"failover",jw:"early-stop",zx:"site-mismatch",$c:"q1",jj:"q2",dd:"q3",ej:"non-linear"},e.vdb={ads:{Hi:i.ads.Hi}},e.default=i.ads.Hi,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(17)),o=i(t=n(51)),s=i(t=n(27));t=i(t=n(30));var a=i(n=n(34)),u=/^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)o2shim/i,l=Symbol(),c=Symbol(),d=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i).P=n,i[l]=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.zf=function(){this.D.GH=this.P.getCurrentTime()},e.prototype.load=function(){this.element=this.createElement()},e.prototype.ii=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=this.D.sb;t.duration=e.duration,t.skippable=e.Hf||!1,t.skipOffsetTime=e.Tk||null,t.skipOffsetPercent=e.Sk||null,(e=this.D.ad?this.D.ad.oc:null)&&(t.sequence=e),this.P&&this.P.MA(),this.nt(t),this.D.dispatchEvent(new s.default(o.default.Fa,t))},e.prototype.nt=function(t){this[c]||(this.D.dispatchEvent(new s.default(o.default.Rf,t)),this[c]=!0)},e.prototype.Fe=function(){this.Ij||(this.Ij=!0,this.D.Ak(),this.D.sg(r.default.vc),this.track(a.default.ql))},e.prototype.Vk=function(t){.25<t&&this.Cb(a.default.$c),.5<t&&this.Cb(a.default.Xg),.75<t&&this.Cb(a.default.dd)},e.prototype.stop=function(){this.D.complete(!0)},e.prototype.Jf=function(){this.stop()},e.prototype.skip=function(){this.D.stop()},e.prototype.track=function(t,e){this.D.hk(t,e)},e.prototype.Cb=function(t){t===a.default.Va&&!this[d]||-1!==this[l].indexOf(t)||(this[l].push(t),this.track(t,void 0))},e.prototype.au=function(){return u.test(this.gd)},e.prototype.resize=function(){},e.prototype.invokeAdMethod=function(){},e.prototype.setVolume=function(){},e.prototype.resume=function(){},e.prototype.pause=function(){},e.prototype.getCurrentTime=function(){var t=this.Qd(),e=this.getDuration();return 0<e&&0<t?e-t:0},e.prototype.Qd=function(){return-1},e.prototype.getDuration=function(){return-1},e.prototype.zo=function(){this[d]=!0},e.prototype.Sn=function(){return this[d]},e}(t.default),e.default=n,n.Yq="Stopping ad initiation: start timeout reached"},function(t,e,n){var i=n(1)(i||{},{ha:{}});i.ha=function(){var t;return{N:function(e){var n="stage"===e,r=n?".dev":"",o=n?"-stage":"";for(var s in t={"cdn.url":"https://cdn-ssl.vidible.tv/"+e+"/","s3.url":"https://s3.amazonaws.com/vdb-cdn-files/","tracking.url":"https://trk"+r+".vidible.tv/trk/","delivery.url":"https://delivery"+r+".vidible.tv/","adserver.url":"https://video"+o+".adaptv.advertising.com/","adstracker.url":"https://video"+o+".adaptv.advertising.com/","aeg.default_vendor":n?"593fb37531e0a533fe6dd8fa":"593fb311c214e33ec50202f0","logger.level":n?"0":"3","ima.url":"https://s0.2mdn.net/instream/html5/ima3"+(n?"_debug":"")+".js","default.pid":n?"5912acc731e0a563e7535e52":"59947c0544a64b1a49e52a48","default.bid":n?"53a2cd08e4b0915a797d6a2e":"56bcd17de4b0a5976ac0da12","default.bcid":n?"50d595ec0364e95588c77bd2":"56bcd17ce4b018167fea5539"})Object.prototype.hasOwnProperty.call(t,s)&&(i.ha[s]=t[s])}}}(),e.vdb={ha:i.ha},e.default=i.ha,e.__esModule=!0},,,,,function(t,e,n){var i=(t=n(1))(i||{},{B:{S:{},nb:{}},A:{},Ma:{}});i.A=n(4).vdb.A,i.B=t(n(133).vdb.B,i.B||{}),i.B.nb=n(188).vdb.B.nb,i.Ma=n(84).vdb.Ma,function(t){t.S=i.A.Class.extend({Z:function(){this.Qa?this.Qa.Z():void 0!==this.vb.nodeType?i.B.removeEventListener(this.vb,this.af,this.Ed):this.vb.removeEventListener(this.af,this.Ed,this.wh)},link:function(){var t=arguments||[];if(!arguments.length)return this;this.Qa||(this.Qa=new i.B.nb(this));for(var e=0;e<t.length;++e){var n=t[e];n.Qa?this.Qa.bo(n.Qa):this.Qa.wb(n)}return this.Qa.Mm(),this}}),t.S.bind=function(e,n,r,o,s){o=!!o,s=!!s;var a=new t.S;return a.vb=e,a.af=n,a.ih=r,a.wh=o,a.rh=s,a.Ed=function(){this.rh&&this.Z(),this.ih&&this.ih.apply(window,arguments)}.bind(a),void 0!==e.nodeType?i.B.addEventListener(e,n,a.Ed):e.addEventListener(n,a.Ed,o),a},t.S.Da=function(e,n,i){return t.S.bind(e,n,i,void 0,!0)},t.S.empty=function(){var e=new t.S;return e.vb=new i.Ma,e.af="DOESN'T_MATTER",e.wh=!0,e.rh=!0,e},t.S.group=function(e){for(var n=t.S.empty(),i=0;i<arguments.length;i++){var r=arguments[i];r.length?(r=t.S.group.apply(null,r),n.link(r)):n.link(r)}return n}}(i.B),e.vdb={B:{S:i.B.S}},e.default=i.B.S,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{Ma:{},A:{},log:{}});i.A=n(4).vdb.A,i.log=n(21).vdb.log,i.Ma=i.A.Class.extend({N:function(){this.Gb={},this.Ze=[],this.Fd=i.log.I("EventBus")},addEventListener:function(t,e,n){var i=this.Gb[t];i||(i=[],this.Gb[t]=i),i.push({yf:e,priority:n||0})},removeEventListener:function(t,e){t=this.Gb[t]||[];for(var n=0;n<t.length;n++)t[n].yf===e&&(t.splice(n,1),n--)},Jz:function(t){this.Ze.push(t)},dispatchEvent:function(t){var e;if("string"==typeof t)var n=t,i=Array.prototype.slice.call(arguments,1);else n=t.type,t.target=this,i=Array.prototype.slice.call(arguments,0);var r=this.Gb[n];if(r){(r=r.slice()).sort(function(t,e){return e.priority-t.priority});var o=0;for(e=r.length;o<e;o++)this.Nj(n,i,r[o].yf)}for(o=0,e=this.Ze.length;o<e;o++)this.Ze[o].call({},n,i)},Nj:function(t,e,n){try{n.apply({},e)}catch(n){this.Fd.error(n,"event",{type:t,args:e})}},Ao:function(){for(var t in this.Fd.info("Removing all listeners."),this.Gb)Array.isArray(this.Gb[t])&&delete this.Gb[t]}}),e.vdb={Ma:i.Ma},e.default=i.Ma,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{ha:{}});i.ha=function(){var t;return{N:function(e){var n="stage"===e,r=n?".dev":"",o=n?"-stage":"";for(var s in t={"cdn.url":"https://cdn-ssl.vidible.tv/"+e+"/","s3.url":"https://s3.amazonaws.com/vdb-cdn-files/","tracking.url":"https://trk"+r+".vidible.tv/trk/","delivery.url":"https://delivery"+r+".vidible.tv/","adserver.url":"https://video"+o+".adaptv.advertising.com/","adstracker.url":"https://video"+o+".adaptv.advertising.com/","aeg.default_vendor":n?"593fb37531e0a533fe6dd8fa":"593fb311c214e33ec50202f0","logger.level":n?"0":"3","ima.url":"https://s0.2mdn.net/instream/html5/ima3"+(n?"_debug":"")+".js","default.pid":n?"5912acc731e0a563e7535e52":"59947c0544a64b1a49e52a48","default.bid":n?"53a2cd08e4b0915a797d6a2e":"56bcd17de4b0a5976ac0da12","default.bcid":n?"50d595ec0364e95588c77bd2":"56bcd17ce4b018167fea5539"})Object.prototype.hasOwnProperty.call(t,s)&&(i.ha[s]=t[s])}}}(),e.vdb={ha:i.ha},e.default=i.ha,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{ga:{},Promise:{}});i.Promise=n(23).vdb.Promise,i.ga=function(){function t(){var t=this;t.ig=new i.Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.Ea=function(){return this.ig},t}(),e.vdb={ga:i.ga},e.default=i.ga,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){return t&&t.__esModule?t:{default:t}}(n(290));var i=Symbol(),r=Symbol(),o=Symbol();t=function(t){function e(n,s,a,u,l){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,s),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[i]=u,n[r]=l,n[o]=a,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.IC=function(){return this[i]},e.prototype.xC=function(){return this[r]},e.prototype.qB=function(){return this[o]},e.prototype.clone=function(){return new e(this.type,this.data,this[o],this[i],this[r])},e}(t.default),e.default=t,t.LOADING="EntriesManagerEvent.LOADING",t.LOADED="EntriesManagerEvent.LOADED",t.Se="EntriesManagerEvent.FAILED"},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={mq:"AdSystem.InvokeAdMethod",LINEAR_CHANGE:"AdSystem.LinearChange",Wf:"AdSystem.Resize"}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){var i=this[w];this[w]=null,A.debug("failOver",t,i),n=n||d.default.aq,i?("VAST ajax error"===t&&u.call(this,n),0===i.ads.length&&i.parent&&(t=i.po,e=new h.default(h.default.La,null,null,{error:n}),t.dispatchEvent(e),this[C].ki(e),i=i.parent,this[w]=i),this[M]===i.ads[0]&&i.ads.shift(),this.Eg(i,!0)):o.call(this,t+(e?" ("+e+")":""),n)}function o(t,e){A.warn("interruptOnError",t),clearTimeout(this[D]),this[D]=null;var n=t instanceof _.default?t.message:t;t=t instanceof _.default?t.Po:null,e=new l.default(n,n===k?l.default.xx:l.default.kj,t,t?d.default.Xl:e),this.dispatchEvent(c.kq,e)}function s(t,e){function n(e){if(e=e.Oo,this[P].dispatchEvent(new m.default(x,{ad:this[S],url:o})),t||!a.call(this,e,s)){var n=d.default.Vp;e?n=d.default.kv:b.default.Nb()&&0!==o.indexOf("https:")&&(n=d.default.Cx),r.call(this,"VAST ajax error",e?"request timeout over "+s+"ms":null,n)}}function i(n){this[P].dispatchEvent(new m.default(x,{ad:this[S],url:o}));var i=n.data;i||(i=n.text),g.default.Rc(n.text)?r.call(this,"Empty VAST error",null,d.default.kw):null===this[D]||this.qu(i,e,t,o)}var o=t||this[S]&&this[S].getUrl();o=this[P].Rd().resolve(o);var s=this[S]&&!t?this[S].tn(o):this[I];o=E.default.Im(o),o=g.default.Mk(o,"#",encodeURIComponent("#")),this[P].dispatchEvent(new m.default(B,{ad:this[S],url:o})),p.default.Rh(o,null,{timeout:s,withCredentials:!0}).then(i.bind(this),function(e){this[S]&&this[S].oD()&&!t?n.call(this,e):(this[L].Me("ad",null,"Failed VAST request with Credentials"),p.default.Rh(o,null,{timeout:s}).then(i.bind(this),n.bind(this)))}.bind(this))}function a(t,e){return!(!this[S]||!this[S].Lo())&&(this[L].Me("ad",null,"switching to the next ad in [urls] in the same entry."+(t?" Because of timeout ("+e+")":"")),s.call(this,null),!0)}function u(t){this[M]&&(this.dispatchEvent(c.Ne,t),this[M].DA(this[C],t))}Object.defineProperty(e,"__esModule",{value:!0}),e.ir=e.gr=e.hr=e.Ww=void 0;var l=i(t=n(102)),c=n(141),d=i(t=n(25)),h=i(t=n(17)),p=i(t=n(197)),f=i(t=n(2)),_=i(t=n(90)),m=i(t=n(27));t=i(t=n(30));var y=n(3);y=i(y);var v=n(73),g=i(v),E=i(v=n(29)),b=i(n=n(75)),A=y.default.I("VastLoader"),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol(),L=Symbol(),O=Symbol(),w=Symbol(),M=Symbol(),D=Symbol(),N=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[S]=n.ad,i[T]=n.GF,i[I]=n.OD,i[C]=n.TA,i[P]=n.H,n=i[P].ka(),i[R]=n.K(f.default.Ha),i[L]=n.K(f.default.mb),i[O]=0,i[N]=n.K(f.default.X),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Bn=function(){this[O]=0},e.prototype.Kg=function(){var t=this[S]?this[S].dn():this[I];this[D]=window.setTimeout(function(t){u.call(this,d.default.Xl),o.call(this,new _.default("Loading timeout "+t+" ms is exceeded",t),d.default.Xl)}.bind(this,t),t)},e.prototype.qu=function(t,e,n,i){A.debug("parseAndProcess",t);try{var o=this[T].parse(t);o.Mo=i,e&&e(o),this.Eg(o,null,0,i)}catch(t){!n&&a.call(this)||r.call(this,t.message,null,t||d.default.jr)}},e.prototype.Eg=function(t,e){var n=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,o=arguments[3];if(A.debug("processModel",t),0===t.ads.length)t.bb.forEach(function(t){n[L].qe(t.url.replace(/\[ERRORCODE\]|%5BERRORCODE%5D|\{errNo\}/g,"303"))}),(i=0<this[O]&&d.default.Uw)?u.call(this,i):i=d.default.Vw,r.call(this,k,null,i);else{e||function(t){t.ads.sort(function(t,e){return t.oc-e.oc})}(t);var a=t.ads[i];this[P].dispatchEvent(new m.default(U,{ad:a,$a:this[S],Yu:o})),a.Fk?(this[w]=t,this[M]=t.ads.splice(i,1)[0],this[O]+=1,8>=this[O]?(a.zu(this[C],{},this[N].Vh()),s.call(this,a.Ks.url,function(e){a.Wz(e),a.lE(e,n[M]),e.parent=t,e.po=a})):(this[w]=null,u.call(this,d.default.Mr),r.call(this,"Max number of wrapper redirects 8 is exceeded",null,d.default.Mr))):function(t){clearTimeout(this[D]),this[D]=null,this.dispatchEvent(c.Cp,t)}.call(this,t)}},e.prototype.kE=function(t,e){this.Eg(t,void 0,e)},e.prototype.load=function(t){this.Bn(),this.Kg(),s.call(this,t)},e.prototype.AA=function(){--this[O]},e}(t.default),e.default=n;var k=e.Ww="No ads provided",B=e.hr="VastLoader.Vast.Loading",x=e.gr="VastLoader.Vast.Loaded",U=e.ir="VastLoader.Vast.ProcessAd"},function(t,e,n){var i=n(1)(i||{},{bb:{Error:{},Ml:{},Sl:{},Fl:{}},A:{}});i.A=n(4).vdb.A,i.bb.Error=i.A.Class.extend({N:function(t,e){this.message=t||"",this.code=e},toString:function(){return"Error{message="+this.message+"}"}}),i.bb.Ml=i.bb.Error.extend({N:function(t,e){this._super(t),this.code=e}}),i.bb.Sl=i.bb.Error.extend({Po:0,N:function(t,e){this._super(t),this.Po=e}}),i.bb.Fl=i.bb.Error.extend({}),e.vdb={bb:{Error:i.bb.Error,Ml:i.bb.Ml,Sl:i.bb.Sl,Fl:i.bb.Fl}},e.default=i.bb.Error,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,e.Zf,i,null),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i).nd=n,i.data=r||{},i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){return new e(this.nd,this.Nh(),this.data)},e.prototype.toString=function(){return"VideoTrackingEvent{trackingType="+this.nd+", recordCount="+this.Kd.length+"}"},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(17)).default),e.default=t,t.Zf="VASTEventVideoTracking"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(3))&&t.__esModule?t:{default:t},n=(n=n(17))&&n.__esModule?n:{default:n};var i=t.default.I("CompanionShowEvent");n=function(t){function e(n,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i.debug("init",n,"childEvent",r),n=t.call(this,e.Li,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).dk=r instanceof e?r.dk.slice(0):[],n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){return i.debug("clone"),new e(this.Nh(),this)},e}(n.default),e.default=n,n.Li="VASTEventCompanionShow"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).Ms=[],n.ei=[],n.Ae=[],n.duration=null,n.Hf=!1,n.Tk=null,n.Sk=null,n.parameters=null,n.Jb=null,n.zA=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(151)).default),e.default=t},function(t,e,n){var i=n(1)(i||{},{f:{L:{wa:{}},qa:{}},A:{},g:{C:{}}});i.f.qa=n(74).vdb.f.qa,i.A=n(4).vdb.A,i.g.C=n(19).vdb.g.C,i.f.L.wa=i.A.Class.extend({N:function(t){this.qb=t[i.g.C.wd]},md:function(t){this.qb=t},Fc:function(){return i.f.qa.Fc()},ua:function(){},xf:function(){var t=this.ua();return this.qb&&-1!==t?!this.Fc()||50>t?0:1:-1}},[i.g.C.wd]),e.vdb={f:{L:{wa:i.f.L.wa}}},e.default=i.f.L.wa,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{$b:{}}});i.g.$b={be:"All",Qe:"Bumper",bd:"Midroll",fb:"Overlay",gb:"Preroll"},e.vdb={g:{$b:i.g.$b}},e.default=i.g.$b,e.__esModule=!0},,,,function(c,e,b){c=b(1);var a=c(a||{},{f:{Ja:{}},log:{}});a=c(b(28).vdb,a||{}),a.log=b(21).vdb.log,a.f.Ja=function(){function b(t){var e=+(1e6*Math.random()).toFixed(0);return t[e]?b(t):e}function f(t){t=(t=t.toString()).substring(t.indexOf("{")+1,t.lastIndexOf("}"));try{var e=new window.Blob([t],{type:"application/javascript"})}catch(n){window.BlobBuilder=c,(e=new window.BlobBuilder).append(t),e=e.getBlob()}return window.URL.createObjectURL(e)}var d=a.log.I("Timers"),c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder;return function(){function a(){var t=this,e={},n={};t.onmessage=function(i){switch(i.data.type){case"setTimeout":e[i.data.id]=setTimeout(function(){t.postMessage({id:i.data.id,type:"setTimeout"})},i.data.timeout);break;case"clearTimeout":clearTimeout(e[i.data.id]),delete e[i.data.id];break;case"setInterval":n[i.data.id]=setInterval(function(){t.postMessage({id:i.data.id,type:"setInterval"})},i.data.timeout);break;case"clearInterval":clearInterval(n[i.data.id]),delete n[i.data.id]}}}var g=!1;try{g=eval("(_ => true)()")}catch(t){d.debug("Modern browser check failed")}if(!(window.Worker&&window.Promise&&g&&window.Blob&&c))return!1;window.URL=window.URL||window.webkitURL;try{var e=new window.Worker(f(a))}catch(t){return d.debug("Failed to instantiate worker"),!1}var h={},l={};return e.onmessage=function(t){"setTimeout"===(t=t.data).type&&h[t.id]&&(h[t.id](),delete h[t.id]),"setInterval"===t.type&&l[t.id]&&l[t.id]()},{setTimeout:function(t,n){var i=b(h);return h[i]=t,e.postMessage({id:i,type:"setTimeout",timeout:n}),i},setInterval:function(t,n){var i=b(l);return l[i]=t,e.postMessage({id:i,type:"setInterval",timeout:n}),i},clearTimeout:function(t){delete h[t],e.postMessage({id:t,type:"clearTimeout"})},clearInterval:function(t){delete l[t],e.postMessage({id:t,type:"clearInterval"})}}}()||{setTimeout:setTimeout.bind(window),setInterval:setInterval.bind(window),clearTimeout:clearTimeout.bind(window),clearInterval:clearInterval.bind(window)}}(),e.vdb={f:{Ja:a.f.Ja}},e.default=a.f.Ja,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{Ii:{}}});i.g.Ii={gv:"ADSET_BASED",Gp:"CONTENT_BASED",Hp:"CONTENT_BASED_WITH_PODS",Rq:"PREBID_JS"},e.vdb={g:{Ii:i.g.Ii}},e.default=i.g.Ii,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{fa:{Pa:{}}});i.fa.Pa={ev:"adminibar",fv:"adminibar_opacity",Jv:"aggressiveAdMode",Kv:"animated_poster_text",Ng:"app_id",Mv:"arr",Pv:"autoplayinview",Pg:"beoncw",tp:"beonvid",Rv:"bigPlayPauseButton",Tv:"carousel",Uv:"centeredFishEye",Vv:"channel",zp:"chromeMode",Xv:"clickurl",$v:"csaccid",aw:"csc4",sl:"disable_3p",cw:"disable360poster",dw:"disableads",ew:"disabledcr",fw:"disableadspreloading",Mp:"disableFlashAd",gw:"disableFullscreenButton",Np:"disable_moat",iw:"discovery_page_preview",lw:"enable_subscript",ow:"fishEyeAngle",pw:"forcereactions",qw:"force_nielsen_dar",rw:"force_nielsen_ocr",tw:"fwsitesection",zw:"hideDuration",Aw:"hideskin",Dw:"initialVolume",Hw:"iosapp",Iw:"isResponsive",Jw:"languageAutoDetection",Lw:"lightbox",Mw:"loadingplaceholder",Nw:"loadTimeLimit",Qw:"360mobile",Yw:"oathHlsJs",Zw:"onLoad",ax:"paid_p",bx:"pauseIfScrolledAway",cx:"pauseIfOutOfTab",dx:"pct",ex:"playback",ix:"posterstyle",jx:"postertype",Rq:"prebid_js",lx:"prebid_bidder",mx:"prebid_placement_id",Qq:"prebid_ad_server",Sq:"prebid_params",ox:"previewposter",qx:"pt",ux:"reward",yx:"showVpaidControls",Pl:"secureVPAIDsMode",$g:"sid",lj:"sound",Hx:"subscript_language",Jx:"tilt",Kx:"timelinepreview",Lx:"timeline_preview_border",Mx:"timeline_preview_shape",Qx:"upnext",URL:"url",tj:"vid",fy:"vls.ad",ny:"vrm_2_0",oy:"vrsplit",hw:"disablevolumecookies",nw:"endcardimageurl",mw:"endcardclickurl"},e.vdb={fa:{Pa:i.fa.Pa}},e.default=i.fa.Pa,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i,r,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).severity=void 0===i?e.kj:i,n.timeout=r,n.rc=o,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(90)).default),e.default=t,t.xx=0,t.kj=1,t.GG=2},function(t,e,n){var i=n(1)(i||{},{fa:{Pa:{}}});i.fa.Pa={ev:"adminibar",fv:"adminibar_opacity",Jv:"aggressiveAdMode",Kv:"animated_poster_text",Ng:"app_id",Mv:"arr",Pv:"autoplayinview",Pg:"beoncw",tp:"beonvid",Rv:"bigPlayPauseButton",Tv:"carousel",Uv:"centeredFishEye",Vv:"channel",zp:"chromeMode",Xv:"clickurl",$v:"csaccid",aw:"csc4",sl:"disable_3p",cw:"disable360poster",dw:"disableads",ew:"disabledcr",fw:"disableadspreloading",Mp:"disableFlashAd",gw:"disableFullscreenButton",Np:"disable_moat",iw:"discovery_page_preview",lw:"enable_subscript",ow:"fishEyeAngle",pw:"forcereactions",qw:"force_nielsen_dar",rw:"force_nielsen_ocr",tw:"fwsitesection",zw:"hideDuration",Aw:"hideskin",Dw:"initialVolume",Hw:"iosapp",Iw:"isResponsive",Jw:"languageAutoDetection",Lw:"lightbox",Mw:"loadingplaceholder",Nw:"loadTimeLimit",Qw:"360mobile",Yw:"oathHlsJs",Zw:"onLoad",ax:"paid_p",bx:"pauseIfScrolledAway",cx:"pauseIfOutOfTab",dx:"pct",ex:"playback",ix:"posterstyle",jx:"postertype",Rq:"prebid_js",lx:"prebid_bidder",mx:"prebid_placement_id",Qq:"prebid_ad_server",Sq:"prebid_params",ox:"previewposter",qx:"pt",ux:"reward",yx:"showVpaidControls",Pl:"secureVPAIDsMode",$g:"sid",lj:"sound",Hx:"subscript_language",Jx:"tilt",Kx:"timelinepreview",Lx:"timeline_preview_border",Mx:"timeline_preview_shape",Qx:"upnext",URL:"url",tj:"vid",fy:"vls.ad",ny:"vrm_2_0",oy:"vrsplit",hw:"disablevolumecookies",nw:"endcardimageurl",mw:"endcardclickurl"},e.vdb={fa:{Pa:i.fa.Pa}},e.default=i.fa.Pa,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var r=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(r=!r||"object"!=typeof r&&"function"!=typeof r?this:r).Ca=n,r.Hj=i,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.V=function(){var t=[this.Hj].concat(Array.prototype.slice.call(arguments));try{return this.Ca.V.apply(this.Ca,t)}catch(t){}this.dispatchEvent(e.Tg)},e.prototype.addEventListener=function(n,i){n===e.Tg?t.prototype.addEventListener.call(this,n,i):this.Ca.addEventListener(this.Hj,n,i)},e.prototype.removeEventListener=function(n,i){n===e.Tg?t.prototype.removeEventListener.call(this,n,i):this.Ca.removeEventListener(this.Hj,n,i)},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(30)).default),e.default=t,t.Tg="FlashObjectWrapper.CRITICAL_ERROR"},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={Uf:"application/x-shockwave-flash",Xp:"video/x-flv",rq:"application/javascript",sq:"application/x-javascript",Px:"uplynk/m3u8"}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=e},e.nj=new t("STATIC"),e.xl=new t("IFRAME"),e.vl=new t("HTML")},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(3))&&t.__esModule?t:{default:t},n=(n=n(17))&&n.__esModule?n:{default:n};var i=t.default.I("CompanionTrackingEvent");n=function(t){function e(n,r,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i.debug("init",n,r,o),r=t.call(this,e.Mi,r,null),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(r=!r||"object"!=typeof r&&"function"!=typeof r?this:r).nd=n,r.Ps=o,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){return i.debug("clone"),new e(this.nd,this.Nh(),this.Ps)},e}(n.default),e.default=n,n.Mi="VASTEventCompanionTracking"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).fk=[],n.xm="",n.required=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(151)).default),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(218))&&t.__esModule?t:{default:t};var i=(n=n(13))&&n.__esModule?n:{default:n};n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Gg=function(t){return t&&t.nodeName===this.xe()&&i.default.UC(t)},e}(t.default),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.url=e}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.El=e.ol=e.rl=e.ml=e.ll=e.qq=void 0,t=n(57);var i=function(t){return t&&t.__esModule?t:{default:t}}(n(220));n=e.qq=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);return n.id=e.getAttribute("id"),n},e.prototype.Ch=function(){return new i.default},e}(t.oj),e.ll=new n("ClickThrough"),e.ml=new n("ClickTracking"),e.rl=new n("CustomClick"),e.ol=new n("CompanionClickTracking"),e.El=new n("NonLinearClickTracking")},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={ep:"ad_chromes",PF:"adaptv_error",yp:"vidible_captions",Jp:"one_video_custom_tracking_beacons",fq:"adaptv_iab_viewable_beacons",lq:"one_video_inventory_attributes",uq:"o2Player_leaveBehind",Gl:"one_video_feacons",Wq:"adaptv_scripts",br:"vidible_360",cr:"adaptv_timeout_beacons"}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(13));t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");e&&(this.type=e.getAttribute("type"),this.value=i.default.Xa(e))}return t.prototype.prepare=function(t,e){this.zb=t,this.H=e,this.$n=e.Rd()},t.prototype.Ia=function(){this.value=this.$n.resolve(this.value),(new Image).src=this.value},t}(),e.default=t},function(t,e,n){var i=n(1)(i||{},{aa:{uc:{},Ub:{}},u:{},g:{C:{}},f:{qa:{}}});i.aa.Ub=n(153).vdb.aa.Ub,i.u=n(18).vdb.u,i.g.C=n(19).vdb.g.C,i.f.qa=n(74).vdb.f.qa,i.aa.uc=i.aa.Ub.extend(function(){var t=i.g.C;return{N:function(e){this._super(e),this.ca=e[t.na],this.fd=e[t.Ya],this.df=e[t.Tb],this.dm=e[t.mb]},jb:function(t,e,n){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);for(i in e)e.hasOwnProperty(i)&&null!=e[i]&&(t=isNaN(e[i]),"number"==typeof e[i]&&t||(n[i]=e[i]));return n},ri:function(t){return this.jb({"p.vw.active":+i.f.qa.Fc(),"p.vw.sound":Math.round(100*this.ca.getVolume()),vwa:this.fd.ua()},{vwm:this.df.ua()},t)},oo:function(t){return this.jb({ss:(window.s_265||{}).channel||""},{},t)}}}(),[i.g.C.X,i.g.C.Re,i.g.C.Ha,i.g.C.na,i.g.C.Ya,i.g.C.Tb,i.g.C.mb]),e.vdb={aa:{uc:i.aa.uc}},e.default=i.aa.uc,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Pw="media-item-playback-started",e.Ow="media-item-playback-ended",e.xq="media-item-playback-progress"},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.gb="preroll",e.bd="midroll",e.yG="postroll",e.JG="trigger",e.ej="nonlinear",e.Rw="native"},,,,,,,,,,,,,,,,function(t,e,n){var i=n(1)(i||{},{Wa:{},A:{},Promise:{},Oa:{},f:{Gc:{}}});i.A=n(4).vdb.A,i.Promise=n(23).vdb.Promise,i.Oa=n(186).vdb.Oa,i.f.Gc=n(187).vdb.f.Gc,i.Wa=i.A.Class.extend({N:function(t){this.ja=this.Id=t},$E:function(t){this.ja=t},Bo:function(t,e){t.removeAttribute(e)},Nc:function(t,e,n){if(void 0===n)return t.getAttribute(e);null===n?this.Bo(t,e):t.setAttribute(e,n)},nh:function(t,e,n){var i="TABLE"===t.nodeName,r=this.ja.createElement("div");r.innerHTML="<"+t.nodeName+">"+e+"</"+t.nodeName+">",n(i?t.lastChild:t,i?r.lastChild.lastChild:r.lastChild)},co:function(t){var e=this.ja.createElement("div");return e.innerHTML=t,e.lastChild},jh:function(t){for(var e,n="",r=0;null!=(e=t[r++]);)e.nodeType===i.Oa.TEXT_NODE||e.nodeType===i.Oa.CDATA_SECTION_NODE?n+=e.nodeValue:e.nodeType!==i.Oa.COMMENT_NODE&&(n+=this.jh(e.childNodes));return n},replace:function(t,e){this.nh(t,e,function(e,n){return t.replaceChild(n,e),e})},append:function(t,e){this.nh(t,e,function(t,e){return t.appendChild(e.firstChild),e.firstChild})},jd:function(t,e){if(null===e||void 0===e)return t.innerHTML;try{t.innerHTML=e}catch(n){this.replace(t,e)}return null},text:function(t,e){return null===e||void 0===e?this.jh([t]):(this.empty(t),t.appendChild(this.ja.createTextNode(e)),null)},empty:function(t){if(t&&t.removeChild)for(;t.firstChild;)t.removeChild(t.firstChild)},createElement:function(t){return this.ja.createElement(t)},createDocumentFragment:function(){return this.ja.createDocumentFragment()},Nd:function(t){return(t=t||this.ja).head||t.getElementsByTagName("head")[0]},hh:function(t,e,n,i){var r=this.createElement("script");for(var o in this.Nc(r,"type","text/javascript"),i)Object.prototype.hasOwnProperty.call(i,o)&&this.Nc(r,o,i[o]);return n&&this.Nc(r,"async","true"),t&&this.Nc(r,"src",t),e&&this.Nc(r,"crossorigin","anonymous"),r},Bg:function(t,e,n,r){function o(){s.onload=function(){},s.onerror=function(){},s.onreadystatechange=function(){},a.removeChild(s)}t&&0===t.indexOf("//")&&0!==window.location.protocol.indexOf("http")&&(t="https:"+t);var s=this.hh(t,e,n,r),a=this.Nd(this.Id);return t=new i.Promise(function(t,e){s.onload=t,s.onerror=e}),s.onreadystatechange=function(){"complete"!==s.readyState&&"loaded"!==s.readyState||s.onload()},t.then(o,o),a.appendChild(s),t},Ut:function(t){var e=this.hh();return this.text(e,t),this.Nd().appendChild(e),e},bC:function(t,e,n){var i="VDBCallback"+Math.round(1e4*Math.random()),r=n||this.Id&&this.Id.defaultView||window;r[i]=function(){"function"==typeof e&&e.apply({},arguments);try{delete r[i]}catch(t){r[i]=void 0}},this.Bg(t.replace("[callback]",i))},ND:function(t){var e=this.ja.createElement("link");this.Nd().appendChild(e),e.rel="stylesheet",e.type="text/css",e.href=t},tg:function(t,e){e=e||this.Nd();var n=i.f.Gc.hash(t)+"-style";if(!this.ja.getElementById(n)){var r=this.ja.createElement("style");r.setAttribute("id",n),r.type="text/css",r.appendChild(this.ja.createTextNode(t)),e.appendChild(r)}return n},LA:function(t,e){this.tg(t,e)},uA:function(t){var e=this.ja.createElement("img");return e.src=t,e},tA:function(t){var e=this.ja.createElement("div");return null!==t&&void 0!==t&&(e.className=t),e},log:function(t){this.Fb||(this.Fb=this.ja.createElement("div"),this.Fb.style.position="fixed",this.Fb.style.top="0px",this.Fb.style.left="0px",this.Id.getElementsByTagName("body")[0].appendChild(this.Fb)),this.Fb.innerHTML=t+"<br>"+this.Fb.innerHTML}}),e.vdb={Wa:i.Wa},e.default=i.Wa,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{B:{}});(function(t){function e(t,e){t||(t=window.event),t.stop=function(){var e=t;e.preventDefault(e),e.stopPropagation(e)},void 0===t.target&&(t.target=t.srcElement||e),t.preventDefault||(t.preventDefault=function(){t.returnValue=!1}),t.stopPropagation||(t.stopPropagation=function(){t.cancelBubble=!0}),t.target&&3===t.target.nodeType&&(t.target=t.target.parentNode);var n=e.ownerDocument;return n&&null==t.pageX&&null!=t.clientX&&(e=n.documentElement,n=n.body,t.pageX=t.clientX+(e&&e.scrollLeft||n&&n.scrollLeft||0)-(e&&e.clientLeft||n&&n.clientLeft||0),t.pageY=t.clientY+(e&&e.scrollTop||n&&n.scrollTop||0)-(e&&e.clientTop||n&&n.clientTop||0)),t}function n(t,n){return function(i){return e(i,t),n(i)}}function i(){if(!l){document.body||setTimeout(i,13),l=!0;for(var e=0;e<t.yo.length;e++)t.yo[e]();t.yo=null}}function r(){if(!l){try{document.documentElement.doScroll("left")}catch(t){return void setTimeout(r,1)}i()}}function o(t){return t.match(/:/)?t:"on"+t}var s,a=[],u=!1,l=!1;t.yo=[],"undefined"!=typeof document&&(document.addEventListener?s=function(){document.removeEventListener("DOMContentLoaded",s,!1),i()}:document.attachEvent&&(s=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",s),i())})),function(){if(!u)if(u=!0,"complete"===document.readyState)i();else if(document.addEventListener)document.addEventListener("DOMContentLoaded",s,!1),window.addEventListener("load",i,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",s),window.attachEvent("onload",i);var t=!1;try{t=null==window.frameElement}catch(t){}document.documentElement.doScroll&&t&&r()}}(),t.addEventListener=function(t,e,i){if(3!==t.nodeType&&8!==t.nodeType){var r=n(t,i);a.push({element:t,type:e,yf:i,BE:r}),e.match(/:/)&&t.attachEvent?t.attachEvent("ondataavailable",r):t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent&&t.attachEvent(o(e),r)}},t.dispatchEvent=function(t,n,i){var r=t.ownerDocument||t.document;return r.createEvent?((r=r.createEvent("HTMLEvents")).data=i,e(r,t),r.ht=n,r.initEvent(n,!0,!0),!t.dispatchEvent(r)):(e(r=r.createEventObject(),t),r.data=i,n.match(/:/)?(r.ht=n,r.UA="ondataavailable",t.fireEvent(r.UA,r)):t.fireEvent(o(n),r))},t.removeEventListener=function(t,e,n){if(3!==t.nodeType&&8!==t.nodeType){for(var i,r=0,s=0;s<a.length;s++)a[s].element!==t||a[s].type!==e||a[s].yf!==n?a[r++]=a[s]:i=a[s].BE;a.length=r,n=i,document.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent(o(e),n)}},t.uI=function(e){var n={};return n.element=e,n.NH=function(t,e){t=t.split(" ");for(var n=0;n<t.length;n++)this.addEventListener(t[n],e)},n.MH=function(t,e){t=t.split(" ");for(var n=0;n<t.length;n++)this.removeEventListener(t[n],e)},n.addEventListener=function(n,i){t.addEventListener(e,n,i)},n.removeEventListener=function(n,i){t.removeEventListener(e,n,i)},n}})((i=t(n(28).vdb,i||{})).B),e.vdb={B:i.B},e.default=i.B,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{gc:{}},A:{}});i.A=n(4).vdb.A,i.f.gc=i.A.Class.extend({N:function(){this.ra=!1},ni:function(t,e,n,i){this.gf=0,this.rm=e,this.$e=i?function(){t(),this.ra=!1,this.resume()}.bind(this):t,this.ra=!1,(n||void 0===n)&&this.start()},start:function(){this.resume()},stop:function(){this.pause()},pause:function(){this.ra&&(this.ra=!1,this.gf+=(new Date).getTime()-this.sh,clearTimeout(this.uh))},resume:function(){!this.ra&&this.$e&&(this.ra=!0,this.sh=(new Date).getTime(),this.uh=setTimeout(this.$e,this.Lk()))},De:function(){return this.ra||!1},Lk:function(){return Math.max(this.rm-this.Qm(),0)},Qm:function(){return this.gf+(this.ra?(new Date).getTime()-this.sh:0)},ck:function(){this.ra=!1,clearTimeout(this.uh),this.$e=null}}),e.vdb={f:{gc:i.f.gc}},e.default=i.f.gc,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(194),o=i(n(72)),s=i(n(5)),a=i(n(22)),u=i(n=n(29)),l=void 0;n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.prototype.parse=function(t,e){if(this.hc=e||{},this.sz=t.transactionId,this.Hy=t.adxResult,this.uz=t.usid,this.lz=t.rcid,this.cz=t.overlayURL,this.rz=t.thumbnail,this.Vy=t.fullsizeThumbnail,this.Az=t.videoTitle,this.zz=t.videoId,this.yz=t.videoDuration,this.Dy=t.acid,this.Jy=t.asid,this.Ly=t.auid,this.hm=t.usesShim||!1,this.kz=t.rid,this.re=Number(t.cpm),isNaN(this.re)&&(this.re=Number(s.default.Ds(t.cpm||""))||0),(this.kh=t.impTracker)&&(this.kh=this.kh.replace(/\[ECPM\]/g,this.re||"")),this.ib=t.urls||[],t.url&&-1===this.ib.indexOf(t.url)&&this.ib.unshift(t.url),this.qs=this.ib.length,this.Lo(),this.rs=t.vastXml,this.tm=t.vastAds,t.prebidConfig)try{this.gz=JSON.parse(t.prebidConfig)}catch(t){}if(this.F=t.config,this.Nr=t.adEngineType||o.default.Ul,!this.Dj&&!this.rs&&!this.tm&&this.Nr!==o.default.Jl)throw Error("URL, VAST XML or Ads should be specified for each ad config entry");return this.wz=t.vendor&&t.vendor.match(/[0-9a-zA-Z]{24}/g)?t.vendor:"",this.xz=t.vendorName,this.lm=t.name,this.oz=1e3*t.startTimeout||2147483647,this.vh=t.type||t.adTypes&&t.adTypes[0]||a.default.be,this.os=t.types||[],this.Xy=t.houseAd||!1,this.pz=t.strictSiteCheck||!1,this.fz=void 0===t.pbl||t.pbl,this.hz=t.profitCenter,e=t.saleforce||{},this.My=e.bookingId,this.Yy=e.lineItemId,this.qz=(t.trackers||{}).Impression||[],this.eg=t.extraProperties||{},this},t.prototype.Oz=function(t){this.ib.push(t)},t.prototype.getUrl=function(){return l?l.resolve(this.Dj):this.Dj},t.prototype.oD=function(){return 1<this.qs&&this.qs===this.ib.length+1},t.prototype.Lo=function(){return 0<this.ib.length&&(this.Dj=this.ib.shift(),!0)},t.prototype.dn=function(){var t=this,e=0;return this.ib.forEach(function(n){return e+=t.tn(n)}),e+=this.tn(this.Dj)},t.prototype.tn=function(t){return-1===u.default.Dc(t||"").indexOf("konduit.me")?this.hc.Td:1e4},t.prototype.getVendor=function(){return this.wz||""},t.prototype.NC=function(){return this.xz||""},t.prototype.xB=function(){return this.My||""},t.prototype.fC=function(){return this.Yy||""},t.prototype.AC=function(){return this.hz||""},t.prototype.getAdEngineType=function(){return this.Nr||""},t.prototype.getType=function(){return this.vh||""},t.prototype.getAcid=function(){return this.Dy||""},t.prototype.getOverlayURL=function(){return this.cz||""},t.prototype.getThumbnail=function(){return this.rz||""},t.prototype.getFullsizeThumbnail=function(){return this.Vy||""},t.prototype.getVideoTitle=function(){return this.Az||""},t.prototype.getVideoId=function(){return this.zz||""},t.prototype.getVideoDuration=function(){return this.yz},t.prototype.getAsid=function(){return this.Jy||""},t.prototype.wB=function(){return this.Ly||""},t.prototype.un=function(){return this.rs||""},t.prototype.getName=function(){return this.lm||""},t.prototype.ED=function(){return this.pz||!1},t.prototype.xD=function(){return this.Xy||!1},t.prototype.ZB=function(){return l?l.resolve(this.kh):this.kh},t.prototype.getRuleId=function(){return this.kz},t.prototype.getTransactionId=function(){return this.sz},t.prototype.getUsid=function(){return this.uz},t.prototype.zD=function(){return(0,r.Dk)(this.vh)},t.prototype.CD=function(){return this.fz},t.prototype.Rs=function(t){return this.vh===t||this.vh===a.default.be&&(0,r.Dk)(t,!0)||-1!==this.os.indexOf(t)||-1!==this.os.indexOf(a.default.be)},t.prototype.prepare=function(t,e){if(!(0,r.GD)(e))throw Error("Bad type value: "+e);var n=this.clone();return n.vh=e,l=t,n},t.prototype.clone=function(){var e=new t;return s.default.Za(this,e),e},t}(),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.iu=this.Zs=this.left=this.top=this.height=this.width=0,this.position=""},e.default=t,t.Pq="TOP",t.Oq="RIGHT",t.Lq="BOTTOM",t.Nq="LEFT",t.Mq="FULL",t.Il="CUSTOM-CENTER"},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(30));var r=n(197),o=i(r),s=i(r=n(2)),a=i(n=n(5)),u=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[u]=n[s.default.mb],i.ib=n[s.default.Ha],i.mm=n[s.default.vd],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(t,e){return e=e&&a.default.Tc(e)||"",o.default.Rh(t+"&"+e,null,{timeout:5e3,withCredentials:!0}).then(function(t){return t.data})},e}(t.default),e.default=n,n.W=[s.default.mb,s.default.vd,s.default.Ha]},function(t,e,n){var i=(t=n(1))(i||{},{Promise:{},A:{},f:{G:{}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(i=t(n(28).vdb,i||{})).A=n(4).vdb.A,i.f.G=n(24).vdb.f.G,function(t){function e(){}function n(t){if("object"!==r(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this.Ib=0,this.lc=void 0,this.ic=[],l(t,this)}function o(t,e){for(;3===t.Ib;)t=t.lc;0===t.Ib?t.ic.push(e):c(function(){var n=1===t.Ib?e.ho:e.hi;if(null===n)(1===t.Ib?s:a)(e.Df,t.lc);else{try{var i=n(t.lc)}catch(t){return void a(e.Df,t)}s(e.Df,i)}},1)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===(void 0===e?"undefined":r(e))||"function"==typeof e)){var i=e.then;if(e instanceof n)return t.Ib=3,t.lc=e,void u(t);if("function"==typeof i)return void l(function(t,e){return function(){t.apply(e,arguments)}}(i,e),t)}t.Ib=1,t.lc=e,u(t)}catch(e){a(t,e)}}function a(t,e){for(var n,r=0,o=t.ic.length;!n&&r<o;r++)n=t.ic[r].hi;!n&&i.f.G.eb&&"1"===i.f.G.eb("logpromisereject")&&window.console&&console.error(e),t.Ib=2,t.lc=e,u(t)}function u(t){for(var e=0,n=t.ic.length;e<n;e++)o(t,t.ic[e]);t.ic=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,s(e,t))},function(t){n||(n=!0,a(e,t))})}catch(t){n||(n=!0,a(e,t))}}var c=window.Promise?function(t){window.Promise.resolve().then(t)}:setTimeout,d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};n.prototype.catch=function(t){return this.then(null,t)},n.prototype.then=function(t,i){var r=new n(e);return o(this,new function(t,e,n){this.ho="function"==typeof t?t:null,this.hi="function"==typeof e?e:null,this.Df=n}(t,i,r)),r},n.prototype.finally=function(t){return new n(function(e){e(t)},function(e){e(t)})},n.all=function(){var t=Array.prototype.slice.call(1===arguments.length&&d(arguments[0])?arguments[0]:arguments);return new n(function(e,n){function i(s,a){try{if(a&&("object"===(void 0===a?"undefined":r(a))||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,function(t){i(s,t)},n)}t[s]=a,0==--o&&e(t)}catch(t){n(t)}}if(0===t.length)return e([]);for(var o=t.length,s=0;s<t.length;s++)i(s,t[s])})},n.resolve=function(t){return t&&"object"===(void 0===t?"undefined":r(t))&&t.constructor===n?t:new n(function(e){e(t)})},n.reject=function(t){return new n(function(e,n){n(t)})},n.race=function(t){return new n(function(e,n){for(var i=0,r=t.length;i<r;i++)t[i].then(e,n)})},n.Wo=function(t,e){return function(){var i=Array.prototype.slice.apply(arguments);return(t=t||n.resolve()).then(e.bind.apply(e,[this].concat(i)))}},n.Wo(null,function(){})(),t.Promise=n}(i),e.vdb={Promise:i.Promise},e.default=i.Promise,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Ka:{},G:{}},u:{},log:{},ha:{}});i.u=n(18).vdb.u,i.log=n(21).vdb.log,i.ha=n(85).vdb.ha,i.f.G=n(24).vdb.f.G,i.f.Ka=function(){var t=i.log.I("vdb.utils.Common"),e=document.createElement("video");return{sn:function(){return e},jD:function(t,e){for(;t&&"html"!==t.tagName.toLowerCase();){if(t===e)return!0;t=t.parentNode}return!1},nD:void 0!==document.execCommand,oC:function(t){var e={top:0,left:0},n=t&&t.ownerDocument;if(n){n=n.documentElement,void 0!==t.getBoundingClientRect&&(e=t.getBoundingClientRect());var i={top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}return i},show:function(t){t=i.u.Bb(t);for(var e=0;e<t.length;++e)"none"===t[e].style.display&&(i.u.Be&&t[e].style.removeProperty("display"),t[e].style.display=null),"hidden"===t[e].style.visibility&&(i.u.Be&&t[e].style.removeProperty("visibility"),t[e].style.visibility=null),"none"===getComputedStyle(t[e]).display&&(t[e].style.display="block"),"hidden"===getComputedStyle(t[e]).visibility&&(t[e].style.visibility="visible")},ye:function(t,e){t=i.u.Bb(t);for(var n=0;n<t.length;++n)e?t[n].style.visibility="hidden":t[n].style.display="none"},toggle:function(t,e){e?i.f.Ka.show(t):i.f.Ka.ye(t)},uD:function(t){return!("none"!==t.style.display&&"hidden"!==t.style.visibility)},Um:function(t,e,n){var i=Math.round(t),r=~~(i/3600),o=i-3600*r;return n=~~(o-60*(i=~~(o/60)))-(500<(t=n?+(t%1).toFixed(3).substring(2):0)?1:0),(0<r||e?(10>r?"0":"")+r+":":"")+(10>i?"0":"")+i+":"+(10>n?"0":"")+n+(t?"."+t:"")},mo:function(e){i.u.Tn(e)?window.open(e,"_blank"):t.error("Failed to open new tab due to invalid url",e)},KD:"webkitEnterFullScreen"in document.createElement("video"),SB:function(t){return t[Object.keys(t)[0]]},mC:function(t){return Object.keys(t).length},zh:function(t,e,n){return t+(-1<t.indexOf("?")?"&":"?")+e+"="+n},HC:function(t,e,n,r){if(e){var o=i.f.G.Jk(e).origin;-1<o.indexOf("vidible.tv")&&(t=e.replace(o,"${imageservice.url}"),t=this.zh(t,"w",Math.min(n,4096)),t=this.zh(t,"h",Math.min(r,2160)))}return t?-1===t.indexOf("thumbnails.5min.com")?t:(e="_"+n+"_"+r,o="."+(r=(n=t.split("/")).pop().split(".")).pop(),2>(r=r.pop().split("_")).length?t:n.join("/")+"/"+r.slice(0,2).join("_")+e+o):e},XC:function(t){t=t.toString(16);for(var e=[];6>t.length+e.length;)e.push("0");return"#"+e.join("")+t},eF:function(t){for(var e=t.length-1;0<e;e--){var n=~~(Math.random()*(e+1)),i=t[e];t[e]=t[n],t[n]=i}return t},nE:function(t,e,n){var i=[];if(n)for(var r=0;r<n.length;++r){var o=n[r];i.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]))}else for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&i.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return(e?"":"?")+i.join("&")},GC:function(t,e){if(!e||0===e.length)return t;var n,i=e.length,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&0===n.indexOf(e)&&(r[n.substring(i)]=t[n]);return r},lF:function(t,e,n){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var t=document.createElement("CANVAS"),i=t.getContext("2d");t.height=this.height,t.width=this.width,i.drawImage(this,0,0),t=t.toDataURL(n),e(t)},i.src=t},ao:function(t,e){var n=document.createEvent("Events");return n.initEvent(t,!0,!0),i.u.Za(e,n),n},GE:function(t,e){t.dispatchEvent(this.ao("keydown",{keyCode:e,which:e}))},$C:function(t,e){function n(){}n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},gD:function(t){if("BODY"===t.nodeName)return!1;for(var e=t,n=!1;(e=e.parentNode)&&"BODY"!==e.nodeName;)if("hidden"===window.getComputedStyle(e).overflow){n=!0;break}return!!n&&(t=t.getBoundingClientRect(),e=e.getBoundingClientRect(),t.left<e.right&&t.top<e.bottom)},ID:function(t){return"touch"===t.pointerType},isSupported:function(t){return!!this.Ym(t)},wD:function(){return this.isSupported("application/vnd.apple.mpegurl")},Ym:function(t){var e=this.sn();try{return e&&"function"==typeof e.canPlayType&&(!t||e.canPlayType(t))}catch(t){return!1}},Ys:function(t,e,n){var i;return function(){var r=this,o=arguments,s=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||t.apply(r,o)},e),s&&t.apply(r,o)}}}}(),e.vdb={f:{Ka:i.f.Ka}},e.default=i.f.Ka,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{Db:{}}});for(var r in i.g.Db={Yo:["[ADAP_VIEWABLE_OPPORTUNITY]"],Zo:["{adNumber}","{adSeq}"],op:["[APID]"],Ng:["[APP_ID]"],qp:["[ASSETURI]"],sp:["|ap|","[AUTOPLAY]","[AUTO_INITIATION]"],Og:["[BCID]","[bcid]"],Pg:["|beoncw|","[BEON_CW]"],up:["|beonvid|","[BEON_VIDEO_ID]"],vp:["[BID]"],kl:["[cachebuster]","[CACHEBUSTER]","[CACHE_BUSTER]","[CACHE_BREAKER]","[CACHEBUSTING]"],Dp:["[container_height]","[CONTAINER_HEIGHT]"],Ep:["[container_width]","[CONTAINER_WIDTH]"],Fp:["[CONTENTPLAYHEAD]"],DEPTH:["[DEPTH]"],Kp:["[DE_RSS_ID]"],Lp:["|DE_URL|","[DE_URL]"],Op:["[DOMAIN_ROOT]"],Pp:["[DOMAIN_NAME]"],Qp:["[ECPM]"],Wp:["[FLASH_SUPPORT]"],Yp:["[P_VW_ACTIVE]","<a.active>"],vq:["[LOCATION_LAT]"],wq:["[LOCATION_LON]"],Tb:["[MOAT_PREBID]"],yq:["|muted|","[MUTED]"],Eq:["[MCC]","[MNC]","[APPNAME]"],Zg:["[PID]"],Jq:["[PLAYER_TYPE]"],gx:["[PLAYER_COMPANY_ID]"],Hl:["[P_VW_SIZE]","<a.psize>","{psize}"],Vq:["[RSS_ID]"],dr:["[timestamp]","[TIMESTAMP]"],fr:["[USER_AGENT]"],lr:["[VIDEO_COMPANY_ID]"],mr:["[VIDEO_DESCRIPTION]","VIDEO_DESCRIPTION"],nr:["[VIDEO_DETAIL_PAGE]","VIDEO_DETAIL_PAGE"],pr:["[VIDEO_DURATION]","VIDEO_DURATION"],tr:["[VIDEO_FILE_URL]"],ur:["[video_height]","[VIDEO_HEIGHT]"],vr:["[VIDEO_ID]","VIDEO_ID"],wr:["[VIDEO_KEYWORDS]","VIDEO_KEYWORDS"],yr:["|%|","[VIDEO_PERCENT]"],Cr:["[VIDEO_TITLE]","VIDEO_TITLE"],Dr:["[VIDEO_TITLE_ENC]"],Er:"VIDEO_URL |URL| [CONTENT_URL] EMBEDDING_PAGE_URL [URL] [A_D_PAGEURL]".split(" "),Gr:["[video_width]","[VIDEO_WIDTH]"],Hr:["[P_VW_VIEWABLE]","<a.viewable>"],Ir:["[P_VW_VIEWABLE_OPPORTUNITY]","<a.viewableOpportunity>"],Kr:["[VVUID]"],$g:["[SID]"],lj:["[SOUND]"],gp:["[AD_DURATION]","{ad_duration}"],ip:["[ERRORCODE]","%5BERRORCODE%5D"],Xo:["{errNo}"],Tp:["[EUCONSENT]","EUCONSENT","[GDPR_CONSENT]"],$p:["[GDPR]","GDPR"],Kq:["[PLAYLIST_SEQUENCE]"],pq:["[OATH_FIRSTPARTY]","OATH_FIRSTPARTY"],oq:["[IP_ADDR]"],Ip:["{creativeLoadTime}"],Hq:["{PlayerInitTime}"],mp:["{adSpotTime}"],Iq:["{playerRev}"]},n={},t=i.g.Db)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r][0]);t.placeholder=n,e.vdb={g:{Db:i.g.Db}},e.default=i.g.Db,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Cp="AD_LOAD_COMPLETE",e.kq="AD_LOAD_INTERRUPTED",e.Ne="AD_ISSUE"},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(72));t=i(t=n(3));var o=n(143);o=i(o);var s=n(307),a=i(s),u=i(s=n(308)),l=i(s=n(309)),c=i(s=n(331)),d=i(s=n(89)),h=i(n=n(332)),p=t.default.I("VastEngineProducer"),f=Symbol(),_=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,n);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[f]=new c.default(n),i[_]=new h.default(n),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.gk=function(t){p.debug("createAdEngine",t);var e=this.rk(),n=e.Ld(),i=e.wt(),r=n.ek,o=t.un();return o=new(this.Ht(t))({ad:o||(t.tm||t),H:e,TA:this[f],OD:n.Td,GF:this[_]}),new l.default(e,n,t,o,this[f],i,r)},e.prototype.Ht=function(t){return t.un()?u.default:t.tm?a.default:d.default},e.prototype.getType=function(){return r.default.Ul},e}(o.default),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=Symbol();t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[n]=e}return t.prototype.gk=function(){},t.prototype.getType=function(){return null},t.prototype.rk=function(){return this[n]},t}(),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){this.cf||this.Ik(new c.default("ad engine did not finish loading")),this.dispatchEvent(new s.default(s.default.Yc,this.O.getType(),{lk:this.bm,error:this.cC(),loaded:this.cf}))}Object.defineProperty(e,"__esModule",{value:!0});var o=i(t=n(102)),s=i(t=n(12)),a=n(141),u=i(t=n(76)),l=i(t=n(2)),c=i(t=n(90));t=i(t=n(30));var d=n(3);d=i(d);var h=n(103),p=i(h),f=i(h=n(134)),_=i(h=n(61)),m=i(h=n(29)),y=i(h=n(5)),v=i(h=n(75)),g=i(n=n(145)),E=d.default.I("AdEngineBase"),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol(),L=Symbol(),O=Symbol(),w=Symbol(),M=Symbol(),D=!1;n=function(t){function e(n,i,r,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var s=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s=!s||"object"!=typeof s&&"function"!=typeof s?this:s,E.debug("init","adsConfig",i),s.H=n,s.hc=i,s.O=r,s.Vb=o,s.cf=!1,s[O]=!1,s[b]=!1,s[S]=[],n=s.H.ka(),s[T]=n.K(l.default.Tf),s[w]=n.K(l.default.Mf),s.P=n.K(l.default.ac),s.F=n.K(l.default.X),s.Vb&&(s.Vb.addEventListener(a.Cp,s.gi.bind(s)),s.Vb.addEventListener(a.kq,s.Ik.bind(s))),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ta=function(){return this.O},e.prototype.fB=function(){return this.J||null},e.prototype.cC=function(){return this.jc||null},e.prototype.Gf=function(t){t&&!t.rc&&this.jc&&this.jc.rc&&(t.rc=this.jc.rc),(this.jc=t)&&t.message&&(this.bm=this.bm?this.bm+", "+t.message:t.message)},e.prototype.Hg=function(){E.debug("showOverlay"),this[C]=(new Date).getTime(),this.va(u.default.LOADED)},e.prototype.Ig=function(t){var e=this;this[L]=t||this[L]||0,E.debug("startAdTimers","maxTime",t),t=Math.min(this.O.oz,this.hc.hF),t=Math.floor(t),this[I]&&clearTimeout(this[I]),0<t&&this.F.Ge()&&(this[I]=setTimeout(this.mk.bind(this,!0),t)),this[C]=(new Date).getTime(),0<this[L]&&(this.Hb=new f.default,this.Hb.ni(function(){e.Gj=!0,e.stop()},1e3*this[L],!1))},e.prototype.load=function(){E.debug("load");t:{if(this.O.ED()){var t=m.default.Dc(this.F.Mb(p.default.URL)),e=m.default.Dc(v.default.Ab(window));if(t&&e&&t!==e&&"undefined"!==t){D||(this.va(u.default.zx),this.Gf(new o.default("Site check is not passed, required "+t+", but found "+e)),D=!0),t=!1;break t}}t=!0}this[b]=t,this[A]=(new Date).getTime(),this[b]?(this.track(_.default.bl,{Fh:this.J.offsetHeight,ik:this.J.offsetWidth}),this.jc=null,this.Vb&&this.Vb.load&&this.Vb.load()):(this.cf=!1,this.dispatchEvent(new s.default(s.default.Zc,this.O.getType(),{ad:this.O})))},e.prototype.gi=function(t,e){E.debug("onLoaded",t),this.ready(!0,t,e)},e.prototype.Ik=function(t){E.debug("onInterrupted",t),this.Gf(t)},e.prototype.uE=function(){this.Kb(s.default.Bv)},e.prototype.stop=function(){E.debug("stop"),this.Jd||(this.hf=!1,this.Jd=!0,this.Hb&&this.Hb.stop(),r.call(this))},e.prototype.skip=function(){E.debug("skip"),this.stop()},e.prototype.complete=function(){E.debug("complete"),this[I]&&clearTimeout(this[I]),this.hf=!1,this.Jd||!this[b]||this.cf||this.Wu(!1,this.jc&&this.jc.timeout),this.Jd||(this.Jd=!0,r.call(this))},e.prototype.ready=function(t,e,n){E.debug("ready"),this.cf=!0,this.Wu(t),this.pm({ad:this.O,adModel:e,latency:this[R],params:n})},e.prototype.pm=function(t){this.dispatchEvent(new s.default(s.default.Zc,this.O.getType(),t))},e.prototype.Uj=function(){E.debug("adLoaded"),this.Kb(s.default.ae,void 0),this.uF()},e.prototype.uF=function(){this.va(u.default.LOADED),this.O.hm||this.va(u.default.Lr)},e.prototype.Ak=function(){var t=this.O.ZB();t&&(t=this.H.Rd().resolve(t),this[T].qe(t))},e.prototype.Am=function(t){E.debug("adStarting"),this.Kb(s.default.Rf,t)},e.prototype.Wj=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];E.debug("adStarted",t),this[I]&&clearTimeout(this[I]),this[O]=!1,this.Ye=e,this.O.hm&&this.va(u.default.Lr),this.Hb&&this.Hb.start(),this.H.lt&&(this.H.lt=!1,this.va(u.default.Sv));var n=t.data||{};e&&e instanceof g.default&&(n.apiType=e.Iy,n.adId=e.ad.id,n.adIconsContainer=e.yg,n.mimeType=(e.Ta()||{}).mimeType),n.parameters||(n.parameters={}),n.parameters.minibar=!!this.O.eg.minibar,n.latency=(new Date).getTime()-this[C],this.hf=!0,this.Kb(s.default.Fa,n),this.va(u.default.STARTED,t.data),this[M]&&(this.pause(),this[M]=!1)},e.prototype.ym=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};E.debug("adPaused"),this[O]=!0,this.Hb&&this.Hb.pause(),this.Kb(s.default.Jc,t.data)},e.prototype.Xj=function(){this.Kb(s.default.Pe,(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).data)},e.prototype.xs=function(t){var e=(t=t.data).data||t,n=e.currentTime;0<(e=Math.min(e.duration,this[L]))?(t.timeRemaining=e-n,t.progressPercent=n/e*100):(t.progressPercent=0,t.timeRemaining=0),this.Kb(s.default.Zb,t)},e.prototype.Hz=function(){this.Kb(s.default.Mg)},e.prototype.pause=function(){this.hf||(this[M]=!0)},e.prototype.vs=function(){E.debug("adResumed"),this[O]=!1,this.Hb&&this.Hb.resume(),this.Kb(s.default.Pf)},e.prototype.resume=function(){this[M]=!1},e.prototype.Sc=function(){return this[O]},e.prototype.wm=function(t){this.Kb(s.default.fp,{clickThroughUrl:t,playerHandle:this.Ye.vC()}),this.track(_.default.kb,{Jb:t,Ns:"ad"})},e.prototype.mg=function(t,e){E.debug("adFinished",{currentTime:t,data:e}),this[I]&&clearTimeout(this[I]),this.Gj||this.im?this.va(u.default.tq,e):this.hf&&(this.ks?this.va(u.default.SKIPPED,e):this.va(u.default.FINISHED,e)),this.Kb(s.default.Yb,{currentTime:t})},e.prototype.mk=function(){E.debug("failOver"),this.H.lt=!0,this.va(u.default.Ug)},e.prototype.track=function(t,e){E.debug("track","eventType",t,"params",e),e=y.default.Za(e),e=y.default.extend(e,{acid:this.O.getAcid(),asid:this.O.getAsid(),auid:this.O.wB(),bookingId:this.O.xB(),costPerImpression:this.O.re,fullsizeThumbnail:this.O.getFullsizeThumbnail(),isHouseAd:this.O.xD(),isPayable:this.O.CD(),lineItemId:this.O.fC(),name:this.O.getName(),overlayURL:this.O.getOverlayURL(),profitCenter:this.O.AC(),ruleCompanyId:this.O.lz,ruleId:this.O.getRuleId(),thirdPartyImpressionTrackers:this.O.qz,thumbnail:this.O.getThumbnail(),transactionId:this.O.getTransactionId(),type:this.O.getType(),url:e.url||this.O.getUrl(),usid:this.O.getUsid(),vastXml:this.O.un(),vendor:this.O.getVendor(),videoDuration:this.O.getVideoDuration(),videoTitle:this.O.getVideoTitle()}),this.H.dispatchEvent(new _.default(t,e))},e.prototype.Qo=function(t){this[w].action("AdInteraction",null,null,null,null,{c1:"string"==typeof t.data?t.data:""}),this.Hb&&this.Hb.stop()},e.prototype.va=function(t,e){function n(t){return r?t+r:t}E.debug("trackFlow","adStage",t,"params",e);var i=null,r=this.H.rB();e&&(r=e.oc||r,i=e.lH||null);var o=this.Ye&&this.Ye.ad?this.Ye.ad:this.ad;if(o&&(i=i||o.id||null),o=n(t),t===u.default.tq){var a=n(u.default.LOADED);!this.Ee(n(u.default.STARTED))&&this.Ee(a)&&(t=u.default.Ug)}if(!this.Ee(o)){switch(a={Cm:this.O.Hy,Xz:this.F.cu(),re:this.O.re,Fh:this.J.offsetHeight,ik:this.J.offsetWidth,muted:this.H.isMuted(),DF:this.O.getUsid()},r&&(a.sequence=r),t){case u.default.LOADED:a.latency=this[R];break;case u.default.Dx:case u.default.STARTED:a.latency=(new Date).getTime()-this[C];break;case u.default.Ug:this[P]&&(a.latency=(new Date).getTime()-this[P])}y.default.Za(e,a),e=this.$j(t,a,i),this.track(_.default.$k,e),this[S][o]=!0,-1!==[u.default.$c,u.default.jj,u.default.dd,u.default.FINISHED].indexOf(t)&&this.Kb(s.default.dl,e)}},e.prototype.Le=function(t,e,n,i){E.debug("trackAdIssue","adStage",t,"details",n),this.track(_.default.Ne,this.$j(t,{se:e.description+(n?" "+n:""),RA:e.la,SA:e.code,XA:i}))},e.prototype.Wu=function(t,e){E.debug("trackResponse","success",t,"timeout",e),this[A]?this[R]=(new Date).getTime()-this[A]:(this[R]=0,E.error("load is not called before track response")),this[P]=(new Date).getTime(),this.track(_.default.ti,{Fh:this.J.offsetHeight,ik:this.J.offsetWidth,FD:t,latency:this[R],timeout:void 0===e?null:e,EF:this.cf?this.vz:0})},e.prototype.$j=function(t,e,n){E.debug("basicAdParams","adStage",t,"additional",e,"adId",n);var i={};return null!=n&&(i.adImpressionId=n,i.Tj=n),null!=t&&(i.adStage=t,i.Vj=t),y.default.Za(e,i),i},e.prototype.Ee=function(t){return this[S][t]||!1},e.prototype.Kb=function(t,e){e||(e={}),e.ad=this.O,this.dispatchEvent(new s.default(t,this.O.getType(),e)),this.H.dispatchEvent(new s.default(t,this.O.getType(),e))},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this.Ta();return t&&t.Mc&&t.Mc.toLowerCase()===o.default.ag}Object.defineProperty(e,"__esModule",{value:!0});var o=i(t=n(204)),s=i(t=n(2)),a=i(t=n(27)),u=i(t=n(10)),l=i(t=n(52));t=i(t=n(3));var c=n(56);c=i(c);var d=n(5),h=i(d),p=i(d=n(203)),f=i(d=n(12));d=i(d=n(146));var _=n(312),m=i(_),y=i(_=n(315)),v=i(_=n(208)),g=i(_=n(317)),E=i(_=n(105)),b=i(_=n(92)),A=i(n=n(319)),S=t.default.I("LinearView"),T=[c.default.Yg],I=Symbol();n=function(t){function e(n,i,o,a,u,c,d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i,o,null,u,d),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");if((n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).km=[],n.P=c,n.fh=a,n.Or=a.getType(),n.rb=u.ka(),n.F=n.rb.K(s.default.X),n.F.zF({qF:new l.default}),!r.call(n)&&("string"==typeof(a=(a=n.sb||{}).parameters&&a.parameters.value)&&(a=h.default.Eh(a.trim().replace(/\+/g,"%20"))).cd)){u=void 0;try{u=JSON.parse(a.cd)}catch(t){}(u=u||{}).startMuted&&(n.ub.isMuted()||n.ub.mute(!0)),u.muteButtonEnabled&&setTimeout(function(){this.ef=new A.default(this.ub.isMuted(),this.J),this.ef.addEventListener(A.default.kb,this.ub.mute.bind(this.ub))}.bind(n),100)}return-1===T.indexOf(n.F.Pd())&&(n[I]=n.rb.Wb(m.default)),n.type="LinearView",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.li=function(e){t.prototype.li.call(this,e),this.ef&&this.ef.dE(e.muted)},e.prototype.Ck=function(e){this.Ba&&(this.Ba.Z(),this.Ba=null),t.prototype.Ck.call(this,e)},e.prototype.BF=function(t){this.ia=this.km.filter(function(e){return e.url===t})[0]},e.prototype.Zu=function(t){return this.ia=(this.km=t)&&t[0],this},e.prototype.Fg=function(){var t=this,e=this.Ta(),n=void 0;return r.call(this)?(this.Iy=o.default.ag,n=new v.default(e,this.Or,this.hc,this.rb),this.Ba||(this.Ba=u.default.empty()),this.Ba.link(u.default.bind(n,f.default.Oe,function(){t.ub.dispatchEvent(new a.default(f.default.Oe,{Hf:t.getAdSkippableState()}))}))):e.mimeType===E.default.Xp?(n=this.rb.resolve(s.default.tl),n=new g.default(this.P,e.url,n,this.J)):(e=this.km.map(function(t){return t.url}),n=new y.default(this.P,e,this.J)),n},e.prototype.complete=function(e,n){this.ef&&this.ef.destroy(),this[I]&&this[I].destroy(),this.Ba&&(this.Ba.Z(),this.Ba=null),this.qo(),t.prototype.complete.call(this,e,n)},e.prototype.bi=function(e){t.prototype.bi.call(this,e);var n=new f.default(f.default.Of,this.Or,{isLinear:e});S.debug("linear state changed to",e,"dispatch event",n),this.dispatchEvent(n)},e.prototype.Rk=function(){S.debug("showCompanion"),this.ad.dispatchEvent(new b.default(this.sb))},e.prototype.Ta=function(){return this.ia||null},e.prototype.Vm=function(){return this.sb.parameters},e.prototype.ut=function(){return this.ia.ak},e.prototype.pk=function(){return this.ia.ci},e.prototype.qk=function(){return this.ia.Ff},e.prototype.getAdHeight=function(){return this.ia.height},e.prototype.getAdWidth=function(){return this.ia.width},e.prototype.ve=function(){var t=this.ub.EB();return t||(t=(t=this.sb.Jb)?t.url:null),t},e.prototype.getDuration=function(){if(this.Y)return this.Y.getDuration()},e.prototype.getCurrentTime=function(){if(this.Y)return this.Y.getCurrentTime()},e.prototype.getAdSkippableState=function(){if(this.Y&&this.Y.getAdSkippableState)return this.Y.getAdSkippableState()},e.prototype.ta=function(){return this.fh},e.prototype.rk=function(){return this.ub},e.prototype.stop=function(e){this.ef&&this.ef.destroy(),t.prototype.stop.call(this,e)},e.prototype.skip=function(){this.getAdSkippableState()?t.prototype.skip.call(this):t.prototype.stop.call(this)},e.prototype.Jg=function(){this.Pj||(0<this.Y.Qd()?this.Pj=setInterval(function(){var t=this.Y.Qd();if(0>=t)clearInterval(this.Pj);else{this.dispatchEvent(new p.default(1e3*t)),t=this.Y.getCurrentTime();var e=this.Y.getDuration()||t;this.ji({currentTime:Math.min(t,e),duration:e})}}.bind(this),1e3):(clearTimeout(this.qm),this.qm=setTimeout(this.Jg.bind(this),200)))},e.prototype.qo=function(){clearInterval(this.Pj),clearTimeout(this.qm),this.qm=this.Pj=null},e.prototype.Fo=function(){this.Jg()},e}(d.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(311)),o=i(t=n(44)),s=i(t=n(91)),a=i(t=n(17)),u=i(t=n(51)),l=i(t=n(88)),c=i(t=n(77)),d=i(t=n(76)),h=i(t=n(2)),p=i(t=n(27));t=i(t=n(30));var f=n(3);f=i(f);var _=n(29),m=i(_),y=i(_=n(5)),v=i(_=n(34)),g=i(n=n(56)),E=f.default.I("AdView"),b=Symbol();n=function(t){function e(n,i,o,s,a,u){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");E.debug("create",{ad:i,creative:o,mediaContent:s});var l=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(l=!l||"object"!=typeof l&&"function"!=typeof l?this:l).th=n,l.ad=i,l.sb=o,l.ia=s,l.gs=!0,l.ub=a,l.J=a.ka().K(h.default.ya).Od(),l.Gy=new r.default(i,o,a),l.hc=l.ub.Ld(),l.fh=l.ub.ta(),l.Fy=u,l.yg=y.default.createElement("div",{class:"ad-icons-layer",style:"position: relative"}),l.type="AdView",l}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Ck=function(t){var e=this;(this.Y=this.Fg())?(this.dm=this.ub.ka().K(h.default.mb),this.ub.addEventListener(l.default.Wf,this.Y.resize.bind(this.Y)),this.ub.addEventListener(l.default.mq,function(t){e.Y.invokeAdMethod(t.name,t.data)}),this.Y.D=this,this.dispatchEvent(new p.default(u.default.Av)),this.setVolume(t),function(){var t=this.ub.ka().K(h.default.X).Pd()===g.default.ah;this.Y.au&&this.Y.au()&&!t&&(t=this.fh&&this.fh.getUrl()&&m.default.eb("o2token",this.fh.getUrl())?"enabled":"disabled",this.dm.Me("ad",null,"Player gets o2shim to play ad. Open API: "+t)),this.Y.load()}.call(this)):this.complete(!0)},e.prototype.noResize=function(){this.gs=!1},e.prototype.ue=function(){this.resize(),this.J.appendChild(this.Y.element),this.J.appendChild(this.yg),this.Y.zf(),this.Rk()},e.prototype.resize=function(t){if(this.gs){var e=this.Y.element.style;e.position="absolute",t?(e.top="0",e.left="0",e.width="100%",e.height="100%"):(t=this.Fm(this.J.offsetWidth,this.J.offsetHeight,this.getAdWidth(),this.getAdHeight(),this.qk(),this.pk()),e.top=t.y+"px",e.left=t.x+"px",e.width=t.width+"px",e.height=t.height+"px")}},e.prototype.stop=function(t){E.debug("stop",this.Y),this.Y?t?this.Y.Jf(c.default.Yq):this.Y.stop():this.complete(!0)},e.prototype.skip=function(){E.debug("skip",this.Y),this.Y?this.Y.skip():this.complete(!0)},e.prototype.complete=function(t,e){E.debug("complete"),this.Gy.Z(),this.Y&&this.Y.element.parentNode===this.J&&this.J.removeChild(this.Y.element),this.yg.parentNode===this.J&&this.J.removeChild(this.yg);var n=new p.default(u.default.Va);e&&(n.data=e.data,n.currentTime=e.currentTime),n.force=t,this.dispatchEvent(n),this.Y&&this.Y.error?this.dispatchEvent(new p.default(u.default.qd)):t?this.dispatchEvent(new p.default(u.default.vi)):this.dispatchEvent(new p.default(u.default.Yb))},e.prototype.Rk=function(){},e.prototype.sg=function(t,e){if(E.debug("dispatchVastEvent",t,e),t===a.default.La){if(this.Sy)return;this.Sy=!0,this.Fy.Le(d.default.LOADED,e.error,e.se)}this.ad.dispatchEvent(new a.default(t,this.sb,null,e))},e.prototype.hk=function(t,e){E.debug("dispatchVastTrackerEvent",t,e),this.ad.dispatchEvent(new s.default(t,this.sb,e))},e.prototype.rg=function(t,e,n){E.debug("dispatchClickThrough",t);var i=void 0;this[b]=!n,n||(i=this.ve())&&!e||!t||(i=t),this.ad.dispatchEvent(new a.default(a.default.kb,this.sb,i))},e.prototype.setVolume=function(t){this.Y&&this.Y.setVolume(t)},e.prototype.pause=function(){this.Y&&this.Y.pause()},e.prototype.Ak=function(){this.dispatchEvent(new p.default(u.default.vc))},e.prototype.jo=function(){this.qo(),this.su(),this.dispatchEvent(new p.default(u.default.Jc,void 0))},e.prototype.li=function(t){this.dispatchEvent(new p.default(u.default.Pe,t))},e.prototype.ji=function(t){t.Qs=this.ad.Qs,this.dispatchEvent(new p.default(u.default.Zb,t)),this.hk(v.default.Ll,t)},e.prototype.pu=function(){this.dispatchEvent(new p.default(u.default.Mg))},e.prototype.su=function(){this.th&&this.th.pause()},e.prototype.resume=function(){this.Y&&this.Y.resume()},e.prototype.ko=function(){this.Fo(),this.Fu(),this.dispatchEvent(new p.default(u.default.Pf))},e.prototype.Fu=function(){this.th&&this.th.resume()},e.prototype.hB=function(){return this.Y?this.Y.error:null},e.prototype.Fm=function(t,e,n,i,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);var s=t,a=e;return r?o&&(s/a<n/i?a=i*s/n:s=n*a/i):(s=n,a=i),{height:a,width:s,x:(t-s)/2,y:(e-a)/2}},e.prototype.getAdWidth=function(){return-1},e.prototype.getAdHeight=function(){return-1},e.prototype.qk=function(){return!0},e.prototype.pk=function(){return!0},e.prototype.bi=function(){this.ad.dispatchEvent(new a.default(o.default.LINEAR_CHANGE,this.sb))},e.prototype.Fg=function(){},e.prototype.ta=function(){},e.prototype.ve=function(){},e.prototype.qo=function(){},e.prototype.Fo=function(){},e.prototype.vC=function(){return this[b]},e}(t.default),e.default=n},function(t){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];return i?e&&"function"==typeof btoa?(t="/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */",e=i.hI.map(function(t){return"/*# sourceURL="+i.gI+t+" */"}),[n].concat(e).concat([t]).join("\n")):[n].join("\n"):n}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.yk=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(i[o]=!0)}for(r=0;r<t.length;r++)"number"==typeof(o=t[r])[0]&&i[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))},e}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={Zk:"acceptInvitation",cv:"acceptInvitationLinear",Qg:"close",Ap:"closeLinear",Rg:"collapse",Ri:"expand"}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){for(this.target.innerHTML="";this[f].firstChild;)this.target.appendChild(this[f].firstChild);delete d[this.target.id]}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(77));var o=n(3);o=i(o);var s=n(213),a=i(s),u=i(s=n(34)),l=i(n=n(75)),c=o.default.I("ExternalMediaElement"),d={},h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[p]=n,i.jd="<span>Companion HTML</span>",i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.St=function(t,e){c.debug("initPeer","parent",t);try{this[_]=this[p].document}catch(t){return}if(this.target=this.qf=e===a.default.Wv?this[_].getElementsByClassName(t)[0]:this[_].getElementById(t),!this.qf){var n=l.default.vf(this[p]);if(n&&this[p]!==n)return this[p]=n,void this.St(t,e)}for((e=d[t])&&e(),this[f]=this[_].createDocumentFragment();this.target&&this.target.firstChild;)this[f].appendChild(this.target.firstChild);null==this.qf&&c.error("Cannot find element with id",t)},e.prototype.stop=function(){c.debug("stop"),this[h]||(r.call(this),this.element.removeEventListener("click",this[m])),t.prototype.stop.call(this)},e.prototype.zf=function(){c.debug("initElement"),this.ii(),this.Fe(),d[this.target.id]=r.bind(this);var t=document.createElement("iframe");(t.frameElement||t).style.cssText="width:100%; height: 100%; border: 0;",t.marginWidth="0",t.marginHeight="0",this.element.appendChild(t),(t=t.contentWindow?t.contentWindow.document:t.contentDocument).open(),t.write(this.jd),t.close(),this[m]=function(){c.debug("onClick"),this.D.rg()}.bind(this),t.body.addEventListener("click",this[m].bind(this))},e.prototype.load=function(){c.debug("load"),t.prototype.load.call(this),this.D.ue()},e.prototype.createElement=function(){return c.debug("createDisplayObject"),this.qf},e.prototype.TE=function(t){this[h]=t},e.prototype.Fe=function(){this.track(u.default.ql)},e}(t.default),e.default=n},function(t,e,n){var i=n(1)(i||{},{f:{Ka:{},G:{}},u:{},log:{},ha:{}});i.u=n(18).vdb.u,i.log=n(21).vdb.log,i.ha=n(85).vdb.ha,i.f.G=n(24).vdb.f.G,i.f.Ka=function(){var t=i.log.I("vdb.utils.Common"),e=document.createElement("video");return{sn:function(){return e},jD:function(t,e){for(;t&&"html"!==t.tagName.toLowerCase();){if(t===e)return!0;t=t.parentNode}return!1},nD:void 0!==document.execCommand,oC:function(t){var e={top:0,left:0},n=t&&t.ownerDocument;if(n){n=n.documentElement,void 0!==t.getBoundingClientRect&&(e=t.getBoundingClientRect());var i={top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}return i},show:function(t){t=i.u.Bb(t);for(var e=0;e<t.length;++e)"none"===t[e].style.display&&(i.u.Be&&t[e].style.removeProperty("display"),t[e].style.display=null),"hidden"===t[e].style.visibility&&(i.u.Be&&t[e].style.removeProperty("visibility"),t[e].style.visibility=null),"none"===getComputedStyle(t[e]).display&&(t[e].style.display="block"),"hidden"===getComputedStyle(t[e]).visibility&&(t[e].style.visibility="visible")},ye:function(t,e){t=i.u.Bb(t);for(var n=0;n<t.length;++n)e?t[n].style.visibility="hidden":t[n].style.display="none"},toggle:function(t,e){e?i.f.Ka.show(t):i.f.Ka.ye(t)},uD:function(t){return!("none"!==t.style.display&&"hidden"!==t.style.visibility)},Um:function(t,e,n){var i=Math.round(t),r=~~(i/3600),o=i-3600*r;return n=~~(o-60*(i=~~(o/60)))-(500<(t=n?+(t%1).toFixed(3).substring(2):0)?1:0),(0<r||e?(10>r?"0":"")+r+":":"")+(10>i?"0":"")+i+":"+(10>n?"0":"")+n+(t?"."+t:"")},mo:function(e){i.u.Tn(e)?window.open(e,"_blank"):t.error("Failed to open new tab due to invalid url",e)},KD:"webkitEnterFullScreen"in document.createElement("video"),SB:function(t){return t[Object.keys(t)[0]]},mC:function(t){return Object.keys(t).length},zh:function(t,e,n){return t+(-1<t.indexOf("?")?"&":"?")+e+"="+n},HC:function(t,e,n,r){if(e){var o=i.f.G.Jk(e).origin;-1<o.indexOf("vidible.tv")&&(t=e.replace(o,"${imageservice.url}"),t=this.zh(t,"w",Math.min(n,4096)),t=this.zh(t,"h",Math.min(r,2160)))}return t?-1===t.indexOf("thumbnails.5min.com")?t:(e="_"+n+"_"+r,o="."+(r=(n=t.split("/")).pop().split(".")).pop(),2>(r=r.pop().split("_")).length?t:n.join("/")+"/"+r.slice(0,2).join("_")+e+o):e},XC:function(t){t=t.toString(16);for(var e=[];6>t.length+e.length;)e.push("0");return"#"+e.join("")+t},eF:function(t){for(var e=t.length-1;0<e;e--){var n=~~(Math.random()*(e+1)),i=t[e];t[e]=t[n],t[n]=i}return t},nE:function(t,e,n){var i=[];if(n)for(var r=0;r<n.length;++r){var o=n[r];i.push(encodeURIComponent(o)+"="+encodeURIComponent(t[o]))}else for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&i.push(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return(e?"":"?")+i.join("&")},GC:function(t,e){if(!e||0===e.length)return t;var n,i=e.length,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&0===n.indexOf(e)&&(r[n.substring(i)]=t[n]);return r},lF:function(t,e,n){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var t=document.createElement("CANVAS"),i=t.getContext("2d");t.height=this.height,t.width=this.width,i.drawImage(this,0,0),t=t.toDataURL(n),e(t)},i.src=t},ao:function(t,e){var n=document.createEvent("Events");return n.initEvent(t,!0,!0),i.u.Za(e,n),n},GE:function(t,e){t.dispatchEvent(this.ao("keydown",{keyCode:e,which:e}))},$C:function(t,e){function n(){}n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},gD:function(t){if("BODY"===t.nodeName)return!1;for(var e=t,n=!1;(e=e.parentNode)&&"BODY"!==e.nodeName;)if("hidden"===window.getComputedStyle(e).overflow){n=!0;break}return!!n&&(t=t.getBoundingClientRect(),e=e.getBoundingClientRect(),t.left<e.right&&t.top<e.bottom)},ID:function(t){return"touch"===t.pointerType},isSupported:function(t){return!!this.Ym(t)},wD:function(){return this.isSupported("application/vnd.apple.mpegurl")},Ym:function(t){var e=this.sn();try{return e&&"function"==typeof e.canPlayType&&(!t||e.canPlayType(t))}catch(t){return!1}},Ys:function(t,e,n){var i;return function(){var r=this,o=arguments,s=n&&!i;clearTimeout(i),i=setTimeout(function(){i=null,n||t.apply(r,o)},e),s&&t.apply(r,o)}}}}(),e.vdb={f:{Ka:i.f.Ka}},e.default=i.f.Ka,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.Ic=[],this.id=this.Gz="",this.oc=null}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=n(57);var i=function(t){return t&&t.__esModule?t:{default:t}}(n(344));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Tracking");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);return n.type=e.getAttribute("event"),n.offset=e.getAttribute("offset"),n},e.prototype.Ch=function(){return new i.default},e}(t.oj),e.default=new n},function(t,e,n){var i=n(1)(i||{},{aa:{Ub:{}},A:{},u:{},log:{},f:{dc:{},M:{},U:{}},g:{C:{}}});i.A=n(4).vdb.A,i.u=n(18).vdb.u,i.log=n(21).vdb.log,i.f.dc=n(410).vdb.f.dc,i.g.C=n(19).vdb.g.C,i.f.M=n(43).vdb.f.M,i.f.U=n(55).vdb.f.U,i.aa.Ub=i.A.Class.extend(function(){function t(t,e){var n=i.u.ku([this.F.zt(),this.F.Wm(),this.F.CC(),{apid:this.F.Jh().utid}]);return e=i.u.Tc(e),this.ns=this.ns||this.ib.KC(),this.ns+"/"+t+"?"+n+(e?"&"+e:"")+"&cb="+Math.random()}var e,n=i.log.I("PrimalTracker"),r=i.g.C;return{N:function(t){this.F=t[r.X],this.Oy=t[r.Re],this.ib=t[r.Ha],this.Qy=this.F.LC(),e=i.aa.Ub.oE},Ia:function(e,n){n=n||{},this.F.eu()&&(n.itg="tbv"),this.qe(t.call(this,e,n))},qe:function(t){if(n.debug("PIXEL",t),this.Qy)if("string"!=typeof t||-1===t.indexOf("//"))n.debug("not sending pixel",t);else{i.f.M.Nb()&&(t=i.f.U.Mk(t,"http://","https://")),0===t.indexOf("//")&&0!==window.location.protocol.indexOf("http")&&(t="https:"+t),t=t.replace("[APID]",this.F.Jh().utid);var r=document.createElement("img");r.src=t,e.add(function(){return!1});var o=e.next.bind(e),s=setTimeout(function(){o(),r.onload=null,r.onerror=null},1e3),a=function(){clearTimeout(s),o()};r.onload=a,r.onerror=a,this.Oy.gu(t)}else n.debug("tracking is disabled")}}}(),[i.g.C.X,i.g.C.Re,i.g.C.Ha]),i.aa.Ub.oE=new i.f.dc,e.vdb={aa:{Ub:i.aa.Ub}},e.default=i.aa.Ub,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{td:{}}});i.f.td=function(){function t(){this.em="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=window.crypto||window.msCrypto;return e=window.Uint16Array&&e&&e.getRandomValues?e.getRandomValues(new window.Uint16Array(1))[0]%16:Math.floor(16*(Math.random()||0)%16),("x"===t?e:3&e|8).toString(16)})}return t.prototype.toString=function(){return this.em},t}(),e.vdb={f:{td:i.f.td}},e.default=i.f.td,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ITEM_LOADED="external-player-item-loaded",e.MUTE_CHANGED="external-player-mute-changed",e.PAUSED="external-player-paused",e.PLAY_COMPLETE="external-player-play-complete",e.PLAY_REQUESTED="external-player-play-requested",e.PLAYBACK_ERROR="external-player-error",e.PLAYING="external-player-playing",e.SKIPPED="external-player-item-skipped",e.TIME_UPDATE="external-player-time-update",e.VOLUME_CHANGED="external-player-volume-changed",e.AD_BREAKS_AVAILABLE="ad-plugin--breaks-available",e.RESOLVE_ERROR="ad-plugin--break-resolve-error",e.RESOLVED="ad-plugin--break-resolved",e.METRICS="ad-plugin--metrics",e.bw="ad-plugin--diagnostics",e.NONLINEAR_AD_RENDERED="ad-plugin-nonlinear-ad-rendered",e.NONLINEAR_AD_CLICKED="ad-plugin-nonlinear-ad-clicked",e.NONLINEAR_AD_DISMISSED="ad-plugin-nonlinear-ad-dismissed"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Rt=function(t){return t&&t.aeg&&t.aeg[0]&&t.aeg[0][0]&&t.aeg[0][0].getAdEngineType()===i.default.Vi},e.rE=function(t){t.customInfo.slot.aeg.forEach(function(t){t.forEach(function(t){"GEMINI"===t.getAdEngineType()&&t.eg&&t.eg.ads&&t.eg.ads.forEach(function(t){return t.beacons={}})})})};var i=function(t){return t&&t.__esModule?t:{default:t}}(n(242))},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var i=n(1)(i||{},{g:{Ac:{}}});i.g.Ac={nq:"ios",UF:"android",rG:"mac"},e.vdb={g:{Ac:i.g.Ac}},e.default=i.g.Ac,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{pb:{}}});i.f.pb={eb:function(t,e){return t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),null==(t=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e))?"":decodeURIComponent(t[1].replace(/\+/g," "))}},e.vdb={f:{pb:i.f.pb}},e.default=i.f.pb,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Aa:{}}});i.f.Aa=function(t){return{Ab:function(e){var n=e||t;return e=this.Pc(n),n=n&&n.location&&n.location.ancestorOrigins,e===t.top?e.location.href:n&&1<n.length?n[n.length-1]:e.document&&e.document.referrer||e.location.href},Pc:function(e){for(e=e||t;e;)try{var n=e.parent;if(!n.document)break;if(e=n,n===n.parent)break}catch(t){break}return e},vf:function(e){e=e||t;try{return e.parent}catch(t){}return null},Nb:function(){return-1===(t.location.protocol||this.Ab()||"").indexOf("http:")}}}(window),e.vdb={f:{Aa:i.f.Aa}},e.default=i.f.Aa,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{Oa:{}});(i=t(n(28).vdb,i||{})).Oa={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},e.vdb={Oa:i.Oa},e.default=i.Oa,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Gc:{}}});i.f.Gc={hash:function(t){function e(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function n(t,n,i,r,o,s){return e((t=e(e(n,t),e(r,s)))<<o|t>>>32-o,i)}function i(t,e,i,r,o,s,a){return n(e&i|~e&r,t,e,o,s,a)}function r(t,e,i,r,o,s,a){return n(e&r|i&~r,t,e,o,s,a)}function o(t,e,i,r,o,s,a){return n(i^(e|~r),t,e,o,s,a)}return function(t){for(var e,n="",i=0;i<t.length;i++)e=t.charCodeAt(i),n+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return n}(function(t){var s,a=Array(t.length>>2);for(s=0;s<a.length;s++)a[s]=0;for(s=0;s<8*t.length;s+=8)a[s>>5]|=(255&t.charCodeAt(s/8))<<s%32;a[(t=8*t.length)>>5]|=128<<t%32,a[14+(t+64>>>9<<4)]=t,t=1732584193,s=-271733879;for(var u=-1732584194,l=271733878,c=0;c<a.length;c+=16){var d=t,h=s,p=u,f=l;s=o(s=o(s=o(s=o(s=n((u=n((l=n((t=n((s=n((u=n((l=n((t=n((s=n((u=n((l=n((t=n((s=n((u=n((l=n((t=n((s=r(s=r(s=r(s=r(s=i(s=i(s=i(s=i(s,u=i(u,l=i(l,t=i(t,s,u,l,a[c+0],7,-680876936),s,u,a[c+1],12,-389564586),t,s,a[c+2],17,606105819),l,t,a[c+3],22,-1044525330),u=i(u,l=i(l,t=i(t,s,u,l,a[c+4],7,-176418897),s,u,a[c+5],12,1200080426),t,s,a[c+6],17,-1473231341),l,t,a[c+7],22,-45705983),u=i(u,l=i(l,t=i(t,s,u,l,a[c+8],7,1770035416),s,u,a[c+9],12,-1958414417),t,s,a[c+10],17,-42063),l,t,a[c+11],22,-1990404162),u=i(u,l=i(l,t=i(t,s,u,l,a[c+12],7,1804603682),s,u,a[c+13],12,-40341101),t,s,a[c+14],17,-1502002290),l,t,a[c+15],22,1236535329),u=r(u,l=r(l,t=r(t,s,u,l,a[c+1],5,-165796510),s,u,a[c+6],9,-1069501632),t,s,a[c+11],14,643717713),l,t,a[c+0],20,-373897302),u=r(u,l=r(l,t=r(t,s,u,l,a[c+5],5,-701558691),s,u,a[c+10],9,38016083),t,s,a[c+15],14,-660478335),l,t,a[c+4],20,-405537848),u=r(u,l=r(l,t=r(t,s,u,l,a[c+9],5,568446438),s,u,a[c+14],9,-1019803690),t,s,a[c+3],14,-187363961),l,t,a[c+8],20,1163531501),u=r(u,l=r(l,t=r(t,s,u,l,a[c+13],5,-1444681467),s,u,a[c+2],9,-51403784),t,s,a[c+7],14,1735328473),l,t,a[c+12],20,-1926607734))^u^l,t,s,a[c+5],4,-378558))^s^u,l,t,a[c+8],11,-2022574463))^t^s,u,l,a[c+11],16,1839030562))^l^t,s,u,a[c+14],23,-35309556))^u^l,t,s,a[c+1],4,-1530992060))^s^u,l,t,a[c+4],11,1272893353))^t^s,u,l,a[c+7],16,-155497632))^l^t,s,u,a[c+10],23,-1094730640))^u^l,t,s,a[c+13],4,681279174))^s^u,l,t,a[c+0],11,-358537222))^t^s,u,l,a[c+3],16,-722521979))^l^t,s,u,a[c+6],23,76029189))^u^l,t,s,a[c+9],4,-640364487))^s^u,l,t,a[c+12],11,-421815835))^t^s,u,l,a[c+15],16,530742520))^l^t,s,u,a[c+2],23,-995338651),u=o(u,l=o(l,t=o(t,s,u,l,a[c+0],6,-198630844),s,u,a[c+7],10,1126891415),t,s,a[c+14],15,-1416354905),l,t,a[c+5],21,-57434055),u=o(u,l=o(l,t=o(t,s,u,l,a[c+12],6,1700485571),s,u,a[c+3],10,-1894986606),t,s,a[c+10],15,-1051523),l,t,a[c+1],21,-2054922799),u=o(u,l=o(l,t=o(t,s,u,l,a[c+8],6,1873313359),s,u,a[c+15],10,-30611744),t,s,a[c+6],15,-1560198380),l,t,a[c+13],21,1309151649),u=o(u,l=o(l,t=o(t,s,u,l,a[c+4],6,-145523070),s,u,a[c+11],10,-1120210379),t,s,a[c+2],15,718787259),l,t,a[c+9],21,-343485551),t=e(t,d),s=e(s,h),u=e(u,p),l=e(l,f)}for(a=[t,s,u,l],t="",s=0;s<32*a.length;s+=8)t+=String.fromCharCode(a[s>>5]>>>s%32&255);return t}(function(t){for(var e,n,i="",r=-1;++r<t.length;)e=t.charCodeAt(r),n=r+1<t.length?t.charCodeAt(r+1):0,55296<=e&&56319>=e&&56320<=n&&57343>=n&&(e=65536+((1023&e)<<10)+(1023&n),r++),127>=e?i+=String.fromCharCode(e):2047>=e?i+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?i+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(i+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return i}(t)))}},e.vdb={f:{Gc:i.f.Gc}},e.default=i.f.Gc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{B:{nb:{}},A:{}});i.A=n(4).vdb.A,i.B.nb=i.A.Class.extend(function(){function t(t){t.Qa=this}function e(t){t.Qa=null,t.Z()}function n(t){for(var e=0,n=this.yd.length;e<n;e++)t.call(this,this.yd[e])}return{N:function(){this.yd=Array.prototype.slice.call(arguments,0)},bo:function(t){var e=this;n.call(t,function(t){e.wb(t)})},Z:function(){n.call(this,e)},Mm:function(){n.call(this,t)},wb:function(t){-1===this.yd.indexOf(t)&&this.yd.push(t)},Kz:function(){var t,e=Array.prototype.slice.call(arguments,0);for(t=0;t<e.length;t++)this.wb(e[t])}}}()),e.vdb={B:{nb:i.B.nb}},e.default=i.B.nb,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{yc:{}});(i=t(n(28).vdb,i||{})).yc={Qi:"DEBUG",Zi:"INFO",Bj:"WARN",La:"ERROR"},e.vdb={yc:i.yc},e.default=i.yc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{lb:{}},log:{},A:{}});i.log=n(21).vdb.log,i.A=n(4).vdb.A,i.f.lb=function(){var t,e=i.A.Class.extend({N:function(){var t=0===i.log.Na.Mh();this.Rn=this.On=t,this.ro=[],this.Co=[]},gu:function(t){this.On&&this.ro.push({url:t,ts:+new Date})},Yn:function(t){this.Rn&&this.Co.push({url:t,ts:+new Date})}});return{uk:function(){return t||(t=new e),t}}}(),e.vdb={f:{lb:i.f.lb}},e.default=i.f.lb,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{tc:{},U:{},G:{}},A:{},log:{},ga:{},Promise:{},u:{},B:{}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i.A=n(4).vdb.A,i.log=n(21).vdb.log,i.ga=n(86).vdb.ga,i.Promise=n(23).vdb.Promise,i.u=n(18).vdb.u,i.B=n(133).vdb.B,i.f.U=n(55).vdb.f.U,i.f.G=n(24).vdb.f.G,i.f.tc=i.A.Class.extend(function(){function t(t){return-1!==i.f.G.Dc(t||"").indexOf("konduit.me")}function e(t){t.zk||(t.zk=new i.Promise(function(e,n){var r=i.u.createElement("iframe",{src:t.url,style:"visibility:hidden;display:none;width:1px;height:1px;font-size:0;position:fixed;top:0;left:0;"},window.document.body);r.onload=e.bind(null,r),r.onerror=n}))}function n(t){for(var n=0;n<s.length;n++){var i=s[n];if(-1!==t.indexOf(i.domain))return e(i),i}return null}var o=i.log.I("CookieShare"),s=[{domain:"advertising.com",zk:null,Rm:[],url:"//video.adaptv.advertising.com/iframe.html"}];return{N:function(){i.B.addEventListener(window,"message",function(t){if(t&&"object"===(void 0===t?"undefined":r(t))&&t.origin){var e,i=n(t.origin);if(i)"string"==typeof(t=t.data)&&0===t.indexOf("cookies: ")&&(e=t.substr(9)),e&&((i=i.Rm.shift())?i.resolve(e):o.error("Nobody is waiting for message"))}})},Bt:function(e){return t.call(this,e)&&(e=n(e))?function(t){var e=new i.ga;return t.zk.then(function(n){try{t.Rm.push(e),n.contentWindow.postMessage("getCookies","*")}catch(n){t.Rm.shift(),e.resolve("")}},function(){e.resolve("")}),e.Ea()}(e):i.Promise.resolve("")},PE:function(t,e){(e=n(e))&&e.zk.then(function(e){e.contentWindow.postMessage("setCookies:"+t,"*")})},wu:function(e,n){var r;try{t.call(this,n)&&(r=e.getResponseHeader("x-kme-set-cookie"))}catch(t){o.debug("Unable to read kme cookie")}if(r=r||"")for(e=r.split(","),r=0;r<e.length;r++){var s=i.f.U.trim(e[r]||"");s&&this.PE(s,n)}}}}()),e.vdb={f:{tc:i.f.tc}},e.default=i.f.tc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{B:{nb:{}},A:{}});i.A=n(4).vdb.A,i.B.nb=i.A.Class.extend(function(){function t(t){t.Qa=this}function e(t){t.Qa=null,t.Z()}function n(t){for(var e=0,n=this.yd.length;e<n;e++)t.call(this,this.yd[e])}return{N:function(){this.yd=Array.prototype.slice.call(arguments,0)},bo:function(t){var e=this;n.call(t,function(t){e.wb(t)})},Z:function(){n.call(this,e)},Mm:function(){n.call(this,t)},wb:function(t){-1===this.yd.indexOf(t)&&this.yd.push(t)},Kz:function(){var t,e=Array.prototype.slice.call(arguments,0);for(t=0;t<e.length;t++)this.wb(e[t])}}}()),e.vdb={B:{nb:i.B.nb}},e.default=i.B.nb,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{B:{Event:{}},A:{}});i.A=n(4).vdb.A,i.B.Event=i.A.Class.extend({type:null,data:null,target:null,N:function(t,e){this.type=t,this.data=e||{}},clone:function(){return new i.B.Event(this.type)},toString:function(){return"Event{type="+this.type+"}"}}),i.B.Event.Va="complete",e.vdb={B:{Event:i.B.Event}},e.default=i.B.Event,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.Dk=function(t,e){return-1<(e?o:o.concat([i.default.be])).indexOf(t)},e.GD=function(t){return-1<r.indexOf(t)};var i=function(t){return t&&t.__esModule?t:{default:t}}(n(22)),r=[i.default.Qe,i.default.bd,i.default.fb,i.default.gb],o=[i.default.Qe,i.default.bd,i.default.gb]},function(t,e,n){var i=n(1)(i||{},{g:{Oi:{}}});i.g.Oi={Hl:"playerSizeOverride",gG:"extrasOverride",pd:"aegOverride",OG:"videoOverride",bG:"companionsSettingsOverride"},e.vdb={g:{Oi:i.g.Oi}},e.default=i.g.Oi,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var r=n(22),o=i(r),s=i(r=n(293)),a=i(n=n(135)),u=t.default.I("AdConfigEntryParser");e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.parse=function(t,e){u.debug("parse",t);var n=t.type||t.adTypes[0];switch(n){case o.default.fb:return(new s.default).parse(t,e);case o.default.gb:case o.default.bd:case o.default.Qe:case o.default.be:case null:return(new a.default).parse(t,e);default:throw Error("Bad ad config entry type: "+n)}},t}()},function(t,e,n){var i=(t=n(1))(i||{},{mc:{},u:{},Promise:{},f:{lb:{},tc:{},U:{},G:{},Ja:{}}});(i=t(n(28).vdb,i||{})).u=n(18).vdb.u,i.Promise=n(23).vdb.Promise,i.f.lb=n(190).vdb.f.lb,i.f.tc=n(191).vdb.f.tc,i.f.U=n(55).vdb.f.U,i.f.G=n(24).vdb.f.G,i.f.Ja=n(99).vdb.f.Ja,function(t){function e(t,e){function r(){try{var t,n={Accept:"text/javascript, application/json, text/html, application/xml, text/xml, */*","Content-Type":"application/x-www-form-urlencoded"};for(t in n)Object.prototype.hasOwnProperty.call(e.headers,t)||(e.headers[t]=n[t]);for(t in e.contentType&&(e.headers["Content-Type"]=e.contentType),e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&s.setRequestHeader(t,e.headers[t]);s.send(e.Wd)}catch(t){e.error&&e.error()}}var o,s=function(){var t=i.u.xb;if(window.XDomainRequest&&t.ie&&10>t.version)return new function(){var t=this,e=new XDomainRequest;t.status=0,t.readyState=0,t.setRequestHeader=function(){},t.getResponseHeader=function(t){var e="";return"content-type"===t&&(e=this.mimeType),e},t.open=function(n,i){e.open(n,i),e.onerror=function(){t.status=499,t.responseText="",t.mimeType="",t.readyState=4,t.onreadystatechange()},e.onprogress=function(){t.readyState=2,t.onreadystatechange()},e.onload=function(){t.responseText=e.responseText,t.mimeType=e.contentType,t.readyState=4,t.onreadystatechange()},e.ontimeout=function(){t.status=408,t.responseText="",t.mimeType="",t.readyState=4,t.onreadystatechange()},e.timeout=0,t.readyState=1,t.onreadystatechange()},t.send=function(t){e.send(t)}};if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(t){}return!1}(),a={},u=!1;void 0===e&&(e={}),e.method=e.method?e.method.toLowerCase():"get",e.async=!1!==e.async,e.Wd=e.Wd||"",s.onreadystatechange=function(){if(4===s.readyState){var r=s.getResponseHeader("content-type")||"";a.status=s.status,a.text=s.responseText,/json/.test(r)?a.data=function(t){return"string"==typeof t&&t?(t=i.f.U.trim(t),JSON.parse(t)):null}(s.responseText):/xml/.test(r)&&(a.data=function(t){if(window.DOMParser)return(new DOMParser).parseFromString(t,"text/xml");var e=new window.ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e}(s.responseText)),a.Wc=200<=s.status&&300>s.status||304===s.status||0===s.status&&s.responseText,n.wu(s,t),a.Wc?e.Wc&&e.Wc(a,s):e.error&&i.f.Ja.setTimeout(function(){e.error(a,s,u)},1),e.complete&&e.complete(a,s)}};try{s.open(e.method,t,e.async),void 0!==s.withCredentials&&(s.withCredentials=!!e.withCredentials)}catch(t){}return e.headers=e.headers||{},e.timeout&&(s.timeout=e.timeout,u=!1,s.ontimeout=function(){u=!0}),o={WC:function(t,n){return e.headers[t]=n,o},send:function(t,n){return e.Wd=i.u.Tc(t),e.complete=n,r(),o},end:function(t){return e.complete=t,r(),o},data:function(t){return e.Wd=i.u.Tc(t),o}}}var n=new i.f.tc;t.get=function(t,r,o,s,a,u){return void 0===u&&(u={}),u.Wc=o,u.error=s,u.method="get",function(t){t&&i.f.lb.uk().Yn(t)}(t),n.Bt(t).then(function(n){-1!==i.f.G.Dc(t||"").indexOf("konduit.me")?(u.headers||(u.headers={}),u.method="post",u.headers["Content-Type"]="application/x-www-form-urlencoded",e(t,u).send({"x-cookie":n},a)):e(t,u).send(r,a)})},t.Rh=function(e,n,r){return new i.Promise(function(i,o){t.get(e,n||null,i,function(t,e,n){o({response:t,request:e,Oo:n})},null,r)})},t.iE=function(t,n,i,r,o,s){return void 0===s&&(s={}),s.Wc=i,s.error=r,s.method="post",e(t,s).send(n,o)}}(i.mc),e.vdb={mc:i.mc},e.default=i.mc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{zc:{}},A:{},u:{}});i.A=n(4).vdb.A,i.u=n(18).vdb.u,i.f.zc=i.A.Class.extend({N:function(t,e){Array.isArray(e)||(e=[e]),this.hs=t,this.cs=e.slice(0)},apply:function(t){if(!t)return t;var e=this.hs;e=null!=(e=i.u.In(e)?e():e)?e.toString():"";for(var n=0;n<this.cs.length;n++){var r=this.cs[n],o=null!=r.match(/^[^\w%\s]/g),s=null!=r.match(/[^\w%\s]$/g);r=r.replace(/([{}\(\)\^$&.\*\?\/\+\|\[\\\\]|\]|\-)/g,"\\$1"),t=t.replace(new RegExp((o?"":"([^\\w%\\s]|^)")+r+(s?"":"([^\\w%\\s]|$)"),"g"),(o?"":"$1")+e+(s?"":"$2"))}return t}}),e.vdb={f:{zc:i.f.zc}},e.default=i.f.zc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Bc:{}},A:{}});i.A=n(4).vdb.A,i.f.Bc=i.A.Class.extend({N:function(t,e){this.dz=t,this.iz=e},apply:function(t){return t.replace(this.dz,this.iz)}}),e.vdb={f:{Bc:i.f.Bc}},e.default=i.f.Bc,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var r=n(10),o=i(r),s=i(r=n(22));r=i(r=n(201));var a=i(n=n(12)),u=t.default.I("AdEngineAdapter"),l=Symbol(),c=Symbol(),d=Symbol(),h=Symbol();n=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var s=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(s=!s||"object"!=typeof s&&"function"!=typeof s?this:s)[l]=n,s[d]=i,s[h]=r,s[c]=o.default.group(o.default.bind(s[l],a.default.Zc,s.ready.bind(s)),o.default.bind(s[l],a.default.Yc,s.complete.bind(s)),o.default.bind(s[l],a.default.Fa,s.dispatchEvent.bind(s))),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Bs=function(){this[c].link(o.default.group(arguments))},e.prototype.load=function(){u.debug("load"),this[l].load()},e.prototype.ready=function(e){t.prototype.ready.call(this),u.debug("onEngineReady",e),e.qg=this[l].ta(),this.dispatchEvent(e)},e.prototype.ld=function(){if(!this.Zh()){t.prototype.ld.call(this);var e=this.ta().getType();u.debug("run","adType",e),e===s.default.fb?this[l].Hg():this[l].Ho(this[d].QD)}},e.prototype.stop=function(){var e=!this.Zt()&&!this.Wh()&&!this.Zh();u.debug("stop",e),e&&(this[l].stop(),t.prototype.stop.call(this))},e.prototype.complete=function(e){u.debug("onEngineComplete",e),e.qg=this.ta(),e.Iz=this,(this.De()||e.data.error)&&this[h].release(this.ta()),t.prototype.complete.call(this,e.data.error),this.dispatchEvent(e),this[c].Z()},e.prototype.skip=function(){this[l].skip()},e.prototype.pause=function(){this[l].pause()},e.prototype.resume=function(){this[l].resume()},e.prototype.setVolume=function(e){t.prototype.setVolume.call(this,e),this.De()&&this[l].setVolume(e)},e.prototype.getDuration=function(){if(this[l].getDuration)return this[l].getDuration()},e.prototype.getCurrentTime=function(){if(this[l].getCurrentTime)return this[l].getCurrentTime()},e.prototype.Lb=function(){if(this[l].Lb)return this[l].Lb()},e.prototype.getAdSkippableState=function(){if(this[l].getAdSkippableState)return this[l].getAdSkippableState()},e.prototype.Sd=function(){if(this[l].Sd)return this[l].Sd()},e.prototype.Sc=function(){if(this[l].Sc)return this[l].Sc()},e.prototype.ta=function(){return this[l].ta()},e.prototype.Ta=function(){if(this[l].Ta)return this[l].Ta()},e.prototype.getAdCompanions=function(){if(this[l].getAdCompanions)return this[l].getAdCompanions()},e}(r.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){return t&&t.__esModule?t:{default:t}}(n(30));var i=Symbol();t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[i]="Engine.LOADING",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Bs=function(){},e.prototype.load=function(){},e.prototype.ld=function(){this[i]="Engine.RUNNING",void 0!==this.kg&&this.setVolume(this.kg)},e.prototype.ready=function(){this[i]="Engine.READY"},e.prototype.stop=function(){this[i]="Engine.STOPPED"},e.prototype.complete=function(t){this[i]=t?"Engine.FAILED":"Engine.COMPLETE"},e.prototype.skip=function(){},e.prototype.pause=function(){},e.prototype.resume=function(){},e.prototype.setVolume=function(t){this.kg=t},e.prototype.getDuration=function(){return 0},e.prototype.getCurrentTime=function(){return 0},e.prototype.Lb=function(){return 0},e.prototype.getAdSkippableState=function(){return!1},e.prototype.BD=function(){return"Engine.LOADING"===this[i]},e.prototype.Ek=function(){return"Engine.READY"===this[i]},e.prototype.De=function(){return"Engine.RUNNING"===this[i]},e.prototype.Zt=function(){return"Engine.COMPLETE"===this[i]},e.prototype.Wh=function(){return"Engine.FAILED"===this[i]},e.prototype.Zh=function(){return"Engine.STOPPED"===this[i]},e.prototype.Sc=function(){return!1},e.prototype.ta=function(){return null},e.prototype.Ta=function(){return null},e.prototype.Sd=function(){return null},e.prototype.getAdCompanions=function(){return""},e}(t.default),e.default=t},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.ads=[],this.bb=[]}return t.prototype.Ct=function(){return 0<this.ads.length?this:this.parent?this.parent.Ct():null},t.prototype.qC=function(t){for(var e=[],n=this;;){if(n.po&&e.push(n.po),n.parent===t||!t)return e;if(!n.parent)return[];n=n.parent}},t}(),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,e.rj);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i).Au=n,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){return new e(this.Au)},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(27)).default),e.default=t,t.rj="AdRemainingTimeUpdateEvent"},function(t,e,n){var i=n(1)(i||{},{g:{sd:{}}});i.g.sd={ag:"vpaid"},e.vdb={g:{sd:i.g.sd}},e.default=i.g.sd,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){return t&&t.__esModule?t:{default:t}}(n(206));var i=Symbol(),r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol();t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[s]=0,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Hu=function(t,e,n){this[i]=t,this[r]=e,this[o]=n},e.prototype.eo=function(){t.prototype.eo.call(this),this[a]=!0,this[i]()},e.prototype.fi=function(){if(!this[u]){var t=+new Date;50<=this.ua()?this.Kf&&(this[s]+=(t-this.Kf)/1e3,2<=this[s]&&(this[r](),this[u]=!0)):this.Ok(),this.Kf=t}},e.prototype.mu=function(){this[a]&&!this[u]&&this[o]()},e.prototype.Eo=function(){t.prototype.Eo.call(this),this[a]=!1,this[u]=!1,this[s]=0},e}(t.default),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=(t=n(10))&&t.__esModule?t:{default:t},r=(n=n(12))&&n.__esModule?n:{default:n},o=Symbol(),s=Symbol(),a=Symbol();n=function(){function t(e,n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[s]=e,this[a]=n,this.Kf=0,this[o]=i.default.group(i.default.bind(this[s],r.default.Fa,this.eo.bind(this)),i.default.bind(this[s],r.default.Zb,this.fi.bind(this)),i.default.bind(this[s],r.default.Jc,this.Ok.bind(this)),i.default.bind(this[s],r.default.Mg,this.Ok.bind(this)),i.default.bind(this[s],r.default.od,this.mu.bind(this)))}return t.prototype.ua=function(){return this[a].ua()},t.prototype.Ok=function(){this.Kf=0},t.prototype.eo=function(){this.Eo()},t.prototype.fi=function(){},t.prototype.mu=function(){},t.prototype.Eo=function(){this.Ok()},t.prototype.Z=function(){this[o].Z()},t}(),e.default=n},function(t,e,n){var i=n(1)(i||{},{B:{xj:{}}});i.B.xj={tG:"RollOverVideo",IG:"ThirdPartyPosterAvailable",PG:"VideoBufferingEnd",QG:"VideoBufferingStart",kr:"VideoClickEvent",qr:"VideoEndEvent",rr:"VideoErrorEvent",Wx:"VideoLoadEvent",TG:"VideoMetaDataEvent",xr:"VideoPauseEvent",uj:"VideoPlayEvent",Xx:"VideoProgressEvent",zr:"VideoResumeEvent",UG:"VideoSeekEvent",VG:"VideoSeekEnd",WG:"VideoSeekStart",Ar:"VideoStartEvent",Br:"VideoTimeUpdateEvent",YG:"VideoTouchStartEvent",Wl:"VideoVolumeChangedEvent",Fr:"VideoWaiting",ZG:"VideoWebkitBeginFullscreen",$G:"VideoWebkitEndFullscreen",sr:"VideoFallbackEvent"},e.vdb={B:{xj:i.B.xj}},e.default=i.B.xj,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=this[pt][t];if(e){for(var n=arguments.length,i=Array(1<n?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.call.apply(e,[this].concat(i))}}function o(){var t=this,e=[[et.lv,T],[et.nv,b],[et.qd,p],[et.sv,g],[et.Nf,S],[et.sc,I],[et.Of,w],[et.ae,M],[et.vv,f],[et.Jc,x],[et.cl,c],[et.zv,A],[et.Dv,E],[et.Oe,v],[et.Qf,k],[et.Fa,D],[et.fl,N],[et.Fv,_],[et.Gv,y],[et.Hv,m],[et.xi,O],[et.yi,R],[et.zi,P],[et.Ai,C],[et.Bi,L],[et.hl,B]],n=this;this[dt]={addEventListener:function(t,e){n[pt][t]=e,l.call(n,"subscribe",r.bind(n,t),t,n)},removeEventListener:function(t){delete n[pt][t];try{l.call(n,"unsubscribe",r,t)}catch(t){}}},e.forEach(function(e){return s.call(t,e[0],e[1])}),this[_t]=0}function s(t,e){var n=this;this[St].link(V.default.bind(this[dt],t,function(){for(var i=arguments.length,r=Array(i),o=0;o<i;o++)r[o]=arguments[o];try{if(-1!==at.indexOf(t)){if(-1!==n[ft].indexOf(t))return void n.D.dispatchEvent(new F.default(X.default.er,t));n[ft].push(t)}e.apply(n,r)}catch(e){rt.error("Failed to handle "+t+" event:",e)}}))}function a(t){var e=document.createEvent("MouseEvent");e.initEvent(t.type,!t.cancelBubble,t.cancelable),this[vt].dispatchEvent(e)}function u(t){this.element.style.visibility=t?"visible":"hidden"}function l(t){if(this.Eb)try{for(var e=this.Eb[t],n=arguments.length,i=Array(1<n?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];if(e)return e.apply(this.Eb,i);if(this.Eb.V)return this.Eb.V(t,i)}catch(e){rt.error(t,e)}}function c(){rt.debug("onAdPlaying"),this.D.ko()}function d(t){rt.error(t);var e=h.call(this);this.error={da:e.da,code:e.code,description:e.description+" "+t,la:e.la},this.rt()}function h(t){var e=this[Pt]||ot;return this[yt]&&this[yt].mimeType===$.default.Uf?e=Q.default.my:this.Eb&&!this[Lt]?e=t?Q.default.hy:Q.default.gy:this[Lt]&&!this.Sn()?e=t?Q.default.ly:Q.default.ky:this.Sn()&&(e=Q.default.jy),e}function p(t){t=Y.default.Ce(t)?Y.default.Ce(t.data)?t.data.message||t.data.errorMessage:"Internal Vpaid Error":t,rt.warn("VPAID_UNIT:",t),-1!==st.indexOf(t)?this.stop():this.Jf(t)}function f(t){rt.debug("VPAID_UNIT:",t)}function _(){rt.debug("onAdUserAcceptInvitation");var t=l.call(this,"getAdLinear");this.track(K.default.Zk),this.D.dispatchEvent(new F.default(nt.default.sc,t?q.default.cv:q.default.Zk))}function m(){rt.debug("onAdUserMinimize"),this.track(K.default.Rg)}function y(){rt.debug("onAdUserClose");var t=l.call(this,"getAdLinear");this.track(K.default.Qg),this.D.dispatchEvent(new F.default(nt.default.sc,t?q.default.Ap:q.default.Qg))}function v(){-1===this.gd.indexOf("//imasdk.googleapis.com")&&(rt.debug("Ad Skippable State changed to",l.call(this,"getAdSkippableState")),this.dispatchEvent(z.default.Oe))}function g(){var t=l.call(this,"getAdExpanded");rt.debug("Ad Expanded changed to",t),t?(this.track(K.default.Ri),this.D.su(),this.D.dispatchEvent(new F.default(nt.default.sc,q.default.Ri))):(this.track(K.default.Rg),this.D.Fu(),this.D.dispatchEvent(new F.default(nt.default.sc,q.default.Rg)))}function E(){rt.debug("Ad size changed to: w="+l.call(this,"getAdWidth")+" h="+l.call(this,"getAdHeight"))}function b(){rt.debug("Ad Duration changed to",l.call(this,"getAdDuration"))}function A(){rt.debug("Ad Remaining Time changed to",this.Qd()),this.D.Fo()}function S(){var t=this;this.Ij||(this.zo(),rt.debug("Ad Impression"),this.Fe(),this.ii({initlatency:this[Rt],loadlatency:this[Ct]}),(this.Ln()||this[ut]===U.default.fb)&&u.call(this,!0),setTimeout(function(){return t[Mt]=!0},500))}function T(t,e,n){rt.debug("Clickthrough portion of the ad was clicked",t,e,n),(n=!!t&&(!!n||void 0===n))?e=!!t:(t=null,e=!1),this.D.rg(t,e,!n)}function I(){rt.debug("A non-clickthrough event has occured"),this.D.dispatchEvent(new F.default(nt.default.sc))}function C(){rt.debug("Video 0% completed"),this.Cb(K.default.mj)}function R(){rt.debug("Video 25% completed"),this.Cb(K.default.$c)}function P(){rt.debug("Video 50% completed"),this.Cb(K.default.Xg)}function L(){rt.debug("Video 75% completed"),this.Cb(K.default.dd)}function O(){rt.debug("Video 100% completed"),this.Cb(K.default.Va)}function w(){var t=l.call(this,"getAdLinear");t!==this[Tt]&&(this[Tt]=t,rt.debug("Ad linear changed to",t),this.D.bi(t))}function M(){this[Lt]=!0,rt.debug("ad has been loaded",this),this[Rt]=(new Date).getTime()-this[It],this.setVolume(this[bt]),Y.default.Ah(function(){this.Jd||(rt.debug("startAd"),this.D.dispatchEvent(new F.default(nt.default.pl)),l.call(this,"startAd"),this.D.resize(H.default.enabled()&&H.default.zg()))}.bind(this))}function D(){rt.debug("Ad has started"),this.setVolume(this[bt]),this.nt(),this.D.Jg(),this.D.Rk()}function N(){rt.debug("Ad has stopped"),this[gt]&&clearTimeout(this[gt]),this.dispose(),this.D.complete(!1,{currentTime:this.getCurrentTime()})}function k(){rt.debug("Ad was skipped"),this.rt()}function B(){var t=this.getVolume();if(t!==this[bt]&&this.Sn()){var e=!t;rt.debug("Ad Volume changed to",t),e?this.track(K.default.Cl):this.track(K.default.Tl),this[bt]=t,this.D.li({muted:e,volume:this[bt]})}}function x(){rt.debug("onAdPaused"),this.D.jo(),!this[Mt]&&0<this.getVolume()&&!this[wt]&&(this.setVolume(0),this.resume())}Object.defineProperty(e,"__esModule",{value:!0});var U=i(n(22)),j=i(n(2)),F=i(n(27)),V=i(n(10)),H=i(n(209)),G=i(n(3)),Y=i(n(5)),K=i(n(34)),q=i(n(148)),W=i(n(77)),z=i(n(12)),X=i(n(210)),Q=i(n(25)),J=i(n(104)),Z=i(n(211)),$=i(n(105)),tt=i(n(212)),et=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(316)),nt=i(n(51)),it=i(n(17)),rt=G.default.I("VPAIDMediaElement"),ot=Q.default.ww,st=["There was an error in the google ad. AdError 1009: The VAST response document is empty."],at=[et.Fa,et.fl,et.Qf,et.ae,et.Nf,et.Ai,et.yi,et.zi,et.Bi,et.xi],ut=Symbol(),lt=Symbol(),ct=Symbol(),dt=Symbol(),ht=Symbol(),pt=Symbol(),ft=Symbol(),_t=Symbol(),mt=Symbol(),yt=Symbol(),vt=Symbol(),gt=Symbol(),Et=Symbol(),bt=Symbol(),At=Symbol(),St=Symbol(),Tt=Symbol(),It=Symbol(),Ct=Symbol(),Rt=Symbol(),Pt=Symbol(),Lt=Symbol(),Ot=Symbol(),wt=Symbol(),Mt=Symbol(),Dt=function(t){function e(n,i,r,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");rt.debug("init");var s=t.call(this,o.K(j.default.ac));if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(s=!s||"object"!=typeof s&&"function"!=typeof s?this:s)[pt]={},s[Tt]=!0,s[yt]=n,s[ut]=i,s[lt]=r,s[mt]=o,s[ft]=[],s[St]=V.default.empty(),s[vt]=s[mt].K(j.default.ya).Od(),s[ct]=s[mt].K(j.default.X),s[ht]=s[mt].K(j.default.Ga),s[bt]=0,s.gd=s[yt].url||s[yt].value,s[Ot]=function(){H.default.zg()?(this.Cb(K.default.sw),this.Cb(K.default.hx)):(this.Cb(K.default.Up),this.Cb(K.default.fx))}.bind(s),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){t.prototype.load.call(this),this.D.noResize(),this.D.ue(),u.call(this,!(this.Ln()||this[ut]===U.default.fb))},e.prototype.createElement=function(){return Y.default.createElement("div",{style:"position: absolute; width: 100%; height: 100%; z-index: 1; text-align: left; top:0px;"})},e.prototype.zf=function(){var e=this;rt.debug("initElement"),t.prototype.zf.call(this),u.call(this,!(this.Ln()||this[ut]===U.default.fb)),this[It]=(new Date).getTime(),function(){return this[yt].mimeType===$.default.Uf?(Y.default.xb.chrome&&this[ut]===U.default.gb&&this[ct].So(!0),rt.debug("Use flash vpaid runner"),this[mt].resolve(j.default.Ti)):this[ct].Yt()||this[ct].du()?(rt.debug("Use secure vpaid runner"),this[mt].resolve(j.default.Ol)):(rt.debug("Use insecure vpaid runner"),this[mt].resolve(j.default.zl))}.call(this).then(function(t){e[At]=t,e[At].Yj(e.element,e.gd,e[ut],e.P,e[ct],e[lt].ek).then(function(t){if(this.Eb=t.Vo,this[Ct]=(new Date).getTime()-this[It],this.Eb instanceof Z.default){var e=this.Jf.bind(this,"Internal wrapper critical error");this[St].link(V.default.bind(this.Eb,J.default.Tg,e))}try{this.bD(t.data)}catch(t){d.call(this,t.message)}}.bind(e),function(t){switch(t.type){case tt.default.bq:d.call(this,"function getVPAIDAd does not exist");break;case tt.default.Dq:d.call(this,"getVPAIDAd() does not return a creative");break;case tt.default.pp:d.call(this,"API function "+t.name+" is missing");break;case tt.default.Jr:this[Pt]=Q.default.iy,d.call(this,"Vpaid url "+t.url+" is unavailable");break;default:this.Jf("Error with vpaid: "+t)}}.bind(e))})},e.prototype.bD=function(t){l.call(this,"handshakeVersion","2.0"),o.call(this);var e=t.width;t=t.height,this[Et]="normal";var n=this.D.ut(),i=this.D.Vm();i={AdParameters:i&&i.value},rt.debug("initAd",e,t,this[Et],n,i),l.call(this,"initAd",e,t,this[Et],n,i),l.call(this,"subscribe",a.bind(this),"mousemove"),l.call(this,"subscribe",a.bind(this),"mouseover"),H.default.enabled()&&H.default.zs(this[Ot])},e.prototype.Ln=function(){return"Midroll"===this[ut]},e.prototype.resize=function(){t.prototype.resize.call(this),this[Et]=H.default.enabled()&&H.default.zg()?"fullscreen":"normal";var e=this.P.Qh(),n=this.P.Lh();rt.debug("resize ad",{height:n,viewMode:this[Et],width:e}),l.call(this,"resizeAd",e,n,this[Et])},e.prototype.Jf=function(t){rt.debug("stopByError",t),this.error=h.call(this,t===W.default.Yq),this.D.dispatchEvent(new F.default(nt.default.qd),t),this.D.sg(it.default.La,{se:t,error:this.error}),this.stop()},e.prototype.getAdSkippableState=function(){return-1===this.gd.indexOf("//imasdk.googleapis.com")&&l.call(this,"getAdSkippableState")},e.prototype.getDuration=function(){if(!this.Eb)return 0;var t=l.call(this,"getAdDuration");return(!t||0>=t)&&0<this[_t]&&(t=this[_t]),t},e.prototype.stop=function(){rt.debug("stopAd"),this.Jd||(this.Jd=!0,this.Eb?(this[St]&&(this[St].Z(),s.call(this,et.fl,N)),l.call(this,"stopAd"),this[gt]=setTimeout(N.bind(this),400)):N.call(this))},e.prototype.rt=function(){rt.debug("forceStop"),this.dispose(),this[gt]&&clearTimeout(this[gt]),this.D.complete(!0)},e.prototype.dispose=function(){rt.debug("dispose"),this[St]&&(this[St].Z(),this[St]=null),this.Eb&&(this.Eb.pf&&this.Eb.pf(),this.Eb=null),this[At]&&this[At].ye(),H.default.enabled()&&H.default.Bu(this[Ot])},e.prototype.skip=function(){l.call(this,"skipAd")},e.prototype.setVolume=function(t){this[bt]=t,l.call(this,"setAdVolume",t)},e.prototype.getVolume=function(){return l.call(this,"getAdVolume")},e.prototype.pause=function(){l.call(this,"pauseAd"),this[wt]=!0},e.prototype.resume=function(){l.call(this,"resumeAd")},e.prototype.expandAd=function(){l.call(this,"expandAd")},e.prototype.collapseAd=function(){l.call(this,"collapseAd")},e.prototype.invokeAdMethod=function(t,e){l.call(this,"invokeAdMethod",t,e)},e.prototype.getAdRemainingTime=function(){return l.call(this,"getAdRemainingTime")},e.prototype.Qd=function(){if(!this.Eb)return 0;var t=this.getAdRemainingTime();return t>this[_t]&&(this[_t]=t),t},e.prototype.Fe=function(){t.prototype.Fe.call(this),this[Tt]=l.call(this,"getAdLinear"),this[At]&&this[At].show()},e}(W.default);e.default=Dt},function(t,e,n){var i=n(1)(i||{},{f:{Rb:{}}});i.f.Rb=function(){var t="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,e=document,n=function(){for(var t,n=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")],i=n.length,r=-1,o={};++r<i;)if((t=n[r])&&t[1]in e){for(r=-1,i=t.length;++r<i;)o[n[0][r]]=t[r];return o}return!1}();return n?{enabled:function(){return!!e[n.fullscreenEnabled]},OA:function(i){var r=n.requestFullscreen;i?e=i.ownerDocument:i=e.FA,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?i[r]():i[r](t&&Element.ALLOW_KEYBOARD_INPUT)},VA:function(){e[n.exitFullscreen](),e=document},zg:function(){return!!e[n.fullscreenElement]},element:function(){return e[n.fullscreenElement]},zs:function(t){e.addEventListener(n.fullscreenchange,t)},Bu:function(t){e.removeEventListener(n.fullscreenchange,t)}}:{enabled:function(){return!1}}}(),e.vdb={f:{Rb:i.f.Rb}},e.default=i.f.Rb,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(27)).default),e.default=t,t.er="UNIQUE_ERROR"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).jm=[],n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.initAd=function(t,e,n,i,r){r=r.AdParameters||"",this.V("initAd",t,e,n,i,r,"")},e.prototype.startAd=function(){this.V("startAd")},e.prototype.stopAd=function(){this.V("stopAd")},e.prototype.setAdVolume=function(t){this.V("setAdVolume",t)},e.prototype.getAdVolume=function(){return this.V("getAdVolume")},e.prototype.resizeAd=function(t,e,n){this.V("resizeAd",t,e,n)},e.prototype.pauseAd=function(){this.V("pauseAd")},e.prototype.resumeAd=function(){this.V("resumeAd")},e.prototype.collapseAd=function(){this.V("collapseAd")},e.prototype.expandAd=function(){this.V("expandAd")},e.prototype.getAdExpanded=function(){return this.V("getAdExpanded")},e.prototype.getAdSkippableState=function(){return this.V("getAdSkippableState")},e.prototype.skipAd=function(){this.V("skipAd")},e.prototype.getAdWidth=function(){return this.V("getAdWidth")},e.prototype.getAdHeight=function(){return this.V("getAdHeight")},e.prototype.getAdDuration=function(){return this.V("getAdDuration")},e.prototype.getAdLinear=function(){return this.V("getAdLinear")},e.prototype.getAdRemainingTime=function(){return this.V("getAdRemainingTime")},e.prototype.getAdIcons=function(){return this.V("getAdIcons")},e.prototype.getAdCompanions=function(){return this.V("getAdCompanions")},e.prototype.handshakeVersion=function(t){return this.V("handshakeVersion",t)},e.prototype.subscribe=function(t,e,n){var i=t;n&&(i=t.bind(n),this.jm.push({$z:i,listener:t})),this.addEventListener(e,i)},e.prototype.unsubscribe=function(t,e){for(var n=0;n<this.jm.length;++n){var i=this.jm[n];if(t===i.listener)return void this.removeEventListener(e,i.$z)}this.removeEventListener(e,t)},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(104)).default),e.default=t,t.HG="VPAIDWrapper.SOUND_VIOLATION"},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={pp:"RM.APIFunctionIsMissing",bq:"RM.getVpaidAdIsMissing",Dq:"RM.noCreative",Jr:"RM.VPAIDUrlUnavailable"}},function(t,e,n){var i=n(1)(i||{},{g:{Pi:{}}});i.g.Pi={wl:"id",Wv:"class"},e.vdb={g:{Pi:i.g.Pi}},e.default=i.g.Pi,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(77));var r=n(17),o=i(r),s=i(r=n(25)),a=i(r=n(10));r=i(r=n(3));var u=i(n(29)),l=i(n=n(5)),c=r.default.I("LoadableImageElement");n=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i=!i||"object"!=typeof i&&"function"!=typeof i?this:i,c.debug("init",n),i.gd=u.default.Im(n),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.createElement=function(){c.debug("createDisplayObject");var t=l.default.createElement("img",{style:{position:"absolute",zIndex:1}});return this.fm=a.default.group(a.default.bind(t,"load",this.io.bind(this)),a.default.bind(t,"error",this.ou.bind(this))),t.src=this.gd.replace(/\s+/g,""),t},e.prototype.io=function(){c.info("onImageLoaded",this.gd),this.element.addEventListener("click",function(){c.debug("onImageClick"),this.D.rg(null)}.bind(this)),c.debug("draw"),this.ii(),this.Fe(),this.D.ue()},e.prototype.ou=function(t){c.debug("onImageError",t),this.element.offsetWidth?this.io():(this.D.sg(o.default.La,{error:s.default.zq}),this.D.complete(!0))},e.prototype.stop=function(){c.debug("stop"),this.fm&&this.fm.Z(),t.prototype.stop.call(this)},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){return(t=(t=t?t.url:"")&&l.default.trim(t))&&!l.default.startsWith(t,"rtmp",!0)}function o(t){var e={qt:[],Un:[],video:[]};return t.forEach(function(t){-1<p.indexOf(t.mimeType)?e.qt.push(t):-1<d.indexOf(t.mimeType)?e.Un.push(t):e.video.push(t)}),e}function s(t,e,n){var i=null,r=null,o=null;if(t.length){o=t.slice();for(var s=t.length-1;0<=s;s--){var a=t[s];if(!a.Ff&&a.width<=e&&a.height<=n&&(i=a),a.width>=e&&a.height>=n){r=a;break}}r&&(o.splice(o.indexOf(r),1),o.unshift(r)),i&&(o.splice(o.indexOf(i),1),o.unshift(i))}return o}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var a=n(150),u=i(a),l=i(a=n(73));n=i(n=n(105));var c=t.default.I("LinearResolver"),d=[n.default.rq,n.default.sq],h=d.concat([n.default.Px]),p=[n.default.Uf,n.default.Xp];e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.Eu=function(t,e,n,i){var a=n.filter(function(t){return t=t.mimeType,u.default.isSupported(t)||-1<h.indexOf(t)||-1<p.indexOf(t)&&i}),l=s((a=o(a=function(t){return t.slice().sort(function(t,e){return(t.width*t.height-(+t.ak||0)||0)<(e.width*e.height-(+e.ak||0)||0)?1:-1})}(a=a.filter(r)))).video,t,e);return null==l&&(l=s(a.Un.length?a.Un:a.qt,t,e)),null==l&&0<n.length&&c.warn("None of the provided mime-types is supported",n),l},t}()},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).lu=[],n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(151)).default),e.default=t},function(t,e,n){var i=n(1)(i||{},{f:{ob:{},zc:{},Bc:{}},A:{}});i.A=n(4).vdb.A,i.f.zc=n(198).vdb.f.zc,i.f.Bc=n(199).vdb.f.Bc,i.f.ob=i.A.Class.extend({N:function(t){this.hb=t||[]},join:function(t){if(!t)return this;var e=new i.f.ob,n=this;return e.resolve=function(e){return t.resolve(n.resolve(e))},e},resolve:function(t){if(!t)return t;for(var e=0;e<this.hb.length;e++)t=this.hb[e].apply(t);return t}}),function(t){t.create=function(e){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r],s=o.pop();n.push(new i.f.zc(s,o))}return new t(n)},t.rf=function(e,n){return new t([new i.f.Bc(e,n)])},t.eB=function(e,n,i){n=n||"",i=i||"";var r,o=[];for(r in e)e.hasOwnProperty(r)&&o.push([n+r+i,e[r]]);return t.create.apply(null,o)}}(i.f.ob),e.vdb={f:{ob:i.f.ob}},e.default=i.f.ob,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=Symbol(),i=Symbol();t=function(){function t(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[i]=e,this[n]={},function(t){var e=this;t.forEach(function(t){return e[n][t.xe()]=t})}.call(this,r)}return t.prototype.Md=function(t){return this[n][t]},t.prototype.Gg=function(){},t.prototype.ea=function(){},t.prototype.parse=function(t){return this.Gg&&this.Gg(t)?this.ea(t):null},t.prototype.xe=function(){return this[i]},t}(),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=[],e=this.Md(arguments[1]);return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(n){(n=e.parse(n))&&t.push(n)}),t}function o(t,e){return t?r.call(this,f.default.Sa(t[0])[e],e):[]}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var s=n(336),a=i(s),u=n(57),l=i(s=n(339)),c=i(s=n(357)),d=i(s=n(44)),h=i(s=n(93)),p=i(s=n(108)),f=i(s=n(13)),_=i(n=n(29));n=function(t){function e(n){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,n,i.concat([a.default,u.rp,u.Sp,u.jq,l.default,c.default])),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!i||"object"!=typeof i&&"function"!=typeof i?this:i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=this.Ss();return t=f.default.Sa(t),e.H=a.default.parse(t.AdSystem[0]),e.Cs=r.call(this,t.Attempt,"Attempt"),e.Bk=r.call(this,t.Impression,"Impression"),e.Bk.forEach(function(t){-1!==t.url.indexOf("log.adaptv.advertising.com")&&(e.uo=_.default.eb("5",t.url))}),e.bb=r.call(this,t.Error,"Error"),e.yb=o.call(this,t.Creatives,"Creative"),e.yb.sort(function(t,e){return t.oc-e.oc}),e.tf=o.call(this,t.Extensions,"Extension"),function(t){var e=t.filter(function(t){return t instanceof h.default})[0];if(t=t.filter(function(t){return t instanceof p.default})[0],e&&t){var n=[d.default.Ki,d.default.Sg,d.default.Sf],i=t.Ic;e.Ic.forEach(function(t){var e=t.type;-1!==n.indexOf(e)&&0===i.filter(function(t){return t.type===e}).length&&i.push(t)})}}(e.yb),e},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).id=i,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(110)).default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(109));var r=i(n(347)),o=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"AdParameters");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new r.default;return e.value=o.default.Xa(t),e.NF=t.getAttribute("xmlEncoded"),e},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(350),o=n(221),s=i(o),a=i(o=n(152)),u=i(n=n(13));n=function(t){function e(n){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,n,i.concat([r.Zq,r.gq,r.eq,s.default,a.default])),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!i||"object"!=typeof i&&"function"!=typeof i?this:i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=this,n=this.Us();n.height=t.getAttribute("height"),n.width=t.getAttribute("width"),n.id=t.getAttribute("id");var i=t.getAttribute("expandedWidth");return n.jt=isNaN(i)?0:i,i=t.getAttribute("expandedHeight"),n.it=isNaN(i)?0:i,n.Mc=t.getAttribute("apiFramework"),[(t=u.default.Sa(t)).StaticResource||[],t.IFrameResource||[],t.HTMLResource||[]].forEach(function(t){t.forEach(function(t){(t=e.Md(t.nodeName).parse(t))&&n.kd.push(t)})}),(i=t.AdParameters)&&(n.parameters=s.default.parse(i[0])),(i=t[this.Zm()])&&(n.Jb=this.DB().parse(i[0])),(t=t[this.$m()])&&(n.oA=this.FB().parse(t[0])),n},e.prototype.DB=function(){return this.Md(this.Zm())},e.prototype.FB=function(){return this.Md(this.$m())},e}(t.default),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.height=this.width=null,this.id="",this.parameters=this.oA=this.Jb=this.it=this.jt=null,this.Mc="",this.kd=[]}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this;this.$n=this.H.Rd(),this.Hh.forEach(function(e){return(new Image).src=t.$n.resolve(e)})}Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(13)),s=i(n(12)),a=i(n=n(10));n=function(){function t(e){var n=this;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.Hh=[],e.forEach(function(t){(o.default.Sa(t).Feacon||[]).forEach(function(t){return n.Hh.push(o.default.Xa(t))})})}return t.prototype.prepare=function(t,e){this.H=t,e?a.default.group(a.default.Da(this.H,s.default.bp,r.bind(this)),a.default.Da(this.H,s.default.od,r.bind(this))):r.call(this)},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){e.forEach(function(e){e.url&&t.Kd.push(e.url)})}function o(t,e,n,i){var r=this;t&&t.Ic&&t.Ic.forEach(function(t){var o;if(o=t.type===n&&t.url){var s=m.default.trim(t.offset||"");i&&i.nd===v.default.Ll&&s?(o=i.data||{}).duration?(-1===s.indexOf("%")?s=y.default.Ke(s):(s=Number(s.substr(0,s.length-1)),s=o.duration*s/100),(o=o.currentTime>=s&&-1===r.ms.indexOf(t))&&r.ms.push(t)):o=!1:o=!0}o&&(o=t.url,function(t){return 0<_.default.kl.filter(function(e){return-1<t.indexOf(e)}).length}(t.url)||(o+=(-1<t.url.indexOf("?")?"&":"?")+"cb="+Math.random().toString(10).substr(2)),e.push(o))})}Object.defineProperty(e,"__esModule",{value:!0});var s=i(t=n(108)),a=i(t=n(92)),u=i(t=n(107)),l=i(t=n(44)),c=i(t=n(93)),d=i(t=n(17)),h=i(t=n(91));t=i(t=n(30));var p=n(3);p=i(p);var f=n(140),_=i(f),m=i(f=n(73)),y=i(f=n(5)),v=i(n=n(34)),g=p.default.I("AbstractAd");n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).ms=[],n.Cs=[],n.Bk=[],n.bb=[],n.yb=[],n.tf=[],n.Fk=!1,n.id="",n.state={loaded:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.zu=function(t,e,n){var i=new d.default(d.default.Ci,null,null,e);this.pg=function(){this.dispatchEvent(i),t.ki(i),this.pg=null}.bind(this,t,i),(this.state.loaded||n)&&this.pg()},e.prototype.dispatchEvent=function(e){g.debug("dispatchEvent",e);var n=e.Nh();switch(n=e.bu?n:!y.default.Rc(n)&&function(t){return this.yb.filter(function(e){return e.__proto__===t.__proto__})[0]}.call(this,n),e.type){case d.default.Ci:this.Ky||(r(e,this.Cs),this.Ky=!0);break;case d.default.vc:r(e,this.Bk);break;case d.default.La:this.pg&&this.pg(),r(e,this.bb);break;case d.default.kb:n instanceof c.default?(r(e,n.Ms),n.Ic&&n.Ic.forEach(function(t){t.type===l.default.Ki&&t.url&&e.Kd.push(t.url)})):n&&n.fk&&o.call(this,n,e.Kd,l.default.Sg);break;case h.default.Zf:o.call(this,n,e.Kd,e.nd,e);break;case a.default.Li:this.yb.forEach(function(t){t instanceof s.default&&e.dk.push(t)});break;case u.default.Mi:if(!n)return;e.Ps.Ic.forEach(function(t){t.type===e.nd&&t.url&&e.Kd.push(t.url)});break;case l.default.LOADED:this.pg&&this.pg(),this.state.loaded=!0;case l.default.eh:case l.default.$f:case l.default.dh:case l.default.Sf:case l.default.fc:case l.default.LINEAR_CHANGE:o.call(this,n,e.Kd,e.type)}return t.prototype.dispatchEvent.call(this,e)},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){this.ph.reject("BaseRunner failed with message: "+t)}function o(t){if(t&&(this.Cd=t),t&&t.events&&function(){var t=this,e=!0;return y.concat(this.Tr).forEach(function(n){var i=t.Cd[n];i?t.Ca[n]=i.bind(t.Cd):t.Ca[n]||(e=!1)}),e}.call(this)){this.Rr&&this.Rr.xE();try{t.events.readyCallback(),this.ph.resolve()}catch(t){this.ph.reject(t.toString())}}else this.Yl+=1,40<this.Yl?r.call(this,"Flash peer waiting timeout"+this.le.sA()):setTimeout(o.bind(this,t),100)}function s(t,e){for(var n=0;n<t.length;++n){var i=t[n];i!==e&&u.default.Ef(i)}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(t=n(52)),u=i(t=n(5)),l=i(t=n(2));t=i(t=n(3));var c=n(227),d=i(c),h=i(c=n(378)),p=i(c=n(379)),f=i(c=n(12)),_=i(n=n(380)),m=t.default.I("BaseRunner"),y=["callMethod","removeWrappedObject"];n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.ib=e[l.default.Ha],this.F=e[l.default.X],this.Uy=this.F.UB()||"latest",this.Bd=e[l.default.za],this.js=e[l.default.ya].Od(),this.le=e[l.default.bc],e[l.default.Ga].tg(_.default),this.Ca={},this.lg=u.default.createElement("div",{class:"flash-runner"},this.js),this.lg.style.width="100%",this.lg.style.height="100%",this.Lc=new d.default(this.lg).Vt("").contentDocument.body,this.Ny=this.F.jC(),this.F.So(!1),this.Bd.addEventListener(f.default.od,function(){s.call(this,this.Lc.parentNode.children,this.Cd&&this.Cd.parentNode),s.call(this,this.Lc.children,this.Cd)}.bind(this)),this.Gh()}return t.prototype.Gh=function(t){this.ph=new a.default,this.Vr="flash_runner_"+Math.random().toString().slice(2)+"_"+(new Date).getTime();var e={flashObjectId:this.Vr};this.Ny&&(this.Rr=new p.default(this.F,this.Lc,this.js)),t="player/swf/%FLASH_VERSION%/"+t,e=h.default.KA(this.Lc,{id:this.Vr,onFail:r.bind(this,"Flash embedding failed"),src:this.ib.BB(t.replace("%FLASH_VERSION%",this.Uy)),version:[11,1],wmode:"transparent"},e),this.Yl=0,o.call(this,e)},t.prototype.wg=function(){var t=this;return this.ph.Ea().then(function(){return t})},t.prototype.V=function(){if(this.Ca)return this.Ca.callMethod.apply(this.Ca,arguments);m.error("Calling runner before it's ready, arguments: "+arguments.join(" "))},t.prototype.tE=function(t){this.Ca.removeWrappedObject(t)},t.prototype.addEventListener=function(t,e,n){this.Ca["events"+t].addEventListener(e,n)},t.prototype.removeEventListener=function(t,e,n){this.Ca["events"+t].removeEventListener(e,n)},t.prototype.ye=function(){this.lg.style.visibility="hidden"},t.prototype.show=function(){this.lg.style.zIndex=2,this.lg.style.visibility="visible"},t}(),e.default=n,n.W=[l.default.Ga,l.default.Ha,l.default.bc,l.default.ya,l.default.X,l.default.za]},function(t,e,n){var i=n(1)(i||{},{f:{Yi:{}},A:{},u:{},log:{},Wa:{},Promise:{},B:{S:{}}});i.A=n(4).vdb.A,i.u=n(18).vdb.u,i.log=n(21).vdb.log,i.Wa=n(132).vdb.Wa,i.Promise=n(23).vdb.Promise,i.B.S=n(83).vdb.B.S,i.f.Yi=i.A.Class.extend(function(){return{N:function(t){this.gh=t},Vt:function(t,e){var n=(e=e||{}).width,r=e.height;return n=i.u.createElement("iframe",{src:"javascript:void(0)",width:n?n+"px":"100%",height:r?r+"px":"100%",scrolling:"no",frameBorder:0,marginHeight:0,marginWidth:0},this.gh),function t(e,n,r){var o=r.gi,s=r.VH,a=e.contentWindow,u=e.document;e.contentDocument?u=e.contentDocument:e.contentWindow&&(u=e.contentWindow.document),u?(u.open(),s&&s(e),o&&i.Promise.all([new i.Promise(function(t){if("safari"===i.u.xb.name)if(u.body)t();else var n=setInterval(function(){u.body&&(clearInterval(n),t())},100);else i.B.S.bind(e,"load",t)}),new i.Promise(function(t){i.u.Be&&"complete"!==u.readyState?i.B.S.bind(u,"readystatechange",function(){"complete"===u.readyState&&t()}):t()})]).then(function(){return new i.Promise(function(t){a.onIFrameReady=t,(t=u.createElement("script")).innerHTML="onIFrameReady()",u.body.appendChild(t)})}).then(function(){o(e,u)}),a.onerror=function(t,e,n,r){"Script error."!==t&&e&&n&&r&&i.log.I("IframeError").error([t,"Url: ",e,"Line: ",n,"Column: ",r].join(", "))},u.write(n),u.close()):i.u.Ah(t.bind(this,e,n,r))}.call(this,n,t,e),n}}}()),e.vdb={f:{Yi:i.f.Yi}},e.default=i.f.Yi,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={SF:"$(AD_POSN)",TF:"$(AD_PS)",Ix:"$(S_VIEW_TYPE)",py:"$(V_AUD_INFO)",qy:"$(V_AUD_TIME_INVIEW_100)",ry:"$(V_AUTOPLAYED)",sy:"$(V_EXPANDED)",ty:"$(V_IS_INVIEW_100_HALFTIME)",uy:"$(V_MOAT_IVT)",vy:"$(V_PLAYER_HEIGHT)",wy:"$(V_PLAYER_WIDTH)",xy:"$(V_SKIP_AVAIL)",yy:"$(V_TIME_INVIEW_50)",zy:"$(V_TIME_INVIEW_50_MAX_CONTINUOUS)",Ay:"$(V_VIEW_INFO)",By:"$(V_VIEW_TYPE)"}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=(t=n(2))&&t.__esModule?t:{default:t};n=(n=n(206))&&n.__esModule?n:{default:n};var r=Symbol(),o=Symbol(),s=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var a=t.call(this,n[i.default.za],n[i.default.Ya]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(a=!a||"object"!=typeof a&&"function"!=typeof a?this:a)[s]=n[i.default.na],a[r]=0,a[o]=0,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Ku=function(t){this.hb=t},e.prototype.fi=function(){var t=+new Date;this.Kf&&(!(this.ua()>=this.hb.hn())||this.hb.Dn()&&this[s].isMuted()?this.hb.Fn()&&(this[r]=0):this[r]+=t-this.Kf,this[o]=Math.max(this[o],this[r])),this.Kf=t},e.prototype.Ph=function(){return this[o]},e}(n.default),e.default=n,n.W=[i.default.za,i.default.na,i.default.Ya]},function(t,e,n){function i(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];switch(t){case 0:return!1;case 1:return!0;default:return e}}Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(386))&&t.__esModule?t:{default:t};var r=((n=n(3))&&n.__esModule?n:{default:n}).default.I("GeminiViewabilityRules"),o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),d=Symbol();n=function(t){function e(n,h,p){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var f=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f=!f||"object"!=typeof f&&"function"!=typeof f?this:f,r.debug("constructor",h),h=h||{},f[o]=n,f[s]=h.d||t.prototype.jn.call(f),f[a]=h.p||t.prototype.hn.call(f),f[u]=i(h.c,t.prototype.Fn.call(f)),f[l]=i(h.a,t.prototype.Dn.call(f)),f[c]=h.t||t.prototype.vn.call(f),f[d]=p||[],f}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getName=function(){return this[o]},e.prototype.jn=function(){return this[s]},e.prototype.hn=function(){return this[a]},e.prototype.Fn=function(){return this[u]},e.prototype.Dn=function(){return this[l]},e.prototype.vn=function(){return this[c]},e.prototype.sC=function(){return this[d]},e}(t.default),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default={aG:"CLICK_INTERNAL",jG:"FOLLOW",kG:"FORWARD",nG:"IMPR_INTERNAL",pG:"LIKE",uG:"PARTIAL_VIEW",zG:"REBLOG",DG:"SAVE",Ex:"STATIC_VIEW",Fx:"STATIC_VIEW_3P",LG:"USER_INPUT",Tx:"VIDEO_30_SEC",SG:"VIDEO_CLOSE",Zx:"VIDEO_QUARTILE_25",$x:"VIDEO_QUARTILE_50",ay:"VIDEO_QUARTILE_75",Yx:"VIDEO_QUARTILE_100",XG:"VIDEO_SKIP",by:"VIDEO_START",cy:"VIDEO_VIEW",dy:"VIDEO_VIEW_3P"}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.Fj=e}return t.prototype.Yj=function(){},t.prototype.show=function(){},t.prototype.ye=function(){},t}(),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=(t=n(52))&&t.__esModule?t:{default:t},r=(n=n(5))&&n.__esModule?n:{default:n};n=function(){function t(e,n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.me=e,this.gd=n,this.Oj=new i.default,this.Qr="handshakeVersion initAd startAd stopAd skipAd resizeAd pauseAd resumeAd expandAd collapseAd subscribe unsubscribe".split(" ")}return t.prototype.Lt=function(){return this.Oj.Ea()},t.prototype.pf=function(){r.default.Ef(this.me)},t.prototype.nu=function(t){this.pf(),this.Oj.reject(t)},t.prototype.V=function(t,e){"setAdVolume"===t&&this.mute(0===e[0])},t.prototype.mute=function(){},t}(),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.vt=function(t,e,n){return n?e+"dev/ad-client/js/"+n+"/":t+"ad-client/js/5.1.3/"}},function(t,e,n){var i=n(1)(i||{},{f:{pb:{}}});i.f.pb={eb:function(t,e){return t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),null==(t=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e))?"":decodeURIComponent(t[1].replace(/\+/g," "))}},e.vdb={f:{pb:i.f.pb}},e.default=i.f.pb,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{Wa:{},A:{},Promise:{},Oa:{},f:{Gc:{}}});i.A=n(4).vdb.A,i.Promise=n(23).vdb.Promise,i.Oa=n(186).vdb.Oa,i.f.Gc=n(187).vdb.f.Gc,i.Wa=i.A.Class.extend({N:function(t){this.ja=this.Id=t},$E:function(t){this.ja=t},Bo:function(t,e){t.removeAttribute(e)},Nc:function(t,e,n){if(void 0===n)return t.getAttribute(e);null===n?this.Bo(t,e):t.setAttribute(e,n)},nh:function(t,e,n){var i="TABLE"===t.nodeName,r=this.ja.createElement("div");r.innerHTML="<"+t.nodeName+">"+e+"</"+t.nodeName+">",n(i?t.lastChild:t,i?r.lastChild.lastChild:r.lastChild)},co:function(t){var e=this.ja.createElement("div");return e.innerHTML=t,e.lastChild},jh:function(t){for(var e,n="",r=0;null!=(e=t[r++]);)e.nodeType===i.Oa.TEXT_NODE||e.nodeType===i.Oa.CDATA_SECTION_NODE?n+=e.nodeValue:e.nodeType!==i.Oa.COMMENT_NODE&&(n+=this.jh(e.childNodes));return n},replace:function(t,e){this.nh(t,e,function(e,n){return t.replaceChild(n,e),e})},append:function(t,e){this.nh(t,e,function(t,e){return t.appendChild(e.firstChild),e.firstChild})},jd:function(t,e){if(null===e||void 0===e)return t.innerHTML;try{t.innerHTML=e}catch(n){this.replace(t,e)}return null},text:function(t,e){return null===e||void 0===e?this.jh([t]):(this.empty(t),t.appendChild(this.ja.createTextNode(e)),null)},empty:function(t){if(t&&t.removeChild)for(;t.firstChild;)t.removeChild(t.firstChild)},createElement:function(t){return this.ja.createElement(t)},createDocumentFragment:function(){return this.ja.createDocumentFragment()},Nd:function(t){return(t=t||this.ja).head||t.getElementsByTagName("head")[0]},hh:function(t,e,n,i){var r=this.createElement("script");for(var o in this.Nc(r,"type","text/javascript"),i)Object.prototype.hasOwnProperty.call(i,o)&&this.Nc(r,o,i[o]);return n&&this.Nc(r,"async","true"),t&&this.Nc(r,"src",t),e&&this.Nc(r,"crossorigin","anonymous"),r},Bg:function(t,e,n,r){function o(){s.onload=function(){},s.onerror=function(){},s.onreadystatechange=function(){},a.removeChild(s)}t&&0===t.indexOf("//")&&0!==window.location.protocol.indexOf("http")&&(t="https:"+t);var s=this.hh(t,e,n,r),a=this.Nd(this.Id);return t=new i.Promise(function(t,e){s.onload=t,s.onerror=e}),s.onreadystatechange=function(){"complete"!==s.readyState&&"loaded"!==s.readyState||s.onload()},t.then(o,o),a.appendChild(s),t},Ut:function(t){var e=this.hh();return this.text(e,t),this.Nd().appendChild(e),e},bC:function(t,e,n){var i="VDBCallback"+Math.round(1e4*Math.random()),r=n||this.Id&&this.Id.defaultView||window;r[i]=function(){"function"==typeof e&&e.apply({},arguments);try{delete r[i]}catch(t){r[i]=void 0}},this.Bg(t.replace("[callback]",i))},ND:function(t){var e=this.ja.createElement("link");this.Nd().appendChild(e),e.rel="stylesheet",e.type="text/css",e.href=t},tg:function(t,e){e=e||this.Nd();var n=i.f.Gc.hash(t)+"-style";if(!this.ja.getElementById(n)){var r=this.ja.createElement("style");r.setAttribute("id",n),r.type="text/css",r.appendChild(this.ja.createTextNode(t)),e.appendChild(r)}return n},LA:function(t,e){this.tg(t,e)},uA:function(t){var e=this.ja.createElement("img");return e.src=t,e},tA:function(t){var e=this.ja.createElement("div");return null!==t&&void 0!==t&&(e.className=t),e},log:function(t){this.Fb||(this.Fb=this.ja.createElement("div"),this.Fb.style.position="fixed",this.Fb.style.top="0px",this.Fb.style.left="0px",this.Id.getElementsByTagName("body")[0].appendChild(this.Fb)),this.Fb.innerHTML=t+"<br>"+this.Fb.innerHTML}}),e.vdb={Wa:i.Wa},e.default=i.Wa,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{td:{}}});i.f.td=function(){function t(){this.em="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=window.crypto||window.msCrypto;return e=window.Uint16Array&&e&&e.getRandomValues?e.getRandomValues(new window.Uint16Array(1))[0]%16:Math.floor(16*(Math.random()||0)%16),("x"===t?e:3&e|8).toString(16)})}return t.prototype.toString=function(){return this.em},t}(),e.vdb={f:{td:i.f.td}},e.default=i.f.td,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{xa:{wc:{}},A:{},Promise:{}});i.A=n(4).vdb.A,i.Promise=n(23).vdb.Promise,i.xa.wc=i.A.Class.extend(function(){var t=i.Promise;return{N:function(t){this.rb=t.cD,this.Ej=t.BA,this.es=t.mE},kn:function(){var t=this;return this.ig||(this.ig=this.rb.Du(this.Ej).then(function(e){return t.Wr.apply(t,e)})),this.ig},ln:function(){if(!this.gg){var t=this.rb.yE(this.Ej);if(t=this.$l.apply(this,t),!this.Yr(t))throw Error("can't be created synshonously");this.gg=t}return this.gg},Wr:function(){var e=Array.prototype.slice.call(arguments),n=this;return new t(function(t){n.gg=n.$l.apply(n,e),t(n.gg)})},$l:function(){return this.es.apply(null,Array.prototype.slice.call(arguments))},Yr:function(t){return null==t||"function"!=typeof t.then}}}()),e.vdb={xa:{wc:i.xa.wc}},e.default=i.xa.wc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{cc:{}}});i.g.cc={Uf:"flash",cq:"html5",Yg:"o2unit",Fq:"VRM_plgn",Bx:"smart",ah:"VDMS"},e.vdb={g:{cc:i.g.cc}},e.default=i.g.cc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Aa:{}}});i.f.Aa=function(t){return{Ab:function(e){var n=e||t;return e=this.Pc(n),n=n&&n.location&&n.location.ancestorOrigins,e===t.top?e.location.href:n&&1<n.length?n[n.length-1]:e.document&&e.document.referrer||e.location.href},Pc:function(e){for(e=e||t;e;)try{var n=e.parent;if(!n.document)break;if(e=n,n===n.parent)break}catch(t){break}return e},vf:function(e){e=e||t;try{return e.parent}catch(t){}return null},Nb:function(){return-1===(t.location.protocol||this.Ab()||"").indexOf("http:")}}}(window),e.vdb={f:{Aa:i.f.Aa}},e.default=i.f.Aa,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.iv="ad_call",e.jv="ad_callf",e.rv="ad_err",e.yv="ad_prog",e.xv="ad_oppty",e.Iv="ad_view",e.Nf="ad_impression"},function(t,e,n){var i=n(1)(i||{},{g:{rd:{}}});i.g.rd={Rp:"VIDEO",hq:"IMA",Jl:"PREBID",Ul:"VAST",Vi:"GEMINI"},e.vdb={g:{rd:i.g.rd}},e.default=i.g.rd,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bl="adplugin/vrm",e.rj="ad-plugin"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.AdPluginEvent=e.VrmAdPlugin=void 0,t=function(t){return t&&t.__esModule?t:{default:t}}(n(282)),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(155)),e.VrmAdPlugin=t.default,e.AdPluginEvent=n},function(t,e,n){function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=r(t=n(283)),s=r(t=n(285)),a=r(t=n(95)),u=r(t=n(19)),l=r(t=n(84)),c=r(t=n(154)),d=r(t=n(448));t=r(t=n(21));var h=n(241),p=i(h),f=i(h=n(449)),_=i(h=n(155)),m=i(h=n(115)),y=r(h=n(450)),v=r(h=n(452)),g=r(h=n(454)),E=r(h=n(455)),b=r(h=n(456)),A=r(h=n(458)),S=n(156),T=n(243),I=t.default.I("VrmAdPlugin"),C=Symbol("adBlockerSniffer"),R=Symbol("adBreakManager"),P=Symbol("dependenciesReadyPromise"),L=Symbol("eventBus"),O=Symbol("fetchedOnce"),w=Symbol("injector"),M=Symbol("playerEventHandler"),D=Symbol("adSystemEventHandler"),N=Symbol("metricsHandler"),k=Symbol("slot"),B=Symbol("adSystemStarter"),x=Symbol("adSystem");n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");I.debug("init"),this[L]=new l.default,this[B]=new s.default,this[w]=this[B].ka(),this[C]=new o.default(this),this[C].check(),this[w].Pb(u.default.hj,this[L]),this[w].Pb(u.default.si,this[C]),this.type=T.rj,this.mimetype=T.Bl,this.version="1.0.115"}return t.prototype.getCapabilities=function(){return[f.sx,f.tx]},t.prototype.prepare=function(t){var e=this;I.debug("prepare",t),t=(0,A.default)(t),this[k]=t.slot,(0,d.default)(t),this[B].aF(t),this[P]=this[B].zE().then(function(){e[N]=e[w].Wb(E.default),e[w].Pb(u.default.aj,e[N]),e[M]=e[w].Wb(b.default),e[D]=e[w].Wb(v.default),e[R]=e[w].Wb(y.default),e[R].addEventListener(y.default.cp,function(t){e[L].dispatchEvent(_.ITEM_LOADED,t,e[N].cb())});var t=e[w].K(u.default.Mf),n=e[w].K(u.default.na);e[x]=e[w].K(u.default.Ua),t.display(n.wf())})},t.prototype.addEventListener=function(t,e){this[L].addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this[L].removeEventListener(t,e)},t.prototype.onPlayerEvent=function(t){for(var e=this,n=arguments.length,i=Array(1<n?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];I.debug("onPlayerEvent",t,i),this[P]&&this[P].then(function(){e[M].onPlayerEvent(t,i),t===m.xq&&e[R].YE(i[0])})},t.prototype.fetchAdBreaks=function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};I.debug("fetchAdBreaks",e);var n,i=e.refId;n=e.config.YVAP?this[w].Wb(g.default).OE(e.config).oF():e.config,this[P].then(function(){if(t[N].Yd({pos:a.default.gb.toLowerCase()}),n){var e=n.aeg;t[N].Yd({medS:e&&e[0]?2:3,medT:2})}else t[N].Yd({medS:1,medT:1});t[O]?t[w].K(u.default.X).AF((new c.default).toString()):t[O]=!0,t[M].reset(),t[R].fetchAdBreaks(n).then(function(e){t[L].dispatchEvent(_.METRICS,t[N].cb({evt:p.xv,taken:e.length?1:2})),t[L].dispatchEvent(_.AD_BREAKS_AVAILABLE,{adBreaks:e,refId:i},t[N].cb())})})},t.prototype.resolveAdBreak=function(t){var e=this;this[N].Yd({pos:t.type}),I.debug("resolveAdBreak",t),this[M].reset(),0<t.adBreakItems.length?this[L].dispatchEvent(_.RESOLVED,t,this[N].cb()):this[R].resolveAdBreak(t).then(function(){0<t.adBreakItems.length?e[L].dispatchEvent(_.RESOLVED,t,e[N].cb()):e[L].dispatchEvent(_.RESOLVE_ERROR,t,e[N].cb({r_code:100}))})},t.prototype.preparePlayback=function(t,e,n){I.debug("preparePlayback",t,e,n),n&&this[k]&&n.append(this[k]),e&&this[w].K(u.default.Xe).Ju(e),this[R].preparePlayback(t)},t.prototype.play=function(t){var e=this;I.debug("play",t),this[D].dD()?this[x].CE():this[P].then(function(){return e[R].play()}).then(function(){e[L].dispatchEvent(_.PLAY_REQUESTED,e[N].cb())})},t.prototype.pause=function(){I.debug("pause"),this[x].ru()},t.prototype.seek=function(){I.debug("seek")},t.prototype.stop=function(){I.debug("stop"),this[x].stop()},t.prototype.skip=function(){I.debug("skip"),this[x].skip()},t.prototype.mute=function(t){I.debug("mute"),this[x].mute(t)},t.prototype.isMuted=function(){return this[x].isMuted()},t.prototype.setVolume=function(t){I.debug("setVolume",t),this[x].setVolume(t)},t.prototype.getVolume=function(){return this[x].getVolume()},t.prototype.getCurrentTime=function(){return this[x].getCurrentTime()},t.prototype.getDuration=function(){return this[x].getDuration()},t.prototype.unload=function(){I.debug("unload"),this[N].Cu(),this[x].stop()},t.prototype.destroy=function(){I.debug("destroy"),this[k]=void 0,this[N].Cu(),this[x].stop()},t.prototype.canRenderUI=function(t){return(0,S.Rt)(t.customInfo.slot)},t.prototype.renderUI=function(){return null},t.prototype.unrenderUI=function(){},t.prototype.setNonlinearAdContainer=function(t){I.debug("setNonlinearAdContainer",t),t&&this[w].K(u.default.ya).WE(t),this[R].jE()},t}(),e.default=n},function(t,e,n){var i=(t=n(1))(i||{},{A:{f:{Ei:{}}},mc:{},Promise:{},u:{},f:{M:{}}});i.mc=n(284).vdb.mc,i.Promise=n(23).vdb.Promise,i.u=n(18).vdb.u,i.f.M=n(43).vdb.f.M,i.A=t(n(4).vdb.A,i.A||{}),i.A.f.Ei=i.A.Class.extend(function(){function t(t){return e=i.mc.Rh(t||"https://video.adaptv.advertising.com/ad/ads/advertisers/advertisers.txt").then(function(){return!(!i.u.xb.safari||!i.f.M.Nb())&&function(){var t=i.u.createElement("div",{class:"adsbox"},document.body);return t.style.height="1px",t.style.width="1px",new i.Promise(function(e){window.setTimeout(function(){e(0===t.offsetHeight),i.u.Ef(t)},100)})}.call(this)}.bind(this),function(){return!0}.bind(this))}var e;return{check:function(e){return t.call(this,e)},Ea:function(){return e}}}()),e.vdb={A:{f:{Ei:i.A.f.Ei}}},e.default=i.A.f.Ei,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{mc:{},u:{},Promise:{},f:{lb:{},tc:{},U:{},G:{},Ja:{}}});(i=t(n(28).vdb,i||{})).u=n(18).vdb.u,i.Promise=n(23).vdb.Promise,i.f.lb=n(190).vdb.f.lb,i.f.tc=n(191).vdb.f.tc,i.f.U=n(55).vdb.f.U,i.f.G=n(24).vdb.f.G,i.f.Ja=n(99).vdb.f.Ja,function(t){function e(t,e){function r(){try{var t,n={Accept:"text/javascript, application/json, text/html, application/xml, text/xml, */*","Content-Type":"application/x-www-form-urlencoded"};for(t in n)Object.prototype.hasOwnProperty.call(e.headers,t)||(e.headers[t]=n[t]);for(t in e.contentType&&(e.headers["Content-Type"]=e.contentType),e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&s.setRequestHeader(t,e.headers[t]);s.send(e.Wd)}catch(t){e.error&&e.error()}}var o,s=function(){var t=i.u.xb;if(window.XDomainRequest&&t.ie&&10>t.version)return new function(){var t=this,e=new XDomainRequest;t.status=0,t.readyState=0,t.setRequestHeader=function(){},t.getResponseHeader=function(t){var e="";return"content-type"===t&&(e=this.mimeType),e},t.open=function(n,i){e.open(n,i),e.onerror=function(){t.status=499,t.responseText="",t.mimeType="",t.readyState=4,t.onreadystatechange()},e.onprogress=function(){t.readyState=2,t.onreadystatechange()},e.onload=function(){t.responseText=e.responseText,t.mimeType=e.contentType,t.readyState=4,t.onreadystatechange()},e.ontimeout=function(){t.status=408,t.responseText="",t.mimeType="",t.readyState=4,t.onreadystatechange()},e.timeout=0,t.readyState=1,t.onreadystatechange()},t.send=function(t){e.send(t)}};if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(t){}return!1}(),a={},u=!1;void 0===e&&(e={}),e.method=e.method?e.method.toLowerCase():"get",e.async=!1!==e.async,e.Wd=e.Wd||"",s.onreadystatechange=function(){if(4===s.readyState){var r=s.getResponseHeader("content-type")||"";a.status=s.status,a.text=s.responseText,/json/.test(r)?a.data=function(t){return"string"==typeof t&&t?(t=i.f.U.trim(t),JSON.parse(t)):null}(s.responseText):/xml/.test(r)&&(a.data=function(t){if(window.DOMParser)return(new DOMParser).parseFromString(t,"text/xml");var e=new window.ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e}(s.responseText)),a.Wc=200<=s.status&&300>s.status||304===s.status||0===s.status&&s.responseText,n.wu(s,t),a.Wc?e.Wc&&e.Wc(a,s):e.error&&i.f.Ja.setTimeout(function(){e.error(a,s,u)},1),e.complete&&e.complete(a,s)}};try{s.open(e.method,t,e.async),void 0!==s.withCredentials&&(s.withCredentials=!!e.withCredentials)}catch(t){}return e.headers=e.headers||{},e.timeout&&(s.timeout=e.timeout,u=!1,s.ontimeout=function(){u=!0}),o={WC:function(t,n){return e.headers[t]=n,o},send:function(t,n){return e.Wd=i.u.Tc(t),e.complete=n,r(),o},end:function(t){return e.complete=t,r(),o},data:function(t){return e.Wd=i.u.Tc(t),o}}}var n=new i.f.tc;t.get=function(t,r,o,s,a,u){return void 0===u&&(u={}),u.Wc=o,u.error=s,u.method="get",function(t){t&&i.f.lb.uk().Yn(t)}(t),n.Bt(t).then(function(n){-1!==i.f.G.Dc(t||"").indexOf("konduit.me")?(u.headers||(u.headers={}),u.method="post",u.headers["Content-Type"]="application/x-www-form-urlencoded",e(t,u).send({"x-cookie":n},a)):e(t,u).send(r,a)})},t.Rh=function(e,n,r){return new i.Promise(function(i,o){t.get(e,n||null,i,function(t,e,n){o({response:t,request:e,Oo:n})},null,r)})},t.iE=function(t,n,i,r,o,s){return void 0===s&&(s={}),s.Wc=i,s.error=r,s.method="post",e(t,s).send(n,o)}}(i.mc),e.vdb={mc:i.mc},e.default=i.mc,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=i(t=n(286)),s=i(t=n(409)),a=i(t=n(411)),u=i(t=n(413)),l=i(t=n(414)),c=i(t=n(415)),d=i(t=n(418)),h=i(t=n(419)),p=i(t=n(421)),f=i(t=n(422)),_=i(t=n(423)),m=i(t=n(424)),y=i(t=n(114)),v=i(t=n(425)),g=i(t=n(429)),E=i(t=n(153)),b=i(t=n(100)),A=i(t=n(433)),S=i(t=n(2)),T=i(t=n(236)),I=i(t=n(30)),C=i(t=n(434)),R=i(t=n(436)),P=i(t=n(437)),L=i(t=n(439)),O=i(t=n(440)),w=i(t=n(441)),M=i(t=n(56));t=i(t=n(78));var D=n(442),N=i(D);D=i(D=n(29));var k=n(5),B=i(k),x=i(k=n(446)),U=i(k=n(240)),j=i(n=n(447));t.default.N(D.default.eb("oathPlayerBuildEnvironment")||"prod");var F=Symbol(),V=Symbol(),H=Symbol(),G=Symbol(),Y=Symbol(),K=Symbol();n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[F]=new P.default(S.default.Sb)}return t.prototype.aF=function(t){this[Y]=t.slot;var e=this[Y].ownerDocument||window.document;t.dontPredefineVideoTag||(this[V]=t.video||this[Y].appendChild(B.default.Pm(e)),this[V]=Array.isArray(this[V])?this[V]:[this[V]]),this[H]=new T.default(e),this[G]=(0,p.default)(),e=t.companionSlots,this[G].adVideoSettings=t.adVideoSettings,this[G].playerType=t.playerType||M.default.Fq,this[G].trackingEnabled=!0,this[G].bcid=t.buyerCompanyId,this[G].geo=t.geo,this[G].id=t.playerId,this[G].sid=t.sid||this[G].sid,this[G].jsVersion=t.jsVersion||this[G].jsVersion,this[G].bid.id=t.playlistId||this[G].bid.id,this[G].vvuid=t.vvuid,this[G].autoplay=t.autoplay,this[G].macros=t.macros,this[G].overrideUrls=t.overrideUrls,this[G].currentVideo=t.currentVideo,this[G].aggressiveMode=t.aggressiveMode,this[G].adSettings=this[G].adSettings||{},this[G].adSettings.timeout=t.timeout||{},this[G].adSettings.adStrategy=t.adStrategy||b.default.Gp,this[G].adSettings.companions=e||this[G].adSettings.companions,this[G].adSettings.skipSettings=t.skipSettings||{},this[G].adSettings.asids=t.asids,this[G].adSettings.aeg=t.aeg,this[G].adSettings.podSize=t.podSize,this[G].adSettings.prerollInterleave=t.prerollInterleave,this[G].adSettings.domainOptimisation=t.domainOptimisation,this[G].adSettings.chromeHackPreinitialisation=t.chromeHackPreinitialisation,this[G].adSettings.publisherPayout=t.publisherPayout,this[G].adSettings.isBrandedContent=t.isBrandedContent,this[G].adSettings.clickThroughUrl=t.clickThroughUrl,this[K]=t.fakeViewability,this[G].GDPRData=t.GDPRData,this[G].isEU=!1!==t.isEU},t.prototype.zE=function(){var t=this,e=new u.default(this[G]),n=A.default.uk(),i=new l.default(e,this[G].overrideUrls),p=void 0,b=new x.default;this[V]&&1<this[V].length?(p=this[V][0].parentElement||this[V][0],b.Ju(this[V][0]),b.VE(this[V][1])):p=this[Y];var T=U.default.vf()||window;return this[F].Pb(S.default.X,e).Pb(S.default.Re,n).Pb(S.default.Ha,i).Pb(S.default.Xe,b).Pb(S.default.ya,new j.default(this[Y])).Pb(S.default.Ga,this[H]).Pb(S.default.wd,p).Pb(S.default.ul,new R.default(T)).oa(S.default.Qb,a.default).oa(S.default.Kl,E.default).oa(S.default.ac,c.default).oa(S.default.na,d.default).oa(S.default.Lg,s.default).oa(S.default.bc,C.default).oa(S.default.vd,w.default).oa(S.default.za,I.default).oa(S.default.Yf,f.default).oa(S.default.Ua,o.default).oa(S.default.Tf,y.default).oa(S.default.mb,m.default).oa(S.default.Mf,_.default).oa(S.default.vj,v.default).oa(S.default.bh,g.default),this[K]?this[F].oa(S.default.Tb,(0,h.default)(O.default)).oa(S.default.Vg,(0,h.default)(L.default)).oa(S.default.Ya,(0,h.default)(N.default)):this[F].oa(S.default.Tb,O.default).oa(S.default.Vg,L.default).oa(S.default.Ya,N.default),this[F].Du([S.default.na,S.default.Ua,S.default.Tf,S.default.bh,S.default.Kl]).then(function(e){var n=(e=r(e,2))[0];return n.JE(e[1]),t[G].currentVideo&&n.QE(t[G].currentVideo),t[F]})},t.prototype.ka=function(){return this[F]},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){t=new t(this),this[H][t.getType()]=t}function o(t){var e=this;return vt.debug("prepareAdConfig",t),t.filter(function(t){return t.Rs(e[ht])}).map(function(t){return t.prepare(e.Rd(),e[ht])})}function s(t,e,n){vt.debug("resumePlayer"),clearTimeout(this[G]),this[X]=0,this[J].reset(),this[et].Z(),this[z]=this[W].pe,(0,A.Dk)(this[ht])&&(t={adPodsPlayed:this[Q],engineErrors:e,reason:t,vastError:n},this[Z]?(this.dispatchEvent(new T.default(T.default.od,this[ht],t)),this[Z]=!1):this.dispatchEvent(new T.default(T.default.lp,this[ht],t)))}function a(){var t=this[Y].Kh(this[ht]);t=o.call(this,t),this[ot]=t,vt.debug("onAdEntriesReceived",t),0<t.length?this[J].AD()?this.Jo():(this[J].reset(),this[J].load(t,this.Jo.bind(this))):s.call(this)}function u(t,e,n){vt.debug("runNextOrResume"),this[ht]!==p.default.fb&&0<this[z]&&this.Mn()&&this[it]?(t=this[Y].Kh(this[ht]),vt.debug("runWaterfall",t),t.length?a.call(this,{entries:t}):(this[it]=!1,m.default.group(m.default.Da(this[tt],O.default.Se,a.bind(this)),m.default.Da(this[tt],O.default.LOADED,a.bind(this))),this[Y].yu(this[ht]))):(this[lt]&&this[lt](t?{lk:e,error:t,rc:n}:void 0),s.call(this,t,e,n))}function l(t){if(vt.debug("runnerCompleteHandler",t),t&&t.data&&t.data.error){var e=t.data.error,n=t.data.lk;t=t.data.rc;var i=this[Y].Kh(this[ht]);this[ot]=o.call(this,i),this[J].reset(),vt.warn("on ad group failed:",e,this[ot]),this[ot].length&&this.Mn()&&this[$].Pd()!==g.default.Yg?(e=this[lt]||this[J].ld.bind(this[J]),this[J].load(this[ot],e)):u.call(this,h.default.tv,n,t)}else this[it]=!0,--this[z],u.call(this)}function c(){this.stop(),s.call(this)}function d(t,e){var n=this[Y].Kh(this[ht]);vt.debug("onAdsLoaded",n),this[ft]=e.IC();var i=e.xC();i&&(this[W].pe=i,this[z]=this[W].pe),this[K]=0,this[Q]=0,this[ot]=o.call(this,n||[]),this[st]&&this[st].pause(),t&&t({ng:e.data.ng,entries:this[ot],Kk:e.data.Kk,lI:this[ft],rc:e.data.rc})}Object.defineProperty(e,"__esModule",{value:!0});var h=i(n(287)),p=i(n(22)),f=i(n(2)),_=i(n(27)),m=i(n(10)),y=i(n(192)),v=i(n(3)),g=i(n(56)),E=i(n(134)),b=i(n(61)),A=n(194),S=i(n(288)),T=i(n(12)),I=i(n(298)),C=i(n(303)),R=i(n(88)),P=i(n(305)),L=i(n(306)),O=i(n(87)),w=i(n(377)),M=i(n(382)),D=i(n(384)),N=i(n(395)),k=i(n(399)),B=i(n(404)),x=i(n(406)),U=i(n(408)),j=i(n(142)),F=Symbol(),V=Symbol(),H=Symbol(),G=Symbol(),Y=Symbol(),K=Symbol(),q=Symbol(),W=Symbol(),z=Symbol(),X=Symbol(),Q=Symbol(),J=Symbol(),Z=Symbol(),$=Symbol(),tt=Symbol(),et=Symbol(),nt=Symbol(),it=Symbol(),rt=Symbol(),ot=Symbol(),st=Symbol(),at=Symbol(),ut=Symbol(),lt=Symbol(),ct=Symbol(),dt=Symbol(),ht=Symbol(),pt=Symbol(),ft=Symbol(),_t=Symbol(),mt=Symbol(),yt=Symbol(),vt=v.default.I("AdSystem"),gt=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[V]=e[f.default.ya],this[_t]=e[f.default.Lg],this[$]=e[f.default.X],this[rt]=e[f.default.Sb],this[W]=e[f.default.Qb],this[tt]=e[f.default.za],this[dt]=e[f.default.Yf],this[yt]=e[f.default.na],this[z]=0,this[X]=0,this[K]=0,this[ct]=0,this[pt]=0,this[Q]=0,this[H]={},this[it]=!1,this[nt]=!1,this[et]=new y.default,this[ot]=[],this[q]=new P.default(this),this[rt].oa(f.default.Ti,w.default).oa(f.default.Ol,x.default).oa(f.default.zl,k.default).oa(f.default.tl,M.default).Pb(f.default.gl,this[q]),this[Y]=this[rt].Wb(S.default),this[$].kD()||(0,U.default)(),vt.debug("setup"),this.addEventListener(T.default.ae,function(){this[X]+=1}.bind(this)),this.addEventListener(T.default.Fa,function(){clearTimeout(this[G]),this[Q]+=1}.bind(this)),this.addEventListener(T.default.ui,function(t){this[F]=t.ta()}.bind(this)),this.addEventListener(T.default.Yc,function(t){this[F]=t.qg}.bind(this)),this.addEventListener(T.default.Pe,function(t){this[pt]=t.data.muted?0:t.data.volume}.bind(this)),this.addEventListener(R.default.LINEAR_CHANGE,function(t){t.data.isLinear||(1>=this.dC()?this.dispatchEvent(T.default.Of,t):this.XD())}.bind(this)),this[_t].LE(this[W]),this[_t].Vz(),this[J]=new C.default(this,this[Y]),this[J].setVolume(this[pt]),this[J].addEventListener(_.default.Va,l.bind(this)),this[z]=this[W].pe,r.call(this,j.default),r.call(this,L.default),r.call(this,N.default),r.call(this,B.default),r.call(this,D.default)}return t.prototype.load=function(t,e){this.Xn(t,this.fu.bind(this,null,e,null))},t.prototype.fu=function(t,e,n){var i=this;n&&(n===this[ht]?(this[z]=this[W].pe,this[Q]=0):this[ht]=n),this[st]&&this[st].resume(),this[mt]=e,t&&(this[Y].IE(t),this[ot]=o.call(this,this[Y].Kh(this[ht]))),this[lt]||(this[lt]=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};i[mt]&&i[mt](t),i[lt]=null,i[mt]=null}),0<this[ot].length?this[J].load(this[ot],this[lt]):this[lt]&&this[lt]()},t.prototype.Xn=function(t,e){var n=this;t=t||{},vt.debug("Load ads",t),this[lt]=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};n[st]&&n[st].ck(),t.timings=n[ft],n[mt]&&n[mt](t),n[lt]=null,n[mt]=null},this[ht]=t.type,this[ot]=[],this[ht]===p.default.gb&&0!=this[ct]++%this[W].Pz?e():(t.preloadedConfig&&function(t){t.pid&&this[$].XE(t.pid),t.bcid&&this[$].ME(t.bcid),t.vid&&this[yt].RE(t.vid)}.call(this,t.preloadedConfig),m.default.group(m.default.Da(this[tt],O.default.Se,d.bind(this,e)),m.default.Da(this[tt],O.default.LOADED,d.bind(this,e))),this[Y].yu(this[ht],t.originalTime,t.preloadedConfig),clearTimeout(this[G]),clearTimeout(this[st]),0<(e=this[W].PD)&&(this[G]=setTimeout(c.bind(this),e)),t.loadTimeLimit&&this[ht]===p.default.gb&&(this[st]=new E.default(function(){this.dispatchEvent(new T.default(T.default.od,this[ht]))}.bind(this),t.loadTimeLimit,!0)),t=this[W].nA,this[$].So(t),t&&this[rt].resolve(f.default.Ti))},t.prototype.Jo=function(){vt.info("Start ads",this[ot],"of type",this[ht]),this[Z]=!0,0<this[ot].length?(vt.debug("blockPlayer"),(0,A.Dk)(this[ht])&&(this.dispatchEvent(new T.default(T.default.bp,this[ht])),this[et].wb(m.default.Da(this,T.default.Fa,this.dispatchEvent.bind(this,new T.default(T.default.hv,this[ht]))))),this[J].ld()):(vt.info("No ads to start - resume content"),s.call(this,h.default.Tw))},t.prototype.ru=function(){vt.debug("Pause Ads"),this[J].pause()},t.prototype.isPlaying=function(){return!this[J].Sc()},t.prototype.CE=function(){vt.debug("Resume Ads"),this[J].resume()},t.prototype.setVolume=function(t){vt.debug("Set Volume",t),this[pt]=t,this[J].setVolume(this[pt])},t.prototype.mute=function(t){vt.debug("Mute"),t?(this[ut]=this[pt],this.setVolume(0)):0<this[ut]?this.setVolume(this[ut]):0===this[pt]&&this.setVolume(1)},t.prototype.isMuted=function(){return!this[pt]},t.prototype.getDuration=function(){return this[J].getDuration()},t.prototype.Lb=function(){return this[J].Lb()},t.prototype.getAdSkippableState=function(){return this[J].getAdSkippableState()},t.prototype.getVolume=function(){return this[pt]},t.prototype.EB=function(){return this.Ld().Jb},t.prototype.Sd=function(){return this[J].Sd()},t.prototype.Ta=function(){return this[J].Ta()},t.prototype.stop=function(){vt.debug("stop"),this[lt]=null,this[mt]=null,this[J]&&this[J].stop()},t.prototype.skip=function(){vt.debug("skip"),this.dispatchEvent(new b.default(b.default.kb,{Ns:"skipAhead"})),this[J].skip(),this.dispatchEvent(new T.default(T.default.Qf,this[ht]))},t.prototype.Rd=function(){return this[at]||(this[at]=new I.default(this,this[W])),this[at]},t.prototype.XD=function(){this[J].stop(),l.call(this)},t.prototype.dC=function(){return this[z]},t.prototype.rB=function(){return this[X]},t.prototype.Ld=function(){return this[W]},t.prototype.gB=function(t){return this[H][t]},t.prototype.Mn=function(){return this[Q]<this[W].pe},t.prototype.wt=function(){return this[V].GB()},t.prototype.resize=function(){this.dispatchEvent(R.default.Wf)},t.prototype.ka=function(){return this[rt]},t.prototype.ta=function(){return this[F]},t.prototype.getTimeLog=function(){return this[q].gC()},t.prototype.addEventListener=function(t,e,n){this[tt].addEventListener(t,e,n)},t.prototype.removeEventListener=function(t,e){this[tt].removeEventListener(t,e)},t.prototype.dispatchEvent=function(){this[tt].dispatchEvent.apply(this[tt],arguments)},t.prototype.invokeAdMethod=function(t,e){this.dispatchEvent(R.default.mq,{data:e,name:t})},t.prototype.getAdCompanions=function(){return this[J].getAdCompanions()},t.prototype.getCurrentTime=function(){return this[J].getCurrentTime()},t}();e.default=gt,gt.W=[f.default.Sb,f.default.Lg,f.default.X,f.default.za,f.default.Qb,f.default.ya,f.default.Tf,f.default.mb,f.default.Ha,f.default.ac,f.default.vd,f.default.bc,f.default.Ya,f.default.Tb,f.default.Yf,f.default.na]},function(t,e,n){var i=n(1)(i||{},{g:{Gi:{}}});i.g.Gi={Tw:"NO_ADS",tv:"AD_GROUP_FAILED"},e.vdb={g:{Gi:i.g.Gi}},e.default=i.g.Gi,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];m.debug("init ad pools with ad groups",e),this[y]=[],e.forEach(function(e){var n=[];e.forEach(function(t){var e=new c.default(t);e.ce="aem_"+I++,t.forEach(function(t){return t.ce=e.ce}),n.push(e)}),t[y].push(n)}),m.debug("Created Ad Pools",this[y])}function o(t){r.call(this),this[E].dispatchEvent(new h.default(h.default.Se,{error:t,rc:f.default.qv}))}function s(t,e){try{var n=this[T].parse(t,e),i=new h.default(h.default.LOADED,n,e,t&&t.timings,t&&t.podSize);r.call(this,i.data.ng),this[E].dispatchEvent(i)}catch(t){o.call(this)}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(t=n(100)),u=i(t=n(2));t=i(t=n(3));var l=n(289),c=i(l),d=i(l=n(61)),h=i(l=n(87)),p=i(l=n(291)),f=i(l=n(25)),_=i(n=n(294)),m=t.default.I("AdEntriesManager"),y=Symbol(),v=Symbol(),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=1;n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[E]=e[u.default.za],this[v]=e[u.default.Qb],this[g]=e[u.default.X],e=e[u.default.Sb],this[S]=e.Wb(_.default),this[T]=e.Wb(p.default),this[A]=this[S].Vs(this[v].og),this[y]=[],this[b]={}}return t.prototype.release=function(t){if(!(this[v].sf&&0<this[v].sf.length)){for(var e=0;e<this[y].length;e++){for(var n=this[y][e],i=0;i<n.length;i++){var r=n[i];if(r.ce===t.ce)return r.release(t),void(0===r.size()&&(m.debug("Remove empty pool",r),n.splice(i,1)))}0===n.length&&(m.debug("Remove empty ad pools",n),this[y].splice(e,1))}m.warn("Unable to release entry because pool doesn't exist",t,this[y])}},t.prototype.yu=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;this[E].dispatchEvent(new d.default(d.default.el,{type:t}));var i=this[g].vk().aegOverride;this[v].sf&&0<this[v].sf.length?(n=new h.default(h.default.LOADED,{ng:[this[v].sf]},t),r.call(this,n.data.ng),this[E].dispatchEvent(n)):n?n.schema?(this[v].og=a.default.Hp,this[A]=this[S].Vs(this[v].og),s.call(this,this[A].vo(n,t),t)):s.call(this,n,t):i&&i.replace?s.call(this,{aeg:[]},t):(m.debug("receive ad entries"),function(t,e){var n=this;this[y]=[],this[E].dispatchEvent(new h.default(h.default.LOADING,{ng:this[v].sf,og:this[v].og,type:t})),this[A].load(t,e).then(function(e){return s.call(n,e,t)},o.bind(this))}.call(this,t,e))},t.prototype.hu=function(t){(t=t&&t.ce&&t.ff?t.ce+"."+t.ff:null)&&(this[b][t]=t)},t.prototype.Kh=function(t){(function(){this[y]=this[y].filter(function(t){return 0<t.length});for(var t=0;t<this[y].length;t++)this[y][t]=this[y][t].filter(function(t){return 0<t.size()})}).call(this),function(){var t=this;this[y]=this[y].filter(function(t){return 0<t.length});for(var e=0;e<this[y].length;e++)this[y][e]=this[y][e].filter(function(e){return 0<e.getEntries().filter(function(e){return!t[b][e&&e.ce&&e.ff?e.ce+"."+e.ff:null]}).length})}.call(this);var e=(this[y][0]||[]).filter(function(e){return e.getEntries().filter(function(e){return e.Rs(t)})});return e[0]&&e[0].getEntries()||[]},t.prototype.IE=function(t){r.call(this,[t])},t}(),e.default=n,n.W=[u.default.za,u.default.Qb,u.default.Ha,u.default.X,u.default.Sb]},function(t,e,n){var i=n(1)(i||{},{Ve:{},Ma:{},log:{}});i.Ma=n(84).vdb.Ma,i.log=n(21).vdb.log,i.Ve=i.Ma.extend(function(){function t(t,e){this.Fd.warn("Unable to release",t,"(Reason: "+e+")")}return{N:function(t,e){if(this._super(),this.Fd=i.log.I(e||"Pool"),t)for(this.ed=t.concat(),this.Fd.debug("Register",this.ed),t=(new Date).getTime(),e=0;e<this.ed.length;e++)this.ed[e]&&(this.ed[e].ff=t+"_"+e)},getEntries:function(){return this.ed||[]},size:function(){return this.ed.length},Rc:function(){return 0===this.size()},addEventListener:function(t,e){this._super(t,e),t===i.Ve.Event.Tq&&this.Rc()&&this.Nj(t,[this],e)},release:function(e){if(e)if(e.ff){for(var n=0;n<this.ed.length;n++)if(this.ed[n].ff===e.ff)return e=this.ed.splice(n,1),this.Fd.debug("Released",e,"pool",this.ed),void(this.Rc()&&this.dispatchEvent(i.Ve.Event.Tq,this));t.call(this,e,"not found")}else t.call(this,e,"entry w/o pool key");else t.call(this,e,"invalid entry value")}}}()),i.Ve.Event={Tq:"Pool.Released.All"},e.vdb={Ve:i.Ve},e.default=i.Ve,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(5));t=function(){function t(e,n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=e,this.data=n}return t.prototype.clone=function(){return new t(this.type,this.data)},t.prototype.toString=function(){return"Event {type='"+this.type+"', data="+i.default.Cf(this.data)},t}(),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=this,i=void 0;i=this[f].sD()?t.aeg&&t.aeg[0]&&[t.aeg[0]]||[]:t.aeg||[],this[b]&&this[b].type.toLowerCase()===e&&(i=this[A].Cg(i)),this[f].HE({audiences:[],utid:this[m]});var r=[];return i.forEach(function(i){var o=[];i.forEach(function(i){try{var r=void 0;i instanceof h.default?r=i:(i.type||(i.type=t.type||e),i.transactionId=n[y],i.adxResult=n[v],i.usid=n[g],i.auid=n[E],n[f].Yt()&&(i.usesShim=!0),r=d.default.parse(i,n[p])),o.push(r)}catch(t){S.error("Error in entry parsing logic: "+t.message)}}),r.push(o)}),r}Object.defineProperty(e,"__esModule",{value:!0});var o=i(t=n(292)),s=i(t=n(195)),a=i(t=n(2)),u=i(t=n(5));t=i(t=n(3));var l=n(22),c=i(l),d=i(l=n(196)),h=i(n=n(135)),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol(),y=Symbol(),v=Symbol(),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=t.default.I("EntriesServerResponseParser");n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[f]=e[a.default.X],this[_]=e[a.default.mb],this[p]=e[a.default.Qb]}return t.prototype.parse=function(t,e){var n=this;if(!u.default.Ce(t))throw Error("Received bad source "+t);this[m]=t.apid,this[y]=t.txid,this[v]=t.adxResult,this[g]=t.usid,this[E]=t.auid,this[b]=this[f].vk().aegOverride,this[A]=new o.default(this[f].pC(s.default.pd)),e=function(t,e){var n=this;return t.map(function(t){return r.call(n,t,e)})}.call(this,t.slots||(t.aeg?[t]:[]),e);var i=t.pods||[];return i.forEach(function(t){t.slots&&t.slots.forEach(function(t){t.aeg=r.call(n,t)})}),0===i.length&&(i=e[0]&&e[0][0]&&e[0][0][0]&&e[0][0][0].getType()||c.default.gb,i=[{slots:[{aeg:e[0],type:i}],type:i}]),{ng:e,Kk:i,source:t}},t}(),e.default=n,n.W=[a.default.X,a.default.Qb]},function(t,e,n){var i=n(1)(i||{},{Cg:{Fi:{}},A:{},log:{},ha:{},u:{}});i.A=n(4).vdb.A,i.log=n(21).vdb.log,i.ha=n(85).vdb.ha,i.u=n(18).vdb.u,i.Cg.Fi=i.A.Class.extend(function(){var t=i.log.I("AEG Overrider");return{N:function(e){t.debug("init"),this.hs={slot:{}},this.xd=[],this.oh=e},Cg:function(t){if(i.u.Rc(this.oh))return t;if(this.xd=t,Array.isArray(this.xd)){this.oh.vendor||(this.oh.vendor=i.ha["aeg.default_vendor"]),0<this.xd.length&&0<this.xd[0].length?(delete(t=this.xd[0][0]).url,delete t.vastXml,this.xd[0][0]=i.u.extend(t,this.oh)):(this.xd[0]=[],this.xd[0].push(this.oh));var e=this.xd}return e}}}()),e.vdb={Cg:{Fi:i.Cg.Fi}},e.default=i.Cg.Fi,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(5));t=i(t=n(3));var o=n(135);o=i(o);var s=i(n=n(136)),a=t.default.I("OverlayAdConfigEntry");n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).Uc=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.clone=function(){var t=new e;return r.default.Za(this,t),t},e.prototype.parse=function(e,n){if(t.prototype.parse.call(this,e,n),e=e.slot||e||{},a.debug("parse, slot:",e),this.Uc=new s.default,this.Uc.Zs=e.delay||1,this.Uc.width=e.width,this.Uc.height=e.height,this.Uc.top=e.top,this.Uc.left=e.left,this.Uc.iu=e.maxShowTime||this.hc.maxLinearShowTime||Number.POSITIVE_INFINITY,this.Uc.position=e.position||s.default.Mq,a.debug("slotInfo",this.Uc),e=this.Uc.position,n=-1!==[s.default.Lq,s.default.Mq,s.default.Nq,s.default.Oq,s.default.Pq,s.default.Il].indexOf(e),a.debug("position support:",e,n),!n)throw Error("Bad overlay slot position: "+e);return this},e}(o.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(2));var r=n(100);r=i(r);var o=n(295),s=i(o);o=i(o=n(296)),n=n(297);var a=new Map([[r.default.Gp,i(n).default],[r.default.Hp,o.default]]),u=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[u]=e}return t.prototype.Vs=function(t){return new(a.get(t)||s.default)(this[u])},t}(),e.default=n,n.W=[t.default.mb,t.default.vd,t.default.Ha]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(137))&&t.__esModule?t:{default:t},n=(n=n(2))&&n.__esModule?n:{default:n},t=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(e){return t.prototype.load.call(this,this.ib.lB(),this.mm.sB(e))},e}(t.default),e.default=t,t.W=[n.default.mb,n.default.vd,n.default.Ha]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){return t===a.default.bd||t===a.default.fb}function o(t){var e=this;this[d]={};var n={};return t.forEach(function(t){var i=t.type;r(i)&&(e[d][i]||(e[d][i]={}),e[d][i][t.time]||(e[d][i][t.time]=[]),e[d][i][t.time].push(t),n[i]||(n[i]=""),n[i]+=t.time+";")}),n}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(137));var s=n(22),a=i(s),u=i(s=n(73));s=i(s=n(2));var l=i(n=n(138)),c=Symbol(),d=Symbol(),h=Symbol(),p=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(e,n){if(this[p]=e,e=this.mm.xn(this[p]),r(this[p])){if((n=this[d][this[p]]&&this[d][this[p]][n]&&this[d][this[p]][n].shift()).calculated)return l.default.resolve(this.vo({schema:{pods:[n]}}));e.schemaId=this[c],e.podId=n.id}return t.prototype.load.call(this,this.ib.mB(),e).then(this.vo.bind(this))},e.prototype.vo=function(t,e){e&&(this[p]=e),(t=t.schema||{}).id&&(this[c]=t.id),t=t.pods||[],function(t){t.forEach(function(t){t.type=u.default.Hm(t.type),t.slots&&t.slots.forEach(function(t){t.type=u.default.Hm(t.type)})})}.call(this,t),function(t){function e(t,e){return t.type===a.default.Qe?1:e.type===a.default.Qe?-1:0}return t.forEach(function(t){t.slots&&t.slots.sort(e)}),t}.call(this,t),e=function(t){var e=this,n=t.filter(function(t){return t.type===e[p]});return t=t.filter(function(t){return t.type!==e[p]&&t.calculated}),n=[].concat.apply([],n.filter(function(t){return t.slots}).map(function(t){return t.slots})),t=[].concat.apply([],t.filter(function(t){return t.slots}).map(function(t){return t.slots})),this[h]=n.length,n.concat(t)}.call(this,t);var n=o.call(this,t),i=this[h];return this[h]=null,{podSize:i,pods:t,slots:e,timings:n}},e}(t.default),e.default=n,n.W=[s.default.mb,s.default.vd,s.default.Ha]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(137))&&t.__esModule?t:{default:t},n=(n=n(2))&&n.__esModule?n:{default:n},t=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(e){return t.prototype.load.call(this,this.ib.nB(),this.mm.xn(e))},e}(t.default),e.default=t,t.W=[n.default.mb,n.default.vd,n.default.Ha]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(299));var r=i(n(140)),o=i(n=n(2)),s=Symbol(),a=Symbol(),u=Symbol();n=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,n.ka(),i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[s]=n,i[a]=n.ka().K(o.default.gl),i[u]=n.ka().K(o.default.X),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.An=function(){var e=this[s].ta();e=e&&e.re||"",t.prototype.An.call(this),this.hb.push(r.default.Zo.concat(this[s].Sd()),r.default.Qp.concat(e),r.default.Ip.concat(this[a].KB()),r.default.Hq.concat(this[a].wC()),r.default.mp.concat(this[a].oB()),r.default.Iq.concat(this[u].Kt()))},e}(t.default),e.default=n},function(t,e,n){var i=n(1)(i||{},{f:{cj:{},Ka:{},qa:{},ob:{},M:{}},u:{},fa:{Pa:{}},A:{},g:{C:{},Db:{}}});i.u=n(18).vdb.u,i.fa.Pa=n(101).vdb.fa.Pa,i.A=n(4).vdb.A,i.g.C=n(19).vdb.g.C,i.g.Db=n(300).vdb.g.Db,i.f.Ka=n(139).vdb.f.Ka,i.f.qa=n(74).vdb.f.qa,i.f.ob=n(302).vdb.f.ob,i.f.M=n(43).vdb.f.M,i.f.cj=i.A.Class.extend(function(){function t(){if(3>arguments.length)return"";var t=arguments[2].replace(/^m\./,""),e=arguments[0];return this.F.Mb(t)||e}function e(){if(3>arguments.length)return"";var t=arguments[2].replace(/^m\./,"");return encodeURIComponent(this.F.Mb(t)||"")}function n(){if(3>arguments.length)return"";var t=arguments[2];return this.Ra&&this.Ra.metadata[t]}var r=i.f.ob,o=i.g.Db,s=i.fa.Pa,a=i.g.C;return{N:function(t,e){this.rb=t,this.hc=e,this.hb=[],this.ca=this.rb.K(a.na),this.F=this.rb.K(a.X),this.fd=this.rb.K(a.Ya),this.le=this.rb.K(a.bc),this.P=this.rb.K(a.ac)},An:function(){this.hb=[],this.Ra=this.ca.Oc();var t=this.ca.pn()||{};if(this.Ra){var e=t.w,n=t.h,r=this.Ra.metadata||{};r=r.duration?Math.round(r.duration/1e3):""}else this.Ra={},e=(n=this.ca.wf()||{}).width,n=n.height,r="";e=parseInt(e,10)||0,n=parseInt(n,10)||0;var a=Math.max(e,n);a=0===a?-1:350>a?1:500>a?2:3;var u=encodeURIComponent(this.F.Mb(s.URL)||i.f.M.Ab(window)),l=i.u.Qt,c=this.F.Et(),d=this.ca.MB(),h=i.f.M.Nt();this.hb.push(o.op.concat(this.F.Jh()&&this.F.Jh().utid||""),o.Ng.concat(this.F.Mb(s.Ng)),o.qp.concat(this.P.iB()),o.sp.concat(this.F.Vh()?1:0),o.Og.concat(this.F.sk()),o.Pg.concat(l(this.F.Mb(s.Pg),0)),o.up.concat(l(this.F.Mb(s.tp),1)),o.vp.concat(this.F.Xm()),o.kl.concat(Math.random().toString(10).substr(2)),o.Dp.concat(n),o.Ep.concat(e),o.Fp.concat(i.f.Ka.Um(this.P.getCurrentTime(),!0,!0)),o.Kp.concat(this.Ra.deRssId),o.Lp.concat(encodeURIComponent(u)),o.Op.concat(this.PB(location.hostname)),o.Pp.concat(location.host),o.Wp.concat(this.le.Xh()?1:0),o.Yp.concat(i.f.qa.Fc()?1:0),o.Tb.concat(this.fd.ua()),o.yq.concat(this.P.isMuted()?1:0),o.Eq.concat(""),o.Zg.concat(this.F.wk()),o.Jq.concat(this.F.Pd()),o.Hl.concat(a),o.Vq.concat(this.Ra.rssVideoId),o.dr.concat((new Date).getTime()),o.fr.concat(encodeURIComponent(h)),o.lr.concat(this.Ra.rH),o.mr.concat(this.Ra.description),o.nr.concat(this.Ra.detailPage),o.pr.concat(r),o.tr.concat(this.Ra.videoUrls&&this.Ra.videoUrls[0]),o.ur.concat(n),o.vr.concat(this.Ra.id),o.wr.concat(this.Ra.keywords),o.yr.concat(t.tH),o.Cr.concat(this.Ra.title),o.Dr.concat(encodeURIComponent(this.Ra.title)),o.Er.concat(u),o.Gr.concat(e),o.Yo.concat(this.fd.ua()),o.Hr.concat(this.fd.xf()),o.Ir.concat(this.fd.xf()),o.Kr.concat(this.F.It().vvuid),o.vq.concat(this.F.vg()?this.F.vg().latitude:""),o.wq.concat(this.F.vg()?this.F.vg().longitude:""),o.oq.concat(this.F.vg()?this.F.vg().ipAddress:""),o.DEPTH.concat(i.f.M.Ft()),o.$g.concat(this.F.Mb(s.$g)||this.F.en()),o.lj.concat(parseInt(100*this.ca.getVolume())),o.Tp.concat(c&&c.euconsent),o.$p.concat(c&&c.gdpr),o.Kq.concat(0<=d?d+1:""),o.pq.concat(c&&c.isOathFirstParty))},resolve:function(i){return this.An(),r.create.apply(null,this.hb).join(r.rf(/(\[MACROS:)(.+?)(\])/g,t.bind(this)).join(r.rf(/(\|MACROS:)(.+?)(\|)/g,t.bind(this))).join(r.rf(/(\[ENC_MACROS:)(.+?)(\])/g,e.bind(this))).join(r.rf(/(\|ENC_MACROS:)(.+?)(\|)/g,e.bind(this)))).join(r.rf(/(\[META:)(.+?)(\])/g,n.bind(this)).join(r.rf(/(\|meta:)(.+?)(\|)/g,n.bind(this)))).resolve(i)},PB:function(t){switch((t=t.split(/\./)).length){case 2:return t.slice(-2)[0];default:return t.slice(-3)[0]}}}}()),e.vdb={f:{cj:i.f.cj}},e.default=i.f.cj,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{Db:{}}});for(var r in i.g.Db={Yo:["[ADAP_VIEWABLE_OPPORTUNITY]"],Zo:["{adNumber}","{adSeq}"],op:["[APID]"],Ng:["[APP_ID]"],qp:["[ASSETURI]"],sp:["|ap|","[AUTOPLAY]","[AUTO_INITIATION]"],Og:["[BCID]","[bcid]"],Pg:["|beoncw|","[BEON_CW]"],up:["|beonvid|","[BEON_VIDEO_ID]"],vp:["[BID]"],kl:["[cachebuster]","[CACHEBUSTER]","[CACHE_BUSTER]","[CACHE_BREAKER]","[CACHEBUSTING]"],Dp:["[container_height]","[CONTAINER_HEIGHT]"],Ep:["[container_width]","[CONTAINER_WIDTH]"],Fp:["[CONTENTPLAYHEAD]"],DEPTH:["[DEPTH]"],Kp:["[DE_RSS_ID]"],Lp:["|DE_URL|","[DE_URL]"],Op:["[DOMAIN_ROOT]"],Pp:["[DOMAIN_NAME]"],Qp:["[ECPM]"],Wp:["[FLASH_SUPPORT]"],Yp:["[P_VW_ACTIVE]","<a.active>"],vq:["[LOCATION_LAT]"],wq:["[LOCATION_LON]"],Tb:["[MOAT_PREBID]"],yq:["|muted|","[MUTED]"],Eq:["[MCC]","[MNC]","[APPNAME]"],Zg:["[PID]"],Jq:["[PLAYER_TYPE]"],gx:["[PLAYER_COMPANY_ID]"],Hl:["[P_VW_SIZE]","<a.psize>","{psize}"],Vq:["[RSS_ID]"],dr:["[timestamp]","[TIMESTAMP]"],fr:["[USER_AGENT]"],lr:["[VIDEO_COMPANY_ID]"],mr:["[VIDEO_DESCRIPTION]","VIDEO_DESCRIPTION"],nr:["[VIDEO_DETAIL_PAGE]","VIDEO_DETAIL_PAGE"],pr:["[VIDEO_DURATION]","VIDEO_DURATION"],tr:["[VIDEO_FILE_URL]"],ur:["[video_height]","[VIDEO_HEIGHT]"],vr:["[VIDEO_ID]","VIDEO_ID"],wr:["[VIDEO_KEYWORDS]","VIDEO_KEYWORDS"],yr:["|%|","[VIDEO_PERCENT]"],Cr:["[VIDEO_TITLE]","VIDEO_TITLE"],Dr:["[VIDEO_TITLE_ENC]"],Er:"VIDEO_URL |URL| [CONTENT_URL] EMBEDDING_PAGE_URL [URL] [A_D_PAGEURL]".split(" "),Gr:["[video_width]","[VIDEO_WIDTH]"],Hr:["[P_VW_VIEWABLE]","<a.viewable>"],Ir:["[P_VW_VIEWABLE_OPPORTUNITY]","<a.viewableOpportunity>"],Kr:["[VVUID]"],$g:["[SID]"],lj:["[SOUND]"],gp:["[AD_DURATION]","{ad_duration}"],ip:["[ERRORCODE]","%5BERRORCODE%5D"],Xo:["{errNo}"],Tp:["[EUCONSENT]","EUCONSENT","[GDPR_CONSENT]"],$p:["[GDPR]","GDPR"],Kq:["[PLAYLIST_SEQUENCE]"],pq:["[OATH_FIRSTPARTY]","OATH_FIRSTPARTY"],oq:["[IP_ADDR]"],Ip:["{creativeLoadTime}"],Hq:["{PlayerInitTime}"],mp:["{adSpotTime}"],Iq:["{playerRev}"]},n={},t=i.g.Db)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r][0]);t.placeholder=n,e.vdb={g:{Db:i.g.Db}},e.default=i.g.Db,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{ke:{}}});i.f.ke={RC:function(t){var e,n,i,r=null,o=null,s=null;return["","webkit","moz","ms","o"].forEach(function(a){e=a?a+"VisibilityState":"visibilityState",n=a?a+"Hidden":"hidden",i=a+"visibilitychange",r||void 0===t[e]||(r=e),o||void 0===t[n]||(o=n),s||void 0===t[n]||(s=i)}),{visibilityState:r,hidden:o,KF:s}}},e.vdb={f:{ke:i.f.ke}},e.default=i.f.ke,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{ob:{},zc:{},Bc:{}},A:{}});i.A=n(4).vdb.A,i.f.zc=n(198).vdb.f.zc,i.f.Bc=n(199).vdb.f.Bc,i.f.ob=i.A.Class.extend({N:function(t){this.hb=t||[]},join:function(t){if(!t)return this;var e=new i.f.ob,n=this;return e.resolve=function(e){return t.resolve(n.resolve(e))},e},resolve:function(t){if(!t)return t;for(var e=0;e<this.hb.length;e++)t=this.hb[e].apply(t);return t}}),function(t){t.create=function(e){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r],s=o.pop();n.push(new i.f.zc(s,o))}return new t(n)},t.rf=function(e,n){return new t([new i.f.Bc(e,n)])},t.eB=function(e,n,i){n=n||"",i=i||"";var r,o=[];for(r in e)e.hasOwnProperty(r)&&o.push([n+r+i,e[r]]);return t.create.apply(null,o)}}(i.f.ob),e.vdb={f:{ob:i.f.ob}},e.default=i.f.ob,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){return this[T].every(function(t){return t.Wh()})}function o(t,e){this[S]!==v.LOADED&&this[S]!==v.Xf&&(this[S]=v.LOADED,function(){var t=this,e=this[A];this[A]=[],e.forEach(function(e){y.debug("Execute deferred function:",e),e.call(t)})}.call(this),t&&t(e.data))}function s(t,e){d.default.Da(t,m.default.Zc,o.bind(this,e)),t.Bs(d.default.bind(t,m.default.Zc,function(t,e){y.debug("adapterReady",t),this[T][0]&&(this[S]===v.Xf&&(this[T][0].Ek()&&(y.debug("run the most priority adapter",t),a.call(this)),-1===this[C]&&a.call(this)),this[g].dispatchEvent(m.default.Zc,e))}.bind(this,t)),d.default.bind(t,m.default.Yc,function(t){var e=t.qg;y.debug("adapterComplete","configEntry",e,"event",t);var n=t.Iz,i=n===this[P];if(i&&(this[P]=null),n.Wh()){var o=t.data&&t.data.lk,s=t.data&&t.data.error&&t.data.error.rc;y.debug("adapterFailed",e,n,i),this[b].hu(e),r.call(this)?l.call(this,"all ads are failed",o,s):this[S]===v.Xf&&i&&(y.info("Engine completed with error."),u.call(this)?(y.info("Trying next engine..."),a.call(this)):this.dispatchEvent(new c.default(c.default.Va,{error:"no alive adapters left"})))}else u.call(this)?this[S]=v.LOADED:(this[S]=v.fc,this.reset()),this.dispatchEvent(new c.default(c.default.Va));this[g].dispatchEvent(m.default.Yc,t)}.bind(this)))}function a(){if(!this[P])for(var t=0;t<this[T].length;t++){var e=this[T][t];if(e.Ek()){t=e,y.debug("runReadyEngineAdapter",t),this[P]=t,this[g].dispatchEvent(m.default.ui,t),t.ld();break}}}function u(){return this[T].some(function(t){return t.BD()||t.Ek()})}function l(t,e,n){y.debug("finish",t),this.stop(),this.dispatchEvent(new c.default(c.default.Va,{lk:e,error:t,rc:n}))}Object.defineProperty(e,"__esModule",{value:!0});var c=i(t=n(27)),d=i(t=n(10));t=i(t=n(3));var h=n(30);h=i(h);var p=n(200),f=i(p),_=i(p=n(304)),m=i(n=n(12)),y=t.default.I("AdsRunner"),v={Ni:"Created",LOADED:"Loaded",Xf:"Running",fc:"Stopped"},g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol();n=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");y.debug("init");var r=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(r=!r||"object"!=typeof r&&"function"!=typeof r?this:r)[g]=n,r[E]=n.Ld(),r[b]=i,r.reset(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.reset=function(){this[A]=[],this[S]=v.Ni,this[T]=[],this[P]=null,this[I]=0,this[C]=-1,this[R]=-1},e.prototype.ld=function(){if(y.debug("run"),this.Zh())l.call(this,"Runner already stopped");else if(this[S]!==v.LOADED){var t=this.ld;y.debug("Register deferred function:",t),this[A].push(t)}else this[S]=v.Xf,this[T][0].Ek()&&(y.debug("run the most priority adapter",this[T][0]),a.call(this)),-1===this[C]&&a.call(this),this[S]!==v.Ni&&(0===this[T].length?l.call(this,"No adapters - finish"):r.call(this)&&l.call(this,"All adapters failed - finish"))},e.prototype.load=function(t,e){var n=this;if(y.debug("load",t),0===t.length)l.call(this,"no ad entries");else{var i=[],r=this[E].Td;t.forEach(function(t){r=Math.max(r,t.dn());var o=t.getAdEngineType(),a=n[g].gB(o);a?(o=a.gk(t),t.hm?i.push(o):(t=new f.default(o,n[E],n[b]),n[T].push(t),s.call(n,t,e))):(y.error("Ignore ad config entry ",t," Unknown ad engine type ",o),n[b].hu(t))}),0<i.length&&(t=new _.default(i,this[E],this[b]),this[T].push(t),s.call(this,t,e)),this[C]=setTimeout(function(){y.debug("softTimeout ("+this[E].If+"s)"),this[C]=-1,this[S]===v.Xf&&(this[T][0].De()?y.info("the most priority adapter is already running"):a.call(this))}.bind(this),this[E].If),this[R]=setTimeout(function(){y.debug("hardTimeout ("+this[E].Td/1e3+"s)"),this[R]=-1,this[S]===v.Xf&&(this[P]||l.call(this,"hard timeout"))}.bind(this),r),this[g].dispatchEvent(m.default.hp,this[T]),this[T].forEach(function(t){void 0!==n[I]&&t.setVolume(n[I]),t.load()})}},e.prototype.stop=function(){y.debug("stop"),this[S]=v.fc,this[T].forEach(function(t){return t.stop()})},e.prototype.skip=function(){this[P]?this[P].skip():this[T][0]&&this[T][0].skip()},e.prototype.pause=function(){this[T].forEach(function(t){return t.pause()})},e.prototype.Sc=function(){if(this[P])return this[P].Sc()},e.prototype.resume=function(){this[T].forEach(function(t){t.De()&&t.resume()})},e.prototype.setVolume=function(t){this[I]=t,this[T].forEach(function(e){return e.setVolume(t)})},e.prototype.getDuration=function(){if(this[P])return this[P].getDuration()},e.prototype.Lb=function(){if(this[P])return this[P].Lb()},e.prototype.getAdSkippableState=function(){if(this[P])return this[P].getAdSkippableState()},e.prototype.Sd=function(){if(this[P])return this[P].Sd()},e.prototype.getCurrentTime=function(){if(this[P])return this[P].getCurrentTime()},e.prototype.Ta=function(){if(this[P])return this[P].Ta()},e.prototype.Zh=function(){return this[S]===v.fc},e.prototype.AD=function(){return this[S]===v.LOADED},e.prototype.getAdCompanions=function(){var t="";return this[T].forEach(function(e){e=e.getAdCompanions(),t||(t=e)}),t},e}(h.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=this[p].filter(function(e){return e.Go===t})[0];return(e=e&&e.MD)||(e=u.default.empty(),this[p].push({MD:e,Go:t})),e}function o(t){s.call(this,t),r.call(this,t).link(u.default.bind(t,d.default.Fa,function(t){var e=this,n=this[f].indexOf(t),i=t.ta();h.debug("Winner shim is "+(i?i.getName():"undefined")+". Killing others."),(i=this[f].concat()).splice(n,1),i.forEach(function(t){s.call(e,t),t.stop()}),this[f]=[t]}.bind(this,t)),u.default.bind(t,d.default.Yc,this.bF.bind(this,t))),t.ld()}function s(t){r.call(this,t).Z(),this[p]=this[p].filter(function(e){return e.Go!==t})}function a(t){s.call(this,t),-1!==(t=this[f].indexOf(t))&&this[f].splice(t,1)}Object.defineProperty(e,"__esModule",{value:!0});var u=i(t=n(10));t=i(t=n(3));var l=n(200),c=i(l);l=i(l=n(201));var d=i(n=n(12)),h=t.default.I("MassiveAdEngineAdapter"),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol();n=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this));return o[f]=[],o[p]=[],o[_]=[],n.forEach(function(t){return o[f].push(new c.default(t,i,r))}),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){var e=this;t.prototype.load.call(this),this[_]=[],this[f].concat().forEach(function(t){r.call(e,t).link(u.default.bind(t,d.default.Zc,e.ready.bind(e,t)),u.default.bind(t,d.default.Yc,e.cF.bind(e,t))),t.load()})},e.prototype.ld=function(){var e=this;t.prototype.ld.call(this),this[_].forEach(function(t){return o.call(e,t)}),this[_]=[]},e.prototype.ready=function(e,n){this[m]||(this[m]=!0,t.prototype.ready.call(this),this.dispatchEvent(n)),this.De()?o.call(this,e):this[_].push(e)},e.prototype.cF=function(e,n){a.call(this,e),0===this[f].length&&(t.prototype.complete.call(this,!0),n.qg=e.ta(),this.dispatchEvent(n))},e.prototype.bF=function(e,n){a.call(this,e),0===this[f].length&&(t.prototype.complete.call(this,e.Wh()),n.qg=e.ta(),this.dispatchEvent(n))},e.prototype.stop=function(){var e=this;this.Zt()||this.Wh()||this.Zh()||(t.prototype.stop.call(this),this[f]=[],this[p].forEach(function(t){(t=t.Go).stop(),s.call(e,t)}))},e.prototype.skip=function(){t.prototype.skip.call(this),this[f].forEach(function(t){return t.skip()})},e.prototype.pause=function(){t.prototype.pause.call(this),this[f].forEach(function(t){return t.pause()})},e.prototype.resume=function(){t.prototype.resume.call(this),this[f].forEach(function(t){return t.resume()})},e.prototype.setVolume=function(e){t.prototype.setVolume.call(this),this.De()&&this[f].forEach(function(t){return t.setVolume(e)})},e.prototype.getDuration=function(){return 0<this[f].length?this[f][0].getDuration():t.prototype.getDuration.call(this)},e.prototype.Lb=function(){return 0<this[f].length?this[f][0].Lb():t.prototype.Lb.call(this)},e.prototype.getCurrentTime=function(){return 0<this[f].length?this[f][0].getCurrentTime():t.prototype.getCurrentTime.call(this)},e.prototype.getAdSkippableState=function(){return 0<this[f].length&&"function"==typeof this[f][0].getAdSkippableState?this[f][0].getAdSkippableState():t.prototype.getAdSkippableState.call(this)},e.prototype.Sc=function(){return 0<this[f].length?this[f][0].Sc():t.prototype.Sc.call(this)},e.prototype.ta=function(){return 0<this[f].length?this[f][0].ta():t.prototype.ta.call(this)},e.prototype.Ta=function(){return 0<this[f].length?this[f][0].Ta():t.prototype.Ta.call(this)},e}(l.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this;this[A].addEventListener(p.default.LOADING,s.bind(this)),this[A].addEventListener(p.default.LOADED,a.bind(this,"LOADED")),this[A].addEventListener(p.default.Se,a.bind(this,"FAILED")),this[A].addEventListener(y.default.ui,u.bind(this)),this[A].addEventListener(y.default.Fa,o.bind(this)),this[A].addEventListener(y.default.od,o.bind(this)),this[A].addEventListener(y.default.hp,function(e){t[g]||s.call(t),t[E]&&!t[E].end&&u.call(t),t[E]={ads:[],duration:null,end:null,label:"aegGroup",start:+new Date},t[g].adGroups.push(t[E]),function(t){var e=this;t.forEach(function(t){var n=function(t){var e="",n="",i="",r="",o="",s="";return(t=t.ta())&&(e=t.getAcid(),n=t.getType(),i=t.getVendor(),r=t.getName(),s=t.getRuleId(),o=t.getAsid()),n={adChain:[],adMediaFiles:[],duration:null,end:null,name:r,start:+new Date,type:n,vendor:i},s&&(n.rid=s),e&&(n.acid=e),o&&(n.asid=o),this[b].push({ad:n,$a:t}),this[E].ads.push(n),n}.call(e,t);t.addEventListener(y.default.Zc,function(){n.end=+new Date,n.duration=n.end-n.start}),t.addEventListener(y.default.Yc,function(){n.complete=+new Date})})}.call(t,e)}),this[A].addEventListener(h.hr,function(e){e=e.data;var n=l.call(t,e.ad);n&&n.adChain.push({duration:null,end:null,start:+new Date,url:e.url})}),this[A].addEventListener(h.ir,function(e){e=e.data,d.default.Da(e.ad,_.default.La,function(t,e){var n=l.call(this,t.$a);if(n){var i=n.adChain;if(0<i.length){var r=void 0;r=e.data.error.code===m.default.sj.code&&e.data.se?e.data.se:e.data.error.description+" "+e.data.se;var o=void 0;t.Yu?i.forEach(function(e){e.url===t.Yu&&(o=e)}):o=i[i.length-1],o.error=r,0<(e=n.adMediaFiles).length&&(e[e.length-1].error=r)}}}.bind(t,e))}),this[A].addEventListener(h.gr,function(e){(e=(e=l.call(t,e.data.ad))&&e.adChain||[]).length&&((e=e[e.length-1]).end=+new Date,e.duration=e.end-e.start)}),this[A].addEventListener(f.default.kp,function(e){e=e.data;var n=l.call(t,e.ad);n&&(t[S]={duration:null,end:null,start:+new Date,url:e.url},n.adMediaFiles.push(t[S]))})}function o(t){this[v].adStartTime||(this[v].startAdTime=+new Date,this[v].adStartTime=this[v].startAdTime-this[v].initTime,u.call(this),t&&t.data&&(t=l.call(this,t.data.ad))&&t.adMediaFiles.length&&((t=t.adMediaFiles[t.adMediaFiles.length-1]).end=this[v].startAdTime?this[v].startAdTime:+new Date,t.duration=t.end-t.start))}function s(t){var e=t&&t.data||{};return this[g]&&!this[g].adServerResponse&&a.call(this,"FAILED",t),this[g]={adGroups:[],adStrategy:e.og,duration:null,end:null,label:"adServerRequest",requestUrl:null,start:+new Date,type:e.type},this[v].adServerRequests.push(this[g]),this[g]}function a(t,e){this[g]||s.call(this);var n=this[g];n.end&&n.status||(n.end=+new Date,n.duration=n.end-n.start,n.requestUrl=e&&e.data&&e.data.ZH||null,n.status=t,"FAILED"===t&&(t="Failed ad server response",e&&e.data&&e.data.error&&e.data.error.Oo&&(t="Ad server response timeout: "+e.data.error.request.timeout+"ms"),n.error=t))}function u(){this[E]&&(this[E].end=+new Date,this[E].duration=this[E].end-this[E].start)}function l(t){var e=this[b].filter(function(e){return e.$a===t}).slice(-1);return(e=c(e,1)[0])&&e.ad||null}Object.defineProperty(e,"__esModule",{value:!0});var c=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},d=i(n(10)),h=n(89),p=i(n(87)),f=i(n(51)),_=i(n(17)),m=i(n(25)),y=i(n=n(12)),v=Symbol(),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[v]={adServerRequests:[],adStartTime:null,initTime:+new Date,startAdTime:null},this[g]=null,this[E]=null,this[b]=[],this[A]=e,r.call(this)}return t.prototype.gC=function(){return this[v]},t.prototype.KB=function(){return this[S]?this[S].end-this[S].start:0},t.prototype.wC=function(){return 0<this[v].adServerRequests.length?this[v].adServerRequests[0].start-this[v].initTime:0},t.prototype.oB=function(){return this[v].adStartTime||0},t}(),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=(t=n(72))&&t.__esModule?t:{default:t};n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.getType=function(){return i.default.Rp},e}(((n=n(142))&&n.__esModule?n:{default:n}).default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(89))&&t.__esModule?t:{default:t};var i=(n=n(202))&&n.__esModule?n:{default:n},r=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=n.ad;if(delete n.ad,n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[r]=i,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){this.Bn(),this.Kg();var t=new i.default;t.ads=this[r]||[],this.Eg(t)},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){return t&&t.__esModule?t:{default:t}}(n(89));var i=Symbol();t=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var r=n.ad;if(delete n.ad,n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[i]=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){this.Bn(),this.Kg(),this.qu(this[i])},e}(t.default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=this;t.addEventListener(F.default.pl,this.dispatchEvent.bind(this)),t.addEventListener(F.default.Fa,this.dispatchEvent.bind(this)),t.addEventListener(F.default.qd,function(t){tt.warn("VAST error occurred in ad",t)}.bind(this,t)),t.Ck(this.H.getVolume()),t.sb&&t.sb.Ae&&t.sb.Ae.forEach(function(n){return new O.default(n,e.P,e[ut]).dF(t)})}function o(t){var e=this;tt.debug("prepareCreatives",t),function(t){var e=this;tt.debug("instrumentAd",t),nt.forEach(function(n){return t.addEventListener(n,s.bind(e))}),t.addEventListener(V.default.kb,function(t){return e.wm(t.ve())}),t.addEventListener(j.default.Zf,function(t){var n=it[t.nd];n&&e.va(n,t.data)}),t.addEventListener(H.default.Li,function(t,e){var n=this;if(tt.debug("showCompanions",e),!(1<this[At].length))for(var i={};e;)this[rt].forEach(function(o){var a=o.parent;if(!i[a])for(var u=0;u<e.dk.length;u++){var l=e.dk[u],c=d(o,l.fk);if(c){t.addEventListener(G.default.Mi,s.bind(n)),o=new L.default(t,l,c,o,n.H,n),n.dispatchEvent(new v.default(F.default.Bp)),t.dispatchEvent(new V.default(B.default.Sf,l)),n.uE(),n[St]=h.bind(n,o),o.addEventListener(F.default.qd,n[St]),o.addEventListener(F.default.Yb,n[St]),o.addEventListener(F.default.vi,n[St]),r.call(n,o),n[At].push(o),i[a]=!0;break}}}),e=e.At()}.bind(this,t))}.call(this,t),this.ad=t,this[ft]=[],this[vt]=[],this[Tt]=[],this.ad.yb.forEach(function(t){tt.debug("prepareCreatives","creative",t),t instanceof x.default?e[ft].push(t):t instanceof U.default?e[vt].push(t):t instanceof k.default&&e[Tt].push(t)}),this.ad.zu(this[lt],{Ez:this.Lb()},this[It].Vh())}function s(t){this[lt].ki(t,this.O)}function a(){var t=this[At][0];if(tt.debug("displayOverlay",t),this[gt].ck(),t){t.addEventListener(F.default.Va,f.bind(this)),t.addEventListener(F.default.Fa,this.Wj.bind(this,F.default.Fa,t)),t.addEventListener(F.default.Va,function(){this.Ee(m.default.STARTED)?this.va(m.default.FINISHED):this.va(m.default.Ug)}.bind(this)),t.addEventListener(F.default.sc,function(t){this.Kb(R.default.sc,{action:t.data})}.bind(this)),r.call(this,t);var e=t.Hc.iu;isNaN(e)&&(e=t.ia.ju),t=this[It].Pd()===Z.default.ah,e===Number.POSITIVE_INFINITY||t||(e=1e3*(isNaN(e)?15:e),this[gt].ni(p.bind(this),e))}}function u(t){var e=this;this.Ee(m.default.STARTED)?this[at].Me("ad",null,"ad failed after start"):this[ot].sg(V.default.La,{error:t}),this.Rj=null,this[ct]++;var n=this[bt].Ct(),i=n||this[bt];if(this[bt].qC(n).forEach(function(n){var i=new V.default(V.default.La,null,null,{error:t});n.dispatchEvent(i),e[lt].ki(i)}),i){if(n=0,-1===this.hc.pe)for(var r=0;r<i.ads.length;r++)if(i.ads[r]&&!i.ads[r].oc){n=r;break}if(r=i.ads[n])return this[bt]=i,r.Fk?function(t){this.Vb.Kg(),this.Vb.kE(this[bt],t)}.call(this,n):(this[bt].ads.splice(n,1),tt.debug("showNextLinearCreative","show failover ad"),o.call(this,r),this.Ig(),l.call(this)),!0}return this.Ee(m.default.LOADED)&&!this.Ee(m.default.STARTED)&&this.va(m.default.Ug),!1}function l(){var t=this;if(tt.debug("showFirstLinearCreative",this[ft]),0===this[ft].length)if(this.ad){this[ot]=new M.default(this.Hb,this.ad,{},this.O,this.H,this.P,this);var e=z.default.Xw;u.call(this,e)||(this.Gf(new X.default(e.description,null,null,e)),this.complete())}else this.complete();else if(this.jc=null,this[st]=this[ft].shift(),this.ad.dispatchEvent(new V.default(B.default.LOADED,this[st])),this[pt]?this[pt]=!1:this.Uj(),e=function(){var t=this.J.offsetWidth,e=this.J.offsetHeight;return 0===t&&(this.J.style.width="100%",t=this.J.offsetWidth),0===e&&(this.J.style.height="100%",e=this.J.offsetHeight),{height:e,width:t}}.call(this),this[mt]=w.default.Eu(e.width,e.height,this[st].ei,this[dt].Xh()),this[mt]){this[_t]=this[mt][0],function(){var t=this;tt.debug("prepareExtensions",this.ad),this.ad.tf.forEach(function(e){tt.debug("prepare extension",e),e.prepare(t)})}.call(this),this.H.dispatchEvent(new v.default(F.default.kp,{ad:this.O,url:this[_t].url}));var n=new M.default(this.Hb,this.ad,this[st],this.O,this.H,this.P,this).Zu(this[mt]);this[ot]=n,this.bg&&(this.bg.Z(),this.bg=null),this.bg=g.default.group(g.default.bind(n,C.default.rj,function(t){t=t.Au,this.Hb&&(t=Math.min(this.Hb.Lk(),t)),t=new C.default(t),this.dispatchEvent(t),this.H.dispatchEvent(t)}.bind(this)),g.default.bind(n,F.default.Va,function(e){return f.call(t,n,e)}),g.default.bind(n,R.default.Of,function(t){tt.debug("received linear change event",t),t.data.isLinear||this.va(m.default.ej),this.H.dispatchEvent(K.default.LINEAR_CHANGE,t)}.bind(this)),g.default.bind(n,F.default.vc,this.Ak.bind(this)),g.default.bind(n,F.default.Rf,this.Am.bind(this)),g.default.bind(n,F.default.Fa,function(e){t.Wj(e,n),t.H.dispatchEvent(new v.default(F.default.ae,{ad:t.O})),e=+t[ot].getDuration();var i=+t[st].duration;0<e&&(e>1.8*i||i>1.8*e)&&t[at].Me("ad",null,"ad duration mismatch: expected "+i+" but real duration: "+e)}),g.default.bind(n,F.default.Jc,this.ym.bind(this)),g.default.bind(n,F.default.Pf,this.vs.bind(this)),g.default.bind(n,F.default.Pe,this.Xj.bind(this)),g.default.bind(n,F.default.Zb,function(e){t.xs(e);var n=t[st]||{};if(n.Hf&&!t[Et]){var i=0;e=e.data||{},n.Tk?i=n.Tk:n.Sk&&(i=e.duration*n.Sk/100),e.currentTime>=i&&(t[Et]=!0,t.H.dispatchEvent(new v.default(R.default.Oe,{Hf:t.getAdSkippableState()})))}}),g.default.bind(n,F.default.Mg,this.Hz.bind(this)),g.default.bind(n,F.default.sc,this.Qo.bind(this)),g.default.bind(n,Y.default.er,function(t){this[at].Me("ad",null,'VPAID sends "'+t.data+'" event twice')}.bind(this))),this[At].push(n),r.call(this,n)}else l.call(this)}function c(){for(var t=this[bt].parent;t&&t.parent&&(0===t.ads.length||!t.ads[0].oc);)this.Vb.AA(),t=t.parent;return t}function d(t,e){return e.filter(function(e){return e.ws===t.parent||+e.width===t.width&&+e.height===t.height})[0]||null}function h(t,e){tt.debug("companionDied",e),t.removeEventListener(F.default.qd,this[St]),t.removeEventListener(F.default.Yb,this[St]),t.removeEventListener(F.default.vi,this[St]),this.dispatchEvent(new v.default(F.default.Yv))}function p(t,e){if(tt.debug("killAds"),this.im=!0,this[gt].stop(),this[ft]=[],0<this[At].length){var n=this[At];t||(this[At]=[]),n.forEach(function(t){return t.stop(e)})}else f.call(this)}function f(t,e){if(tt.debug("completeAd",t,e),this[gt].stop(),this.Gj=!1,e){if(null!=function(t,e){var n=[];return this[At].forEach(function(e){e!==t&&n.push(e)}),this[At]=[],0===n.length?null:(new b.default(n,f.bind(this,t,e)).CF(F.default.Va),n.forEach(function(t){return t.stop()}),n)}.call(this,t,e))return;var n=t.hB();if(n&&(this.Gf(new X.default(n?n.message||n.description:"",null,null,n)),this.Rj=_.call(this,n)),e.force&&(this.Gj=!0),this.mg(e.currentTime,e.data),t instanceof M.default)return tt.debug("showNextLinearCreative"),void(this.jc?(this.Rj||(this.Rj=_.call(this)),u.call(this,this.Rj)||f.call(this)):((t=-1===this.hc.pe)&&(t=!(!(t=this[bt].ads[0])||!t.oc)),(this.H.Mn()||t)&&function(){var t=this[bt].ads[0];return t?(t.Fk?(t=this[bt],this.Vb.Kg(),this.Vb.Eg(t)):(this[bt].ads.shift(),o.call(this,t),this.Ig(),l.call(this)),!0):!!(t=c.call(this))&&(this.Vb.Kg(),this.Vb.Eg(t),!0)}.call(this)||f.call(this)));if(t instanceof N.default)return void f.call(this)}this.Gj||this.complete()}function _(t){return(t=$.default.Za(t||{})).code=t.code||this.jc.code||et.code,t.description=t.description||this.jc&&this.jc.message||et.description,t}Object.defineProperty(e,"__esModule",{value:!0});var m=i(n(76)),y=i(n(2)),v=i(n(27)),g=i(n(10)),E=i(n(3)),b=i(n(310)),A=i(n(90)),S=i(n(134)),T=i(n(29)),I=i(n(34)),C=i(n(203)),R=i(n(12)),P=i(n(144)),L=i(n(322)),O=i(n(326)),w=i(n(215)),M=i(n(145)),D=i(n(327)),N=i(n(328)),k=i(n(108)),B=i(n(44)),x=i(n(93)),U=i(n(216)),j=i(n(91)),F=i(n(51)),V=i(n(17)),H=i(n(92)),G=i(n(107)),Y=i(n(210)),K=i(n(88)),q=i(n(329)),W=i(n(330)),z=i(n(25)),X=i(n(102)),Q=n(141),J=i(n(61)),Z=i(n(56)),$=i(n(5)),tt=E.default.I("VastEngine"),et=z.default.sj,nt=[V.default.Ci,V.default.vc,V.default.La,V.default.kb,B.default.$f,B.default.eh,B.default.dh,B.default.Sf,B.default.Sg,B.default.LOADED,B.default.fc,B.default.LINEAR_CHANGE,j.default.Zf],it={};it[I.default.$c]=m.default.$c,it[I.default.Xg]=m.default.jj,it[I.default.dd]=m.default.dd,it[I.default.Va]=m.default.FINISHED;var rt=Symbol(),ot=Symbol(),st=Symbol(),at=Symbol(),ut=Symbol(),lt=Symbol(),ct=Symbol(),dt=Symbol(),ht=Symbol(),pt=Symbol(),ft=Symbol(),_t=Symbol(),mt=Symbol(),yt=Symbol(),vt=Symbol(),gt=Symbol(),Et=Symbol(),bt=Symbol(),At=Symbol(),St=Symbol(),Tt=Symbol(),It=Symbol(),Ct=function(t){function e(n,i,r,o,s,a,u){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i,r,o),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).J=a.kf,n[yt]=a.eE,n[lt]=s,n[rt]=u||[],n[ft]=[],n[vt]=[],n[pt]=!0,n[ct]=0,n[At]=[],n[gt]=new S.default,n[dt]=n.H.ka().K(y.default.bc),n[at]=n.H.ka().K(y.default.mb),n[ut]=n.H.ka().K(y.default.Lg),n[It]=n.H.ka().K(y.default.X),n.H.addEventListener(K.default.Wf,function(){this[At].forEach(function(t){return t.resize()})}.bind(n)),n.Vb.addEventListener(Q.Ne,function(t){this.Le(m.default.LOADED,t)}.bind(n)),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.gi=function(e){tt.debug("onLoaded",e),this.vz=e.ads.length,this.Jd||(this[bt]=e,e=this[bt].ads.shift(),this[ht]=q.default.create(this.O),this[ht].parse(e),o.call(this,e),this.cf?l.call(this):t.prototype.gi.call(this,e,{urls:this.Wy()}))},e.prototype.Wy=function(){var t=[];return function e(n){t.push(n.Mo),n.parent&&e(n.parent)}(this[bt]),t.reverse()},e.prototype.pm=function(e){this[ft].length&&(e.crid=this[ft][0].id||""),t.prototype.pm.call(this,e)},e.prototype.Ho=function(t){this.Ig(t),this.Uj(),l.call(this)},e.prototype.Hg=function(){var e=this;t.prototype.Hg.call(this);var n=this.O.Uc;tt.debug("showOverlay",n);var i=this[yt].offsetWidth,r=this[yt].offsetHeight,o=isNaN(n.width)?i:Math.min(n.width,i),s=isNaN(n.height)?r:Math.min(n.height,r),u=void 0;0<this[vt].filter(function(t){return e[_t]=D.default.resolve({height:s,width:o,x:0,y:0},t.lu),e[_t]&&e[_t].kd&&e[_t].kd[0]&&e[_t].kd[0].value?(e[At].push(new N.default(e[gt],e[bt].ads[0]||e.ad,t,e[_t],n,e.H,e.P,e)),e[gt].ni(a.bind(e),1e3*n.Zs),!0):(u=e[_t]&&e[_t].error,!1)}).length||(this.ad&&this.ad.dispatchEvent(new V.default(V.default.La,null,null,{error:u})),this.Le(m.default.LOADED,z.default.Aq,"Unable to find suitable overlay creatives"))},e.prototype.stop=function(){this.Jd||(this[gt].stop(),this.ad&&this.ad.state.loaded?p.call(this):this.va(m.default.jw),this.bg&&(this.bg.Z(),this.bg=null),this[st]=null,t.prototype.stop.call(this))},e.prototype.skip=function(){this.ks=!0,this.Ye?(this.Ye.hk(I.default.Ax),this.Ye.skip()):p.call(this,!0)},e.prototype.pause=function(){tt.debug("pause"),t.prototype.pause.call(this),this.hf&&(this[gt].pause(),this[At].forEach(function(t){return t.pause()}))},e.prototype.resume=function(){tt.debug("resume"),t.prototype.resume.call(this),this.hf&&(this[gt].resume(),this[At].forEach(function(t){return t.resume()}))},e.prototype.setVolume=function(t){tt.debug("setVolume",t),this[At].forEach(function(e){return e.setVolume(t)})},e.prototype.getDuration=function(){var t=0;return this[At].forEach(function(e){e.getDuration&&(t=Math.max(t,e.getDuration()))}),t},e.prototype.getCurrentTime=function(){var t=this[At].find(function(t){return t.getCurrentTime});return t?t.getCurrentTime():0},e.prototype.Lb=function(){return this[st]?this[st].duration:0<this[ft].length?this[ft][0].duration:0},e.prototype.getAdSkippableState=function(){var t=!!this[st]&&this[st].Hf;if(this[ot].getAdSkippableState){var e=this[ot].getAdSkippableState();t=void 0!==e?e:t}return t},e.prototype.Sd=function(){return this.ad&&this.ad.Gu},e.prototype.$j=function(e,n,i){return!i&&this[ht]&&(i=this[ht].Tj),t.prototype.$j.call(this,e,n,i)},e.prototype.va=function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};n.Fz=this.Lb()||"NULL",this[ht]&&(this[ht].zm&&(n.zm=this[ht].zm),this[ht].Zj&&(n.Zj=this[ht].Zj),this[_t]&&(n.RD=this[_t])),n.YA=this[ct],t.prototype.va.call(this,e,n)},e.prototype.Ik=function(e){var n=e;n instanceof X.default||(n=n instanceof A.default?new X.default(e.message,X.default.kj,e.Po):new X.default(e.message)),tt.debug("onInterrupted",n,"configEntry",this.O),t.prototype.Ik.call(this,n),f.call(this)},e.prototype.mg=function(e,n){t.prototype.mg.call(this,e,n),this.ad&&this.ad.dispatchEvent(new V.default(B.default.fc,this[st])),c.call(this)||0!==this[bt].ads.length||this.stop(),this.ad=null,this.ks=!1},e.prototype.Ta=function(){return this[At].forEach(function(t){if(t.Ta)return t.Ta()}),null},e.prototype.track=function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(n.vastModelAd=this.ad,e===J.default.Ne){for(var i="",r=this[bt];r&&r.Mo;)i=r.Mo+" "+i,r=r.parent;n.url=i}t.prototype.track.call(this,e,n)},e.prototype.Le=function(e,n,i){t.prototype.Le.call(this,e,n,i,function(){var t=void 0,e=void 0,n=[];return this.ad&&this.ad.yb&&this.ad.yb.length?n=W.default.LB(this.ad.yb):this[At]&&this[At].length?this[At].forEach(function(i){i.Ta&&(t=(i.Ta()||{}).url||"",e=T.default.hd(t)||t,n.push(e))}):this[ot]&&this[ot].Ta&&(t=(this[ot].Ta()||{}).url||"",e=T.default.hd(t)||t,n.push(e)),n.join(",")}.call(this))},e.prototype.mk=function(e){t.prototype.mk.call(this),p.call(this,!1,e)},e.prototype.getAdCompanions=function(){var t="";return this[Tt].forEach(function(e){!t&&e.xm&&(t=e.xm)}),t},e}(P.default);e.default=Ct},function(t,e,n){var i=n(1)(i||{},{f:{qj:{}},A:{},B:{S:{}}});i.A=n(4).vdb.A,i.B.S=n(83).vdb.B.S,i.f.qj=i.A.Class.extend(function(){function t(){0===this.yh.length&&(this.reset(),this.Sr&&this.Sr())}return{N:function(e,n){this.yh=e.slice(),this.Sr=n,this.Kj=[],t.call(this)},reset:function(){for(var t=0;t<this.Kj.length;t++)this.Kj[t].Z();this.Kj=[]},release:function(e){-1!==(e=this.yh.indexOf(e))&&(this.yh.splice(e,1),t.call(this))},CF:function(t){for(var e=0;e<this.yh.length;e++){var n=this.yh[e];n=i.B.S.bind(n,t,this.release.bind(this,n)),this.Kj.push(n)}return this}}}()),e.vdb={f:{qj:i.f.qj}},e.default=i.f.qj,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(44)),o=i(n(205)),s=i(n(17)),a=i(n=n(2)),u=Symbol();n=function(){function t(e,n,i){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");var l=i.ka();i=l.K(a.default.za),l=l.K(a.default.Ya),this[u]=new o.default(i,l),this[u].Hu(function(){return e.dispatchEvent(new s.default(r.default.eh,n))},function(){return e.dispatchEvent(new s.default(r.default.$f,n))},function(){return e.dispatchEvent(new s.default(r.default.dh,n))})}return t.prototype.Z=function(){this[u].Z()},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=this;this[C]=this[C]||t.data.skippable,this[C]&&(this[I]=function(t){var e=t.data;t=e.duration;var n=e.skipOffsetTime;e=e.skipOffsetPercent;var i=this[T];n||0===n?i=n:(e||0===e)&&(i=~~(t*e/100));return i<Math.min(this[y],t)?i:null}.call(this,t),null!==this[I]&&(s.call(this),setTimeout(function(){return h.default.Nk(e[E],"collapse-skip-button","expand-skip-button")},800)))}function o(t){if(!this[p]){var e="";this[g]&&(e="| "+Math.round((t?t.data.duration:0)-(t?Math.floor(t.data.currentTime):0))),this[b].innerHTML=this[R].replace("%t",e).trim(),h.default.lf(this[E],"skippable"),this[p]=!0,d.default.Da(this[E],"click",function(){this[p]&&(this[f].skip(),h.default.Ie(this[E],"skippable"),this[p]=!1)}.bind(this)).link(this[L])}}function s(){if(d.default.Da(this[f],u.default.Yb,function(){this[v]&&this[f].removeEventListener(u.default.Zb,this[v]),h.default.Nk(this[E],"expand-skip-button","collapse-skip-button"),h.default.Ie(this[E],"skippable"),this[p]=!0}.bind(this)).link(this[L]),0<this[I]&&(this[v]=function(t){var e=Math.floor(t.data.currentTime);0<this[S]&&this[I]-this[S]<e&&(0>=(e=this[I]-e)?o.call(this,t):a.call(this,e))}.bind(this),this[f].addEventListener(u.default.Zb,this[v])),!this[E]){var t=this[_].querySelector("#ad-skip-button");if(t)this[E]=t,this[b]=this[E].querySelector("#ad-skip-button-text");else{this[m].tg(l.default),this[A]=h.default.createElement("div",{id:"ad-skip-button-container"},this[_]),t={};try{t=getComputedStyle(this[O].hg)||{}}catch(t){}this[E]=h.default.createElement("div",{id:"ad-skip-button",style:{zIndex:t.zIndex&&"auto"!==t.zIndex?t.zIndex:3}},this[A]),this[b]=h.default.createElement("div",{id:"ad-skip-button-text"},this[E])}}0<this[I]?a.call(this,this[I]):o.call(this)}function a(t){this[p]||(this[S]=t,this[b].innerHTML=this[P].replace("%d",this[S]))}Object.defineProperty(e,"__esModule",{value:!0});var u=i(n(12)),l=i(n(313)),c=i(n(2)),d=i(n(10)),h=i(n=n(5)),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol(),y=Symbol(),v=Symbol(),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol(),L=Symbol(),O=Symbol();n=function(){function t(e){var n=this;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");var i=e[c.default.Qb].Qu||{};this[C]=!h.default.Rc(i),this[f]=e[c.default.Ua],this[m]=e[c.default.Ga],this[_]=e[c.default.ya].Od(),this[O]=e[c.default.Xe],this[R]=i.skippableText||"Skip ad %t",this[P]=i.timerText||"Skip ad in %ds",this[g]=i.showTimer||!1,this[T]=i.skipInSeconds||5,this[y]=i.maxLinearShowTime||90,this[p]=!1,this[L]=d.default.group(d.default.bind(this[f],u.default.Fa,r.bind(this)),d.default.bind(this[f],u.default.Oe,function(t){t.data.Hf&&!n[E]&&(n[I]=0,s.call(n),h.default.Nk(n[E],"collapse-skip-button","expand-skip-button"))}))}return t.prototype.destroy=function(){this[L].Z(),this[A]&&this[A].parentNode&&this[A].parentNode.removeChild(this[A])},t}(),e.default=n,n.W=[c.default.Ua,c.default.Qb,c.default.ac,c.default.Ga,c.default.ya,c.default.Xe]},function(t,e,n){e=n(314),t.exports="string"==typeof e?e:e.toString()},function(t,e,n){(t.exports=n(147)(!1)).push([t.yk,"#ad-skip-button-container {\n    position: absolute;\n    top: 0;\n    overflow: hidden;\n    width: 100%;\n    height: 100%;\n}\n\n#ad-skip-button {\n    position: absolute;\n    width: 110px;\n    right: -110px;\n    bottom: 65px;\n    padding: 6px 0;\n    background-color: rgba(34, 34, 34, .85);\n    color: #d0d0d0;\n    font: 12px Arial;\n    text-align: center;\n    border: 1px #747474 solid;\n    border-right: 0;\n    transition: right 1s ease-in;\n}\n\n.fullscreen-mode #ad-skip-button {\n    width: 165px;\n    bottom: 98px;\n    padding: 9px 0;\n    border-width: 1.5px;\n    font-size: 18px;\n}\n\n#ad-skip-button.skippable {\n    text-decoration: underline;\n    cursor: pointer;\n}\n\n#ad-skip-button.skippable:hover {\n    color: #fff;\n}\n\n#ad-skip-button.expand-skip-button {\n    opacity: 1;\n    right: 0;\n    margin-right: 0;\n}\n\n#ad-skip-button.collapse-skip-button {\n    opacity: 0;\n    right: -110px;\n}\n\n.fullscreen-mode .collapse-skip-button {\n    opacity: 0;\n    right: -165px;\n}\n",""])},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this;y.debug("mouseClickHandler"),this[b]||(this.D.rg(),this[b]=setTimeout(function(){return t[b]=null},100))}function o(){this[T]!==v.fc&&(this[E]=!0,this[g]=u.default.group(u.default.bind(this.P,h.default.kr,r.bind(this)),u.default.bind(this.P,h.default.rr,function(t){this.Jf(t.message,t.code)}.bind(this)),u.default.bind(this.P,h.default.uj,function(){this.zo(),this[T]=v.PLAYING}.bind(this)),u.default.bind(this.P,h.default.Ar,function(){this.Ij||(this.zo(),this.Cb(d.default.mj),this.ii(),this.Fe())}.bind(this)),u.default.bind(this.P,h.default.zr,function(){this[T]=v.PLAYING,this.track(d.default.Uq),this.D.ko()}.bind(this)),u.default.bind(this.P,h.default.xr,function(){this[T]=v.PAUSED,this.track(d.default.gj),this.D.jo()}.bind(this)),u.default.bind(this.P,h.default.qr,function(t){t.complete&&this.Cb(d.default.Va),this.P.Do(),this[T]=v.fc,this[g].Z(),this.D.complete(!1,t)}.bind(this)),u.default.bind(this.P,h.default.Wl,function(t){this.D.li(t),!0===t.muted?this.track(d.default.Cl):this.track(d.default.Tl)}.bind(this)),u.default.bind(this.P,h.default.Br,function(t){this.D.ji(t),this.Vk(this.P.an())}.bind(this)),u.default.bind(this.P,h.default.Fr,function(){this.D.pu()}.bind(this)),u.default.bind(this.P,h.default.sr,function(t){this.D.BF(t.url)}.bind(this)),u.default.bind(this[A],"click",r.bind(this))),this.D.sb.Jb&&((this.P.cn().style||{}).cursor="pointer"),this.P.play())}Object.defineProperty(e,"__esModule",{value:!0});var s=i(t=n(22)),a=i(t=n(27)),u=i(t=n(10));t=i(t=n(3));var l=n(5),c=i(l),d=i(l=n(34)),h=i(l=n(207));l=i(l=n(77));var p=n(25),f=i(p),_=i(p=n(51)),m=i(n=n(17)),y=t.default.I("SimpleVideoMediaElement"),v={Ni:"created",PAUSED:"paused",PLAYING:"playing",fc:"stopped"},g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol();n=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n=!n||"object"!=typeof n&&"function"!=typeof n?this:n,y.debug("init",i),n[T]=v.Ni,n[S]=i,n[A]=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.createElement=function(){return c.default.createElement("div",{style:"display: none"})},e.prototype.load=function(){t.prototype.load.call(this),this.D.ue()},e.prototype.zf=function(){y.debug("initElement"),this.D.dispatchEvent(new a.default(_.default.pl));var t=this.Pn()?this.P.ZE(this[S]):this.P.UE(this[S]);t&&t.then?t.then(o.bind(this)):o.call(this)},e.prototype.Pn=function(){var t=this.D.ta();return t&&t.getType()===s.default.gb},e.prototype.stop=function(){if(y.debug("stop"),this[T]=v.fc,this[E]){this[g].Z(),this.P.stop(),this.P.Do();var e=this.P.cn().style;e&&(e.cursor="")}t.prototype.stop.call(this)},e.prototype.pause=function(){this[T]===v.PLAYING&&this.P.pause()},e.prototype.resume=function(){this[T]===v.PAUSED&&this.P.play()},e.prototype.Qd=function(){return this.P.Qd()},e.prototype.Jf=function(t,e){y.debug("stopByError",t),this[T]=v.fc;var n=f.default.uw,i="video playback error";switch(e){case 2:n=f.default.Vp;break;case 3:case 4:n=f.default.$i;break;case 5:n=f.default.$i,i="autoplay issue"}this.error=n,this.D.dispatchEvent(new a.default(_.default.qd),t),this.Ij||this.D.sg(m.default.La,{se:i,error:n}),this.stop()},e.prototype.setVolume=function(t){this.P.setVolume(t),this.P.mute(0===t)},e.prototype.getDuration=function(){return this.P.getDuration()},e}(l.default),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.lv="AdClickThru",e.nv="AdDurationChange",e.qd="AdError",e.sv="AdExpandedChange",e.Nf="AdImpression",e.sc="AdInteraction",e.Of="AdLinearChange",e.ae="AdLoaded",e.vv="AdLog",e.Jc="AdPaused",e.cl="AdPlaying",e.zv="AdRemainingTimeChange",e.Dv="AdSizeChange",e.Oe="AdSkippableStateChange",e.Qf="AdSkipped",e.Fa="AdStarted",e.fl="AdStopped",e.Fv="AdUserAcceptInvitation",e.Gv="AdUserClose",e.Hv="AdUserMinimize",e.xi="AdVideoComplete",e.yi="AdVideoFirstQuartile",e.zi="AdVideoMidpoint",e.Ai="AdVideoStart",e.Bi="AdVideoThirdQuartile",e.hl="AdVolumeChange"},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){this.Ba&&this.Ba.Z(),this.Mj&&(this.J.removeEventListener("mousemove",this.Mj),this.Mj=null),this.sa&&this.sa.destroy()}function o(){this.error=new d.default(h.default.$i.code,"Can not get flv runner"),u.call(this,this.error)}function s(){u.call(this,"Internal wrapper error")}function a(t){this.sa=t,this.ds.resolve(t),this.ls=setTimeout(function(){u.call(this,"flv ad not started in 3000ms")}.bind(this),3e3),this.Mj=function(t){if(p.default.Be){var e=document.createEvent("MouseEvent");e.initEvent(t.type,!t["\ufeffcancelBubble"],t["\ufeffcancelable"])}else e=new MouseEvent(t.type,t);this.J.dispatchEvent(e)}.bind(this),this.J.addEventListener("mousemove",this.Mj,!0),this.Ba=_.default.group(_.default.bind(this.sa,"WrapperError",s.bind(this)),_.default.bind(this.sa,"click",function(){this.D&&this.D.rg()}.bind(this)),_.default.bind(this.sa,"stateChange",function(){var t=this.sa.getState();clearTimeout(this.ls),"playing"===t?(this.Ca.show(),this.D.Jg(),this.Cb(m.default.mj),this.ii(),this.Fe()):"paused"===t?(this.track(m.default.gj),this.D.jo()):"buffering"===t||"loading"===t?this.D.pu():"stopped"===t?(this.Cb(m.default.Va),r.call(this),this.D.complete(!1,void 0)):"resumed"===t&&(this.track(m.default.Uq),this.D.ko())}.bind(this)),_.default.bind(this.sa,"heartbeat",function(){this.D.ji({currentTime:this.sa.getCurrentTime(),duration:this.sa.Mt()}),this.Vk(this.sa.an())}.bind(this)),_.default.bind(this.sa,c.default.Tg,s.bind(this))),this.sa.play(this.Bz),this.sa.Mu(this.kg||0)}function u(t){g.debug("stopByError",t),clearTimeout(this.ls),this.error=new d.default(h.default.$i.code,t),this.stop()}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(77));var l=n(104),c=i(l),d=i(l=n(318)),h=i(l=n(25)),p=i(l=n(5));l=i(l=n(3));var f=n(10),_=i(f),m=i(f=n(34)),y=i(f=n(52)),v=i(n=n(22)),g=l.default.I("FlvMediaElement");n=function(t){function e(n,i,r,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n=!n||"object"!=typeof n&&"function"!=typeof n?this:n,g.debug("init",i),n.Bz=i,n.Ty=r,n.J=o,n.ds=new y.default,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){t.prototype.load.call(this),this.D.ue()},e.prototype.zf=function(){this.Ty.then(function(t){this.Ca=t,t.Lz().then(a.bind(this),o.bind(this))}.bind(this),o.bind(this))},e.prototype.resize=function(){t.prototype.resize.call(this),function(){var t=this;this.sa?this.sa.Lu(this.P.Qh(),this.P.Lh()):this.ds.Ea().then(function(e){return e.Lu(t.P.Qh(),t.P.Lh())})}.call(this)},e.prototype.stop=function(){g.debug("stop"),this.Ca&&this.Ca.ye(),r.call(this),t.prototype.stop.call(this)},e.prototype.pause=function(){this.sa.pause()},e.prototype.resume=function(){this.sa.resume()},e.prototype.createElement=function(){return p.default.createElement("div")},e.prototype.setVolume=function(t){this.kg=t,this.sa&&this.sa.Mu(t),this.D.li({muted:0===this.kg,volume:this.kg})},e.prototype.getDuration=function(){return this.sa.Mt()},e.prototype.Qd=function(){return this.getDuration()-this.sa.getCurrentTime()},e.prototype.Pn=function(){var t=this.D.ta();return t&&t.getType()===v.default.gb},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(25)).default.sj;t=function(){function t(e,n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.message=n||i.description,this.code=e||i.code}return t.prototype.toString=function(){return"VastError{code="+this.code+",message="+this.message+"}"},t}(),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){this[l].innerHTML="",s.default.createElement("div",{style:"position: absolute; display: block; left: 10%; width: 80%; top: 25.5%; height: 49%;"},this[l],this[d]?u.default:a.default)}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(30));var o=n(5),s=i(o),a=i(o=n(320)),u=i(n=n(321)),l=Symbol(),c=Symbol(),d=Symbol(),h=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var o=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(o=!o||"object"!=typeof o&&"function"!=typeof o?this:o)[d]=n,o[c]=s.default.createElement("div",{id:"oath-volume-button-container",style:{bottom:"20px",cursor:"pointer",height:"26px",position:"absolute",right:"20px",width:"26px",zIndex:10}},i),o[l]=s.default.createElement("div",{id:"oath-volume-button-icon",style:{backgroundColor:"rgba(34, 34, 34, 0.85)",borderRadius:"20%",display:"block",height:"100%",position:"absolute",width:"100%"}},o[c]),r.call(o),o[c].addEventListener("click",function(t){t.stopPropagation(),this.dispatchEvent(h.kb,!this[d])}.bind(o)),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.dE=function(t){this[d]=t,r.call(this)},e.prototype.destroy=function(){s.default.Ef(this[c])},e}(t.default);e.default=h,h.kb="MuteButton.Click"},function(t){t.exports='<svg version="1.1" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 153.61 94.026" style="position: absolute; top: 0; left: 0;"><path fill="#D0D0D0" d="M59.34,13.276h-1.695c-0.365,0-0.936-0.08-0.936,0.046v-0.045h-0.007L35.237,32.322l-18.146-0.025 c-0.598,0-1.191,0.131-1.748,0.363c-1.554,0.609-2.783,1.992-2.783,3.727v0.13v27.081v0.129c0,1.733,1.23,3.117,2.786,3.728 c0.555,0.232,1.149,0.362,1.745,0.362h8.677l9.471-0.025l21.467,19.045h0.006V86.79c0,0.126,0.567,0.046,0.935,0.046h1.695 c1.564,0,2.562-1.172,2.562-2.735V16.014C61.902,14.448,60.904,13.276,59.34,13.276z"></path><path fill="#D0D0D0" d="M90.036,50.255c0-8.711-3.873-16.511-10.009-21.824l-4.062,8.188c3.104,2.611,5.292,6.252,6.051,10.387 c0,0,0.255,1.449,0.255,3.242c0,1.796-0.255,3.403-0.255,3.403c-0.758,4.133-2.947,7.772-6.051,10.385l4.062,8.188 c6.137-5.313,10.009-13.112,10.009-21.823c0-0.022,0-0.05-0.001-0.074C90.036,50.302,90.036,50.277,90.036,50.255z"><animate attributeType="CSS" attributeName="opacity" dur="2s" values="0;1;1;1;0" repeatCount="indefinite"></animate></path><path fill="#D0D0D0" d="M109.87,51.171c0.006-0.294,0.013-1.035,0.013-1.052c0-0.014,0.001-0.027,0.001-0.043 c0-0.041-0.008-0.713-0.014-1.007c-0.008-0.384-0.021-0.767-0.035-1.146c-0.002-0.029-0.002-0.061-0.004-0.09 c-0.57-13.265-6.172-25.227-14.831-34.259l-5.091,7.23c5.758,5.744,9.907,13.108,11.559,21.339c0,0,0.785,5.252,0.788,7.976 c-0.003,2.726-0.288,5.386-0.811,7.966l0.021,0.012c-1.65,8.23-5.801,15.596-11.559,21.34l5.091,7.23 c8.659-9.032,14.261-20.994,14.831-34.26c0.002-0.029,0.002-0.06,0.004-0.089C109.851,51.937,109.863,51.554,109.87,51.171z"><animate attributeType="CSS" attributeName="opacity" dur="2s" values="0;0;1;1;0" repeatCount="indefinite"></animate></path></svg>'},function(t){t.exports='<svg version="1.1" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 153.61 94.026" style="position: absolute; top: 0; left: 0;"><path fill="#D0D0D0" d="M19.744,30.013c-2.616,0-5.236,2.157-5.236,4.874v16.125v4v11.307c0,2.717,2.62,4.693,5.236,4.693h20.962 l24.795,22h0.007V92.96c0,0.146,0.657,0.053,1.079,0.053h1.96c1.808,0,2.961-1.353,2.961-3.161v-3.513V55.013v-1.196 L29.766,30.013H19.744z"></path><path fill="#D0D0D0" d="M71.508,14.868v-3.513c0-1.808-1.153-3.341-2.962-3.341h-1.96c-0.421,0-1.078,0.087-1.078,0.233V8.014 h-0.007L50.189,21.599l21.319,12.157V14.868z"></path><polygon fill-rule="evenodd" clip-rule="evenodd" fill="#D0D0D0" points="0,9.526 5.5,0 153.61,84.5 148.11,94.026"></polygon><path fill="#D0D0D0" d="M88.19,67.712l4.53,7.949c2.171-1.907,4.088-4.093,5.698-6.499l-7.343-4.188 C90.266,65.987,89.316,66.909,88.19,67.712"><animate attributeType="CSS" attributeName="opacity" dur="2s" values="0;1;1;1;0" repeatCount="indefinite"></animate></path><path fill="#D0D0D0" d="M104.001,50.754c0-10.063-4.474-19.072-11.563-25.209l-4.691,9.459C91.331,38.02,93.86,42.225,94.735,47 l9.225,5.261C103.982,51.761,104.001,51.26,104.001,50.754"><animate attributeType="CSS" attributeName="opacity" dur="2s" values="0;1;1;1;0" repeatCount="indefinite"></animate></path><path fill="#D0D0D0" d="M126.931,50.553c0-16.354-6.628-31.147-17.192-42.167l-5.881,8.353 c8.727,8.705,14.263,20.63,14.263,33.814c0,3.164-0.33,6.254-0.937,9.249l8.131,4.636 C126.363,59.997,126.931,55.357,126.931,50.553"><animate attributeType="CSS" attributeName="opacity" dur="2s" values="0;0;1;1;0" repeatCount="indefinite"></animate></path><path fill="#D0D0D0" d="M103.327,84.819l6.105,8.001c3.613-3.632,6.739-7.679,9.322-12.062l-8.214-4.685 C108.479,79.268,106.057,82.206,103.327,84.819"><animate attributeType="CSS" attributeName="opacity" dur="2s" values="0;0;1;1;0" repeatCount="indefinite"></animate></path></svg>'},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var r=n(34),o=i(r),s=i(r=n(2)),a=i(r=n(5));r=i(r=n(146));var u=n(323),l=i(u),c=i(u=n(324)),d=i(u=n(325)),h=n(106),p=i(n=n(107)),f=t.default.I("CompanionView"),_=Symbol(),m=Symbol();n=function(t){function e(n,i,r,o,a,u){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");f.debug("init",n,i,r,o);var l=a.ka(),c=l.K(s.default.Ga);if(n=t.call(this,null,n,i,r,a,u),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).J=c.createDocumentFragment(),n.Lc=o,n[_]=l.K(s.default.ul),n[m]=c,n.noResize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Fg=function(){f.debug("resolveMediaElement");var e=this.ia.kd[0],n=void 0,i=this[_].tb();switch(e.type){case h.vl:n=new l.default(e.value,i);break;case h.xl:n=new c.default(e.value,i);break;case h.nj:n=new d.default(e.value,e.mimeType,i)}if(n)if(n.jd){if(n.TE(this.Lc&&this.Lc.keepCompanion),n.St(this.Lc.parent,this.Lc.selectorType),n.qf)return n.qf=a.default.createElement("div",{style:"width: "+this.Lc.width+"px; height: "+this.Lc.height+"px"},n.qf),n;f.warn("Media element could not find a container")}else f.warn("Media element doesn't have any markup");else f.warn("Non-supported companion media type",e.type);return t.prototype.Fg.call(this)},e.prototype.ue=function(){this.Y.zf()},e.prototype.Vm=function(){return this.ia.parameters},e.prototype.pk=function(){return!0},e.prototype.qk=function(){return!1},e.prototype.getAdHeight=function(){return this.ia.height},e.prototype.getAdWidth=function(){return this.ia.width},e.prototype.ve=function(){return this.ia.Jb?this.ia.Jb.url:null},e.prototype.hk=function(t){t===o.default.ql&&this.ad.dispatchEvent(new p.default(t,this.sb,this.ia))},e.prototype.resume=function(){f.debug("resume")},e.prototype.pause=function(){f.debug("pause")},e}(r.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i).jd=n,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(149)).default),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i).jd='<iframe width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" src="'+n+'"></iframe>',i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(149)).default),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=(t=n(3))&&t.__esModule?t:{default:t},n=(n=n(149))&&n.__esModule?n:{default:n};var i=t.default.I("StaticResourceMediaElement");n=function(t){function e(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",o=arguments[2];if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(o=t.call(this,o),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o=!o||"object"!=typeof o&&"function"!=typeof o?this:o,0===(r=r.toLowerCase()).indexOf("image/")||""===r?o.jd='<img width="100%" height="100%" src="'+n+'" />':"application/x-javascript"===r?o.jd='<script src="'+n+'"><\/script>':"application/x-shockwave-flash"===r?o.jd='<object width="100%" height="100%" data="'+n+'"></object>':(i.warn("Non-supported mime type",r),o.jd=null),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){this.fm.Z(),o.call(this)}function o(){c.default.Ef(this.element),this.D.dispatchEvent(new d.default(u.default.uv))}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(214));var s=n(17),a=i(s),u=i(s=n(51));s=i(s=n(3));var l=n(5),c=i(l),d=i(l=n(27)),h=i(n=n(25)),p=s.default.I("IconElement"),f=Symbol();n=function(t){function e(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],r=arguments[2];if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(i=t.call(this,n.Su,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i=!i||"object"!=typeof i&&"function"!=typeof i?this:i,p.debug("create",n),i.icon=n,i[f]=r,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.dF=function(t){this.D=t,this.load(),c.default.Je(this.element,{height:this.icon.height+"px",width:this.icon.width+"px",zIndex:3}),this.D.addEventListener(u.default.qd,r.bind(this)),this.D.addEventListener(u.default.Yb,r.bind(this)),this.D.addEventListener(u.default.vi,r.bind(this))},e.prototype.ou=function(){this.D.sg(a.default.La,{error:h.default.zq})},e.prototype.io=function(){var t=this;switch(this.icon.Xk){case"left":this.element.style.left="0px";break;case"right":this.element.style.right="0px";break;default:"number"==typeof this.icon.Xk&&(this.element.style.left=this.icon.Xk+"px")}switch(this.icon.Yk){case"bottom":this.element.style.bottom="0px";break;default:this.element.style.top=("number"==typeof this.icon.Yk?this.icon.Yk:0)+"px"}this.icon.Km&&(this.element.style.cursor="pointer",this.element.addEventListener("click",function(e){e.stopPropagation(),t.D.rg(t.icon.Km,!0)})),this.icon.Lm&&this.element.addEventListener("click",function(t){this[f].qe(t)}.bind(this,this.icon.Lm)),this.icon.To&&this[f].qe(this.icon.To),0===this.icon.offset&&this.D.yg.appendChild(this.element),0===this.icon.offset&&0===this.icon.duration||(this.No=function(t){t.data.currentTime>this.icon.offset&&(this.D.yg.appendChild(this.element),0===this.icon.duration&&this.D.removeEventListener(u.default.Zb,this.No)),0<this.icon.duration&&t.data.currentTime>this.icon.offset+this.icon.duration&&(o.call(this),this.D.removeEventListener(u.default.Zb,this.No))}.bind(this),this.D.addEventListener(u.default.Zb,this.No)),this.D.dispatchEvent(new d.default(u.default.Cv))},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=[],e=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(n){var i=n.kd[0];if(i)switch(l.debug("resolveByMimeType","Found supported resource",i),i.type){case a.nj:(function(t){return 0<c.filter(function(e){return new RegExp(e).test(t)}).length})(i.mimeType)&&e.push(n);break;case a.xl:case a.vl:t.push(n)}}),t.concat(e)}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var o=n(5),s=i(o);o=i(o=n(105));var a=n(106),u=i(n=n(25)),l=t.default.I("NonLinearResolver"),c=["image/.*",o.default.Uf,o.default.rq,o.default.sq];e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.resolve=function(t,e){e=s.default.Ru(e.slice(),!1),l.debug("resolve",t,e);var n=r(e),i=void 0;return 0<e.length&&0===n.length&&(i=u.default.Aq),e=n.filter(function(e){return e.Ff||e.width<=t.width&&e.height<=t.height}),0<n.length&&0===e.length&&(i=u.default.Sw),e[0]||{error:i}},t}()},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){return-1!==(""+t).indexOf("%")}function o(t,e){var n={height:e,width:t,x:0,y:0};n.x=(this.J.offsetWidth-t)/2,n.y=(this.J.offsetHeight-e)/2;var i=this.J.offsetWidth,o=this.J.offsetHeight;switch(this.Hc.position){case y.default.Pq:n.y=0;break;case y.default.Oq:n.x=this.J.offsetWidth-t;break;case y.default.Lq:n.y=this.J.offsetHeight-e;break;case y.default.Nq:n.x=0;break;case y.default.Il:this.J.parentNode&&i===this.J.parentNode.offsetWidth&&(o=this.J.parentNode.offsetHeight),n.x=r(this.Hc.left)?parseFloat(this.Hc.left)*i/100:this.Hc.left,n.x-=t/2,n.y=r(this.Hc.top)?parseFloat(this.Hc.top)*o/100:this.Hc.top,n.y-=e/2}return n}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var s=n(204),a=i(s),u=i(s=n(22)),l=i(s=n(12));s=i(s=n(146));var c=n(208),d=i(c),h=i(c=n(214)),p=n(106),f=i(c=n(44)),_=i(c=n(92)),m=i(c=n(17)),y=i(c=n(136)),v=i(n=n(2)),g=t.default.I("OverlayView");n=function(t){function e(n,i,r,o,s,a,u,l){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(g.debug("init",i,r),n=t.call(this,n,i,r,o,a,l),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).J=a.ka().K(v.default.ya).lC(),n.P=u,n.Hc=s,n.type="OverlayView",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Fg=function(){var e=this.ia.kd[0]||{};if(e.type===p.nj){if(this.ia.Mc&&this.ia.Mc.toLowerCase()===a.default.ag)return new d.default(e,u.default.fb,this.hc,this.ub.ka());var n=this.ia,i=n.kd[0]||{};return g.debug("buildMediaUrl",i),e=i.value,-1!==["video/ogg","video/mp4","video/webm"].indexOf(i.mimeType)&&n.Jb&&(n=encodeURIComponent(n.Jb.url),e+=-1===e.indexOf("?")?"?":"&",e+="clickTAG="+n+"&clickTag="+n),new h.default(e,this.P)}return t.prototype.Fg.call(this)},e.prototype.Rk=function(){g.debug("showCompanion"),this.ad.dispatchEvent(new _.default(this.sb))},e.prototype.ue=function(){t.prototype.ue.call(this),this.th.start(),this.ad.dispatchEvent(new m.default(f.default.LOADED,this.sb))},e.prototype.Vm=function(){return this.ia.parameters},e.prototype.pk=function(){return this.ia.ci},e.prototype.qk=function(){return this.ia.Ff},e.prototype.getAdHeight=function(){return Math.max(this.ia.height,this.ia.it)},e.prototype.getAdWidth=function(){return Math.max(this.ia.width,this.ia.jt)},e.prototype.ve=function(){var t=this.ia.Jb;return t?t.url:null},e.prototype.Fm=function(e,n,i,s,a,u){void 0===a&&(a=!0),void 0===u&&(u=!0);var l=this.Hc.width,c=this.Hc.height;return r(l)&&(l=parseFloat(this.Hc.width)*this.J.offsetWidth/100),r(c)&&(u?c=l/(c=this.getAdWidth()/this.getAdHeight()):c=parseFloat(this.Hc.height)*this.J.offsetHeight/100),l=l||e,c=c||n,e=t.prototype.Fm.call(this,l,c,i,s,a,u),"application/javascript"===(this.ia.kd[0]||{}).mimeType?o.call(this,l,c):o.call(this,Math.min(e.width,l),Math.min(e.height,c))},e.prototype.bi=function(e){t.prototype.bi.call(this),this.ub.dispatchEvent(new l.default(l.default.Of,u.default.fb,{isLinear:e})),e?this.pause():this.resume()},e.prototype.ut=function(){return 0},e.prototype.Jg=function(){},e.prototype.noResize=function(){},e}(s.default),e.default=n},function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(34));t=function(){function t(){i(this,t)}return t.prototype.parse=function(t){this.Tj=t.id},t.create=function(e){switch(e.getVendor()){case o.Sx:return new o;default:return new t}},t}(),e.default=t;var o=function(t){function e(){i(this,e);var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.parse=function(t){var e=t.yb[0].Ic[0];e.type===r.default.mj&&(e=e.url,this.zm=/cid=(\d+)/.exec(e)[1],this.Zj=/src=(\d+)/.exec(e)[1]),this.Tj=t.id},e}(t);o.Sx="collective"},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=(t=n(5))&&t.__esModule?t:{default:t},r=(n=n(29))&&n.__esModule?n:{default:n};e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.LB=function(e){var n=[];return i.default.Bb(e).forEach(function(e){(e.ei||[]).forEach(function(e){return n.push(t.hC(e))})}),n},t.hC=function(t){return t=t||{},r.default.hd(t.url||"")||t.mimeType},t}()},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){return!!t&&0<T.filter(function(e){return t.replace(/(https?:)?/,"").replace(/&cb=[^&]*/,"").replace(/&apid=\[object\sObject]/,"&apid=[APID]").replace(/;ord=[^;]*/,";ord=[timestamp]")===e}).length}function o(t,e){for(var n=this,i=t;i;)y.debug("onVastEvent","process",i),i.Kd.forEach(function(o){if(!r.call(n,o)){if(o=p.default.create(h.default.gp.concat(t.data&&t.data.Ez||n[g].Lb()||"")).resolve(o),o=n[g].Rd().resolve(o),i.type===_.default.La){var a=m.default.sj;e&&e.getType()===s.default.fb&&(a=m.default.vw),a=i.data.error||a,o=p.default.create(h.default.ip.concat(a.code),h.default.Xo.concat(a.la)).resolve(o)}n[S].qe(o)}}),i=i.At()}Object.defineProperty(e,"__esModule",{value:!0});var s=i(t=n(22)),a=i(t=n(150)),u=i(t=n(2));t=i(t=n(3));var l=n(56),c=i(l),d=i(l=n(61)),h=i(l=n(140)),p=i(l=n(217)),f=i(l=n(5)),_=i(l=n(17)),m=i(n=n(25)),y=t.default.I("VastEventHandler"),v=/https?:/,g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=[];n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[g]=e,this[E]=this[g].Ld(),e=this[g].ka(),this[A]=e.K(u.default.za),this[S]=e.K(u.default.Tf),this[b]=e.K(u.default.X),this[E].fD&&this[A].addEventListener(d.default.ti,function(t){var e=this,n=t.data.thirdPartyImpressionTrackers||[];try{var i=t.data.vastModelAd.Bk[0].url}catch(t){y.debug("Vast impression tracker not found where expected."),i=null}i&&n.push(i),n.forEach(function(t){t=t.replace(v,"");var n=/&cb=[^&]*?/.test(t),i=/\?/.test(t)?"&":"?";t=n?t:""+t+i+"cb=[CACHE_BUSTER]",e[S].qe(e[g].Rd().resolve(t))}),T=n}.bind(this))}return t.prototype.ki=function(t,e){if(y.debug("onVastEvent",t,e),t.type===_.default.vc?f.default.Ah(o.bind(this,t,e)):o.call(this,t,e),t.type===_.default.kb)try{this[b].Pd()===c.default.Yg&&this[g].ru();var n=t.ve();y.info("Open on ad click",n),n&&a.default.mo(n)}catch(t){y.error("onVastEvent",t)}},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){throw new a.default(t,e||u.default.Rx)}Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t=i(t=n(3));var s=n(90),a=i(s),u=i(s=n(25)),l=i(n=n(333)),c=t.default.I("VastParser"),d=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[d]=e}return t.prototype.parse=function(t){return new l.default(this[d]).parse(function(t){t:{var e=void 0===t?"undefined":o(t);if("string"===e)try{if(void 0!==window.DOMParser){var n=(new window.DOMParser).parseFromString(t,"text/xml");(0<n.getElementsByTagName("parsererror").length||!n.documentElement)&&r("Invalid XML");var i=n}else void 0!==window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")?((n=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(t),0===n.parseError.errorCode&&n.documentElement||r("Invalid XML"),i=n):(r("No XML parser found"),i=void 0);break t}catch(e){c.error(e,"Invalid VAST xml",t),r("Invalid VAST: "+(e.message||e))}else{if("object"===e){i=t;break t}r("Cannot parse VAST: non-supported type",e)}i=void 0}return"VAST"!==(t=i.documentElement).nodeName&&r("Invalid VAST XML",u.default.jr),t}(t))},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(334),o=i(r),s=i(r=n(375)),a=i(r=n(202)),u=i(r=n(112)),l=i(r=n(224)),c=i(n=n(13)),d=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,"VAST",[o.default,s.default]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[d]=n,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Gg=function(){return!0},e.prototype.ea=function(t){var e=this,n=new a.default,i=c.default.Sa(t);if(n.kI=t.getAttribute("adaptvFailover")||!1,t=i.Error){var r=this.Md("Error");t.forEach(function(t){(t=r.parse(t))&&n.bb.push(t)})}if((t=i.Extensions)&&this[d]&&t.forEach(function(t){(c.default.Sa(t).Extension||[]).forEach(function(t){(t&&t.getAttribute("type"))===u.default.Gl&&(t=c.default.Sa(t).Feacons,new l.default(t).prepare(e[d],!0))})}),i=i.Ad){var o=this.Md("Ad");i.forEach(function(t,e){(t=o.parse(t))&&(t.Gu=e+1,n.ads.push(t))})}return n},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=i(n(335)),o=i(n=n(373));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Ad",[r.default,o.default]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=null,n=t.firstElementChild,i=this.Md(n.nodeName);return i&&((e=i.parse(n)).id=t.getAttribute("id"),t=t.getAttribute("sequence"))&&(e.oc=+t),e},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(219));var r=n(57),o=i(n(372)),s=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"InLine",[r.Ql]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);return e=s.default.zn(e),n.title=s.default.Xa(e.AdTitle),n.description=s.default.Xa(e.Description),n.Qz=s.default.Xa(e.Advertiser),n.iF=r.Ql.parse(e.Survey),n},e.prototype.Ss=function(){return new o.default},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(109));var r=i(n(338)),o=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"AdSystem");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new r.default;return e.version=t.getAttribute("version"),e.name=o.default.Xa(t),e},e}(t.default),e.default=new n},function(t,e,n){var i=(t=n(1))(i||{},{Oa:{}});(i=t(n(28).vdb,i||{})).Oa={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},e.vdb={Oa:i.Oa},e.default=i.Oa,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.name=this.version=""}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(340),o=i(r),s=i(r=n(348)),a=i(n=n(353));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Creative",[o.default,s.default,a.default]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=this,n=null;return[].slice.call(t.childNodes).forEach(function(i){var r=e.Md(i.nodeName);r&&(n=r.parse(i))&&(n.id=t.getAttribute("id"),i=t.getAttribute("sequence"),n.oc=isNaN(i)?0:i,n.Gz=t.getAttribute("adID")||t.getAttribute("AdID"))}),n},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(341));t=i(t=n(45));var o=n(152),s=i(o),a=n(111),u=i(o=n(345)),l=i(o=n(221)),c=i(o=n(93)),d=i(o=n(13)),h=i(n=n(5));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Linear",[s.default,a.ll,a.ml,a.rl,r.default,u.default,l.default]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new c.default,n=d.default.zn(t);if((t=t.getAttribute("skipoffset"))&&(e.Hf=!0,"%"===t.slice(-1)?e.Sk=Number(t.slice(0,-1)):e.Tk=h.default.Ke(t)),t=d.default.Xa(n.Duration),e.duration=t?h.default.Ke(t):NaN,(t=n.AdParameters)&&(e.parameters=l.default.parse(t)),(t=n.TrackingEvents)&&(d.default.Sa(t).Tracking||[]).forEach(function(t){return e.Ic.push(s.default.parse(t))}),t=n.VideoClicks){var i=(t=d.default.Sa(t)).ClickThrough;i&&(i=i[0])&&(e.Jb=a.ll.parse(i)),(i=t.ClickTracking)&&i.forEach(function(t){return e.Ms.push(a.ml.parse(t))}),(t=t.CustomClick)&&(t=t[0])&&(e.zA=a.rl.parse(t))}return(t=n.Icons)&&(t=d.default.Sa(t).Icon)&&t.forEach(function(t){return e.Ae.push(u.default.parse(t,!0))}),((n=n.MediaFiles)&&d.default.Sa(n).MediaFile||[]).forEach(function(t){(t=r.default.parse(t))&&e.ei.push(t)}),e},e}(t.default),e.default=new n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=n(111);var i=n(342),r=n(343),o=r&&r.__esModule?r:{default:r},s=(n=n(29))&&n.__esModule?n:{default:n};n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"MediaFile");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);switch(String(e.getAttribute("delivery"))){case"streaming":n.bt=i.Gx;break;case"progressive":n.bt=i.px}var r=e.getAttribute("height");return n.height=isNaN(r)?0:r,r=e.getAttribute("width"),n.width=isNaN(r)?0:r,n.pA=e.getAttribute("codec"),n.ak=e.getAttribute("bitrate"),n.TD=e.getAttribute("minBitrate"),n.maxBitrate=e.getAttribute("maxBitrate"),r=e.getAttribute("scalable"),n.Ff=!r||("true"===r||0<parseInt(r)),n.ci="true"===e.getAttribute("maintainAspectRatio"),n.mimeType=e.getAttribute("type"),n.Mc=e.getAttribute("apiFramework"),n.url&&-1!==n.url.indexOf("acds.prod.vidible.tv")&&(n.uo=s.default.eb("placementId",n.url)),n},e.prototype.Ch=function(){return new o.default},e}(t.qq),e.default=new n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=""+e},e.Gx=new t("STREAMING"),e.px=new t("PROGRESSIVE")},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).bt=null,n.mimeType="",n.width=null,n.height=null,n.pA="",n.ak=null,n.TD=null,n.maxBitrate=null,n.Ff=!0,n.ci=!0,n.Mc="",n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(220)).default),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).type=i,n.offset=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(110)).default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(346),o=i(r),s=i(r=n(13)),a=i(n=n(5));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Icon");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new o.default;e.width=+t.getAttribute("width")||0,e.height=+t.getAttribute("height")||0,e.Xk=+t.getAttribute("xPosition")||t.getAttribute("xPosition"),e.Yk=+t.getAttribute("yPosition")||t.getAttribute("yPosition"),e.offset=a.default.Ke(t.getAttribute("offset")||""),e.duration=a.default.Ke(t.getAttribute("duration")||""),t=s.default.Sa(t);var n=s.default.Sa(t.IconClicks[0]),i=n.IconClickThrough&&n.IconClickThrough[0];return n=n.IconClickTracking&&n.IconClickTracking[0],t.StaticResource&&t.StaticResource[0]&&(e.Su=s.default.Xa(t.StaticResource[0]).trim()),t.IconViewTracking&&t.IconViewTracking[0]&&(e.To=s.default.Xa(t.IconViewTracking[0]).trim()),i&&(e.Km=s.default.Xa(i).trim()),n&&(e.Lm=s.default.Xa(n).trim()),e},e}(t.default),e.default=new n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.height=this.width=null,this.To=this.Lm=this.Km=this.Su=this.Yk=this.Xk="",this.duration=this.offset=null}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.value="",this.NF=!1}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(152),o=i(r),s=i(r=n(349)),a=i(r=n(216)),u=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"NonLinearAds",[o.default,s.default]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new a.default,n=(t=u.default.Sa(t)).NonLinear;return n&&n.forEach(function(t){return e.lu.push(s.default.parse(t))}),(t=t.TrackingEvents)&&(u.default.Sa(t[0]).Tracking||[]).forEach(function(t){return e.Ic.push(o.default.parse(t))}),e},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(222));var r=n(57),o=n(111),s=i(n(352)),a=i(n=n(5));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"NonLinear",[r.Dl,o.El]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e),i=e.getAttribute("scalable");n.Ff=!i||("true"===i||0<parseInt(i));var r="true"===(i=e.getAttribute("maintainAspectRatio"))||0<parseInt(i);return n.ci=!i||r,e=e.getAttribute("minSuggestedDuration"),n.ju=e?a.default.Ke(e):NaN,n},e.prototype.Us=function(){return new s.default},e.prototype.Zm=function(){return r.Dl.xe()},e.prototype.$m=function(){return o.El.xe()},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eq=e.gq=e.Zq=void 0,t=i(t=n(109));var r=n(351),o=i(r);r=n(106);var s=i(n=n(13));n=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).jz=i,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new o.default;return e.type=this.jz,e.value=s.default.Xa(t),e.mimeType=t.getAttribute("creativeType"),e},e}(t.default),e.Zq=new n("StaticResource",r.nj),e.gq=new n("IFrameResource",r.xl),e.eq=new n("HTMLResource",r.vl)},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=null,this.value=this.mimeType=""}},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).Ff=!0,n.ci=!0,n.ju=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(223)).default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(354),o=i(r),s=i(r=n(108)),a=n(356),u=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"CompanionAds",[o.default]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new s.default,n=t.getAttribute("required");switch(String(n)){case"all":e.required=a.be;break;case"any":e.required=a.Lv;break;case"none":e.required=a.NONE}return(n=u.default.Sa(t,["Companion"]).Companion)&&(e.xm=t.outerHTML,n.forEach(function(t){return e.fk.push(o.default.parse(t))})),e},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(222));var r=n(57),o=n(111),s=i(n(355)),a=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Companion",[r.nl,o.ol]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);n.Uz=e.getAttribute("assetWidth"),n.Tz=e.getAttribute("assetHeight"),n.ws=e.getAttribute("adSlotID");var i=(e=a.default.zn(e)).AltText;if(i&&(n.Sz=a.default.Xa(i)),e=e.TrackingEvents){var r=this.Md("Tracking");(a.default.Sa(e).Tracking||[]).forEach(function(t){return n.Ic.push(r.parse(t))})}return n},e.prototype.Us=function(){return new s.default},e.prototype.Zm=function(){return r.nl.xe()},e.prototype.$m=function(){return o.ol.xe()},e}(t.default),e.default=new n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).Uz=null,n.Tz=null,n.ws="",n.Sz="",n.Ic=[],n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(223)).default),e.default=t},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.value=""+e},e.be=new t("ALL"),e.Lv=new t("ANY"),e.NONE=new t("NONE")},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(45));var r=n(358),o=i(r),s=i(r=n(224)),a=i(r=n(112)),u=i(r=n(361)),l=i(r=n(113)),c=i(r=n(365)),d=i(r=n(366)),h=i(r=n(367)),p=i(r=n(368)),f=i(r=n(369)),_=i(r=n(370)),m=i(r=n(371)),y=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Extension");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(t){var e=new o.default;e.type=t.getAttribute("type");var n=y.default.Sa(t);switch(e.type){case a.default.Wq:e.scripts=function(){var t=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){return t.push(new c.default(e))}),t}(n.Script);break;case a.default.lq:e.Xt=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e={};return Object.keys(t).forEach(function(n){n=new _.default(n,t[n][0]),e[n.type]=n.value}),e}(n);break;case a.default.cr:e.Uu=function(){var t=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){return t.push(new d.default(e))}),t}(n.Beacon);break;case a.default.fq:e.Wk=function(){var t=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){return t.push(new l.default(e))}),t}(n.Beacon);break;case a.default.Jp:e.Xs=function(){var t=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){return t.push(new h.default(e))}),t}(n.Beacon);break;case a.default.ep:e.us=function(t){var e=[];return(y.default.Sa(t).AdChrome||[]).forEach(function(t){"MoatChrome"===t.getAttribute("type")&&e.push(new u.default(t))}),e}(n.AdChromes[0]);break;case a.default.uq:e.Wn=new m.default(t);break;case a.default.yp:e.Hs=function(){var t=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){return t.push(new p.default(e))}),t}(n.Caption);break;case a.default.br:e.Dz=function(){return new f.default(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[])}(n.Projection[0]);break;case a.default.Gl:e.Hh.push(new s.default(n.Feacons))}return e},e.prototype.Gg=function(t){return t&&t.nodeName===this.xe()},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(10)),o=i(t=n(192));t=i(t=n(3));var s=n(12),a=i(s),u=i(s=n(112)),l=i(s=n(359)),c=i(n=n(360)),d=t.default.I("VastExtension");n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=null,this.Xt={},this.scripts=[],this.Uu=[],this.Xs=[],this.Wk=[],this.us=[],this.Hs=[],this.Wn=null,this.Hh=[]}return t.prototype.prepare=function(t){switch(d.debug("prepare",this.type),this.zb=new o.default,this.FF=t,this.H=t.H,this.kf=t.fB(),this.ad=t.ad,this.type){case u.default.Wq:(function(){var t=this;this.scripts.forEach(function(e){return e.prepare(t.zb,t.ad,t.kf,t.H)})}).call(this);break;case u.default.cr:(function(){var t=this;this.Uu.forEach(function(e){return e.prepare(t.zb,t.ad,t.kf,t.H)})}).call(this);break;case u.default.fq:this.Uo=new l.default(this.zb,this.Wk,this.H);break;case u.default.Jp:(function(){var t=this;this.Xs.forEach(function(e){return e.prepare(t.zb,t.FF)})}).call(this);break;case u.default.ep:(function(){var t=this;this.us.forEach(function(e){return e.prepare(t.H)})}).call(this);break;case u.default.yp:new c.default(this.Hs,this.H.ka()).prepare();break;case u.default.br:this.Dz.prepare(this.ad);break;case u.default.uq:this.Wn&&this.Wn.prepare(this.H,this.zb);break;case u.default.Gl:(function(){var t=this;this.Hh.forEach(function(e){return e.prepare(t.H)})}).call(this)}r.default.Da(this.H,a.default.Yb,function(){d.debug("unbindEvents"),this.zb&&(this.zb.Z(),this.zb=null),this.Uo&&(this.Uo.Z(),this.Uo=null)}.bind(this))},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){return this.type===t.type}function o(t){c.debug("loadViewabilityBeaconScript",t),(t=this.Wk.filter(r,{type:t})[0]).prepare(this.zb,this.H),t.Ia()}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(113));var s=n(44),a=i(s),u=i(s=n(205));s=i(s=n(3));var l=i(n=n(2)),c=s.default.I("ViewabilityBeacon"),d=Symbol();n=function(t){function e(n,i,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");c.debug("init");var s=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(s=!s||"object"!=typeof s&&"function"!=typeof s?this:s).zb=n,s.Wk=i,s.H=r,n=(i=r.ka()).K(l.default.za),i=i.K(l.default.Ya),s[d]=new u.default(n,i),s[d].Hu(o.bind(s,a.default.eh),o.bind(s,a.default.$f),o.bind(s,a.default.dh)),s}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Z=function(){this[d].Z()},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(12)),o=i(n(2)),s=i(n(10)),a=i(n=n(29)),u=Symbol();n=function(){function t(e,n){var i=this;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.Tu={},this[u]=n,e.forEach(function(t){var e=t.EA,n=t.tt;Object.keys(n).map(function(t){return n[t]=a.default.Im(n[t])}),i.Tu[t.lang]={displayText:e,formats:n}})}return t.prototype.prepare=function(){var t=this,e=this[u].K(o.default.za);s.default.Da(e,r.default.Rf,function(){e.dispatchEvent(new r.default(r.default.Ev,null,{subtitles:t.Tu}))})},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(362)),o=i(n(13)),s=i(n=n(2));n=function(){function t(e){var n=this;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.params=this.pageUrl=this.marketplaceId=this.adId=this.campaignId=this.orgId="";var i=o.default.Sa(e);Object.keys(i).forEach(function(t){return n[t]=o.default.Xa(i[t][0])})}return t.prototype.prepare=function(t){this.params&&(this.params=t.Rd().resolve(this.params));var e=t.ka().K(s.default.ya).Od(),n=t.ka().K(s.default.na);new r.default("aolonebuyervideoflashint2012897410256",function(){return{level1:this.orgId,level2:this.campaignId,level3:this.adId,level4:this.marketplaceId,partnerCode:"aolonebuyervideoflashint2012897410256",slicer1:this.pageUrl,viewMode:"normal",zMoatParams:this.params}}.bind(this),e,t,n).fF(!0)},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(12)),o=i(n(10));n=function(t){function e(n,i,o,s,a){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i,s,r.default.Fa,o,a),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Zl=function(){t.prototype.Zl.call(this),this.Jj=!1,o.default.bind(this.vb,r.default.Pe,this.bz.bind(this)).link(this.Ba),o.default.bind(this.vb,r.default.Yb,this.Zy.bind(this)).link(this.Ba),o.default.bind(this.vb,r.default.Jc,this.$y.bind(this)).link(this.Ba),o.default.bind(this.vb,r.default.Pf,this.az.bind(this)).link(this.Ba),o.default.bind(this.vb,r.default.dl,function(t){this.mz(t.data.adStage)}.bind(this)).link(this.Ba)},e}(i(n=n(363)).default),e.default=n},function(t,e,n){var i=n(1)(i||{},{pa:{nc:{Ji:{},ud:{}}},A:{},log:{},B:{S:{}},f:{G:{}},u:{},ga:{}});i.pa.nc.ud=n(364).vdb.pa.nc.ud,i.A=n(4).vdb.A,i.log=n(21).vdb.log,i.B.S=n(83).vdb.B.S,i.f.G=n(24).vdb.f.G,i.u=n(18).vdb.u,i.ga=n(86).vdb.ga,i.pa.nc.Ji=i.A.Class.extend(function(){var t=i.log.I("vdb.reporting.moat.BaseTracker"),e=""!==i.f.G.eb("moatdebug"),n=i.pa.nc.ud;return{N:function(e,n,r,o,s,a){t.debug("Init Moat tracking"),this.ca=a,this.vb=r,this.bs=e,this.gh=s,this.XB=n,o&&(this.Ko=i.B.S.bind(this.vb,o,this.wA.bind(this)))},wA:function(r){t.debug("Creating new Moat API instance"),this.$s(),this.Ba=i.B.S.empty(),this.$r=new i.ga;var o=isFinite(r.data.duration)?r.data.duration:-1,s=this.ca.Oc(),a=s&&s.videoUrls&&s.videoUrls[0];r=this.XB(s,r),e&&t.warn("MOAT: ",r),this.vA(r,o,a),this.aD(),this.Zl(),this.Lf(n.Nf),this.Lf(n.Ai)},vA:function(t,e,n){this.fg="_moatApi"+Math.floor(1e8*Math.random()),this.Lj={adData:{ids:t,duration:e||0,url:n||"no-video"},dispatchEvent:function(t){this.sendEvent&&this.sendEvent(t)}},t=this.gh.ownerDocument,this.vm=t.defaultView||t.parentWindow,this.vm[this.fg]=this.Lj},aD:function(){var t="https://z.moatads.com/"+this.bs+"/moatvideo.js#"+this.fg;this.Gd=document.createElement("script"),this.Gd.type="text/javascript",this.gh.insertBefore(this.Gd,this.gh.childNodes[0]||null),this.Gd.src=t,this.Gd.onload=function(){this.$r.resolve(),i.u.Ah(function(){[].forEach.call(document.querySelectorAll('[id^="MoatPx"]'),function(t){t.tabIndex=-1})})}.bind(this)},Lf:function(n){n={type:n,adVolume:this.ca.getVolume()},e&&t.warn("MOAT:",this.bs,n),this.$r.Ea().then(this.Lj.dispatchEvent.bind(this.Lj,n))},$s:function(){if(this.nz&&(this.Ko&&this.Ko.Z(),this.Ko=null),this.fg)try{delete this.vm[this.fg]}catch(t){this.vm[this.fg]=void 0}this.Gd&&this.Gd.parentNode&&this.Gd.parentNode.removeChild(this.Gd),this.Ba&&this.Ba.Z(),this.Lj=this.Gd=this.fg=void 0},fF:function(t){this.nz=t},Zl:function(){this.Jj=!1},bz:function(){this.Lf(n.hl)},Zy:function(){this.Lf(n.xi),this.$s()},$y:function(){this.Jj=!0,this.Lf(n.Jc)},az:function(){this.Jj&&(this.Jj=!1,this.Lf(n.cl))},mz:function(t){(t=n.rx[t])&&this.Lf(t)}}}()),e.vdb={pa:{nc:{Ji:i.pa.nc.Ji}}},e.default=i.pa.nc.Ji,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{pa:{nc:{ud:{}}}});i.pa.nc.ud={Nf:"AdImpression",Ai:"AdVideoStart",hl:"AdVolumeChange",xi:"AdVideoComplete",Jc:"AdPaused",cl:"AdPlaying",yi:"AdVideoFirstQuartile",zi:"AdVideoMidpoint",Bi:"AdVideoThirdQuartile"},(t=i.pa.nc.ud).rx={q1:t.yi,q2:t.zi,q3:t.Bi},e.vdb={pa:{nc:{ud:i.pa.nc.ud}}},e.default=i.pa.nc.ud,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){"url"===this.AE?(this.value=this.H.Rd().resolve(this.value),this.te.Bg(this.value)):this.Qj=this.te.Ut(this.value)}Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(2)),s=i(n(10)),a=i(n(34)),u=i(n(12)),l=i(n(17)),c=i(n=n(13));n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.AE=e.getAttribute("resourceType"),this.event=e.getAttribute("event"),this.value=c.default.Xa(e)}return t.prototype.prepare=function(t,e,n,i){this.kf=n,this.H=i,this.te=i.ka().K(o.default.Ga),t.wb(s.default.bind(i,u.default.Yb,function(){this.Qj&&this.Qj.parentNode&&this.Qj.parentNode.removeChild(this.Qj)}.bind(this))),this.event===a.default.vc?t.wb(s.default.bind(e,l.default.vc,r.bind(this))):r.call(this)},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=this;this.zb.wb(c.default.bind(this.H,t,function(){clearTimeout(n.Es),n.Es=setTimeout(n.Ia.bind(n),n.timeout),n.zb.wb(c.default.Da(n.H,e,o.bind(n))),n.zb.wb(c.default.bind(n.H,l.default.Yb,o.bind(n)))}))}function o(){clearTimeout(this.Es)}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(113));var s=n(44),a=i(s),u=i(s=n(112)),l=i(s=n(12)),c=i(n=n(10));n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.prepare=function(e,n,i,o){if(this.ad=n,this.kf=i,t.prototype.prepare.call(this,e,o),(e=function(){return this.ad.tf.filter(function(t){return t.type===u.default.lq})[0]}.call(this))&&(this.timeout=e.Xt[this.type]),!this.timeout)switch(this.type){case a.default.jp:this.timeout=5e3;break;case a.default.np:this.timeout=7e3;break;case a.default.xp:this.timeout=3e4}switch(this.type){case a.default.jp:r.call(this,l.default.ae,l.default.Fa);break;case a.default.np:r.call(this,l.default.Fa,l.default.Zb);break;case a.default.xp:r.call(this,l.default.ui,l.default.Fa)}},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(113));var r=n(44),o=i(r),s=i(r=n(17)),a=i(r=n(51)),u=i(n=n(10));n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.prepare=function(e,n){switch(t.prototype.prepare.call(this,e,n.H),this.type){case o.default.Sf:this.zb.wb(u.default.Da(n,a.default.Bp,this.Ia.bind(this)));break;case o.default.Sg:case o.default.Ki:(function(t,e){var n=this;this.zb.wb(u.default.bind(t,e,function(t){((t=t.Nh().fk)&&n.type===o.default.Sg||!t&&n.type===o.default.Ki)&&n.Ia()}))}).call(this,n.ad,s.default.kb)}},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(13));e.default=function t(e){var n=this;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.lang=e.getAttribute("lang"),this.EA=e.getAttribute("displayText"),this.tt={},(i.default.Sa(e).Format||[]).forEach(function(t){return n.tt[t.getAttribute("type")]=i.default.Xa(t)})}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=e.getAttribute("type")}return t.prototype.prepare=function(t){t.Qs={WH:this.type||"Equirectangular"}},t}(),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(13));e.default=function t(e,n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.type=e.match(/([A-Z]?[^A-Z]*)/g).slice(0,-1).join("_").toLowerCase(),this.value=i.default.Xa(n)}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){this.om.Iu(l.default.pd,this.ZD),this.H.Ld().no=this.$D}Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(13)),s=i(n(12)),a=i(n(87)),u=i(n(10)),l=i(n(195)),c=i(n(2)),d=i(n=n(22));n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.Nm=JSON.parse(o.default.Xa(e))}return t.prototype.prepare=function(t,e){this.H=t,e.wb(u.default.bind(t,s.default.Yb,function(){this.Nm.replace=!0,this.Nm.type=d.default.fb,this.ZD=this.om.vk()[l.default.pd],this.om.Iu(l.default.pd,this.Nm),u.default.group(u.default.Da(this.H,a.default.LOADED,r.bind(this)),u.default.Da(this.H,a.default.Se,r.bind(this))),this.$D=this.H.Ld().no,this.H.Ld().no="00:00:01"}.bind(this))),this.om=this.H.ka().K(c.default.X)},t}(),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).title="",n.description="",n.Qz="",n.iF=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(225)).default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(219));var r=n(57),o=i(n(374)),s=i(n=n(13));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Wrapper",[r.Vl]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);return n.Ks=r.Vl.parse(s.default.ZC(e)),n},e.prototype.Ss=function(){return new o.default},e}(t.default),e.default=new n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(225));var r=n(93),o=i(r);r=i(r=n(44));var s=n(91);s=i(s);var a=n(17),u=i(a);a=i(a=n(92)),n=n(107);var l=[u.default.Ci,u.default.vc,u.default.kb,s.default.Zf,i(n).default.Mi,a.default.Li,r.default.eh,r.default.$f,r.default.dh,r.default.Sf,r.default.LOADED,r.default.fc,r.default.LINEAR_CHANGE];n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).Fk=!0,n.Ks=null,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Wz=function(t){var e=this;t.ads.forEach(function(t){return l.forEach(function(n){return t.addEventListener(n,function(t){var e=t.clone();t.NE(e),this.dispatchEvent(e)}.bind(e))})})},e.prototype.lE=function(t,e){t.ads.forEach(function(t){e.tf&&(t.tf=(t.tf||[]).concat(e.tf)),t.yb.forEach(function(t){var n=0<e.yb.length&&e.yb[0]instanceof o.default;t.Ae&&0===t.Ae.length&&n&&(t.Ae=t.Ae.concat(e.yb[0].Ae))})})},e.prototype.DA=function(t,e){this.Ry||(this.Ry=!0,e=new u.default(u.default.La,null,null,{error:e}),this.dispatchEvent(e),t.ki(e))},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=n(57);var i=function(t){return t&&t.__esModule?t:{default:t}}(n(376));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.call(this,"Error");if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.ea=function(e){var n=t.prototype.ea.call(this,e);return n.version=e.getAttribute("version"),n},e.prototype.Ch=function(){return new i.default},e}(t.oj),e.default=new n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n).version=i,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(110)).default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(226));var r=n(211),o=i(r),s=i(r=n(52));n=i(n=n(2)),t=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Gh=function(){this.Tr=["addVPAID"],t.prototype.Gh.call(this,"vpaid-runner.swf")},e.prototype.Yj=function(t,e){var n=this;this.qb=t;var i=new s.default;return this.ph.Ea().then(function(){try{var t=n.Ca.addVPAID(e);n.Ca["events"+t]=n.Cd["events"+t];var r=n.Cd["events"+t];r.readyCallback(),r.addEventListener("VPAIDWrapper.READY",function(t,e){t.resolve({data:{height:this.qb.offsetHeight,width:this.qb.offsetWidth},Vo:new o.default(this,e)})}.bind(n,i,t)),r.addEventListener("VPAIDWrapper.ERROR",function(t,e){t.reject("VPAID number "+e+" failed.")}.bind(n,i,t))}catch(t){i.reject("Critical problem with vpaid initialisation")}},i.reject.bind(i)),i.Ea()},e}(t.default),e.default=t,t.W=[n.default.Ga,n.default.Ha,n.default.bc,n.default.ya,n.default.na,n.default.X,n.default.za]},function(t,e,n){function i(t){var e=void 0;try{e=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(t){try{e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash.7").GetVariable("$version")}catch(t){try{e=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash.6").GetVariable("$version")}catch(t){}}}return(e=(e=o.exec(e))?[1*e[1],1*e[9<1*e[1]?2:3]]:[0,0])[0]>t[0]||e[0]===t[0]&&e[1]>=t[1]}Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){return t&&t.__esModule?t:{default:t}}(n(5)),o=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,s={allowFullScreen:!0,allowScriptAccess:"always",height:"100%",width:"100%"};e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.KA=function(t,e,n){return i((e=r.default.extend(s,e)).version)?(window.attachEvent&&window.attachEvent("onbeforeunload",function(){window.eH=function(){},window.dH=function(){}}),t.innerHTML=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n='<object width="'+t.width+'" height="'+t.height+'" id="'+t.id+'"';n=document.all?n+' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"':n+' data="'+t.src+'" type="application/x-shockwave-flash"',n+=">",document.all&&(n+='<param name="movie" value="'+t.src+'" />'),t.width=t.height=t.id=t.src=null,t.onFail=t.version=null,Object.keys(t).forEach(function(e){t[e]&&(n+='<param name="'+e+'" value="'+t[e]+'" />')});var i="";return Object.keys(e).forEach(function(t){return i+=t+"="+e[t]+"&"}),i=i.slice(0,-1),n+='<param name="flashvars" value="'+i.replace(/"/g,"%5C%22")+'" />',n+="</object>"}(e,n),document.all&&(window[e.id]=document.getElementById(e.id)),t.firstChild):e.onFail()},t}()},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=(t=n(5))&&t.__esModule?t:{default:t},r=(n=n(103))&&n.__esModule?n:{default:n},o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),d=Symbol(),h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol();n=function(){function t(e,n,m){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");if(this[o]=e,this[s]=n,this[a]=m||n,e=i.default.xb.chrome&&!i.default.Hk()&&45<=i.default.xb.version&&"false"!==this[o].Mb(r.default.zp),n=500>this[s].clientWidth||300>this[s].clientHeight,e&&n){for(this[l]=this[s].style.width,this[c]=this[s].style.height,this[d]=this[s].style.maxWidth,this[h]=this[s].style.maxHeight,this[p]=this[s].style.position,this[f]=this[s].style.visibility,e=this[s],this[u]=[];e;)try{(n=e=e.ownerDocument.defaultView.frameElement)===this[a].ownerDocument.defaultView.frameElement&&(this[_]=i.default.createElement("div",{class:"vdb-chrome-hack-background",style:{backgroundColor:"#000000",height:n.clientHeight+"px",width:n.clientWidth+"px"}}),i.default.createElement("div",{class:"vdb-player-spinner",style:{left:n.clientWidth/2-33+"px",top:n.clientHeight/2-33+"px"}},this[_]),n.parentNode.insertBefore(this[_],n)),e&&(this[u].push({xA:e.style.height,yA:e.style.width,frame:e,height:e.height,visibility:e.style.visibility,width:e.width}),i.default.Je(e,{height:"300px",visibility:"hidden",width:"500px"}),e.width=500,e.height=300)}catch(t){e=null}i.default.Je(this[s],{height:"300px","max-height":"","max-width":"",position:"fixed",visibility:"hidden",width:"500px"}),i.default.lf(this[a].parentElement,"chrome-mode-hack-on")}}return t.prototype.xE=function(){this[u]&&(function(){i.default.Ef(this[_]);var t=this[s];this[u].forEach(function(e){try{(t=e.frame)&&(t.style.visibility=e.visibility,e.width?t.width=e.width:t.removeAttribute("width"),e.height?t.height=e.height:t.removeAttribute("height"),i.default.Je(t,{height:e.xA,visibility:e.visibility,width:e.yA}))}catch(t){}}),this[u]=null,i.default.Je(this[s],{height:this[c],"max-height":this[h],"max-width":this[d],position:this[p],visibility:this[f],width:this[l]})}.call(this),i.default.Ie(this[a].parentElement,"chrome-mode-hack-on"))},t}(),e.default=n},function(t,e,n){e=n(381),t.exports="string"==typeof e?e:e.toString()},function(t,e,n){(t.exports=n(147)(!1)).push([t.yk,".flash-runner {\n    width: 100%;\n    height: 100%;\n    position: absolute;\n    z-index: -100;\n    top: 0;\n    left: 0;\n}\n",""])},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(226));var r=i(n(383));n=i(n=n(2)),t=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Gh=function(){this.Tr=["addFLVPlayer"],t.prototype.Gh.call(this,"flv-runner.swf")},e.prototype.Lz=function(){var t=this;return this.wg().then(function(){var e=t.Ca.addFLVPlayer();return t.Ca["events"+e]=t.Cd["events"+e],t.Cd["events"+e].readyCallback(),new r.default(t,e)})},e}(t.default),e.default=t,t.W=[n.default.Ga,n.default.Ha,n.default.bc,n.default.ya,n.default.na,n.default.X,n.default.za]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),t=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Mt=function(){return this.V("getTotalTime")},e.prototype.getCurrentTime=function(){return this.V("getCurrentTime")},e.prototype.an=function(){return this.V("getCurrentPercent")},e.prototype.seek=function(t){this.V("seek",t)},e.prototype.stop=function(){this.V("stop")},e.prototype.pause=function(){this.V("pause")},e.prototype.resume=function(){this.V("resume")},e.prototype.getState=function(){return this.V("getState")},e.prototype.play=function(t){this.V("play",t)},e.prototype.Mu=function(t){this.V("setSoundTransform",t)},e.prototype.Lu=function(t,e){this.V("setSize",t,e)},e.prototype.destroy=function(){this.Ca.tE(this.Hj),this.Ca.ye()},e}(function(t){return t&&t.__esModule?t:{default:t}}(n(104)).default),e.default=t},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(72)),o=i(t=n(2));t=i(t=n(3));var s=n(143);s=i(s);var a=n(385),u=i(a),l=i(a=n(387)),c=i(a=n(388)),d=i(n=n(391)),h=t.default.I("GeminiEngineProducer");n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.gk=function(t){h.debug("createAdEngine",t);var e=this.rk().ka().Ts();return e.Pb(o.default.$d,t),e.oa(o.default.bj,c.default),e.oa(o.default.Wi,u.default),e.oa(o.default.Vf,l.default),e.Wb(d.default)},e.prototype.getType=function(){return r.default.Vi},e}(s.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=this[p].Wb(c.default);return e.Ku(new d.default("default",t)),e}Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(2)),s=i(n(217)),a=i(n(5)),u=i(n(209)),l=i(n(228)),c=i(n(229)),d=i(n=n(230)),h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol(),y=Symbol(),v=Symbol(),g=Symbol(),E=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[f]=e[o.default.Ua],this[_]=e[o.default.X],this[m]=e[o.default.Qb],this[y]=e[o.default.ac],this[v]=e[o.default.Ya],this[E]=e[o.default.bj],this[p]=e[o.default.Sb],e=100;var n=this[y].Qh()*this[y].Lh();(a.default.xb.Yh||3e4<n)&&(e=80),this[g]={},this[g].inView100=r.call(this,{a:1,c:0,p:100}),this[g].inView50=r.call(this,{a:0,c:0,p:50}),this[g].inView50Continuous=r.call(this,{a:0,c:1,p:50}),this[g].inView50Continuous=r.call(this,{a:0,c:1,p:e}),e=this[m].Qu,e=[[l.default.ry,this[_].cu()],[l.default.xy,e&&!a.default.Rc(e)||!1],[l.default.wy,function(){return this[y].Qh()}.bind(this)],[l.default.vy,function(){return this[y].Lh()}.bind(this)],[l.default.Ay,function(){var t=this[v].ua();return 0>t?3:50>t?2:1}.bind(this)],[l.default.py,function(){return this[f].isMuted()?2:1}.bind(this)],[l.default.sy,function(){return u.default.enabled()&&u.default.zg()}.bind(this)],[l.default.qy,function(){return this[g].inView100.Ph()}.bind(this)],[l.default.uy,function(){return encodeURIComponent(this[E].aC())}.bind(this)],[l.default.yy,function(){return this[g].inView50.Ph()}.bind(this)],[l.default.zy,function(){return this[g].inView50Continuous.Ph()}.bind(this)],[l.default.ty,function(){var t=1e3*this[f].getDuration()||3e4;return this[g].inView50Continuous.Ph()>Math.min(t/2,15e3)}.bind(this)]],this[h]=s.default.create.apply(null,e)}return t.prototype.resolve=function(t,e){return e?(e=s.default.create.apply(null,e),e=this[h].join(e)):e=this[h],e.resolve(t)},t}(),e.default=n,n.W=[o.default.Sb,o.default.Ua,o.default.Qb,o.default.X,o.default.ac,o.default.bj,o.default.Ya]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(3)).default.I("BaseViewabilityRules"),r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol();t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");i.debug("constructor"),this[r]=2,this[o]=50,this[s]=!1,this[a]=!1,this[u]=null}return t.prototype.jn=function(){return this[r]},t.prototype.hn=function(){return this[o]},t.prototype.Fn=function(){return this[s]},t.prototype.Dn=function(){return this[a]},t.prototype.vn=function(){return this[u]},t}(),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(2)),r=Symbol(),o=Symbol();t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[r]=e[i.default.Ga],this[o]=e[i.default.Wi]}return t.prototype.ot=function(t){var e=this,n=t.hE;t.uu.forEach(function(t){e[r].createElement("img").src=e[o].resolve(t,n)})},t}(),e.default=t,t.W=[i.default.Ga,i.default.Wi]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){return 1}function o(){return Date.now()}function s(){var t=(new Date).getTime(),e=document.createElement("template"),n=document.createElement("details"),i=document.createElement("img");return(new _.default).append(this[S].Ls&&this[S].Ls.tI).append(document.documentMode).append(document.fonts&&document.fonts.ready).append(1&t).append(this[S].ActiveXObject).append(this[S].Ls).append(this[I].serviceWorker).append(this[S].opera).append(this[S].sidebar).append(!1).append(2&t).append(!this[S].ActiveXObject).append(d.call(this,"-ms-ime-align")).append(d.call(this,"-ms-scroll-limit")).append(c.call(this,"-webkit-font-feature-settings")).append(4&t).append(this[S].ActiveXObject).append(d.call(this,"-moz-appearance")||d.call(this,"mozAppearance")).append(this[S].hH).append(this[S].qH).append(Object.prototype.hasOwnProperty.call(e,"content")).append(this[S].performance&&Object.prototype.hasOwnProperty.call(this[S].performance,"getEntriesByType")).append(8&t).append(c.call(this,"image-rendering")).append(c.call(this,"object-fit")).append(Object.prototype.hasOwnProperty.call(n,"open")).append(this[S].screen&&Object.prototype.hasOwnProperty.call(this[S].screen,"orientation")).append(this[S].performance).append(c.call(this,"shape-image-threshold")).append(this[E][0]).append(Object.prototype.hasOwnProperty.call(i,"srcset")).append(this[b]).rn()}function a(){var t=(new Date).getTime(),e=y.default.eA();return(new _.default).append(this[A]).append(32&t).append(this[E][1]).append(this[E][2]).append(y.default.mA()).append(y.default.lA()).append(y.default.gA()).append(64&t).append(e||f.default.ma(this[I].vibrate)?1:0).append(e).append(this[E][3]).append(y.default.jA()).append(h.call(this,"image-rendering","pixelated")).append(f.default.ma(document.uH)).append(h.call(this,"object-fit","inherit")).append(h.call(this,"shape-image-threshold",.9)).append(h.call(this,"word-break","keep-all")).append(y.default.iA()).append(this[R]&&f.default.ma(this[T].supports)).append(this[S].Intl&&f.default.ma(this[S].Intl.Collator)).append(f.default.ma(document.createElement("dialog").show)).append(256&t).append(this[E][4]).append(this[E][5]).append(document.documentElement&&f.default.ma(document.documentElement.webkitRequestFullScreen)).append(f.default.ma(this[I].getBattery)).append(this[I].permissions&&f.default.ma(this[I].permissions.query)).append(this[S].AudioContext&&f.default.ma((new this[S].AudioContext).createBuffer)).append(this[E][6]).append(this[S].webkitRequestAnimationFrame&&f.default.ma(this[S].webkitRequestAnimationFrame)).append(this[S].BroadcastChannel&&f.default.ma(this[S].BroadcastChannel.call)).rn()}function u(){var t=(new Date).getTime();return(new _.default).append(f.default.ma(this[S].FontFace)).append(f.default.ma(this[S].Gamepad)).append(1024&t).append(f.default.ma(this[S].MutationEvent)).append(f.default.ma(this[S].MutationObserver)).append(this[S].crypto&&f.default.ma(this[S].crypto.getRandomValues)).append(f.default.ma(document.body.createShadowRoot)).append(f.default.ma(document.body.webkitCreateShadowRoot)).append(f.default.ma(this[S].fetch)).append(f.default.ma(this[S].createImageBitmap)).append(this[I].serviceWorker&&f.default.ma(this[I].serviceWorker.register)).append(f.default.ma(this[I].webkitGetGamepads)).append(this[S].speechSynthesis&&f.default.ma(this[S].speechSynthesis.speak)).append(f.default.ma(this[S].webkitRTCPeerConnection)).append(h.call(this,"--fake-var",0)).append(4096&t).append(h.call(this,"cursor","grab")).append(h.call(this,"cursor","zoom-in")).append(h.call(this,"image-orientation","270deg")).append(f.default.ma(this[S].Proxy)).append(h.call(this,"position","sticky")).append(void 0===document.createElement("style").aI).append(this[C]&&this[C].getEntriesByType&&this[C].getEntriesByType("resource")instanceof Array).append(void 0===this[S].oG).append(y.default.fA()).append("boolean"==typeof this[I].onLine).append(16384&t).append(void 0===this[I].sI).append(this[C]&&this[C].now&&"number"==typeof this[C].now()).append(y.default.kA()).append(y.default.cA()).append(y.default.hA()).rn()}function l(){return(new Date).getTimezoneOffset()}function c(t){return this[P]&&Object.prototype.hasOwnProperty.call(this[P],t)}function d(t){return this[L]&&Object.prototype.hasOwnProperty.call(this[L],t)}function h(t,e){return this[R]&&this[T].supports(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var p=n(5),f=i(p),_=i(p=n(389)),m=i(p=n(75)),y=i(n=n(390)),v=t.default.I("MoatIvtResolver"),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol(),L=Symbol();n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");v.debug("init"),this[b]=0,this[A]=0,this[P]=document&&document.body&&document.body.style?document.body.style:{},this[L]=document&&document.documentElement&&document.documentElement.style?document.documentElement.style:{},this[S]=m.default.tb(),this[T]=this[S].CSS,this[I]=this[S].navigator,this[C]=this[S].performance,this[R]=!(!this[S].CSS||!this[S].CSS.supports);var e=document.createElement("div"),n={};if(e.style){e.style.wordSpacing="10%",n[0]="10%"===e.style.wordSpacing?1:0,e.style.width="1px",e.style.width="-webkit-min-content",e.style.width="min-content",n[1]="1px"!==e.style.width?1:0,e.style.width="1px",e.style.width="calc(1px - 1px)",e.style.width="-webkit-calc(1px - 1px)",n[2]="1px"!==e.style.width?1:0,n[3]=f.default.ma(e.matches),n[4]=y.default.dA(e),n[5]=e.Em&&f.default.ma(e.Em)?1:0,e.style.fontStretch="ultra-condensed",n[6]="ultra-condensed"===e.style.fontStretch?1:0;var i=null,c=["{45EA75A0-A269-11D1-B5BF-0000F8051515}","{3AF36230-A269-11D1-B5BF-0000F8051515}","{89820200-ECBD-11CF-8B85-00AA005B4383}"];if(f.default.Be)try{e.addBehavior("#default#clientCaps");for(var d=0;d<c.length;d++)if(i=e.AH(c[d],"componentid").replace(/,/g,".")){n[7]=i.split(".")[0];break}}catch(t){}n[7]=n[7]||0}this[E]=n,this[g]={a:r,b:o,c:s.bind(this),d:a.bind(this),e:u.bind(this),i:function(){return this[E][7]}.bind(this),j:l,k:function(){return(this[S].innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+"x"+(this[S].innerHeight||document.documentElement.clientHeight||document.body.clientHeight)}.bind(this),l:function(){return(this[S].outerWidth||document&&document.body&&document.body.offsetWidth)+"x"+(this[S].outerHeight||document&&document.body&&document.body.offsetHeight)}.bind(this),m:function(){return this[S].screen.availWidth+"x"+this[S].screen.availHeight}.bind(this),n:function(){return this[S].screen.width+"x"+this[S].screen.height}.bind(this),o:function(){return y.default.btoa(this[I].userAgent)}.bind(this),p:function(){return y.default.btoa(this[I].platform)}.bind(this),q:function(){return y.default.btoa(this[I].vendor)}.bind(this)}}return t.prototype.aC=function(){var t=this,e=[];return Object.keys(this[g]).forEach(function(n){try{var i=t[g][n]();e.push(n+"="+i),v.debug("ivt signal composed: "+n+"="+i)}catch(t){v.debug("can't compose ivt signal '"+n+"': "+t.message)}}),e.join("&")},t}(),e.default=n},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=Symbol(),i=Symbol();t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[n]=0,this[i]=0}return t.prototype.rn=function(){return this[i]},t.prototype.append=function(t){return this[i]|=(t?1:0)<<this[n]++,this},t}(),e.default=t},function(c,e,b){Object.defineProperty(e,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g=(c=b(5))&&c.__esModule?c:{default:c},f=(b=b(75))&&b.__esModule?b:{default:b};e.default=function(){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function")}return b.mA=function(){var a=void 0;try{a=function(){var a=!1;eval('func = function(x){ "use strict"; var a = 12; b = a + x*35; }');try{(void 0)()}catch(t){a=!0}return a}()}catch(t){a=0}return a},b.lA=function(){var t=!1;try{({}).vH()}catch(e){t=!0}return t},b.gA=function(){var t=f.default.tb();return!!(g.default.bk(t.AudioContext)&&(t=new t.AudioContext,t=g.default.bk(t.createBufferSource)&&t.createBufferSource()||{},t.detune&&Object.prototype.hasOwnProperty.call(t.detune,"value")))&&(t.detune.value=100,100===t.detune.value)},b.eA=function(){try{var t=document.createElement("canvas");t.width=1,t.height=1;var e=t.getContext("2d");e.globalCompositeOperation="multiply",e.fillStyle="rgb(0,255,255)",e.fillRect(0,0,1,1),e.fill(),e.fillStyle="rgb(255,255,0)",e.fillRect(0,0,1,1),e.fill();var n=e.getImageData(0,0,1,1).data;return n[0]===n[2]&&n[1]===n[3]}catch(t){return!1}},b.jA=function(){try{var t=document.createElement("input");return t.setAttribute("type","range"),"text"!==t.type}catch(t){return!1}},b.iA=function(){try{return eval("1 == [for (item of [1,2,3]) item][0]")}catch(t){return!1}},b.fA=function(){var t=f.default.tb();try{return"object"===a(t.Intl.Collator().resolvedOptions())}catch(t){return!1}},b.kA=function(){var t=f.default.tb();try{return 0===new t.Uint16Array(1)[0]}catch(t){return!1}},b.cA=function(){var t=f.default.tb();try{return t.ActiveXObject&&-1===t.ActiveXObject.toString().indexOf("native")}catch(t){return!1}},b.hA=function(){var t=f.default.tb();try{return-1===Object.prototype.toString.call(t.HTMLElement).indexOf("Constructor")}catch(t){return!1}},b.btoa=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=f.default.tb();if(!g.default.bk(n.btoa)||e){e=String(t),n=0;for(var i="",r=0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.charAt(0|r)||(o="=",r%1);i+=o.charAt((63&n>>8)-r%1*8)){var s=e.charCodeAt(r+=.75);if(255<s)return"";n=n<<8|s}return i}return n.btoa(t)},b.dA=function(t){try{return t.Em&&g.default.ma(t.Em([{JA:"ease-in",transform:"scale(1)"},{JA:"ease-in",transform:"scale(1.3)"}],{duration:1300,KH:1}).reverse)?1:0}catch(t){return 0}},b}()},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){if(-1===this[P].indexOf(t)){var e=this[I]&&this[I][t];e&&(b.debug("Tracking pixels",t,e),this[T].ot({uu:e})),this[P].push(t)}}Object.defineProperty(e,"__esModule",{value:!0});var s=i(t=n(76)),a=i(t=n(2));t=i(t=n(3));var u=n(34),l=i(u),c=i(u=n(150)),d=i(u=n(10)),h=i(u=n(52));u=i(u=n(144));var p=n(88),f=i(p),_=i(p=n(51)),m=i(p=n(17)),y=i(p=n(91)),v=i(p=n(231)),g=i(p=n(392)),E=i(n=n(393)),b=t.default.I("GeminiEngine"),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol(),L=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,n[a.default.Ua],n[a.default.Qb],n[a.default.$d]);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[R]=new h.default,i[P]=[],i[S]=n[a.default.Sb].Ts(),i.J=n[a.default.ya].Od(),i[A]=n[a.default.mb],i[T]=n[a.default.Vf],i[S].Pb(a.default.pd,i),i.H.addEventListener(f.default.Wf,function(){}.bind(i)),b.debug("instance created"),i[S].Wb(E.default).resolve(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){t.prototype.load.call(this),this.Uj(),this.ready(!0)},e.prototype.Ho=function(t){b.debug("show linear ad");var e=this.O.eg.ads[0];this[I]=e.beacons,this.Am(),this.Ig(t),this[C]=this[S].Wb(g.default),this[C].MF(function(t){var e="function"==typeof t.zH&&t.ve();switch(t.type){case m.default.kb:e&&(this.wm(e),c.default.mo(e));break;case m.default.vc:this.Wj();break;case y.default.Zf:var n;switch(e=t.nd,e=(n={},r(n,l.default.$c,v.default.Zx),r(n,l.default.Xg,v.default.$x),r(n,l.default.dd,v.default.ay),r(n,l.default.Va,v.default.Yx),n)[e],o.call(this,e),t.nd){case l.default.Ll:this.xs(t),o.call(this,v.default.by),30<t.data.currentTime&&o.call(this,v.default.Tx);break;case l.default.Va:this.va(s.default.FINISHED,t.data),this.complete();break;case l.default.gj:this.ym(t);break;case l.default.$c:this.va(s.default.$c,t.data);break;case l.default.Xg:this.va(s.default.jj,t.data);break;case l.default.dd:this.va(s.default.dd,t.data)}}}.bind(this)).load(e),this[R].resolve(this[C]),this[L]=d.default.group(d.default.bind(this[C],_.default.Yb,this.mg.bind(this)),d.default.bind(this[C],_.default.Va,this.complete.bind(this)))},e.prototype.Hg=function(){throw Error("overlay is not supported")},e.prototype.stop=function(){b.debug("stop"),this[R].Ea().then(function(t){return t.stop()})},e.prototype.complete=function(){this[L]&&this[L].Z(),t.prototype.complete.call(this)},e.prototype.skip=function(){b.debug("skip"),this[R].Ea().then(function(t){return t.skip()})},e.prototype.pause=function(){b.debug("pause"),this[R].Ea().then(function(t){return t.pause()})},e.prototype.resume=function(){b.debug("resume"),this[R].Ea().then(function(t){return t.resume()})},e.prototype.setVolume=function(t){b.debug("setVolume",t),this[R].Ea().then(function(e){return e.setVolume(t)})},e.prototype.getDuration=function(){return this[C]&&this[C].getDuration()||0},e.prototype.getCurrentTime=function(){return this[C]&&this[C].getCurrentTime()||0},e.prototype.Lb=function(){return this.getDuration()},e.prototype.getAdSkippableState=function(){return!1},e.prototype.getAdCompanions=function(){return""},e}(u.default),e.default=n,n.W=[a.default.Sb,a.default.$d,a.default.Ua,a.default.Qb,a.default.ya,a.default.mb,a.default.Vf]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(2));t=i(t=n(3));var o=i(n(215));n=i(n=n(145));var s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=t.default.I("GeminiAdView");n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=n[r.default.Ua],o=[],d=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,null,{dispatchEvent:function(t){o.forEach(function(e){return e(t)})}},null,n[r.default.$d],i,n[r.default.ac],n[r.default.pd]));return c.debug("instance created"),d[l]=n[r.default.na],d[s]=n[r.default.ya].Od(),d[a]=i,d[u]=o,d}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.MF=function(t){return this[u].push(t),this},e.prototype.load=function(t){t=t.gemini,this.Zu(function(t){var e=this[l].wf();return o.default.Eu(e.width,e.height,(t.mediaInfo||[]).map(function(t){return Object.assign({},t,{mimeType:t.contentType})}),!1)}.call(this,t)).Ck(0),this.sb={Jb:{url:t.clickUrl}}},e.prototype.Jg=function(){},e}(n.default),e.default=n,n.W=[r.default.$d,r.default.pd,r.default.Ua,r.default.ac,r.default.ya,r.default.na]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=this,e=function(){var t=this,e=[];return Object.keys(m).forEach(function(n){(function(t,e){var n=m[e],i=this[f][n];n&&i&&function(t){return t=this[_][t],Array.isArray(t)?t:[t]}.call(this,e).forEach(function(n){t.push(new u.default(e,n,i))})}).call(t,e,n)}),c.debug("rules prepared",e),e}.call(this);return 0<e.length?a.default.all(e.map(function(e){return t[h].Wb(l.default).Ku(e)})).then(function(){}):a.default.resolve()}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var o=n(2),s=i(o),a=i(o=n(138)),u=i(o=n(230)),l=i(o=n(394));n=i(n=n(231));var c=t.default.I("GeminiRulesResolver"),d=Symbol(),h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol(),m={viewabilityDefStatic:n.default.Ex,viewabilityDefStatic3P:n.default.Fx,viewabilityDefVideo:n.default.cy,viewabilityDefVideo3P:n.default.dy};n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");c.debug("constructor",e),this[d]=e[s.default.$d],this[h]=e[s.default.Sb]}return t.prototype.resolve=function(){c.debug("resolve");var t=this[d].eg;return this[p]=t&&t.ads[0]||{},this[_]=this[p].rules||{},this[f]=this[p].beacons||{},r.call(this)},t}(),e.default=n,n.W=[s.default.$d,s.default.Sb]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(2)),o=i(n(228));n=i(n=n(229));var s=Symbol(),a=Symbol();n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,n);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i)[a]=n[r.default.Vf],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.fi=function(){t.prototype.fi.call(this),!this[s]&&this.Ph()/1e3>=this.hb.jn()&&(this[a].ot({uu:this.hb.sC(),hE:function(){var t=this.hb.vn(),e=[];switch(this.hb.getName()){case"viewabilityDefVideo3P":e.push([o.default.By,t]);break;case"viewabilityDefStatic3P":e.push([o.default.Ix,t])}return e}.call(this)}),this[s]=!0)},e}(n.default),e.default=n,n.W=[r.default.za,r.default.Ya,r.default.Vf]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(t=n(72));t=i(t=n(3));var o=i(n(396));n=i(n=n(143));var s=t.default.I("ImaEngineProducer");n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.gk=function(t){s.debug("createAdEngine",t);var e=this.rk();return new o.default(e,e.Ld(),e.wt(),t)},e.prototype.getType=function(){return r.default.hq},e}(n.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=o.call(this);if(this[P]){var e=t.width,n=Math.min(this[P].width,e);t=Math.min(this[P].height,t.height);var i=this.J.style;i.position="absolute",i.bottom="0",i.width=n+"px",i.height=t+"px",i.left=(e-n)/2+"px",this[O].resize(n,t,this[M].ViewMode.NORMAL)}else this[O].resize(t.width,t.height,this[M].ViewMode.NORMAL)}function o(){var t=this.J.parentNode;return{height:t.clientHeight,width:t.clientWidth}}function s(t){t=t.getError().getMessage(),this.Gf(new T.default(t,T.default.kj)),C.error("onError()",t),this.Ee(h.default.LOADED)?this.mk():this.complete(),this.Le(h.default.LOADED,S.default.iq,t,"IMA"),a.call(this)}function a(){var t=this;C.debug("destroy()"),this[R]&&this.H.removeEventListener(b.default.Wf,this[R]),this[O]&&(this[N]&&(this[N].Z(),this[N]=null),this[O].destroy()),setTimeout(function(){t[D]&&t[D].destroy(),t.J.parentNode&&t.J.parentNode.removeChild(t.J)},1e3)}function u(){this.ez||(this.ez=!0,C.debug("onContentPauseRequested()"),this.Am())}function l(){this[k]&&this[k].parentNode&&this[k].parentNode.removeChild(this[k])}function c(){var t=this;if(this[D].initialize(),this[O]){var e=this[M].AdEvent.Type;C.debug("bind AdsManager event listeners"),this[N]=_.default.group(_.default.bind(this[O],e.CONTENT_PAUSE_REQUESTED,u.bind(this)),_.default.bind(this[O],e.CONTENT_RESUME_REQUESTED,function(){C.debug("onContentResumeRequested()"),this.hf?(this.complete(),this.J.style.setProperty("visibility","hidden")):(this.Gf(new T.default("IMA fired the event onContentResumeRequested but an ad was not started")),this.complete(),this.Le(h.default.LOADED,S.default.iq,"IMA fired the event onContentResumeRequested but an ad was not started","IMA"),a.call(this))}.bind(this)),_.default.bind(this[O],e.ALL_ADS_COMPLETED,a.bind(this))),function(){var t=this[M].AdEvent.Type;return[t.LOADED,t.STARTED,t.CLICK,t.FIRST_QUARTILE,t.MIDPOINT,t.THIRD_QUARTILE,t.SKIPPED,t.COMPLETE,t.PAUSED,t.RESUMED,t.VOLUME_CHANGED,t.VOLUME_MUTED,t.EXPANDED_CHANGED,t.USER_CLOSE,this[M].AdErrorEvent.Type.AD_ERROR]}.call(this).forEach(function(e){return t[O].addEventListener(e,function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};C.debug("onAdEvent",t);var e=this[M].AdEvent.Type,n=t.getAd&&t.getAd(),i=n&&n.getDuration(),o=n&&!!n.isLinear();switch(t.type){case e.LOADED:if(this.setVolume(this.H.getVolume()),e=!!this.O.zD(),o||this.Kb(E.default.od),o!==e){C.warn("Ignore ad. Expected "+(e?"":"non-")+"linear ad, but found "+(o?"":"non-")+"linear ad"),a.call(this);break}this.J.style.setProperty("visibility","visible"),this.Uj(),o||(t=t.getAdData(),this[P]={height:t.height,width:t.width},r.call(this));break;case e.STARTED:this.Ak(),this.Wj(),this.setVolume(this.H.getVolume()),o&&(this[L]=setInterval(d.bind(this,t,i),250));break;case e.PAUSED:this[L]&&clearInterval(this[L]),this.ym();break;case e.RESUMED:this[L]=setInterval(d.bind(this,t,i),250),this.vs();break;case e.CLICK:this.wm(t.getAd().getClickThroughUrl());break;case e.FIRST_QUARTILE:this.va(h.default.$c);break;case e.MIDPOINT:this.va(h.default.jj);break;case e.THIRD_QUARTILE:this.va(h.default.dd);break;case e.VOLUME_CHANGED:case e.VOLUME_MUTED:this.Xj();break;case e.SKIPPED:case e.COMPLETE:this.mg(i),this[L]&&clearInterval(this[L]);break;case e.EXPANDED_CHANGED:this.Qo(n.expanded?v.default.Ri:v.default.Rg);break;case e.USER_CLOSE:this.Qo(o?v.default.Ap:v.default.Qg);break;case this[M].AdErrorEvent.Type.AD_ERROR:s.call(this,t)}}.bind(t))}),this[R]=r.bind(this),this.H.addEventListener(b.default.Wf,this[R]);try{this[O].init(this.J.offsetWidth,this.J.offsetHeight,this[M].ViewMode.NORMAL),l.call(this),this[O].start()}catch(t){}}else this.Gf(new T.default("Failed to obtain IMA ads manager")),C.warn("showAd()","error",this.jc),this.complete(),this.Le(h.default.LOADED,S.default.Cw,"Failed to obtain IMA ads manager","IMA"),a.call(this)}function d(t,e){if(!this.Sc()){var n=Math.max(this[O].getRemainingTime(),0),i=Math.round(e-n);(t=t.data||{}).timeRemaining=n,t.progressPercent=i/e*100,this.Kb(E.default.Zb,t)}}Object.defineProperty(e,"__esModule",{value:!0});var h=i(t=n(76)),p=i(t=n(22)),f=i(t=n(2)),_=i(t=n(10));t=i(t=n(3));var m=n(5),y=i(m),v=i(m=n(148));m=i(m=n(144));var g=n(12),E=i(g),b=i(g=n(88)),A=i(g=n(397)),S=i(g=n(25)),T=i(g=n(102)),I=i(n=n(398)),C=t.default.I("ImaEngine"),R=Symbol(),P=Symbol(),L=Symbol(),O=Symbol(),w=Symbol(),M=Symbol(),D=Symbol(),N=Symbol(),k=Symbol(),B=Symbol();n=function(t){function e(n,i,r,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i,o),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n=!n||"object"!=typeof n&&"function"!=typeof n?this:n,C.debug("init"),n[B]=n.H.ka().K(f.default.Ha),n.J=y.default.createElement("div",{class:"ima-ad-container",style:"width: 100%; height: 100%; position: absolute; z-index: 1"},r.kf),n.J.style.setProperty("visibility","hidden"),A.default.load(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){var e=this;A.default.load(function(n){if(n){t.prototype.load.call(e),e[M]=window.google.ima,e[M].settings.setVpaidMode(e[M].ImaSdkSettings.VpaidMode[e.F.du()?"ENABLED":"INSECURE"]),e[M].settings.setDisableCustomPlaybackForIOS10Plus(!0),n=e.O.getType()===p.default.gb?e.P.Fs().cn():null,e[D]=new e[M].AdDisplayContainer(e.J,n),C.debug("load()","AdDisplayContainer",e[D]),e[w]=new e[M].AdsLoader(e[D]),e[w].addEventListener(e[M].AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){C.debug("onAdsManagerLoaded()",t),this.im||(this[O]=t.getAdsManager(this.P.qn()),this.ready(!0))}.bind(e),!1),e[w].addEventListener(e[M].AdErrorEvent.Type.AD_ERROR,s.bind(e),!1),(n=new e[M].AdsRequest).adTagUrl=e.O.getUrl();var i=o.call(e);n.nonLinearAdSlotWidth=i.width,n.linearAdSlotWidth=i.width,n.nonLinearAdSlotHeight=i.height,n.linearAdSlotHeight=i.height,n.setAdWillAutoPlay(e.F.nn().autoplay),n.setAdWillPlayMuted(0===e.H.getVolume()),C.debug("requestAds()",n),e[w].requestAds(n)}else C.error("Failed to load IMA lib"),e.complete(),a.call(e)})},e.prototype.stop=function(){this.im=!0,t.prototype.stop.call(this),this.mg(this.getCurrentTime()),a.call(this)},e.prototype.getCurrentTime=function(){var t=this[O].getCurrentAd();return Math.round(t&&t.getDuration()-this[O].getRemainingTime()||0)},e.prototype.pause=function(){this[O].pause()},e.prototype.Xj=function(){var e={};e.volume=this[O].getVolume(),t.prototype.Xj.call(this,{data:e})},e.prototype.resume=function(){this[O].resume()},e.prototype.setVolume=function(t){C.debug("setVolume()",t),this[O].setVolume(t),function(t){this.F.Ge()&&Array.prototype.slice.call(this.J.getElementsByTagName("video")).forEach(function(e){return e.muted=t})}.call(this,!t)},e.prototype.Ho=function(t){var e=this,n=this.O.getType();y.default.xb.Yh()&&n===p.default.bd?(u.call(this),function(t){l.call(this),C.debug("showCovering()"),this[k]=y.default.createElement("div",{backgroundColor:"#000",display:"table",height:"100%",position:"absolute",width:"100%",zIndex:100},this.J);var e=y.default.createElement("div",{display:"table-cell",textAlign:"center",verticalAlign:"middle"},this[k]);y.default.createElement("div",{class:"ima-play-button"},e,I.default).addEventListener("click",t,!1),this.J.style.setProperty("visibility","visible")}.call(this,function(){e.Ig(t),c.call(e)})):(this.Ig(t),c.call(this))},e.prototype.Hg=function(){t.prototype.Hg.call(this),c.call(this)},e}(m.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var r=i(n(78)),o=i(n=n(5)),s=t.default.I("ImaLibLoader"),a={Se:"failed",LOADING:"loading",Cq:"not_started",$q:"success"},u=[],l=a.Cq;e.default=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.load=function(t){l===a.Cq&&(s.debug("Loading IMA lib..."),l=a.LOADING,o.default.Wt(document,r.default["ima.url"],function(t){t&&window.google&&window.google.ima?(l=a.$q,s.debug("IMA lib loaded","version",window.google.ima.VERSION)):(t=!1,l=a.Se,s.error("Failed to load IMA lib")),u.forEach(function(e){return e(t)}),u=[]}.bind(this))),t&&(l===a.LOADING?u.push(t):l===a.$q?t(!0):t(!1))},t}()},function(t){t.exports='<svg version="1.1" id="Layer_2" xmlns="https://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 841.891 595.279" enable-background="new 0 0 841.891 595.279" xml:space="preserve"><radialGradient id="SVGID_1_" cx="428.8484" cy="299.6243" r="29.6255" gradientTransform="matrix(1 0 0 -1 -0.0552 595.1392)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#FFFFFF"></stop><stop offset="1" style="stop-color:#000000"></stop></radialGradient><circle opacity="0.7" fill="url(#SVGID_1_)" enable-background="new" cx="428.794" cy="295.515" r="29.625"></circle><path fill="#D9D9D9" d="M428.794,263.765c-17.536,0-31.751,14.215-31.751,31.75s14.215,31.75,31.751,31.75 c17.534,0,31.75-14.215,31.75-31.75S446.328,263.765,428.794,263.765z M428.794,325.14c-16.361,0-29.626-13.264-29.626-29.625 s13.265-29.625,29.626-29.625c16.36,0,29.625,13.264,29.625,29.625S445.154,325.14,428.794,325.14z"></path><g><g><polygon fill="#FFFFFF" points="422.169,284.64 422.169,307.64 441.044,296.14"></polygon></g></g></svg>'},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(232));var r=n(400),o=i(r),s=i(r=n(402)),a=i(r=n(2)),u=i(r=n(227)),l=i(n=n(52));(n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n[a.default.Ga]),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Yj=function(t,e,n,i,r,a){var c=this,d=new l.default;return(t=new u.default(t).Vt("",{gi:function(t,u){c.Fj.tg(s.default,u.head),(t=new o.default(t,e,n,i,r,a)).Cn(u),t.Lt().then(d.resolve,d.reject)}})).style.pointerEvents="auto !important",t.style.position="absolute",t.style.top="0",d.Ea()},e}(t.default)).W=[a.default.Ga],e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){this[d].style&&(this[d].style.visibility="visible",this[d].style.display="block")}function o(t,e){v[e].call(this),t()}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(233));var s=n(401),a=i(s),u=i(s=n(5)),l=i(s=n(22)),c=i(n=n(138)),d=Symbol(),h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol(),y=Symbol(),v={AdImpression:function(){this[h]===l.default.bd&&r.call(this)},AdVideoStart:function(){r.call(this)}};n=function(t){function e(n,i,r,o,s,a){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[h]=r,n[f]=o,n[_]=s,n[y]=a,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Cn=function(t){var e=this;this[h]===l.default.fb||this[h]===l.default.bd||this[f].isPlaying()?(this[d]=u.default.Pm(t),this.me.parentElement.appendChild(this[d])):(this[p]=!0,this[f].Fs(),this[d]=this[f].qn()),(0,a.default)(t.body,this.gd,this.Qr).then(function(t){e[m]=t.creative,e.Oj.resolve({data:t,Vo:e})},this.nu.bind(this))},e.prototype.V=function(e,n){var i;return t.prototype.V.call(this,e,n),this[m][e]&&(i=this[m])[e].apply(i,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(n))},e.prototype.initAd=function(t,e,n,i,r){var o=u.default.createElement("div",{class:"vpaid-content",style:"height: 100%"},this.me.contentDocument.body),s=this[_].jB().qF;o={companionSlots:this[y],slot:o,topOffsetPromise:s?s.Ea():c.default.resolve(),videoSlot:this[d],videoSlotCanAutoPlay:!0},t=t||this[d].offsetWidth,e=e||this[d].offsetHeight,this[m].initAd(t,e,n,i,r,o)},e.prototype.subscribe=function(t,e,n){v[e]?this[m].subscribe(o.bind(this,t,e),e,n):this[m].subscribe(t,e,n)},e.prototype.unsubscribe=function(t,e){v[e]?this[m].unsubscribe(o.bind(this,t,e),e):this[m].unsubscribe(t,e)},e.prototype.pf=function(){t.prototype.pf.call(this),this[p]&&this[f].Do()},e.prototype.mute=function(t){this[d].muted=t},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){var o=new r.default,s=document.createElement("script");return s.src=e,t.appendChild(s),s.onload=s.onreadystatechange=function(){var e=s.readyState;if(!e||"complete"===e||"loaded"===e){if(e=t.ownerDocument.defaultView.getVPAIDAd){var r=e();r?(e=n.filter(function(t){return!r[t]})).length?o.reject({name:e[0],type:i.default.pp}):o.resolve({creative:r,height:t.offsetHeight,width:t.offsetWidth}):o.reject({type:i.default.Dq})}else o.reject({type:i.default.bq});s.onload=null,s.onreadystatechange=null}},s.onerror=function(){return o.reject({type:i.default.Jr,url:e})},o.Ea()};var i=(t=n(212))&&t.__esModule?t:{default:t},r=(n=n(52))&&n.__esModule?n:{default:n}},function(t,e,n){e=n(403),t.exports="string"==typeof e?e:e.toString()},function(t,e,n){(t.exports=n(147)(!1)).push([t.yk,"video {\n    position: absolute;\n    width: 100%;\n    height: 100%;\n    z-index: 1;\n}\n\niframe {\n    position: absolute;\n    z-index: 2;\n    pointer-events: auto !important;\n}\n",""])},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(72)),o=i(n(405));n=function(t){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n=t.apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Ht=function(){return o.default},e.prototype.getType=function(){return r.default.Jl},e}(i(n=n(142)).default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(89));var r=n(2),o=i(r),s=i(r=n(52)),a=i(r=n(103)),u=i(n=n(5)),l=Symbol(),c=Symbol(),d=Symbol(),h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol(),m={bids:[],code:"video1",mediaTypes:{video:{context:"instream"}}},y={output:"vast"};n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,n);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");i=!i||"object"!=typeof i&&"function"!=typeof i?this:i;var r=n.H.ka(),s=r.K(o.default.Ha);return i[p]=n.ad,i[l]=r.K(o.default.Ga),i[c]=r.K(o.default.na),i[h]=r.K(o.default.X),i[d]=s.yC(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.load=function(){var e=this,n=this[c].wf();if(m.sizes=[n.width,n.height],n=this[p].gz,Array.isArray(n)?m.bids=n:m.bids[0]=n,this[_]=this[h].Mb(a.default.Qq)||"dfp",n=this[h].Mb(a.default.Sq))try{n=JSON.parse(decodeURIComponent(n))}catch(t){}return this[f]=u.default.extend(y,n||{}),this[l].Bg(this[d]).then(function(){var t=this,e=new s.default;return window.pbjs.que.push(function(){window.pbjs.addAdUnits(m),window.pbjs.setConfig({cache:{url:"https://prebid.adnxs.com/pbc/v1/cache"}}),window.pbjs.requestBids({bidsBackHandler:function(){var n=window.pbjs.adServers[t[_]].buildVideoUrl({adUnit:m,params:t[f]});e.resolve(n)}})}),window.pbjs.bidderSettings={standard:{adserverTargeting:[{key:"hb_bidder",val:function(t){return t.bidderCode}},{key:"hb_adid",val:function(t){return t.adId}},{key:"hb_pb",val:function(){return"10.00"}},{key:"hb_size",val:function(t){return t.size}}]}},e.Ea()}.bind(this)).then(function(n){return e[p].Oz(n),e[p].Lo(),t.prototype.load.call(e,n)})},e}(t.default),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(232));var r=n(407),o=i(r),s=n(234),a=i(r=n(2)),u=i(r=n(78)),l=i(n=n(235)),c=0;(n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n[a.default.Ga]),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?this:n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Yj=function(t,e){var n=l.default.eb("oathPlayerBuildTag",window.location.href);n=(0,s.vt)(u.default["cdn.url"],u.default["s3.url"],n)+"xdomain-vpaid.html?id="+c++;var i=this.Fj.createElement("iframe");return i.id="xdomainFrame",i.style.position="absolute",i.style.top=0,i.style.width="100%",i.style.height="100%",i.style.zIndex=2,i.style.pointerEvents="auto !important",i.setAttribute("frameborder","0"),i.setAttribute("allow","autoplay"),e=new o.default(i,e),i.onload=e.Cn.bind(e),i.src=n,t.appendChild(i),e.Lt()},e}(t.default)).W=[a.default.Ga],e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){for(var e=arguments.length,n=Array(1<e?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];if(e={data:1===n.length?n[0]:n,type:t},this.me.contentWindow)try{this.me.contentWindow.postMessage(e,this[c])}catch(t){p.error("Unable to send message",e,t)}}function o(t){t.origin===this[c]&&t.data.location===this.me.src?(t.preventDefault(),"ready"===t.data.type?(this.Oj.resolve({data:t.data.data,Vo:this}),function(){var t=this;this.subscribe(function(e){t[h]=e.data},"statechange")}.call(this)):"error"===t.data.type?this.nu(t.data.data):(t.data.data.property&&(this[h][t.data.data.property]=t.data.data.value),this[d][t.data.type]&&this[d][t.data.type].forEach(function(e){return e.listener(t.data)}))):p.debug("Ignore message from "+t.origin)}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(233));var s=n(10),a=i(s);s=i(s=n(3));var u=i(n=n(29)),l=Symbol(),c=Symbol(),d=Symbol(),h=Symbol(),p=s.default.I("SecureVPAID");n=function(t){function e(n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(n=t.call(this,n,i),!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(n=!n||"object"!=typeof n&&"function"!=typeof n?this:n)[l]=a.default.empty(),n[h]={size:{}},n[d]=[],n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Cn=function(){this[c]=u.default.Jk(this.me.src).origin,a.default.bind(this.me.contentWindow.parent,"message",o.bind(this)).link(this[l]),this.V("init",{url:this.gd,vpaidInterface:this.Qr})},e.prototype.V=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];t.prototype.V.call(this,n[0],n[1]),r.apply(this,[].concat(Array.prototype.slice.call(n)))},e.prototype.initAd=function(t,e,n,i,r){this.V("initAd",t,e,n,i,r,{videoSlotCanAutoPlay:!0})},e.prototype.subscribe=function(t,e,n,i){this[d][e]||(this[d][e]=[],this.V("subscribe",{eventName:e,getter:i})),this[d][e].push({ht:e,listener:t})},e.prototype.unsubscribe=function(t,e){this[d][e]=this[d][e].filter(function(e){return e.listener!==t}),0===this[d][e].length&&this.V("unsubscribe",{eventName:e})},e.prototype.getAdVolume=function(){return this[h].volume},e.prototype.getAdSkippableState=function(){return this[h].isSkippable},e.prototype.getAdExpanded=function(){return this[h].isExpanded},e.prototype.getAdWidth=function(){return this[h].size.width},e.prototype.getAdHeight=function(){return this[h].size.height},e.prototype.getAdDuration=function(){return this[h].duration},e.prototype.getAdLinear=function(){return this[h].isLinear},e.prototype.getAdRemainingTime=function(){return this[h].remainingTime},e.prototype.pf=function(){this[d]=[],this[l].Z(),t.prototype.pf.call(this)},e.prototype.mute=function(t){r.call(this,"mute",t)},e}(t.default),e.default=n},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){.03>Math.random()&&Object.keys(i).forEach(function(t){t=i[t],r.createElement("img").src=t})};var i={APN:"https://secure.adnxs.com/getuid?https://pixel.advertising.com/ups/55936/sync?uid=$UID&_origin=0",DSPPlus:"https://sync.adaptv.advertising.com/sync?rUrl=https%3A%2F%2Fpr-bh.ybp.yahoo.com%2Fsync%2Fadaptv_ortb%2F%7Bcombo_uid%7D%0A%0A",Eyeview:"https://track.eyeviewads.com/sync/adaptv?",GoogleDBM:"https://cm.g.doubleclick.net/pixel?google_nid=adaptv_dbm&google_cm&google_sc",IPONWEB:"https://x.bidswitch.net/sync?ssp=adaptv",IndexExchange:"https://ssum-sec.casalemedia.com/usermatchredir?s=183965&cb=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55940%2Fsync%3Fuid%3D_UID_",MediaMath:"https://sync.mathtag.com/sync/img?mt_exid=31&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55938%2Fsync%3Fuid%3D%5BMM_UUID%5D%7D%26_origin%3D0",TidalTv:"https://sync.tidaltv.com/adaptv.ashx?",TradeDesk:"https://match.adsrvr.org/track/cmf/generic?ttd_pid=adaptv&ttd_tpi=1",TubeMogul:"https://sync-tm.everesttech.net/upi/pid/m7y5t93k?redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0",Turn:"https://ad.turn.com/r/cs?pid=18",UMSPixel:"https://ssum-sec.casalemedia.com/usermatchredir?s=183965&cb=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55940%2Fsync%3Fuid%3D__UID__%26_origin%3D0",Volcano:"https://pixel.advertising.com/ups/57989/sync?_origin=0&redir=true",YahooRTB:"https://sync.adaptv.advertising.com/sync?rUrl=https%3A%2F%2Fpr-bh.ybp.yahoo.com%2Fsync%2Fadaptv_ortb%2F%7Buid%7D"},r=new(function(t){return t&&t.__esModule?t:{default:t}}(n(236)).default)(window.document)},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n={};p.default.Za(this.F.getParameters(),n),p.default.Za(e,n),t+=n?"?"+p.default.Tc(n):"",this.qe(t)}function o(t,e){return t=t.data||{},this.jb({at:(t.type||l.default.gb).toLowerCase()},{acid:t.acid,adIdx:t.sequence||-1,aen:t.name,asid:t.asid,itg:this.ca.fn(),pbl:t.isPayable,pc:t.profitCenter,ps:p.default.on(this.le.Xh()),rcid:t.ruleCompanyId,rid:t.ruleId,scope:t.isHouseAd?"ha":null,sfbid:t.bookingId,sfliid:t.lineItemId,txid:t.transactionId,usid:t.usid,v:t.vendor,vid:this.ca.bn(),w:t&&t.ik},e)}function s(t,e){var n=t.data;if(t=t.data.RD){var i=t.kd;i=i&&i[0]&&i[0].mimeType||t.mimeType,t=t.Mc?t.Mc+" "+i:i}else t=void 0;return this.jb({crt:t||"",curl:n.url||"",stg:n.Vj},{aid:n.Tj,al:n.Fz,crl:n.XA,dt:n.se,et:n.SA,st:n.RA},e)}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(114));var a=n(76),u=i(a),l=i(a=n(22)),c=i(a=n(2)),d=i(a=n(10));a=i(a=n(3));var h=i(n(61)),p=i(n=n(5)),f=a.default.I("AdTracker");n=function(t){function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=t.call(this,n);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return(i=!i||"object"!=typeof i&&"function"!=typeof i?this:i).Bd=n[c.default.za],i.le=n[c.default.bc],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.Vz=function(){this.Ba||(this.Ba=d.default.group(d.default.bind(this.Bd,h.default.el,function(t){f.debug("trackAdRequest",t);var e={};this.jb({at:(t.data.type||l.default.gb).toLowerCase(),ps:p.default.on(this.le.Xh()),vid:this.ca.bn()},{},e),this.ri(e),this.Ia("ad-request.gif",e)}.bind(this)),d.default.bind(this.Bd,h.default.Ne,function(t){f.debug("trackAdIssue",t);var e={};o.call(this,t,e),s.call(this,t,e),this.jb({},{sact:this.F.xg()},e),this.Ia("ad-issue.gif",e)}.bind(this)),d.default.bind(this.Bd,h.default.bl,function(t){f.debug("trackAdEngineRequest",t);var e={};o.call(this,t,e),this.ri(e),this.jb({},{auid:t.data.auid,h:t.data.Fh,sact:this.F.xg()},e),this.Ia("ad-engine-request.gif",e),this.Py&&(e.acid||e.rid)&&r.call(this,this.ib.pB(),e)}.bind(this)),d.default.bind(this.Bd,h.default.ti,function(t){f.debug("trackAdEngineResponse",t);var e={};o.call(this,t,e);var n=t.data.latency/100,i=this.hc.Td;this.jb({aert:t.data.latency,ar:t.data.FD?"yes":t.data.timeout?"timeout":"no",fo:t.data.EF,ft:n<=this.hc.If?0:n<=i?1:2},{to:t.data.timeout},e),this.jb({},{auid:t.data.auid,h:t.data.Fh,sact:this.F.xg()},e),this.Ia("ad-engine-response.gif",e)}.bind(this)),d.default.bind(this.Bd,h.default.$k,function(t){f.debug("trackAdEngineFlow",t);var e={};o.call(this,t,e),s.call(this,t,e);var n=t.data.YA||0;this.jb({ap:t.data.Xz,atsub:"LOOKAHEAD"===t.data.Cm?"SKIPPABLE_PREROLL":"",avid:t.data.Zj,cpm:t.data.re,fo:t.data.Vj&&"win"!==t.data.Vj&&"loaded"!==t.data.Vj?n:void 0,h:t.data.Fh,m:t.data.muted},{ltc:t.data.latency},e),this.oo(e),this.ri(e),this.jb({},{auid:t.data.auid,sact:this.F.xg()},e),this.Ia("ad-engine-flow.gif",e),e.stg===u.default.STARTED&&(e.acid||e.rid)&&r.call(this,this.ib.kB(),e)}.bind(this)),d.default.bind(this.Bd,h.default.kb,function(t){f.debug("trackAdClick",t);var e={};o.call(this,t,e);var n=this.ca.Oc();this.jb({cd:t.data.Jb||"none",ct:t.data.Ns,t:n&&n.time||0},{},e),this.Ia("click.gif",e)}.bind(this)),d.default.bind(this.Bd,h.default.wi,function(t){f.debug("trackSlotOpportunity",t);var e={};o.call(this,t,e),this.jb({atsub:"LOOKAHEAD"===t.data.Cm?"SKIPPABLE_PREROLL":"",slot:t.data.slot},{},e),this.ri(e),this.oo(e),this.Ia("slot-opp.gif",e)}.bind(this))))},e.prototype.detach=function(){this.Ba&&this.Ba.Z()},e.prototype.LE=function(t){this.hc=t,this.Py=t.HA},e}(t.default),e.default=n,n.W=[c.default.X,c.default.Re,c.default.na,c.default.za,c.default.bc,c.default.Tb,c.default.Ya,c.default.Ha]},function(t,e,n){var i=n(1)(i||{},{f:{dc:{}},A:{},Promise:{}});i.A=n(4).vdb.A,i.Promise=n(23).vdb.Promise,i.f.dc=i.A.Class.extend(function(){function t(){if(this.ra=!1,this.qh=this.kc.shift())this.ra=!0,this.qh();else{for(var t=0;t<this.zd.length;t++)this.zd[t]();this.zd=[]}}return{N:function(){this.kc=[],this.zd=[],this.ra=!1},add:function(e){return new i.Promise(function(n){this.kc.push(function(){var i=e();n(this.kc[this.kc.length-1]),i&&i.then?i.then(t.bind(this)):(void 0===i||i)&&t.call(this)}.bind(this)),this.ra||t.call(this)}.bind(this))},IA:function(){return new i.Promise(function(t){this.kc.length?this.zd.push(t):t()}.bind(this))},next:t,empty:function(){this.kc=[],t.call(this)}}}()),e.vdb={f:{dc:i.f.dc}},e.default=i.f.dc,e.__esModule=!0},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),t=i(t=n(3));var r=n(100),o=i(r),s=i(r=n(2)),a=i(r=n(412)),u=i(n=n(196)),l=t.default.I("AdsConfig");n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.ek=[],this.sf=[],e=e[s.default.X].tB(),l.debug("parse",e),this.oH=e.asids||[],this.Pz=null!=e.prerollInterleave?e.prerollInterleave:1,this.pe=e.podSize||1,this.HA=e.domainOptimisation,this.no=e.overlayTiming;var n=e.timeout||{};this.QD=n.maxLinearShow||90,this.If=1e3*n.soft||400,this.Td=1e3*n.hard||8*this.If,this.hF=Math.min(1e3*n.start||6*this.Td,2147483647),this.PD=Math.min(1e3*n.maxAdSearch||0,2147483647),this.Td<this.If&&(n=[this.Td,this.If],this.If=n[0],this.Td=n[1]),this.volume=e.volume,this.og=e.adStrategy||o.default.gv,this.fD=e.isBrandedContent,this.Qu=e.skipSettings||{},this.Jb=e.clickThroughUrl,this.nA=e.chromeHackPreinitialisation,this.KE(e.aeg||[]),function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];l.debug("parseCompanionSlots","raw slots",e),e.forEach(function(e){e=new a.default(e.width,e.height,e.parent,e.keepCompanion,e.selectorType),t.ek.push(e)}),l.debug("parseCompanionSlots","parsed slots",this.ek)}.call(this,e.companions)}return t.prototype.KE=function(){var t=this;(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){return t.sf.push(e.map(function(e){return u.default.parse(e,t)}))})},t}(),e.default=n,n.W=[s.default.X]},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3)),o=i(n(5)),s=i(n=n(213));n=function(){function t(e,n,i,o,a){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");r.default.I("CompanionSlot").debug("init","width",e,"height",n,"parent",i,"keepCompanion",o,"selectorType",a),this.width=e||0,this.height=n||0,this.parent=i,this.keepCompanion=o||!1,this.selectorType=a||s.default.wl}return t.prototype.toString=function(){return o.default.Cf(this)},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(56)),o=i(n(5)),s=i(n(29)),a=i(n(75)),u=i(n(237)),l=i(n=n(103)),c=Symbol(),d=Symbol(),h=Symbol(),p=Symbol(),f=Symbol(),_=Symbol(),m=Symbol(),y=Symbol(),v=Symbol(),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[c]=e,this[S]=this[c].bcid,this[T]=this[c].id,this[_]=this[c].timestamp,this[d]={},this[h]={},this[p]={},this[v]=!1,this[E]=this[c].macros||{},this[b]=o.default.mt(this[E],"rm."),this[f]={vvuid:e.vvuid||new u.default(this[_]).toString()},(e=o.default.Eh(this[c].queryString||"")).orgId&&(this[m]=e.orgId),e.placementId&&(this[A]=e.placementId),this[I]=this[c].isEU}return t.prototype.en=function(){return this[c].sid},t.prototype.Xm=function(){return this[c].bid&&this[c].bid.id||""},t.prototype.vk=function(){return this[d]},t.prototype.Iu=function(t,e){this[d][t]=e},t.prototype.sk=function(){return this[S]},t.prototype.ME=function(t){this[S]=t},t.prototype.wk=function(){return this[T]},t.prototype.XE=function(t){this[T]=t},t.prototype.Pd=function(){return this[c].playerType||r.default.Yg},t.prototype.YB=function(){return this[_]},t.prototype.jB=function(){return this[p]},t.prototype.HE=function(t){this[h]=t},t.prototype.Jh=function(){return this[h]},t.prototype.Kt=function(){return this[c].jsVersion},t.prototype.getParameters=function(){var t={};return o.default.Za(this.zt(),t),o.default.Za(this[E],t),t},t.prototype.zt=function(){var t={bcid:this.sk(),bid:this.Xm(),pid:this.wk(),pt:this.Pd(),pv:this.Kt(),r:a.default.Ab(window),s:s.default.Nb()?"true":void 0,sid:this.en(),vvuid:this[f].vvuid};return this[m]&&(t.orgId=this[m]),this[A]&&(t.plcid=this[A]),t},t.prototype.zF=function(t){o.default.Za(t,this[p])},t.prototype.Mb=function(t){return t="string"==typeof t?t.toLowerCase():t,this[E]["m."+t]||this[E][t]},t.prototype.Wm=function(){return this[E]},t.prototype.CC=function(){return this[b]},t.prototype.It=function(){return this[f]},t.prototype.AF=function(t){this[f].vvuid=t},t.prototype.pC=function(t){return this.vk()[t]||{}},t.prototype.nn=function(){return this[c]},t.prototype.eu=function(){return-1!==(this[c].queryString||"").indexOf("tbv=on")},t.prototype.vg=function(){return this[c].geo},t.prototype.Ge=function(){return this[v]||o.default.xb.Ge()},t.prototype.UB=function(){return this[c].flashVersion},t.prototype.xg=function(){return this[y]},t.prototype.tB=function(){return this[c].adSettings},t.prototype.LC=function(){return this[c].trackingEnabled},t.prototype.Vh=function(){return this[c].autoplay},t.prototype.cu=function(){var t=this.Vh();if(!t)return!1;var e=this.Ge();return void 0===e?t:t&&e},t.prototype.So=function(t){this[g]=t},t.prototype.jC=function(){return this[g]},t.prototype.Yt=function(){return this[c].aggressiveMode},t.prototype.sD=function(){return!!this[c].adVideoSettings&&this[c].adVideoSettings.frosOnly},t.prototype.du=function(){return"1"===this.Mb(l.default.Pl)},t.prototype.Et=function(){return this[c].GDPRData},t.prototype.zC=function(){return this[c].preview},t.prototype.kD=function(){return this[I]},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){return o.default.Tc({bcid:this[d].sk(),pid:this[d].wk()})}Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(5)),s=i(n(235)),a=i(n(73)),u=i(n(78)),l=n(234),c=Symbol(),d=Symbol();n=function(){function t(e,n){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[d]=e;var i={ads:u.default["adserver.url"],adt:u.default["adstracker.url"],cdn:u.default["cdn.url"],trk:u.default["tracking.url"]},r={};Object.keys(i).forEach(function(t){r[t]=a.default.Pk(n&&n[t]||i[t],"\\s/")}),this[c]=r}return t.prototype.nB=function(){return this[c].ads+"/vrm?"+r.call(this)},t.prototype.mB=function(){return this[c].ads+"/vrm/pods?"+r.call(this)},t.prototype.lB=function(){return this[c].ads+"/ads?"+r.call(this)},t.prototype.yC=function(){var t=s.default.eb("oathPlayerBuildTag",window.location.href);return(0,l.vt)(u.default["cdn.url"],u.default["s3.url"],t)+"prebid.js"},t.prototype.BB=function(t){return this[c].cdn+"/"+(t||"")},t.prototype.KC=function(){return this[c].trk},t.prototype.kB=function(){return this[c].ads+"/ads/ad-start.gif"},t.prototype.pB=function(){return this[c].adt+"/ads/ad-request.gif"},t}(),e.default=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){"function"==typeof this[C].setAttribute&&this[C].setAttribute(t,e)}function o(){this.dispatchEvent(v.default.Xx,{buffered:this[C].buffered,duration:this.getDuration(),waiting:3>this[C].readyState})}function s(){this.dispatchEvent(v.default.Wx)}function a(){var t={duration:this.getDuration()},e=this[L]===S.PAUSED,n=this[L]===S.LOADING;this[L]=S.PLAYING,e?this.dispatchEvent(v.default.zr,t):(n&&this.dispatchEvent(v.default.Ar,t),this.dispatchEvent(v.default.uj,t))}function u(){this.dispatchEvent(v.default.Br,{buffered:this.AB(),currentTime:this.getCurrentTime(),duration:this.getDuration(),durationWithoutAds:0})}function l(){this[C].paused&&!this[C].ended&&(this[L]=S.PAUSED,this.dispatchEvent(v.default.xr))}function c(){this.dispatchEvent(v.default.Fr)}function d(t){this[L]!==S.IDLE&&(this[L]=S.IDLE,this.dispatchEvent(v.default.qr,{complete:"ended"===t.type,currentTime:this.getCurrentTime()}))}function h(t){this[k]&&this[B]<this[k].length-1?(this[B]++,t=this[k][this[B]],r.call(this,"src",t),this.dispatchEvent(v.default.sr,{url:t})):(t=(t=(t=t&&t.data&&t.data.code)||this[C].error&&this[C].error.code)||null,this.dispatchEvent(v.default.rr,{code:t,message:"Can't play video "+this[C].currentSrc+": "+t}))}function p(){this.isMuted()||0===this[C].volume||(this[D]=this[C].volume),this.dispatchEvent(v.default.Wl,{muted:this.isMuted(),volume:this.getVolume()})}function f(){this.dispatchEvent(v.default.kr)}function _(){b.default.$t(this[C])&&(p.call(this),function(){var t=this;this[M]&&clearTimeout(this[M]),this[O].removeEventListener("volumechange",p,this),this[M]=setTimeout(function(){t[M]=null,t[O].addEventListener("volumechange",p,t)},100)}.call(this))}function m(t,e){this[k]=t,this[B]=0,this[N]=!1,this[C]=e,this[O]&&(this[O].Ao(),delete this[O]),this[O]=new y.default(this[C]),this.setVolume(this[D]),this[O].addEventListener("loadstart",s,this),this[O].addEventListener("progress",o,this),this[O].addEventListener("timeupdate",u,this),this[O].addEventListener("pause",l,this),this[O].addEventListener("waiting",c,this),this[O].addEventListener("ended",d,this),this[O].addEventListener("abort",d,this),this[O].addEventListener("error",h,this),this[O].addEventListener("volumechange",p,this),this[O].addEventListener("click",f,this),this[O].addEventListener("playing",a,this),r.call(this,"src",this[k][this[B]]);try{this[C].load()}catch(t){}return this[L]=S.LOADING,!1}Object.defineProperty(e,"__esModule",{value:!0});var y=i(n(416)),v=i(n(207)),g=i(n(30)),E=i(n(2)),b=i(n(5)),A=i(n=n(417)),S={$F:"cleaning",IDLE:"idle",LOADING:"loading",PAUSED:"paused",PLAYING:"playing"},T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol(),L=Symbol(),O=Symbol(),w=Symbol(),M=Symbol(),D=Symbol(),N=Symbol(),k=Symbol(),B=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[I]=e[E.default.Xe],this[L]=S.IDLE,this[w]=e[E.default.Ga],this[P]=new g.default,this[T]=new A.default}return t.prototype.dispatchEvent=function(){var t;(t=this[P]).dispatchEvent.apply(t,arguments)},t.prototype.addEventListener=function(){var t;(t=this[P]).addEventListener.apply(t,arguments)},t.prototype.removeEventListener=function(){var t;(t=this[P]).removeEventListener.apply(t,arguments)},t.prototype.cn=function(){return this[C]},t.prototype.qn=function(){return this[I].hg},t.prototype.Fs=function(){return this[L]=S.PLAYING,this[C]=this.qn(),this},t.prototype.play=function(){if(this[C]){var t=Math.random();this[R]=t;var e=this[C].play();e&&e.catch(function(t){this[L]!==S.IDLE&&(this.isMuted()?("function"==typeof this[C].getAttribute?this[C].getAttribute("playsinline"):void 0)||this[N]?t===this[R]&&h.call(this,{data:{code:5}}):(this[N]=!0,r.call(this,"playsinline",""),this.play()):(this[L]=S.LOADING,this.mute(!0),this.dispatchEvent(v.default.Wl,{muted:!0,volume:0}),this.play()))}.bind(this,t))}},t.prototype.setVolume=function(t){try{this[D]=t,this[C]&&(this[C].volume=t,_.call(this))}catch(t){}this.mute(0===t)},t.prototype.getVolume=function(){return this[D]},t.prototype.isMuted=function(){return this[C]&&this[C].muted||0===this.getVolume()},t.prototype.mute=function(){this[C]&&(this[C].muted=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],_.call(this))},t.prototype.getDuration=function(){return Math.min(Math.max(this[C]&&this[C].duration||0,0),1e8)},t.prototype.Qd=function(){return this.getDuration()-this.getCurrentTime()},t.prototype.getCurrentTime=function(){return Math.max(Math.min(this[C]&&this[C].currentTime||0,this.getDuration()),0)},t.prototype.AB=function(){return this[C]&&this[C].buffered},t.prototype.an=function(){return this.getCurrentTime()/this.getDuration()||0},t.prototype.seek=function(t){if(this[C]&&0<=t){t=isNaN(this.getDuration())?0:Math.min(t,this.getDuration()-.5);try{this[C].currentTime=t}catch(t){}}},t.prototype.pause=function(){this[C]&&this[C].pause()},t.prototype.Do=function(){this.isPlaying()&&this.pause(),this[L]=S.IDLE,this[C]&&(this[w].empty(this[C]),r.call(this,"src",""),"function"==typeof this[C].removeAttribute&&this[C].removeAttribute("src")),this[T].next()},t.prototype.stop=function(){this[C]&&(this[O].removeEventListener("progress",o),this[C].pause(),this[C].load())},t.prototype.ZE=function(t){return this[T].add(m.bind(this,t,this[I].hg))},t.prototype.UE=function(t){return this[T].add(m.bind(this,t,this[I].iC()))},t.prototype.isPlaying=function(){return this[L]===S.PLAYING},t.prototype.Pn=function(){return this[L]!==S.IDLE},t.prototype.Qh=function(){return this[C]&&this[C].offsetWidth||0},t.prototype.Lh=function(){return this[C]&&this[C].offsetHeight||0},t.prototype.iB=function(){return this[C]&&this[C].currentSrc},t.prototype.MA=function(){this[T].empty()},t}(),e.default=n,n.W=[E.default.Xe,E.default.Ga]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(n(30)),o=Symbol(),s=Symbol();t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[s]=e||new r.default,this[o]=[]}return t.prototype.addEventListener=function(t,e,n){n=n?e.bind(n):e,this[o].push([t,e,n]),this[s].addEventListener(t,n)},t.prototype.removeEventListener=function(t,e){for(var n=this[o],r=0;r<n.length;++r){var a=i(n[r],3),u=a[1],l=a[2];a[0]===t&&(u!==e&&e||this[s].removeEventListener(t,l))}},t.prototype.Ao=function(){for(var t=this[o],e=0;e<t.length;++e){var n=i(t[e],3);this[s].removeEventListener(n[0],n[2])}},t.prototype.dispatchEvent=function(t,e){this[s].dispatchEvent(t,e)},t}(),e.default=t},function(t,e,n){var i=n(1)(i||{},{f:{dc:{}},A:{},Promise:{}});i.A=n(4).vdb.A,i.Promise=n(23).vdb.Promise,i.f.dc=i.A.Class.extend(function(){function t(){if(this.ra=!1,this.qh=this.kc.shift())this.ra=!0,this.qh();else{for(var t=0;t<this.zd.length;t++)this.zd[t]();this.zd=[]}}return{N:function(){this.kc=[],this.zd=[],this.ra=!1},add:function(e){return new i.Promise(function(n){this.kc.push(function(){var i=e();n(this.kc[this.kc.length-1]),i&&i.then?i.then(t.bind(this)):(void 0===i||i)&&t.call(this)}.bind(this)),this.ra||t.call(this)}.bind(this))},IA:function(){return new i.Promise(function(t){this.kc.length?this.zd.push(t):t()}.bind(this))},next:t,empty:function(){this.kc=[],t.call(this)}}}()),e.vdb={f:{dc:i.f.dc}},e.default=i.f.dc,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(2)),r=Symbol(),o=Symbol(),s=Symbol(),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol(),d=Symbol();t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[o]=e[i.default.ya].Od(),this[s]=e[i.default.X].eu()?"tbv":"",this[a]={},this[d]=0}return t.prototype.JE=function(t){this[r]=t},t.prototype.QE=function(){this[a]=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}},t.prototype.Oc=function(){return this[a]},t.prototype.bn=function(){return this.Oc().id},t.prototype.RE=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";this[a]=this[a]||{},this[a].id=t},t.prototype.MB=function(){return this[u]},t.prototype.ta=function(){return this[r].ta()},t.prototype.getVolume=function(){return this[r].getVolume()||0},t.prototype.isMuted=function(){return this[r].isMuted()},t.prototype.wf=function(){return{height:this[o].offsetHeight,width:this[o].offsetWidth}},t.prototype.pn=function(){var t=this.wf();return{currentPercent:+(this.xk()/this.getVideoDuration()).toFixed(2),currentTime:this.xk(),h:t.height,totalVideoCount:this[d],videoLength:this.getVideoDuration(),w:t.width}},t.prototype.fn=function(){return this[s]},t.prototype.xk=function(){return this[l]},t.prototype.getVideoDuration=function(){return this[c]},t.prototype.oi=function(t){this[c]=t},t.prototype.HB=function(){return this[l]},t.prototype.cE=function(){this[d]++},t.prototype.Nu=function(t){this[l]=t},t}(),e.default=t,t.W=[i.default.ya,i.default.X]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=function e(n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");return new i.default(n,new t(n))};return e.W=t.W.concat(i.default.W),e};var i=function(t){return t&&t.__esModule?t:{default:t}}(n(420))},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(2)),o=i(n(10)),s=i(n=n(12)),a=Symbol(),u=Symbol();n=function(){function t(e,n){var i=this;if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");e=e[r.default.za],this[a]=!0,this[u]=n,o.default.group(o.default.Da(e,s.default.Yc,function(){return i[a]=!1}),o.default.Da(e,s.default.Zc,function(){return i[a]=!1}))}return t.prototype.md=function(t){this[u].md(t)},t.prototype.Fc=function(){return this[a]?1:this[u].Fc()},t.prototype.ua=function(t){return this[a]?100:this[u].ua(t)},t.prototype.xf=function(){return this[a]?1:this[u].xf()},t}(),e.default=n,n.W=[r.default.za]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{adSettings:{adStrategy:"ADSET_BASED",aeg:[],asids:[],companions:[],domainOptimisation:!0,podSize:-1,prerollInterleave:1,timeout:{hard:7}},bcid:i.default["default.bcid"],bid:{id:i.default["default.bid"]},id:i.default["default.pid"],isEU:!0,jsVersion:"1.0.115",sid:(new r.default).toString(),timestamp:+new Date}};var i=(t=n(78))&&t.__esModule?t:{default:t},r=(n=n(237))&&n.__esModule?n:{default:n}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){a.default.Da(this[E],t,s.bind(this,e)).link(this[g])}function o(t){this[v]=t.qB(),function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this[f]=t.slot,this[_]=t.txid,this[m]=t.adxResult,this[y]=t.usid}.call(this,t.data&&t.data.source||{}),this[f]&&(this[g]&&this[g].Z(),this[g]=a.default.empty(),"LOOKAHEAD"===this[m]&&r.call(this,p.default.Qf,"UAX_SKIP"),this[A].Pd()===d.default.ah&&this[v]===c.default.gb||r.call(this,p.default.od,this[f]),r.call(this,p.default.Rf,this[f]))}function s(t){this[E].dispatchEvent(new u.default(u.default.wi,{Cm:this[m],ik:this[b].offsetWidth,slot:t,nI:this[_],type:this[v],DF:this[y]})),this[f]=void 0,this[_]=void 0,this[m]=void 0,this[y]=void 0}Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(10)),u=i(n(61)),l=i(n(2)),c=i(n(22)),d=i(n(56)),h=i(n(87)),p=i(n=n(12)),f=Symbol(),_=Symbol(),m=Symbol(),y=Symbol(),v=Symbol(),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[E]=e[l.default.za],this[b]=e[l.default.ya].Od(),this[A]=e[l.default.X],a.default.bind(this[E],h.default.LOADED,o.bind(this))}return t.prototype.dB=function(){this[g]&&this[g].Z(),s.call(this,this[f]||"UAX_SKIP")},t}(),e.default=n,n.W=[l.default.za,l.default.ya,l.default.X]},function(t,e,n){var i=n(1)(i||{},{pa:{Di:{}},aa:{uc:{}},u:{},log:{},A:{}});i.aa.uc=n(114).vdb.aa.uc,i.u=n(18).vdb.u,i.log=n(21).vdb.log,i.A=n(4).vdb.A,i.pa.Di=i.aa.uc.extend(function(){function t(t){var n=e.call(this,"ResourceLoaded"),i=this.F.nn()||{};n.c1="ResourceLoaded",n.c2=t,n.pv=i.jsVersion,n.pt=this.F.Pd(),this.Ia("action.gif",n)}function e(t){var e=this.ca.Oc();t={action:t,vid:this.ca.bn(),seq:e?e.oc:""};var n=!(!e||"youtube"!==e.qI)&&this.ca.ta();return t.asid=n?n.getAsid():e?e.metadata&&e.metadata.asid:"",t.acid=n?n.getAcid():e?e.metadata&&e.metadata.acid:"",t.rid=n?n.getRuleId():"",t.vid=n?n.getVideoId():t.vid,t}var n=i.log.I("BasicTracker");return{N:function(e){n.debug("init"),this._super(e),i.u.As(t.bind(this)),this.kt=[]},click:function(t,e){n.debug("click");var i={};void 0!==t&&(i.category=t),void 0!==e&&(i.clickName=e),this.Ia("click.gif",i)},dI:function(t){this.Cy=t},display:function(t){n.debug("display");var e=(new Date).getTime()-this.F.YB(),i=this.F.nn(),r=this.ca.fn();6e4<e&&(this.dm.Me("player load time failure","outliers",{edt:e}),e=null),this.Ia("display.gif",{dt:e,w:t.width,h:t.height,itg:r,csid:i&&i.playerTemplate&&i.playerTemplate.csid||null,sact:this.F.xg(),ab:+this.Cy})},action:function(t,i,r,o,s,a,u){n.debug("action",t),(t=e.call(this,t)).ct=r,i&&(t.at=i),o&&(t.adId=o.kH,t.rid=o.rid,t.txid=o.oI),s&&(t.externalId=s),a&&(t.c1=a.c1||a.iH,t.c2=a.c2||a.gH,t.c3=a.c3||a.fH),u&&(t.PollId=u.UH,t.AnswerId=u.nH),this.Ia("action.gif",t)},wH:function(t,e){n.debug("ad-fallback ("+t+", "+e+")"),this.Ia("ad-fallback.gif",{jH:t,pH:e.toLowerCase()})},iI:function(t){this.kt.push(t)},bI:function(){this.action("LoadExtra",null,null,null,null,{c1:this.kt.join(",")})},cI:function(t){this.action("videoSkipped",null,null,null,null,{c1:t})}}}()),e.vdb={pa:{Di:i.pa.Di}},e.default=i.pa.Di,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{aa:{Si:{},Ub:{}},u:{},f:{Ka:{}},g:{C:{}},log:{}});i.aa.Ub=n(153).vdb.aa.Ub,i.u=n(18).vdb.u,i.f.Ka=n(139).vdb.f.Ka,i.g.C=n(19).vdb.g.C,i.log=n(21).vdb.log,i.aa.Si=i.aa.Ub.extend(function(){var t,e,n=i.g.C;return{N:function(t){this._super(t),this.ca=t[n.na]},Me:function(n,r,o,s,a,u){var l=i.u.Cf(o)||"",c={et:n,st:r,dt:l.substring(0,3e3),ec:s||"",itg:this.ca.fn(),sact:this.F.xg(),edt:o&&o.edt?o.edt:null};n={type:n,jI:r,se:Array.isArray(o)&&o[0].match(/([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]/g)?i.u.Cf(o.slice(1)):l,code:s},i.u.Cf(n)!==i.u.Cf(e)?(this.Ia("error.gif",c),t=void 0):(i.u.In(t)||(t=i.f.Ka.Ys(function(){this.Ia("error.gif",c)}.bind(this),a||2e3,u||!1)),t()),e=i.u.Za(n,e)},mI:function(t,e,n){t={params:t},i.u.Za(e,t),this.Me("no_params",void 0,t,void 0,void 0,n)}}}(),[i.g.C.na,i.g.C.X,i.g.C.Re,i.g.C.Ha]),e.vdb={aa:{Si:i.aa.Si}},e.default=i.aa.Si,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{pa:{zj:{}},aa:{fe:{}},g:{C:{},he:{}}});i.aa.fe=n(426).vdb.aa.fe,i.g.C=n(19).vdb.g.C,i.g.he=n(428).vdb.g.he,i.pa.zj=i.aa.fe.extend(function(){function t(t,e){this.aA(t),this.HF(t,e),this.ri(t),this.oo(t)}function e(t,e,n){e=t+(e?e.id:""),-1===this.sm.indexOf(e)&&(this.Ia(t,n),this.sm.push(e))}var n=i.g.he,r=i.g.C;return{N:function(t){this._super(t),this.ca=t[r.na],this.Ey=t[r.Mf],this.sm=[]},lo:function(){this.sm=[]},xF:function(n){var i={};this.Ou(i),this.Pu(i),t.call(this,i,n),e.call(this,"video-play.gif",n,i)},Vk:function(e,n){e={q:e.xo},t.call(this,e,n),this.Ia("video-quartile.gif",e)},wF:function(e,n){e={d:e.xo},t.call(this,e,n),this.Ia("video-decile.gif",e)},tF:function(n){var i={};t.call(this,i,n),e.call(this,"video-3sec.gif",n,i)},Xu:function(n){var i={pct:this.ca.pn().currentPercent||0};this.IF(i),t.call(this,i,n),e.call(this,"video-time.gif",n,i)},vF:function(e){var i={},r=this.ca.IH()?this.ca.xk():null,o=this.ca.HB();this.Ou(i),this.Pu(i),t.call(this,i,e),this.Ey.action(n.Ov,r,o)}}}(),[i.g.C.Mf,i.g.C.na]),e.vdb={pa:{zj:i.pa.zj}},e.default=i.pa.zj,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{aa:{fe:{},uc:{}},g:{C:{}},f:{Rb:{},G:{}}});i.aa.uc=n(114).vdb.aa.uc,i.g.C=n(19).vdb.g.C,i.f.Rb=n(427).vdb.f.Rb,i.f.G=n(24).vdb.f.G,i.aa.fe=i.aa.uc.extend(function(){var t=i.g.C;return{N:function(e){this._super(e),this.rb=e[t.Sb]},IF:function(t){var e=this.ca.pn()||{};return e=Math.min(3*e.videoLength,e.currentPlayTime||e.currentTime||0),this.jb({t:0<e?Math.floor(e):0},{},t)},aA:function(e,n){if(!this.rb.Qn(t.jl))return null;var i=this.rb.K(t.jl),r=this.rb.K(t.wp);return i=i.yH(n),n=r.xH(n),this.jb({},{bft:i,bit:n},e)},HF:function(t,e){var n={vid:(e=e||this.ca.Oc()||{}).id||"",vpt:e.rI,seq:e.oc,cvt:Math.floor(void 0!==e.currentTime?e.currentTime:this.ca.xk()),fs:i.f.Rb.enabled()?+i.f.Rb.zg():0};return e.raw&&(e.raw.mpid&&(n.mpid=e.raw.mpid),e.raw.vcid&&(n.vcid=e.raw.vcid)),this.jb(n,{vcdn:i.f.G.Dc(e&&e.videoUrls&&e.videoUrls.length&&e.videoUrls[0])},t)},Ou:function(t){var e=this.ca.wf()||{};return this.jb({w:e.width,h:e.height},{},t)},Pu:function(t){return this.jb({},{csid:null},t)}}}(),[i.g.C.Sb]),e.vdb={aa:{fe:i.aa.fe}},e.default=i.aa.fe,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Rb:{}}});i.f.Rb=function(){var t="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,e=document,n=function(){for(var t,n=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")],i=n.length,r=-1,o={};++r<i;)if((t=n[r])&&t[1]in e){for(r=-1,i=t.length;++r<i;)o[n[0][r]]=t[r];return o}return!1}();return n?{enabled:function(){return!!e[n.fullscreenEnabled]},OA:function(i){var r=n.requestFullscreen;i?e=i.ownerDocument:i=e.FA,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?i[r]():i[r](t&&Element.ALLOW_KEYBOARD_INPUT)},VA:function(){e[n.exitFullscreen](),e=document},zg:function(){return!!e[n.fullscreenElement]},element:function(){return e[n.fullscreenElement]},zs:function(t){e.addEventListener(n.fullscreenchange,t)},Bu:function(t){e.removeEventListener(n.fullscreenchange,t)}}:{enabled:function(){return!1}}}(),e.vdb={f:{Rb:i.f.Rb}},e.default=i.f.Rb,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{g:{he:{}}});i.g.he={Ov:"AutoPause",WF:"CarouselClick",XF:"CCActivated",YF:"CCDeactivated",ZF:"SelectLanguage",eG:"EndcardClick",fG:"EnterFullscreen",Up:"ExitFullscreen",hG:"FloaterDock",lG:"PlayerHover",qG:"LogoClick",Cl:"Mute",gj:"Pause",vG:"Play",xG:"PosterClick",BG:"Replay",EG:"SeekEnd",FG:"SeekStart",Tl:"Unmute",KG:"UnmuteButtonClick",NG:"Video",aH:"Volume"},e.vdb={g:{he:i.g.he}},e.default=i.g.he,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{pa:{Aj:{}},fa:{ge:{}},g:{C:{}},f:{gc:{},je:{}},A:{}});i.fa.ge=n(430).vdb.fa.ge,i.g.C=n(19).vdb.g.C,i.f.gc=n(431).vdb.f.gc,i.f.je=n(432).vdb.f.je,i.A=n(4).vdb.A,i.pa.Aj=i.A.Class.extend(function(){function t(){this.ne.wF({xo:this.cg},this.Ra),this.sa&&this.sa.dispatchEvent(r.Nx)}function e(){var t={xo:this.dg};this.ne.Vk(t,this.Ra),this.sa&&this.sa.dispatchEvent(r.Ox,t)}var n=i.g.C,r=i.fa.ge;return{N:function(t){this.ne=t[n.vj],this.cm=t[n.na],this.um=new i.f.je,this.jg=new i.f.gc},fI:function(t){this.sa=t},oi:function(t){this.um.oi(t)},ji:function(n){0<n&&(function e(n){var i=this.um.NB(n);this.cg=this.cg||0,this.cg<i&&10>i&&(this.cg++,t.call(this),e.call(this,n))}.call(this,n),function t(n){var i=this.um.BC(n);this.dg=this.dg||0,this.dg<i&&4>i&&(this.dg++,e.call(this),t.call(this,n))}.call(this,n))},bE:function(){this.Sj=!0,this.cg=this.dg=0,this.Ra=this.cm.Oc(),this.ne.xF(this.Ra),this.jg.ni(function(){this.jg.ck(),this.ne.tF(this.Ra)}.bind(this),3e3)},aE:function(){this.Sj&&(this.dg=4,this.cg=10,t.call(this),e.call(this),this.jg.pause(),this.ne.Xu(this.cm.Oc()),this.Sj=!1)},OH:function(){this.ne.vF()},lo:function(){this.ne.lo()},RH:function(){this.jg.resume()},QH:function(){this.jg.pause()},PH:function(){this.Sj&&(this.jg.pause(),this.ne.Xu(this.cm.Oc()),this.Sj=!1)}}}(),[i.g.C.vj,i.g.C.na]),e.vdb={pa:{Aj:i.pa.Aj}},e.default=i.pa.Aj,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{fa:{ge:{}}});i.fa.ge={Ox:"trackQuartile",Nx:"trackDecile"},e.vdb={fa:{ge:i.fa.ge}},e.default=i.fa.ge,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{gc:{}},A:{}});i.A=n(4).vdb.A,i.f.gc=i.A.Class.extend({N:function(){this.ra=!1},ni:function(t,e,n,i){this.gf=0,this.rm=e,this.$e=i?function(){t(),this.ra=!1,this.resume()}.bind(this):t,this.ra=!1,(n||void 0===n)&&this.start()},start:function(){this.resume()},stop:function(){this.pause()},pause:function(){this.ra&&(this.ra=!1,this.gf+=(new Date).getTime()-this.sh,clearTimeout(this.uh))},resume:function(){!this.ra&&this.$e&&(this.ra=!0,this.sh=(new Date).getTime(),this.uh=setTimeout(this.$e,this.Lk()))},De:function(){return this.ra||!1},Lk:function(){return Math.max(this.rm-this.Qm(),0)},Qm:function(){return this.gf+(this.ra?(new Date).getTime()-this.sh:0)},ck:function(){this.ra=!1,clearTimeout(this.uh),this.$e=null}}),e.vdb={f:{gc:i.f.gc}},e.default=i.f.gc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{je:{}},A:{}});i.A=n(4).vdb.A,i.f.je=i.A.Class.extend({N:function(t){this.am=t},oi:function(t){this.am=t},BC:function(t){return Math.floor(t/(this.am/4))},NB:function(t){return Math.floor(t/(this.am/10))}}),e.vdb={f:{je:i.f.je}},e.default=i.f.je,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{lb:{}},log:{},A:{}});i.log=n(21).vdb.log,i.A=n(4).vdb.A,i.f.lb=function(){var t,e=i.A.Class.extend({N:function(){var t=0===i.log.Na.Mh();this.Rn=this.On=t,this.ro=[],this.Co=[]},gu:function(t){this.On&&this.ro.push({url:t,ts:+new Date})},Yn:function(t){this.Rn&&this.Co.push({url:t,ts:+new Date})}});return{uk:function(){return t||(t=new e),t}}}(),e.vdb={f:{lb:i.f.lb}},e.default=i.f.lb,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Ui:{},G:{}},A:{},u:{},localStorage:{},fa:{Pa:{}},g:{C:{}}});i.A=n(4).vdb.A,i.u=n(18).vdb.u,i.localStorage=n(435).vdb.localStorage,i.f.G=n(24).vdb.f.G,i.fa.Pa=n(101).vdb.fa.Pa,i.g.C=n(19).vdb.g.C,i.f.Ui=i.A.Class.extend(function(){var t;return{N:function(e){!function(){function e(t){var e=-1;try{e=t.GetVariable("$version")}catch(t){}return e}t={di:-1,Gk:-1,release:-1};var n=[{name:"ShockwaveFlash.ShockwaveFlash.7",version:function(t){return e(t)}},{name:"ShockwaveFlash.ShockwaveFlash.6",version:function(t){var n="6,0,21";try{t.VF="always",n=e(t)}catch(t){}return n}},{name:"ShockwaveFlash.ShockwaveFlash",version:function(t){return e(t)}}];!function(){try{var e=navigator.plugins,i=navigator.mimeTypes}catch(t){}if(e&&0<e.length){if(i&&i["application/x-shockwave-flash"]&&i["application/x-shockwave-flash"].enabledPlugin&&i["application/x-shockwave-flash"].enabledPlugin.description){var r=(i=(i=i["application/x-shockwave-flash"].enabledPlugin.description).split(/ +/))[2].split(/\./);e=parseInt(r[0],10);var o=parseInt(r[1],10),s=parseInt(i[3].substr(1),10);t.di=e,t.Gk=o,t.release=s}}else if(-1===navigator.appVersion.indexOf("Mac")&&window.execScript)for(i=-1,r=0;r<n.length&&-1===i;r++){e=-1;try{e=new ActiveXObject(n[r].name)}catch(t){e={Cz:!0}}e.Cz||-1!==(i=n[r].version(e))&&(s=i.split(","),e=parseInt(s[0].split(" ")[1],10),o=parseInt(s[1],10),s=parseInt(s[2],10),t.di=e,t.Gk=o,t.release=s)}}()}(),this.F=e[i.g.C.X]},sA:function(){var t=+i.localStorage.getItem("vdb-fl")||0;return i.localStorage.setItem("vdb-fl",t+1)," ("+ +(0===t)+", "+ +(0<t&&5>t)+", "+t+")"},TB:function(){return+i.localStorage.getItem("vdb-fl")||0},Xh:function(){var t=this.F.Mb(i.fa.Pa.Mp);return this.qD()&&!this.pD()&&!t&&4>this.TB()},qD:function(){var e=t;return 11===e.di&&1<=e.Gk||11<e.di},pD:function(){if("firefox"===i.u.xb.name&&39<=i.u.xb.version){if(1===i.f.G.eb("ignoreexcludeff"))return!1;if(!function(){var e,n=t;n=[n.di,n.Gk,n.release];for(var i=Math.min(n.length,arguments.length),r=0;r<i;r++)n[r]>=arguments[r]?r+1<i&&n[r]===arguments[r]||(e=!0):e=!1;return e}.call(this,19,0,0))return!0}return!1}}}(),[i.g.C.X]),e.vdb={f:{Ui:i.f.Ui}},e.default=i.f.Ui,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{localStorage:{}});i.localStorage={setItem:function(t,e){try{window.localStorage&&window.localStorage.setItem(t,e)}catch(t){}},getItem:function(t){var e;try{window.localStorage&&(e=window.localStorage.getItem(t))}catch(t){}return e},removeItem:function(t){try{window.localStorage&&window.localStorage.removeItem(t)}catch(t){}}},e.vdb={localStorage:i.localStorage},e.default=i.localStorage,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{Xi:{}},A:{}});i.A=n(4).vdb.A,i.f.Xi=i.A.Class.extend({N:function(t){this.window=t},tb:function(){return this.window},CH:function(){return this.window.document}}),e.vdb={f:{Xi:i.f.Xi}},e.default=i.f.Xi,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{xa:{Wg:{},wc:{},ee:{}},A:{},Promise:{},u:{}});i.A=n(4).vdb.A,i.xa.wc=n(238).vdb.xa.wc,i.xa.ee=n(438).vdb.xa.ee,i.Promise=n(23).vdb.Promise,i.u=n(18).vdb.u,i.xa.Wg=i.A.Class.extend(function(){function t(t,e){if(Array.isArray(t)){var n=i.u.Os(t);(t=n.pop()).W=n}return(n=t.W)||((n=(n=/\(((?:\s*\w*\s*,?)+)\)/g).exec(t.toString()))&&(n=n[1].replace(/\s+/g,"")),n=n&&n.split(",")||[]),t={cD:this,BA:n,mE:t},e?new i.xa.ee(t):new i.xa.wc(t)}function e(e,n,i){if(this.lh[e]){if(this.Ur)throw Error(e+" can't be provided twice")}else this.lh[e]=t.call(this,n,i);return this}var n=i.Promise;return{N:function(t){this.lh={},this.Ur=!0,(this.lm=t)&&this.Pb(t,this)},XH:e,oa:function(t,n){return e.call(this,t,n,!0)},Pb:function(t,n){return e.call(this,t,function(){return n})},Qn:function(t){return void 0!==this.lh[t]},resolve:function(t){var e=(e=this.lh[t])?e.kn():n.reject("no such dependency "+t);return n.race([e,i.u.xu(8e3).catch(function(){throw Error(t+" isn't resolved in 8000ms")})])},K:function(t){var e=this.lh[t];if(!e)throw Error("no such dependency "+t);return t=e.ln()},Du:function(t){var e,i=[];for(e=0;e<t.length;e++){var r=t[e];i.push(this.resolve(r))}return n.all(i)},yE:function(t){var e,n=[];for(e=0;e<t.length;e++){var i=t[e];n.push(this.K(i))}return n},sH:function(e){return t.call(this,e,!0).kn()},Wb:function(e){return t.call(this,e,!0).ln()},Tt:function(e){return t.call(this,e).kn()},HH:function(e){return t.call(this,e).ln()},Ts:function(){return new r(this)},eI:function(t){void 0!==t.NA&&(this.Ur=t.NA)}}}());var r=i.xa.Wg.extend({N:function(t){this._super(t.lm),this.nm=t},Qn:function(t){return this._super(t)||this.nm.Qn(t)},resolve:function(t){return this._super(t).catch(function(e){if(!/no such dependency/.exec(e))throw e;return e=this.nm.resolve(t)}.bind(this))},K:function(t){try{return this._super(t)}catch(e){return this.nm.K(t)}}});e.vdb={xa:{Wg:i.xa.Wg}},e.default=i.xa.Wg,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{xa:{ee:{},wc:{}}});i.xa.wc=n(238).vdb.xa.wc,i.xa.ee=i.xa.wc.extend({$l:function(){var t,e={};for(t=0;t<this.Ej.length;++t)e[this.Ej[t]]=arguments[t];return new this.es(e)},Wr:function(){var t=this;return this._super.apply(this,Array.prototype.slice.call(arguments)).then(function(e){var n=e;return t.gg.wg&&(n=t.gg.wg().then(function(){return e})),n})},Yr:function(t){return"function"!=typeof t.wg}}),e.vdb={xa:{ee:i.xa.ee}},e.default=i.xa.ee,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{L:{xc:{},wa:{}},Ja:{},qa:{}},g:{C:{}},ga:{}});i.f.L.wa=n(94).vdb.f.L.wa,i.g.C=n(19).vdb.g.C,i.f.Ja=n(99).vdb.f.Ja,i.ga=n(86).vdb.ga,i.f.qa=n(74).vdb.f.qa,i.f.L.xc=i.f.L.wa.extend(function(){function t(){this.bf.resolve(),this.Dd&&(i.f.Ja.clearTimeout(this.Dd),delete this.Dd)}return{N:function(e){if(this.jf=-1,this.bf=new i.ga,void 0===window.IntersectionObserver)this.bf.resolve();else{this._super(e),this.Dd=i.f.Ja.setTimeout(t.bind(this),100),e=window.IntersectionObserver;for(var n=function(e){e=e[0].intersectionRatio,isNaN(e)||(this.Dd&&t.call(this),this.jf=Math.round(100*e),this.gm||(this.gm=!0))}.bind(this),r=[],o=0;100>o;o+=5)r.push(o/100);r.push(1),this.Hd=new e(n,{root:null,threshold:r}),this.Hd.observe(this.qb)}},md:function(t){this.jf=-1,this.Hd&&(this.Hd.unobserve(this.qb),this.qb=t,this.Hd.observe(this.qb))},Fc:function(){return 0<this.ua()},ua:function(){return i.f.qa.Fc()?this.jf:0},wg:function(){var t=this;return this.bf.Ea().then(function(){return t})}}}(),[i.g.C.wd]),e.vdb={f:{L:{xc:i.f.L.xc}}},e.default=i.f.L.xc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{L:{dj:{},wa:{}},M:{}},ga:{},g:{C:{}},fa:{Pa:{}}});i.f.L.wa=n(94).vdb.f.L.wa,i.f.M=n(43).vdb.f.M,i.ga=n(86).vdb.ga,i.g.C=n(19).vdb.g.C,i.fa.Pa=n(101).vdb.fa.Pa,i.f.L.dj=i.f.L.wa.extend(function(){var t,e=i.fa.Pa;return{N:function(n){this.qb=n[i.g.C.wd],this.F=n[i.g.C.X],this.Fj=n[i.g.C.Ga],this.F.Mb(e.sl)||this.F.Mb(e.Np)||this.F.zC()||(t||(t=function(){var t=i.f.M.Pc(window),e="moatApiInit"+ +new Date,n=new i.ga,r=t.location.protocol;return r=(0===r.indexOf("http")?r:"https:")+"//z.moatads.com/aolvidibleapi29384728347/moatapi.js#moatApiCallback="+e,t[e]=function(i){n.resolve(i),t[e]=void 0},this.Fj.Bg(r),n.Ea()}.call(this)),this.md(this.qb))},md:function(e){if(this.xh){if(this.Cj===e)return;this.xh.destroy(),this.xh=null}this.Cj=e,t.then(function(t){t.startTracking(e,{ready:function(t,e){this.Cj===t?this.xh=e:e.destroy()}.bind(this,e)})}.bind(this))},ua:function(){if(!this.xh||!this.Cj||3>this.Cj.offsetHeight)return-1;var t=this.xh.getPercentViewable();return isNaN(t)||null===t?-1:Math.min(Math.round(t),100)},xf:function(){var t=this.ua();return 0>t||100<t?-1:50>t?0:1}}}(),[i.g.C.wd,i.g.C.Ga,i.g.C.X]),e.vdb={f:{L:{dj:i.f.L.dj}}},e.default=i.f.L.dj,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{ij:{},qa:{},M:{}},u:{},A:{},g:{$b:{},C:{},cc:{}}});i.u=n(18).vdb.u,i.A=n(4).vdb.A,i.g.$b=n(95).vdb.g.$b,i.g.C=n(19).vdb.g.C,i.g.cc=n(239).vdb.g.cc,i.f.qa=n(74).vdb.f.qa,i.f.M=n(43).vdb.f.M,i.f.ij=i.A.Class.extend(function(){function t(){var t=this.F.Wm();t=t?i.u.Za(t):{};var e=this.F.Jh(),n=this.ca.wf(),r=this.F.Et();return e&&(t.APID=e.pI),t.width=n.width,t.height=n.height,t["p.vw.active"]=this.fd.Fc()?1:0,t["p.vw.viewable"]=this.fd.xf(),t["p.vw.viewableOpportunity"]=this.df.xf(),t.moatViewableOpportunity=this.df.ua(),t.adapViewableOpportunity=this.fd.ua(),t.r=i.f.M.Ab(window),t.ps="html5-vpaid"+(this.le.Xh()?",swf":""),t.sid=this.F.en(),t.vvuid=this.F.It().vvuid,t.lookahead=!0,r&&(t.euconsent=r.euconsent,t.gdpr=r.gdpr,t.isOathFirstParty=r.isOathFirstParty),t}var e=i.g.C;return{N:function(t){this.fd=t[e.Ya],this.df=t[e.Tb],this.le=t[e.bc],this.F=t[e.X],this.ca=t[e.na]},BH:function(){var t,e=this.xn(i.g.$b.gb);for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e["ad."+t]=e[t],delete e[t]);return e["ad.m.ssai"]=1,e["ad.ps"]="vast_only",e.ad="vrm",e.v=2,e.bcid=this.F.sk(),e.pid=this.F.wk(),e.bid=this.F.Xm(),e},xn:function(e){var n=this.ca.Oc(),r={};if(n&&n.id)for(var o in r.vid=n.id,r.pt=i.g.cc.cq.toLowerCase(),r.at=e?e.toLowerCase():"",e=this.F.Wm())Object.prototype.hasOwnProperty.call(e,o)&&0===o.indexOf("m.vrm")&&(r[o]=e[o]);return r["p.vw.sound"]=Math.round(100*this.ca.getVolume()),r.autoplayInit=this.F.Vh()?1:0,i.u.Za(t.call(this),r)},sB:function(e){var n=this.ca.Oc(),r={};return n&&(r.vid=n.id,(n=n.metadata||{}).duration&&(r.t=n.duration/1e3)),r.at=e?e.toLowerCase():"",i.u.Za(t.call(this),r)}}}(),[i.g.C.Ya,i.g.C.Tb,i.g.C.bc,i.g.C.X,i.g.C.na]),e.vdb={f:{ij:i.f.ij}},e.default=i.f.ij,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{L:{pj:{},wa:{},xc:{},de:{}}},log:{},g:{C:{}}});i.f.L.wa=n(94).vdb.f.L.wa,i.log=n(21).vdb.log,i.f.L.xc=n(443).vdb.f.L.xc,i.f.L.de=n(444).vdb.f.L.de,i.g.C=n(19).vdb.g.C,i.f.L.pj=i.f.L.wa.extend(function(){var t=i.log.I("SmartViewability");return{N:function(e){t.debug("init"),this._super(e),this.df=e[i.g.C.Tb],this.Xr=e[i.g.C.Vg],this.Pr=new i.f.L.de(e)},md:function(e){t.debug("setElement",e),this._super(e),this.Xr.md(e),this.df.md(e),this.Pr.md(e)},ua:function(){t.debug("getVisiblePercent, try intersectionViewability");var e=this.df.ua();return-1===e&&(t.debug("moatViewability fallback"),-1===(e=this.Xr.ua())&&(t.debug("adapVisiblePercent fallback"),e=this.Pr.ua())),t.debug("visible percent",e),e}}}(),[i.g.C.wd,i.g.C.Tb,i.g.C.Vg]),e.vdb={f:{L:{pj:i.f.L.pj}}},e.default=i.f.L.pj,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{L:{xc:{},wa:{}},Ja:{},qa:{}},g:{C:{}},ga:{}});i.f.L.wa=n(94).vdb.f.L.wa,i.g.C=n(19).vdb.g.C,i.f.Ja=n(99).vdb.f.Ja,i.ga=n(86).vdb.ga,i.f.qa=n(74).vdb.f.qa,i.f.L.xc=i.f.L.wa.extend(function(){function t(){this.bf.resolve(),this.Dd&&(i.f.Ja.clearTimeout(this.Dd),delete this.Dd)}return{N:function(e){if(this.jf=-1,this.bf=new i.ga,void 0===window.IntersectionObserver)this.bf.resolve();else{this._super(e),this.Dd=i.f.Ja.setTimeout(t.bind(this),100),e=window.IntersectionObserver;for(var n=function(e){e=e[0].intersectionRatio,isNaN(e)||(this.Dd&&t.call(this),this.jf=Math.round(100*e),this.gm||(this.gm=!0))}.bind(this),r=[],o=0;100>o;o+=5)r.push(o/100);r.push(1),this.Hd=new e(n,{root:null,threshold:r}),this.Hd.observe(this.qb)}},md:function(t){this.jf=-1,this.Hd&&(this.Hd.unobserve(this.qb),this.qb=t,this.Hd.observe(this.qb))},Fc:function(){return 0<this.ua()},ua:function(){return i.f.qa.Fc()?this.jf:0},wg:function(){var t=this;return this.bf.Ea().then(function(){return t})}}}(),[i.g.C.wd]),e.vdb={f:{L:{xc:i.f.L.xc}}},e.default=i.f.L.xc,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{f:{L:{de:{},wa:{},oe:{}}}});i.f.L.wa=n(94).vdb.f.L.wa,i.f.L.oe=n(445).vdb.f.L.oe,i.f.L.de=i.f.L.wa.extend({ua:function(t){if(!this.qb)return-1;var e=i.f.L.oe.xt(this.qb).ba,n=e.Ec*e.qc/100;return t&&e.R<t&&(n=Math.max(0,100*(e.qc*e.height/100-t+Math.max(0,e.R))/e.height)),Math.min(Math.round(n),100)}}),e.vdb={f:{L:{de:i.f.L.de}}},e.default=i.f.L.de,e.__esModule=!0},function(t,e,n){var i=(t=n(1))(i||{},{f:{L:{oe:{}}}}),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};i=t(n(28).vdb,i||{}),function(){var t={bv:"aboveVisibleArea",Qv:"belowVisibleArea",Kw:"leftToVisibleArea",vx:"rightToVisibleArea",Ue:"inVisibleArea",Te:"hidden",Cc:"NA"},e={dv:1,yl:0},n={Cc:-1,Gq:0,Fw:1},o={We:1,Bq:2,Zp:3},s={Al:1,fj:0,Cc:-1},a={wG:t,cG:e,iG:n,mG:o,$f:s,Xq:{wl:1,xw:function(){return this.wl++},URL:"//redir.adap.tv/redir/client/VPixel.swf"},vu:[],pi:{},FH:{},QB:function(t){for(var e=t,n=0,i=0,r=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)window.getComputedStyle&&(r=window.getComputedStyle(e,null)),n+=e.offsetLeft-e.scrollLeft+(r?parseInt(r.getPropertyValue("border-left-width"),10):0),i+=e.offsetTop-e.scrollTop+(r?parseInt(r.getPropertyValue("border-top-width"),10):0),e=e.offsetParent;return t.bH=n,t.cH=i,{x:n,y:i}},ug:function(t,e){var n=document.defaultView||document.parentWindow;try{n=t.ownerDocument.defaultView||t.ownerDocument.parentWindow}catch(t){}return t.currentStyle?t.currentStyle[e]:n&&n.getComputedStyle&&n.getComputedStyle(t,"")?n.getComputedStyle(t,"")[e]:t.style?t.style[e]:""},we:function(t){var e={T:0,R:0,width:0,height:0};return t&&(e.width=t.offsetWidth,e.height=t.offsetHeight,t.getBoundingClientRect?(t=t.getBoundingClientRect(),e.T=Math.round(t.left),e.R=Math.round(t.top)):(t=this.QB(t),e.T=t.x,e.R=t.y)),e},He:function(t,e){var n=0,i=t.length+t.offset,r=e.length+e.offset;return i<e.offset||t.offset>r?{length:0,offset:-1/0}:(t.offset>=e.offset&&i<=r?n=t.length:t.offset<=e.offset&&i>=r?n=e.length:t.offset<=e.offset?n=Math.abs(i-e.offset):t.offset>e.offset&&(n=Math.abs(r-t.offset)),{length:n,offset:Math.max(t.offset,e.offset)})},Gn:function(t,e){var n=this.Jm(t);if((e=e||this.Bf(t))===o.We)return!0;if(e===o.Bq)return this.Jm(t);try{var i=t.ownerDocument.defaultView||t.ownerDocument.parentWindow}catch(t){}try{var r=this.Dt(i)}catch(t){return!0}for(t=0;t<r.length&&!n;t++)n=r[t],n=this.Jm(n);return n},Jm:function(t){function e(t){return t&&"string"==typeof t.id&&-1<t.id.indexOf("player_googima")}function n(t){var n,i;if(e(t))return!0;for(t=this.mn(t),i=0;i<t.length;++i)if((n=t[i])&&e(n.node))return!0;return!1}var i=!1,r=t;for(t=!this.ug(t,"visibility")&&!n.call(this,t);r&&!i&&(i="hidden"===this.ug(r,"visibility")||"none"===this.ug(r,"display")||this.vD(r),n.call(this,r)&&(i=!1),i=t||i,r!==r.ownerDocument.body);)r=r.parentNode;return i},mn:function(t){var e=t.parentNode,n=[];try{for(;e&&e!==e.ownerDocument.body;)1===e.nodeType&&(n.push(this.Qk(e)),e=e.parentNode)}catch(t){}for(0===n.length?e=t:(e=n[0],t=n[0]);e;)null!=(e=e.nextSibling)&&1===e.nodeType&&n.push(this.Qk(e));for(;t;)null!=(t=t.previousSibling)&&1===t.nodeType&&n.push(this.Qk(t));return n},sF:function(t,e,n){var i,r=null,o=this.He({offset:t.T,length:t.width},{offset:e.T,length:e.width}),s=this.He({offset:t.R,length:t.height},{offset:e.R,length:e.height});if(0<o&&0<s){var a=[{x:o.offset,y:s.offset},{x:o.offset+o.length,y:s.offset},{x:o.offset,y:s.offset+s.length},{x:o.offset+o.length,y:s.offset+s.length},{x:o.offset+Math.floor(o.length/2),y:s.offset+Math.floor(s.length/2)}];for(i=0;5>i;i++){var u={x:Math.random()*o.length+o.offset,y:Math.random()*s.length+s.offset};a.push(u)}for(i=0;i<a.length;i++)if((u=this.gt(a[i].x,a[i].y,n))===t.node||u===e.node){r=u;break}}return r},gt:function(t,e,n){return(n=n||window).document.elementFromPoint(t,e)},iD:function(t,e,n,i){var r=!0,o=this.we(e),s=this.He({offset:t.T,length:t.width},{offset:o.T+n.T,length:o.width}),a=this.He({offset:t.R,length:t.height},{offset:o.R+n.R,length:o.height}),u=s.length*a.length/(o.width*o.height);if(0===u)return{Om:!1};var l=this.gt(Math.floor(s.length/2)+s.offset,Math.floor(a.length/2)+a.offset,i);return null===l?r=!0:l===e||"ADAPTV_HTML5_IFRAME"===l.id||"IFRAME"===l.nodeName?r=!1:l!==t.node&&(t.T+t.width)*(t.R+t.height)==(o.T+n.T+o.width)*(o.R+n.R+o.height)&&(r=!1),this.sF({node:t.node,T:t.T,R:t.R,width:t.width,height:t.height},{node:e,T:o.T+n.T,R:o.R+n.R,width:o.width,height:o.height},i)===e&&(r=!1),{Om:r,tu:u,width:s.length,height:a.length,T:s.offset,R:a.offset}},Is:function(t,e,n,i){var r;for(r=0;r<t.length;r++)if(1===t[r].node.nodeType&&this.Js(t[r],e,n,[],t,i))return!0;return!1},Js:function(t,e,n,i,r,o){var s=!1,a=t.node;if((t=this.iD(t,e,n,o)).Om&&.5<=t.tu)return!0;if(t.Om&&.5>t.tu)t.node=a,i.push(t);else if(a&&a.children&&1<=a.children.length)for(t=a.children,a=0;a<t.length;a++)if(1===t[a].nodeType){var u=this.Qk(t[a]);s=s||this.Js(u,e,n,i,r,o)}return s||this.WD(i,e,n)},Qk:function(t){var e=this.we(t);return e.node=t,e},WD:function(t,e,n){var i,r=0,o=0;if(this.we(e),this.Ro(t),2>t.length)return!1;e=this.we(e);var s=this.Ro(t);for(i=0;i<t.length;i++)r+=t[i].width*t[i].height;for(i=0;i<s.length;i++){var a=this.He({offset:s[i].jk.T,length:s[i].jk.width},{offset:s[i].kk.T,length:s[i].kk.width});t=this.He({offset:s[i].jk.R,length:s[i].jk.height},{offset:s[i].kk.R,length:s[i].kk.height}),a=this.He({offset:a.offset,length:a.length},{offset:e.T+n.T,length:e.width}),t=this.He({offset:t.offset,length:t.length},{offset:e.R+n.R,length:e.height}),o+=a.length*t.length}return.5<=(r-o)/(e.width*e.height)},Ro:function(t,e){var n;for(e=e||[],n=1;2<=t.length&&n<t.length;n++)t[0].node!==t[n].node&&e.push({jk:t[0],kk:t[n]});return 2>=t.length?e:this.Ro(t.slice(1),e)},JH:function(t){var e,n={T:0,R:0};try{var i=this.Dt()}catch(t){i=[]}var r=this.mn(t),o=window,s=this.Is(r,t,n,o);for(e=0;e<i.length&&!s;e++){o=o.parent;var a=this.we(i[e]);for(n.T+=a.T,n.R+=a.R,a=0;a<r.length;a++)r[a].T+=n.T,r[a].R+=n.R;a=this.mn(i[e]),r=r.concat(a),s=s||this.Is(r,t,n,o)}return s},vD:function(t){var e=t.parentNode;return!(!e||"BODY"===t.tagName||"visible"===this.ug(e,"overflow")&&"visible"===this.ug(e,"overflow-x")&&"visible"===this.ug(e,"overflow-y")||!(0>t.offsetLeft||0>t.offsetTop)&&1<e.offsetWidth&&1<e.offsetHeight)},Dt:function(t){var e=[];for(t=t||window;t!==window.top;)e.push(t.frameElement),t=t.parent;return e},Bf:function(t){t=t||document.body;try{return window.top.location.href?t.ownerDocument.defaultView.frameElement?o.Zp:o.Bq:o.We}catch(t){return o.We}},Pt:function(t){var e=t.document,n=e.compatMode&&"BackCompat"!==e.compatMode?e.documentElement:e.body,i={width:0,height:0,T:0,R:0};return void 0!==t.innerWidth?(i.width=t.innerWidth,i.height=t.innerHeight):t.document.documentElement&&(t.document.documentElement.clientWidth||t.document.documentElement.clientHeight)?(i.width=t.document.documentElement.clientWidth,i.height=t.document.documentElement.clientHeight):document.body.offsetWidth&&document.body.offsetHeight&&(i.width=t.document.body.offsetWidth,i.height=t.document.body.offsetHeight),i.T=e.all?n.scrollLeft:t.pageXOffset,i.R=e.all?n.scrollTop:t.pageYOffset,i},tk:function(e,n){return 0<n.width&&0<n.height&&0<e.width&&0<e.height?e.R+e.height<=n.R?t.bv:e.R>=n.height+n.R?t.Qv:e.T+e.width<=n.T?t.Kw:e.T>=n.width+n.T?t.vx:t.Ue:t.Te},wn:function(t,e){var n={T:0,R:0,width:0,height:0},i=e.T-t.T;return n.T=Math.max(i,0),n.width=Math.max(0,Math.min(Math.min(e.width,t.width),Math.min(e.width+i,t.width-i))),i=e.R-t.R,n.R=Math.max(i,0),n.height=Math.max(0,Math.min(Math.min(e.height,t.height),Math.min(e.height+i,t.height-i))),n},WB:function(t,e){return t=Math.min(e.width-t.T,t.width+t.T)/t.width*100,t=Math.round(100*Math.min(Math.max(0,t),100))/100,Math.round(t)},OC:function(t,e){return t=Math.min(e.height-t.R,t.height+t.R)/t.height*100,t=Math.round(100*Math.min(Math.max(0,t),100))/100,Math.round(t)},Jt:function(e,n,i){var r=a.Bf(e),s=0,u=0,l=t.Cc;return r!==o.We&&(this.Gn(e,r)?l=t.Te:(e={T:0,R:0,width:i.width,height:i.height},(l=this.tk(n,e))===t.Ue&&(s=this.WB(n,e),u=this.OC(n,e)),s&&u||(s=0))),{position:l,Ec:s,qc:s}},tC:function(e,n,i,r){var s={position:t.Cc,Ec:0,qc:0},u=a.Bf(e);if(u===o.We)return s;if(this.Gn(e,u)&&(s.position=t.Te),s.position!==t.Te&&(e=i[i.length-1],u={T:0,R:0,width:r.width,height:r.height},r=this.tk(e,u),s.position=r,r===t.Ue)){for(e=this.wn(e,u),u=i.length-1;0<u&&(r=this.tk(i[u-1],e))===t.Ue;)e=this.wn(i[u-1],e),u--;r===t.Ue&&this.tk(n,e)===t.Ue?(i=(e=this.wn(n,e)).width/n.width*100,i=Math.round(100*i)/100,i=Math.round(i),s.Ec=i,i=e.height/n.height*100,i=Math.round(100*i)/100,i=Math.round(i),s.qc=i):s.position=t.Te}return s},xt:function(e){var n=window,i={hostname:window.location.hostname,Th:!1,Xb:{fE:"",rF:"",T:0,R:0,width:0,height:0,Ws:!1,Ag:0},Zd:{width:0,height:0,T:0,R:0},ba:{T:0,R:0,width:0,height:0,position:t.Cc,Ec:0,qc:0},xb:"NA"},r=this.we(e);if(i.ba.T=r.T,i.ba.R=r.R,i.ba.width=r.width,i.ba.height=r.height,(r=a.Bf(e))===o.We)return i.Th=!0,i.Xb.Ws=!0,i.Xb.Ag=-1,i.ba.Ec=100,i.ba.qc=100,i;r===o.Zp&&(i.Th=!0,i.Xb.rF=window.top.location.href),this.Gn(e,r)&&(i.ba.position=t.Te);try{n=e.ownerDocument.defaultView||n}catch(t){}if(i.Zd=this.Pt(n),(r=this.Jt(e,i.ba,i.Zd)).position!==t.Ue)return i.ba.position=r.position,i.ba.Ec=r.Ec,i.ba.qc=r.qc,i.ba.width=i.ba.width<i.Zd.width?i.ba.width:i.Zd.width,i.ba.height=i.ba.height<i.Zd.height?i.ba.height:i.Zd.height,i;try{if(i.Th){window.parent&&window.parent.location&&(i.Xb.fE=window.parent.location.href),i.Zd=this.Pt(window.top);for(var s=[];n!==window.top;){var u=this.we(n.frameElement);0===i.Xb.Ag&&(i.Xb.width=u.width,i.Xb.height=u.height),i.Xb.T=u.T,i.Xb.R=u.R,s[i.Xb.Ag]=u,i.Xb.Ag+=1,n=n.parent}r=this.tC(e,i.ba,s,i.Zd),i.ba.position=r.position,i.ba.Ec=r.Ec,i.ba.qc=r.qc}}catch(t){i.Xb.Ag=-1}return i.Th||(r=this.Jt(e,i.ba,i.Zd),i.ba.position=r.position,i.ba.Ec=r.Ec,i.ba.qc=r.qc),i},uC:function(t,e){var n=null;if(this.pi[t]&&this.pi[t][t]&&this.pi[t].parentNode)return this.pi[t];if(e&&document[e]&&document[e][t])n=document[e];else if(e&&window[e]&&window[e][t])n=window[e];else{var i,r=document.getElementsByTagName("object"),o=document.getElementsByTagName("embed"),s=[];for(e=0,i=r.length;e<i;s.push(r[e++]));for(r=[],e=0,i=o.length;e<i;r.push(o[e++]));for(o=s.concat(r),e=0;e<o.length;e++)try{if(o[e][t]()){n=o[e];break}}catch(t){}}return n&&(this.pi[t]=n),n},kC:function(t){if(!t)return{width:0,height:0};for(var e=t.offsetWidth,n=t.offsetHeight;t&&"BODY"!==t.tagName;)e=Math.min(t.offsetWidth,e),n=Math.min(t.offsetHeight,n),t=t.parentNode;return{width:e,height:n}},mD:function(t){return null!==t&&"object"===(void 0===t?"undefined":r(t))&&1===t.nodeType},cB:function(){if(void 0!==navigator.plugins&&"object"===r(navigator.plugins["Shockwave Flash"])&&void 0!==navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return!0;if(void 0!==window.ActiveXObject)try{return new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash"),!0}catch(t){}return!1},Gt:function(t,e,n,i){var r,o=a.vu,s=!this.cB(),u="7221 7658 7257 7386 7480 7716 7597 7865".split(" "),l=["mindjoltinc","cinesport"],c=!1;for(t=this.mD(t)?t:this.uC(e,t),r=0;r<u.length;r++)if(u[r]===i){c=!0;break}for(r=0;r<l.length;r++)if(l[r]===i){c=!0;break}if((c||s)&&((i=a.Ot(t)).Xc=i.nk,i.JF=i.nk,n&&t[n](i),s))return i;for(r=0;r<o.length;++r)if(o[r].id===e){var d=o[r];break}return d||(d=new a.Nl(e,t),o.push(d)),d.Gt(n)},YH:function(t){var e,n=a.vu;for(e=0;e<n.length;e++)if(n[e].id===t){n[e].dispose(),n.splice(e,1);break}},Ot:function(i){var r={active:e.yl,GA:"",nk:s.Cc,hasFocus:n.Cc};if(i){var o=a.xt(i);if(r.TH=o.ba.width,r.SH=o.ba.height,r.GA=i.id,o.ba.position!==t.Cc){i=o.ba.width*o.ba.Ec/100;var u=o.ba.height*o.ba.qc/100;r.nk=0===i||0===u?s.fj:.5<=i*u/(o.ba.width*o.ba.height)?s.Al:s.fj}else o.Th&&(r.QA="inIframe"),o.Xb.Ws&&(r.QA="iframeCrossDomain");if(o=!1,!document.hasFocus||!document.hasFocus())if(i=["webkit","moz","ms","o"],document.visibilityState)o="visible"!==document.visibilityState;else for(u=0;u<i.length;u++)if(document[i[u]+"VisibilityState"]){o="visible"!==document[i[u]+"VisibilityState"];break}r.active=o?e.yl:e.dv,r.hasFocus=a.yD()}return r},yD:function(){return!0===document.hidden?n.Gq:a.Bf()===o.We?n.Cc:window.top.document.hasFocus?window.top.document.hasFocus()?n.Fw:n.Gq:n.Cc},il:function(t){var e=a.we(this.ze),n=void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,i=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop,r=a.kC(t);this.Dg=1,this.UD=3,this.ze=t,this.top=e.R+i,this.left=e.T+n,this.width=e.width,this.height=e.height,this.minWidth=r.width,this.minHeight=r.height,this.$u=this.minWidth/(this.Dg+1),this.av=this.minHeight/(this.Dg+1)}};a.il.prototype={constructor:a.il,JB:function(){return window.Bm&&window.Bm.rD?[]:[{x:-1e4,y:-1e4}]},JC:function(){var t,e=[],n=this.left;for(t=0;t<this.Dg;t++)n+=this.$u,e.push({x:n,y:this.top});return e},DC:function(){var t,e=[],n=this.top;for(t=0;t<this.Dg;t++)n+=this.av,e.push({x:this.left+this.minWidth-1,y:n});return e},yB:function(){var t,e=[],n=this.left;for(t=0;t<this.Dg;t++)n+=this.$u,e.push({x:n,y:this.top+this.minHeight-1});return e},eC:function(){var t,e=[],n=this.top;for(t=0;t<this.Dg;t++)n+=this.av,e.push({x:this.left,y:n});return e},vB:function(){return[this.JB(),this.JC(),this.DC(),this.yB(),this.eC()]},yt:function(){var t=this.vB();return[].concat.apply([],t)}},a.Nl=function(t,e){this.id=t,this.Ob=new a.il(e),this.Io=!1,this.Xc=-1,this.Vc=[],this.timeout=void 0,this.Vu=1800,this.nf=""},a.Nl.prototype={constructor:a.Nl,Gt:function(t){var e=this;if(!this.Io){for(this.nf=t,t=0;t<this.Ob.yt().length;t++){var n=new a.Rl;n.Tt(this,this.gF),this.Vc.push(n)}return setTimeout(function(){e.wE()},1),this.timeout=setTimeout(function(){clearTimeout(e.timeout),!e.Dm()&&e.Gs()&&e.Ob&&e.Ob.ze[e.nf](e.gn())},this.Vu),this.Io=!0,null}t&&this.Ob.ze[t](this.gn())},wE:function(){var t;if(this.Ob){var e=this.Ob.yt();for(t=0;t<e.length;t++){var n=e[t];this.Vc[t].vE(n.x,n.y)}}},gF:function(){if(this.Dm()&&(clearTimeout(this.timeout),this.Gs())){var t=this.gn();this.Ob.ze[this.nf](t)}},gn:function(){var t,n=a.Ot(this.Ob.ze),i=0;if(this.Dm()){for(t=0;t<this.Vc.length;t++){i+=this.Vc[t].Xc}this.Ih=i>=this.Ob.UD?s.Al:s.fj}else this.Ih=s.Cc;return n.Ih=this.Ih,n.Xc=this.Ih===s.Cc?n.nk:this.Ih,n.active===e.yl&&n.Xc===s.Al&&(n.Xc=s.fj),n.JF=n.Xc,n},Dm:function(){var t,e=0;if(this.Ob&&window.Bm&&!window.Bm.rD&&0!==this.Vc[0].Xc)return!1;for(t=0;t<this.Vc.length;t++)-1<this.Vc[t].Xc&&e++;return e===this.Vc.length},Gs:function(){return this.nf&&this.Ob&&this.Ob.ze&&this.Ob.ze[this.nf]&&"function"==typeof this.Ob.ze[this.nf]},dispose:function(){var t,e=this.Vc.length;for(t=0;t<e;t++)this.Vc[t].destroy();this.Ob=null,this.Io=!1,this.Xc=-1,this.Vc=[],this.timeout=0,this.Vu=1800,this.id=this.nf=""}},a.Rl=function(){var t=this;this.Xc=-1,this.id=a.Xq.xw(),this.Vn="__adaptv__spotnotify__"+this.id.toString(),this.interval=0,this.so=this.Bh=this.Uk=null,window[this.Vn]=function(e,n,i){t.Xc=i,t.Bh&&(t.Bh.apply(t.so),t.Bh=null)}},a.Rl.prototype={constructor:a.Rl,Tt:function(t,e){var n="adaptvSpotDiv_"+this.id,i="adaptvVWSpot_"+this.id;if(!document.getElementById(n)){var r=['<object width="1px" height="1px" id="{spotId}" name="{spotId}" align="center" style="height: 1px !important; width: 1px !important;"><param name="movie" value="','" /><param name="bgcolor" value="#000000"/><param name="allowScriptAccess" value="always" /><param name="FlashVars" value="autoStart=true&callback={callback}"/><embed src="','" width="1px" height="1px" id="{spotId}" name="{spotId}" align="center" bgcolor="#000000" allowScriptAccess="always" FlashVars="autoStart=true&callback={callback}" type="application/x-shockwave-flash"/></object>'].join(a.Xq.URL);r=(r=r.split("{spotId}").join(i)).split("{callback}").join(this.Vn),i=document.body||document.getElementsByTagName("body")[0]||document.documentElement;var o=document.createElement("div");o.id=n,o.style.height="1px",o.style.width="1px",o.style.position="absolute",o.innerHTML=r,i.appendChild(o),this.Uk=o,this.so=t,this.Bh=e}},vE:function(t,e){this.Uk.style.left=t+"px",this.Uk.style.top=e+"px"},destroy:function(){var t=document.body||document.getElementsByTagName("body")[0]||document.documentElement,e=document.getElementById("adaptvSpotDiv_"+this.id);e&&t.removeChild(e),this.so=this.Bh=this.Uk=null,delete window[this.Vn]}},i.f.L.oe=a}(),e.vdb={f:{L:{oe:i.f.L.oe}}},e.default=i.f.L.oe,e.__esModule=!0},function(t,e,n){var i=n(1)(i||{},{yj:{},A:{}});i.A=n(4).vdb.A,i.yj=i.A.Class.extend(function(){function t(t,e){"function"==typeof t.setAttribute&&t.setAttribute(e,"")}function e(e){"function"==typeof e.getAttribute&&e.getAttribute("playsinline")||t(e,"playsinline"),"function"==typeof e.getAttribute&&e.getAttribute("webkit-playsinline")||t(e,"webkit-playsinline")}return{N:function(t,e){this.hg=t,this.Zr=e},iC:function(){return this.Zr||this.hg},DH:function(){return this.hg},VE:function(t){e(t),this.Zr=t},Ju:function(t){e(t),this.hg=t}}}()),e.vdb={yj:i.yj},e.default=i.yj,e.__esModule=!0},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=Symbol(),i=Symbol();t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[i]=e,this[n]=e}return t.prototype.WE=function(t){this[n]=t},t.prototype.Od=function(){return this[i]},t.prototype.lC=function(){return this[n]},t.prototype.GB=function(){return{kf:this[i],eE:this[n]}},t}(),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.queryString||"";return t=r.default["tracking.url"]+"impression.gif?pid="+(t.id||r.default["default.pid"])+"&bcid="+(t.bcid||r.default["default.bcid"])+"&s="+i.default.Nb()+"&pv="+(t.jsVersion||"1.0.115")+"&ifr="+(window!==i.default.Pc())+"&cb="+Math.random()+"&pt="+t.playerType+"&sid="+t.sid+"&r="+encodeURIComponent(i.default.Ab()||"undefined")+(-1!==e.indexOf("tbv=on")?"&itg=tbv":""),(e=document.createElement("img")).src=t,e};var i=(t=n(240))&&t.__esModule?t:{default:t},r=(n=n(78))&&n.__esModule?n:{default:n}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.sx="1",e.tx="2",e.AG="3"},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(95)),o=i(n(139)),s=i(n(19)),a=i(n(136)),u=i(n(23)),l=i(n(84)),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(451)),d=n(116),h=n(156),p=Symbol("adBreaks"),f=Symbol("adSystem"),_=Symbol("overlayAdBreak"),m=Symbol("vastLoadPromise"),y=Symbol("eventBus"),v=Symbol("prepairedItems");n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[f]=e[s.default.Ua],this[p]=[],this[y]=new l.default,this[v]=[]}return t.prototype.YE=function(t){this[_]&&function(t){var e=this,n=this[_],i=n&&n.adBreakItems[0];i&&t>n.startTime&&(this.preparePlayback(i).then(function(){e.play()}),this[_]=null)}.call(this,t)},t.prototype.jE=function(){var t=this[p].find(function(t){return t.type===d.ej});t&&(this[_]=t)},t.prototype.preparePlayback=function(e){var n=this,i=e.adBreakItemId;return-1===this[v].indexOf(i)?this[v].push(i):(0,h.rE)(e),this[m]||(this[m]=new u.default(function(t){n[f].fu(e.customInfo.slot.aeg,function(){(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).error||t(e)},e.customInfo.slot.type)})),this[m].then(function(){n[m]=null,n[y].dispatchEvent(t.cp,e)})},t.prototype.resolveAdBreak=function(t){var e=this;return new u.default(function(n){e[f].Xn({originalTime:o.default.Um(t.startTime,!0),type:"midroll"===t.type?r.default.bd:r.default.gb},function(e){e=e.Kk,t.adBreakItems=c.jF(e&&e[0]),n()})})},t.prototype.play=function(){var t=this;return(this[m]||u.default.resolve()).then(function(){t[f].Jo()})},t.prototype.fetchAdBreaks=function(t){var e=this;return t&&function(t){(t=t.aeg)&&t.forEach(function(t){t.forEach(function(t){(t.type||t.adTypes&&t.adTypes[0]).toLowerCase()===r.default.fb.toLowerCase()&&(t.slot=t.slot||{},(t=t.slot).width="45%",t.position=a.default.Il,t.left="18.5%",t.top="90%")})})}(t),new u.default(function(n){e[f].Xn({preloadedConfig:t},function(t){e[p]=c.kF(t.Kk),t=e[p].map(function(t){return c.clone(t)}),n(t)})})},t.prototype.addEventListener=function(t,e){this[y].addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this[y].removeEventListener(t,e)},t}(),e.default=n,n.W=[s.default.Ua],n.cp="AdBreakManager.AD_BREAK_PREPARED"},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return t.slots?Array.from(t.slots,function(t){return{adBreakItemId:(new s.default).toString(),adPluginMimeType:l.Bl,customInfo:{hasGemini:(0,u.Rt)(t),slot:t},duration:30,instream:!1,source:{streams:[{url:"dummy.mp4"}]},type:t.type===o.default.Qe?"bumper":"ad"}}):[]}Object.defineProperty(e,"__esModule",{value:!0}),e.jF=r,e.clone=function(t){var e=Object.assign({},t);return e.adBreakItems=t.adBreakItems.slice(),e},e.kF=function(t){return Array.from(t,function(t){var e=r(t),n=t.time?a.default.Ke(t.time):34;return(n={adBreakId:(new s.default).toString(),adBreakItems:e,mimetype:l.Bl,startOffset:n,startTime:n}).type=e[0]&&e[0].customInfo.hasGemini?c.Rw:t.type&&t.type===o.default.fb?c.ej:t.type&&t.type.toLowerCase(),n.type=n.type||"preroll",n})};var o=i(n(95)),s=i(n(154)),a=i(n(18)),u=n(156),l=n(243),c=n(116)},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(){var t=this;[[h.default.Fa,[d.PLAYING,d.NONLINEAR_AD_RENDERED],function(t){this[E]=!1,s.call(this),this[R].Yd({mtype:t&&t.data&&t.data.mimeType})}.bind(this),function(){this[b].dispatchEvent(d.METRICS,this[R].cb({evt:c.Nf})),this[S]=!0,this[T]=this[g].isMuted(),this[I]=0}.bind(this)],[h.default.od,[],null,u.bind(this)],[h.default.lp,[],null,u.bind(this)],[h.default.Pe,[d.VOLUME_CHANGED],null,function(t){(t.data.muted&&!1===this[T]||!1===t.data.muted&&this[T])&&this[b].dispatchEvent(d.MUTE_CHANGED,this[R].cb({muteState:t.data.muted?"muted":"unmuted"})),this[T]=t.data.muted}.bind(this)],[h.default.Zb,[],function(t){var e=t&&t.data&&t.data.currentTime||0;this[b].dispatchEvent(d.TIME_UPDATE,e,this[R].cb(t.data)),this[C]=e,!this[E]&&2<=e&&(this[b].dispatchEvent(d.METRICS,this[R].cb({dur:2,dur_d:a.call(this,2),evt:c.Iv})),this[E]=!0)}.bind(this)],[h.default.Jc,[d.PAUSED]],[h.default.Pf,[d.PLAYING]],[h.default.Qf,[d.SKIPPED]],[h.default.dl,[],function(){var t=Math.floor(this[g].getCurrentTime()||this[C]);this[b].dispatchEvent(d.METRICS,this[R].cb({dur:t,dur_d:a.call(this,t),evt:c.yv}))}.bind(this)],[h.default.Yc,[],function(t){var e=this;t.data.loaded||this[P].Ea().then(function(n){var i=t.data.error&&t.data.error.rc&&t.data.error.rc.da;e[b].dispatchEvent(d.METRICS,e[R].cb({evt:c.jv,r_code:n?y.default.$o.da:i||y.default.aq.da}))})}.bind(this)],[h.default.Zc,[],function(t){var e="ad",n="",i="",r="",o=0,s=0,a="";if(t.data.adModel?(a=t.data.adModel.uo||"",t.data.adModel.yb instanceof Array&&t.data.adModel.yb.forEach(function(t){t.ei instanceof Array&&t.ei.forEach(function(t){t.Mc&&t.Mc.toLowerCase()===_.default.ag&&(e=_.default.ag),a||(a=t.uo||"")})}),t.data.adModel.H&&(n=t.data.adModel.H.name||""),s=t.data.adModel.Gu):e="no-ad",t.data.params&&t.data.params.urls){var u=t.data.params.urls;i=v.default.Dc(u[0]||""),1<u.length&&(r=v.default.Dc(u[1]||""),o=u.length-1)}this[R].Yd({ad_sys:n,adSeq:s}),n={adid:t.data.adModel?t.data.adModel.id:"",adl:t.data.latency,crid:t.data.crid,evt:c.iv,f_call:i,f_hop:r,n_hop:o,plcid:a,r_code:2,r_type:e,tmout_ms:t.data.ad&&t.data.ad.dn(),v_cr_id:t.data.crid},this[b].dispatchEvent(d.METRICS,this[R].cb(n,t.qg))}.bind(this)],[h.default.fp,[null,d.NONLINEAR_AD_CLICKED]],[h.default.sc,[],function(t){t.data.ys===p.default.fb&&t.data.action===f.default.Qg&&this[b].dispatchEvent(d.NONLINEAR_AD_DISMISSED,this[R].cb(t.data))}.bind(this)]].forEach(function(e){var n=(e=l(e,4))[0],i=l(e[1],2),r=i[0],o=i[1],s=e[2],a=e[3];t[g].addEventListener(n,function(e){s&&s(e),e.data.adType===p.default.fb&&o?t[b].dispatchEvent(o,t[R].cb(e.data)):r&&t[b].dispatchEvent(r,t[R].cb(e.data)),a&&a(e)})})}function s(){this[b].dispatchEvent(d.bw,this[g].getTimeLog())}function a(t){var e=t-this[I];return this[I]=t,e}function u(t){var e=this;this[S]?(this[S]=!1,this[b].dispatchEvent(d.PLAY_COMPLETE,this[R].cb())):(s.call(this),this[P].Ea().then(function(n){e[b].dispatchEvent(d.PLAYBACK_ERROR,e[R].cb({a_dlv_err:n?y.default.$o:t.data.vastError&&t.data.vastError.da,evt:c.rv}))}))}Object.defineProperty(e,"__esModule",{value:!0});var l=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=r(n(241)),d=r(n(155)),h=i(n(12)),p=i(n(95)),f=i(n(148)),_=i(n(453)),m=i(n(19)),y=i(n(25)),v=i(n=n(24)),g=Symbol(),E=Symbol(),b=Symbol(),A=Symbol(),S=Symbol(),T=Symbol(),I=Symbol(),C=Symbol(),R=Symbol(),P=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[g]=e[m.default.Ua],this[b]=e[m.default.hj],this[R]=e[m.default.aj],this[P]=e[m.default.si],this[A]={},this[S]=!1,o.call(this),this[b].addEventListener(d.RESOLVE_ERROR,s.bind(this))}return t.prototype.dD=function(){return this[S]},t}(),e.default=n,n.W=[m.default.Ua,m.default.hj,m.default.aj,m.default.si]},function(t,e,n){var i=n(1)(i||{},{g:{sd:{}}});i.g.sd={ag:"vpaid"},e.vdb={g:{sd:i.g.sd}},e.default=i.g.sd,e.__esModule=!0},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(242)),r=Symbol();t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")}return t.prototype.OE=function(t){return this[r]={ads:[Object.assign({},t.YVAP.standaloneAd)]},this},t.prototype.oF=function(){return{adxResult:"SHOW_ADS",aeg:[[{adEngineType:i.default.Vi,adTypes:["Preroll"],extraProperties:this[r],name:"Empty - Preroll",rcid:"5512a39b09eab108e072da23",rid:"5ade359bc673db38c7f14e5e",url:"http://s3.amazonaws.com/vdb-cdn-files/dev/player-auto-tests/vast/empty.xml",usesShim:!1,vendor:"569fa372e4b0e41110650e54"}]],apid:"O2cad7c149-5370-11e8-9ef2-0242da4b2b2b",auid:"2948598777606229655__TIME__2018-05-30+04%3A00%3A18",rids:["5ade359bc673db38c7f14e5e"],slot:"AVAIL",txid:"f4c04740-9a37-4809-a468-c80251770eed",usid:"c2dc0332-349c-48b7-8f3d-8d82d2b764df"}},t}(),e.default=t},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){return t&&t.__esModule?t:{default:t}}(n(19)),r=Symbol(),o=Symbol(),s=Symbol();t=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[r]=e[i.default.Ua],this[o]=e[i.default.Ya]}return t.prototype.cb=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:null)||this[r].ta(),n=Math.round(this[r].getDuration());return e&&this.Yd({ntwk:e.NC(),pos:e.getType().toLowerCase()}),n&&this.Yd({ad_lng:n}),this.Yd({view:this[o].ua()}),function(t){var e={initlatency:"vil",latency:function(t){return t.initlatency?"vst":"_lat"},loadlatency:"vsl",mimetype:"mtype"};return Object.keys(t).forEach(function(n){if(e[n]){var i=e[n]instanceof Function?e[n](t):e[n];t[i]=t[n]}}),t}.call(this,Object.assign({},this[s],t))},t.prototype.Yd=function(t){this[s]=Object.assign({},this[s],t)},t.prototype.Cu=function(){this[s]={}},t}(),e.default=t,t.W=[i.default.Ua,i.default.Ya]},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=(t=n(19))&&t.__esModule?t:{default:t},o=(t=n(457))&&t.__esModule?t:{default:t},s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(115)),a=Symbol(),u=Symbol(),l=Symbol(),c=Symbol();n=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this[u]=e[r.default.bh],this[l]=e[r.default.Yf],this[c]=e[r.default.na],e[r.default.Ua].addEventListener(o.default.wi,function(){this[a]=!0}.bind(this))}return t.prototype.onPlayerEvent=function(t,e){switch(t){case s.Pw:t=i(e,1)[0],this[a]||(this[a]=!0,this[l].dB()),this[c].cE(),this[c].Nu(0),this[c].oi(t.duration),this[u].lo(),this[u].oi(t.duration),this[u].bE();break;case s.xq:t=i(e,1)[0],this[c].Nu(t),this[u].ji(t);break;case s.Ow:this[u].aE()}},t.prototype.reset=function(){this[a]=!1},t}(),e.default=n,n.W=[r.default.Ua,r.default.Yf,r.default.bh,r.default.na]},function(t,e,n){var i=n(1)(i||{},{B:{Kc:{},Event:{}}});i.B.Event=n(193).vdb.B.Event,i.B.Kc=i.B.Event.extend({data:null,Gm:null,N:function(t,e,n){this._super(t,!0,!0),this.data=e,this.Gm=n}}),function(t){t.uj="Reporting.Video.Play",t.Ux="Reporting.Video.Decile",t.Vx="Reporting.Video.HWM",t.el="Reporting.Ad.Request",t.bl="Reporting.Ad.Engine.Request",t.ti="Reporting.Ad.Engine.Response",t.$k="Reporting.Ad.Engine.Flow",t.ov="Reporting.Ad.Early.Stop",t.Ne="Reporting.Ad.Issue",t.wi="Reporting.Ad.Slot.Opportunity",t.ac="Reporting.Basic.Display",t.kb="Reporting.Basic.Click",t.La="Reporting.Basic.Error"}(i.B.Kc),e.vdb={B:{Kc:i.B.Kc}},e.default=i.B.Kc,e.__esModule=!0},function(t,e,n){function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];(t=Object.assign({},t)).playerType=s.default.ah,t.macros=t.macros||{},t.macros["m."+o.default.sl]=!0,t.macros["m."+o.default.Pl.toLowerCase()]="1",t.dontPredefineVideoTag=!0,t.sid=t.playerGuid||(new a.default).toString(),e=e?l:u,t.playerId=e.Zg,t.buyerCompanyId=e.Og;var n=t.timeout||{};return t.timeout=n,n.hard=n.hard||3,n.start=n.start||12,n.maxAdSearch=n.maxAdSearch||30,t.currentVideo={id:e.tj},t.slot||((e=document.createElement("div")).style.width="100%",e.style.height="100%",t.slot=e),t};var o=r(n(101)),s=r(n(239)),a=r(n(154)),u=i(n(459)),l=i(n=n(460))},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Og="5afc769f7239855a15fcee15",e.Zg="5afc75ea3a04293dad9f1a1f",e.tj="5ba51c50007d0c73e2b8eddd"},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Og="5b32606132679a7241fe5ca9",e.Zg="5b3260f8dbaab35b11ca3a6e",e.tj="5b3261c2cd472447b9cd4d4b"}])}module.exports=Vb()}).call(this,__webpack_require__(30))},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=n(118),s=function(t){function e(){var e=t.call(this)||this;return e.name="ProviderBrandingPlugin",e.version="8.0.85",e.mimetype="branding/provider",e}return i(e,t),e.prototype._renderBranding=function(t){var e=t&&t.branding&&t.branding.providerId,i=e&&o.PROVIDER_BRANDING_TEMPLATES[e];return this._shouldRenderBranding(t)?(n(283),i.render()):null},e.prototype._shouldRenderBranding=function(t){var e=t&&t.branding&&t.branding.providerId,n=e&&o.PROVIDER_BRANDING_TEMPLATES[e],i=t&&t.branding.gameOrigin||[];return!(n&&"video.nflhighlights.com"===e&&i.indexOf("vzw")>-1)&&!!n},e}(r.SimpleBrandingPlugin);e.default=s},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.b("<div class='vp-nfl-branding-container'>"),i.b("\n"+n),i.b("    <div class='vp-nfl-branding'>"),i.b("\n"+n),i.b("        <a href='http://www.nfl.com/' target='nfl_site'>"),i.b("\n"+n),i.b("            <span class='vp-nfl-brand vp-nfl-brand-span'></span>"),i.b("\n"+n),i.b("            <span class='vp-nfl-brand vp-nfl-brand-logo'></span>"),i.b("\n"+n),i.b("        </a>"),i.b("\n"+n),i.b("    </div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}},"<div class='vp-nfl-branding-container'>\n    <div class='vp-nfl-branding'>\n        <a href='http://www.nfl.com/' target='nfl_site'>\n            <span class='vp-nfl-brand vp-nfl-brand-span'></span>\n            <span class='vp-nfl-brand vp-nfl-brand-logo'></span>\n        </a>\n    </div>\n</div>",i)},function(t,e,n){var i=n(70);"string"==typeof i&&(i=[[t.i,i,""]]);var r=n(120)(i,{});t.hot.accept(70,function(){var e=n(70);"string"==typeof e&&(e=[[t.i,e,""]]),r(e)}),t.hot.dispose(function(){r()})},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCI+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE1IDI5LjA5MnMuNjI0LTEuMDggMS4yMzQtMS42NjhjLjg2Mi0uODI3IDIuMDg0LTEuMzQ2IDMuNzM2LTEuNTg0IDIuMDczLS4zIDMuNTc2LTEgNC40NjMtMi4wNzIuNzE1LS44NzIuODIzLTEuNzQuODI1LTIuMTg0VjQuMTE0aC0uNjgzYy0uODguNjMtMi41NjggMS40OTMtNC43MzguOTU4QzE2LjA3NSA0LjE0OCAxNSAuOTA2IDE1IC45MDZzLTEuMDc2IDMuMjQtNC44MzcgNC4xNjZjLTIuMTczLjUzNS0zLjg2LS4zMy00Ljc0Mi0uOTZoLS42Nzh2MTcuNDcyYzAgLjQ0LjEwOCAxLjMxMi44MjUgMi4xODQuODg1IDEuMDcyIDIuMzg2IDEuNzcgNC40NiAyLjA3MiAxLjY1NS4yMzggMi44NzYuNzU3IDMuNzM4IDEuNTg4LjYzMy42MDggMS4yMzQgMS42NjQgMS4yMzQgMS42NjQiLz48cGF0aCBmaWxsPSIjMDEzNzY5IiBkPSJNMjQuNjQgNC43OTZzLTIuMDU2IDEuNi00Ljk1Ljg3NUMxNi4zMSA0LjgzIDE1IDIuMjk4IDE1IDIuMjk4cy0xLjMxMiAyLjUzLTQuNjkgMy4zNzRjLTIuODk3LjcyNS00Ljk1My0uODc0LTQuOTUzLS44NzR2MTYuNzg4YzAgLjU3LjI0IDIuOTkzIDQuNzU4IDMuNjQ2IDEuNzg2LjI2IDMuMTIuODMyIDQuMDc4IDEuNzU0LjM0NC4zMy42MDYuNjY2LjgwNS45NzguMi0uMzEyLjQ2LS42NDguODA4LS45NzguOTU2LS45MjIgMi4yOS0xLjQ5NCA0LjA3NC0xLjc1NCA0LjUyLS42NTIgNC43Ni0zLjA3NiA0Ljc2LTMuNjQ2VjQuNzk2eiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNSAyNi4yNTNzMS4zMS0xLjYyMiA0LjcyLTIuMTQ3YzMuOTAzLS42IDMuNzg4LTIuNDMzIDMuNzg4LTIuNTI1di04Ljc5NGwtMTcuMDIuMDAydjguNzkyYzAgLjA5My0uMTEyIDEuOTI1IDMuNzkgMi41MjUgMy40MS41MjYgNC43MiAyLjE0OCA0LjcyIDIuMTQ4Ii8+PHBhdGggZmlsbD0iI0Q1MEEwQSIgZD0iTTExLjAzIDE5LjIxM3YtNC4xOGwtLjUyMy0uMjk1VjEzLjY1aDIuMzl2MS4wODhsLS41LjI5NXY4LjUzbC0xLjI3OC0uMzg0LTEuODQ3LTUuNDV2My41OWwuNTg2LjQ1MnYxLjExbC0yLjU2NS0uNjU3di0uOTRsLjU4Ni0uMjMydi02LjAxNWwtLjYtLjNWMTMuNjVoMS45NE0xNS40MzIgMjMuMDM4bC41MS42MXYxLjA4NmwtMi41MzgtLjk0OHYtLjkybC41Ni0uMjN2LTcuNjAzbC0uNTU2LS4yODN2LTEuMWg0LjQwOHYyLjIxaC0uOTY4bC0uMjk1LS45MDdoLTEuMTJ2Mi41NTJoLjg0bC4zMy0uNDg0aC42Nzd2Mi4yN2gtLjY3NmwtLjMyLS40NmgtLjg1Mk0xOC4yMzYgMjMuNDJ2LTEuMDg1bC42My0uNTE3di02Ljc4NWwtLjU0LS4yODN2LTEuMWgyLjU0MnYxLjFsLS40OTcuMjgzdjYuMzY0bDEuMDkzLS4yOTMuMjA3LTEuNjdoMS4wNXYyLjc5Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTYuOTMyIDEwLjk4NmwtLjc3LS41OGguOTQybC4zMS0uODg4LjMxMi44OWguOTRsLS43Ny41NzguMjgzLjkwNy0uNzY3LS41MzctLjc2NC41MzdNMTAuMjcyIDEwLjk4NmwtLjc3LS41OGguOTRsLjMxLS44ODguMzEyLjg5aC45NGwtLjc3LjU3OC4yODUuOTA3LS43NjctLjUzNy0uNzY0LjUzN002LjkzMiA3Ljk3NWwtLjc3LS41NzhoLjk0MmwuMzEtLjg5LjMxMi44OWguOTRsLS43Ny41NzguMjgzLjkwNS0uNzY3LS41NC0uNzY0LjU0TTEwLjI3MiA3Ljk3NWwtLjc3LS41NzhoLjk0bC4zMS0uODkuMzEyLjg5aC45NGwtLjc3LjU3OC4yODUuOTA1LS43NjctLjU0LS43NjQuNTRNMjMuMzQ4IDExLjg5M2wtLjc2NC0uNTM4LS43NjYuNTM4LjI4NC0uOTA3LS43Ny0uNTc4aC45NGwuMzEyLS44OS4zMS44OWguOTQybC0uNzcuNTc4TTIwLjAxIDExLjg5M2wtLjc2NC0uNTM4LS43NjcuNTM4LjI4NC0uOTA3LS43NzItLjU3OGguOTRsLjMxNC0uODkuMzEuODloLjk0bC0uNzcuNTc4TTIzLjM0OCA4Ljg4bC0uNzY0LS41NC0uNzY2LjU0LjI4NC0uOTA1LS43Ny0uNTc4aC45NGwuMzEyLS44OS4zMS44OWguOTQybC0uNzcuNTc4TTIwLjAxIDguODhsLS43NjQtLjU0LS43NjcuNTQuMjg0LS45MDUtLjc3Mi0uNTc4aC45NGwuMzE0LS44OS4zMS44OWguOTRsLS43Ny41NzhNMTUuNzMgNy4zMThjLS4zNDItLjI4LS43MjctLjQ2NC0xLjEzNS0uNTUyLjEtLjA5NC4yMDItLjE3Mi4yODgtLjI0Ny41MS4xMi44NTQuMzUgMS4wODguNTQ1LS4wOC4wODQtLjE2My4xNy0uMjQuMjUzbS0uNDkzLjU5OGMtLjMyNy0uMjgtLjcyNC0uNDgtMS4xNzUtLjU3LjA3LS4wODguMTUtLjE4NS4yMjgtLjI3LjM0My4wNi43ODIuMjQgMS4xNjcuNTU3LS4wOC4wOTYtLjE1Mi4xOS0uMjIuMjgzbS0uNDQ1LjYyNGMtLjM1My0uMjk1LS43NjMtLjQ3NS0xLjE2Ni0uNTUzIDAgMCAuMTIyLS4yMDIuMTkzLS4zMDQuNDkuMDk2Ljg5My4zMjcgMS4xNy41NjQtLjA3LjEtLjEzOC4yLS4xOTguMjkzbTIuMzI4LTIuOTgzcy0uNC4yMDgtLjk1Ni43NTNjLjEyNi4wNzQuMjY4LjE3LjM0OC4yNC0uMDg1LjA3Mi0uMTcuMTU0LS4yNS4yMy0uMzYtLjMtLjczOC0uNDUtMS4wMy0uNTIzLjA5Ny0uMDY3LjItLjEzOC4zMDItLjIuMTU2LjAzNy4zMS4xLjMxLjEuNjI3LS40NzggMS4xNy0uNjg2IDEuMTctLjY4NnMtLjA2Mi0uMDMtLjIzLS4wMjhjLTIuNDcuMDMzLTQuNzQ2IDEuODc2LTQuMzE4IDUuMDM0LjA0OC4zMzQuMTc2Ljk0NC4zNDMgMS4yMS4wNTQtLjUyNi4yNTItMS42ODcuODM4LTIuOTM0LS4yMDUtLjA3My0uMzc1LS4xMDMtLjM3NS0uMTAzLjA2Mi0uMTI3LjE0NS0uMjg2LjE0NS0uMjg2LjQzMy4wODIuODE0LjI2NSAxLjE0Ni41MjUtLjA3OC4xMjctLjEzMy4yMS0uMTcuMjgtLjExOC0uMDk0LS4yMzYtLjE3LS4zNjQtLjI0NC0uNjYgMS4xNS0uOTY1IDIuMjQtMS4wOSAyLjgwOC4wMDguMDM0LjA3OC4wNTMuMTM4LjA0NSAyLjcwNi0uMzUzIDMuOTczLTEuNzMgNC4zNTgtMy4yMy4yNTMtLjk4LjE3Mi0yLjAwNS0uMTY4LTIuODQ0LS4wMjQtLjA1Ny0uMDctLjE1Ni0uMTQ4LS4xNSIvPjwvc3ZnPg=="},function(t,e){t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNTcuMDQyIiBoZWlnaHQ9IjIwLjAxNSI+PHN3aXRjaD48Zm9yZWlnbk9iamVjdCByZXF1aXJlZEV4dGVuc2lvbnM9Imh0dHA6Ly9ucy5hZG9iZS5jb20vQWRvYmVJbGx1c3RyYXRvci8xMC4wLyIgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIvPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjZmZmIiBkPSJNMTU2Ljk2IDEuODc3bC01LjI1NSAxOC4xMjZoLTcuOTkybDIuMTk4LTcuMzg0LTUuNDYgNi4zNGgtMi42bC0zLjExNC0xMS44M2gtNi4yMjdsMS4yNy01LjI1MmgxMS44OGwxLjI1NyA3LjI1IDYuMDQ3LTcuMjQ2di0uMDA1aDcuOTk1em0tMzIuNTEzIDEzLjI0Yy0uODA4IDIuNjg4LTMuNjQ1IDQuODg3LTYuMzAyIDQuODg3aC0xMS44NmMtMi42NiAwLTQuMTcyLTIuMi0zLjM2NC00Ljg4N2wxLjg5OC02LjMxMmg4LjQxNmwtMS44NjYgNS43NDdoNC42MWwyLjM3NS03LjM3NmgtMTMuMDI2Yy45NTgtMi41IDMuNzUyLTUuMjk4IDYuMjc1LTUuMjk4aDExLjg2YzIuNjU3IDAgNC4wNTYgMy4wMTggMy4yNDcgNS43MDVsLTIuMjY0IDcuNTM0em0tMjIuNTMtNS4yNzZoLTcuMzAybC44MDgtMi42MzJoLTMuOWwtMi4zNiA3LjMyMmgzLjlsLjU4Ny0xLjM2NWg3LjI2bC0xLjA4NCAzLjU4Yy0uODEgMi42ODgtMy4xNjMgMy4yNTgtNS44MiAzLjI1OGgtOS4yNGMtMi42NTYgMC00LjE3LTIuMi0zLjM2Mi00Ljg4N2wyLjI2NC03LjUzM2MuODA4LTIuNjg4IDIuOTEtNS43MDUgNi43MzUtNS43MDVoOC42NWMyLjg5MyAwIDQuMzQ4IDMuMyAzLjU2MiA1Ljg1bC0uNjk4IDIuMTEzek03MC45ODUgMjAuMDA3bDEuNjUtNi43MjJoNi40NGwtMS42NTIgNi43MjJoLTYuNDM4em0tNy4zOS02LjcyaDYuNDM4bC0xLjY1IDYuNzJoLS40OTV2LjAwM0g1NS43NjZ2LS4wMDdoLTUuNzJsNC43OC0xNi4wNThoLTEuOTEyTDU0LjA3LjA2NWgxLjkxbC4wMDQtLjAxaDkuMjM4TDYwLjM5NiAxNi4yN2gyLjQ2N2wuNzMyLTIuOTg0ek01MC4yNTggNi45MTJINDMuN2wuNzI0LTIuOTdoLTE0LjY1TDMwLjkzLjA2N2gyMC45MzZsLS4wMTQuMDZoLjA2TDUwLjI2IDYuOTE0ek0xNy41MTggMjBoLTYuNzgyTDguOSAzLjk0NUgyLjkxNUw0LjA3LjA2NWg0LjM4NnYtLjAxaDguNzdsMS43MjggMTUuMTIgNC41LTE1LjEyaDUuNDhsLTUuOTQgMTkuOTQ2aC01LjQ3N3pNNy41NzggNS40NWwuNDQgNC42NzMtMy4wMzcgOS44OEguMDUzTDQuNDk2IDUuNDVINy41OHptMzIuMzQ2LS4yNzhsLTEuMjE3IDQuMDMyaDcuMzk3bC0uODczIDMuNzRoLTcuNjVMMzUuNDUgMjBoLTguNjNsNC40NzYtMTQuODI4aDguNjN6bTkzLjI2NCAzLjUzbDEuNDU3IDYuNDctMS40MyA0LjgzMmgtNi43NjRMMTI5LjgxIDguN2gzLjM4eiIvPjwvc3dpdGNoPjwvc3ZnPg=="},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(40),r=n(8),o=n(52),s=n(71),a=n(72),u=n(123),l=function(){function e(t){this._model=t,this.name="SapiMetadataPlugin",this.version="8.0.85",this.mimetype=r.MediaItemInterfaces.MediaItemMimeType.SAPI,this.type=r.Plugin.PluginType.METADATA,this._cancelled=!1,this._endPoint=u.default.getEnv(this._model.config.CMS&&this._model.config.CMS.env||""),this._sapiClient=new a.default(this._model),o.Loader.preconnect("preconnect-sapi","//"+this._endPoint)}return e.prototype.prepare=function(){},e.prototype.resolve=function(e,n,i){Array.isArray(e)&&0!==e.length&&(this._sapiClient.parseMediaItemsResponse(e),Array.isArray(e)&&e.every(this._hasAllRequiredMeta)?t(function(){i.onComplete(e)}):this._fetchMetadata(e,i))},e.prototype.recover=function(t,e,n){},e.prototype.cancel=function(){this._cancelled=!0},e.prototype.destroy=function(){this.cancel()},e.prototype._fetchMetadata=function(t,e){var n=this,i=this._getSapiMetadataUrl(t);o.Loader.ajax(i,{context:this,successHandler:function(i){n._cancelled||n._parseResponse(t,i,function(t,i){t||!i?(t=t||"",n._sendError(s.getErrorCode(),t,e)):e.onComplete(i)})},failureHandler:function(t,i,r){n._cancelled||n._sendError(s.getErrorCode(t,i,r),t.message,e)}})},e.prototype._getSapiMetadataUrl=function(t){var e=t.map(function(t){return t.id}).join(","),n={dev_type:this._sapiClient.getDeviceType(),region:this._model.region||"US",lang:this._model.lang};return"//"+this._endPoint+"/v1/video/videos/"+e+"?"+i.stringify(n)},e.prototype._parseResponse=function(t,e,n){var i=this;try{var r=JSON.parse(e),o=r&&r.videos&&r.videos.result;if(!o)return void n("Bad sapi response");t.forEach(function(t){o.some(function(e,n){return!(!e||t.id!==e.id)&&(i._parseMediaObjItem(t,e),o.splice(n,1),!0)})}),n(null,t)}catch(t){n(t.message)}},e.prototype._parseMediaObjItem=function(t,e){var n={};n.title=e.title||e.description||a.DEFAULT_MEDIA_ITEM_META.title,n.description=e.description||a.DEFAULT_MEDIA_ITEM_META.description,n.duration=e.duration||a.DEFAULT_MEDIA_ITEM_META.duration,n.thumbnail=this._getThumbnailUrl(e.thumbnails)||a.DEFAULT_MEDIA_ITEM_META.thumbnail,t.metadata=n},e.prototype._sendError=function(t,e,n){var i={code:t,message:e};n.onError(i)},e.prototype._getThumbnailUrl=function(t){if(!t||0===t.length)return"";for(var e=0,n=t;e<n.length;e++){var i=n[e];if("original"===i.tag)return i.url}return t[0].url||""},e.prototype._hasAllRequiredMeta=function(t){return!(!t||!t.metadata||void 0===t.metadata.title||void 0===t.metadata.description||void 0===t.metadata.thumbnail||void 0===t.metadata.duration)},e}();e.default=l}).call(this,n(32).setImmediate)},function(t,e,n){"use strict";var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(289)),o=r;e.Loader=r.default,e.LoaderConstants=o},function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=i(n(84)),s=function(t){return Array.isArray(t)},a=function(t){return"boolean"==typeof t},u=function(t){return"function"==typeof t},l=function(t){return"number"==typeof t&&!isNaN(t)},c=function(t){return"[object Object]"===Object.prototype.toString.call(t)},d=function(t){return"string"==typeof t};e.XHR_ERROR="XHR error",e.XHR_TIMEOUT="XHR request timed out",e.JSONP_ERROR="jsonp error",e.JSONP_TIMED_OUT="jsonp request timed out";var h=function(){function t(){}return t.ajax=function(n,i){n=t._fixProtocol(n);var s=t._getWindow(),a=i.context,l=i.responseTypeJson,c=i.withCookie,d=i.timeout,h=t._once(i.successHandler),p=t._once(i.failureHandler),f=!1,_=null,m={url:n,cors:r.userAgent.ie&&r.userAgent.ie<10||c,withCredentials:c,timeout:d||3e3};if(a&&h&&p){var y=(new Date).getTime(),v=new o.default(m,function(t,r,o){if(!f)if(i.collectPerfData&&(_={},u(v.getResponseHeader)&&(_.resp_len=v.getResponseHeader("Content-Length")||"na"),s.performance&&s.performance.getEntriesByName&&(_.resourceTiming=s.performance.getEntriesByName(location.protocol+n).pop(),_.resourceTimingEntries=s.performance.getEntries()),_.http_code=r.statusCode),r.timeDiff=(new Date).getTime()-y,t){var c=null;u(v.getResponseHeader)&&(c=v.getResponseHeader("Access-Control-Allow-Origin"));var m=s.location.protocol+"//"+s.location.host;if(c&&c!==m)p.call(a,new Error(e.XHR_ERROR),"default","cors");else{var g=r.timeDiff>=d?e.XHR_TIMEOUT:e.XHR_ERROR;p.call(a,new Error(g),r.previousState,r.statusCode,r.timeDiff,_)}}else r.statusCode<200||r.statusCode>=300?p.call(a,new Error(e.XHR_ERROR+": statusCode = "+r.statusCode),r.previousState,r.statusCode,r.timeDiff,_):h.call(a,l?JSON.parse(o):o,!1,_)});v.previousState=v.readyState;var g=v.onreadystatechange;v.onreadystatechange=function(){4===v.readyState?g.call(v):v.previousState=v.readyState}}return function(){f=!0}},t.preconnect=function(t,e){if(document&&!document.head.querySelector("#"+t)){var n=document.createElement("link");n.setAttribute("rel","preconnect"),n.setAttribute("id",t),n.setAttribute("href",e);var i=document.getElementsByTagName("head")[0];i&&i.appendChild(n)}},t.querystring=function(e,n,i,r){return void 0===n&&(n="&"),void 0===i&&(i="="),void 0===r&&(r=encodeURIComponent),c(e)&&(e=[e]),e.map(function(e){return Object.keys(e).map(function(o){var a=r(t._stringifyPrimitive(o));return null===e[o]?a:(a+=i,s(e[o])?e[o].map(function(e){return a+r(t._stringifyPrimitive(e))}).join(n):a+r(t._stringifyPrimitive(e[o])))}).join(n)}).join(n)},t._stringifyPrimitive=function(t){return d(t)?t:a(t)?t.toString():l(t)&&isFinite(t)?t.toString():""},t._fixProtocol=function(t){return r.userAgent.samsung&&0===t.indexOf("//")?"https:"+t:t},t._once=function(t){var e=this,n=function(){return n.called?n.value:(n.called=!0,n.value=t.apply(e,arguments),n.value)};return n.called=!1,n},t._getWindow=function(){return window},t}();e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=n(23);(i=window.crypto||window.msCrypto)||("undefined"!=typeof crypto?i=crypto:"undefined"!=typeof msCrypto&&(i=msCrypto)),i=i&&(i.subtle||i.webkitSubtle)||null;var o={name:"HMAC",hash:{name:"SHA-1"}},s=function(t){for(var e=unescape(encodeURIComponent(t)),n=new ArrayBuffer(e.length),i=new Uint8Array(n),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i},a=function(t,e){return new Promise(function(n,r){i&&i.importKey||r(new Error("crypto is not supported by the current browser")),i.importKey("raw",s(e),o,!1,["sign","verify"]).then(function(e){return i.sign(e.algorithm,e,s(t))}).then(function(t){n(function(t){return String.fromCharCode.apply(null,new Uint8Array(t))}(t))}).catch(function(t){r(t)})})},u=function(){function t(){}return t.getXAuthParams=function(t,e){var n,i={},o=(new Date).getTime(),s=Math.random().toString(36).slice(2,12),u="",l=1,c=r.default.getSingleton("PlayerHosting");if(c&&(l=c.gv||1,n=c.g||[],Array.isArray(n))){for(var d=[],h=0,p=n;h<p.length;h++){var f=p[h];d.push(String.fromCharCode(f))}u=d.join("")}var _="dev_id="+e+"&nonce="+s+"&ts="+o+"&uuid="+t+"&v="+l;return new Promise(function(t,n){a(_,u).then(function(n){var r=btoa(n);i.xauth_v=l,i.xauth_ts=o,i.xauth_nonce=s,i.xauth_dev_id=e,i.xauth_signature=r,t(i)}).catch(function(t){n({})})})},t}();e.default=u},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(72),o=function(){function e(t){this.name="SapiSourcePlugin",this.version="8.0.85",this.mimetype=i.MediaItemInterfaces.MediaItemMimeType.SAPI,this.type=i.Plugin.PluginType.SOURCE_METADATA,this._recovering=!1,this._forceRefresh=!0,this._sapiClient=new r.default(t)}return e.prototype.prepare=function(){},e.prototype.resolve=function(e,n,i){this._sapiClient.parseMediaItemsResponse(e),!(Array.isArray(e)&&e.every(this._hasStreamMeta))||this._recovering||this._forceRefresh?this._sapiClient.resolve(e,n,i):e.length>0&&t(function(){i.onComplete(e)}),this._recovering=!1},e.prototype.recover=function(t,e,n){t&&(this._recovering=!0,this.resolve([t],e,n))},e.prototype.cancel=function(){this._sapiClient.cancel()},e.prototype.destroy=function(){this.cancel()},e.prototype._hasStreamMeta=function(t){return!!(t&&t.source&&t.source.streams&&t.source.streams[0]&&t.source.streams[0].url)},e}();e.default=o}).call(this,n(32).setImmediate)},function(t,e,n){var i=n(13);t.exports=new i.Template({code:function(t,e,n){var i=this;return i.b(n=n||""),i.s(i.f("items",t,e,1),t,e,0,10,1180,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.s(i.f("sectionLabel",t,e,1),t,e,0,32,280,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b('        <li class="vp-pl-section-label vp-show">'),i.b("\n"+n),i.s(i.f("sectionLabelIcon",t,e,1),t,e,0,115,211,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b('                <img class="vp-playlist-icon section" src="'),i.b(i.v(i.f("sectionLabelIcon",t,e,0))),i.b('"/>'),i.b("\n"+n)}),t.pop()),i.b("            "),i.b(i.v(i.f("sectionLabel",t,e,0))),i.b("\n"+n),i.b("        </li>"),i.b("\n"+n)}),t.pop()),i.s(i.f("sectionLabel",t,e,1),t,e,1,0,0,"")||(i.b('        <li class="vp-playlist-item" data-id=\''),i.b(i.v(i.f("id",t,e,0))),i.b("'>"),i.b("\n"+n),i.s(i.f("labelIcon",t,e,1),t,e,0,401,535,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b('                <span class="yvp-playlist-icon-wrapper"><img class="yvp-playlist-icon item" src="'),i.b(i.v(i.f("labelIcon",t,e,0))),i.b('"/></span>'),i.b("\n"+n)}),t.pop()),i.b('            <img class="vp-playlist-item-image" src=\''),i.b(i.v(i.f("thumbnail",t,e,0))),i.b("'/>"),i.b("\n"+n),i.b('            <div class="vp-playlist-border"></div>'),i.b("\n"+n),i.b('            <div class="vp-playlist-item-gradient">'),i.b("\n"+n),i.b('                <div class="vp-pl-meta">'),i.b("\n"+n),i.b("                    <span class='vp-pl-title'>"),i.b(i.v(i.f("title",t,e,0))),i.b("</span>"),i.b("\n"+n),i.b("                    <span class='vp-now-playing'>"),i.b(i.v(i.d("strings.NOW_PLAYING",t,e,0))),i.b("</span>"),i.b("\n"+n),i.s(i.f("provider",t,e,1),t,e,0,940,1034,"{{ }}")&&(i.rs(t,e,function(t,e,i){i.b("                        <span class='vp-pl-provider'>"),i.b(i.v(i.f("provider",t,e,0))),i.b("</span>"),i.b("\n"+n)}),t.pop()),i.b("                </div>"),i.b("\n"+n),i.b("            </div>"),i.b("\n"+n),i.b("            <div class='vp-pl-dur'>"),i.b(i.v(i.f("duration",t,e,0))),i.b("</div>"),i.b("\n"+n),i.b("        </li>"),i.b("\n"+n))}),t.pop()),i.fl()},partials:{},subs:{}},'{{#items}}\n    {{#sectionLabel}}\n        <li class="vp-pl-section-label vp-show">\n            {{#sectionLabelIcon}}\n                <img class="vp-playlist-icon section" src="{{sectionLabelIcon}}"/>\n            {{/sectionLabelIcon}}\n            {{sectionLabel}}\n        </li>\n    {{/sectionLabel}}\n    {{^sectionLabel}}\n        <li class="vp-playlist-item" data-id=\'{{id}}\'>\n            {{#labelIcon}}\n                <span class="yvp-playlist-icon-wrapper"><img class="yvp-playlist-icon item" src="{{labelIcon}}"/></span>\n            {{/labelIcon}}\n            <img class="vp-playlist-item-image" src=\'{{thumbnail}}\'/>\n            <div class="vp-playlist-border"></div>\n            <div class="vp-playlist-item-gradient">\n                <div class="vp-pl-meta">\n                    <span class=\'vp-pl-title\'>{{title}}</span>\n                    <span class=\'vp-now-playing\'>{{strings.NOW_PLAYING}}</span>\n                    {{#provider}}\n                        <span class=\'vp-pl-provider\'>{{provider}}</span>\n                    {{/provider}}\n                </div>\n            </div>\n            <div class=\'vp-pl-dur\'>{{duration}}</div>\n        </li>\n    {{/sectionLabel}}\n{{/items}}',i)},function(t,e,n){var i=n(73);"string"==typeof i&&(i=[[t.i,i,""]]);var r=n(120)(i,{});t.hot.accept(73,function(){var e=n(73);"string"==typeof e&&(e=[[t.i,e,""]]),r(e)}),t.hot.dispose(function(){r()})},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=function(t){function e(){var e=t.call(this)||this;return e.name="SapiVisualSeek",e.version="8.0.85",e.visualSeekType=r.VisualSeekInterfaces.VisualSeekType.SPRITE,e.mimetype="visualseek/sapi",e._visualSeekMetadataMap={},e}return i(e,t),e.prototype.destroy=function(){this._visualSeekMetadataMap={}},e.prototype.canSeek=function(t){return t&&!(!this._visualSeekMetadataMap[t]||!this._visualSeekMetadataMap[t].visualSeek)||!1},e.prototype.update=function(t,e){var n=this._visualSeekMetadataMap[t]||{};n.visualSeek=e&&e.visualSeek||n.visualSeek,this._visualSeekMetadataMap[t]=n},e.prototype.getThumbnailData=function(t,e){var n=this._visualSeekMetadataMap[t]&&this._visualSeekMetadataMap[t].visualSeek;if(!(n&&n.width&&n.height&&n.frequency&&n.images))return null;var i=Math.ceil(Math.floor(e)/n.frequency),r=this._getThumbnailUrl(n.images,i);return r?{index:i,isAd:!1,url:r,width:n.width,height:n.height}:null},e.prototype._getThumbnailUrl=function(t,e){for(var n=0,i=t;n<i.length;n++){var r=i[n],o=r.start_index,s=r.count,a=r.url;if(o<=e&&e-o<s)return a}return null},e}(r.VisualSeekPlugin);e.default=o},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=n(296),s=function(t){function e(e){var n=t.call(this,e)||this;return n._model=new o.default(n._player),n}return i(e,t),e.prototype._onPlaybackStarted=function(e){e.pgltcy=this._model.pageLatency&&this._model.pageLatency.toString()||"na";var n=this._model.mmActivityId;n&&(e.mm_activity_id=n),t.prototype._onPlaybackStarted.call(this,e)},e}(r.Analytics.VdmsAnalytics);e.default=s},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=n(23),s=n(74),a=function(t){function e(e){var n=t.call(this,e)||this;return n.pageLatency="",n.mmActivityId="",n.s="",n._ex=s.HIDE_KEY,n._NOL=s.HIDE_KEY,n.test="",n.cached_vs="",n.expn="",n.expt="",n.expb="",n.vsid="",n.lms_id="",n.bckt="",n.env="",n.ccap="",n.loc="",n.site="",n.intl="",n.lang="",n.ccode="",n.sec="",n.cpos="",n.pt="",n.pd="",n.pct="",n.pstcat="",n.p_sec="",n.p_subsec="",n.ver="",n.pstaid_p="",n.pkgt="",n.subsec="",n._rid="",n.bx="",n.ar="",n.bckt=o.default.getBckt(),n}return i(e,t),e.prototype.update=function(e){t.prototype.update.call(this,e),this.expn=e.experienceName||this.expn,this.expb=e.experienceBucket||this.expn,this.expt=e.experienceType||this.expn,this.s=e.pageSpaceId||this.expn,this.pt=e.pt||this.pt,this.pd=e.pd||this.pd,this.pct=e.pct||this.pct,this.pstcat=e.pstcat||this.pstcat,this.ver=e.ver||this.ver,this.p_sec=e.p_sec||this.p_sec,this.p_subsec=e.p_subsec||this.p_subsec,this._rid=e._rid||this._rid,this.pstaid_p=e.pstaid_p||this.pstaid_p,this.pkgt=e.pkgt||this.pkgt,this.sec=e.sec||this.sec,this.subsec=e.subsec||this.subsec,this.cpos=e.cpos||this.cpos,this.ccode=e.ccode||this.ccode,this._ex=e.offNetwork?"1":this._ex,this._NOL=e.offNetwork?"1":this._NOL,this.site=e.site&&e.site.toLowerCase()||this.site,this.intl=e.region&&e.region.toLowerCase()||this.intl,this.lang=e.lang&&e.lang.toLowerCase()||this.lang,this.expm=e.experienceName&&"lightbox"===e.experienceName.toLowerCase()?"lightbox":this.expm,this.lms_id=e.license&&e.license.salesforceId||this.lms_id,this.pageLatency=e.pageLatency,this.pltype=o.default.getPlayerType(),this.mmActivityId=e.customConfig&&e.customConfig.metrics&&e.customConfig.metrics.mmActivityId||this.mmActivityId,this.bx=o.default.getCookie("BX")||this.bx,this.ar=e.aspectRatio||this.ar},e.prototype.getCommonParams=function(){var e=this,n=t.prototype.getCommonParams.call(this)||{};return s.PARAMS.forEach(function(t){e[t]!==s.HIDE_KEY&&(n[t]=e[t])}),n},e}(r.Analytics.VdmsAnalyticsModel);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(23),o=n(74),s="https:"===document.location.protocol?"https://sb.":"http://b.";e.COMSCORE_IAB_VENDOR_ID=77;var a=function(){function t(t){this._player=t,this._bufferingStart=!1,this._bitrate=0,this._partNumber=0,this._currentIndex=0,this._gdprApplies=!1,this._ucfr="",this._contentIndex=null,t?(r.default.initIframeCmp(),this._getVendorConsent(),this._streamSenseTag={},this._comscoreBeaconQueue=[],this._eventMap={},this._loadStreamSense()):console.error("[Comscore] Cannot initialize Comscore. Bad player instance!")}return t.prototype.destroy=function(){this._streamSenseTag=null,this._comscoreBeaconQueue=null,this._eventMap=null,this._contentIndex=null},t.prototype._bindEvents=function(){this._player.addEventListener(i.Events.MEDIA_ITEM_METADATA,this._onMediaItemChanged,this),this._player.addEventListener(i.Events.PLAYBACK_COMPLETE,this._onPlaybackComplete,this),this._player.addEventListener(i.Events.PLAYBACK_SEEKING,this._onPlaybackSeeking,this),this._player.addEventListener(i.Events.PLAYBACK_SEEK_COMPLETE,this._onPlaybackSeeked,this),this._player.addEventListener(i.Events.PLAYBACK_PAUSE,this._onPlaybackPaused,this),this._player.addEventListener(i.Events.PLAYBACK_RESUMED,this._onPlaybackResumed,this),this._player.addEventListener(i.Events.BUFFERING_START,this._onWaiting,this),this._player.addEventListener(i.Events.PLAYBACK_START,this._setVideoClipLabels,this),this._player.addEventListener(i.Events.VIDEO_STARTED,this._onPlaying,this),this._player.addEventListener(i.Events.PLAYER_VOLUME_CHANGE,this._onVolumeChanged,this),this._player.addEventListener(i.Events.BITRATE_CHANGE,this._onBitrateChange,this),this._player.addEventListener(i.Events.AD_BREAK_ITEM_ENDED,this._onAdPlaybackComplete,this),this._player.addEventListener(i.Events.AD_BREAK_ITEM_CURRENT,this._setAdClipLabels,this)},t.prototype._loadStreamSense=function(){var t=this;if(window.ns_&&window.ns_.StreamSense)this._createStreamingTag();else{r.default.lazyLoad("https://s.yimg.com/rx/builds/7.86.675.1520450663/assets/streamsense.min.js",function(e){e&&window.ns_&&window.ns_.StreamSense?t._createStreamingTag():console.error("Cant load comscore Streamsense")})}},t.prototype._createStreamingTag=function(){var t=s+"scorecardresearch.com/p?c1=2&c2=7241469";this._streamSenseTag=new window.ns_.StreamSense({},t),this._eventMap={play:window.ns_.StreamSense.PlayerEvents.PLAY,pause:window.ns_.StreamSense.PlayerEvents.PAUSE,buffer:window.ns_.StreamSense.PlayerEvents.BUFFER,end:window.ns_.StreamSense.PlayerEvents.END},this._bindEvents()},t.prototype._onBitrateChange=function(t){this._bitrate=t},t.prototype._onMediaItemChanged=function(t,e){var n=this;this._currentIndex=0,this._contentIndex=null,this._partNumber=0;var i="";switch(e.offNetwork?4:window.top!==window.self?3:1){case 3:i="Emb onNet";break;case 4:i="Emb offNet";break;default:i="onProp"}var r=this._getObjectFromstate(e,"metrics"),s=this._getObjectFromstate(e,"license");this._setComscorePersistentLabels(e),this._addToComscoreQueue(function(){n._setPlaylist({y_lms:s.salesforceId||o.INT_DEFAULT,c6:r.comscore6||o.INT_DEFAULT,y_sp:e&&e.streamProtocol?e.streamProtocol:o.STRING_DEFAULT,y_stype:e&&e.streamType?e.streamType:o.STRING_DEFAULT,ns_st_pl:e&&e.title?e.title:o.STRING_DEFAULT,ns_st_cs:e.uiState.width+"x"+e.uiState.height,y_st:e.siteAnalytics||e.site||o.STRING_DEFAULT,y_rg:e.region,y_lc:i,y_pb:o.STRING_DEFAULT})})},t.prototype._onPlaybackSeeking=function(t){var e=this,n=this._player.getCurrentTime();this._addToComscoreQueue(function(){var i=t.paused?"pause":"play";e._notifyState(i,{ns_st_ui:"seeking"},(1e3*n).toString())})},t.prototype._onPlaybackSeeked=function(t){var e=this,n=this._player.getCurrentTime();this._addToComscoreQueue(function(){var i=t.paused?"pause":"play";e._notifyState(i,{ns_st_ui:"seeking"},(1e3*n).toString())})},t.prototype._onWaiting=function(t){var e=this,n=this._player.getCurrentTime();this._addToComscoreQueue(function(){e._notifyState("buffer",{},(1e3*n).toString())}),this._bufferingStart=!0},t.prototype._onPlaying=function(t,e){var n=this,i=this._player.getCurrentTime();this._bufferingStart&&(this._addToComscoreQueue(function(){n._notifyState("play",{},(1e3*i).toString())}),this._bufferingStart=!1)},t.prototype._onPlaybackComplete=function(t,e,n){var i=this,r=this._player.getCurrentTime(),o=this._bitrate,s={};s.ns_st_br=o.toString(),e&&(s.ns_st_pe="1"),this._addToComscoreQueue(function(){i._notifyState("end",s,(1e3*r).toString())})},t.prototype._onPlaybackPaused=function(t){var e=this,n=this._player.getCurrentTime();this._addToComscoreQueue(function(){e._notifyState("pause",{},(1e3*n).toString())})},t.prototype._onPlaybackResumed=function(t,e){var n=this,i=this._player.getCurrentTime();this._addToComscoreQueue(function(){n._notifyState("play",{},(1e3*i).toString())})},t.prototype._onVolumeChanged=function(t){var e=this;this._addToComscoreQueue(function(){e._updateClipAttrs({ns_st_vo:Math.round(100*t)})})},t.prototype._onAdOrContentStarted=function(){var t=this,e=this._player.getCurrentTime();this._addToComscoreQueue(function(){var n=t._bitrate,i={};0!==n&&(i.ns_st_br=n.toString()),t._notifyState("play",i,(1e3*e).toString())})},t.prototype._setComscorePersistentLabels=function(t){var e=this,n={},i=t.rendererType,s=r.default.getHostUrl(),a=s?s.replace(/(_ylt(.)+(\?)|_ylt(.)+)/,"?"):s,u=this._getObjectFromstate(t,"metrics");n.ns_site="yahoo-video",n.ns_st_mp="html"===i?"h":"f",n.ns_st_mv=t.playerVersion,n.ca2=this._getComscoreCAfield(t,"PLAYBACK_START","CA2"),n.ca4=t.comscoreC4,n.ca6=u.comscore6||o.INT_DEFAULT,n.c3=o.NULL_DEFAULT,n.ca3=o.NULL_DEFAULT,n.c4=t.comscoreC4,n.c7=a,n.c9=function(){if(t.referrer)return t.referrer;var e=window.top&&window.top.document?window.top.document:null,n=window.history&&window.history.state&&window.history.state.referer?window.history.state.referer:null,i=o.STRING_DEFAULT;return e&&""===e.referrer&&n?i=n:e&&e.referrer&&(i=e.referrer),i.replace(/(_ylt(.)+(\?)|_ylt(.)+)/,"?")}(),this._gdprApplies&&(n.cs_ucfr=this._ucfr),this._addToComscoreQueue(function(){e._setPersistentLabels(n)})},t.prototype._getObjectFromstate=function(t,e){var n={};return t&&t[e]?n=t[e]:t&&t.customConfig&&t.customConfig[e]&&(n=t.customConfig[e]),n},t.prototype._setVideoClipLabels=function(t){var e=this,n=!0===t.autoPlay?"1":"0",s=r.default.getHostUrl(),a=s?s.replace(/(_ylt(.)+(\?)|_ylt(.)+)/,"?"):s,u=this._getObjectFromstate(t,"metrics"),l=this._getObjectFromstate(t,"meta"),c=this._getObjectFromstate(t,"brandingData").branding,d=this._getObjectFromstate(t,"license");null===this._contentIndex&&(this._currentIndex++,this._contentIndex=this._currentIndex);var h={c5:u.comscoreCM5||o.INT_DEFAULT,ca5:u.comscoreCM5||o.INT_DEFAULT,ns_st_pr:t&&t.title?t.title:o.STRING_DEFAULT,ns_st_ep:l.showName||d.title||o.STRING_DEFAULT,ns_st_ge:l.genre?l.genre.split(",")[0]:o.NULL_DEFAULT,ns_st_cu:a,ns_st_vo:Math.round(100*this._player.getVolume()),ns_st_ty:i.Analytics.VdmsAnalyticsModel.getStreamType(t.playbackMode,t.currentMediaType,t.duration),ns_st_cn:this._contentIndex,ns_st_ci:t.videoId,ns_st_st:o.NULL_DEFAULT,ns_st_pu:o.NULL_DEFAULT,ns_st_sn:o.NULL_DEFAULT,ns_st_en:o.NULL_DEFAULT,ns_st_ce:0,ns_st_ddt:o.NULL_DEFAULT,ns_st_tdt:o.NULL_DEFAULT,ns_st_ia:0,y_pid:c&&c.providerId?c.providerId:o.INT_DEFAULT,y_lbl:l.credits&&l.credits.label?l.credits.label:o.STRING_DEFAULT,ns_st_pn:++this._partNumber,y_art:l.credits&&l.credits.main_artists?l.credits.main_artists.split(/[,;]/)[0]:o.STRING_DEFAULT,y_pvid:c&&c.providerVideoId?c.providerVideoId:o.INT_DEFAULT,y_s:t.pageSpaceId,y_c:t.cdn,y_ap:n},p=t.videoLength,f="vc11";if("na"!==p&&p>600&&(f="vc12"),t.isLive){var _=l.eventStart,m=l.eventEnd;p=""!==_&&""!==m?m-_:null,h.ns_st_li="1",f="vc23"}h.ns_st_ct=f,h.ns_st_cl=p&&"na"!==p?(1e3*p).toString():o.INT_DEFAULT,this._addToComscoreQueue(function(){e._setClip(h)}),this._onAdOrContentStarted()},t.prototype._setPersistentLabels=function(t){this._streamSenseTag.setLabels(t)},t.prototype._setPlaylist=function(t){this._streamSenseTag.setPlaylist(t)},t.prototype._setClip=function(t){this._streamSenseTag.setClip(t)},t.prototype._notifyState=function(t,e,n){this._streamSenseTag.notify(this._eventMap[t],e,n)},t.prototype._onAdPlaybackComplete=function(){var t=this,e=this._player.getCurrentTime();this._addToComscoreQueue(function(){t._notifyState("end",{},(1e3*e).toString())})},t.prototype._setAdClipLabels=function(t,e){var n=this,r=!0===e.autoPlay?"1":"0",s=this._getObjectFromstate(e,"brandingData").branding,a=this._getObjectFromstate(e,"meta"),u=t.adBreak,l="va11",c=t.adBreakItemId||o.INT_DEFAULT,d=u.type,h=t.duration;e.isLive?l="va21":d===i.AdBreakInterfaces.AdBreakType.POSTROLL?l="va13":d===i.AdBreakInterfaces.AdBreakType.MIDROLL&&(l="va12");var p={c5:"09",ca5:"09",ns_st_ty:i.Analytics.VdmsAnalyticsModel.getStreamType(e.playbackMode,e.currentMediaType,h),ns_st_ct:l,ns_st_ad:"1",ns_st_pr:"ad",ns_st_ep:"ad",ns_st_cu:o.STRING_DEFAULT,ns_st_vo:Math.round(100*this._player.getVolume()),ns_st_cn:++this._currentIndex,ns_st_ci:c,ns_st_cl:h?(1e3*h).toString():o.STRING_DEFAULT,ns_st_pn:"1",y_pid:s&&s.providerId?s.providerId:o.INT_DEFAULT,y_lbl:a.credits&&a.credits.label?a.credits.label:o.STRING_DEFAULT,y_art:a.credits&&a.credits.main_artists?a.credits.main_artists.split(/[,;]/)[0]:o.STRING_DEFAULT,y_pvid:s&&s.providerVideoId?s.providerVideoId:o.INT_DEFAULT,y_s:e.pageSpaceId,y_ap:r};this._addToComscoreQueue(function(){n._setClip(p)}),this._onAdOrContentStarted()},t.prototype._updateClipAttrs=function(t){var e=this._streamSenseTag.getClip();e&&e.setLabels(t)},t.prototype._fireComscoreBeacons=function(){this._comscoreBeaconQueue.forEach(function(t){t()}),this._comscoreBeaconQueue=[]},t.prototype._getComscoreCAfield=function(t,e,n){var i,r=t&&t.customConfig&&t.customConfig.metrics?t.customConfig.metrics.beacons:null;if(r){var s=r[e]&&r[e][0]||{};if("cs"===s.target&&s.addParam)s.addParam.split("&").forEach(function(t){-1!==t.indexOf(n)&&(i=t.split("=")[1])})}return i||o.INT_DEFAULT},t.prototype._addToComscoreQueue=function(t){this._comscoreBeaconQueue.push(t),this._streamSenseTag&&this._fireComscoreBeacons()},t.prototype._getVendorConsent=function(){var t=this;window.__cmp&&window.__cmp("getVendorConsents",new Uint16Array([e.COMSCORE_IAB_VENDOR_ID]),function(n,i){i&&n&&n.vendorConsents&&n.vendorConsents[e.COMSCORE_IAB_VENDOR_ID]?(t._gdprApplies=!!n.gdprApplies,t._ucfr=!0===n.vendorConsents[e.COMSCORE_IAB_VENDOR_ID]?"1":"0",console.log("found user consents for comscore: ",t._ucfr)):n&&n.msg&&console.warn("Cannot get vendor consent for comscore: ",n.msg)})},t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(23),o=function(){function t(t){this._player=t,this._player?this._player.addEventListener(i.Events.VIDEO_STARTED,this._sendMarketingBeacon,this):console.error("[MarketingPxAnalytics] Cannot initialize MarketingPx. Bad player instance!")}return t.prototype.destroy=function(){this._player=null},t.prototype._sendMarketingBeacon=function(t){var e=t.customConfig&&t.customConfig.metrics&&t.customConfig.metrics.mmActivityId;if(e&&r.default.isValidUrl(e)){var n=e+"?rnd="+Math.random();r.default.sendIframeBeacon(n)}},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(124),o=n(300),s=function(){function t(t){this._playlist=null,this._playlistFetchIndex=0,this._fetching=!1,this._destroyed=!1,this._model=t,this._sapiPlaylist=new o.default(this._model)}return t.prototype.fetchMore=function(t){var e=this;this._fetching||this._destroyed||(this._fetching=!0,this._sapiPlaylist.resolve({start:this._playlistFetchIndex},function(n,i){e._fetching=!1,e._destroyed||(!n&&i&&(e._playlistFetchIndex+=i.length),t(n,i))}))},t.prototype.onPlaybackStart=function(){if(this._playlist){var t=this._playlist.getPosition()+1===this._playlist.getSize(),e=!(!this._model.playlistId&&!this._model.relatedVideoId);t&&this._model.continuousPlay&&!this._model.loop&&e&&this._model.playlistMimetype!==r.STRUCTURED_PLAYLIST_MIMETYPE&&this._model.videoRecommendations&&this._fetchMoreToRender()}},t.prototype.onPlayerRendered=function(){var t=this._playlist;t&&(t.getSize()-t.getPosition()<i.Constants.PLAYLIST_COUNT_PER_PAGE&&this._model.playlistMimetype!==r.STRUCTURED_PLAYLIST_MIMETYPE&&this._model.videoRecommendations&&this._fetchMoreToRender())},Object.defineProperty(t.prototype,"playlist",{set:function(t){this._playlist=t},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._destroyed=!0},t.prototype._fetchMoreToRender=function(){var t=this;this.fetchMore(function(e,n){!e&&n&&t._playlist&&t._playlist.addItems(n)})},t}();e.default=s},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=n(40),r=n(1),o=n(8),s=n(52),a=n(71),u=function(){function e(t){this._model=t}return e.prototype.resolve=function(e,n){var i=this;if(this._model.playlistId||this._model.relatedVideoId){var r=this._getPlaylistUrl(e);s.Loader.ajax(r,{context:this,successHandler:function(t){i._parseResponse(t,function(t,e){t||!e?(t=t||"",n({code:a.getErrorCode(),message:t})):n(null,e)})},failureHandler:function(t,e,i){n({code:a.getErrorCode(t,e,i),message:t.message})}})}else t(function(){n({message:"No playlist and video id"})})},e.prototype._parseResponse=function(t,e){try{var n=JSON.parse(t),i=n&&n.channel&&n.channel.result&&n.channel.result[0]&&n.channel.result[0].videos;if(!i)return void e("No playlist items");e(null,i.map(function(t){var e=t.id;return{mimetype:o.MediaItemInterfaces.MediaItemMimeType.SAPI,id:e}}))}catch(t){e(t.message)}},e.prototype._getPlaylistUrl=function(t){var e=this._model,n=e.config||{},s=n.rapidConfig&&n.rapidConfig.pageParams||{},a={video_uuid:e.relatedVideoId||"",channel_id:e.playlistId||"",channel_alias:"",count:t.count||o.Constants.PLAYLIST_COUNT_PER_PAGE,start:t.start||0,dev_type:r.userAgent.mobile?"smartphone":"desktop",offnetwork:e.offNetwork,site:n.site||"",region:n.region||"",lang:n.lang||"",expn:n.expName||"",expb:n.expBucket||"",vp:0,image_sizes:o.Constants.PLAYLIST_THUMB_DIMENSION,ssl:!0,"context.json":""};return s&&(a["context.json"]=JSON.stringify({pt:s.pt||"",pct:s.pct||"",pstcat:s.pstcat||"",p_sec:s.p_sec||"",p_subsec:s.p_subsec||"",pstaid_p:s.pstaid_p||"",ticker:s.ticker||"",sport:s.sport||""})),"//video-api.yql.yahoo.com/v1/video/alias/channels/wf-channel=related-videos?"+i.stringify(a)},e}();e.default=u}).call(this,n(32).setImmediate)},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8),o=n(74),s=n(46),a=n(23),u=function(){function t(t,e){this._guid="",this._config=t,this._mediaStore=e,this._setPageLatency(),this.offNetwork=a.default.isOffNetwork()}return t.prototype.getEventsDto=function(){var t=this._config.rapidConfig||{},e=t.pageParams||{},n=t.clickParams||{},r={pageSpaceId:this._config.pageSpaceId||t&&t.Spaceid||"1111",experienceName:this._config.expName||"",experienceBucket:this._config.expBucket||"",experienceType:this._config.expType||"",cpos:this._config.cpos||"",ccode:this._config.ccode||"",offNetwork:this.offNetwork,site:this._config.site||"",siteAnalytics:this._config.siteAnalytics||"",comscoreC4:this._config.comscoreC4||o.NULL_DEFAULT,region:this._config.region||"",referrer:this._config.referrer||"",lang:this._config.lang||"",pageLatency:this._pageLatency||""},s="strm"===e.sec?n.pstaid:e.pstaid,a={pt:e.pt||"",pd:e.pd||"",pct:e.pct||"",pstcat:e.pstcat||"",p_sec:e.p_sec||"",p_subsec:e.p_subsec||"",ver:e.ver||"",_rid:e._rid||"",pstaid_p:s||"",pkgt:n.pkgt||"",sec:n.sec||this._config.sec||"",subsec:n.subsec||""};return i({},r,a)},t.prototype.destroy=function(){},Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"videoRecommendations",{get:function(){return void 0===this._config.videoRecommendations||this._config.videoRecommendations},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"site",{get:function(){return this._config.site||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"region",{get:function(){return this._config.region||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lang",{get:function(){return this._config.lang||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"experienceBucket",{get:function(){return this._config.expBucket||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"experienceName",{get:function(){return this._config.expName||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yvapAccountId",{get:function(){return this._config.YVAP&&this._config.YVAP.accountId||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"syndication",{get:function(){return this._config.synd||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cTopic",{get:function(){return this._config.cTopic||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pspid",{get:function(){return this._config.CMS&&this._config.CMS.suppressAdContext?"":this._config.pageSpaceId||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playlistId",{get:function(){return this._config.playlist&&this._config.playlist.id||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loop",{get:function(){return this._config.loop||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"continuousPlay",{get:function(){return this._config.continuousPlay||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relatedVideoId",{get:function(){var t=this._config.mediaItems;return t&&0!==t.length&&t[0].mimetype===r.MediaItemInterfaces.MediaItemMimeType.SAPI?t[0].id:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playlistMimetype",{get:function(){return this._config.ui&&this._config.ui.playlist&&this._config.ui.playlist.mimetype||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"allowGeoRequest",{get:function(){return this._config.allowGeoRequest||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"geoData",{get:function(){return this._config.geoData||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"guid",{get:function(){return this._guid},set:function(t){this._guid=t},enumerable:!0,configurable:!0}),t.prototype.updateGeoConfig=function(t){s.isBoolean(t.allowGeoRequest)&&(this._config.allowGeoRequest=t.allowGeoRequest);var e=t.geoData;e&&s.isString(e.latitude)&&s.isString(e.longitude)&&s.isString(e.accuracy)?this._config.geoData=e:null===e&&(this._config.geoData=null)},t.prototype._setPageLatency=function(){window.performance&&window.performance.timing&&window.performance.timing.navigationStart&&(this._pageLatency=(new Date).getTime()-window.performance.timing.navigationStart)},t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(72),r=function(){function t(t,e){this._timeoutId=null,this._mediaItemData=e,this._sapiClient=new i.default(t)}return t.prototype.verify=function(t){if(this._sapiClient){var e={onComplete:function(){t(!0)},onError:function(){t(!1)},onProgress:function(){},onApiCallInfo:function(){}};this._mediaItemData&&this._sapiClient.resolve([this._mediaItemData],{},e)}},t.prototype.scheduleVerification=function(t,e){var n=this;this._cancelScheduledVerification(),this._timeoutId=window.setTimeout(function(){n.verify(t)},e)},t.prototype.destroy=function(){this._cancelScheduledVerification(),this._sapiClient=null,this._mediaItemData=null},t.prototype._cancelScheduledVerification=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=n(304),o=function(){function t(){var t=this;this._proxyCalls=[],this._proxy=new r.default(Object.create(i.Player.prototype),{get:function(e,n){var i=t;return function(){i._proxyCalls.push({method:n,args:arguments}),"render"===n&&i._render.apply(i,arguments)}}})}return t.prototype.destroy=function(){var t=this._proxyNode;this._proxy=void 0,this._proxyCalls=[],t&&t.parentNode&&(t.parentNode.removeChild(t),this._proxyNode=void 0)},t.prototype.execute=function(t){this._proxyCalls.forEach(function(e){var n=e.method,i=e.args;t[n].apply(t,i)}),this._proxyCalls=[]},t.prototype.getProxy=function(){return this._proxy},t.prototype._render=function(t){var e="string"==typeof t?document.querySelector(t):t;if(null!==e&&e instanceof window.HTMLElement){var n=document.createElement("div");n.setAttribute("style","width:100%;height:100%;background:#000;position:absolute;left:0;top:0;"),e.appendChild(n),this._proxyNode=n}},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t,e){var n=this,i=function(i){if(e&&e.get)return e.get(t,i,n)},r=Object.getOwnPropertyNames(t),o={};for(var s in r.forEach(function(e){var r={enumerable:!!(Object.getOwnPropertyDescriptor(t,e)||{}).enumerable,get:i.bind(t,e)};Object.defineProperty(n,e,r),o[e]=!0}),t)o[s]||Object.defineProperty(n,s,{get:i.bind(t,s)});Object.seal(t),Object.seal(n)}}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(306),r=function(){function t(){this._openSimSim=new i.default}return t.prototype.updateOathPlayerOpss=function(t,e,n){this._openSimSim.updateOathPlayerInfo(t,e,n)},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.prototype.updateOathPlayerInfo=function(t,e,n){if(!1!==t){var i=e&&e.querySelector(".vp-opensimsim-info");if(i){var r=i.querySelector(".vp-opensimsim-title"),o=this._versionHTMLNode(n.version);i.insertBefore(o,r);var s=this._getHostingInfo(),a=i.querySelector(".vp-opensimsim-hosting");a&&(a.innerHTML=s);var u=i.querySelector(".vp-opensimsim-profile");u&&(u.innerHTML=JSON.stringify(n.config,void 0,2))}}},t.prototype._versionHTMLNode=function(t){var e=document.createElement("div");e.classList.add("vp-opensimsim-oath-title");var n=document.createElement("div");n.classList.add("vp-opensimsim-title"),n.innerHTML="OATH PLAYER";var i=document.createElement("div");return i.innerHTML=t,e.appendChild(n),e.appendChild(i),e},t.prototype._getHostingInfo=function(){var t=window.OATH,e=t&&t.VideoPlatform&&t.VideoPlatform.PlayerHosting||"local";return JSON.stringify(e,void 0,2)},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(122),r=n(308),o=n(46),s=n(23),a=function(){function t(t){this._controller=t}return t.prototype.play=function(t,e){this._controller.getPlaybackState()===r.default.INIT&&o.isNumber(t)&&t>0&&t<this.getDuration()&&this._controller.setStartTime(t),this._controller.play({type:i.REQUEST_TYPES.API,action:e&&s.default.isValidRequestAction(e.requestAction)?e.requestAction:void 0})},t.prototype.pause=function(t){this._controller.pause({type:i.REQUEST_TYPES.API,action:t&&s.default.isValidRequestAction(t.requestAction)?t.requestAction:void 0})},t.prototype.preload=function(t){this._controller.preload(t)},t.prototype.seek=function(t){this._controller.seek(t)},t.prototype.disableControls=function(){this._controller.disableControls()},t.prototype.enableControls=function(){this._controller.enableControls()},t.prototype.enableCC=function(t){this._controller.enableCC(t)},t.prototype.disableCC=function(){this._controller.disableCC()},t.prototype.isPlaying=function(){return this._controller.isPlayMode()},t.prototype.isPlayMode=function(){return this._controller.isPlayMode()},t.prototype.getPlaybackState=function(){return this._controller.getPlaybackState()},t.prototype.isLoading=function(){return this._controller.isLoading()},t.prototype.getDuration=function(){var t=this._controller.getCurrentMediaItem();return t&&t.duration},t.prototype.getCurrentTime=function(){return this._controller.getCurrentTime()},t.prototype.getTimeRemaining=function(){return this.getDuration()-this.getCurrentTime()},t.prototype.setFullscreen=function(t){this._controller.setFullscreen(t)},t.prototype.getFullscreen=function(){return this._controller.getFullscreen()},t.prototype.setVolume=function(t){t=(t=t<0?0:t)>1?1:t,this._controller.setVolume(t)},t.prototype.getVolume=function(){return this._controller.getVolume()},t.prototype.setMute=function(t){this._controller.setMute(t)},t.prototype.getMute=function(){return this._controller.getMute()},t.prototype.setLoop=function(t){this._controller.setLoop(t)},t.prototype.setContinuousPlay=function(t){this._controller.setContinuousPlay(t)},t.prototype.resumeContinuousPlay=function(){this._controller.resumeContinuousPlay({type:i.REQUEST_TYPES.API})},t.prototype.getBitrate=function(){throw new Error("getBitrate is unimplemented!")},t.prototype.setResolution=function(){throw new Error("setResolution is unimplemented!")},t.prototype.displayClosedCaptions=function(){throw new Error("displayClosedCaptions is unimplemented!")},t.prototype.getCurrentDate=function(){return this._controller.getCurrentDate()},t.prototype.setAudioLanguage=function(t){this._controller.setAudioLanguage(t)},t}();e.default=a},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.INIT="init",t.WAITING="waiting",t.VIDEO="video",t.END="end"}(i||(i={})),e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baseconfigSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/baseconfigSchema",type:"object",properties:{site:{type:"string"},siteAnalytics:{type:"string"},region:{type:"string"},referrer:{type:"string"},jurisdiction:{type:"string"},_html5:{type:"boolean"},experienceType:{type:"string"},strmExprUnMuteOnClick:{type:"boolean"},experienceName:{type:"string"},experienceBucket:{type:"string"},experienceNavStartTime:{type:"string"},pageSpaceId:{type:"string"},syndication:{type:"string"},allowGeoRequest:{type:"boolean"},geoData:{type:"object",properties:{latitude:{type:"string"},longitude:{type:"string"},accuracy:{type:"string"}}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.closedcaptionsSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/closedcaptionsSchema",type:"object",properties:{show:{type:"boolean"},lang:{default:"en-US",type:"string"},fontSize:{default:24,type:"number"},fontName:{default:"Arial, Helvetica, sans-serif",type:"string"},fontColor:{default:"#ffffff",type:"string"},fontOpacity:{default:1,type:"number"},fontEffect:{default:"none",type:"string"},bgColor:{default:"#000000",type:"string"},bgOpacity:{default:.75,type:"number"},ccPos:{default:"bottom",type:"string"},isAvailable:{type:"boolean"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cmsSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/cmsSchema",type:"object",properties:{colo:{type:"string"},suppressAdContext:{type:"boolean"},enableCache:{type:"boolean"},cachedVs:{type:"string"},env:{type:"string"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.configSchema={$schema:"http://json-schema.org/draft-06/schema#",type:"object",properties:{version:{default:"8.0.85",type:"string"},jshlsVersion:{default:"1.1.210",type:"string"},playlist:{type:"object",properties:{id:{type:"string"}}},CMS:{$ref:"/cmsSchema"},pageLatency:{type:"object",properties:{pagePlayerJsDownloadTime:{type:"number"},pageReqToPlayerInitTime:{type:"number"}}},forcePreloadBufferLimit:{default:32,type:"number"},html5_hls:{type:"object",properties:{useWorker:{type:"boolean"},preloadBufferLimit:{defaul:8,type:"number"}}},geoData:{type:"object",properties:{latitude:{type:"string"},longitude:{type:"string"},accuracy:{type:"string"}}},ui:{$ref:"/uiSchema"},YVAP:{$ref:"/yvapSchema"},metrics:{$ref:"/metricsSchema"},playback:{$ref:"/playbackSchema"},playbackState:{type:"object",properties:{mute:{type:"boolean"},volume:{type:"number"}}},uiState:{type:"object",properties:{isCSSLoaded:{type:"boolean"},deviceOrientation:{type:"boolean"}}},userPreferences:{type:"object",properties:{closedCaptions:{$ref:"/closedcaptionsSchema"},isAdult:{type:"boolean"},isAuthenticated:{type:"boolean"}}},baseConfig:{$ref:"/baseconfigSchema"},rapidConfig:{type:"object",properties:{rapid:{type:"object"},clickParams:{type:"object"},pageParams:{type:"object"}}},playerDimension:{type:"object",properties:{width:{type:"number",default:0},height:{type:"number",default:0}}},CTV:{$ref:"/ctvSchema"},failOver:{$ref:"/failoverSchema"},autoplayIgnoreConnType:{type:"boolean"},useSimpleFlash:{type:"boolean"},muteMode:{type:"boolean"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ctvSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/ctvSchema",type:"object",properties:{man:{type:"string"},class:{type:"string"},ctvMetricsParams:{type:"object",properties:{ctv_db:{type:"string"},ctv_dc:{type:"string"},_di:{type:"string"},ctv_di:{type:"string"},ctv_ddv:{type:"string"},ctv_dfv:{type:"string"},_dv:{type:"string"},_lo:{type:"string"},_dm:{type:"string"},_dl:{type:"string"},_dc:{type:"string"},_osv:{type:"string"},ctv_yb:{type:"string"},_sr:{type:"string"},ctv_yr:{type:"string"},ctv_ybv:{type:"string"},ctv_yv:{type:"string"},_an:{type:"string"},_av:{type:"string"},_at:{type:"string"}}},forceHttp:{type:"boolean"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.failoverSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/failoverSchema",type:"object",properties:{fastInitRecoverer:{type:"boolean"},beaconDisasterMode:{default:!1,type:"boolean"},sapiUrl:{type:"string"},convivaSamplingRate:{type:"object",properties:{vod:{default:0,type:"number"},live:{default:0,type:"number"}}},recoveryFailureTimeout:{default:120,type:"number"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.metricsSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/metricsSchema",type:"object",properties:{disableAllBeacons:{type:"boolean"},comscoreC4:{type:"string"},ccode:{type:"string"},sec:{type:"string"},skipComscore:{type:"boolean"},skipABRBeacon:{type:"boolean"},ywaSamplingRate:{default:1,type:"number"},ultSamplingRate:{default:1,type:"number"},qosSamplingRate:{default:1,type:"number"},cpos:{type:"string"},progressBeaconStrategy:{type:"object",properties:{fixed:{type:"array",items:[{type:"number"}]},recurring:{type:"number"},playerUnload:{type:"boolean"},playPause:{type:"boolean"}}}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.playbackSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/playbackSchema",type:"object",properties:{skipWatchedVideos:{type:"boolean"},bitrate:{default:0,type:"number"},targetBitrate:{type:"number"},disableGPU:{type:"boolean"},quality:{type:"string"},bitrates:{type:"array",items:[{type:"number"}]},desiredBitrate:{default:900,type:"number"},startTime:{type:"number"},conviva:{type:"boolean"},preconnect:{type:"boolean"},abr:{type:"boolean"},protocol:{type:"string"},skipFormats:{type:"array",items:[{type:"string"}]},playInlineVideo:{type:"boolean"},isResume:{type:"boolean"},ignoreEndlist:{type:"boolean"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uiSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/uiSchema",type:"object",properties:{contentTypeLabel:{type:"string"},watchHistory:{type:"object",properties:{enabled:{type:"boolean"},period:{default:.5,type:"number"},expiry:{default:129600,type:"number"}}},displayMarkers:{type:"object",properties:{type:{type:"string"},group:{type:"boolean"}}},showEndScreen:{type:"boolean"},showFullscreen:{type:"boolean"},showReplayOnlyEndScreen:{type:"boolean"},stopAtLastFrame:{type:"boolean"},showAgeGate:{type:"boolean"},logoOverlay:{type:"string",enum:["bottomRight","bottomLeft","off"]},allowGeoRequest:{type:"boolean"},thumbnailDimensions:{type:"object",properties:{height:{type:"number"},width:{type:"number"}}},vttIndex:{type:"number"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yvapSchema={$schema:"http://json-schema.org/draft-06/schema#",id:"/yvapSchema",type:["object","null"],properties:{accountId:{type:"string"},timeout:{type:["number","string"]},cTopic:{type:"string"},standaloneAd:{type:"object",properties:{xml:{type:"string"},showAdSlug:{type:"boolean"}}},vpaidTimeout:{type:"number"},adsReady:{type:"boolean"},preInitVpaid:{type:"boolean"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),r=function(){function t(t){var e=this;this._exposeMethods=["clear","getCurrentItem","getCurrentItemDescription","getCurrentItemId","getCurrentItemLiveStatus","getCurrentItemMarkers","getCurrentItemProviderName","getCurrentItemTitle","getIndexForId","getItem","getItemById","getItemId","getItems","getPosition","getSize","removeItem","removeItemById","removeItems","removeItemsById","sendPrefetchInfo","setPosition","setPositionById"],this._playlist=t,this._exposeMethods.forEach(function(t){e[t]=function(){return this._playlist[t].apply(this._playlist,arguments)}})}return t.prototype.addItem=function(t){return this._playlist.addItem(this._transformIds([t])[0])},t.prototype.addItems=function(t,e){return void 0===e&&(e=!1),this._playlist.addItems(this._transformIds(t),e)},t.prototype.setItems=function(t){return this._playlist.setItems(this._transformIds(t))},Object.defineProperty(t.prototype,"playlist",{set:function(t){this._playlist=t},enumerable:!0,configurable:!0}),t.prototype._transformIds=function(t){var e=this._getPresumedMimetype();return t.map(function(t){return{id:t,mimetype:e}})},t.prototype._getPresumedMimetype=function(){var t=this._playlist.getCurrentItem();return t&&t.mimetype||i.MediaItemInterfaces.MediaItemMimeType.SAPI},t}();e.default=r}]);
//# sourceMappingURL=oath-player-desktop.js.map