diff --git a/sp.js b/sp.js index 6a45ba9..4a41d39 100644 --- a/sp.js +++ b/sp.js @@ -1,9 +1 @@ -/*! * Snowplow - The world's most powerful web analytics platform - * - * @description JavaScript tracker for Snowplow - * @version 2.9.3 - * @author Alex Dean, Simon Andersson, Anthon Pang, Fred Blundun, Joshua Beemster - * @copyright Anthon Pang, Snowplow Analytics Ltd - * @license Simplified BSD - */ -(function(){function a(c,g,e){function d(m,j){if(!g[m]){if(!c[m]){var i=typeof require=="function"&&require;if(!j&&i){return i(m,!0)}if(b){return b(m,!0)}var k=new Error("Cannot find module '"+m+"'");throw k.code="MODULE_NOT_FOUND",k}var h=g[m]={exports:{}};c[m][0].call(h.exports,function(l){var o=c[m][1][l];return d(o?o:l)},h,h.exports,a,c,g,e)}return g[m].exports}var b=typeof require=="function"&&require;for(var f=0;f1){return document.cookie=e+"="+escape(g)+(d?"; expires="+new Date(+new Date()+(d*1000)).toUTCString():"")+(i?"; path="+i:"")+(f?"; domain="+f:"")+(h?"; secure":"")}return unescape((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}},{}],2:[function(c,d,b){var a={utf8:{stringToBytes:function(e){return a.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(a.bin.bytesToString(e)))}},bin:{stringToBytes:function(g){for(var e=[],f=0;f>>(32-f))},rotr:function(g,f){return(g<<(32-f))|(g>>>f)},endian:function(g){if(g.constructor==Number){return e.rotl(g,8)&16711935|e.rotl(g,24)&4278255360}for(var f=0;f0;g--){f.push(Math.floor(Math.random()*256))}return f},bytesToWords:function(g){for(var j=[],h=0,f=0;h>>5]|=g[h]<<(24-f%32)}return j},wordsToBytes:function(h){for(var g=[],f=0;f>>5]>>>(24-f%32))&255)}return g},bytesToHex:function(f){for(var h=[],g=0;g>>4).toString(16));h.push((f[g]&15).toString(16))}return h.join("")},hexToBytes:function(g){for(var f=[],h=0;h>>6*(3-h))&63))}else{f.push("=")}}}return f.join("")},base64ToBytes:function(g){g=g.replace(/[^A-Z0-9+\/]/ig,"");for(var f=[],h=0,j=0;h>>(6-j*2)))}return f}};c.exports=e})()},{}],4:[function(b,c,a){(function(d){var e=(function(){var g="s",h=function(o){var p=-o.getTimezoneOffset();return(p!==null?p:0)},k=function(p,q,o){var r=new Date();if(p!==undefined){r.setFullYear(p)}r.setMonth(q);r.setDate(o);return r},i=function(o){return h(k(o,0,2))},l=function(o){return h(k(o,5,2))},f=function(p){var q=p.getMonth()>7,t=q?l(p.getFullYear()):i(p.getFullYear()),o=h(p),s=t<0,r=t-o;if(!s&&!q){return r<0}return r!==0},j=function(){var o=i(),p=l(),q=o-p;if(q<0){return o+",1"}else{if(q>0){return p+",1,"+g}}return o+",0"},m=function(){var o=j();return new e.TimeZone(e.olson.timezones[o])},n=function(o){var p=new Date(2010,6,15,1,0,0,0),q={"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"America/Asuncion":new Date(2012,9,7,3,0,0,0),"America/Santiago":new Date(2012,9,3,3,0,0,0),"America/Campo_Grande":new Date(2012,9,21,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2012,2,10,2,0,0,0),"America/New_York":new Date(2012,2,10,7,0,0,0),"Europe/Helsinki":new Date(2013,2,31,5,0,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0),"Europe/Moscow":p,"Asia/Amman":new Date(2013,2,29,1,0,0,0),"Asia/Beirut":new Date(2013,2,31,2,0,0,0),"Asia/Damascus":new Date(2013,3,6,2,0,0,0),"Asia/Jerusalem":new Date(2013,2,29,5,0,0,0),"Asia/Yekaterinburg":p,"Asia/Omsk":p,"Asia/Krasnoyarsk":p,"Asia/Irkutsk":p,"Asia/Yakutsk":p,"Asia/Vladivostok":p,"Asia/Baku":new Date(2013,2,31,4,0,0),"Asia/Yerevan":new Date(2013,2,31,3,0,0),"Asia/Kamchatka":p,"Asia/Gaza":new Date(2010,2,27,4,0,0),"Africa/Cairo":new Date(2010,4,1,3,0,0),"Europe/Minsk":p,"Pacific/Apia":new Date(2010,10,1,1,0,0,0),"Pacific/Fiji":new Date(2010,11,1,0,0,0),"Australia/Perth":new Date(2008,10,1,1,0,0,0)};return q[o]};return{determine:m,date_is_dst:f,dst_start_for:n}}());e.TimeZone=function(f){var g={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Santiago":["America/Santiago","America/Asuncion","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Asia/Beirut","Europe/Helsinki","Asia/Damascus"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"],"Asia/Dubai":["Europe/Moscow"],"Asia/Dhaka":["Asia/Yekaterinburg"],"Asia/Jakarta":["Asia/Omsk"],"Asia/Shanghai":["Asia/Krasnoyarsk","Australia/Perth"],"Asia/Tokyo":["Asia/Irkutsk"],"Australia/Brisbane":["Asia/Yakutsk"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Tarawa":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk"],"Asia/Baku":["Asia/Yerevan","Asia/Baku"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]},h=f,j=function(){var k=g[h],m=k.length,l=0,n=k[0];for(;l=4){n=((q.charCodeAt(o)&255))|((q.charCodeAt(++o)&255)<<8)|((q.charCodeAt(++o)&255)<<16)|((q.charCodeAt(++o)&255)<<24);n=(((n&65535)*1540483477)+((((n>>>16)*1540483477)&65535)<<16));n^=n>>>24;n=(((n&65535)*1540483477)+((((n>>>16)*1540483477)&65535)<<16));p=(((p&65535)*1540483477)+((((p>>>16)*1540483477)&65535)<<16))^n;j-=4;++o}switch(j){case 3:p^=(q.charCodeAt(o+2)&255)<<16;case 2:p^=(q.charCodeAt(o+1)&255)<<8;case 1:p^=(q.charCodeAt(o)&255);p=(((p&65535)*1540483477)+((((p>>>16)*1540483477)&65535)<<16))}p^=p>>>13;p=(((p&65535)*1540483477)+((((p>>>16)*1540483477)&65535)<<16));p^=p>>>15;return p>>>0}function e(s,o){var t,u,q,k,n,j,l,r,p,m;t=s.length&3;u=s.length-t;q=o;n=3432918353;l=461845907;m=0;while(m>>16)*n)&65535)<<16)))&4294967295;p=(p<<15)|(p>>>17);p=((((p&65535)*l)+((((p>>>16)*l)&65535)<<16)))&4294967295;q^=p;q=(q<<13)|(q>>>19);k=((((q&65535)*5)+((((q>>>16)*5)&65535)<<16)))&4294967295;q=(((k&65535)+27492)+((((k>>>16)+58964)&65535)<<16))}p=0;switch(t){case 3:p^=(s.charCodeAt(m+2)&255)<<16;case 2:p^=(s.charCodeAt(m+1)&255)<<8;case 1:p^=(s.charCodeAt(m)&255);p=(((p&65535)*n)+((((p>>>16)*n)&65535)<<16))&4294967295;p=(p<<15)|(p>>>17);p=(((p&65535)*l)+((((p>>>16)*l)&65535)<<16))&4294967295;q^=p}q^=s.length;q^=q>>>16;q=(((q&65535)*2246822507)+((((q>>>16)*2246822507)&65535)<<16))&4294967295;q^=q>>>13;q=((((q&65535)*3266489909)+((((q>>>16)*3266489909)&65535)<<16)))&4294967295;q^=q>>>16;return q>>>0}var d=e;d.v2=f;d.v3=e;if(typeof(c)!="undefined"){c.exports=d}else{var g=h.murmur;d.noConflict=function(){h.murmur=g;return d};h.murmur=d}}())},{}],6:[function(b,c,a){(function(){var g=b("crypt"),d=b("charenc").utf8,e=b("charenc").bin,h=function(q){if(q.constructor==String){q=d.stringToBytes(q)}var y=g.bytesToWords(q),z=q.length*8,r=[],u=1732584193,s=-271733879,p=-1732584194,o=271733878,k=-1009589776;y[z>>5]|=128<<(24-z%32);y[((z+64>>>9)<<4)+15]=z;for(var B=0;B>>31)}var v=((u<<5)|(u>>>27))+k+(r[A]>>>0)+(A<20?(s&p|~s&o)+1518500249:A<40?(s^p^o)+1859775393:A<60?(s&p|s&o|p&o)-1894007588:(s^p^o)-899497514);k=o;o=p;p=(s<<30)|(s>>>2);s=u;u=v}u+=G;s+=F;p+=E;o+=D;k+=C}return[u,s,p,o,k]},f=function(k,i){var j=g.wordsToBytes(h(k));return i&&i.asBytes?j:i&&i.asString?e.bytesToString(j):g.bytesToHex(j)};f._blocksize=16;f._digestsize=20;c.exports=f})()},{charenc:2,crypt:3}],7:[function(b,c,a){Object.defineProperty(a,"__esModule",{value:true});var d=b("./lib/core");a.trackerCore=d.trackerCore},{"./lib/core":9}],8:[function(c,d,a){Object.defineProperty(a,"__esModule",{value:true});function b(n){var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var h,g,f,s,q,p,o,t,m=0,u=0,l,k=[];if(!n){return n}n=unescape(encodeURIComponent(n));do{h=n.charCodeAt(m++);g=n.charCodeAt(m++);f=n.charCodeAt(m++);t=h<<16|g<<8|f;s=t>>18&63;q=t>>12&63;p=t>>6&63;o=t&63;k[u++]=j.charAt(s)+j.charAt(q)+j.charAt(p)+j.charAt(o)}while(m>>((j&3)<<3)&255}return g}}c.exports=e}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],12:[function(c,b,g){var d=c("./rng");var p=[];var h={};for(var j=0;j<256;j++){p[j]=(j+256).toString(16).substr(1);h[p[j]]=j}function e(w,t,x){var u=(t&&x)||0,v=0;t=t||[];w.toLowerCase().replace(/[0-9a-f]{2}/g,function(i){if(v<16){t[u+v++]=h[i]}});while(v<16){t[u+v++]=0}return t}function l(s,u){var t=u||0,v=p;return v[s[t++]]+v[s[t++]]+v[s[t++]]+v[s[t++]]+"-"+v[s[t++]]+v[s[t++]]+"-"+v[s[t++]]+v[s[t++]]+"-"+v[s[t++]]+v[s[t++]]+"-"+v[s[t++]]+v[s[t++]]+v[s[t++]]+v[s[t++]]+v[s[t++]]+v[s[t++]]}var r=d();var o=[r[0]|1,r[1],r[2],r[3],r[4],r[5]];var f=(r[6]<<8|r[7])&16383;var m=0,k=0;function q(E,u,y){var z=u&&y||0;var A=u||[];E=E||{};var x=E.clockseq!==undefined?E.clockseq:f;var s=E.msecs!==undefined?E.msecs:new Date().getTime();var D=E.nsecs!==undefined?E.nsecs:k+1;var t=(s-m)+(D-k)/10000;if(t<0&&E.clockseq===undefined){x=x+1&16383}if((t<0||s>m)&&E.nsecs===undefined){D=0}if(D>=10000){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}m=s;k=D;f=x;s+=12219292800000;var C=((s&268435455)*10000+D)%4294967296;A[z++]=C>>>24&255;A[z++]=C>>>16&255;A[z++]=C>>>8&255;A[z++]=C&255;var B=(s/4294967296*10000)&268435455;A[z++]=B>>>8&255;A[z++]=B&255;A[z++]=B>>>24&15|16;A[z++]=B>>>16&255;A[z++]=x>>>8|128;A[z++]=x&255;var w=E.node||o;for(var v=0;v<6;v++){A[z+v]=w[v]}return u?u:l(A)}function n(t,s,x){var u=s&&x||0;if(typeof(t)=="string"){s=t=="binary"?new Array(16):null;t=null}t=t||{};var w=t.random||(t.rng||d)();w[6]=(w[6]&15)|64;w[8]=(w[8]&63)|128;if(s){for(var v=0;v<16;v++){s[u+v]=w[v]}}return s||l(w)}var a=n;a.v1=q;a.v4=n;a.parse=e;a.unparse=l;b.exports=a},{"./rng":11}],13:[function(d,e,a){var g=d("./lib_managed/lodash"),f=d("./lib/helpers"),c=typeof a!=="undefined"?a:this,b=window;c.errorManager=function(i){function h(o,l,p,n,m,q){var k=(m&&m.stack)?m.stack:null;i.trackSelfDescribingEvent({schema:"iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-1",data:{programmingLanguage:"JAVASCRIPT",message:o||"JS Exception. Browser doesn't support ErrorEvent API",stackTrace:k,lineNumber:p,lineColumn:n,fileName:l}},q)}function j(n,k,m){var l;if(g.isFunction(m)){l=k.concat(m(n))}else{l=k}h(n.message,n.filename,n.lineno,n.colno,n.error,l)}return{trackError:h,enableErrorTracking:function(k,n,m){function l(o){if(g.isFunction(k)&&k(o)||k==null){j(o,m,n)}}f.addEventListener(b,"error",l,true)}}}},{"./lib/helpers":18,"./lib_managed/lodash":20}],14:[function(c,d,a){var f=c("./lib_managed/lodash"),e=c("./lib/helpers"),b=typeof a!=="undefined"?a:this;b.getFormTrackingManager=function(k,j,m){var q=["textarea","input","select"];var g=j+"form";var r=function(){return true};var i=function(){return true};var p=function(t){return t};function o(t){return t[f.find(["name","id","type","nodeName"],function(u){return t[u]&&typeof t[u]==="string"})]}function s(t){while(t&&t.nodeName&&t.nodeName.toUpperCase()!=="HTML"&&t.nodeName.toUpperCase()!=="FORM"){t=t.parentNode}if(t&&t.nodeName&&t.nodeName.toUpperCase()==="FORM"){return o(t)}}function h(u){var t=[];f.forEach(q,function(v){var w=f.filter(u.getElementsByTagName(v),function(x){return x.hasOwnProperty(g)});f.forEach(w,function(y){if(y.type==="submit"){return}var x={name:o(y),value:y.value,nodeName:y.nodeName};if(y.type&&y.nodeName.toUpperCase()==="INPUT"){x.type=y.type}if((y.type==="checkbox"||y.type==="radio")&&!y.checked){x.value=null}t.push(x)})});return t}function l(t){return function(x){var u=x.target;var v=(u.nodeName&&u.nodeName.toUpperCase()==="INPUT")?u.type:null;var w=(u.type==="checkbox"&&!u.checked)?null:p(u.value);k.trackFormChange(s(u),o(u),u.nodeName,v,e.getCssClasses(u),w,m(t))}}function n(t){return function(w){var v=w.target;var u=h(v);f.forEach(u,function(x){x.value=p(x.value)});k.trackFormSubmission(o(v),e.getCssClasses(v),u,m(t))}}return{configureFormTracking:function(t){if(t){r=e.getFilter(t.forms,true);i=e.getFilter(t.fields,false);p=e.getTransform(t.fields)}},addFormListeners:function(t){f.forEach(document.getElementsByTagName("form"),function(u){if(r(u)&&!u[g]){f.forEach(q,function(v){f.forEach(u.getElementsByTagName(v),function(w){if(i(w)&&!w[g]&&w.type.toLowerCase()!=="password"){e.addEventListener(w,"change",l(t),false);w[g]=true}})});e.addEventListener(u,"submit",n(t));u[g]=true}})}}}},{"./lib/helpers":18,"./lib_managed/lodash":20}],15:[function(b,c,a){(function(){var f=b("./lib_managed/lodash"),e=b("./lib/helpers"),d=typeof a!=="undefined"?a:this;d.InQueueManager=function(g,n,m,j,o){var h={};function q(u){var v=[];if(!u||u.length===0){v=f.map(h)}else{for(var t=0;t1)?u[1].split(";"):[];return[i,t]}function r(){var v,u,x,w,t,A,y,z;for(v=0;v0){f=c.GlobalSnowplowNamespace.shift();a=c[f];a.q=new g.Snowplow(a.q,f)}else{c._snaq=c._snaq||[];c._snaq=new g.Snowplow(c._snaq,"_snaq")}},{"./snowplow":23}],17:[function(b,c,a){(function(){var l=b("../lib_managed/lodash"),k=b("murmurhash").v3,g=b("jstimezonedetect").jstz.determine(),e=b("browser-cookie-lite"),h=typeof a!=="undefined"?a:this,j=window,d=navigator,i=screen,f=document;h.hasSessionStorage=function(){try{return !!j.sessionStorage}catch(m){return true}};h.hasLocalStorage=function(){try{return !!j.localStorage}catch(m){return true}};h.localStorageAccessible=function(){var m="modernizr";if(!h.hasLocalStorage()){return false}try{j.localStorage.setItem(m,m);j.localStorage.removeItem(m);return true}catch(n){return false}};h.hasCookies=function(m){var n=m||"testcookie";if(l.isUndefined(d.cookieEnabled)){e.cookie(n,"1");return e.cookie(n)==="1"?"1":"0"}return d.cookieEnabled?"1":"0"};h.detectSignature=function(r){var p=[d.userAgent,[i.height,i.width,i.colorDepth].join("x"),(new Date()).getTimezoneOffset(),h.hasSessionStorage(),h.hasLocalStorage()];var m=[];if(d.plugins){for(var q=0;q=0&&m>=0){return o+"x"+m}else{return null}};h.detectDocumentSize=function(){var q=f.documentElement,o=f.body,p=o?Math.max(o.offsetHeight,o.scrollHeight):0;var m=Math.max(q.clientWidth,q.offsetWidth,q.scrollWidth);var n=Math.max(q.clientHeight,q.offsetHeight,q.scrollHeight,p);return isNaN(m)||isNaN(n)?"":m+"x"+n};h.detectBrowserFeatures=function(o,n){var m,q,r={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"},p={};if(d.mimeTypes&&d.mimeTypes.length){for(m in r){if(Object.prototype.hasOwnProperty.call(r,m)){q=d.mimeTypes[r[m]];p[m]=(q&&q.enabledPlugin)?"1":"0"}}}if(d.constructor===window.Navigator&&typeof d.javaEnabled!=="unknown"&&!l.isUndefined(d.javaEnabled)&&d.javaEnabled()){p.java="1"}if(l.isFunction(j.GearsFactory)){p.gears="1"}p.res=i.width+"x"+i.height;p.cd=i.colorDepth;if(o){p.cookie=h.hasCookies(n)}return p}}())},{"../lib_managed/lodash":20,"browser-cookie-lite":1,jstimezonedetect:4,murmurhash:5}],18:[function(b,c,a){(function(){var g=b("../lib_managed/lodash"),e=b("browser-cookie-lite"),d=typeof a!=="undefined"?a:this;d.fixupTitle=function(i){if(!g.isString(i)){i=i.text||"";var h=document.getElementsByTagName("title");if(h&&!g.isUndefined(h[0])){i=h[0].text}}return i};d.getHostName=function(h){var j=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),i=j.exec(h);return i?i[1]:h};d.fixupDomain=function(i){var h=i.length;if(i.charAt(--h)==="."){i=i.slice(0,h)}if(i.slice(0,2)==="*."){i=i.slice(1)}return i};d.getReferrer=function(j){var i="";var h=d.fromQuerystring("referrer",window.location.href)||d.fromQuerystring("referer",window.location.href);if(h){return h}if(j){return j}try{i=window.top.document.referrer}catch(l){if(window.parent){try{i=window.parent.document.referrer}catch(k){i=""}}}if(i===""){i=document.referrer}return i};d.addEventListener=function(k,j,i,h){if(k.addEventListener){k.addEventListener(j,i,h);return true}if(k.attachEvent){return k.attachEvent("on"+j,i)}k["on"+j]=i};d.fromQuerystring=function(j,i){var h=new RegExp("^[^#]*[?&]"+j+"=([^&#]*)").exec(i);if(!h){return null}return decodeURIComponent(h[1].replace(/\+/g," "))};d.warn=function(h){if(typeof console!=="undefined"){console.warn("Snowplow: "+h)}};d.getCssClasses=function(h){return h.className.match(/\S+/g)||[]};function f(h,l){var k=d.getCssClasses(h),j;for(j=0;j=0){var m=l.slice(h,l.length).join(".");e.cookie(p,n,0,"/",m);if(e.cookie(p)===n){d.deleteCookie(p,m);var o=d.getCookiesWithPrefix(j);for(var k=0;kbF?0:(bF+bG)}bD=(bD===I||bD>bF)?bF:(+bD||0);if(bD<0){bD+=bF}bF=bG>bD?0:((bD-bG)>>>0);bG>>>=0;var bC=Array(bF);while(++bE-1?bH[bG]:I}return ag(bH,bE,bD)}}function ac(bC,bD){return function(bG,bF,bE){return(typeof bF=="function"&&bE===I&&h(bG))?bC(bG,bF):bD(bG,R(bF,bE,3))}}function bu(bC){return function(bF,bG,bE){var bD={};bG=ba(bG,bE,3);au(bF,function(bK,bJ,bI){var bH=bG(bK,bJ,bI);bJ=bC?bH:bJ;bK=bC?bK:bH;bD[bJ]=bK});return bD}}function bn(bJ,bK,bN,bD,bF,bG,bE){var bI=-1,bL=bJ.length,bM=bK.length;if(bL!=bM&&!(bF&&bM>bL)){return false}while(++bI-1&&bD%1==0&&bD-1&&bC%1==0&&bC<=ap}function aF(bC){return bC===bC&&!T(bC)}function ao(bF){var bI=a5(bF),bH=bI.length,bJ=bH&&bF.length;var bD=!!bJ&&aA(bJ)&&(h(bF)||j(bF)||bt(bF));var bE=-1,bC=[];while(++bE0,bK=bM.enumErrorProps&&(bE===o||bE instanceof Error),bP=bM.enumPrototypes&&bc(bE);while(++bJ1){s.bufferFlushers.push(function(){if(!h){z()}})}function o(I){var E="?",F={co:true,cx:true},D=true;for(var H in I){if(I.hasOwnProperty(H)&&!(F.hasOwnProperty(H))){if(!D){E+="&"}else{D=false}E+=encodeURIComponent(H)+"="+encodeURIComponent(I[H])}}for(var G in F){if(I.hasOwnProperty(G)&&F.hasOwnProperty(G)){E+="&"+G+"="+encodeURIComponent(I[G])}}return E}function B(D){var E=g.mapValues(D,function(F){return F.toString()});return{evt:E,bytes:C(JSON.stringify(E))}}function C(F){var D=0;for(var E=0;E=55296&&G<=57343){D+=4;E++}else{if(G<65535){D+=3}else{D+=4}}}}}return D}function t(G,F){w=F+r;if(x){var D=B(G);if(D.bytes>=j){f.warn("Event of size "+D.bytes+" is too long - the maximum size is "+j);var H=n(w);H.send(p(l([D.evt])));return}else{i.push(D)}}else{i.push(o(G))}var E=false;if(A){E=f.attemptWriteLocalStorage(k,JSON.stringify(i))}if(!h&&(!E||i.length>=m)){z()}}function z(){while(i.length&&typeof i[0]!=="string"&&typeof i[0]!=="object"){i.shift()}if(i.length<1){h=false;return}if(!g.isString(w)){throw"No Snowplow collector configured, cannot track"}h=true;var H=i[0];if(x){var I=n(w);var D=setTimeout(function(){I.abort();h=false},5000);function E(K){var M=0;var L=0;while(M=j){break}else{M+=1}}return M}var J=E(i);I.onreadystatechange=function(){if(I.readyState===4&&I.status>=200&&I.status<400){for(var K=0;K=400){clearTimeout(D);h=false}}};var F=g.map(i.slice(0,J),function(K){return K.evt});if(F.length>0){I.send(p(l(F)))}}else{var G=new Image(1,1);G.onload=function(){i.shift();if(A){f.attemptWriteLocalStorage(k,JSON.stringify(i))}z()};G.onerror=function(){h=false};G.src=w+H.replace("?","?stm="+new Date().getTime()+"&")}}function n(D){var E=new XMLHttpRequest();E.open("POST",D,true);E.withCredentials=true;E.setRequestHeader("Content-Type","application/json; charset=UTF-8");return E}function p(D){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:D})}function l(F){var D=new Date().getTime().toString();for(var E=0;E0}).length===0){break}}while(s.getTime()=0){bI=bI.slice(0,bH)}if((bH=bI.lastIndexOf("/"))!==bI.length-1){bI=bI.slice(0,bH+1)}return bI+bG}function ao(bI,bH){var bG=new Date();var bJ=!!g.cookie(aw);if(!(bn||bJ)){bp.enqueueRequest(bI.build(),x);D.expireDateTime=bG.getTime()+bH}}function R(bG){return bt+bG+"."+a2}function aq(bH){var bG=R(bH);if(aZ=="localStorage"){return f.attemptGetLocalStorage(bG)}else{if(aZ=="cookie"||aZ=="cookieAndLocalStorage"){return g.cookie(bG)}}}function aP(){bC();a2=al((J||bg)+(bu||"/")).slice(0,4)}function bh(){var bG=new Date();aW=bG.getTime()}function a7(){aC();bh()}function aI(){var bG=(ay.compatMode&&ay.compatMode!=="BackCompat")?ay.documentElement:ay.body;return[bG.scrollLeft||am.pageXOffset,bG.scrollTop||am.pageYOffset]}function aO(){var bH=aI();var bG=bH[0];aR=bG;aF=bG;var bI=bH[1];az=bI;ag=bI}function aC(){var bH=aI();var bG=bH[0];if(bGaF){aF=bG}}var bI=bH[1];if(bIag){ag=bI}}}function Z(bH){var bG=Math.round(bH);if(!isNaN(bG)){return bG}}function ax(){var bH=R("ses");var bG="*";bb(bH,bG,S)}function br(bI,bH,bG,bK,bJ,bM){var bN=R("id");var bL=bI+"."+bH+"."+bG+"."+bK+"."+bJ+"."+bM;bb(bN,bL,N)}function bb(bG,bI,bH){if(aZ=="localStorage"){f.attemptWriteLocalStorage(bG,bI)}else{if(aZ=="cookie"||aZ=="cookieAndLocalStorage"){g.cookie(bG,bI,bH,bu,J)}}}function aQ(){return d.v4()}function C(){var bH=aZ!="none"&&!!aq("ses");var bG=a9();if(bG[1]){au=bG[1]}else{au=aQ();bG[1]=au}ac=bG[6];if(!bH){bG[3]++;ac=d.v4();bG[6]=ac;bG[5]=bG[4]}if(aZ!="none"){ax();bG[4]=Math.round(new Date().getTime()/1000);bG.shift();br.apply(null,bG)}}function a9(){if(aZ=="none"){return[]}var bH=new Date(),bG=Math.round(bH.getTime()/1000),bJ=aq("id"),bI;if(bJ){bI=bJ.split(".");bI.unshift("0")}else{bI=["1",au,bG,0,bG,""]}if(!bI[6]){bI[6]=d.v4()}return bI}function O(bN){var bI=Math.round(new Date().getTime()/1000),bL=R("id"),bK=R("ses"),bP=aq("ses"),bH=a9(),bQ=bH[0],bO=bH[1],bT=bH[2],bJ=bH[3],bS=bH[4],bG=bH[5],bM=bH[6];var bR=!!g.cookie(aw);if((bn||bR)&&aZ!="none"){if(aZ=="localStorage"){f.attemptWriteLocalStorage(bL,"");f.attemptWriteLocalStorage(sesName,"")}else{if(aZ=="cookie"||aZ=="cookieAndLocalStorage"){g.cookie(bL,"",-1,bu,J);g.cookie(bK,"",-1,bu,J)}}return}if(bQ==="0"){ac=bM;if(!bP&&aZ!="none"){bJ++;bG=bS;ac=d.v4()}ab=bJ}else{if((new Date().getTime()-bs)>S*1000){ac=d.v4();ab++}}bN.add("vp",n.detectViewport());bN.add("ds",n.detectDocumentSize());bN.add("vid",ab);bN.add("sid",ac);bN.add("duid",bO);bN.add("fp",y);bN.add("uid",bE);bC();bN.add("refr",bo(ap||aX));bN.add("url",bo(aE||bw));if(aZ!="none"){br(bO,bT,ab,bI,bG,ac);ax()}bs=new Date().getTime()}function an(bG){return be(bG+".cloudfront.net")}function be(bG){if(a5){return("https://"+bG)}if(ah){return("http://"+bG)}return("https:"===ay.location.protocol?"https":"http")+"://"+bG}function bq(bN){var bK=bA.concat(bN||[]);if(by.webPage){bK.push(bi())}if(by.performanceTiming){var bP=T();if(bP){bK.push(bP)}}if(am.optimizely){if(by.optimizelySummary){var bM=ak();q.each(bM,function(bT){bK.push(bT)})}if(by.optimizelyXSummary){var bM=a3();q.each(bM,function(bT){bK.push(bT)})}if(by.optimizelyExperiments){var bG=ai();for(var bL=0;bLbQ.getTime()){if(G>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n>>6-2*r);return t}},t.exports=r},{}],4:[function(e,t,n){var r,a,o,i,c,s;r=this,a=function(e){var t=-e.getTimezoneOffset();return null!==t?t:0},o=function(e,t,n){var r=new Date;return void 0!==e&&r.setFullYear(e),r.setMonth(t),r.setDate(n),r},i=function(e){return a(o(e,0,2))},c=function(e){return a(o(e,5,2))},(s={determine:function(){var e,t,n,r=(e=i(),t=c(),(n=e-t)<0?e+",1":0>>16)*i&65535)<<16)&4294967295)<<15|s>>>17))*c+(((s>>>16)*c&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(s=0,n){case 3:s^=(255&e.charCodeAt(u+2))<<16;case 2:s^=(255&e.charCodeAt(u+1))<<8;case 1:a^=s=(65535&(s=(s=(65535&(s^=255&e.charCodeAt(u)))*i+(((s>>>16)*i&65535)<<16)&4294967295)<<15|s>>>17))*c+(((s>>>16)*c&65535)<<16)&4294967295}return a^=e.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}var n=t;if(n.v2=function(e,t){for(var n,r=e.length,a=t^r,o=0;4<=r;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:a^=(255&e.charCodeAt(o+2))<<16;case 2:a^=(255&e.charCodeAt(o+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(o)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0},n.v3=t,void 0!==a)a.exports=n;else{var r=e.murmur;n.noConflict=function(){return e.murmur=r,n},e.murmur=n}}()},{}],154:[function(e,t,n){var y,_,r,a;y=e("crypt"),_=e("charenc").utf8,r=e("charenc").bin,(a=function(e,t){var n=y.wordsToBytes(function(e){e.constructor==String&&(e=_.stringToBytes(e));var t=y.bytesToWords(e),n=8*e.length,r=[],a=1732584193,o=-271733879,i=-1732584194,c=271733878,s=-1009589776;t[n>>5]|=128<<24-n%32,t[15+(n+64>>>9<<4)]=n;for(var u=0;u>>31}var g=(a<<5|a>>>27)+s+(r[m]>>>0)+(m<20?1518500249+(o&i|~o&c):m<40?1859775393+(o^i^c):m<60?(o&i|o&c|i&c)-1894007588:(o^i^c)-899497514);s=c,c=i,i=o<<30|o>>>2,o=a,a=g}a+=l,o+=f,i+=d,c+=p,s+=h}return[a,o,i,c,s]}(e));return t&&t.asBytes?n:t&&t.asString?r.bytesToString(n):y.bytesToHex(n)})._blocksize=16,a._digestsize=20,t.exports=a},{charenc:2,crypt:3}],155:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var r=e("./lib/core");n.trackerCore=r.trackerCore},{"./lib/core":158}],156:[function(e,t,n){function r(e){var t,n,r,a,o,i,c,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u=0,l=0,f="",d=[];if(!e)return e;for(e+="";t=(i=s.indexOf(e.charAt(u++))<<18|s.indexOf(e.charAt(u++))<<12|(a=s.indexOf(e.charAt(u++)))<<6|(o=s.indexOf(e.charAt(u++))))>>16&255,n=i>>8&255,r=255&i,d[l++]=64===a?String.fromCharCode(t):64===o?String.fromCharCode(t,n):String.fromCharCode(t,n,r),u>18&63,n=o>>12&63,r=o>>6&63,a=63&o,l[u++]=c.charAt(t)+c.charAt(n)+c.charAt(r)+c.charAt(a),s>>((3&t)<<3)&255;return a}}o.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],161:[function(e,t,n){for(var i=e("./rng"),a=[],o={},r=0;r<256;r++)a[r]=(r+256).toString(16).substr(1),o[a[r]]=r;function p(e,t){var n=t||0,r=a;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}var c=i(),h=[1|c[0],c[1],c[2],c[3],c[4],c[5]],m=16383&(c[6]<<8|c[7]),v=0,g=0;function s(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var o=0;o<16;o++)t[r+o]=a[o];return t||p(a)}var u=s;u.v1=function(e,t,n){var r=t&&n||0,a=t||[],o=void 0!==(e=e||{}).clockseq?e.clockseq:m,i=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:g+1,s=i-v+(c-g)/1e4;if(s<0&&void 0===e.clockseq&&(o=o+1&16383),(s<0||v>>24&255,a[r++]=u>>>16&255,a[r++]=u>>>8&255,a[r++]=255&u;var l=i/4294967296*1e4&268435455;a[r++]=l>>>8&255,a[r++]=255&l,a[r++]=l>>>24&15|16,a[r++]=l>>>16&255,a[r++]=o>>>8|128,a[r++]=255&o;for(var f=e.node||h,d=0;d<6;d++)a[r+d]=f[d];return t||p(a)},u.v4=s,u.parse=function(e,t,n){var r=t&&n||0,a=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){a<16&&(t[r+a++]=o[e])});a<16;)t[r+a++]=0;return t},u.unparse=p,t.exports=u},{"./rng":160}],162:[function(e,t,n){var u=e("lodash/isFunction"),r=e("./lib/helpers"),a=window;(void 0!==n?n:this).errorManager=function(c){function s(e,t,n,r,a,o){var i=a&&a.stack?a.stack:null;c.trackSelfDescribingEvent({schema:"iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-1",data:{programmingLanguage:"JAVASCRIPT",message:e||"JS Exception. Browser doesn't support ErrorEvent API",stackTrace:i,lineNumber:n,lineColumn:r,fileName:t}},o)}return{trackError:s,enableErrorTracking:function(o,i,c){r.addEventListener(a,"error",function(e){var t,n,r,a;(u(o)&&o(e)||null==o)&&(t=e,n=c,a=u(r=i)?n.concat(r(t)):n,s(t.message,t.filename,t.lineno,t.colno,t.error,a))},!0)}}}},{"./lib/helpers":167,"lodash/isFunction":133}],163:[function(e,t,n){var p=e("lodash/forEach"),h=e("lodash/filter"),m=e("lodash/find"),v=e("./lib/helpers");(void 0!==n?n:this).getFormTrackingManager=function(i,e,c){var s=["textarea","input","select"],u=e+"form",r=function(){return!0},a=function(){return!0},l=function(e){return e};function f(t){return t[m(["name","id","type","nodeName"],function(e){return t[e]&&"string"==typeof t[e]})]}function o(a){return function(e){var t=e.target,n=t.nodeName&&"INPUT"===t.nodeName.toUpperCase()?t.type:null,r="checkbox"!==t.type||t.checked?l(t.value):null;i.trackFormChange(function(e){for(;e&&e.nodeName&&"HTML"!==e.nodeName.toUpperCase()&&"FORM"!==e.nodeName.toUpperCase();)e=e.parentNode;if(e&&e.nodeName&&"FORM"===e.nodeName.toUpperCase())return f(e)}(t),f(t),t.nodeName,n,v.getCssClasses(t),r,c(a))}}function d(o){return function(e){var n,r,t=e.target,a=(n=t,r=[],p(s,function(e){var t=h(n.getElementsByTagName(e),function(e){return e.hasOwnProperty(u)});p(t,function(e){if("submit"!==e.type){var t={name:f(e),value:e.value,nodeName:e.nodeName};e.type&&"INPUT"===e.nodeName.toUpperCase()&&(t.type=e.type),"checkbox"!==e.type&&"radio"!==e.type||e.checked||(t.value=null),r.push(t)}})}),r);p(a,function(e){e.value=l(e.value)}),i.trackFormSubmission(f(t),v.getCssClasses(t),a,c(o))}}return{configureFormTracking:function(e){e&&(r=v.getFilter(e.forms,!0),a=v.getFilter(e.fields,!1),l=v.getTransform(e.fields))},addFormListeners:function(n){p(document.getElementsByTagName("form"),function(t){r(t)&&!t[u]&&(p(s,function(e){p(t.getElementsByTagName(e),function(e){a(e)&&!e[u]&&"password"!==e.type.toLowerCase()&&(v.addEventListener(e,"change",o(n),!1),e[u]=!0)})}),v.addEventListener(t,"submit",d(n)),t[u]=!0)})}}}},{"./lib/helpers":167,"lodash/filter":120,"lodash/find":121,"lodash/forEach":123}],164:[function(e,t,n){!function(){var c=e("lodash/map"),v=e("lodash/isUndefined"),g=e("lodash/isFunction"),y=e("./lib/helpers");(void 0!==n?n:this).InQueueManager=function(r,a,o,e,i){var p={};function h(e){var t=[];if(e&&0!==e.length)for(var n=0;n1e3*K&&(k=ot.v4(),ce++);e.add("vp",Ze.detectViewport()),e.add("ds",Ze.detectDocumentSize()),e.add("vid",ce),e.add("sid",k),e.add("duid",c),e.add("fp",ne),e.add("uid",A),be(),e.add("refr",Ae(h||D)),e.add("url",Ae(m||L)),"none"!=X&&(De(c,s,ce,t,f,k),Le());oe=(new Date).getTime()}(e),t=e,n=z,r=new Date,a=!!$e.cookie(v),H||a||(de.enqueueRequest(t.build(),o),s.expireDateTime=r.getTime()+n)}),T=document,I=window,O=navigator,E=Ye.fixupUrl(T.domain,I.location.href,Qe.getReferrer()),P=Qe.fixupDomain(E[0]),L=E[1],D=E[2],M=(r=r||{}).hasOwnProperty("platform")?r.platform:"web",N=r.hasOwnProperty("appId")?r.appId:"",F=T.title,z=r.hasOwnProperty("pageUnloadTimer")?r.pageUnloadTimer:500,U=!1,B=r.hasOwnProperty("cookieName")?r.cookieName:"_sp_",G=r.hasOwnProperty("cookieDomain")?r.cookieDomain:null,q="/",R=O.doNotTrack||O.msDoNotTrack||I.doNotTrack,H=!!r.hasOwnProperty("respectDoNotTrack")&&(r.respectDoNotTrack&&("yes"===R||"1"===R)),V=r.hasOwnProperty("cookieLifetime")?r.cookieLifetime:63072e3,K=r.hasOwnProperty("sessionCookieTimeout")?r.sessionCookieTimeout:1800,J=r.hasOwnProperty("userFingerprintSeed")?r.userFingerprintSeed:123412414,W=T.characterSet||T.charset,Q=!!r.hasOwnProperty("forceSecureTracker")&&!0===r.forceSecureTracker,Y=!(Q||!r.hasOwnProperty("forceUnsecureTracker"))&&!0===r.forceUnsecureTracker,$=!r.hasOwnProperty("useLocalStorage")||(Qe.warn("argmap.useLocalStorage is deprecated. Use argmap.stateStorageStrategy instead."),r.useLocalStorage),Z=!r.hasOwnProperty("useCookies")||(Qe.warn("argmap.useCookies is deprecated. Use argmap.stateStorageStrategy instead."),r.useCookies),X=r.hasOwnProperty("stateStorageStrategy")?r.stateStorageStrategy:Z||$?Z&&$?"cookieAndLocalStorage":Z?"cookie":"localStorage":"none",ee=O.userLanguage||O.language,te=Ze.detectBrowserFeatures("cookie"==X||"cookieAndLocalStorage"==X,Ce("testcookie")),ne=!1===r.userFingerprint?"":Ze.detectSignature(J),re=e+"_"+t,ae=!1,oe=(new Date).getTime(),ie=Xe,ce=1,se={transaction:{},items:[]},ue=et.getLinkTrackingManager(j,re,ze),le=tt.getFormTrackingManager(j,re,ze),fe=nt.errorManager(j),de=new rt.OutQueueManager(e,t,s,"localStorage"==X||"cookieAndLocalStorage"==X,r.post,r.bufferSize,r.maxPostBytes||4e4),pe=!1,he=r.contexts||{},me=[],ve=[],ge=!1,ye=!1;for(var _e in r.hasOwnProperty("discoverRootDomain")&&r.discoverRootDomain&&(G=Qe.findRootDomain()),he.gaCookies&&me.push((x={},Je(["__utma","__utmb","__utmc","__utmv","__utmz","_ga"],function(e){var t=$e.cookie(e);t&&(x[e]=t)}),{schema:"iglu:com.google.analytics/cookies/jsonschema/1-0-0",data:x})),he.geolocation&&qe(),j.setBase64Encoding(!r.hasOwnProperty("encodeBase64")||r.encodeBase64),j.setTrackerVersion(n),j.setTrackerNamespace(t),j.setAppId(N),j.setPlatform(M),j.setTimezone(Ze.detectTimezone()),j.addPayloadPair("lang",ee),j.addPayloadPair("cs",W),te)Object.prototype.hasOwnProperty.call(te,_e)&&("res"===_e||"cd"===_e||"cookie"===_e?j.addPayloadPair(_e,te[_e]):j.addPayloadPair("f_"+_e,te[_e]));function be(){(E=Ye.fixupUrl(T.domain,I.location.href,Qe.getReferrer()))[1]!==L&&(D=Qe.getReferrer(L)),P=Qe.fixupDomain(E[0]),L=E[1]}function we(){var e=(new Date).getTime();this.href&&(this.href=Qe.decorateQuerystring(this.href,"_sp",w+"."+e))}function ke(e){for(var t=0;te.getTime()&&f