@snowplow/browser-tracker
Advanced tools
Comparing version 4.0.2 to 4.0.3
/*! | ||
* Browser tracker for Snowplow v4.0.2 (http://bit.ly/sp-js) | ||
* Browser tracker for Snowplow v4.0.3 (http://bit.ly/sp-js) | ||
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -4,0 +4,0 @@ * Licensed under BSD-3-Clause |
/*! | ||
* Browser tracker for Snowplow v4.0.2 (http://bit.ly/sp-js) | ||
* Browser tracker for Snowplow v4.0.3 (http://bit.ly/sp-js) | ||
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -12,5 +12,5 @@ * Licensed under BSD-3-Clause | ||
5]]+"-"+M[a[b+6]]+M[a[b+7]]+"-"+M[a[b+8]]+M[a[b+9]]+"-"+M[a[b+10]]+M[a[b+11]]+M[a[b+12]]+M[a[b+13]]+M[a[b+14]]+M[a[b+15]]).toLowerCase()}function Qc(){if(!Xa&&(Xa="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xa))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xa(Rc)}function la(a,b,c){if(ac.randomUUID&&!b&&!a)return ac.randomUUID();a=a||{};a=a.random||(a.rng||Qc)();a[6]=a[6]& | ||
15|64;a[8]=a[8]&63|128;if(b){c=c||0;for(var d=0;16>d;++d)b[c+d]=a[d];return b}return Pc(a)}function Sc(a){var b=0,c=0;var d="";var f=[];if(!a)return a;a+="";do{var g=qa.indexOf(a.charAt(b++));var h=qa.indexOf(a.charAt(b++));d=qa.indexOf(a.charAt(b++));var k=qa.indexOf(a.charAt(b++));var p=g<<18|h<<12|d<<6|k;g=p>>16&255;h=p>>8&255;p&=255;64===d?f[c++]=String.fromCharCode(g):64===k?f[c++]=String.fromCharCode(g,h):f[c++]=String.fromCharCode(g,h,p)}while(b<a.length);d=f.join("");return function(m){return decodeURIComponent(m.split("").map(function(q){return"%"+ | ||
15|64;a[8]=a[8]&63|128;if(b){c=c||0;for(var d=0;16>d;++d)b[c+d]=a[d];return b}return Pc(a)}function Sc(a){var b=0,c=0;var d="";var f=[];if(!a)return a;a+="";do{var g=ra.indexOf(a.charAt(b++));var h=ra.indexOf(a.charAt(b++));d=ra.indexOf(a.charAt(b++));var k=ra.indexOf(a.charAt(b++));var p=g<<18|h<<12|d<<6|k;g=p>>16&255;h=p>>8&255;p&=255;64===d?f[c++]=String.fromCharCode(g):64===k?f[c++]=String.fromCharCode(g,h):f[c++]=String.fromCharCode(g,h,p)}while(b<a.length);d=f.join("");return function(m){return decodeURIComponent(m.split("").map(function(q){return"%"+ | ||
("00"+q.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(d.replace(/\0+$/,""))}function Ya(){var a={},b=[],c=[],d=[],f,g=function(h,k){null!=k&&""!==k&&(a[h]=k)};return{add:g,addDict:function(h){for(var k in h)Object.prototype.hasOwnProperty.call(h,k)&&g(k,h[k])},addJson:function(h,k,p){p&&bc(p)&&(h={keyIfEncoded:h,keyIfNotEncoded:k,json:p},c.push(h),b.push(h))},addContextEntity:function(h){d.push(h)},getPayload:function(){return a},getJson:function(){return b},withJsonProcessor:function(h){f=h}, | ||
build:function(){null===f||void 0===f?void 0:f(this,c,d);return a}}}function Tc(a){return function(b,c,d){for(var f=function(m,q,u){m=JSON.stringify(m);if(a){u=b.add;if(m){var t=0,l=0,w=[];if(m){m=unescape(encodeURIComponent(m));do{var G=m.charCodeAt(t++);var N=m.charCodeAt(t++);var E=m.charCodeAt(t++);var J=G<<16|N<<8|E;G=J>>18&63;N=J>>12&63;E=J>>6&63;J&=63;w[l++]=qa.charAt(G)+qa.charAt(N)+qa.charAt(E)+qa.charAt(J)}while(t<m.length);t=w.join("");m=m.length%3;m=(m?t.slice(0,m-3):t)+"===".slice(m|| | ||
build:function(){null===f||void 0===f?void 0:f(this,c,d);return a}}}function Tc(a){return function(b,c,d){for(var f=function(m,q,u){m=JSON.stringify(m);if(a){u=b.add;if(m){var t=0,l=0,w=[];if(m){m=unescape(encodeURIComponent(m));do{var G=m.charCodeAt(t++);var N=m.charCodeAt(t++);var E=m.charCodeAt(t++);var J=G<<16|N<<8|E;G=J>>18&63;N=J>>12&63;E=J>>6&63;J&=63;w[l++]=ra.charAt(G)+ra.charAt(N)+ra.charAt(E)+ra.charAt(J)}while(t<m.length);t=w.join("");m=m.length%3;m=(m?t.slice(0,m-3):t)+"===".slice(m|| | ||
3)}m=m.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}u.call(b,q,m)}else b.add(u,m)},g=function(m,q){if(!m){var u=b.getPayload();if(a?u.cx:u.co){m=JSON;var t=m.parse;if(a){if(u=u.cx){switch(4-u.length%4){case 2:u+="==";break;case 3:u+="="}u=u.replace(/-/g,"+").replace(/_/g,"/");u=Sc(u)}}else u=u.co;m=t.call(m,u)}else m=void 0}m?m.data=m.data.concat(q.data):m=q;return m},h=void 0,k=0;k<c.length;k++){var p=c[k];"cx"===p.keyIfEncoded?h=g(h,p.json):f(p.json,p.keyIfEncoded,p.keyIfNotEncoded)}c.length= | ||
@@ -39,14 +39,14 @@ 0;d.length&&(c={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:aa([],d,!0)},h=g(h,c),d.length=0);h&&f(h,"cx","co")}}function bc(a){if(!cc(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b))return!0;return!1}function cc(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function Uc(){var a=[],b=[],c={},d={};return{getGlobalPrimitives:function(){return a.concat(Object.values(c))},getConditionalProviders:function(){return b.concat(Object.values(d))}, | ||
f="?"+q.join("&")}return f}function d(){null===g&&(g=gd(b()));return g}var f=null,g=null,h=null,k=null;return{getPayload:b,getServerAnonymization:function(){var p;return null!==(p=a.svrAnon)&&void 0!==p?p:!1},getGETRequestURL:function(p,m){var q=c(b());return m?p+q.replace("?","?stm="+(new Date).getTime()+"&"):p+q},getGETRequestBytesCount:function(){if(null===h){var p=c(b());h=lc(p)}return h},getPOSTRequestBody:d,getPOSTRequestBytesCount:function(){null===k&&(k=lc(JSON.stringify(d())));return k}}} | ||
function hd(a){function b(z){return 200<=z&&300>z||!fa?!1:O.includes(z)?!0:!D.includes(z)}function c(z,F){void 0!==va&&setTimeout(function(){try{null===va||void 0===va?void 0:va(z,F)}catch(L){R.error("Error in onRequestSuccess",L)}},0)}function d(z,F){void 0!==ra&&setTimeout(function(){try{null===ra||void 0===ra?void 0:ra(z,F)}catch(L){R.error("Error in onRequestFailure",L)}},0)}function f(z){return ka(this,void 0,void 0,function(){var F,L,K,ia,C,T;return Ma(this,function(X){switch(X.label){case 0:F= | ||
z.toRequest();if(void 0===F)throw Error("Empty batch");L=z.getEvents().map(function(wa){return wa.getPayload()});X.label=1;case 1:return X.trys.push([1,4,,5]),[4,Pa(F)];case 2:return K=X.sent(),[4,K.text()];case 3:X.sent();z.closeRequest(!0);if(K.ok)return c(L,K),[2,{success:!0,retry:!1,status:K.status}];ia=b(K.status);d({events:L,status:K.status,message:K.statusText,willRetry:ia},K);return[2,{success:!1,retry:ia,status:K.status}];case 4:return C=X.sent(),z.closeRequest(!1),T="string"===typeof C? | ||
C:C?C.message:"Unknown error",d({events:L,message:T,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function g(){return fd({endpoint:m,protocol:l,port:w,eventMethod:u,customHeaders:J,connectionTimeout:Q,keepalive:W,maxPostBytes:G,useStm:bb,credentials:xa,postPath:t})}function h(){return ka(this,void 0,void 0,function(){var z;return Ma(this,function(F){switch(F.label){case 0:if(!ha||Qa)return[3,2];Qa=!0;z=new Request(ha,{method:"GET"});return[4,Pa(z)];case 1:F.sent(),F.label=2;case 2:return[2]}})})} | ||
function k(){return ka(this,void 0,void 0,function(){var z;return Ma(this,function(F){switch(F.label){case 0:if(Da)return[3,5];Da=!0;F.label=1;case 1:return F.trys.push([1,3,4,5]),[4,p()];case 2:return F.sent(),[3,5];case 3:return z=F.sent(),R.error("Error sending events",z),[3,5];case 4:return Da=!1,[7];case 5:return[2]}})})}function p(){return ka(this,void 0,void 0,function(){var z,F,L,K,ia,C,T,X,wa,Ea;return Ma(this,function(Y){switch(Y.label){case 0:return[4,h()];case 1:Y.sent(),z=g(),F=Fa.iterator(), | ||
Y.label=2;case 2:return z.isFull()?[3,4]:[4,F.next()];case 3:L=Y.sent();K=L.value;if((ia=L.done)||void 0===K)return[3,4];C=mc(K);return z.addEvent(C)?[3,2]:[3,4];case 4:return 0===z.countEvents()?[2]:[4,f(z)];case 5:T=Y.sent();X=T.success;wa=T.retry;Ea=T.status;if(!X&&wa)return[3,7];X||R.error("Status ".concat(Ea,", will not retry."));return[4,Fa.removeHead(z.countEvents())];case 6:Y.sent(),Y.label=7;case 7:return X?[4,p()]:[3,9];case 8:Y.sent(),Y.label=9;case 9:return[2]}})})}var m=a.endpoint,q= | ||
a.eventMethod,u=void 0===q?"post":q,t=a.postPath,l=a.protocol,w=a.port;q=a.maxPostBytes;var G=void 0===q?4E4:q,N=a.maxGetBytes;q=a.bufferSize;var E=void 0===q?1:q,J=a.customHeaders,y=a.serverAnonymization,Q=a.connectionTimeout,W=a.keepalive,ha=a.idService;q=a.dontRetryStatusCodes;var D=void 0===q?[]:q;q=a.retryStatusCodes;var O=void 0===q?[]:q;q=a.retryFailedRequests;var fa=void 0===q?!0:q,ra=a.onRequestFailure,va=a.onRequestSuccess;q=a.customFetch;var Pa=void 0===q?fetch:q,bb=a.useStm;q=a.eventStore; | ||
var Fa=void 0===q?rb({}):q,xa=a.credentials,Qa=!1,Da=!1,ya="post"===u.toLowerCase();D=D.concat([400,401,403,410,422]);return{flush:k,input:function(z){return ka(this,void 0,void 0,function(){var F,L,K,ia;return Ma(this,function(C){switch(C.label){case 0:C=y;F={payload:z,svrAnon:void 0===C?!1:C};L=mc(F);a:{C=L;if(ya){C=C.getPOSTRequestBytesCount()+88;var T=C>G;T&&R.warn("Event ("+C+"B) too big, max is "+G)}else{if(void 0===N){C=!1;break a}C=C.getGETRequestBytesCount();(T=C>N)&&R.warn("Event ("+C+"B) too big, max is "+ | ||
N)}C=T}if(!C)return[3,2];K=g();K.addEvent(L);return[4,f(K)];case 1:return C.sent(),[3,5];case 2:return[4,Fa.add(F)];case 3:return ia=C.sent(),ia>=E?[4,k()]:[3,5];case 4:C.sent(),C.label=5;case 5:return[2]}})})},setCollectorUrl:function(z){m=z},setAnonymousTracking:function(z){y=z},setBufferSize:function(z){E=z}}}function nc(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function oc(a){try{return window.sessionStorage.getItem(a)}catch(b){}}function id(a, | ||
function hd(a){function b(z){return 200<=z&&300>z||!fa?!1:O.includes(z)?!0:!D.includes(z)}function c(z,F){void 0!==wa&&setTimeout(function(){try{null===wa||void 0===wa?void 0:wa(z,F)}catch(L){R.error("Error in onRequestSuccess",L)}},0)}function d(z,F){void 0!==sa&&setTimeout(function(){try{null===sa||void 0===sa?void 0:sa(z,F)}catch(L){R.error("Error in onRequestFailure",L)}},0)}function f(z){return ka(this,void 0,void 0,function(){var F,L,K,ia,C,T;return Ma(this,function(X){switch(X.label){case 0:F= | ||
z.toRequest();if(void 0===F)throw Error("Empty batch");L=z.getEvents().map(function(xa){return xa.getPayload()});X.label=1;case 1:return X.trys.push([1,4,,5]),[4,Pa(F)];case 2:return K=X.sent(),[4,K.text()];case 3:X.sent();z.closeRequest(!0);if(K.ok)return c(L,K),[2,{success:!0,retry:!1,status:K.status}];ia=b(K.status);d({events:L,status:K.status,message:K.statusText,willRetry:ia},K);return[2,{success:!1,retry:ia,status:K.status}];case 4:return C=X.sent(),z.closeRequest(!1),T="string"===typeof C? | ||
C:C?C.message:"Unknown error",d({events:L,message:T,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function g(){return fd({endpoint:m,protocol:l,port:w,eventMethod:u,customHeaders:J,connectionTimeout:Q,keepalive:W,maxPostBytes:G,useStm:bb,credentials:ya,postPath:t})}function h(){return ka(this,void 0,void 0,function(){var z;return Ma(this,function(F){switch(F.label){case 0:if(!ha||Qa)return[3,2];Qa=!0;z=new Request(ha,{method:"GET"});return[4,Pa(z)];case 1:F.sent(),F.label=2;case 2:return[2]}})})} | ||
function k(){return ka(this,void 0,void 0,function(){var z;return Ma(this,function(F){switch(F.label){case 0:if(Ea)return[3,5];Ea=!0;F.label=1;case 1:return F.trys.push([1,3,4,5]),[4,p()];case 2:return F.sent(),[3,5];case 3:return z=F.sent(),R.error("Error sending events",z),[3,5];case 4:return Ea=!1,[7];case 5:return[2]}})})}function p(){return ka(this,void 0,void 0,function(){var z,F,L,K,ia,C,T,X,xa,Fa;return Ma(this,function(Y){switch(Y.label){case 0:return[4,h()];case 1:Y.sent(),z=g(),F=Ga.iterator(), | ||
Y.label=2;case 2:return z.isFull()?[3,4]:[4,F.next()];case 3:L=Y.sent();K=L.value;if((ia=L.done)||void 0===K)return[3,4];C=mc(K);return z.addEvent(C)?[3,2]:[3,4];case 4:return 0===z.countEvents()?[2]:[4,f(z)];case 5:T=Y.sent();X=T.success;xa=T.retry;Fa=T.status;if(!X&&xa)return[3,7];X||R.error("Status ".concat(Fa,", will not retry."));return[4,Ga.removeHead(z.countEvents())];case 6:Y.sent(),Y.label=7;case 7:return X?[4,p()]:[3,9];case 8:Y.sent(),Y.label=9;case 9:return[2]}})})}var m=a.endpoint,q= | ||
a.eventMethod,u=void 0===q?"post":q,t=a.postPath,l=a.protocol,w=a.port;q=a.maxPostBytes;var G=void 0===q?4E4:q,N=a.maxGetBytes;q=a.bufferSize;var E=void 0===q?1:q,J=a.customHeaders,y=a.serverAnonymization,Q=a.connectionTimeout,W=a.keepalive,ha=a.idService;q=a.dontRetryStatusCodes;var D=void 0===q?[]:q;q=a.retryStatusCodes;var O=void 0===q?[]:q;q=a.retryFailedRequests;var fa=void 0===q?!0:q,sa=a.onRequestFailure,wa=a.onRequestSuccess;q=a.customFetch;var Pa=void 0===q?fetch:q,bb=a.useStm;q=a.eventStore; | ||
var Ga=void 0===q?rb({}):q,ya=a.credentials,Qa=!1,Ea=!1,za="post"===u.toLowerCase();D=D.concat([400,401,403,410,422]);return{flush:k,input:function(z){return ka(this,void 0,void 0,function(){var F,L,K,ia;return Ma(this,function(C){switch(C.label){case 0:C=y;F={payload:z,svrAnon:void 0===C?!1:C};L=mc(F);a:{C=L;if(za){C=C.getPOSTRequestBytesCount()+88;var T=C>G;T&&R.warn("Event ("+C+"B) too big, max is "+G)}else{if(void 0===N){C=!1;break a}C=C.getGETRequestBytesCount();(T=C>N)&&R.warn("Event ("+C+"B) too big, max is "+ | ||
N)}C=T}if(!C)return[3,2];K=g();K.addEvent(L);return[4,f(K)];case 1:return C.sent(),[3,5];case 2:return[4,Ga.add(F)];case 3:return ia=C.sent(),ia>=E?[4,k()]:[3,5];case 4:C.sent(),C.label=5;case 5:return[2]}})})},setCollectorUrl:function(z){m=z},setAnonymousTracking:function(z){y=z},setBufferSize:function(z){E=z}}}function nc(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function oc(a){try{return window.sessionStorage.getItem(a)}catch(b){}}function id(a, | ||
b,c){var d,f=(new Date).getTime();b=P(P({},jd),b);var g=c.domainUserId,h=c.userId,k=c.sessionId,p=c.sourceId,m=c.sourcePlatform,q=c.event,u=q.currentTarget;q="function"===typeof b.reason?b.reason(q):null===(d=null===u||void 0===u?void 0:u.textContent)||void 0===d?void 0:d.trim();return a?[g,f,b.sessionId&&k,b.userId&&sb(h||""),b.sourceId&&sb(p||""),b.sourcePlatform&&m,b.reason&&sb(q||"")].map(function(t){return t||""}).join(".").replace(/([.]*$)/,""):c.domainUserId+"."+f}function sb(a){return btoa(a).replace(/\+/g, | ||
"-").replace(/\//g,"_").replace(/=+$/,"")}function pc(a){return Number.isInteger&&Number.isInteger(a)||"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function qc(a){var b=a&&"string"===typeof a.valueOf()?!0:!1;b||(a=a.text||"",(b=document.getElementsByTagName("title"))&&null!=b[0]&&(a=b[0].text));return a}function tb(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return b?b[1]:a}function rc(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1)); | ||
return a}function ub(a){var b=window,c=Ra("referrer",b.location.href)||Ra("referer",b.location.href);if(c)return c;if(a)return a;try{if(b.top)return b.top.document.referrer;if(b.parent)return b.parent.document.referrer}catch(d){}return document.referrer}function Ga(a,b,c,d){if(a.addEventListener)return a.addEventListener(b,c,d),!0;if(a.attachEvent)return a.attachEvent("on"+b,c);a["on"+b]=c}function Ra(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g, | ||
" ")):null}function kd(a,b){for(var c=window.location.hostname,d="_sp_root_domain_test_"+(new Date).getTime(),f="_test_value_"+(new Date).getTime(),g=c.split("."),h=g.length-2;0<=h;h--){var k=g.slice(h).join(".");sa(d,f,0,"/",k,a,b);if(sa(d)===f){cb(d,"/",k,a,b);c=document.cookie.split("; ");d=[];for(f=0;f<c.length;f++)"_sp_root_domain_test_"===c[f].substring(0,21)&&d.push(c[f]);c=d;for(d=0;d<c.length;d++)cb(c[d],"/",k,a,b);return k}}return c}function cb(a,b,c,d,f){sa(a,"",-1,b,c,d,f)}function sa(a, | ||
return a}function ub(a){var b=window,c=Ra("referrer",b.location.href)||Ra("referer",b.location.href);if(c)return c;if(a)return a;try{if(b.top)return b.top.document.referrer;if(b.parent)return b.parent.document.referrer}catch(d){}return document.referrer}function Ha(a,b,c,d){if(a.addEventListener)return a.addEventListener(b,c,d),!0;if(a.attachEvent)return a.attachEvent("on"+b,c);a["on"+b]=c}function Ra(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g, | ||
" ")):null}function kd(a,b){for(var c=window.location.hostname,d="_sp_root_domain_test_"+(new Date).getTime(),f="_test_value_"+(new Date).getTime(),g=c.split("."),h=g.length-2;0<=h;h--){var k=g.slice(h).join(".");ta(d,f,0,"/",k,a,b);if(ta(d)===f){cb(d,"/",k,a,b);c=document.cookie.split("; ");d=[];for(f=0;f<c.length;f++)"_sp_root_domain_test_"===c[f].substring(0,21)&&d.push(c[f]);c=d;for(d=0;d<c.length;d++)cb(c[d],"/",k,a,b);return k}}return c}function cb(a,b,c,d,f){ta(a,"",-1,b,c,d,f)}function ta(a, | ||
b,c,d,f,g,h){return 1<arguments.length?document.cookie=a+"="+encodeURIComponent(null!==b&&void 0!==b?b:"")+(c?"; Expires="+(new Date(+new Date+1E3*c)).toUTCString():"")+(d?"; Path="+d:"")+(f?"; Domain="+f:"")+(g?"; SameSite="+g:"")+(h?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}function ld(a){function b(){return f?h().then(function(q){window.localStorage.setItem(g,JSON.stringify(q))}):Promise.resolve()}var c=a.maxLocalStorageQueueSize,d=void 0=== | ||
@@ -60,48 +60,48 @@ c?1E3:c;c=a.useLocalStorage;var f=void 0===c?!0:c,g="snowplowOutQueue_".concat(a.trackerId);a=function(){if(f){var q=window.localStorage.getItem(g);q=q?JSON.parse(q):[];return rb({maxSize:d,events:q})}return rb({maxSize:d})}();var h=a.getAll,k=a.add,p=a.count,m=a.removeHead;return{count:p,add:function(q){k(q);return b().then(p)},removeHead:function(q){m(q);return b()},iterator:a.iterator,getAll:h,getAllPayloads:a.getAllPayloads,setUseLocalStorage:function(q){f=q}}}function md(a,b){var c,d=null!== | ||
0);c=isNaN(c)||isNaN(d)?"":c+Ta+d;return{viewport:a,documentSize:b(c),resolution:yb(screen.width+Ta+screen.height),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine,browserLanguage:window.navigator.language||window.navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}} | ||
function yb(a){return a&&a.split(Ta).map(function(b){return Math.floor(Number(b))}).join(Ta)}function pd(a){function b(){void 0!==c&&(clearTimeout(c),c=void 0);g||(g=!0,void 0!==d&&sa(a,d[0],d[1],d[2],d[3],d[4],d[5]))}var c,d,f,g=!0;return{getValue:function(){var h;return d&&(!f||f>new Date)?null!==(h=d[0])&&void 0!==h?h:sa(a):sa(a)},setValue:function(h,k,p,m,q,u){d=[h,k,p,m,q,u];g=!1;void 0===c&&(c=setTimeout(function(){c=void 0;b()},10));f=new Date(Date.now()+1E3*Math.min(.05,null!==k&&void 0!== | ||
k?k:.05));return!0},deleteValue:function(h,k,p,m){d=void 0;g=!0;void 0!==c&&(clearTimeout(c),c=void 0);cb(a,h,k,p,m)},flush:b}}function qd(a,b,c,d,f,g){void 0===g&&(g={});var h=[];a=function(p,m,q,u,t,l){function w(){za=sc(window.location.hostname,window.location.href,ub());za[1]!==ca&&(Ua=ub(ca));vc=rc(za[0]);ca=za[1]}function G(e){return function(n){var r=n.currentTarget;n=id(e,rd,{domainUserId:eb,userId:ta||void 0,sessionId:ja,sourceId:wc,sourcePlatform:xc,event:n});if(null===r||void 0===r?0:r.href){n= | ||
function yb(a){return a&&a.split(Ta).map(function(b){return Math.floor(Number(b))}).join(Ta)}function pd(a){function b(){void 0!==c&&(clearTimeout(c),c=void 0);g||(g=!0,void 0!==d&&ta(a,d[0],d[1],d[2],d[3],d[4],d[5]))}var c,d,f,g=!0;return{getValue:function(){var h;return d&&(!f||f>new Date)?null!==(h=d[0])&&void 0!==h?h:ta(a):ta(a)},setValue:function(h,k,p,m,q,u){d=[h,k,p,m,q,u];g=!1;void 0===c&&(c=setTimeout(function(){c=void 0;b()},10));f=new Date(Date.now()+1E3*Math.min(.05,null!==k&&void 0!== | ||
k?k:.05));return!0},deleteValue:function(h,k,p,m){d=void 0;g=!0;void 0!==c&&(clearTimeout(c),c=void 0);cb(a,h,k,p,m)},flush:b}}function qd(a,b,c,d,f,g){void 0===g&&(g={});var h=[];a=function(p,m,q,u,t,l){function w(){Aa=sc(window.location.hostname,window.location.href,ub());Aa[1]!==ca&&(Ua=ub(ca));vc=rc(Aa[0]);ca=Aa[1]}function G(e){return function(n){var r=n.currentTarget;n=id(e,rd,{domainUserId:eb,userId:ua||void 0,sessionId:ja,sourceId:wc,sourcePlatform:xc,event:n});if(null===r||void 0===r?0:r.href){n= | ||
"_sp="+n;var A=r.href.split("#"),x=A[0].split("?"),H=x.shift();if(x=x.join("?")){for(var da=!0,S=x.split("&"),ea=0;ea<S.length;ea++)if("_sp="===S[ea].substr(0,4)){da=!1;S[ea]=n;x=S.join("&");break}da&&(x=n+"&"+x)}else x=n;A[0]=H+"?"+x;n=A.join("#");r.href=n}}}function N(e){for(var n=G(sd),r=0;r<document.links.length;r++){var A=document.links[r];!A.spDecorationEnabled&&e(A)&&(A.addEventListener("click",n,!0),A.addEventListener("mousedown",n,!0),A.spDecorationEnabled=!0)}}function E(e){if(yc){var n= | ||
/#.*/;e=e.replace(n,"")}zc&&(n=/[{}]/g,e=e.replace(n,""));return e}function J(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function y(e){e=Ha+e+"."+Aa;if("localStorage"==I){try{var n=window.localStorage,r=n.getItem(e+".expires");if(null===r||+r>Date.now())var A=n.getItem(e);else n.removeItem(e),n.removeItem(e+".expires"),A=void 0}catch(x){A=void 0}return A}if("cookie"==I||"cookieAndLocalStorage"==I)return Ia.getCookie(e)}function Q(){w();Aa=td((Ba||vc)+(Va||"/")).slice(0,4)}function W(){fb=(new Date).getTime()} | ||
function ha(){var e=D(),n=e[0];n<gb?gb=n:n>hb&&(hb=n);e=e[1];e<ib?ib=e:e>jb&&(jb=e);W()}function D(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function O(){var e=D(),n=e[0];hb=gb=n;jb=ib=e=e[1]}function fa(){return va(Ha+"ses."+Aa,"*",Ac)}function ra(e){var n=Ha+"id."+Aa;var r=U;e=aa([],e,!0);r&&(e[1]="",e[7]="");e.shift();r=e.join(".");return va(n,r,Bc)}function va(e,n,r){if(U&&!Ca)return!1;if("localStorage"==I){void 0===r&&(r= | ||
63072E3);try{var A=window.localStorage,x=Date.now()+1E3*r;A.setItem("".concat(e,".expires"),x.toString());A.setItem(e,n);var H=!0}catch(da){H=!1}return H}return"cookie"==I||"cookieAndLocalStorage"==I?Ia.setCookie(e,n,r,Va,Ba,kb,lb):!1}function Pa(e){var n=Ha+"id."+Aa,r=Ha+"ses."+Aa;nc(n);nc(r);Ia.deleteCookie(n,Va,Ba,kb,lb);Ia.deleteCookie(r,Va,Ba,kb,lb);null!==e&&void 0!==e&&e.preserveSession||(ja=la(),ba=1);null!==e&&void 0!==e&&e.preserveUser||(eb=U?"":la(),ta=null)}function bb(e){e&&e.stateStorageStrategy&& | ||
(l.stateStorageStrategy=e.stateStorageStrategy,I=Cc(l));U=!!l.anonymousTracking;Ca=Dc(l);zb=Ec(l);ua.setUseLocalStorage("localStorage"==I||"cookieAndLocalStorage"==I);ua.setAnonymousTracking(zb)}function Fa(){if(!U||Ca){var e="none"!=I&&!!y("ses"),n=xa();if(n[1])var r=n[1];else r=U?"":la(),n[1]=r;eb=r;ja=e?n[6]:Sa(n);ba=n[3];"none"!=I&&(fa(),vb(n),ra(n))}}function xa(){if("none"==I)return["1","",0,0,0,void 0,"","","",void 0,0];var e=y("id")||void 0;return nd(e,eb,ja,ba)}function Qa(e){return 0=== | ||
e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Da(){Ab&&null!=t.pageViewId||(t.pageViewId=la(),t.pageViewUrl=na||ca)}function ya(){z()&&(t.pageViewId=la(),t.pageViewUrl=na||ca);return t.pageViewId}function z(){if(null==t.pageViewId)return!0;if(Ab||!Ja)return!1;if(void 0===t.pageViewUrl)return!0;var e=na||ca;if(!0===Ja||"full"==Ja||!("URL"in window))return t.pageViewUrl!=e;e=new URL(e);var n=new URL(t.pageViewUrl);return"pathname"==Ja?e.pathname!=n.pathname: | ||
"pathnameAndSearch"==Ja?e.pathname!=n.pathname||e.search!=n.search:!1}function F(){if("none"===I||U||!Fc)return null;var e=oc("_sp_tab_id");if(!e){e=la();try{window.sessionStorage.setItem("_sp_tab_id",e)}catch(n){}e=oc("_sp_tab_id")}return e||null}function L(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:ya()}}]}}}function K(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0", | ||
data:P(P({},xb()),{tabId:F()})}]}}}function ia(e){var n=e.title,r=e.context,A=e.timestamp;e=e.contextCallback;w();Bb&&Bb==ya()&&Da();Bb=ya();Ka=document.title;n?(La=n,Cb=!0):Cb&&(La=null);n=qc(La||Ka);Z.track(dd({pageUrl:E(na||ca),pageTitle:n,referrer:E(mb||Ua)}),(r||[]).concat(e?e():[]),A);A=new Date;n=!1;if(V.enabled&&!V.installed){n=V.installed=!0;var x={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var da=!1,S=Object.defineProperty({},"passive", | ||
{get:function(){da=!0},set:function(){}}),ea=function(){};window.addEventListener("testPassiveEventSupport",ea,S);window.removeEventListener("testPassiveEventSupport",ea,S);x.hasSupport=da}}};x.update();var H="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(x,"hasSupport")?Ga(document,H,W,{passive:!0}):Ga(document,H,W);O();H=function(da,S){void 0===S&&(S=W);return function(ea){return Ga(document,ea, | ||
S)}};"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(H(document));["resize","focus","blur"].forEach(H(window));H(window,ha)("scroll")}if(V.enabled&&(ud||n))for(A in fb=A.getTime(),A=void 0,V.configurations)if(n=V.configurations[A])window.clearInterval(n.activityInterval),C(n,r,e)}function C(e,n,r){var A=function(da,S){w();da({context:S,pageViewId:ya(),minXOffset:gb,minYOffset:ib,maxXOffset:hb,maxYOffset:jb});O()},x=function(){fb+e.configMinimumVisitLength> | ||
/#.*/;e=e.replace(n,"")}zc&&(n=/[{}]/g,e=e.replace(n,""));return e}function J(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function y(e){e=Ia+e+"."+Ba;if("localStorage"==I){try{var n=window.localStorage,r=n.getItem(e+".expires");if(null===r||+r>Date.now())var A=n.getItem(e);else n.removeItem(e),n.removeItem(e+".expires"),A=void 0}catch(x){A=void 0}return A}if("cookie"==I||"cookieAndLocalStorage"==I)return na.getCookie(e)}function Q(){w();Ba=td((Ca||vc)+(Va||"/")).slice(0,4)}function W(){fb=(new Date).getTime()} | ||
function ha(){var e=D(),n=e[0];n<gb?gb=n:n>hb&&(hb=n);e=e[1];e<ib?ib=e:e>jb&&(jb=e);W()}function D(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function O(){var e=D(),n=e[0];hb=gb=n;jb=ib=e=e[1]}function fa(){return wa(Ia+"ses."+Ba,"*",Ac)}function sa(e){var n=Ia+"id."+Ba;var r=U;e=aa([],e,!0);r&&(e[1]="",e[7]="");e.shift();r=e.join(".");return wa(n,r,Bc)}function wa(e,n,r){if(U&&!Da)return!1;if("localStorage"==I){void 0===r&&(r= | ||
63072E3);try{var A=window.localStorage,x=Date.now()+1E3*r;A.setItem("".concat(e,".expires"),x.toString());A.setItem(e,n);var H=!0}catch(da){H=!1}return H}return"cookie"==I||"cookieAndLocalStorage"==I?na.setCookie(e,n,r,Va,Ca,kb,lb):!1}function Pa(e){var n=Ia+"id."+Ba,r=Ia+"ses."+Ba;nc(n);nc(r);na.deleteCookie(n,Va,Ca,kb,lb);na.deleteCookie(r,Va,Ca,kb,lb);null!==e&&void 0!==e&&e.preserveSession||(ja=la(),ba=1);null!==e&&void 0!==e&&e.preserveUser||(eb=U?"":la(),ua=null)}function bb(e){e&&e.stateStorageStrategy&& | ||
(l.stateStorageStrategy=e.stateStorageStrategy,I=Cc(l));U=!!l.anonymousTracking;Da=Dc(l);zb=Ec(l);va.setUseLocalStorage("localStorage"==I||"cookieAndLocalStorage"==I);va.setAnonymousTracking(zb)}function Ga(){if(!U||Da){var e="none"!=I&&!!y("ses"),n=ya();if(n[1])var r=n[1];else r=U?"":la(),n[1]=r;eb=r;ja=e?n[6]:Sa(n);ba=n[3];"none"!=I&&(fa(),vb(n),sa(n),n[10]||na.flush())}}function ya(){if("none"==I)return["1","",0,0,0,void 0,"","","",void 0,0];var e=y("id")||void 0;return nd(e,eb,ja,ba)}function Qa(e){return 0=== | ||
e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Ea(){Ab&&null!=t.pageViewId||(t.pageViewId=la(),t.pageViewUrl=oa||ca)}function za(){z()&&(t.pageViewId=la(),t.pageViewUrl=oa||ca);return t.pageViewId}function z(){if(null==t.pageViewId)return!0;if(Ab||!Ja)return!1;if(void 0===t.pageViewUrl)return!0;var e=oa||ca;if(!0===Ja||"full"==Ja||!("URL"in window))return t.pageViewUrl!=e;e=new URL(e);var n=new URL(t.pageViewUrl);return"pathname"==Ja?e.pathname!=n.pathname: | ||
"pathnameAndSearch"==Ja?e.pathname!=n.pathname||e.search!=n.search:!1}function F(){if("none"===I||U||!Fc)return null;var e=oc("_sp_tab_id");if(!e){e=la();try{window.sessionStorage.setItem("_sp_tab_id",e)}catch(n){}e=oc("_sp_tab_id")}return e||null}function L(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:za()}}]}}}function K(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0", | ||
data:P(P({},xb()),{tabId:F()})}]}}}function ia(e){var n=e.title,r=e.context,A=e.timestamp;e=e.contextCallback;w();Bb&&Bb==za()&&Ea();Bb=za();Ka=document.title;n?(La=n,Cb=!0):Cb&&(La=null);n=qc(La||Ka);Z.track(dd({pageUrl:E(oa||ca),pageTitle:n,referrer:E(mb||Ua)}),(r||[]).concat(e?e():[]),A);A=new Date;n=!1;if(V.enabled&&!V.installed){n=V.installed=!0;var x={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var da=!1,S=Object.defineProperty({},"passive", | ||
{get:function(){da=!0},set:function(){}}),ea=function(){};window.addEventListener("testPassiveEventSupport",ea,S);window.removeEventListener("testPassiveEventSupport",ea,S);x.hasSupport=da}}};x.update();var H="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(x,"hasSupport")?Ha(document,H,W,{passive:!0}):Ha(document,H,W);O();H=function(da,S){void 0===S&&(S=W);return function(ea){return Ha(document,ea, | ||
S)}};"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(H(document));["resize","focus","blur"].forEach(H(window));H(window,ha)("scroll")}if(V.enabled&&(ud||n))for(A in fb=A.getTime(),A=void 0,V.configurations)if(n=V.configurations[A])window.clearInterval(n.activityInterval),C(n,r,e)}function C(e,n,r){var A=function(da,S){w();da({context:S,pageViewId:za(),minXOffset:gb,minYOffset:ib,maxXOffset:hb,maxYOffset:jb});O()},x=function(){fb+e.configMinimumVisitLength> | ||
(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]));e.activityInterval=window.setInterval(H,e.configHeartBeatTimer)},H=function(){fb+e.configHeartBeatTimer>(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(H,e.configHeartBeatTimer):window.setTimeout(x,e.configMinimumVisitLength)}function T(e){var n=e.minimumVisitLength,r=e.heartbeatDelay;e=e.callback;if(pc(n)&&pc(r))return{configMinimumVisitLength:1E3*n,configHeartBeatTimer:1E3* | ||
r,callback:e};R.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function X(e){var n=e.context,r=e.minXOffset,A=e.minYOffset,x=e.maxXOffset,H=e.maxYOffset;e=document.title;e!==Ka&&(Ka=e,La=void 0);e=Z;var da=e.track,S=E(na||ca),ea=qc(La||Ka),vd=E(mb||Ua);r=Math.round(r);x=Math.round(x);A=Math.round(A);H=Math.round(H);var oa=Ya();oa.add("e","pp");oa.add("url",S);oa.add("page",ea);oa.add("refr",vd);r&&!isNaN(Number(r))&&oa.add("pp_mix",r.toString());x&&!isNaN(Number(x))&& | ||
oa.add("pp_max",x.toString());A&&!isNaN(Number(A))&&oa.add("pp_miy",A.toString());H&&!isNaN(Number(H))&&oa.add("pp_may",H.toString());da.call(e,oa,n)}function wa(e){var n=V.configurations[e];0===(null===n||void 0===n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null===n||void 0===n?void 0:n.activityInterval):window.clearInterval(null===n||void 0===n?void 0:n.activityInterval);V.configurations[e]=void 0}var Ea,Y,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub;l.eventMethod=null!==(Ea= | ||
l.eventMethod)&&void 0!==Ea?Ea:"post";var Cc=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Dc=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==r?r:!1},Ec=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==r?r: | ||
!1},wd=null!==(Db=null===(Y=null===l||void 0===l?void 0:l.contexts)||void 0===Y?void 0:Y.browser)&&void 0!==Db?Db:!1,Fc=null!==(Fb=null===(Eb=null===l||void 0===l?void 0:l.contexts)||void 0===Eb?void 0:Eb.webPage)&&void 0!==Fb?Fb:!0,Ia=l.synchronousCookieWrite?xd:yd;h.push(function(){return{beforeTrack:function(e){var n=y("ses"),r=xa(),A=0===r[10];Vb=Wb?!!Ia.getCookie(Wb):!1;if(Gc||Vb)Pa();else{"0"===r[0]?(ja=n||"none"==I?r[6]:Sa(r),ba=r[3]):(new Date).getTime()-Xb>1E3*Ac&&(ba++,ja=Sa(r,{memorizedVisitCount:ba})); | ||
vb(r);if(0===r[10]){var x=e.build();r[8]=x.eid;x=x.dtm||x.ttm;r[9]=x?parseInt(x):void 0}r[10]+=1;x=xb();var H=x.documentSize;e.add("vp",x.viewport);e.add("ds",H);e.add("vid",Ca?ba:U?null:ba);e.add("sid",Ca?ja:U?null:ja);e.add("duid",U?null:r[1]);e.add("uid",U?null:ta);w();e.add("refr",E(mb||Ua));e.add("url",E(na||ca));x=tc(r,I,U);!zd||U&&!Ca||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:x});"none"!=I&&(ra(r),e=fa(),n&&!A||!e||!nb||Yb||(nb(x), | ||
Yb=!1));Xb=(new Date).getTime()}}}}());Fc&&h.push(L());wd&&h.push(K());h.push.apply(h,null!==(Gb=l.plugins)&&void 0!==Gb?Gb:[]);var Z=cd({base64:null!==(Hb=l.encodeBase64)&&void 0!==Hb?Hb:"post"!==l.eventMethod,corePlugins:h,callback:function(e){Gc||Vb||ua.enqueueRequest(e.build())}}),Ad=document.characterSet||document.charset,za=sc(window.location.hostname,window.location.href,ub()),vc=rc(za[0]),ca=za[1],Ua=za[2],mb,xc=null!==(Ib=l.platform)&&void 0!==Ib?Ib:"web",wc=null!==(Jb=l.appId)&&void 0!== | ||
Jb?Jb:"",na,Ka=document.title,La,Cb=!1,ud=null!==(Kb=l.resetActivityTrackingOnPageView)&&void 0!==Kb?Kb:!0,yc,zc,Ha=null!==(Lb=l.cookieName)&&void 0!==Lb?Lb:"_sp_",Ba=null!==(Mb=l.cookieDomain)&&void 0!==Mb?Mb:void 0,Bd=null!==(Nb=l.discoverRootDomain)&&void 0!==Nb?Nb:void 0===Ba,Va="/",kb=null!==(Ob=l.cookieSameSite)&&void 0!==Ob?Ob:"Lax",lb=null!==(Pb=l.cookieSecure)&&void 0!==Pb?Pb:!0,Hc=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,Gc="undefined"!==typeof l.respectDoNotTrack? | ||
l.respectDoNotTrack&&("yes"===Hc||"1"===Hc):!1,Wb,Bc=null!==(Qb=l.cookieLifetime)&&void 0!==Qb?Qb:63072E3,Ac=null!==(Rb=l.sessionCookieTimeout)&&void 0!==Rb?Rb:1800,Ca=Dc(l),zb=Ec(l),U=!!l.anonymousTracking,I=Cc(l),fb,Xb=(new Date).getTime(),gb,hb,ib,jb,Aa,eb,ja,ba=1,ta,ua=md(P({trackerId:p,endpoint:Qa(u),serverAnonymization:zb,useLocalStorage:"localStorage"==I||"cookieAndLocalStorage"==I},l),t),Ab=!1,Ja=null!==(Sb=l.preservePageViewIdForUrl)&&void 0!==Sb?Sb:!1,Bb=void 0,V={enabled:!1,installed:!1, | ||
configurations:{}},zd=null!==(Ub=null===(Tb=l.contexts)||void 0===Tb?void 0:Tb.session)&&void 0!==Ub?Ub:!1,Vb,nb=l.onSessionUpdateCallback,Yb=!1,Ic=function(e){return"boolean"===typeof e?{useExtendedCrossDomainLinker:e}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:e}}(l.useExtendedCrossDomainLinker||!1),sd=Ic.useExtendedCrossDomainLinker,rd=Ic.collectCrossDomainAttributes;Bd&&!Ba&&(Ba=kd(kb,lb));var ob=xb(),Cd=ob.browserLanguage,Dd=ob.resolution,Ed=ob.colorDepth,Fd=ob.cookiesEnabled; | ||
var Jc="object"===typeof Intl&&"function"===typeof Intl.DateTimeFormat?(new Intl.DateTimeFormat).resolvedOptions().timeZone:void 0;Z.setTrackerVersion(q);Z.setTrackerNamespace(m);Z.setAppId(wc);Z.setPlatform(xc);Z.addPayloadPair("cookie",Fd?"1":"0");Z.addPayloadPair("cs",Ad);Z.addPayloadPair("lang",Cd);Z.addPayloadPair("res",Dd);Z.addPayloadPair("cd",Ed);Jc&&Z.addPayloadPair("tz",Jc);Q();Fa();l.crossDomainLinker&&N(l.crossDomainLinker);return P(P({},{getDomainSessionIndex:function(){return ba},getPageViewId:ya, | ||
getTabId:F,newSession:function(){var e=xa();"0"===e[0]?(ja="none"!=I?Sa(e):e[6],ba=e[3]):(ba++,ja=Sa(e,{memorizedVisitCount:ba}));vb(e);if("none"!=I){var n=tc(e,I,U);ra(e);fa()&&nb&&(Yb=!0,nb(n))}Xb=(new Date).getTime()},getCookieName:function(e){return Ha+e+"."+Aa},getUserId:function(){return ta},getDomainUserId:function(){return xa()[1]},getDomainUserInfo:function(){return xa()},setReferrerUrl:function(e){mb=e},setCustomUrl:function(e){w();var n=ca,r;J(e)?na=e:"/"===e.slice(0,1)?na=J(n)+"://"+tb(n)+ | ||
e:(n=E(n),0<=(r=n.indexOf("?"))&&(n=n.slice(0,r)),(r=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,r+1)),na=n+e)},setDocumentTitle:function(e){Ka=document.title;La=e;Cb=!1},discardHashTag:function(e){yc=e},discardBrace:function(e){zc=e},setCookiePath:function(e){Va=e;Q()},setVisitorCookieTimeout:function(e){Bc=e},crossDomainLinker:function(e){N(e)},enableActivityTracking:function(e){V.configurations.pagePing||(V.enabled=!0,V.configurations.pagePing=T(P(P({},e),{callback:X})))},enableActivityTrackingCallback:function(e){V.configurations.callback|| | ||
(V.enabled=!0,V.configurations.callback=T(e))},disableActivityTracking:function(){wa("pagePing")},disableActivityTrackingCallback:function(){wa("callback")},updatePageActivity:function(){W()},setOptOutCookie:function(e){Wb=e},setUserId:function(e){ta=e},setUserIdFromLocation:function(e){w();ta=Ra(e,ca)},setUserIdFromReferrer:function(e){w();ta=Ra(e,Ua)},setUserIdFromCookie:function(e){ta=Ia.getCookie(e)},setCollectorUrl:function(e){ua.setCollectorUrl(Qa(e))},setBufferSize:function(e){ua.setBufferSize(e)}, | ||
flushBuffer:function(e){void 0===e&&(e={});ua.executeQueue();e.newBufferSize&&ua.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={});ia(e)},preservePageViewId:function(){Ab=!0},preservePageViewIdForUrl:function(e){Ja=e},disableAnonymousTracking:function(e){l.anonymousTracking=!1;bb(e);Fa();ua.executeQueue()},enableAnonymousTracking:function(e){var n;l.anonymousTracking=null!==(n=e&&(null===e||void 0===e?void 0:e.options))&&void 0!==n?n:!0;bb(e);Ca||Da()},clearUserData:Pa}), | ||
{id:p,namespace:m,core:Z,sharedState:t})}(a,b,c,d,f,g);var k=P(P({},a),{addPlugin:function(p){var m,q;k.core.addPlugin(p);null===(q=(m=p.plugin).activateBrowserPlugin)||void 0===q?void 0:q.call(m,k)}});h.forEach(function(p){var m;null===(m=p.activateBrowserPlugin)||void 0===m?void 0:m.call(p,k)});return k}function B(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(Wa);a=Wa;for(var d=[],f=0;f<c.length;f++){var g=c[f];a.hasOwnProperty(g)?d.push(a[g]):R.warn(g+" not configured")}d.forEach(b)}catch(h){R.error("Function failed", | ||
h)}}function Gd(){function a(){"hidden"==f.visibilityState&&d.bufferFlushers.forEach(function(h){h(!1)})}function b(){var h;if(!d.hasLoaded)for(d.hasLoaded=!0,h=0;h<d.registeredOnLoadHandlers.length;h++)d.registeredOnLoadHandlers[h]();return!0}function c(){f.addEventListener?f.addEventListener("DOMContentLoaded",function k(){f.removeEventListener("DOMContentLoaded",k,!1);b()}):f.attachEvent&&f.attachEvent("onreadystatechange",function p(){"complete"===f.readyState&&(f.detachEvent("onreadystatechange", | ||
p),b())});Ga(g,"load",b,!1)}var d=new Kc,f=document,g=window;f.visibilityState&&Ga(f,"visibilitychange",a,!1);Ga(g,"beforeunload",function(){d.bufferFlushers.forEach(function(h){h(!1)})},!1);"loading"===document.readyState?c():b();return d}var P=function(){P=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var f in b)Object.prototype.hasOwnProperty.call(b,f)&&(a[f]=b[f])}return a};return P.apply(this,arguments)};"function"===typeof SuppressedError?SuppressedError: | ||
function(a,b,c){c=Error(c);return c.name="SuppressedError",c.error=a,c.suppressed=b,c};for(var M=[],Zb=0;256>Zb;++Zb)M.push((Zb+256).toString(16).slice(1));var Xa,Rc=new Uint8Array(16),ac={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},qa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",pa;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(pa||(pa={}));var R=function(a){void 0=== | ||
a&&(a=pa.warn);return{setLogLevel:function(b){a=pa[b]?b:pa.warn},warn:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=pa.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,aa([f+"\n",c],d,!1)):console.warn.apply(console,aa([f],d,!1)))},error:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=pa.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,aa([f+"\n",c],d,!1)):console.error.apply(console, | ||
aa([f],d,!1)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=pa.debug&&"undefined"!==typeof console&&console.debug.apply(console,aa(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=pa.info&&"undefined"!==typeof console&&console.info.apply(console,aa(["Snowplow: "+b],c,!1))}}}(),Lc={},Mc={};(function(){var a={rotl:function(b,c){return b<<c|b>>>32-c},rotr:function(b,c){return b<<32-c|b>>>c},endian:function(b){if(b.constructor== | ||
Number)return a.rotl(b,8)&16711935|a.rotl(b,24)&4278255360;for(var c=0;c<b.length;c++)b[c]=a.endian(b[c]);return b},randomBytes:function(b){for(var c=[];0<b;b--)c.push(Math.floor(256*Math.random()));return c},bytesToWords:function(b){for(var c=[],d=0,f=0;d<b.length;d++,f+=8)c[f>>>5]|=b[d]<<24-f%32;return c},wordsToBytes:function(b){for(var c=[],d=0;d<32*b.length;d+=8)c.push(b[d>>>5]>>>24-d%32&255);return c},bytesToHex:function(b){for(var c=[],d=0;d<b.length;d++)c.push((b[d]>>>4).toString(16)),c.push((b[d]& | ||
15).toString(16));return c.join("")},hexToBytes:function(b){for(var c=[],d=0;d<b.length;d+=2)c.push(parseInt(b.substr(d,2),16));return c},bytesToBase64:function(b){for(var c=[],d=0;d<b.length;d+=3)for(var f=b[d]<<16|b[d+1]<<8|b[d+2],g=0;4>g;g++)8*d+6*g<=8*b.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-g)&63)):c.push("=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/ig,"");for(var c=[],d=0,f=0;d<b.length;f=++d%4)0!=f&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d- | ||
1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d))>>>6-2*f);return c}};Mc=a})();var $b={utf8:{stringToBytes:function(a){return $b.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape($b.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c])); | ||
return b.join("")}}},Nc=$b;(function(){var a=Mc,b=Nc.utf8,c=Nc.bin,d=function(f,g){var h=a.wordsToBytes,k=f;k.constructor==String?k=b.stringToBytes(k):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(k)?k=Array.prototype.slice.call(k,0):Array.isArray(k)||(k=k.toString());f=a.bytesToWords(k);var p=8*k.length;k=[];var m=1732584193,q=-271733879,u=-1732584194,t=271733878,l=-1009589776;f[p>>5]|=128<<24-p%32;f[(p+64>>>9<<4)+15]=p;for(p=0;p<f.length;p+=16){for(var w=m,G=q, | ||
N=u,E=t,J=l,y=0;80>y;y++){if(16>y)k[y]=f[p+y];else{var Q=k[y-3]^k[y-8]^k[y-14]^k[y-16];k[y]=Q<<1|Q>>>31}Q=(m<<5|m>>>27)+l+(k[y]>>>0)+(20>y?(q&u|~q&t)+1518500249:40>y?(q^u^t)+1859775393:60>y?(q&u|q&t|u&t)-1894007588:(q^u^t)-899497514);l=t;t=u;u=q<<30|q>>>2;q=m;m=Q}m+=w;q+=G;u+=N;t+=E;l+=J}h=h.call(a,[m,q,u,t,l]);return g&&g.asBytes?h:g&&g.asString?c.bytesToString(h):a.bytesToHex(h)};d._blocksize=16;d._digestsize=20;Lc=d})();var td=Lc,jd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1}, | ||
uc=!1,db,Ta="x",yd=function(){function a(c){b[c]||(b[c]=pd(c));return b[c]}var b={};return{getCookie:function(c){return a(c).getValue()},setCookie:function(c,d,f,g,h,k,p){return a(c).setValue(d,f,g,h,k,p)},deleteCookie:function(c,d,f,g,h){a(c).deleteValue(d,f,g,h)},clearCache:function(){b={}},flush:function(){for(var c=0,d=Object.values(b);c<d.length;c++)d[c].flush()}}}(),xd={getCookie:sa,setCookie:function(a,b,c,d,f,g,h){sa(a,b,c,d,f,g,h);return-1!==document.cookie.indexOf("".concat(a,"="))},deleteCookie:cb}, | ||
Wa={},Kc=function(){return function(){this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Oc="undefined"!==typeof window?Gd():void 0;v.SharedState=Kc;v.addGlobalContexts=function(a,b){B(b,function(c){c.core.addGlobalContexts(a)})};v.addPlugin=function(a,b){B(b,function(c){c.addPlugin(a)})};v.clearGlobalContexts=function(a){B(a,function(b){b.core.clearGlobalContexts()})};v.clearUserData=function(a,b){B(b,function(c){c.clearUserData(a)})};v.crossDomainLinker=function(a,b){B(b, | ||
function(c){c.crossDomainLinker(a)})};v.disableActivityTracking=function(a){B(a,function(b){b.disableActivityTracking()})};v.disableActivityTrackingCallback=function(a){B(a,function(b){b.disableActivityTrackingCallback()})};v.disableAnonymousTracking=function(a,b){B(b,function(c){c.disableAnonymousTracking(a)})};v.discardBrace=function(a,b){B(b,function(c){c.discardBrace(a)})};v.discardHashTag=function(a,b){B(b,function(c){c.discardHashTag(a)})};v.enableActivityTracking=function(a,b){B(b,function(c){c.enableActivityTracking(a)})}; | ||
v.enableActivityTrackingCallback=function(a,b){B(b,function(c){c.enableActivityTrackingCallback(a)})};v.enableAnonymousTracking=function(a,b){B(b,function(c){c.enableAnonymousTracking(a)})};v.flushBuffer=function(a,b){B(b,function(c){c.flushBuffer(a)})};v.newSession=function(a){B(a,function(b){b.newSession()})};v.newTracker=function(a,b,c){if(Oc){var d="js-".concat("4.0.2");Wa.hasOwnProperty(a)?a=null:(Wa[a]=qd(a,a,d,b,Oc,c),a=Wa[a]);return a}};v.preservePageViewId=function(a){B(a,function(b){b.preservePageViewId()})}; | ||
v.removeGlobalContexts=function(a,b){B(b,function(c){c.core.removeGlobalContexts(a)})};v.setBufferSize=function(a,b){B(b,function(c){c.setBufferSize(a)})};v.setCollectorUrl=function(a,b){B(b,function(c){c.setCollectorUrl(a)})};v.setCookiePath=function(a,b){B(b,function(c){c.setCookiePath(a)})};v.setCustomUrl=function(a,b){B(b,function(c){c.setCustomUrl(a)})};v.setDocumentTitle=function(a,b){B(b,function(c){c.setDocumentTitle(a)})};v.setOptOutCookie=function(a,b){B(b,function(c){c.setOptOutCookie(a)})}; | ||
v.setReferrerUrl=function(a,b){B(b,function(c){c.setReferrerUrl(a)})};v.setUserId=function(a,b){B(b,function(c){c.setUserId(a)})};v.setUserIdFromCookie=function(a,b){B(b,function(c){c.setUserIdFromCookie(a)})};v.setUserIdFromLocation=function(a,b){B(b,function(c){c.setUserIdFromLocation(a)})};v.setUserIdFromReferrer=function(a,b){B(b,function(c){c.setUserIdFromReferrer(a)})};v.setVisitorCookieTimeout=function(a,b){B(b,function(c){c.setVisitorCookieTimeout(a)})};v.trackPageView=function(a,b){B(b,function(c){c.trackPageView(a)})}; | ||
v.trackSelfDescribingEvent=function(a,b){B(b,function(c){c=c.core;var d=c.track,f=a.event,g=f.schema,h=f.data;f=Ya();g={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:g,data:h}};f.add("e","ue");f.addJson("ue_px","ue_pr",g);d.call(c,f,a.context,a.timestamp)})};v.trackStructEvent=function(a,b){B(b,function(c){c=c.core;var d=c.track,f=a.category,g=a.action,h=a.label,k=a.property,p=a.value,m=Ya();m.add("e","se");m.add("se_ca",f);m.add("se_ac",g);m.add("se_la", | ||
h);m.add("se_pr",k);m.add("se_va",null==p?void 0:p.toString());d.call(c,m,a.context,a.timestamp)})};v.updatePageActivity=function(a){B(a,function(b){b.updatePageActivity()})};v.version="4.0.2";Object.defineProperty(v,"__esModule",{value:!0})}) | ||
r,callback:e};R.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function X(e){var n=e.context,r=e.minXOffset,A=e.minYOffset,x=e.maxXOffset,H=e.maxYOffset;e=document.title;e!==Ka&&(Ka=e,La=void 0);e=Z;var da=e.track,S=E(oa||ca),ea=qc(La||Ka),vd=E(mb||Ua);r=Math.round(r);x=Math.round(x);A=Math.round(A);H=Math.round(H);var pa=Ya();pa.add("e","pp");pa.add("url",S);pa.add("page",ea);pa.add("refr",vd);r&&!isNaN(Number(r))&&pa.add("pp_mix",r.toString());x&&!isNaN(Number(x))&& | ||
pa.add("pp_max",x.toString());A&&!isNaN(Number(A))&&pa.add("pp_miy",A.toString());H&&!isNaN(Number(H))&&pa.add("pp_may",H.toString());da.call(e,pa,n)}function xa(e){var n=V.configurations[e];0===(null===n||void 0===n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null===n||void 0===n?void 0:n.activityInterval):window.clearInterval(null===n||void 0===n?void 0:n.activityInterval);V.configurations[e]=void 0}var Fa,Y,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub;l.eventMethod=null!==(Fa= | ||
l.eventMethod)&&void 0!==Fa?Fa:"post";var Cc=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Dc=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==r?r:!1},Ec=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==r?r: | ||
!1},wd=null!==(Db=null===(Y=null===l||void 0===l?void 0:l.contexts)||void 0===Y?void 0:Y.browser)&&void 0!==Db?Db:!1,Fc=null!==(Fb=null===(Eb=null===l||void 0===l?void 0:l.contexts)||void 0===Eb?void 0:Eb.webPage)&&void 0!==Fb?Fb:!0,na=l.synchronousCookieWrite?xd:yd;h.push(function(){return{beforeTrack:function(e){var n=y("ses"),r=ya(),A=0===r[10];Vb=Wb?!!na.getCookie(Wb):!1;if(Gc||Vb)Pa();else{"0"===r[0]?(ja=n||"none"==I?r[6]:Sa(r),ba=r[3]):(new Date).getTime()-Xb>1E3*Ac&&(ba++,ja=Sa(r,{memorizedVisitCount:ba})); | ||
vb(r);if(0===r[10]){var x=e.build();r[8]=x.eid;x=x.dtm||x.ttm;r[9]=x?parseInt(x):void 0}r[10]+=1;x=xb();var H=x.documentSize;e.add("vp",x.viewport);e.add("ds",H);e.add("vid",Da?ba:U?null:ba);e.add("sid",Da?ja:U?null:ja);e.add("duid",U?null:r[1]);e.add("uid",U?null:ua);w();e.add("refr",E(mb||Ua));e.add("url",E(oa||ca));x=tc(r,I,U);!zd||U&&!Da||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:x});"none"!=I&&(sa(r),e=fa(),n&&!A||!e||!nb||Yb||(na.flush(), | ||
nb(x),Yb=!1));Xb=(new Date).getTime()}}}}());Fc&&h.push(L());wd&&h.push(K());h.push.apply(h,null!==(Gb=l.plugins)&&void 0!==Gb?Gb:[]);var Z=cd({base64:null!==(Hb=l.encodeBase64)&&void 0!==Hb?Hb:"post"!==l.eventMethod,corePlugins:h,callback:function(e){Gc||Vb||va.enqueueRequest(e.build())}}),Ad=document.characterSet||document.charset,Aa=sc(window.location.hostname,window.location.href,ub()),vc=rc(Aa[0]),ca=Aa[1],Ua=Aa[2],mb,xc=null!==(Ib=l.platform)&&void 0!==Ib?Ib:"web",wc=null!==(Jb=l.appId)&&void 0!== | ||
Jb?Jb:"",oa,Ka=document.title,La,Cb=!1,ud=null!==(Kb=l.resetActivityTrackingOnPageView)&&void 0!==Kb?Kb:!0,yc,zc,Ia=null!==(Lb=l.cookieName)&&void 0!==Lb?Lb:"_sp_",Ca=null!==(Mb=l.cookieDomain)&&void 0!==Mb?Mb:void 0,Bd=null!==(Nb=l.discoverRootDomain)&&void 0!==Nb?Nb:void 0===Ca,Va="/",kb=null!==(Ob=l.cookieSameSite)&&void 0!==Ob?Ob:"Lax",lb=null!==(Pb=l.cookieSecure)&&void 0!==Pb?Pb:!0,Hc=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,Gc="undefined"!==typeof l.respectDoNotTrack? | ||
l.respectDoNotTrack&&("yes"===Hc||"1"===Hc):!1,Wb,Bc=null!==(Qb=l.cookieLifetime)&&void 0!==Qb?Qb:63072E3,Ac=null!==(Rb=l.sessionCookieTimeout)&&void 0!==Rb?Rb:1800,Da=Dc(l),zb=Ec(l),U=!!l.anonymousTracking,I=Cc(l),fb,Xb=(new Date).getTime(),gb,hb,ib,jb,Ba,eb,ja,ba=1,ua,va=md(P({trackerId:p,endpoint:Qa(u),serverAnonymization:zb,useLocalStorage:"localStorage"==I||"cookieAndLocalStorage"==I},l),t),Ab=!1,Ja=null!==(Sb=l.preservePageViewIdForUrl)&&void 0!==Sb?Sb:!1,Bb=void 0,V={enabled:!1,installed:!1, | ||
configurations:{}},zd=null!==(Ub=null===(Tb=l.contexts)||void 0===Tb?void 0:Tb.session)&&void 0!==Ub?Ub:!1,Vb,nb=l.onSessionUpdateCallback,Yb=!1,Ic=function(e){return"boolean"===typeof e?{useExtendedCrossDomainLinker:e}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:e}}(l.useExtendedCrossDomainLinker||!1),sd=Ic.useExtendedCrossDomainLinker,rd=Ic.collectCrossDomainAttributes;Bd&&!Ca&&(Ca=kd(kb,lb));var ob=xb(),Cd=ob.browserLanguage,Dd=ob.resolution,Ed=ob.colorDepth,Fd=ob.cookiesEnabled; | ||
var Jc="object"===typeof Intl&&"function"===typeof Intl.DateTimeFormat?(new Intl.DateTimeFormat).resolvedOptions().timeZone:void 0;Z.setTrackerVersion(q);Z.setTrackerNamespace(m);Z.setAppId(wc);Z.setPlatform(xc);Z.addPayloadPair("cookie",Fd?"1":"0");Z.addPayloadPair("cs",Ad);Z.addPayloadPair("lang",Cd);Z.addPayloadPair("res",Dd);Z.addPayloadPair("cd",Ed);Jc&&Z.addPayloadPair("tz",Jc);Q();Ga();l.crossDomainLinker&&N(l.crossDomainLinker);return P(P({},{getDomainSessionIndex:function(){return ba},getPageViewId:za, | ||
getTabId:F,newSession:function(){var e=ya();"0"===e[0]?(ja="none"!=I?Sa(e):e[6],ba=e[3]):(ba++,ja=Sa(e,{memorizedVisitCount:ba}));vb(e);if("none"!=I){var n=tc(e,I,U);sa(e);e=fa();na.flush();e&&nb&&(Yb=!0,nb(n))}Xb=(new Date).getTime()},getCookieName:function(e){return Ia+e+"."+Ba},getUserId:function(){return ua},getDomainUserId:function(){return ya()[1]},getDomainUserInfo:function(){return ya()},setReferrerUrl:function(e){mb=e},setCustomUrl:function(e){w();var n=ca,r;J(e)?oa=e:"/"===e.slice(0,1)? | ||
oa=J(n)+"://"+tb(n)+e:(n=E(n),0<=(r=n.indexOf("?"))&&(n=n.slice(0,r)),(r=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,r+1)),oa=n+e)},setDocumentTitle:function(e){Ka=document.title;La=e;Cb=!1},discardHashTag:function(e){yc=e},discardBrace:function(e){zc=e},setCookiePath:function(e){Va=e;Q()},setVisitorCookieTimeout:function(e){Bc=e},crossDomainLinker:function(e){N(e)},enableActivityTracking:function(e){V.configurations.pagePing||(V.enabled=!0,V.configurations.pagePing=T(P(P({},e),{callback:X})))}, | ||
enableActivityTrackingCallback:function(e){V.configurations.callback||(V.enabled=!0,V.configurations.callback=T(e))},disableActivityTracking:function(){xa("pagePing")},disableActivityTrackingCallback:function(){xa("callback")},updatePageActivity:function(){W()},setOptOutCookie:function(e){Wb=e},setUserId:function(e){ua=e},setUserIdFromLocation:function(e){w();ua=Ra(e,ca)},setUserIdFromReferrer:function(e){w();ua=Ra(e,Ua)},setUserIdFromCookie:function(e){ua=na.getCookie(e)},setCollectorUrl:function(e){va.setCollectorUrl(Qa(e))}, | ||
setBufferSize:function(e){va.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={});va.executeQueue();e.newBufferSize&&va.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={});ia(e)},preservePageViewId:function(){Ab=!0},preservePageViewIdForUrl:function(e){Ja=e},disableAnonymousTracking:function(e){l.anonymousTracking=!1;bb(e);Ga();va.executeQueue()},enableAnonymousTracking:function(e){var n;l.anonymousTracking=null!==(n=e&&(null===e||void 0===e?void 0:e.options))&&void 0!== | ||
n?n:!0;bb(e);Da||Ea()},clearUserData:Pa}),{id:p,namespace:m,core:Z,sharedState:t})}(a,b,c,d,f,g);var k=P(P({},a),{addPlugin:function(p){var m,q;k.core.addPlugin(p);null===(q=(m=p.plugin).activateBrowserPlugin)||void 0===q?void 0:q.call(m,k)}});h.forEach(function(p){var m;null===(m=p.activateBrowserPlugin)||void 0===m?void 0:m.call(p,k)});return k}function B(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(Wa);a=Wa;for(var d=[],f=0;f<c.length;f++){var g=c[f];a.hasOwnProperty(g)?d.push(a[g]):R.warn(g+ | ||
" not configured")}d.forEach(b)}catch(h){R.error("Function failed",h)}}function Gd(){function a(){"hidden"==f.visibilityState&&d.bufferFlushers.forEach(function(h){h(!1)})}function b(){var h;if(!d.hasLoaded)for(d.hasLoaded=!0,h=0;h<d.registeredOnLoadHandlers.length;h++)d.registeredOnLoadHandlers[h]();return!0}function c(){f.addEventListener?f.addEventListener("DOMContentLoaded",function k(){f.removeEventListener("DOMContentLoaded",k,!1);b()}):f.attachEvent&&f.attachEvent("onreadystatechange",function p(){"complete"=== | ||
f.readyState&&(f.detachEvent("onreadystatechange",p),b())});Ha(g,"load",b,!1)}var d=new Kc,f=document,g=window;f.visibilityState&&Ha(f,"visibilitychange",a,!1);Ha(g,"beforeunload",function(){d.bufferFlushers.forEach(function(h){h(!1)})},!1);"loading"===document.readyState?c():b();return d}var P=function(){P=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var f in b)Object.prototype.hasOwnProperty.call(b,f)&&(a[f]=b[f])}return a};return P.apply(this,arguments)}; | ||
"function"===typeof SuppressedError?SuppressedError:function(a,b,c){c=Error(c);return c.name="SuppressedError",c.error=a,c.suppressed=b,c};for(var M=[],Zb=0;256>Zb;++Zb)M.push((Zb+256).toString(16).slice(1));var Xa,Rc=new Uint8Array(16),ac={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",qa;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info= | ||
4]="info"})(qa||(qa={}));var R=function(a){void 0===a&&(a=qa.warn);return{setLogLevel:function(b){a=qa[b]?b:qa.warn},warn:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=qa.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,aa([f+"\n",c],d,!1)):console.warn.apply(console,aa([f],d,!1)))},error:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=qa.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console, | ||
aa([f+"\n",c],d,!1)):console.error.apply(console,aa([f],d,!1)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=qa.debug&&"undefined"!==typeof console&&console.debug.apply(console,aa(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=qa.info&&"undefined"!==typeof console&&console.info.apply(console,aa(["Snowplow: "+b],c,!1))}}}(),Lc={},Mc={};(function(){var a={rotl:function(b,c){return b<<c|b>>>32-c},rotr:function(b, | ||
c){return b<<32-c|b>>>c},endian:function(b){if(b.constructor==Number)return a.rotl(b,8)&16711935|a.rotl(b,24)&4278255360;for(var c=0;c<b.length;c++)b[c]=a.endian(b[c]);return b},randomBytes:function(b){for(var c=[];0<b;b--)c.push(Math.floor(256*Math.random()));return c},bytesToWords:function(b){for(var c=[],d=0,f=0;d<b.length;d++,f+=8)c[f>>>5]|=b[d]<<24-f%32;return c},wordsToBytes:function(b){for(var c=[],d=0;d<32*b.length;d+=8)c.push(b[d>>>5]>>>24-d%32&255);return c},bytesToHex:function(b){for(var c= | ||
[],d=0;d<b.length;d++)c.push((b[d]>>>4).toString(16)),c.push((b[d]&15).toString(16));return c.join("")},hexToBytes:function(b){for(var c=[],d=0;d<b.length;d+=2)c.push(parseInt(b.substr(d,2),16));return c},bytesToBase64:function(b){for(var c=[],d=0;d<b.length;d+=3)for(var f=b[d]<<16|b[d+1]<<8|b[d+2],g=0;4>g;g++)8*d+6*g<=8*b.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-g)&63)):c.push("=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/ig, | ||
"");for(var c=[],d=0,f=0;d<b.length;f=++d%4)0!=f&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d))>>>6-2*f);return c}};Mc=a})();var $b={utf8:{stringToBytes:function(a){return $b.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape($b.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b= | ||
[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}},Nc=$b;(function(){var a=Mc,b=Nc.utf8,c=Nc.bin,d=function(f,g){var h=a.wordsToBytes,k=f;k.constructor==String?k=b.stringToBytes(k):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(k)?k=Array.prototype.slice.call(k,0):Array.isArray(k)||(k=k.toString());f=a.bytesToWords(k);var p=8*k.length;k=[];var m= | ||
1732584193,q=-271733879,u=-1732584194,t=271733878,l=-1009589776;f[p>>5]|=128<<24-p%32;f[(p+64>>>9<<4)+15]=p;for(p=0;p<f.length;p+=16){for(var w=m,G=q,N=u,E=t,J=l,y=0;80>y;y++){if(16>y)k[y]=f[p+y];else{var Q=k[y-3]^k[y-8]^k[y-14]^k[y-16];k[y]=Q<<1|Q>>>31}Q=(m<<5|m>>>27)+l+(k[y]>>>0)+(20>y?(q&u|~q&t)+1518500249:40>y?(q^u^t)+1859775393:60>y?(q&u|q&t|u&t)-1894007588:(q^u^t)-899497514);l=t;t=u;u=q<<30|q>>>2;q=m;m=Q}m+=w;q+=G;u+=N;t+=E;l+=J}h=h.call(a,[m,q,u,t,l]);return g&&g.asBytes?h:g&&g.asString?c.bytesToString(h): | ||
a.bytesToHex(h)};d._blocksize=16;d._digestsize=20;Lc=d})();var td=Lc,jd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1},uc=!1,db,Ta="x",yd=function(){function a(c){b[c]||(b[c]=pd(c));return b[c]}var b={};return{getCookie:function(c){return a(c).getValue()},setCookie:function(c,d,f,g,h,k,p){return a(c).setValue(d,f,g,h,k,p)},deleteCookie:function(c,d,f,g,h){a(c).deleteValue(d,f,g,h)},clearCache:function(){b={}},flush:function(){for(var c=0,d=Object.values(b);c<d.length;c++)d[c].flush()}}}(), | ||
xd={getCookie:ta,setCookie:function(a,b,c,d,f,g,h){ta(a,b,c,d,f,g,h);return-1!==document.cookie.indexOf("".concat(a,"="))},deleteCookie:cb,flush:function(){}},Wa={},Kc=function(){return function(){this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Oc="undefined"!==typeof window?Gd():void 0;v.SharedState=Kc;v.addGlobalContexts=function(a,b){B(b,function(c){c.core.addGlobalContexts(a)})};v.addPlugin=function(a,b){B(b,function(c){c.addPlugin(a)})};v.clearGlobalContexts=function(a){B(a, | ||
function(b){b.core.clearGlobalContexts()})};v.clearUserData=function(a,b){B(b,function(c){c.clearUserData(a)})};v.crossDomainLinker=function(a,b){B(b,function(c){c.crossDomainLinker(a)})};v.disableActivityTracking=function(a){B(a,function(b){b.disableActivityTracking()})};v.disableActivityTrackingCallback=function(a){B(a,function(b){b.disableActivityTrackingCallback()})};v.disableAnonymousTracking=function(a,b){B(b,function(c){c.disableAnonymousTracking(a)})};v.discardBrace=function(a,b){B(b,function(c){c.discardBrace(a)})}; | ||
v.discardHashTag=function(a,b){B(b,function(c){c.discardHashTag(a)})};v.enableActivityTracking=function(a,b){B(b,function(c){c.enableActivityTracking(a)})};v.enableActivityTrackingCallback=function(a,b){B(b,function(c){c.enableActivityTrackingCallback(a)})};v.enableAnonymousTracking=function(a,b){B(b,function(c){c.enableAnonymousTracking(a)})};v.flushBuffer=function(a,b){B(b,function(c){c.flushBuffer(a)})};v.newSession=function(a){B(a,function(b){b.newSession()})};v.newTracker=function(a,b,c){if(Oc){var d= | ||
"js-".concat("4.0.3");Wa.hasOwnProperty(a)?a=null:(Wa[a]=qd(a,a,d,b,Oc,c),a=Wa[a]);return a}};v.preservePageViewId=function(a){B(a,function(b){b.preservePageViewId()})};v.removeGlobalContexts=function(a,b){B(b,function(c){c.core.removeGlobalContexts(a)})};v.setBufferSize=function(a,b){B(b,function(c){c.setBufferSize(a)})};v.setCollectorUrl=function(a,b){B(b,function(c){c.setCollectorUrl(a)})};v.setCookiePath=function(a,b){B(b,function(c){c.setCookiePath(a)})};v.setCustomUrl=function(a,b){B(b,function(c){c.setCustomUrl(a)})}; | ||
v.setDocumentTitle=function(a,b){B(b,function(c){c.setDocumentTitle(a)})};v.setOptOutCookie=function(a,b){B(b,function(c){c.setOptOutCookie(a)})};v.setReferrerUrl=function(a,b){B(b,function(c){c.setReferrerUrl(a)})};v.setUserId=function(a,b){B(b,function(c){c.setUserId(a)})};v.setUserIdFromCookie=function(a,b){B(b,function(c){c.setUserIdFromCookie(a)})};v.setUserIdFromLocation=function(a,b){B(b,function(c){c.setUserIdFromLocation(a)})};v.setUserIdFromReferrer=function(a,b){B(b,function(c){c.setUserIdFromReferrer(a)})}; | ||
v.setVisitorCookieTimeout=function(a,b){B(b,function(c){c.setVisitorCookieTimeout(a)})};v.trackPageView=function(a,b){B(b,function(c){c.trackPageView(a)})};v.trackSelfDescribingEvent=function(a,b){B(b,function(c){c=c.core;var d=c.track,f=a.event,g=f.schema,h=f.data;f=Ya();g={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:g,data:h}};f.add("e","ue");f.addJson("ue_px","ue_pr",g);d.call(c,f,a.context,a.timestamp)})};v.trackStructEvent=function(a,b){B(b,function(c){c= | ||
c.core;var d=c.track,f=a.category,g=a.action,h=a.label,k=a.property,p=a.value,m=Ya();m.add("e","se");m.add("se_ca",f);m.add("se_ac",g);m.add("se_la",h);m.add("se_pr",k);m.add("se_va",null==p?void 0:p.toString());d.call(c,m,a.context,a.timestamp)})};v.updatePageActivity=function(a){B(a,function(b){b.updatePageActivity()})};v.version="4.0.3";Object.defineProperty(v,"__esModule",{value:!0})}) | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Browser tracker for Snowplow", | ||
@@ -36,4 +36,4 @@ "keywords": [ | ||
"tslib": "^2.3.1", | ||
"@snowplow/browser-tracker-core": "4.0.2", | ||
"@snowplow/tracker-core": "4.0.2" | ||
"@snowplow/browser-tracker-core": "4.0.3", | ||
"@snowplow/tracker-core": "4.0.3" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2088243
6483
+ Added@snowplow/browser-tracker-core@4.0.3(transitive)
+ Added@snowplow/tracker-core@4.0.3(transitive)
- Removed@snowplow/browser-tracker-core@4.0.2(transitive)
- Removed@snowplow/tracker-core@4.0.2(transitive)
Updated@snowplow/tracker-core@4.0.3