function AkaHTML5MediaAnalytics(n){function wt(){return((1+Math.random())*65536|0).toString(16).substring(1)}function gi(){return wt()+wt()+"-"+wt()+"-"+wt()+"-"+wt()+"-"+wt()+wt()+wt()}function nr(n,i){var o,r,u,f,e;if(n!=null&&n!=""){o=/(\w+):\/\/([^\/:]+):?([^\/]+)?(\/[^#?]*)#?([^?]+)?\??(.+)?/;try{r=o.exec(n);i.protocol=r[1];i.hostName=r[2];i.port=r[3]?r[3]:"80";i.path=r[4];u=i.path.split("/");f=u.length;i.streamName=u[f-1];e=i.streamName.toLowerCase();(e.indexOf(".m3u")!=-1||e.indexOf("manifest")!=-1||e.indexOf(".f4m")!=-1||e.indexOf(".mpd")!=-1)&&f>=3&&(i.streamName=u[f-2]+"/"+u[f-1]);i.hash=r[5]?r[5]:"";i.search=r[6]?r[6]:"";i.host=i.hostName+":"+i.port}catch(s){t("Exception,  parseStreamUrl :"+s)}}}function b(n){return n!=null?n:(new Date).getTime()}function uf(){this.aisRetries=0;this.aisRequestLimit=3;this.aisRequestInterval=3e4;this.requestFailed=!1}function fr(){var i=!1;try{if(window!==window.parent){var n={},t={},u=document.URL,r=null;document&&document.referrer&&(r=document.referrer);u!=null&&nr(u,n);r!=null&&nr(r,t);n.port===t.port&&n.protocol===t.protocol&&n.hostName===t.hostName&&(i=!0)}else i=!0}catch(f){}return i}function be(){var n=!1;try{var t=document.URL,i=/(\w+):\/\/([^\/:]+):?([^\/]+)?(\/[^#?]*)#?([^?]+)?\??(.+)?/.exec(t),r=i[1];r=="https"&&(n=!0)}catch(u){}return n}function ff(){if(!y.windowOpened&&(y.pageURLCsmaDebug==1||y.configURLCsmaDebug==1||y.configDebug==1)){if(typeof AkamaiAnalytics_debugWindow_available=="function"&&AkamaiAnalytics_debugWindow_available()=="1")return;var n="JS -"+ri;"pluginVersion"in at&&(n=n+":"+at.pluginVersion);AkamaiAnalytics_debugWindow_data={version:n};be()?(pi("https://79423.analytics.edgekey.net/csma/debug/DebugWindow.js","AkamaiAnalytics_debug"),vt(ef,"https://79423.analytics.edgekey.net/plugins/release-details/latest/html5.xml",!1,!0)):(pi("http://79423.analytics.edgesuite.net/csma/debug/DebugWindow.js","AkamaiAnalytics_debug"),vt(ef,"http://79423.analytics.edgesuite.net/plugins/release-details/latest/html5.xml",!1,!0));y.windowOpened=!0;ke()}}function ke(){try{var i=tt.url.toLowerCase(),n="";i.indexOf(".edgesuite.net/")==-1&&i.indexOf(".edgekey.net/")==-1&&(n="Incorrect Beacon XML Path",n+="<ul style='list-style-type:circle;margin:0'>",n+="<li>We have identified that the Beacon XML in not loaded from an Akamai Domain.<\/li>",n+="<li>Kindly use the same Beacon XML path that is provided in SOLA Anlaytics UI while provisioning.<\/li><\/ul>",t(n,"ERROR"))}catch(r){}}function de(){try{var r=i.beaconUrl.toLowerCase(),n="";r.indexOf(".edgesuite.net/")==-1&&r.indexOf(".edgekey.net/")==-1&&(n="Beacons sent to incorrect domain : "+r,n+="<ul style='list-style-type:circle;margin:0'>",n+="<li>We have identified that the beacons are not sent to an Akamai Domain.<\/li>",n+="<li>Kindly use the proper Beacon XML path that is provided in SOLA Anlaytics UI while provisioning.<\/li><\/ul>",t(n,"ERROR"))}catch(u){}}function ge(){var n,i;try{n="";for(i in ci)ci[i]&&(i in e||(n?n+=", "+i:n=i));n&&(n="Following dimensons have not being set : "+n,n+="<ul style='list-style-type:circle;margin:0'>",n+="<li>Please refer 'Set Custom Data' section in Integration guide for more details.<\/li><\/ul>",t(n,"INTEGRATION"))}catch(r){}}function ef(n){var l,a,f,o,u,r,y;try{if(l=n.readyState,a=n.status,l==4&&a==200&&(f=n.responseXML,f&&(o=f.documentElement?f.documentElement:f,o))){var s=document.getElementsByTagName("script"),e=0,h=!1,c="";if(typeof akamaiBCVideoObject!="undefined")kr&&(h=!0,c=kr);else if(s.length)for(e=0;e<s.length;e++)s[e].src!=null&&(u=s[e].src,(u.indexOf("79423.analytics.edgesuite.net")!=-1||u.indexOf("79423.analytics.edgekey.net")!=-1)&&(u.indexOf("/html5/akamaihtml5-min.js")!=-1||u.indexOf("/js/csma.js")!=-1||u.indexOf("/js/brightcove-csma.js")!=-1)&&(h=!0,c=u));if(r="",r=typeof akamaiBCVideoObject!="undefined"?o.getElementsByTagName("brightcove")[0]:o.getElementsByTagName("plugin")[0],r){var p=r.getAttribute("name"),v=r.getAttribute("version"),b=r.getAttribute("link"),k=r.getAttribute("size"),w=r.getAttribute("date"),i="";t("Integration Type : "+p,"INTEGRATION");h?t("Plugin path is correct ["+c+"]","INTEGRATION"):(i="Incorrect Plugin Path",i+="<ul style='list-style-type:circle;margin:0'>",i+="<li>Kindly refer the Integration Guide and use the correct plugin path for integration<\/li>",i+="<li>The plugin path should be one of the below :<\/li>",typeof akamaiBCVideoObject!="undefined"?(i+="<ul><li>http://79423.analytics.edgesuite.net/html5/brightcoveAkamaihtml5-min.js<\/li>",i+="<li>https://79423.analytics.edgekey.net/html5/brightcoveAkamaihtml5-min.js<\/li><\/ul>"):(i+="<ul><li>http://79423.analytics.edgekey.net/html5/akamaihtml5-min.js<\/li>",i+="<li>http://79423.analytics.edgekey.net/js/csma.js<\/li><\/ul>"),i+="<\/ul>",t(i,"ERROR"));y=no(ri,v);y>=0?t("Plugin is Latest (Version = "+ri+" )","INTEGRATION"):(i="Old Plugin Version",i+="<ul style='list-style-type:circle;margin:0'>",i+="<li>Current Plugin Version is "+ri+"<\/li>",i+="<li>The latest plugin version in "+v+" which was released on date "+w+"<\/li>",i+="<li>Kindly check if proper path mentioned in integration guide is used for integration<\/li>",i+="<li>If proper path is used, try by clearing browser cache.<\/li>",t(i,"ERROR"))}}}catch(d){}}function no(n,t){var f,i,u,r;try{if(f=0,n!=null&&t!=null){for(i=n.split("."),u=t.split(".");i.length>u.length;)u.push(0);while(u.length>i.length)i.push(0);for(r=0;r<i.length;r++){if(parseInt(i[r])>parseInt(u[r])){f=1;break}if(parseInt(i[r])<parseInt(u[r])){f=-1;break}}}}catch(e){}return f}function vt(n,t,i,r){pe||to(n,t,i,r)}function to(n,i,r,u){n&&t("XML Request: isXDomainRequest = "+ui+":::funcCallback =  :url: "+i);var f;if(i!=null&&i!="undefined"&&i!="")try{if(ui){f=new XDomainRequest;n&&(f.onprogress=function(){},f.ontimeout=function(){},f.onload=function(){var r,i;if(t("XML Request : xmlClient.onload"),window.DOMParser){var u=new DOMParser,r=u.parseFromString(f.responseText,"text/xml"),i={};i.status="200";i.readyState="4";i.responseXML=r;i.responseText=f.responseText;n(i)}else r=new ActiveXObject("Microsoft.XMLDOM"),r.async=!1,r.loadXML(f.responseText),i={},i.status="200",i.readyState="4",i.responseXML=r,n(i)},f.onerror=function(){t("XML Request : Error, loading xml. url = :"+i);i.indexOf("serverIp")!=-1&&(ei=!0);i.indexOf("protocol-info")!=-1&&(st.fastTCPFailed=!0)});f.open("GET",i,!r);try{u?setTimeout(function(){f.send()},100):f.send(null)}catch(e){try{f.send(null)}catch(o){}}}else f=new XMLHttpRequest,f.open("GET",i,!r),n&&(f.overrideMimeType&&f.overrideMimeType("text/xml"),f.onreadystatechange=function(){t("XML Request : xmlClient.onreadystatechange");n(f)}),f.send(null)}catch(e){t("Exception,  XML Request for url :"+i+",Exception:"+e)}}function io(n){var vt=n.readyState,yt=n.status,k,f,ut,d,kt,b,et,v,ot,r,ht,ii,g,nt,tt,p,it,rt,ct,lt,at,s;t("readConfig: readyState = "+vt+":::status = "+yt);try{if(vt==4&&yt==200&&(k=n.responseXML,k)){for(f=k.documentElement?k.documentElement:k,ut=f.getElementsByTagName("dataMetrics"),d=0;d<ut.length;++d){var pt=ut[d],wt=pt.parentNode,a=wt.nodeName;for(we[d]=a,kt=c[a]=[],b=wt.getAttribute("eventCode"),b&&(wr[a]=b),et=pt.getElementsByTagName("data"),s=0;s<et.length;++s){v=et[s];a=v.getAttribute("name");ot=v.getAttribute("key");b=v.getAttribute("value");var dt=v.getAttribute("sendOnce"),gt=v.getAttribute("fallback"),ni=v.getAttribute("size"),ti=v.getAttribute("regExpJS"),l={};l.name=a;l.key=ot;a in ci?ci[a]=!0:ot.indexOf("_cd_")!=-1&&(ci[a]=!0);b&&(l.value=b);dt&&(l.isSent=!1,l.sendOnce=dt);gt&&(l.fallback=gt);ni&&(l.size=ni);ti&&(l.regExpJS=ti);kt.push(l)}}y.configDebug=parseInt(f.getAttribute("debug"));y.configDebug!=1&&(y.configDebug=0);y.configDebug==1&&ff();f.getElementsByTagName("isActive")[0]&&f.getElementsByTagName("isActive")[0].childNodes[0]&&(rf=f.getElementsByTagName("isActive")[0].childNodes[0].nodeValue);rr.beaconId=f.getElementsByTagName("beaconId")[0].childNodes[0].nodeValue;rr.beaconVersion=f.getElementsByTagName("beaconVersion")[0].childNodes[0].nodeValue;r=f.getElementsByTagName("logTo")[0];i.logType=r.getAttribute("logType");i.logType||(i.logType="relative");i.logInterval=r.getAttribute("logInterval")*1e3;i.logInterval||(i.loginterval=3e5);i.heartBeatInterval=r.getAttribute("heartBeatInterval")*1e3;i.heartBeatInterval||(i.heartBeatInterval=6e4);i.secondaryLogTime=r.getAttribute("secondaryLogTime")*1e3;i.secondaryLogTime||(i.secondaryLogTime=15e3);i.isSessionWithRebufferLimit=r.getAttribute("isSessionWithRebufferLimit");i.isSessionWithRebufferLimit||(i.isSessionWithRebufferLimit=500);i.fastTCPEnabled=r.getAttribute("fastTCPEnabled");i.fastTCPEnabled||(i.fastTCPEnabled=0);i.fastTCPEnabled==1&&(st.fastTCPEnabled=!0);i.aisRequestLimit=r.getAttribute("aisRequestLimit");i.aisRequestLimit||(i.aisRequestLimit=3);u&&(u.aisRequestLimit=i.aisRequestLimit);i.aisRequestInterval=r.getAttribute("aisRequestInterval")*1e3;i.aisRequestInterval||(i.aisRequestInterval=3e4);u&&(u.aisRequestInterval=i.aisRequestInterval);i.startupTimeOutlierLimit=r.getAttribute("startupTimeOutlierLimit")*1e3;i.startupTimeOutlierLimit||(i.startupTimeOutlierLimit=6e5);i.visitTimeout=r.getAttribute("visitTimeout")*6e4;i.visitTimeout||(i.visitTimeout=36e5);i.urlParamSeparator=r.getAttribute("urlParamSeparator");i.urlParamSeparator||(i.urlParamSeparator="~");i.encodedParamSeparator=r.getAttribute("encodedParamSeparator");i.encodedParamSeparator||(i.encodedParamSeparator="*@*");i.initBrowserCloseTime=r.getAttribute("initBrowserCloseTime");i.initBrowserCloseTime||(i.initBrowserCloseTime=9e5);i.seekThreshold=r.getAttribute("seekThreshold")*1e3;i.seekThreshold||(i.seekThreshold=2e3);ht=r.getAttribute("delayTimer");ht&&(w.time=ht);ii=r.getAttribute("disableDelay");ii==1&&(w.enabled=!1);i.beaconUrl=r.getElementsByTagName("host")[0].childNodes[0].nodeValue;i.beaconUrl.indexOf("http://")==-1&&i.beaconUrl.indexOf("https://")==-1&&(i.beaconUrl="http://"+i.beaconUrl);i.beaconUrl+=r.getElementsByTagName("path")[0].childNodes[0].nodeValue;i.maxLogLineLength=r.getAttribute("maxLogLineLength");i.maxLogLineLength||(i.maxLogLineLength=2048);i.maxLogLineLength-=i.beaconUrl.length;i.logVersion="2.0";i.formatVersion="1.1";r.getElementsByTagName("formatVersion")&&r.getElementsByTagName("formatVersion")[0]&&r.getElementsByTagName("formatVersion")[0].childNodes[0]&&(i.formatVersion=r.getElementsByTagName("formatVersion")[0].childNodes[0].nodeValue);i.useKey=parseInt(f.getElementsByTagName("statistics")[0].getAttribute("useKey"));g=f.getElementsByTagName("feedback")[0];g!=null&&g!==""&&(o.shouldSendFLine=!0,o.limit=g.getAttribute("limit"),o.limit||(o.limit=3),o.socialShareLimit=g.getAttribute("socialShareLimit"),o.socialShareLimit||(o.socialShareLimit=1));nt=f.getElementsByTagName("security")[0];nt!=null&&nt!==""&&(tt=nt.getElementsByTagName("ViewerDiagnostics")[0],tt!=null&&tt!==""&&(h.viewerDiagnostics={},p=tt.getElementsByTagName("salt")[0],p!=null&&p!==""&&(h.viewerDiagnostics.salt={},it=p.getAttribute("value"),rt=p.getAttribute("version"),it!=null&&it!==""?(h.viewerDiagnostics.salt.value=it,h.viewerDiagnosticsEnabled=!0,rt!=null&&rt!==""&&(h.viewerDiagnostics.salt.version=rt),h.viewerDiagnostics.salt.bytes=p.getAttribute("bytes")*2,h.viewerDiagnostics.salt.bytes||(h.viewerDiagnostics.salt.bytes=32),h.viewerDiagnostics.salt.iterations=p.getAttribute("iterations"),h.viewerDiagnostics.salt.iterations||(h.viewerDiagnostics.salt.iterations=50)):h.viewerDiagnosticsEnabled=!1)));ct=f.getElementsByTagName("bucketInfo")[0];ur.bucketLength=ct.getElementsByTagName("bucketLength")[0].childNodes[0].nodeValue;ur.bucketCount=ct.getElementsByTagName("bucketCount")[0].childNodes[0].nodeValue;bt=!0;for(lt in e)try{lt.substring(0,4)=="_cd_"&&of(lt)}catch(ri){}for(ro(),ne(),de(),at=f.getElementsByTagName("match"),s=0;s<at.length;s++){match=at[s];try{parentKey=match.parentNode.parentNode.getAttribute("name");ft[parentKey]||(ft[parentKey]={});ft[parentKey][match.getAttribute("key")]={type:match.getAttribute("type"),name:match.getAttribute("name"),value:match.getAttribute("value")}}catch(ri){t(ri)}}uo();fo();eo()}}catch(ri){t("Exception,  readConfig :"+ri)}}function of(n){var i=c.common,t;i!=null&&(t={},t.name=n,t.key=n,i.push(t))}function ro(){var t,n;try{for(t=c.split,n=0;n<t.length;n++)ai[t[n].name]=t[n].key}catch(i){}}function uo(){var n={},f,r,u,i,e;try{if(ft.bitRateBucketTimes){for(u in ft.bitRateBucketTimes)if(n=ft.bitRateBucketTimes[u],n)if(n.key=u,n.value)for(f=n.value,r=f.split(";"),i=0;i<r.length;i++)r[i].indexOf("min:")!=-1?n.min=parseInt(r[i].split(":")[1]):r[i].indexOf("max:")!=-1&&(n.max=parseInt(r[i].split(":")[1]));else n.category="first"}else ft.bitRateBucketTimes={},n=ft.bitRateBucketTimes,n.U={key:"U",type:"range"},n.S={key:"S",max:1500,value:"max:1500",type:"range"},n.Q={key:"Q",min:1500,max:2500,value:"min:1500;max:2500",type:"range"},n.D={key:"D",min:2500,value:"min:2500",type:"range"};g.bitRateBucketMap={};for(e in ft.bitRateBucketTimes)g.bitRateBucketMap[e]=0}catch(o){t("Exception, find bit rate match rules :"+o)}}function fo(){if(t("fillVideoWithConfig function"),r&&r.akamai){var n=r.akamai;n.populateMetricsFromConfiguration();n.isSLineSent&&hf(r);h.viewerDiagnosticsEnabled&&sr(n);n.cdn=er(n)}}function eo(){var i,n;t("sendStoredBeacons: number of beacons to be sent = "+li.length);try{for(i=r.akamai;li.length>0;)n=li.shift(),t("readConfig: sending beacon event code = "+n.code),n.element.populateMetricsFromConfiguration(),n.element.xViewerId=et.xViewerId,n.element.xViewerIdVersion=et.xViewerIdVersion,n.element.cdn=er(n.element),hr(n.element,n.code,n.synch)}catch(u){t("Exception,  sendStoredBeacons"+u)}}function er(n){var i,u,f,r;if(e.cdn)return e.cdn;try{for(key in ft.cdn)if(i=ft.cdn[key],i&&i.name&&i.value)for(u=n[i.name],f=i.value.split(","),r=0;r<f.length;r++)if(u&&u.indexOf(f[r].trim())!=-1)return key}catch(o){t("Exception Get CDN"+o.message)}}function kt(n){var i="",r,t;return n.indexOf("://")!=-1&&(t=n.indexOf("://"),n=n.substring(t+3)),n.indexOf("/")!=-1?(t=n.indexOf("/"),n.indexOf("?")!=-1&&(r=n.indexOf("?"),t=t<r?t:r),i=n.substring(0,t)):n.indexOf("?")!=-1?(t=n.indexOf("?"),i=n.substring(0,t)):i=n,i}function oi(n,t,i,r){var f=n.currentState,u=n.seekObject;r=="S"&&u.seekStartStreamTime==-1?(u.seekStartEpochTime=f.timeUpdateClockTime,u.seekEndEpochTime=t,u.seekStartStreamTime=f.timeUpdateStreamTime,u.seekEndStreamTime=i):r=="S"&&u.seekEndStreamTime==f.timeUpdateStreamTime?(u.seekEndEpochTime=t,u.seekEndStreamTime=i):u.seekStartStreamTime!=-1&&(n.seekTime+=u.seekEndEpochTime-u.seekStartEpochTime,n.seekIntervalsAsString!="-"?n.seekIntervalsAsString+=","+u.seekStartStreamTime+":"+u.seekEndStreamTime:n.seekIntervalsAsString=u.seekStartStreamTime+":"+u.seekEndStreamTime,n.pauseSeekSession!="-"?n.pauseSeekSession+=",S("+u.seekStartStreamTime+":"+(u.seekStartEpochTime-n.startTimer)+"-"+u.seekEndStreamTime+":"+(u.seekEndEpochTime-n.startTimer)+")":n.pauseSeekSession="S("+u.seekStartStreamTime+":"+(u.seekStartEpochTime-n.startTimer)+"-"+u.seekEndStreamTime+":"+(u.seekEndEpochTime-n.startTimer)+")",++n.seekCount,n.seekObject={seekStartEpochTime:-1,seekEndEpochTime:-1,seekStartStreamTime:-1,seekEndStreamTime:-1})}function or(n,r){t("set RebufferSession : curTime = "+r);try{var f=Math.round(r-n.lastLogTime-n.curRebufferTime),u=Math.round(n.curRebufferTime);n.currRebufferEndEpoch=Math.round(r);n.currRebufferStartEpoch=Math.round(r-u);u>i.isSessionWithRebufferLimit&&(n.isSessionWithRebuffer=1);n.rebufferSession=n.rebufferSession?n.rebufferSession+";"+f+":"+u:f+":"+u}catch(e){t("Error, set RebufferSession"+e.message)}}function oo(n,i){var e,o,u,f,r,s;if(i=="B"){if(u="",n.rebufferSession){for(f=n.rebufferSession.split(";"),r=0;r<f.length;r++)s=f[r].split(":"),u+=r==0?"0:"+s[1]:f[r],r!=f.length-1&&(u+=";");t("newRebufferSession = "+u);n.rebufferSession=u}o=1;e=0}else o=0,e=n.lastRebufferEndEpoch>0?n.firstRebufferStartEpoch-n.lastRebufferEndEpoch:-1;n.rebufferSession=o+":"+e+";"+n.rebufferSession;n.lastRebufferEndEpoch=n.currRebufferEndEpoch}function dr(n,t){var r=1,f,u;if(n.rebufferSessionH=null,n.rebufferSessionArrayHLine&&(!n.rebufferSessionArrayHLine||n.rebufferSessionArrayHLine.length!==0)){while(n.rebufferSessionArrayHLine[r]&&t-n.rebufferSessionArrayHLine[r]>2*i.heartBeatInterval)n.rebufferSessionArrayHLine.shift(),n.rebufferSessionArrayHLine.shift(),n.isSessionWithRebufferH==1&&(n.sendIsSessionWithRebufferH=0,n.isSessionWithRebufferH=null);while(n.rebufferSessionArrayHLine[r])u=t-n.rebufferSessionArrayHLine[r-1],f=n.rebufferSessionArrayHLine[r]-n.rebufferSessionArrayHLine[r-1],n.sendIsSessionWithRebufferH==1&&f>i.isSessionWithRebufferLimit&&(n.isSessionWithRebufferH=1),n.rebufferSessionH=n.rebufferSessionH?n.rebufferSessionH+";"+u+":"+f:u+":"+f,r=r+2;r=r-1;n.rebufferSessionArrayHLine[r]&&(u=t-n.rebufferSessionArrayHLine[r],n.sendIsSessionWithRebufferH==1&&u>i.isSessionWithRebufferLimit&&(n.isSessionWithRebufferH=1),n.rebufferSessionH=n.rebufferSessionH?n.rebufferSessionH+";"+u+":"+u:u+":"+u)}}function so(n){return e.deliveryType?e.deliveryType:n.deliveryType}function ho(n){var f=n.readyState,r=n.status,i,u;if((parseInt(r/100)===4||r===0)&&(t("readServerIp: serverIpFailed request falied as status is ,in 400 series"),ei=!0),f==4&&r==200&&(i=n.responseXML,i)){if(u=i.documentElement?i.documentElement:i,tf)fi.serverip=u.getElementsByTagName("ip")[0].childNodes[0].nodeValue;else try{fi.serverip=u.getElementsByTagName("serverip")[0].childNodes[0].nodeValue}catch(e){fi.serverip=""}t("readServerIp : diagnostics.serverip =  "+fi.serverip)}}function co(n){var i=n.akamai,r;if(ei){t("getting ServerIp : serverIp request failed");return}if(i.hostName)try{r=null;i.protocol&&(i.protocol.indexOf("rtmp")!=-1?(r="http://"+i.hostName+"/fcs/ident",tf=!0):r=i.protocol+"://"+i.hostName+"/serverip",t("getting ServerIp : serverIpPath = "+r),vt(ho,r,!1,!0))}catch(u){ei=!0;t("getting ServerIp: error, xmphttprequest")}}function lo(n){var r="",h=n.readyState,s=n.status,u,o;(parseInt(s/100)===4||s===0)&&(t("read fast tcp: fast tcp Failed request falied as status is 400 series"),st.fastTCPFailed=!0);try{if(h==4&&s==200&&(u=n.responseXML,u&&(t("populating fast tcp"),o=u.documentElement?u.documentElement:u,o&&o.firstElementChild))){var i=o.firstElementChild,f="",e="";if(i)for(i.hasAttribute("key")&&(e=i.getAttribute("key"),f=i.childNodes[0].nodeValue,r=e+":"+f);i.nextElementSibling;)i=i.nextElementSibling,i.hasAttribute("key")&&(e=i.getAttribute("key"),f=i.childNodes[0].nodeValue,r?r+=","+e+":"+f:r=e+":"+f)}r&&(st.ftcp=r)}catch(c){t("Exception,  read fast tcp"+c)}}function ao(n){var i=n.akamai,r;if(st.fastTCPFailed){t("getting fast tcp: request failed");return}if(i.hostName)try{r=i.protocol+"://"+i.hostName+"/protocol-info";t("getting fast tcp : fastTCPPath = "+r);vt(lo,r,!1,!0)}catch(u){st.fastTCPFailed=!0;t("getting ServerIp: error, xmphttprequest")}}function gr(n,r){try{var u=n.akamai;i&&i.logInterval&&!r&&(u.fastTCPServerIpTimer=rt(gr,i.logInterval,[n]));ei||co(n);!st.fastTCPFailed&&st.fastTCPEnabled&&ao(n);ei&&st.fastTCPFailed&&l(u.fastTCPServerIpTimer)}catch(f){t("Exception get fast tcp server ip")}}function nu(n){return n.objectBased?n.errorReason?n.errorReason:vr[0]:n.error&&n.error.code?vr[n.error.code]:vr[0]}function sf(n){var t="Play.End.Detected";return n.objectBased&&n.endReason&&(t=n.endReason),t}function tu(){et.viewerId=e.viewerId?e.viewerId:null;et.viewerDiagnosticsId=e.viewerDiagnosticsId?e.viewerDiagnosticsId:e.viewerId?e.viewerId:null}function vo(){return gi()}function yo(){var n=et.viewerId;if(n!="-"){if(!n)try{if(window&&window.localStorage&&window.localStorage.getItem("akamai_clientId"))n=window.localStorage.getItem("akamai_clientId");else if(p("HTML_ViewerId"))n=p("HTML_ViewerId");else try{n=gi();window&&window.localStorage&&window.localStorage.setItem("akamai_clientId",n);try{d("HTML_ViewerId",n)}catch(i){}}catch(r){t("window.localStorage Exception :"+r)}}catch(i){t("Exception,  getting viewerId"+i);n=gi()}return n}}function sr(n,i){var r=null,u;et&&et.viewerDiagnosticsId&&(r=et.viewerDiagnosticsId);var f="",e=50,o=32;r&&r!="-"&&(i&&n.xViewerId||(po(n),t("get Viewer DiagnosticsID"),r=encodeURIComponent(r),h&&h.viewerDiagnostics&&h.viewerDiagnostics.salt&&h.viewerDiagnostics.salt.value&&(f=h.viewerDiagnostics.salt.value),h&&h.viewerDiagnostics&&h.viewerDiagnostics.salt&&h.viewerDiagnostics.salt.iterations&&(e=h.viewerDiagnostics.salt.iterations),h&&h.viewerDiagnostics&&h.viewerDiagnostics.salt&&h.viewerDiagnostics.salt.bytes&&(o=h.viewerDiagnostics.salt.bytes),u=hi.PBKDF2(r,f,{keySize:o/8,iterations:e}),n.xViewerId=u,et.xViewerId=u))}function po(n){var t=null;h&&h.viewerDiagnostics&&h.viewerDiagnostics.salt&&h.viewerDiagnostics.salt.version&&(t=h.viewerDiagnostics.salt.version);n.xViewerIdVersion=t;et.xViewerIdVersion=t}function wo(n,t,i){var r;t!="viewerId"&&t!="clientId"&&t!="viewerDiagnosticsId"&&(i&&(e[i]?r=e[i]:n[i]&&(r=n[i])),n[t]=r)}function ot(n,i,r){r==null&&(r="");try{if(i==""||i==null)return;n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var f=new RegExp("[\\?&]"+n+"=([^&#]*)"),u=f.exec(i);return u==null?r:u[1]}catch(e){return t("Exception,  getValueFromQueryString :"+e),r}}function bo(n){var t=n.akamai;l(t.fastTCPServerIpTimer);gr(n)}function rt(n,i,r){try{var u=null;return u=setTimeout(function(){n.apply(undefined,r)},i)}catch(f){t("Exception, set window timeout:"+f);try{u=window.setTimeout(function(){n.apply(undefined,r)},i)}catch(f){return null}return u}}function l(n){try{clearTimeout(n)}catch(i){t("Exception clear window timeout:"+i);try{window.clearTimeout(n)}catch(i){}}}function hf(n){t("startBeaconTImer");var r=n.akamai;r.areTimerStarted||(t("startBeaconTimer: starting beacon timer"),r.firstPLineTimer=rt(go,i.secondaryLogTime,[n]),r.hLineTimer=rt(af,i.heartBeatInterval,[n]),r.fastTCPServerIpTimer=rt(bo,i.logInterval-5e3,[n]),n.objectBased&&(br=500),r.pollingTimer=rt(ce,br,[n]),r.areTimerStarted=!0)}function iu(n){var t=n.akamai;t&&(t.hLineTimer&&l(t.hLineTimer),t.pollingTimer&&l(t.pollingTimer),t.fastTCPServerIpTimer&&l(t.fastTCPServerIpTimer),t.firstPLineTimer&&l(t.firstPLineTimer),u&&u.retryTimer&&l(u.retryTimer))}function cf(n){var t=n.akamai,i,r,u,f,e;o.akamai={};o.dataSent={};t.areTimerStarted=!1;t.isCLineSent=!1;t.isELineSent=!1;t.lastRebufferEndEpoch=0;t.connectTime=0;w.browserClose=!1;t.totalPlayClockTime=t.totalStreamTime=t.totalRebufferCount=t.totalRebufferTime=0;t.isVisitEnd=0;t.sequenceId="0";bu(n);t.attemptId=t.sessionId=vo(t);tu();t.clientId=t.viewerId=yo(t);d("HTML_ViewerId",t.clientId,395);h.viewerDiagnosticsEnabled&&sr(t);t.lastPLineSentTime=t.hLineSentCount=t.lastSLineSentTime=t.lastHLineSentTime=0;t.lastHTime=0;gt("HTML_LastCLineTime");k=[0,0,0,0,0,0,0,0,0,0,0,0];i=parseInt(p("HTML_VisitCountCookie"));i&&i!=""||(t.isVisitStart=1,i=0,d("HTML_VisitCountCookie",i));r=parseInt(p("HTML_isPlayingCount"));r&&r!=""||(r=0,d("HTML_isPlayingCount",r));u=p("HTML_VisitValueCookie");u&&u!=""||d("HTML_VisitValueCookie","0|0|0|0|0|0|0|0|0|0|0|0|0");f=p("HTML_BitRateBucketCsv");f&&f!=""||d("HTML_BitRateBucketCsv","0,0,0,0,0,0,0,0");e=p(lr);e&&e!=""?t.browserSessionId=t.visitId=p(lr):(t.browserSessionId=t.visitId=gi(),d(lr,t.visitId))}function lf(n,t){var i=n.akamai,u,r;i.isILineSent=!0;++i.iLineCount;i.lastSLineSentTime=t;i.iLineCount==1&&(u=parseInt(p("HTML_VisitCountCookie")),++u,d("HTML_VisitCountCookie",u),ie=t);r=parseInt(p("HTML_VisitIntervalStartTime"));r&&r!=" "||(r=t,d("HTML_VisitIntervalStartTime",r));k[0]=1;i.sendVLine=!0}function ko(n,i){var u,e,o;try{u=r.akamai;u.clearVisitTimeoutId&&l(u.clearVisitTimeoutId);cf(r);u.logInterval="0";bt?hr(u,"init",n):(e=cr(u),o={element:e,code:"init",synch:n},li.push(o));u.lastLogTime=i;++u.sequenceId;lf(r,i);u.currentState.state=f.init;t(": sendBeaconILineAd : Setting state to init");u.currentState.timeUpdateClockTime=i;u.startTimer=i}catch(s){t("Exception, send I line AD:"+s)}}function go(n){var t=b(),i=n.akamai;i.lastPLineSentTime=t;yt(n,"playing",!1,t)}function ns(n,r,u,f){var e,c,o,s;try{if(t("start of the session function"),e=n.akamai,!e||!e.firstTimePlay)return;e.adLoadTime&&e.adLoadTime>e.iLineSentTime?(e.startupTime=e.adLoadTime-e.iLineSentTime,e.adEndTime&&(e.startupTime+=u-e.adEndTime)):e.startupTime=u-e.iLineSentTime;e.startupTime>i.startupTimeOutlierLimit&&(e.outlierStartupTime=e.startupTime,e.startupTime=0);e.bufferingTime=e.startupTime;c={type:"startup",startTime:0,endTime:e.startupTime};bu(n);o=bi(n);nr(o,e);e.streamUrl=o;o!=null&&o.indexOf("?")!=-1&&(o=o.substring(0,o.indexOf("?")));o!=null&&o!=""&&(/.m3u8$/.exec(o)?(e.format="L",e.playerFormat=e.playerType+":"+e.format):(e.format="P",e.playerFormat=e.playerType+":"+e.format,e.deliveryType="O"));e.streamLength=parseInt(wi(n));e.played=[];s=parseInt(p("HTML_isPlayingCount"));s=s+1;d("HTML_isPlayingCount",s);tu();h.viewerDiagnosticsEnabled&&sr(e,!0);e.lastSLineSentTime=u;yt(n,"playStart",!1,u);e.rebufferSessionArrayHLine=[];e.isSLineSent=!0;bt&&hf(n);k[1]=1;e.isFirstTitle=null;e.isVisitStart=null;e.firstTimePlay=!1;e.initPlayed(f)}catch(l){t("Exception, send S line:"+l)}}function ts(n,i,r){try{t("send beacon I line");var u=n.akamai;u.cdn=er(u);gr(n,!0);u.iLineSentTime||(u.iLineSentTime=r);n.videoWidth&&n.videoHeight&&(u.videoSize=n.videoWidth+"x"+n.videoHeight);u.isILineSent||(cf(n),yt(n,"init",i,r),lf(n,r),u.clearVisitTimeoutId&&l(u.clearVisitTimeoutId))}catch(f){t("Exception send I line:"+f)}}function af(n){var t=n.akamai,r;t.hLineTimer=rt(af,i.heartBeatInterval,[n]);r=b();yt(n,"heartBeat",!1,r);t.lastHLineSentTime=r;t.hLineSentCount++;t.hLineSentCount%(i.logInterval/i.heartBeatInterval)==0&&(yt(n,"playing",!1,r),t.lastPLineSentTime=r)}function ru(n,i,r,u){var f,e,o;try{t("sendBeaconCLine : endReasonCode = "+i);f=n.akamai;f.endReasonCode=i;yt(n,"complete",r,u);e=parseInt(p("HTML_isPlayingCount"));e=e-1;d("HTML_isPlayingCount",e);f.isVisitStart=null;f.isCLineSent=!0;f.firstTimePlay=!0;iu(n);o=u;d("HTML_LastCLineTime",o)}catch(s){t("Exception, send beacon C Line:"+s)}}function vf(n,i,r,u){var f,e,o;try{f=n.akamai;f.errorCode=i?i:"UNKNOWN";t("sendBeaconELine : errorCode = "+f.errorCode);k[3]=1;f.sequenceId==1&&(k[11]=1,tu(),h.viewerDiagnosticsEnabled&&sr(f,!0));f.playerState="E";yt(n,"error",r,u);f.isSLineSent&&(e=parseInt(p("HTML_isPlayingCount")),e=e-1,d("HTML_isPlayingCount",e));f.isELineSent=!0;f.isVisitStart=null;f.firstTimePlay=!0;iu(n);o=u;bf(f);d("HTML_LastCLineTime",o)}catch(s){t("Exception, send beacon E line:"+s)}}function is(n,i){var u,f,e;try{t("sendBeaconVLine");u=n.akamai;u.isVisitEnd=1;fs(u);f=parseInt(p("HTML_VisitIntervalStartTime"));u.visitMaxPersistentBitRateBucket=es();u.visitInterval=i-f;(f==""||f==null||isNaN(f))&&(u.visitInterval=i-ie);u.sessionId=null;u.attemptId=null;u.sequenceId=null;gt("HTML_BitRateBucketCsv");gt("HTML_VisitValueCookie");gt("HTML_VisitIntervalStartTime");gt("HTML_LastCLineTime");gt("HTML_VisitCountCookie");gt("HTML_isPlayingCount");gt(lr);yt(n,"visit",!0,i);o.akamai={};o.dataSent={};t("sendBeaconVLine: beacon sent");u.sendVLine=!1;u.iLineCount=0;l(n.akamai.clearVisitTimeoutId);e=u.isPlaylist;n.akamai=new lu(r);typeof akamaiBCVideoObject!="undefined"&&(n.akamai.isPlaylist=e)}catch(s){t("Exception, send beacon V line:"+s)}}function rs(){for(var f=p("HTML_VisitValueCookie"),r=f.split("|"),n,u,i=0;i<k.length;i++)hu[i]+=k[i];for(t("setVisitValueCookie :: visit values saved"+hu),n=0;n<r.length;n++)r[n]=parseInt(r[n])+k[n];u=r.join("|");d("HTML_VisitValueCookie",u)}function us(){var i;try{var r=p("HTML_BitRateBucketCsv"),u=cu.split(","),f=r.split(","),n=0;for(i in g.bitRatePlayTime)i=parseInt(i),n=parseInt((i-1)/5e5),n>7&&(n=7),f[n]=parseInt(f[n])+g.bitRatePlayTime[i],u[n]=parseInt(u[n])+g.bitRatePlayTime[i];r=f.join(",");d("HTML_BitRateBucketCsv",r);cu=u.join(",")}catch(e){t("Exception set bit rate bucketcsv"+e)}}function yf(n){t("entered setVisitValueParameters");k[4]=n.totalPlayClockTime;k[5]=n.totalPlayStreamTime;k[6]=n.totalRebufferCount;k[7]=n.totalRebufferTime;k[8]=n.totalAdPlayClockTime;k[9]=n.totalAdStartCount;k[10]=n.totalAdAbandonCount;n.totalPlayClockTime>5e3&&(k[2]=1);us();rs()}function fs(n){var u,f,i;try{var o=p("HTML_VisitValueCookie"),r=o.split("|"),e=!0;for((r==""||r==null)&&(e=!1),u=[],u=e?r:hu,f=["visitAttempts","visitPlays","visitViews","visitErrors","visitPlayClockTime","visitPlayStreamTime","visitRebufferCount","visitRebufferTime","visitAdPlayClockTime","visitAdStartCount","visitAdAbandonCount","visitStartupErrors"],i=0;i<f.length;i++)n[f[i]]=u[i]}catch(s){t("Exception get visit value  cookie : "+s)}}function es(){var r,u,i;try{var e=p("HTML_BitRateBucketCsv"),n=e.split(","),f=!1;for((n==null||n=="")&&(n=cu.split(",")),n[0]=parseInt(n[0]),r="00",u=n[0],i=0;i<n.length;i++)n[i]=parseInt(n[i]),n[i]>0&&(f=!0),u<n[i]&&(u=n[i],r="0"+i);if(f)return r}catch(o){t("Exception, get visit max bit rate bucket"+o)}}function uu(n){try{var i=encodeURI(n);return i.replace(/#/g,"%23")}catch(r){return t("Exception,  encoding beacon"),n}}function pf(){try{if(t("send delayed beacon"),w.queue&&w.queue.length>0){var n=w.queue.shift();w.timer=rt(pf,w.time,[]);t("sending delayed beacon ::"+n.url,"BEACON");vt(null,n.url,n.isSync)}else t("send delayed beacon : clear the timer"),l(w.timer),w.timer=null}catch(i){}}function fu(n,r){var f,u;if(rf==0){t("put beacon On Wire, dont send beacon isACtive is zero");return}f=i.beaconUrl+"?"+n;try{if(w.enabled)if(u={},w.browserClose){if(w.timer&&l(w.timer),w.queue&&w.queue.length>0)while(w.queue.length>0)u=w.queue.shift(),t("put beacon on wire, send beacon from queue::"+u.url,"BEACON"),vt(null,u.url,u.isSync);t("put beacon on wire browser close::"+f,"BEACON");vt(null,f,r)}else t("put beacon on wire pushing beacon in queue::"+f),u.url=f,u.isSync=r,w.queue.push(u),w.timer?t("put beacon on wire: timer is running"):(t("put beacon on wire: call send delayed beacon"),pf());else t("put beacon on wire"+f,"BEACON"),vt(null,f,r)}catch(e){t("failed to send beacon");t(e)}}function os(n,i){try{return n=n.substring(0,i)}catch(r){return t("Exception,  getTruncatedMetric"+r),n}}function eu(n,i,r,u){var o,f,e;try{for(f=0;f<i.length;f++)o=i[f].name,e=null,o in n&&(e=n[o]),i[f].value&&(e=i[f].value),(e||e==0)&&(i[f].sendOnce?i[f].isSent===!1&&(e!=0&&(i[f].isSent=!0),wf(e,i,o,f,u,r)):wf(e,i,o,f,u,r))}catch(s){t("Exception, assemble logs:"+s)}}function wf(n,r,u,f,e,o){try{if(r[f].regExpJS){var h=new RegExp(r[f].regExpJS),s=h.exec(n);s&&(n=s[s.length-1])}}catch(c){t("Exception,  evaluating regExpJS attribute for metric : "+u)}n=String(n).replace(/~/g,i.encodedParamSeparator);r[f].size&&(n=os(n,r[f].size));r[f].key in e||(e[r[f].key]=r[f].key,o.push((i.useKey?r[f].key:u)+"="+n))}function hr(n,r,u){var s,p,it,o,a,nt,v,h,f,w,e,l,b,y,d;try{t("getBeaconStrings : eventCode =  "+r);var rt=c.common,tt=[],g=c[r];if(g==null||g=="undefined"){t("getbeaconstrings, return as eventmetrics undefined");return}s=[];p={};n.eventCode||(n.eventCode=wr[r]);eu(n,rt,tt,p);r=="error"&&(n.updateTerminateMetrics(),yf(n,k));r=="complete"&&(n.updateTerminateMetrics(),it=c.playing,yf(n,k),eu(n,it,s,p));eu(n,g,s,p);o=tt.join(i.urlParamSeparator);o=uu(o);a=0;try{for(nt in ai)a+=i.useKey?ai[nt].length+3+i.urlParamSeparator.length:nt.length+3+i.urlParamSeparator.length}catch(ut){a=12}if(a--,v=i.maxLogLineLength-a-o.length-3-i.beaconUrl.length,v<=0&&(v=4780-a-o.length-3-i.beaconUrl.length),h=[],f="",v>0){if(s.length>0){for(e="",l="",w=0;w<s.length;w++)l=uu(s[w]),l.length>=v?h.push(l):e.length+l.length<=v?e?e+=i.urlParamSeparator+l:e=l:(h.push(e),e="");e!=""&&h.push(e)}if(b=h.length,b>1)for(y=1;y<=b;++y)f=o+i.urlParamSeparator,f+=(i.useKey?ai.partNumber:"partNumber")+"="+y+i.urlParamSeparator,f+=(i.useKey?ai.totalParts:"totalParts")+"="+b+i.urlParamSeparator,f+=h[y-1],f+=i.urlParamSeparator,c[r]&&fu(f,u,n);else f=o+i.urlParamSeparator+h[0]+i.urlParamSeparator,fu(f,u,n)}else d=s.join(i.urlParamSeparator),d=uu(d),f=o+i.urlParamSeparator+d+i.urlParamSeparator,c[r]&&fu(f,u,n)}catch(ut){t("Exception, get beacon Strings:"+ut)}}function bf(n){o.fLineCount=0;var t=cr(n);o.akamai=t;o.akamai.customDataPopulated=!1}function ss(){var n;try{var u="socialShare:",r=u.length,i=o.socialSharingObj;for(n in e)n.indexOf(u)!=-1&&(n in o.dataSent?o.dataSent[n].count<o.socialShareLimit&&(++o.dataSent[n].count,i[n.substring(r)]=i==null?e[n]:n.substring(r)in i?parseInt(i[n.substring(r)])+parseInt(e[n]):e[n]):(o.dataSent[n]={},o.dataSent[n].value=e[n],o.dataSent[n].count=1,i[n.substring(r)]=e[n]),delete e[n]);o.socialSharingObj=i}catch(f){t("Exception,  getFeedbackObj"+f);o.socialSharing=null}}function hs(n){var i,r;try{if(i=null,o.socialSharingObj!=null)for(r in o.socialSharingObj)i==null?i=r+":"+o.socialSharingObj[r]+",":i+=r+":"+o.socialSharingObj[r]+",";i!=null&&(n.socialSharing=i.substring(0,i.length-1))}catch(u){t("Exception,  getFeedbackData"+u);n.socialSharing=null}o.socialSharingObj={}}function kf(n){var t,i;try{for(t in c)if(c[t])for(i=0;i<c[t].length;i++)c[t][i].fallback&&!e[c[t][i].name]&&wo(n,c[t][i].name,c[t][i].fallback)}catch(r){}}function cs(n){try{var i=at.streamName?at.streamName:n.streamName}catch(r){}try{n.title=e.title?e.title:e.eventName?e.eventName:i;n.eventName=e.eventName?e.eventName:e.title?e.title:i}catch(r){t("Exception,  getting title and eventName, "+r)}}function ou(n,i,r,u){var s,o;t("updating metrics for playing and end events");var e=n.akamai,h=0,l=e.playerState,c=!0;e.currentStreamTime=parseInt(nt(n));switch(e.currentState.state){case f.playing:e.playerState="PL";i-e.seekTime>0&&e.updatePlayClockTime(i-e.seekTime,e.currentState.lastEventClockTime,r);e.playClockTime<0&&(e.playClockTime=0);e.updatePlayed(e.currentStreamTime);break;case f.pause:e.pauseDuration+=i;e.playerState="PS";break;case f.rebuffering:e.rebufferTime+=i;e.curRebufferTime+=i;or(e,r);e.playerState="B";h=r-e.curRebufferTime;break;case f.resumeBuffering:e.playerState="RB";e.resumeBufferTime+=i;break;case f.ended:e.updatePlayed(e.currentStreamTime);break;case f.seek:r-e.currentState.timeUpdateClockTime>0&&oi(e,r,e.currentStreamTime,"S");e.currentState.timeUpdateClockTime=r;e.playerState="SK";break;default:c=!1}if(g.getTransitionSession(e),oi(e),e.rebufferSession&&(oo(e,l),e.firstRebufferStartEpoch=h),e.playClockTime>5e3&&(e.isView=1),c&&(e.currentState.lastEventClockTime=r),e.bytesLoaded=uh(n),e.played){for(s=e.played,e.playStreamTime=0,o=0;o<s.length;o++)e.playStreamTime+=parseInt(s[o][1]-s[o][0]);e.logType=="R"&&(e.playStreamTime-=e.lastPlayStreamTime,e.lastPlayStreamTime+=e.playStreamTime)}u&&e.endReasonCode!="Browser.Close"&&!e.streamTitleSwitchReason&&(e.playerState="E")}function ls(n){var i,t;try{i="-";document&&document.referrer&&(t=document.referrer,t=t.split("/",3),t&&t[2]&&(i=t[2]));window==window.top?(n.pageUrl=e.pageUrl?e.pageUrl:document.URL,n.pageHost=e.pageUrl&&kt(e.pageUrl)?kt(e.pageUrl):document.location.hostname,n.pageReferrer=e.pageReferrer?e.pageReferrer:document.referrer?document.referrer:"-",n.pageReferrerHost=e.pageReferrer&&kt(e.pageReferrer)?kt(e.pageReferrer):document.referrer?i:"-"):(n.pageUrl=e.pageUrl?e.pageUrl:document.referrer?document.referrer:"-",n.pageHost=e.pageUrl&&kt(e.pageUrl)?kt(e.pageUrl):document.referrer?i:"-",n.pageReferrer=e.pageReferrer?e.pageReferrer:"NA",n.pageReferrerHost=e.pageReferrer&&kt(e.pageReferrer)?kt(e.pageReferrer):"NA")}catch(r){}}function df(n){try{var t;for(t in at)t!="viewerId"&&t!="clientId"&&t!="viewerDiagnosticsId"&&t!="pluginVersion"&&(n[t]=at[t]);"pluginVersion"in at&&(n.pluginVersion=ri+":"+at.pluginVersion)}catch(i){}}function gf(n,i){var r,f;t("populate custom data, eventCode = "+i);try{if(ls(n),n.deliveryType=so(n),n.device=e.device?e.device:ti,(i=="playing"||i=="complete"||i=="feedback"||i=="error")&&(hs(n),(n.socialSharing==null||n.socialSharing=="")&&i=="feedback"&&!n.customDataChanged)){--o.fLineCount;return}for(r in e)r!="viewerId"&&r!="clientId"&&r!="viewerDiagnosticsId"&&(r in nf||(n[r]=e[r]));if(u&&u.akamai)for(f in u.akamai)n[f]=u.akamai[f];cs(n);n.cdn=er(n)}catch(s){t("Exception,  populate Custom Data , "+s)}}function yt(n,i,r,u){var f,s,o,e,h,c;try{if(t("sendBeacon: eventCode = "+i+", clocktime = "+u),f=n.akamai,s=u-f.currentState.lastEventClockTime,f.logInterval=i!="init"?f.lastLogTime<=0?"0":(u-f.lastLogTime)/1e3:"0",f.customDataPopulated||gf(f,i),f.serverIp=fi.serverip?fi.serverip:"-",f.fastTCP=st.ftcp?st.ftcp:"-",f.eventCode=wr[i],f.lastHTime=f.hLineSentCount>0?(u-f.lastHLineSentTime)/1e3:(u-f.lastSLineSentTime)/1e3,i=="heartBeat"&&(o=f.logInterval,f.logInterval=(u-f.lastPLineSentTime)/1e3,dr(f,u)),f.logInterval<0&&(f.logInterval="0"),e=!1,i=="complete"&&(i="playing",e=!0),f.endOfStream=n.ended?"1":"0",f.currentClockTime=u-f.startTimer,f.currentStreamTime=parseInt(nt(n)),i=="playStart",i=="error",i!="playing"||f.playEndMetricsUpdated||(e&&dr(f,u),t("send Beacon, updating play and end metrics"),ou(n,s,u,e),bu(n)),f.customDataPopulated||kf(f),df(f),!bt){h=cr(f);c={element:h,code:e?"complete":i,synch:r};li.push(c);(i=="playing"||i=="playStart")&&f.clearRelativeMetrics();i!="heartBeat"?(t("send beacon :configurationPopulated false sequenceId = "+f.sequenceId),++f.sequenceId,f.lastLogTime=u):f.logInterval=o;return}i=="playStart"&&ge();f.populateMetricsFromConfiguration();f.xViewerId=et.xViewerId;f.xViewerIdVersion=et.xViewerIdVersion;e?hr(f,"complete",r):hr(f,i,r);f.qualityOfExperience=null;e=!1;(i=="playing"||i=="playStart")&&f.clearRelativeMetrics();i!="heartBeat"?(++f.sequenceId,f.lastLogTime=u):f.logInterval=o}catch(l){t("Exception, send beacon:"+l)}}function cr(n,t){var t=t||{},i;try{for(i in n)typeof n[i]=="object"&&n[i]?(t[i]=n[i].constructor===Array?[]:{},cr(n[i],t[i])):t[i]=n[i];return t}catch(r){}}function t(n,t){try{if(y.configURLCsmaDebug==1||y.pageURLCsmaDebug==1||y.configDebug==1){try{y.printException&&n.indexOf("Exception")!=-1&&(t="ERROR")}catch(r){}try{as(n,t)}catch(u){}try{console.log(n)}catch(u){}}else if(!bt){var i={message:n,msgType:t};ni.push(i)}}catch(u){}}function as(n,t){if((t==null||t=="")&&(t="TRACE"),n!=null&&n!="")if(typeof AkamaiAnalytics_debugWindow_available=="function"&&AkamaiAnalytics_debugWindow_available()=="1")AkamaiAnalytics_debugWindow_appendLog(n,t);else{var i={message:n,msgType:t};ni.push(i)}}function ne(){try{if((y.configURLCsmaDebug==1||y.pageURLCsmaDebug==1||y.configDebug==1)&&y.logStoredMsg)if(typeof AkamaiAnalytics_debugWindow_available=="function"&&AkamaiAnalytics_debugWindow_available()=="1"){if(y.logTimer&&l(y.logTimer),y.logStoredMsg=!1,ni.length){for(var n=0;n<ni.length;n++)t(ni[n].message,ni[n].msgType);ni=[]}}else y.logTimer=rt(ne,1e3,[])}catch(i){}}function vs(){var u;if(navigator&&navigator.userAgent){try{var i=navigator.userAgent,r=/\((\w+)/,n=r.exec(i);a=n[1].toLowerCase();a=a.indexOf("compatible")!=-1||a.indexOf("windows")!=-1?"Windows":a.indexOf("x11")!=-1?"Linux":a.indexOf("macintosh")!=-1||a.indexOf("mac os")!=-1||a.indexOf("macos")!=-1?"Mac OS":a.indexOf("ipad")!=-1?"iPad":a.indexOf("iphone")!=-1?"iPhone":a.indexOf("ipod")!=-1?"iOS":i.indexOf("Android")!=-1?"Android":"Others"}catch(f){t("Exception,  finding Osname");a="Others"}su=a;try{r=/(NT|OS X|Linux|CPU.*?OS) ([0-9\._]+)/;n=r.exec(i);yi=n[2]?n[2]:"";yi&&(su+=" "+yi);u=null;a=="Windows"&&(u=ys(yi),a=a+" "+u)}catch(f){t("Exception,  OSVersion"+f)}}}function ys(n){var t=null;return n&&(t=n=="6.3"||n=="6.2"?"8":n=="6.1"?"7":n=="6.0"?"Vista":n=="5.2"||n=="5.1"?"XP":"Other"),t}function ps(){var r,i,n,u;if(navigator&&navigator.userAgent){r=navigator.userAgent;i=/(MSIE|Chrome|Version|Firefox)[ \/]([0-9]+)/;try{n=i.exec(r);si=n[1];n[1]=="Version"&&(i=/(Opera|Safari)/,u=i.exec(r),si=u[1])}catch(f){t("Exception,  browserName"+f)}try{t("browser version = "+n[2]);ar=n[2];si&&ar&&(si=si+" "+ar)}catch(f){t("Exception,  browserVersion"+f)}}}function ws(){if(navigator&&navigator.userAgent)try{var n=navigator.userAgent;n=n.toLowerCase();ti=n.indexOf("ipad")!=-1?"iPad":n.indexOf("iphone")!=-1?"iPhone":n.indexOf("android")!=-1?"Android Device":n.indexOf("macintosh")!=-1||n.indexOf("windows")!=-1||n.indexOf("compatible")!=-1?"Desktop":"Others"}catch(i){t("Exception,  getitng device name : "+i);ti="Others"}}function dt(n){try{switch(n){case f.ended:return"ended";case f.init:return"init";case f.playing:return"playing";case f.pause:return"pause";case f.seek:return"seek";case f.rebuffering:return"rebuffering";case f.resumeBuffering:return"resumeBuffering";default:return"undefined"}}catch(t){}}function lu(n){if(n&&n.customMetrics)for(var r in n.customMetrics)r in nf||(this[r]=n.customMetrics[r]);this.userAgent=te;this.playerType="HTML5";this.pluginVersion=ri;this.os=a;this.fullOs=su;this.osVersion=yi;this.browser=si;this.browserVersion=ar;this.browserSize=window.innerWidth+"x"+window.innerHeight;this.rebufferCount=0;this.bytesLoadedCallback=0;this.lastBytesLoaded=0;this.currRebufferEndEpoch=0;this.totalPlayClockTime=0;this.totalPlayStreamTime=0;this.totalRebufferCount=0;this.totalRebufferTime=0;this.totalPauseCount=0;this.totalPauseDuration=0;this.totalSeekCount=0;this.totalSeekTime=0;this.totalResumeBufferCount=0;this.totalResumeBufferTime=0;this.totalAdPlayClockTime=0;this.totalAdStartCount=0;this.totalAdAbandonCount=0;this.updateTerminateMetrics=function(){try{this.playClockTime&&(this.totalPlayClockTime+=parseInt(this.playClockTime));this.playStreamTime&&(this.totalPlayStreamTime+=parseInt(this.playStreamTime));this.rebufferCount&&(this.totalRebufferCount+=parseInt(this.rebufferCount));this.rebufferTime&&(this.totalRebufferTime+=parseInt(this.rebufferTime));this.pauseCount&&(this.totalPauseCount+=parseInt(this.pauseCount));this.pauseDuration&&(this.totalPauseDuration+=parseInt(this.pauseDuration));this.seekCount&&(this.totalSeekCount+=parseInt(this.seekCount));this.seekTime&&(this.totalSeekTime+=parseInt(this.seekTime));this.resumeBufferCount&&(this.totalResumeBufferCount+=parseInt(this.resumeBufferCount));this.resumeBufferTime&&(this.totalResumeBufferTime+=parseInt(this.resumeBufferTime));this.adPlayClockTime&&(this.totalAdPlayClockTime+=parseInt(this.adPlayClockTime));this.adCount&&(this.totalAdStartCount+=parseInt(this.adCount));this.adAbandonCount&&(this.totalAdAbandonCount+=parseInt(this.adAbandonCount));var n=b();this.startupAbondonWaitTime=n;this.playInterval=n}catch(i){t("Unable to update cumulative metrics")}};this.clearRelativeMetrics=function(){var t=["rebufferCount","rebufferTime","playClockTime","playStreamTime","seekCount","seekTime","pauseCount","pauseDuration","resumeBufferCount","resumeBufferTime","averagedBitRate","transitionUpSwitchCount","transitionDownSwitchCount","rebufferSession","curRebufferTime","adCount","adPlayClockTime","adStartupTime","adAbandonCount","adPauseTime"],n;for(this.updateTerminateMetrics(),n=0;n<t.length;++n)this[t[n]]=0;this.pauseIntervalsAsString="-";this.seekIntervalsAsString="-";this.pauseSeekSession="-";this.transitionStreamTimeSession="-";this.socialSharing=null;this.adSession=null;o.socialSharing=null;o.socialSharingObj={};g.bitRateArr=[];delete this.rebufferSession};this.populateMetricsFromConfiguration=function(){var n,t;this.beaconId=rr.beaconId;this.beaconVersion=rr.beaconVersion;this.logType=i.logType=="relative"?"R":"C";this.logVersion=i.logVersion;this.startupTimeOutlierLimit=i.startupTimeOutlierLimit;this.formatVersion=i.formatVersion;this.bucketCount=ur.bucketCount;this.bucketLength=ur.bucketLength;for(n in c)if(c[n])for(t=0;t<c[n].length;t++)c[n][t].value&&(this[c[n][t].name]=c[n][t].value)};this.initPlayed=function(n){this.played.push([n,n]);this.playingIndex=0};this.updatePlayClockTime=function(n){this.playClockTime+=n;g.updateBitRateArr(n)};this.updatePlayed=function(n,t){var r=this.played,i;if(r){for(i=0;i<r.length;i++);for(i=this.playingIndex;i<r.length&&n>r[i][0];i++);if(i!=this.playingIndex?(r[this.playingIndex][1]=Math.max(n,r[i-1][1]),r.splice(this.playingIndex+1,i-this.playingIndex-1)):r[this.playingIndex][1]=Math.max(n,r[this.playingIndex][1]),t!=null){for(i=0;i<r.length;i++){if(r[i][0]<=t&&r[i][1]>=t){this.playingIndex=i;return}if(i+1<r.length&&r[i][1]<t&&r[i+1][0]>t){i++;this.playingIndex=i;r.splice(i,0,[t,t]);return}}i==r.length&&(r.push([t,t]),this.playingIndex=i)}}};this.isVisitEnd=0;this.sequenceId="0";this.isSLineSent=!1;this.sendVLine=!1;this.played=[];this.iLineCount=0;this.isPlaylist=!1;this.isFirstTitle=1;this.currentState={state:f.ended,lastEventClockTime:0,pauseStartStreamTime:0,pauseStartClockTime:0,timeUpdateStreamTime:0,timeUpdateClockTime:0,pollingTimerStreamTime:0,seekStartStreamPos:0};this.seekObject={seekStartEpochTime:-1,seekEndEpochTime:-1,seekStartStreamTime:-1,seekEndStreamTime:-1};this.clearRelativeMetrics();t("value of configurationPopulated"+bt);bt&&this.populateMetricsFromConfiguration();this.loadStartILine=!1;this.canPlayUpdated=!1;this.canPlayEventAutoPlay=!0;this.format="P";this.playerFormat=this.playerType+":"+this.format;this.deliveryType="O";this.firstTimeProgress=!0;this.firstTimePlay=!0;this.isILineSent=!1;this.seekFrom=0;this.lastPlayStreamTime=0;this.lastPlayLogTime=0;this.lastLogTime=0;this.curRebufferTime=0;this.sendIsSessionWithRebufferH=1}function bs(){try{var t,n;for(t in c)if(c[t])for(n=0;n<c.length;n++)c[t][n].isSent&&c[t][n].isSent===!0&&(c[t][n].isSent=!1)}catch(i){}}function re(n){t("endOfTheSession");var r=n.akamai,u=r.isPlaylist,f=r.visitId,e=r.viewerId,o=r.streamName,s=r.cdn,h=r.sendVLine,c=r.iLineCount;n.akamai=null;bs();r=n.akamai=new lu(n);r.visitId=r.browserSessionId=f;r.viewerId=r.clientId=e;r.cdn=s;vi=-1;r.streamName=o;r.iLineCount=c;n.akamai.clearVisitTimeoutId=rt(di,i.visitTimeout,[n,1]);r.sendVLine=h;r.isPlaylist=u;n.played&&(n.played.length=0);g.clearBitRate()}function ks(){var r;try{if(this.readyState==4&&this.status==200&&this.responseText){var i=this.akamai,f=this.responseText.split("\n"),o="",e=/PROGRAM-ID=(\d+)/,n,u;if(f){for(u=0;u<f.length;u++)if(n=e.exec(f[u]))if(n[1]==o)break;else o=n[1];u!=f.length&&(i.format="L",i.playerFormat=i.playerType+":"+i.format)}if(e=/^#EXT((INF)|(-X-STREAM-INF))[^\n]*\n([^\n]*)\n/m,t("Checking"),n=e.exec(this.responseText))if(t("Checking done "+n[4]),/.m3u8$/.exec(n[4]))try{r=new XMLHttpRequest;r.open("GET",n[4],!0);r.onreadystatechange=function(){this.readyState==4&&this.status==200&&this.responseText&&/^#EXT-X-ENDLIST/m.exec(this.responseText)&&(i.deliveryType="O")};r.overrideMimeType&&r.overrideMimeType("text/plain");r.send(null)}catch(s){t("parsePlaylist, Exception,  parsing play list, "+s)}else/^#EXT-X-ENDLIST/m.exec(this.responseText)&&(i.deliveryType="O")}}catch(s){t("Exception,  parsePlaylist : "+s)}}function it(){return ut&&ut.dataset&&ut.dataset.isad&&ut.dataset.isad=="true"?!0:!1}function au(n,t,i,r){var u,f;t=="playing"&&(ht=[]);u={};u.eventType=t;u.eventTime=r;i&&(u.streamUrl=i);t=="error"&&(u.errorCode=nu(n));ht&&ht.length>0?(f=ht[ht.length-1],f.eventType==u.eventType&&f.streamUrl==u.streamUrl?(t=="error"&&(f.errorCode=u.errorCode),f.eventTime=u.eventTime):ht.push(u)):ht.push(u)}function ue(n,i,r,u){var e,f,o;try{e=!1;ht.length>0&&(f=ht[ht.length-1],t("check error events array, previous event is : "+f.eventType),f.eventType=="error"&&r==f.streamUrl&&(i=="error"?(o=nu(n),e=f.errorCode==o?!0:!1,f.eventTime=u,f.errorCode=o):i=="play"&&f.eventTime&&u-f.eventTime<=2e3&&(e=!0)))}catch(s){t("Exception,  checkErrorEventsArray"+s);e=!1}return e}function ds(n,i,r){if(it(n)){t("handle Seeked Event : video tag is of type AD, return");return}try{i||(i=b());r||(r=parseInt(nt(n)));var e=n.akamai,u=e.currentState,s=i-u.lastEventClockTime,c=i-e.startTimer,o=u.state;if(t("entered function handle Seeked Event, currentstate = "+dt(u.state)),o==f.pause||o==f.playing||o==f.rebuffering||u.state==f.seek){i-u.timeUpdateClockTime>0&&oi(e,i,r,"S");switch(o){case f.playing:e.updatePlayed(u.timeUpdateStreamTime,r);u.lastEventClockTime=i;e.updatePlayClockTime(s,u.lastEventClockTime,i);u.state=f.seek;u.seekStartStreamPos=r;break;case f.rebuffering:t("handle seeked event, previous state is rebuffering");e.rebufferTime+=s;e.curRebufferTime+=s;e.rebufferSessionArrayHLine&&e.rebufferSessionArrayHLine.push(i);try{or(e,i);e.curRebufferTime=0}catch(h){t("Error...Play"+h.message)}u.lastEventClockTime=i;u.state=f.seek}}}catch(h){t("Exception,  handle Seeked Event :"+h)}}function vu(n,i){if(it(n)){t("handlePauseEvent : video tag is of type AD, return");return}try{t("entered function handle Pause Event");var e=b(i),u=parseInt(nt(n)),r=n.akamai,o=r.currentState,h=wi(n);if(r.firstTimePlay||o.state==f.pause)return;if(h&&h!=0&&u&&u!=0&&Math.abs(h-u)<1e3)return;var c=e-o.lastEventClockTime,s=e-r.startTimer,a=o.state;switch(a){case f.playing:r.updatePlayClockTime(c,o.lastEventClockTime,e);++r.pauseCount;oi(r,e,u,"P");r.pauseSeekSession!="-"?r.pauseSeekSession+=",P("+u+":"+s+")":r.pauseSeekSession="P("+u+":"+s+")";r.updatePlayed(u);break;case f.rebuffering:++r.pauseCount;oi(r,e,u,"P");r.pauseSeekSession!="-"?r.pauseSeekSession+=",P("+u+":"+s+")":r.pauseSeekSession="P("+u+":"+s+")";r.rebufferTime+=c;r.curRebufferTime+=c;r.rebufferSessionArrayHLine&&(t("handlePauseEvent : pushing, rebufferSessionArrayHLine"),r.rebufferSessionArrayHLine.push(e));try{or(r,e);r.curRebufferTime=0}catch(l){t("Error...Pause"+l.message)}}o.state=f.pause;o.pauseStartStreamTime=u;o.pauseStartClockTime=e;o.lastEventClockTime=e}catch(l){t("Exception,  handlePauseEvent : "+l)}}function fe(n,i){try{if(r&&r.akamai){t("handle bit rate switch");try{n=parseInt(n)}catch(e){t("Exception,bit rate to int :"+e);return}isNaN(n)&&t("handle bitrate swtich, bite rate isNaN");var u=r.akamai,o=u.currentState,s=nt(r);g.currentBitRate!="-"&&(n>g.currentBitRate?u.transitionUpSwitchCount++:n<g.currentBitRate&&u.transitionDownSwitchCount++);o&&o.state==f.playing&&lt(r,i);g.currentBitRate=n;g.currentStartPos=s}}catch(e){t("Exception, handle bit rate switch:"+e)}}function ct(n,i){var u,e,s;if(it(n)){t("handle Play Event : video tag is of type AD, return");return}try{if(u=b(i),e=bi(n),n.akamai&&n.akamai.postRollTimer&&(t("handle play event: send the C line without changing set data"),l(n.akamai.postRollTimer),delete n.akamai.postRollTimer,ii(n,u)),!n.objectBased&&!e){t("handle play event, video is null");return}if(ue(n,"play",e,u)){t("handle play Event: play is thrown after error, return, curTime = "+u);return}au(n,"play",e,u);var r=n.akamai,a=parseInt(nt(n)),o=r.currentState,v=u-o.lastEventClockTime,h=u-r.startTimer,y=o.state;t("entered function handle Play Event, current state = "+dt(o.state));switch(y){case f.ended:if(nr(e,r),r.streamUrl=e,r.startTimer=u,r.streamLength=parseInt(wi(n)),e!=null&&e.indexOf("?")!=-1&&(e=e.substring(0,e.indexOf("?"))),e!=null&&e!=""&&/.m3u8$/.exec(e)){r.format="L";r.playerFormat=r.playerType+":"+r.format;r.deliveryType="L";try{s=new XMLHttpRequest;s.akamai=r;s.open("GET",e,!0);s.onreadystatechange=ks;s.overrideMimeType&&s.overrideMimeType("text/plain");s.send(null)}catch(c){t("handleplayEvent, Exception,  parsing play list, "+c)}}vi=-1;ts(n,!1,u);r.currentState.state=f.init;t(u+": handlePlayBackEvent : Setting state to init");r.currentState.timeUpdateClockTime=u;r.currentState.timeUpdateStreamTime=0;r.currentState.lastEventClockTime=u;r.isPlaylist=!0;break;case f.pause:r.pauseDuration+=v;r.pauseIntervalsAsString!="-"?r.pauseIntervalsAsString+=","+o.pauseStartStreamTime+":"+(u-o.pauseStartClockTime):r.pauseIntervalsAsString=o.pauseStartStreamTime+":"+(u-o.pauseStartClockTime);r.pauseSeekSession!="-"?r.pauseSeekSession+=",R("+o.pauseStartStreamTime+":"+h+")":r.pauseSeekSession="R("+o.pauseStartStreamTime+":"+h+")";r.updatePlayed(o.pauseStartStreamTime,a);r.currentState.lastEventClockTime=u;++r.resumeBufferCount;o.state=f.resumeBuffering;break;case f.init:r.iLineSentTime||(r.iLineSentTime=u);!r.loadStartILine||r.canPlayEventAutoPlay||r.canPlayUpdated||(r.iLineSentTime=u,r.canPlayUpdated=!0)}}catch(c){t("Exception,  handle Play Event:"+c)}}function lt(n,i){var e,c;if(it(n)){t("handle Playing Event : video tag is of type AD, return");return}try{if(e=b(i),c=bi(r),!n.objectBased&&!c){t("handle playing event, video is null");return}au(n,"playing",c,e);var h=parseInt(nt(n)),u=n.akamai,o=u.currentState,s=e-o.lastEventClockTime,v=e-u.startTimer,a=o.state;t("entered function handle Playing Event, current State = "+dt(o.state));switch(a){case f.rebuffering:u.rebufferTime+=s;u.curRebufferTime+=s;u.rebufferSessionArrayHLine&&u.rebufferSessionArrayHLine.push(e);try{or(u,e);u.curRebufferTime=0}catch(l){t("Error...Play"+l.message)}break;case f.pause:case f.resumeBuffering:u.resumeBufferTime+=s;s==0&&u.resumeBufferCount>0&&--u.resumeBufferCount;break;case f.init:ns(n,s,e,h);g.currentStartPos=h;break;case f.ended:t("handle Playing Event : dispatch play and playing event");ct(n,e);lt(n,e);break;case f.playing:u.updatePlayClockTime(s,o.lastEventClockTime,e);break;case f.seek:e-o.timeUpdateClockTime>0&&(oi(u,e,h,"S"),u.updatePlayed(o.seekStartStreamPos,h))}o.state=f.playing;o.lastEventClockTime=e}catch(l){t("Exception,  handle Playing Event:"+l)}}function yu(n,i){var r;if(it(n)){t("handleWaitingEvent : video tag is of type AD, return");return}try{if(r=n.akamai,r.currentState.state==f.rebuffering){t("already inside handleWaiting Event");return}var e=b(i),o=parseInt(nt(n)),u=r.currentState,s=e-u.lastEventClockTime,l=e-r.startTimer,h=u.state;t("entered function handle Waiting Event, current state = "+dt(u.state));switch(h){case f.playing:r.updatePlayClockTime(s,u.lastEventClockTime,e);++r.rebufferCount;r.rebufferCount==1&&r.playerState!="B"&&(r.firstRebufferStartEpoch=Math.round(e));r.rebufferSessionArrayHLine&&(t("handleWaitingEvent : pushing, rebufferSessionArrayHLine"+e),r.rebufferSessionArrayHLine.push(e));r.updatePlayed(o);u.state=f.rebuffering;break;case f.pause:++r.resumeBufferCount;u.state=f.resumeBuffering}u.lastEventClockTime=e;t("handle waiting event, if seek starts, stream pos = "+o);u.seekStartStreamPos=o}catch(c){t("Exception,  handleWaitingEvent:"+c)}}function pu(n,i){var c;if(it(n)){t("handle Error Event : video tag is of type AD, return");return}try{var r=b(i),o=bi(n),s=nu(n);if(!n.objectBased&&!o){t("handle error event, video is null");return}if(ue(n,"error",o,r)){t("handle Error Event: consecutive error events thrown, return, curTime = "+r);return}n&&n.akamai&&!n.akamai.isILineSent&&(t("handle Error Event: calling handle Play Event"),ct(n,r));au(n,"error",o,r);var a=parseInt(nt(n)),e=n.akamai,u=e.currentState,h=r-u.lastEventClockTime,v=r-e.startTimer,y=u.state;if(t("entered function handle Error Event, current state = "+dt(u.state)),u.state==f.playing&&e.updatePlayClockTime(h,u.lastEventClockTime,r),e.isELineSent||e.isCLineSent)return;vf(n,s,r);u.state=f.ended;c=parseInt(p("HTML_LastCLineTime"));re(n);u.lastEventClockTime=r}catch(l){t("Exception,  handleErrorEvent:"+l)}}function ee(n,i){var r,e;if(it(n)){t("handle Ended Event WithDelay : video tag is of type AD, return");return}try{r=n.akamai;e=r.currentState;t("entered function handle Ended Event WithDelay, current state"+dt(e.state));var f=b(i),h=sf(n),o=f-e.lastEventClockTime;if(r.pollingTimer&&l(r.pollingTimer),u&&u.retryTimer&&l(u.retryTimer),r.hLineTimer&&l(r.hLineTimer),r.fastTCPServerIpTimer&&l(r.fastTCPServerIpTimer),r.firstPLineTimer&&l(r.firstPLineTimer),u&&u.retryTimer&&l(u.retryTimer),r.postRollTimer){t("handle Ended Event WithDelay: postRollTimer already started return");return}gf(r,"complete");df(r);kf(r);r.postRollTimer=rt(ii,1e3,[n]);bf(r);r.customDataPopulated=!0;dr(r,f);ou(n,o,f,!0);r.playEndMetricsUpdated=!0}catch(s){t("Exception,  handle Ended Event WithDelay"+s);ii(n,f)}}function ii(n,i){var r,o,h;try{if(r=n.akamai,r.postRollTimer&&(l(r.postRollTimer),delete r.postRollTimer),r.isELineSent||r.isCLineSent){t("handle Ended Event : already sent C line, return");return}var u=b(i),a=parseInt(nt(n)),e=r.currentState,s=u-e.lastEventClockTime,v=u-r.startTimer,y=e.state;t("entered function handle Ended Event, current state"+dt(e.state));r.playEndMetricsUpdated||(ou(n,s,u,!0),r.playEndMetricsUpdated=!0);e.state=f.ended;o=sf(n);r.streamTitleSwitchReason!=null&&r.streamTitleSwitchReason!=""&&(o=r.streamTitleSwitchReason);ru(n,o,!1,u);h=parseInt(p("HTML_LastCLineTime"));re(n);e.lastEventClockTime=u}catch(c){t("Exception,  handle Ended Event :"+c)}}function yr(n,i){try{if(r&&r.akamai&&r.akamai.isSLineSent?t("setData() API called after 'Start Of Play' for dimension -> "+n+"|All custom dimensions should be set before the play is initiated.","WARN"):t("Set Data("+n+":"+i+")"),n=="customDataObject")oe(i);else if(n=="customDataFunction")tr=i;else{try{i!=null&&(i=i.trim())}catch(u){}(n=="viewerId"||n=="viewerDiagnosticsId")&&(i==null||i=="")&&(i="-");try{bt&&n.substring(0,4)=="_cd_"&&of(n)}catch(u){}try{n.indexOf("std:")!=-1?at[n.substring(4)]=i:e[n]=i}catch(u){e[n]=i}(n.indexOf("socialShare:")!=-1||n.indexOf("feedback:")!=-1)&&se()}}catch(u){t("Exception, Set Data :"+u)}}function oe(n){try{if(typeof n=="object")for(var i in n)yr(i,n[i])}catch(r){t("Exception set custom data object"+r)}}function gs(n){var t=r.akamai;t.streamTitleSwitchReason="Stream.Switched";ii(r,n)}function nh(n,i){var f,u;r.akamai.streamTitleSwitchReason="Title.Switched";f=r.akamai.isFirstTitle;ii(r,i);try{if(n!=null&&n!="")for(u in n)yr(u,n[u])}catch(e){t("Exception, handle title switch:"+e)}r.akamai.isFirstTitle=f;ct(r,i);lt(r,i);try{r.akamai.currentState.timeUpdateStreamTime=parseInt(nt(r))}catch(e){t("Exception,  handleTitleSwitch"+e)}}function se(){var n,u;try{var i="feedback:",f=i.length,r=!1,s=b();for(n in e)n.indexOf(i)!=-1&&(u=n.substring(f),e[u]=e[n],delete e[n],r=!0);ss();t("handleFeedbackEvent");o&&o.shouldSendFLine&&o.akamai&&(o.akamai.isCLineSent||o.akamai.postRollTimer)&&(r&&(o.akamai.customDataChanged=!0),o.fLineCount<o.limit&&yt(o,"feedback",!1,s),++o.fLineCount,o.akamai.customDataChanged=!1,o.akamai.socialSharing=null)}catch(h){t("Exception, handle feed back event :"+h)}}function th(){try{r.objectBased||(t("application exit, unsubscribe video events"),kh(r))}catch(n){}pt()}function wu(n){if(!it(n))try{if(ir){t("handle time update event, return as inside background state for idevice");return}var e=b(null,!0),s=parseInt(nt(n)),u=n.akamai;if(!u)return;if(u.postRollTimer)return;var r=u.currentState,c=e-r.lastEventClockTime,l=e-u.startTimer,a=r.state,o=s-r.timeUpdateStreamTime;r.timeUpdateStreamTime!=0&&(Math.abs(o)>=i.seekThreshold&&u.isSLineSent?(t("stream diff in time update is "+o),ds(n,e,s)):o>0&&o<=750&&(n.objectBased?r.state==f.seek&&lt(n):u.isSLineSent&&r.state!=f.seek&&r.state!=f.rebuffering||(t("handle time update event,  dispatching playing event,  current Video state is : "+dt(r.state)),lt(n))));r.timeUpdateClockTime=e;r.timeUpdateStreamTime=s}catch(h){t("Exception,  handleTimeupddate :"+h)}}function ih(n,i,r){try{var f=u.aisRequestLimit,e=u.aisRequestInterval;if(u=new uf,u.aisRequestInterval=e,u.aisRequestLimit=f,!n){t("return from ais, platform is null");return}u.platform=n;u.version=i?i:"1.0";r&&(u.aisCustomDataObj=r);u.requestUrl="http://idp.securetve.com/rest/";u.initUrl=u.requestUrl+u.version+"/"+u.platform+"/init/?format=jsonp&responsefield=akaMediaAnalytics.receiveAISInitRequest";u.identityUrl=u.requestUrl+u.version+"/"+u.platform+"/identity/?format=jsonp&responsefield=akaMediaAnalytics.receiveAISIdentityRequest";u.initUrlId="AkamaiAISInitUrl";u.identityUrlId="AkamaiAISIdentityUrl";pi(u.initUrl,u.initUrlId)}catch(o){u.requestFailed=!0}}function rh(){var n={},i,r,f;try{if(u&&u.aisCustomDataObj){u.akamai||(u.akamai={});for(f in u.aisCustomDataObj)if(i=u.aisCustomDataObj[f].split("/"),i[0]=="INIT"&&u.initObj?n=u.initObj:i[0]=="IDENTITY"&&u.identityObj&&(n=u.identityObj),n){for(r=1;r<i.length;r++)i[r]&&n[i[r]]&&(n=n[i[r]]);typeof n!="object"&&(u.akamai[f]=n)}}}catch(e){t("Exception,  populateAISCustomData"+e)}}function pi(n,i){try{var r=document.createElement("script");r.setAttribute("src",n);r.id=i;document.getElementsByTagName("head")[0].appendChild(r)}catch(u){t("Exception,  loading JavaScript File "+n)}}function he(n){try{var i=document.getElementById(n);i.parentNode.removeChild(i)}catch(r){t("Exception,  removing script with id "+n)}}function ce(n){var t;t=n.akamai;t.pollingTimer=rt(ce,br,[n]);n&&(n.isBrightcoveVideo?akamaiBCVideoModule.getVideoPosition(!1,le):le(0,n))}function le(n,i){var o,u,s=b(null,!0),e;if((r!=null&&r.isBrightcoveVideo?(r.currentTime=parseInt(n),u=parseInt(n*1e3),i=r):u=parseInt(nt(i)),u!="undefined"&&!isNaN(u)&&u!="")&&(o=i.akamai,e=o.currentState,e.state!=f.ended))if(i.objectBased)wu(i);else{if(e.state==f.pause||e.state==f.seek)return;u!=0&&u===e.pollingTimerStreamTime&&e.state!=f.rebuffering?(t("check stream head position, call handle waiting event"),yu(i)):e.pollingTimerStreamTime=u}}function nt(t){var i=0;try{t.objectBased?n&&n.streamHeadPosition&&(i=n.streamHeadPosition(),t.currentTime=i):ut.currentTime&&(i=ut.currentTime,t.currentTime=i)}catch(r){}return i==0&&vi!=-1&&(i=vi),i!=0&&(vi=i),i*1e3}function wi(t){var i=0;try{t&&(t.objectBased?n&&n.streamLength&&(i=n.streamLength(),t.duration=i):(i=ut.duration,t.duration=i))}catch(r){}return i*1e3}function bi(t){var i="";try{t&&(t.objectBased?n&&n.streamURL&&(i=n.streamURL(),t.currentSrc=i):(i=ut.currentSrc,t.currentSrc=i))}catch(r){}return i}function uh(t){var i=0,r=0;try{t&&t.objectBased&&n&&n.bytesLoaded&&(i=parseInt(n.bytesLoaded()),r=i-t.akamai.lastBytesLoaded)}catch(u){}return t.akamai.lastBytesLoaded=i,r>0?r:void 0}function bu(){try{var n={};tr!=null&&(n=tr(),oe(n))}catch(t){}}function ae(n,i){var u,e,f;try{t("handle Ad loaded");s.isAdLoaded&&t("handleAdLoaded API is called multiple times.|We have identified that 2 successive handleAdLoaded APIs are called.|Kindly ensure that sequence of Ad calls -- handleAdLoaded->handleAdStarted->handleAdComplete is maintained.","WARN");u=r.akamai;u.isILineSent||(e=(new Date).getTime(),i!=null&&e-i>0);f=b(i);s.clearAdAnalytics();s.isAdLoaded=!0;s.adLoadTime=f;s.adCount=1;s.adAbandoned=!0;u.postRollTimer?(iu(r),l(u.postRollTimer),u.postRollAd=!0,u.customDataPopulated=!1,s.type=2):u.isILineSent&&(u.isSLineSent?(vu(r,f),s.type=1):u.isSLineSent||u.adLoadTime||(u.adLoadTime=f));ku(n);u.isILineSent||ko(!1,f)}catch(o){t("Exception,handle ad loaded:"+o)}}function fh(n,i){try{t("handle Ad Started");var u=b(i);s.isAdStarted=!0;s.isAdLoaded||(t("handleAdLoaded API is missing.|We have identified that handleAdStarted API is called without handleAdLoaded.|Kindly ensure that handleAdLoaded API is called for every Ad and relevant adObject is passed as an argument.","WARN"),ae(n,u));s.playBucket="0";s.adStartTime=u;s.adStartupTime=u-s.adLoadTime;s.startPos=nt(r);ku(n)}catch(f){t("Exception,handle ad started:"+f)}}function eh(n){try{t("handleAdEnded");s.playBucket=="0"&&t("Ad Progress related APIs not called.|We have identified that handleAdFirstQuartile,handleAdMidPoint & handleAdThirdQuartile APIs have not been called.|It will be good if these APIs are called in order to capture more accurate Ad information","WARN");s.playBucket="4";pr("0",n)}catch(i){t("Exception,handle ad completed:"+i)}}function oh(){s.isAdStarted||t("handleAdStarted API is missing.|We have identified that handleAdFirstQuartile API is called without handleAdStarted.|Kindly ensure that handleAdStarted API is called for every Ad that starts successfully.","ERROR");s.playBucket="1"}function sh(){s.playBucket="2"}function hh(){s.playBucket="3"}function ch(n){pr("1",n)}function lh(n){pr("3",n)}function ku(n){var r,i;try{for(r=s.setDataArr,t("populate ad metric"),i=0;i<r.length;i++)r[i]in n&&(s[r[i]]=n[r[i]])}catch(u){}}function pr(n,i){var f,u,o,e;try{for(f=b(i),u=r.akamai,s.endStatus=n,n!="0"&&(s.adAbandonCount=1),s.isAdLoaded&&s.isAdStarted&&(s.adPlayClockTime=f-s.adStartTime),s.adSession=ah(),o=["adStartupTime","adCount","adPlayClockTime","adAbandonCount"],e=0;e<o.length;e++)u[o[e]]+=s[o[e]];u.adSession?u.adSession+=","+s.adSession:u.adSession=s.adSession;s.isAdStarted=!1;s.isAdLoaded=!1;n!="2"&&(s.adAbandoned=!1,u&&(u.postRollAd?(u.postRollAd=null,ii(r,f)):u.isSLineSent?(ct(r,f),lt(r,f)):u.isSLineSent||(u.adEndTime=f)))}catch(h){t("Exception,populate ad end:"+h)}}function ah(){var t="",i=["adId","type","startPos","adStartupTime","adPlayClockTime","playBucket","endStatus","adDuration","adTitle","adCategory","adPartnerId","adServer","adDaypart","adIndustryCategory","adEvent"],n;try{for(n=0;n<i.length;n++)t+=s[i[n]]==0||s[i[n]]!=null&&s[i[n]]!=""?s[i[n]]+":":":";t=t.substring(0,t.length-1)}catch(r){}return t}function vh(n){try{if(it(n))return;var t=n.akamai;t.firstTimeProgress}catch(i){}}function yh(n){try{if(it(n))return;var t=n.akamai;ut.autoplay&&(ct(n),t.loadStartILine=!0)}catch(i){}}function ph(n){try{if(it(n))return;var t=n.akamai;t.canPlayEventAutoPlay=ut.autoplay?!0:!1}catch(i){}}function wh(n){try{if(it(n))return;var t=n.akamai;t.firstTimeProgress&&(t.firstTimeProgress=!1);t.logType=="R"}catch(i){}}function bh(n){try{if(it(n))return;var t=n.akamai;t.streamLength=parseInt(wi(n))}catch(i){}}function du(n){t("subscribeToEvents : video = "+n);ut=n;try{n.addEventListener("play",v.play=function(){ct(r)},!1);n.addEventListener("pause",v.pause=function(){vu(r)},!1);n.addEventListener("error",v.error=function(){pu(r)},!1);n.addEventListener("ended",v.ended=function(){ee(r)},!1);n.addEventListener("playing",v.playing=function(){lt(r)},!1);n.addEventListener("waiting",v.waiting=function(){yu(r)},!1);n.addEventListener("timeupdate",v.timeupdate=function(){wu(r)},!1);n.addEventListener("load",v.load=function(){vh(r)},!1);n.addEventListener("progress",v.progress=function(){wh(r)},!1);n.addEventListener("durationchange",v.durationchange=function(){bh(r)},!1);n.addEventListener("canplay",v.canplay=function(){ph(r)},!1);n.addEventListener("loadstart",v.loadstart=function(){yh(r)},!1);t("subscribed to events completed")}catch(i){t("Exception,  subscribeToEvents,unable to add listeners to video tag :"+i)}}function kh(n){try{n.removeEventListener("play",v.play,!1);n.removeEventListener("pause",v.pause,!1);n.removeEventListener("error",v.error,!1);n.removeEventListener("ended",v.ended,!1);n.removeEventListener("playing",v.playing,!1);n.removeEventListener("waiting",v.waiting,!1);n.removeEventListener("timeupdate",v.timeupdate,!1);n.removeEventListener("load",v.load,!1);n.removeEventListener("progress",v.progress,!1);n.removeEventListener("durationchange",v.durationchange,!1);n.removeEventListener("canplay",v.canplay,!1);n.removeEventListener("loadstart",v.loadstart,!1)}catch(i){t("Exception, unSubscribeFrom Events:"+i)}}function ki(n){var i,u;try{if(typeof akamaiBCVideoObject!="undefined")ut=akamaiBCVideoObject,r.isBrightcoveVideo=!0,initBrightcove();else if(!r.objectBased&&!r.videoPassed&&document){for(i=document.getElementsByTagName("video"),t("add MediaEvent Listeners : videos.length "+i.length),i&&i.length==0&&(i=document.getElementsByTagName("audio")),u=0;u<i.length;++u)du(i[u]);document.addEventListener("DOMNodeInserted",gu,!1);document.addEventListener("DOMNodeRemoved",gu,!1);document.addEventListener("DOMAttrModified",gu,!1)}n&&(n.type=="DOMContentLoaded"?document.removeEventListener("load",ki,!0):n.type=="load"&&i&&i.length>0&&document.removeEventListener("load",ki,!0))}catch(f){t("Exception,  add MediaEvent Listeners :"+f)}}function gu(n){var t=n.target;if(t.nodeType!=t.COMMENT_NODE&&t.tagName!=null&&(t.tagName.toLowerCase()=="video"||t.tagName.toLowerCase()=="audio"))switch(n.type){case"DOMNodeRemoved":t.dataset&&t.dataset.isad&&t.dataset.isad=="true"||di(r,0);break;case"DOMNodeInserted":du(t)}}function di(n,r){var h,c,e;t("handle Video Unload");var o=b(),u=n.akamai,e=parseInt(p("HTML_VisitCountCookie"));w.browserClose=!0;try{if(u&&u.currentState.state>=f.init&&r==0){if(u.isELineSent||u.isCLineSent)return;s&&s.adAbandoned?(h="Ad.Abandon",u.postRollTimer&&(l(u.postRollTimer),delete u.postRollTimer),ru(n,h,!0,o)):u.firstTimePlay?(c="Browser.Refresh.NoStart",o-u.startTimer>i.initBrowserCloseTime&&(c="Browser.Refresh.NoStart.Late"),vf(n,c,!0,o)):(h="Browser.Close",u.postRollTimer&&(l(u.postRollTimer),delete u.postRollTimer),ru(n,h,!0,o))}}catch(k){}try{var y=parseInt(p("HTML_LastCLineTime")),a=y+i.visitTimeout-o,v=parseInt(p("HTML_isPlayingCount"));if(t("handle Video Unload: playing cookie =  "+v+", visit cookie :"+e),e>=1&&r==1){if(a>0){l(u.clearVisitTimeoutId);n.akamai.clearVisitTimeoutId=rt(di,a,[n,1]);return}if(a<=0&&e>1&&v>0){l(u.clearVisitTimeoutId);n.akamai.clearVisitTimeoutId=rt(di,i.visitTimeout,[n,1]);return}}t("handle Video Unload: decrementing HTML_VisitCountCookie");e=e-1;d("HTML_VisitCountCookie",e);e=parseInt(p("HTML_VisitCountCookie"));(e===0||isNaN(e))&&u.sendVLine&&is(n,o)}catch(k){}}function pt(){try{s.isAdLoaded&&pr("2")}catch(n){}di(r,0)}function dh(){t("handlePagehide");ir=!0;pt()}function gh(n){t("handlePageshow:");try{r&&r.tagName&&(t("handlePageShow: media tag is :"+r.tagName),r.akamai&&ir&&(t("handlePageshow: send play and playing on timeupdate"),ye=!0))}catch(n){t("Exception,  handlePagehsow : "+n)}ir=!1}function p(n){var t=n+"=",i="";try{document.cookie.length>0&&(offset=document.cookie.indexOf(t),offset!=-1&&(offset+=t.length,end=document.cookie.indexOf(";",offset),end==-1&&(end=document.cookie.length),i=document.cookie.substring(offset,end)))}catch(r){}return i}function gt(n){var r,t,i;try{for(r=location.pathname.split("/"),t=" path=",document.cookie=n+"=; expires=Thu, 01-Jan-70 00:00:01 GMT;",i=0;i<r.length;i++)t+=(t.substr(-1)!="/"?"/":"")+r[i],document.cookie=n+"=; expires=Thu, 01-Jan-70 00:00:01 GMT;"+t+";"}catch(u){}}function d(n,t,i){var u,r;try{u=n+"="+t+";Path=/;";i&&parseInt(i)>0&&(r=new Date,r.setDate(r.getDate()+parseInt(i)),r!=null&&(u+="expires="+r.toUTCString()+";"));document&&(document.cookie=u)}catch(f){}}function nc(){try{if(a=="iPad"||a=="iPhone")return!0}catch(n){return!1}}function tc(){try{r.objectBased||r.videoPassed?ki():(t("adding MediaEventListeners: DOMContentLoaded"),document.addEventListener("DOMContentLoaded",ki,!1),t("adding MediaEventListeners: Load"),document.addEventListener("load",ki,!0))}catch(n){t("Exception,  Addding DOMContentLoaded and Load event listeners :"+n)}if(window)if(nc())window.addEventListener("pagehide",dh,!1),window.addEventListener("pageshow",gh,!1);else if(typeof akamaiBCVideoObject!="undefined"&&window.addEventListener)window.addEventListener("beforeunload",pt,!1);else if(window.addEventListener)try{fr()?window.parent.addEventListener("beforeunload",pt,!1):window.addEventListener("beforeunload",pt,!1)}catch(n){t("Exception, add window document listeners : "+n);window.addEventListener("beforeunload",pt,!1)}else if(window.attachEvent)try{fr()?window.parent.attachEvent("onbeforeunload",pt):window.attachEvent("onbeforeunload",pt)}catch(n){window.attachEvent("onbeforeunload",pt)}}var ri="3.8.8",hi=hi||function(n,t){var r={},u=r.lib={},f=u.Base=function(){function n(){}return{extend:function(t){n.prototype=this;var i=new n;return t&&i.mixIn(t),i.$super=this,i},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var t in n)n.hasOwnProperty(t)&&(this[t]=n[t]);n.hasOwnProperty("toString")&&(this.toString=n.toString)},clone:function(){return this.$super.extend(this)}}}(),i=u.WordArray=f.extend({init:function(n,i){n=this.words=n||[];this.sigBytes=i!=t?i:4*n.length},toString:function(n){return(n||c).stringify(this)},concat:function(n){var i=this.words,r=n.words,u=this.sigBytes,n=n.sigBytes,t;if(this.clamp(),u%4)for(t=0;t<n;t++)i[u+t>>>2]|=(r[t>>>2]>>>24-8*(t%4)&255)<<24-8*((u+t)%4);else if(65535<r.length)for(t=0;t<n;t+=4)i[u+t>>>2]=r[t>>>2];else i.push.apply(i,r);return this.sigBytes+=n,this},clamp:function(){var i=this.words,t=this.sigBytes;i[t>>>2]&=4294967295<<32-8*(t%4);i.length=n.ceil(t/4)},clone:function(){var n=f.clone.call(this);return n.words=this.words.slice(0),n},random:function(t){for(var r=[],u=0;u<t;u+=4)r.push(4294967296*n.random()|0);return i.create(r,t)}}),e=r.enc={},c=e.Hex={stringify:function(n){for(var r,u=n.words,n=n.sigBytes,i=[],t=0;t<n;t++)r=u[t>>>2]>>>24-8*(t%4)&255,i.push((r>>>4).toString(16)),i.push((r&15).toString(16));return i.join("")},parse:function(n){for(var r=n.length,u=[],t=0;t<r;t+=2)u[t>>>3]|=parseInt(n.substr(t,2),16)<<24-4*(t%8);return i.create(u,r/2)}},s=e.Latin1={stringify:function(n){for(var r=n.words,n=n.sigBytes,i=[],t=0;t<n;t++)i.push(String.fromCharCode(r[t>>>2]>>>24-8*(t%4)&255));return i.join("")},parse:function(n){for(var r=n.length,u=[],t=0;t<r;t++)u[t>>>2]|=(n.charCodeAt(t)&255)<<24-8*(t%4);return i.create(u,r)}},l=e.Utf8={stringify:function(n){try{return decodeURIComponent(escape(s.stringify(n)))}catch(t){throw Error("Malformed UTF-8 data");}},parse:function(n){return s.parse(unescape(encodeURIComponent(n)))}},o=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=i.create();this._nDataBytes=0},_append:function(n){"string"==typeof n&&(n=l.parse(n));this._data.concat(n);this._nDataBytes+=n.sigBytes},_process:function(t){var e=this._data,s=e.words,u=e.sigBytes,o=this.blockSize,f=u/(4*o),f=t?n.ceil(f):n.max((f|0)-this._minBufferSize,0),t=f*o,u=n.min(4*t,u),r;if(t){for(r=0;r<t;r+=o)this._doProcessBlock(s,r);r=s.splice(0,t);e.sigBytes-=u}return i.create(r,u)},clone:function(){var n=f.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0}),h;return u.Hasher=o.extend({init:function(){this.reset()},reset:function(){o.reset.call(this);this._doReset()},update:function(n){return this._append(n),this._process(),this},finalize:function(n){return n&&this._append(n),this._doFinalize(),this._hash},clone:function(){var n=o.clone.call(this);return n._hash=this._hash.clone(),n},blockSize:16,_createHelper:function(n){return function(t,i){return n.create(i).finalize(t)}},_createHmacHelper:function(n){return function(t,i){return h.HMAC.create(n,i).finalize(t)}}}),h=r.algo={},r}(Math),ui,f,vr;if(function(){var i=hi,t=i.lib,u=t.WordArray,t=t.Hasher,n=[],r=i.algo.SHA1=t.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,i){for(var e,r=this._hash.words,h=r[0],f=r[1],o=r[2],s=r[3],c=r[4],u=0;80>u;u++)16>u?n[u]=t[i+u]|0:(e=n[u-3]^n[u-8]^n[u-14]^n[u-16],n[u]=e<<1|e>>>31),e=(h<<5|h>>>27)+c+n[u],e=20>u?e+((f&o|~f&s)+1518500249):40>u?e+((f^o^s)+1859775393):60>u?e+((f&o|f&s|o&s)-1894007588):e+((f^o^s)-899497514),c=s,s=o,o=f<<30|f>>>2,f=h,h=e;r[0]=r[0]+h|0;r[1]=r[1]+f|0;r[2]=r[2]+o|0;r[3]=r[3]+s|0;r[4]=r[4]+c|0},_doFinalize:function(){var n=this._data,t=n.words,r=8*this._nDataBytes,i=8*n.sigBytes;t[i>>>5]|=128<<24-i%32;t[(i+64>>>9<<4)+15]=r;n.sigBytes=4*t.length;this._process()}});i.SHA1=t._createHelper(r);i.HmacSHA1=t._createHmacHelper(r)}(),function(){var n=hi,t=n.enc.Utf8;n.algo.HMAC=n.lib.Base.extend({init:function(n,i){var u,f;n=this._hasher=n.create();"string"==typeof i&&(i=t.parse(i));u=n.blockSize;f=4*u;i.sigBytes>f&&(i=n.finalize(i));for(var e=this._oKey=i.clone(),o=this._iKey=i.clone(),s=e.words,h=o.words,r=0;r<u;r++)s[r]^=1549556828,h[r]^=909522486;e.sigBytes=o.sigBytes=f;this.reset()},reset:function(){var n=this._hasher;n.reset();n.update(this._iKey)},update:function(n){return this._hasher.update(n),this},finalize:function(n){var t=this._hasher,n=t.finalize(n);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}(),function(){var t=hi,n=t.lib,i=n.Base,r=n.WordArray,n=t.algo,u=n.HMAC,f=n.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:n.SHA1,iterations:1}),init:function(n){this.cfg=this.cfg.extend(n)},compute:function(n,t){for(var s,y,f,i=this.cfg,e=u.create(i.hasher,n),o=r.create(),c=r.create([1]),p=o.words,w=c.words,l=i.keySize,i=i.iterations;p.length<l;){s=e.update(t).finalize(c);e.reset();for(var a=s.words,b=a.length,h=s,v=1;v<i;v++)for(h=e.finalize(h),e.reset(),y=h.words,f=0;f<b;f++)a[f]^=y[f];o.concat(s);w[0]++}return o.sigBytes=4*l,o}});t.PBKDF2=function(n,t,i){return f.create(i).compute(n,t)}}(),ui=!1,window)try{ui=window.XDomainRequest?!0:!1}catch(ve){ui=!1}var e={},at={},tr=null,nf={eventCode:"",beaconId:"",sequenceId:"",logType:"",endOfStream:"",logVersion:"",formatVersion:"",visitId:"",errorCode:"",partNumber:"",totalParts:"",hostName:"",streamName:"",port:"",protocol:"",userAgent:"",playerType:"",os:"",format:"",connectTime:"",bufferingTime:"",startupTime:"",streamLength:"",bytesTotal:"",browser:"",browserSize:"",videoSize:"",streamUrl:"",deliveryType:"",pluginVersion:"",beaconVersion:"",serverIp:"",playerFormat:"",outlierStartupTime:"",isFirstTitle:"",rebufferSessionH:"",sequenceIdH:"",isSessionWithRebufferH:"",playerState:"",currentStreamTime:"",currentClockTime:"",playClockTime:"",playStreamTime:"",rebufferCount:"",rebufferTime:"",pauseCount:"",pauseDuration:"",pauseIntervalsAsString:"",seekCount:"",seekTime:"",seekIntervalsAsString:"",pauseSeekSession:"",resumeBufferCount:"",resumeBufferTime:"",isView:"",isSessionWithRebuffer:"",logInterval:"",rebufferSession:"",socialSharing:"",endReasonCode:"",totalPlayClockTime:"",totalPlayStreamTime:"",totalRebufferCount:"",totalRebufferTime:"",totalAdPlayClockTime:"",totalAdStartCount:"",totalAdAbandonCount:"",lastHTime:"",isVisitStart:"",isVisitEnd:"",visitAttempts:"",visitPlays:"",visitViews:"",visitErrors:"",visitInterval:"",visitPlayClockTime:"",visitPlayStreamTime:"",visitRebufferCount:"",visitRebufferTime:"",visitStartupErrors:"",visitAdPlayClockTime:"",visitAdStartCount:"",visitAdAbandonCount:"",visitUniqueTitles:"",adAbandonCount:"",adPauseTime:"",adStartupTime:"",adPlayClockTime:"",adCount:"",adSession:"",sessionId:"",attemptId:"",playerReferrer:"",ais_idpId:"",ais_idpName:"",ais_idpDisplayName:"",ais_idpUrl:"",ais_queryToken:"",ais_aisuid:"",qualityOfExperience:"",transitionStreamTimeSession:"",transitionUpSwitchCount:"",transitionDownSwitchCount:"",averagedBitRate:"",fullOs:""},ci={title:!1,category:!1,subCategory:!1,show:!1,contentLength:!1,contentType:!1,device:!1,deliveryType:!1,playerId:!1,eventName:!1},r={},ut={};r.isBrightcoveVideo=!1;r.objectBased=!1;r.videoPassed=!1;var ir=!1,ye=!1,pe=!1,tt={},v={},bt=!1,li=[],w={timer:null,queue:[],browserClose:!1,enabled:!0,time:250},c={},we=[],rr={},ai={},i={};i.seekThreshold=2e3;i.visitTimeout=36e5;var h={},ur={},wr={},ft={},br=100,fi={},ei=!1,tf=!1,st={fastTCPFailed:!1,fastTCPEnabled:!1},ht=[],o={};o.dataSent={};var rf=1,vi=-1,et={},ni=[],y={pageURLCsmaDebug:0,configURLCsmaDebug:0,configDebug:0,windowOpened:!1,logStoredMsg:!0,printException:!1};var u=new uf,s={setDataArr:["adId","adDuration","adTitle","adCategory","adPartnerId","adServer","adDaypart","adIndustryCategory","adEvent"],clearAdAnalytics:function(){this.isAdLoaded=!1;this.isAdStarted=!1;this.id="";this.type="0";this.startPos="0";this.playBucket="-1";this.endStatus="2";this.adLoadTime=null;this.adStartTime=null;this.adStartupTime="0";for(var n=0;n<this.setDataArr.length;n++)this[this.setDataArr[n]]=""}},g={bitRateArr:[],currentBitRate:"-",currentStartPos:0,bitRateCount:{},bitRatePlayTime:{},bitRateBucketMap:{},clearBitRate:function(){this.bitRateArr=[];this.currentBitRate="-";this.bitRateCount={};this.bitRatePlayTime={}},updateBitRateArr:function(n){if(this.bitRateArr.length>0){var i=this.bitRateArr.length,t=g.bitRateArr[i-1];this.currentBitRate==t.bitRate?t.playTime+=n:this.pushInBitRateArr(n,this.currentBitRate,this.currentStartPos)}else this.pushInBitRateArr(n,this.currentBitRate,this.currentStartPos)},pushInBitRateArr:function(n,t,i){this.bitRateArr.push({bitRate:t,playTime:n,startPos:i})},populateBitRateBucketMap:function(n,t){var i,r=!1,f=ft.bitRateBucketTimes,u;n!="-"&&n!==""&&(n=parseInt(n/1e3));for(u in f)if(r=!1,i=f[u],n=="-"||n===""||n<0){if(!i.max&&!i.min){r=!0;break}}else if(i.max&&i.min){if(n>=i.min&&n<i.max){r=!0;break}}else if(i.max){if(n<i.max){r=!0;break}}else if(i.min&&n>=i.min){r=!0;break}r&&(this.bitRateBucketMap[u]+=t)},findMaxPersistentBitRate:function(){var n,r,i;try{if(this.bitRatePlayTime){n=0;r=-1;for(i in this.bitRatePlayTime)this.bitRatePlayTime[i]>r&&(r=this.bitRatePlayTime[i],n=i);if(n!==0)return n}}catch(u){t("Exception, find max persistent bit rate")}},getTransitionSession:function(n){try{var f=null,i,r,e="",u=0,h,c=0,o=0,s=!0;this.bitRateArr.length>0&&(i=this.bitRateArr[0],i.bitRate=="-"&&(s=!1,this.bitRateArr[1]&&this.bitRateArr[1].bitRate!="-"&&(s=!0,this.bitRateArr[1].startPos=this.bitRateArr[0].startPos,this.bitRateArr[1].playTime+=this.bitRateArr[0].playTime,this.bitRateArr.shift())));for(r in this.bitRateBucketMap)this.bitRateBucketMap[r]=0;for(u=0;u<this.bitRateArr.length;u++){i=this.bitRateArr[u];i.bitRate in this.bitRateCount?u!=0&&this.bitRateCount[i.bitRate]++:this.bitRateCount[i.bitRate]=1;i.bitRate!=""&&i.bitRate!="-"&&(i.bitRate in this.bitRatePlayTime?this.bitRatePlayTime[i.bitRate]+=i.playTime:this.bitRatePlayTime[i.bitRate]=i.playTime);h=this.bitRateCount[i.bitRate];f?f+=","+i.bitRate+":"+i.startPos+":"+i.playTime+"::"+h:f=i.bitRate+":"+i.startPos+":"+i.playTime+"::"+h;this.populateBitRateBucketMap(i.bitRate,i.playTime);try{s&&(c+=i.bitRate*i.playTime,o+=i.playTime)}catch(l){}}n.maxPersistentBitRate=this.findMaxPersistentBitRate();n.transitionStreamTimeSession=f;for(r in this.bitRateBucketMap)e?e+=","+r+":"+this.bitRateBucketMap[r]:e=r+":"+this.bitRateBucketMap[r];n.bitRateBucketTimes=e;try{n.averagedBitRate=s&&o&&o!=0?c+":"+o:null}catch(l){}}catch(l){t("Exception, get transition Session :"+l)}}},kr="",ic=function(){var u,e,o,s,h;if(typeof akamaiBCVideoObject!="undefined")try{var i=document.getElementsByTagName("script"),t=0,f="";if(i.length)for(t=0;t<i.length;t++)i[t].src!=null&&(i[t].src.indexOf("79423.analytics.edgesuite.net")!=-1||i[t].src.indexOf("79423.analytics.edgekey.net")!=-1)&&(kr=i[t].src,f=ot("configPath",i[t].src),f!=""&&(tt.url=f))}catch(c){}else n&&n.configPath?(tt.url=n.configPath,r.objectBased=!0):tt.url=AKAMAI_MEDIA_ANALYTICS_CONFIG_FILE_PATH;try{window&&(u=null,fr()?(u=ot("AkamaiAnalytics_configPath",window.parent.location),u&&(tt.url=u)):(u=ot("AkamaiAnalytics_configPath",window.location),u&&(tt.url=u)))}catch(c){}tt.url&&(e=parseInt(ot("enableGenericAPI",tt.url)),e==1&&(r.objectBased=!0),tt.beaconSent=parseInt(ot("beaconSentNotify",tt.url)),o=parseInt(ot("setVideoObject",tt.url)),o==1&&(r.videoPassed=!0),s=parseInt(ot("subscribeVideo",tt.url)),s==1&&(r.videoPassed=!0),h=parseInt(ot("exception",tt.url)),h==1&&(y.printException=!0),y.configURLCsmaDebug=parseInt(ot("debug",tt.url)))}();try{window&&(y.pageURLCsmaDebug=fr()?parseInt(ot("AkamaiAnalytics_debug",window.parent.location)):parseInt(ot("AkamaiAnalytics_debug",window.location)))}catch(ve){}try{typeof akamaiBCVideoObject!="undefined"&&typeof brightcovePerforceVersion!="undefined"&&yr("std:pluginVersion","Brightcove-"+brightcovePerforceVersion)}catch(ve){t("Exception,  pluginVersion: "+ve)}ff();vt(io,tt.url,!1,!0);this.getValueFromQueryString=function(){return ot(key,searchURL)};this.logMessage=function(n,i){t(n,i)};var lr="AkamaiAnalytics_BrowserSessionId",si=null,a=null,su=null,ar=null,yi=null,ti=null,te=null;navigator&&navigator.userAgent&&(te=navigator.userAgent);vs();ps();ws();f={ended:0,init:1,playing:2,pause:3,seek:4,rebuffering:5,resumeBuffering:6};var k=[0,0,0,0,0,0,0,0,0,0,0,0],hu=[0,0,0,0,0,0,0,0,0,0,0,0],ie,cu="0,0,0,0,0,0,0,0";r.akamai=new lu(r);vr=["UNKNOWN","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"];this.getViewerId=function(){try{var n=r.akamai;return n&&n.viewerId?n.viewerId:null}catch(t){return null}};this.setData=function(n,t){yr(n,t)};this.handleStreamSwitch=function(){gs()};this.handleTitleSwitch=function(n){nh(n)};this.handleFeedbackEvent=function(){se()};this.handleApplicationExit=function(){th()};this.handleSessionInit=function(t,i){try{t&&(typeof n!="object"&&(n={}),t.streamHeadPosition&&(n.streamHeadPosition=t.streamHeadPosition),t.streamLength&&(n.streamLength=t.streamLength),t.streamURL&&(n.streamURL=t.streamURL),t.bytesLoaded&&(n.bytesLoaded=t.bytesLoaded),t.customDataFunction&&(n.customDataFunction=t.customDataFunction),n.customDataFunction&&(tr=n.customDataFunction),t.firstBitRate&&(n.firstBitRate=t.firstBitRate),n.firstBitRate&&fe(n.firstBitRate,i));ct(r,i)}catch(u){}};this.handleBitRateSwitch=function(n,t){fe(n,t)};this.handlePlaying=function(n){ct(r,n);lt(r,n)};this.handlePlayEnd=function(n,t){r.objectBased&&(r.endReason=n);ee(r,t)};this.handleMediaChangedEvent=function(){ii(r)};this.handlePause=function(n){vu(r,n)};this.handleResume=function(n){ct(r,n);lt(r,n)};this.handleBufferStart=function(n){yu(r,n)};this.handleBufferEnd=function(n){ct(r,n);lt(r,n)};this.handleError=function(n,t){try{r.objectBased&&(r.errorReason=n);pu(r,t)}catch(i){}};this.handleTimeupdateEvent=function(){wu(r)};this.updateAdObject=function(n){ku(n)};this.handleAdLoaded=function(n,t){try{ae(n,t)}catch(i){}};this.handleAdStarted=function(n,t){fh(n,t)};this.handleAdCompleted=function(n){eh(n)};this.handleAdFirstQuartile=function(){oh()};this.handleAdMidPoint=function(){sh()};this.handleAdThirdQuartile=function(){hh()};this.handleAdStopped=function(n){ch(n)};this.handleAdError=function(n){lh(n)};this.handleSetupAISEvent=function(n,t,i){ih(n,t,i)};this.receiveAISInitRequest=function(n){var i,r;try{if(u.initObj=n,he(u.initUrlId),u.initObj==""||u.initObj==null){u.requestFailed=!0;return}if(u.requestFailed)return;if(u.initObj.authenticated){if(u.akamai={},u.akamai.ais_queryToken=u.initObj.querytoken,u.initObj.idps){i=u.initObj.idps;for(r in i)u.akamai.ais_idpId=r,u.akamai.ais_idpName=i[r].name,u.akamai.ais_idpDisplayName=i[r].display_name,u.akamai.ais_idpUrl=i[r].url}pi(u.identityUrl,u.identityUrlId)}else u.requestFailed||(t("receiveAISInitRequest, retrying the request"),++u.aisRetries,u.aisRetries<u.aisRequestLimit&&(u.retryTimer=rt(pi,u.aisRequestInterval,[u.initUrl,u.initUrlId])))}catch(f){u.requestFailed=!0}};this.receiveAISIdentityRequest=function(n){try{if(u.identityObj=n,he(u.identityUrlId),n==null||n=="")return;u.akamai||(u.akamai={});n.indentity&&n.identity.aisuid&&(u.akamai.ais_aisuid=n.identity.aisuid);rh()}catch(t){u.requestFailed=!0}};this.subscribeVideoObject=function(n){try{n&&du(n)}catch(t){}};tc()}function setAkamaiMediaAnalyticsData(n,t){try{akaMediaAnalytics&&akaMediaAnalytics.setData(n,t)}catch(i){}}function akamaiGetViewerId(){try{var n=null;akaMediaAnalytics&&(n=akaMediaAnalytics.getViewerId())}catch(t){}return n}function akamaiSetViewerId(n){(n==null||n=="")&&(n="-");setAkamaiMediaAnalyticsData("viewerId",n);setAkamaiMediaAnalyticsData("clientId",n)}function akamaiSetViewerDiagnosticsId(n){(n==null||n=="")&&(n="-");setAkamaiMediaAnalyticsData("viewerDiagnosticsId",n)}function akamaiUpdateAdObject(n){akaMediaAnalytics&&akaMediaAnalytics.updateAdObject(n)}function akamaiHandleAdStarted(n){akaMediaAnalytics&&akaMediaAnalytics.handleAdStarted(n)}function akamaiHandleAdCompleted(){akaMediaAnalytics&&akaMediaAnalytics.handleAdCompleted()}function akamaiHandleAdLoaded(n){akaMediaAnalytics&&akaMediaAnalytics.handleAdLoaded(n)}function akamaiHandleAdFirstQuartile(){akaMediaAnalytics&&akaMediaAnalytics.handleAdFirstQuartile()}function akamaiHandleAdMidPoint(){akaMediaAnalytics&&akaMediaAnalytics.handleAdMidPoint()}function akamaiHandleAdThirdQuartile(){akaMediaAnalytics&&akaMediaAnalytics.handleAdThirdQuartile()}function akamaiHandleAdError(){akaMediaAnalytics&&akaMediaAnalytics.handleAdError()}function akamaiHandleAdStopped(){akaMediaAnalytics&&akaMediaAnalytics.handleAdStopped()}function akamaiHandleStreamSwitch(){akaMediaAnalytics&&akaMediaAnalytics.handleStreamSwitch()}function akamaiHandleTitleSwitch(n){akaMediaAnalytics&&akaMediaAnalytics.handleTitleSwitch(n)}function akamaiSetupAIS(n,t,i){akaMediaAnalytics&&akaMediaAnalytics.handleSetupAISEvent(n,t,i)}function akamaiHandleBitRateSwitch(n){akaMediaAnalytics&&akaMediaAnalytics.handleBitRateSwitch(n)}function akamaiHandleApplicationExit(){akaMediaAnalytics&&akaMediaAnalytics.handleApplicationExit()}function akamaiSetVideoObject(n){akaMediaAnalytics&&akaMediaAnalytics.subscribeVideoObject(n)}function akamaiSubscribeVideoObject(n){akaMediaAnalytics&&akaMediaAnalytics.subscribeVideoObject(n)}videojs.plugin("akamaiAnalytics",function(n){var t=this,i,o=!1,s=0,u={time:500,enabled:!1,id:null,streamPos:0,clockTime:0},f={ended:0,init:1,play:2,playing:3,pause:4,seek:5,rebuffering:6},r={state:f.ended,streamPos:0,bitRate:0,url:""},e=function(){},y=function(){r.state!=f.ended&&a();var t={};t.streamHeadPosition=p;t.streamLength=w;t.streamURL=c;t.bytesLoaded=g;t.configPath=n.configPath;i=new AkaHTML5MediaAnalytics(t)},p=function(){return t?t.currentTime():0},w=function(){return t?t.duration():0},c=function(){return t?t.currentSrc():""},g=function(){return 0},nt=function(){e("on_play");var n=c();r.url?r.url!=n&&(i.handleStreamSwitch(),i.handleSessionInit()):i.handleSessionInit();r.url=c();r.state=r.state==f.ended?f.init:f.play},tt=function(){e("on_playing");l(0)},l=function(n){i.handlePlaying(h()-n);d();r.state=f.playing;o=!1},it=function(){e("on_pause");i.handlePause();r.state=f.pause;v()},b=function(n){e("onWaiting");i.handleBufferStart(h()-n);r.state=f.rebuffering},a=function(){e("on_ended");i.handlePlayEnd();r.state=f.ended;k()},rt=function(){var n=t.error();i||y();i.handleError("ErrorCode:"+n.code);k()},ut=function(){var y=h(),c=p(),e=y-u.clockTime,n=(c-u.streamPos)*1e3/t.playbackRate(),k,d,v,g;if(r.state!=f.pause)k=w(),u.streamPos!=0&&(n==0?Math.abs(k-c)<.1?a():r.state!=f.rebuffering&&b(e):n>0&&n<1.5*e&&(r.state==f.rebuffering?l(n):e-n>e/5&&(b(e-n),l(0))));else if(o&&t.ima3&&t.ima3.adPlayer&&(d=t.ima3.adPlayer.currentTime(),v=t.ima3.adPlayer.duration(),v>0)){if(g=d/v*100,g>s){switch(s){case 25:i.handleAdFirstQuartile();break;case 50:i.handleAdMidPoint();break;case 75:i.handleAdThirdQuartile()}s+=25}isAdSkpped=!0}u.streamPos=c;u.clockTime=y},k=function(){r.streamPos=0;r.bitRate=0;v()},d=function(){u.enabled||(u.clockTime=h(),u.id=setInterval(ut,u.time),u.enabled=!0)},v=function(){clearInterval(u.id);u.enabled=!1},h=function(){return(new Date).getTime()},ft=function(){var n,r;e("on_adstart:");o=!0;s=25;n={};t.ima3&&(r=t.ima3.currentAd,r&&(n.adId=r.getAdId(),n.adTitle=n.adId+"_"+r.getTitle(),n.adDuration=r.getDuration()*1e3));i.handleAdLoaded(n);i.handleAdStarted();d()},et=function(){var n,u,r;e("on_adend");n=!1;t.ima3&&t.ima3.adPlayer&&(u=t.ima3.adPlayer.currentTime(),r=t.ima3.adPlayer.duration(),r>0&&r-u>1&&(n=!0));n?i.handleAdStopped():i.handleAdCompleted();o=!1;v()};myPlayer=player;y();e("pluginOptions:"+n);t.on("play",nt);t.on("playing",tt);t.on("pause",it);t.on("ended",a);t.on("error",rt);t.on("adstart",ft);t.on("adend",et);return i});typeof akamaiBCVideoObject!="undefined"?akaMediaAnalytics=new AkaHTML5MediaAnalytics(null):typeof AKAMAI_MEDIA_ANALYTICS_CONFIG_FILE_PATH!="undefined"&&AKAMAI_MEDIA_ANALYTICS_CONFIG_FILE_PATH.indexOf("enableGenericAPI=1")==-1&&AKAMAI_MEDIA_ANALYTICS_CONFIG_FILE_PATH.indexOf("subscribeVideo")==-1&&(akaMediaAnalytics=new AkaHTML5MediaAnalytics(null));var akamaianalytics=function(){function t(n,t){var r=t,i;i=videojs(n).akamaiAnalytics({configPath:"https://ma822-r.analytics.edgekey.net/config/beacon-8202.xml"});i.setData("title",r);i.setData("eventName",r);i.setData("std:format","DASH");console.log("akamai Analytics loaded")}console.log("akamai Analytics entering");var n=function(n,i){t(n,i)};return{init:n}}()