var adalyserModules=trackerCore;adalyserModules.AdalyserTracker=function(e,r){var t=window;mutState={outQueues:[],bufferFlushers:[],expireDateTime:null,hasLoaded:false,registeredOnLoadHandlers:[]};function a(){var e;adalyserModules.helpers.forEach(mutState.bufferFlushers,function(e){e()});if(mutState.expireDateTime){do{e=new Date;if(adalyserModules.helpers.filter(mutState.outQueues,function(e){return e.length>0}).length===0){break}}while(e.getTime()1){r.bufferFlushers.push(function(){if(!f){h()}})}if(u&&o>1){r.bufferFlushers.push(function(){if(!f){h()}})}function g(e){var r="?",t={co:true,cx:true},a=true;for(var n in e){if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n)){if(!a){r+="&"}else{a=false}r+=encodeURIComponent(n)+"="+encodeURIComponent(e[n])}}for(var o in t){if(e.hasOwnProperty(o)&&t.hasOwnProperty(o)){r+="&"+o+"="+encodeURIComponent(e[o])}}return r}function p(e){var r=adalyserModules.libs.lodash.mapValues(e,function(e){return e.toString()});return{evt:r,bytes:t(JSON.stringify(r))}}function t(e){var r=0;for(var t=0;t=55296&&a<=57343){r+=4;t++}else if(a<65535){r+=3}else{r+=4}}return r}function a(e,r){m=r+i;if(u){var t=p(e);if(t.bytes>=l){adalyserModules.helpers.warn("Event too large: size "+t.bytes+"exceeds maximum of "+l);var a=v(configCollectorUrl);a.send(encloseInPayloadDataEnvelope(w([t.evt])));return}else{y.push(t)}}else{y.push(g(e))}var n=false;if(s){n=adalyserModules.helpers.attemptWriteLocalStorage(d,JSON.stringify(y))}if(!f&&(!n||y.length>=o)){h()}}function h(){while(y.length&&typeof y[0]!=="string"&&typeof y[0]!=="object"){y.shift()}if(y.length<1){f=false;return}if(!adalyserModules.libs.lodash.isString(m)){throw"No silo configured, cannot track"}f=true;var e=y[0];if(u){var r=v(m);var t=setTimeout(function(){r.abort();f=false},5e3);function a(e){var r=0;var t=0;while(r=l){break}else{r+=1}}return r}var n=a(y);r.onreadystatechange=function(){if(r.readyState===4&&r.status>=200&&r.status<400){for(var e=0;e=400){clearTimeout(t);f=false}};var o=adalyserModules.libs.lodash.map(y.slice(0,n),function(e){return e.evt});if(o.length>0){r.send(JSON.stringify(w(o)))}}else{var i=new Image(1,1);i.onload=function(){y.shift();if(s){adalyserModules.helpers.attemptWriteLocalStorage(d,JSON.stringify(y))}h()};i.onerror=function(){f=false};if(c){i.src="https://ib.adnxs.com/getuidu?"+m+e.replace("?","?stm="+(new Date).getTime()+"&").replace("APPNEXUS_ID_PLACEHOLDER","$UID")}else{i.src=m+e.replace("?","?stm="+(new Date).getTime()+"&")}}}function v(e){var r=new XMLHttpRequest;r.open("POST",e,true);r.withCredentials=true;r.setRequestHeader("Content-Type","application/json; charset=UTF-8");return r}function w(e){var r=(new Date).getTime().toString();for(var t=0;t=0){var n=t.slice(a,t.length).join(".");adalyserModules.libs.cookie(e,r,0,"/",n);if(adalyserModules.libs.cookie(e)===r){o.deleteCookie(e,n);return n}a-=1}return window.location.hostname};o.strEndsWith=function(e,r){if(typeof String.prototype.endsWith=="function"){return String.prototype.endsWith.call(e,r)}return e.indexOf(r,e.length-r.length)!==-1};o.getCookiesWithPrefix=function(e){var r=document.cookie.split("; ");var t=[];for(var a=0;a-1){return t.searchEngines[r]}}return false}function M(e){if(typeof e==="undefined"){return false}for(var r in t.socialNetworks){if(e.search(r)>-1){return t.socialNetworks[r]}}return false}function P(e,r){if(e==S){return false}if(typeof e==="undefined"){return false}for(var t in r){if(e.search(r[t])>-1){return false}}return true}function q(e){var r=e.split("&"),t={};for(var a=0;a-1){return"Paid Search (Brand)"}}}}return"Paid Search (Generic)"}else if(t){var i=q(b.location.search.substring(1));if(i[t]){for(var l in a){if(i[t].search(a[l])>-1){return"Paid Search (Brand)"}}}return"Paid Search (Generic)"}return"Paid Search"}if(/^(cpv|cpa|cpp|content-text)$/.test(o)){return"Other Advertising"}if(/^(social|social-network|social-media|sm|social network|social media)$/.test(o)){return"Social"}if(/^(display|cpm|banner)$/.test(o)){return"Display"}return"Unknown"};return t}();adalyserModules.Tracker=function(w,a,e){var S=e.hasOwnProperty("clientId")?e.clientId:0,r={68856412500:{campaignCookieTimeout:1209600}};if(S&&r.hasOwnProperty(S)){var t=r[S];for(var n in t){if(t.hasOwnProperty(n)){e[n]=t[n]}}}var o=adalyserModules(function(e,r){Ae(e);for(var t in p){e.eventData[t]=p[t]}if(r=="ses"){if(x){var a=I();if(!a){Pe(e.et)}ye(e,d)}x=false}else{ye(e,d)}}),u=document,i=window,_=navigator,s=adalyserModules.fixupUrl(u.domain,i.location.href,adalyserModules.helpers.getReferrer()),M=adalyserModules.helpers.fixupDomain(s[0]),P=s[1],q=s[2],l,c=u.title,d=e.hasOwnProperty("pageUnloadTimer")?e.pageUnloadTimer:500,k,b="_adal_",f=e.hasOwnProperty("cookieDomain")?e.cookieDomain:null,m="/",U,B=e.hasOwnProperty("visitorCookieTimeout")?e.visitorCookieTimeout:63072e3,j=e.hasOwnProperty("campaignCookieTimeout")?e.campaignCookieTimeout:15552e3,z=e.hasOwnProperty("viewThroughCookieTimeout")?e.viewThroughCookieTimeout:2592e3,Q=e.hasOwnProperty("conversionCookieTimeout")?e.conversionCookieTimeout:2592e3,J=e.hasOwnProperty("useLandingPageCookie")?e.useLandingPageCookie===true:false,H=e.hasOwnProperty("landingPageCookieTimeout")?e.landingPageCookieTimeout:2592e3,$=e.hasOwnProperty("sessionCookieTimeout")?e.sessionCookieTimeout:1800,F=adalyserModules.trafficSource.referrerBlacklist.concat(e.hasOwnProperty("trafficSourceInternalReferrers")?e.trafficSourceInternalReferrers:[]),G=u.characterSet||u.charset,V=e.hasOwnProperty("forceSecureTracker")?e.forceSecureTracker===true:false,W=e.hasOwnProperty("useLocalStorage")?e.useLocalStorage:true,X=e.hasOwnProperty("vodUtmSources")?e.vodUtmSources:[],T=e.hasOwnProperty("useCookies")?e.useCookies:true,Y=_.userLanguage||_.language,K,Z=(new Date).getTime(),y,C,D=1,x=false,g=[],ee=e.hasOwnProperty("useLinkerParams")?e.useLinkerParams:false,re=e.hasOwnProperty("linkerExpirationThreshold")?e.linkerExpirationThreshold:12e4,te=e.hasOwnProperty("brandGenericProp")?e.brandGenericProp:false,ae=e.hasOwnProperty("brandPatterns")?e.brandPatterns:[],ne=e.hasOwnProperty("brandMap")?e.brandMap:false,oe=e.hasOwnProperty("anonymiseIP")?e.anonymiseIP:false,E=e.hasOwnProperty("appNexusIdParameter")?e.appNexusIdParameter:false,p={};if(E){p[E]="APPNEXUS_ID_PLACEHOLDER"}outQueueManager=new adalyserModules.OutQueueManager(w,a,W,e.post,e.bufferSize,e.maxPostBytes||4e4,E),commonContexts=[];if(!e.hasOwnProperty("discoverRootDomain")||e.discoverRootDomain){f=adalyserModules.helpers.findRootDomain()}o.setTimezone(adalyserModules.detectors.detectTimezone());o.addPayloadPair("lang",Y);o.addPayloadPair("cs",G);function ie(e){var r=I();var t=(new Date).getTime();if(this.href){this.href=adalyserModules.helpers.decorateQuerystring(this.href,"_adal_cw",r+"."+t);var a=N();if(a){var n=v({cg:a.cg});this.href=adalyserModules.helpers.decorateQuerystring(this.href,"_adal_ca",encodeURIComponent(n)+"."+t)}}}function se(e){if(this.action){var r=I();var t=(new Date).getTime();if("post"==this.method.toLowerCase()){this.action=adalyserModules.helpers.decorateQuerystring(this.action,"_adal_cw",r+"."+t);var a=N();if(a){var n=v({cg:a.cg});this.action=adalyserModules.helpers.decorateQuerystring(this.action,"_adal_ca",n+"."+t)}}else if("get"==this.method.toLowerCase()){var o,i;for(var s=0;s=0){return true}}return false}}}function de(e){var r=ce(e,"href");for(var t=0;t0){adalyserModules.libs.cookie("__adal_ses",g.join("_"),$,m,f)}else{adalyserModules.libs.cookie("__adal_ses","*",$,m,f)}}function Se(e,r,t,a,n,o){adalyserModules.libs.cookie("__adal_id",e+"."+r+"."+t+"."+a+"."+n+"."+o,B,m,f)}function N(){var e=adalyserModules.libs.cookie("__adal_ca");if(!e){return null}return h(e)}function _e(){var e=adalyserModules.libs.cookie("__adal_vt");if(!e){return null}return h(e)}function h(e){var r={},t=e.split("&");for(var a=0;a1){r[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}}if(!adalyserModules.Payload.isNonEmptyJson(r)){return null}return r}function R(e){adalyserModules.libs.cookie("__adal_ca",v(e),j,m,f)}function Me(e){adalyserModules.libs.cookie("__adal_vt",v(e),z,m,f)}function v(e){var r="",t=true;for(var a in e){if(e.hasOwnProperty(a)){if(!t){r+="&"}else{t=false}r+=encodeURIComponent(a)+"="+encodeURIComponent(e[a])}}return r}function I(){return adalyserModules.libs.cookie("__adal_cw")}function Pe(e){adalyserModules.libs.cookie("__adal_cw",e,Q,m,f)}function qe(){return adalyserModules.libs.cookie("__adal_lp")}function $e(e){adalyserModules.libs.cookie("__adal_lp",e,H,m,f)}function Te(e){adalyserModules.libs.cookie("__adal_sd",e,Q,m,f)}function Ce(){return adalyserModules.libs.cookie("__adal_sd")}function De(){return uuid.v4()}function xe(){var e=T&&Ee();var r=Oe();if(r[1]){y=r[1]}else{y=De();r[1]=y}C=r[6];if(e){g=e[0]}else{r[3]++;x=true;C=uuid.v4();r[6]=C;r[5]=r[4]}if(T){L();if(J){var t=qe();if(!t){$e(P)}}r[4]=Math.round((new Date).getTime()/1e3);r.shift();Se.apply(null,r)}}function Ee(){var e=adalyserModules.libs.cookie("__adal_ses"),r=[];if(!e){return false}if(e=="*"){r[0]=[]}else{r=e.split(".");if(r[0]){r[0]=r[0].split("_")}}return r}function Oe(){if(!T){return[]}var e=new Date,r=Math.round(e.getTime()/1e3),t=adalyserModules.libs.cookie("__adal_id"),a;if(t){a=t.split(".");a.unshift("0")}else{a=["1",y,r,0,r,""]}if(!a[6]){a[6]=uuid.v4()}return a}function Ae(e){var r=Math.round((new Date).getTime()/1e3),t="__adal_id",a=Ee(),n=Oe(),o=n[0],i=n[1],s=n[2],u=n[3],l=n[4],c=n[5],d=n[6];var f=N();var m={};var y=_e();var g=adalyserModules.trafficSource.getCampaignData(f,F,X);var p=g.campaignParams;var h=false;if(!g.setFromPrevious||typeof p["cg"]==="undefined"){p["cg"]=adalyserModules.trafficSource.getChannelGrouping(p,ne,te,ae)}if(p.so!=="direct"){if(f){adalyserModules.helpers.forEach(p,function(e,r,t){if(e!==f[r]){h=true}});adalyserModules.helpers.forEach(f,function(e,r,t){if(e!==p[r]){h=true}})}else{h=true}if(!g.setFromPrevious){R(p)}}else{if(!f){R(p)}}var v=e.eventData;if(adalyserModules.libs.lodash.isUndefined(v)){v={}}v["et"]=e.et;if(u>1){v["nr"]="Returning"}else{v["nr"]="New"}v["cg"]=p["cg"];v["dt"]=adalyserModules.helpers.determineDeviceType(_.userAgent);adalyserModules.helpers.forEach(p,function(e,r,t){v[r]=e});if(g.isClickThrough){m=p;m["ctt"]=e.et;Me(m)}else{m=y}if(m){adalyserModules.helpers.forEach(m,function(e,r,t){v["vt_"+r]=e})}if(o==="0"){C=d;if(!a&&T||h){u++;c=l;C=uuid.v4();x=true}D=u}else{if((new Date).getTime()-Z>$*1e3){C=uuid.v4();D++;x=true}}if(oe){v["aip"]=1}var w=Ce();if(w!=""){v["sd"]=w}v["vid"]=D;v["sid"]=C;v["duid"]=i;A();var k=I();if(k){v["cw"]=parseInt(k)}else{v["cw"]=e.et}if(J){var b=qe();if(b){v["lp"]=b}}e.add("cid",S);if(E){v[E]="APPNEXUS_ID_PLACEHOLDER"}e.addJson("p",v);e.add("userAgent",_.userAgent);e.add("domain",M);e.add("url",O(P));e.add("refr",O(q));if(T){Se(i,s,D,r,c,C);L()}Z=(new Date).getTime()}function Le(e){if(V){return"https"+"://"+e}return("https:"===u.location.protocol?"https":"http")+"://"+e}if(e.crossDomainLinker){de(e.crossDomainLinker);if(e.decorateForms){fe(e.crossDomainLinker)}}if(ee){me(s[1])}xe();return{setCountPreRendered:function(e){U=e},setSilo:function(e){l=Le(e)},trackPageView:function(e,r,t){ge(function(){ve(e,r,t)})},trackEvent:function(e,r,t){if(t){if(g.indexOf(e)>-1){return}g.push(e)}o.trackEvent(e,r)},trackSession:function(e,r,t,a){we(e,r,t,a)}}};var rng,crypto=window.crypto||window.msCrypto;if(crypto&&crypto.getRandomValues){var _rnds8=new Uint8Array(16);rng=function(){return crypto.getRandomValues(_rnds8),_rnds8}}if(!rng){var _rnds=new Array(16);rng=function(){for(var e,r=0;r<16;r++)0===(3&r)&&(e=4294967296*Math.random()),_rnds[r]=e>>>((3&r)<<3)&255;return _rnds}}function parse(e,r,t){var a=r&&t||0,n=0;for(r=r||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){n<16&&(r[a+n++]=_hexToByte[e])});n<16;)r[a+n++]=0;return r}function unparse(e,r){var t=r||0,a=_byteToHex;return a[e[t++]]+a[e[t++]]+a[e[t++]]+a[e[t++]]+"-"+a[e[t++]]+a[e[t++]]+"-"+a[e[t++]]+a[e[t++]]+"-"+a[e[t++]]+a[e[t++]]+"-"+a[e[t++]]+a[e[t++]]+a[e[t++]]+a[e[t++]]+a[e[t++]]+a[e[t++]]}function v1(e,r,t){var a=r&&t||0,n=r||[];e=e||{};var o=void 0!==e.clockseq?e.clockseq:_clockseq,i=void 0!==e.msecs?e.msecs:(new Date).getTime(),s=void 0!==e.nsecs?e.nsecs:_lastNSecs+1,u=i-_lastMSecs+(s-_lastNSecs)/1e4;if(u<0&&void 0===e.clockseq&&(o=o+1&16383),(u<0||i>_lastMSecs)&&void 0===e.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_lastMSecs=i,_lastNSecs=s,_clockseq=o,i+=122192928e5;var l=(1e4*(268435455&i)+s)%4294967296;n[a++]=l>>>24&255,n[a++]=l>>>16&255,n[a++]=l>>>8&255,n[a++]=255&l;var c=i/4294967296*1e4&268435455;n[a++]=c>>>8&255,n[a++]=255&c,n[a++]=c>>>24&15|16,n[a++]=c>>>16&255,n[a++]=o>>>8|128,n[a++]=255&o;for(var d=e.node||_nodeId,f=0;f<6;f++)n[a+f]=d[f];return r?r:unparse(n)}function v4(e,r,t){var a=r&&t||0;"string"==typeof e&&(r="binary"==e?new Array(16):null,e=null),e=e||{};var n=e.random||(e.rng||rng)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,r)for(var o=0;o<16;o++)r[a+o]=n[o];return r||unparse(n)}for(var _byteToHex=[],_hexToByte={},i=0;i<256;i++)_byteToHex[i]=(i+256).toString(16).substr(1),_hexToByte[_byteToHex[i]]=i;var _seedBytes=rng(),_nodeId=[1|_seedBytes[0],_seedBytes[1],_seedBytes[2],_seedBytes[3],_seedBytes[4],_seedBytes[5]],_clockseq=16383&(_seedBytes[6]<<8|_seedBytes[7]),_lastMSecs=0,_lastNSecs=0,uuid=v4;uuid.v1=v1,uuid.v4=v4,uuid.parse=parse,uuid.unparse=unparse;var queueName=window.GlobalAdalyserNamespace.shift();var queue=window[queueName];queue.q=new adalyserModules.AdalyserTracker(queue.q,queueName);