Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@snowplow/browser-tracker

Package Overview
Dependencies
Maintainers
3
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1-beta.1

2

dist/index.module.js
/*!
* Browser tracker for Snowplow v3.1.0 (http://bit.ly/sp-js)
* Browser tracker for Snowplow v3.1.1-beta.1 (http://bit.ly/sp-js)
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -4,0 +4,0 @@ * Licensed under BSD-3-Clause

/*!
* Browser tracker for Snowplow v3.1.0 (http://bit.ly/sp-js)
* Browser tracker for Snowplow v3.1.1-beta.1 (http://bit.ly/sp-js)
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -7,73 +7,73 @@ * Licensed under BSD-3-Clause

'use strict';(function(g,v){"object"===typeof exports&&"undefined"!==typeof module?v(exports):"function"===typeof define&&define.amd?define(["exports"],v):(g="undefined"!==typeof globalThis?globalThis:g||self,v(g.snowplowBrowserTracking={}))})(this,function(g){function v(a,b){for(var c=0,d=b.length,e=a.length;c<d;c++,e++)a[e]=b[c];return a}function oa(a){var b={exports:{}};return a(b,b.exports),b.exports}function wb(a){if(!a)return a;var b=0,c=0,d=[];if(a){a=unescape(encodeURIComponent(a));do{var e=
a.charCodeAt(b++);var f=a.charCodeAt(b++);var h=a.charCodeAt(b++);var k=e<<16|f<<8|h;e=k>>18&63;f=k>>12&63;h=k>>6&63;k&=63;d[c++]=da.charAt(e)+da.charAt(f)+da.charAt(h)+da.charAt(k)}while(b<a.length);b=d.join("");a=a.length%3;a=(a?b.slice(0,a-3):b)+"===".slice(a||3)}return a.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function ea(){var a={},b=[],c=[],d,e=function(b,c){null!=c&&""!==c&&(a[b]=c)};return{add:e,addDict:function(a){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&e(b,
a[b])},addJson:function(a,d,e){e&&pa(e)&&(a={keyIfEncoded:a,keyIfNotEncoded:d,json:e},c.push(a),b.push(a))},getPayload:function(){return a},getJson:function(){return b},withJsonProcessor:function(a){d=a},build:function(){null===d||void 0===d?void 0:d(this,c);return a}}}function xb(a){return function(b,c){for(var d=0;d<c.length;d++){var e=c[d],f=JSON.stringify(e.json);a?b.add(e.keyIfEncoded,wb(f)):b.add(e.keyIfNotEncoded,f)}c.length=0}}function pa(a){if(!qa(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,
b))return!0;return!1}function qa(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function yb(){var a=[],b=[];return{getGlobalPrimitives:function(){return a},getConditionalProviders:function(){return b},addGlobalContexts:function(c){for(var d=[],e=[],f=0;f<c.length;f++){var h=c[f];ra(h)?d.push(h):w(h)&&e.push(h)}a=a.concat(e);b=b.concat(d)},clearGlobalContexts:function(){b=[];a=[]},removeGlobalContexts:function(c){for(var d=function(c){ra(c)?
b=b.filter(function(a){return JSON.stringify(a)===JSON.stringify(c)}):w(c)&&(a=a.filter(function(a){return JSON.stringify(a)===JSON.stringify(c)}))},e=0;e<c.length;e++)d(c[e])},getApplicableContexts:function(c){a:{var d=0;for(var e=c.getJson();d<e.length;d++){var f=e[d];if("ue_px"===f.keyIfEncoded&&"object"===typeof f.json.data&&(f=f.json.data.schema,"string"==typeof f)){d=f;break a}}d=""}e=c.getPayload().e;f="string"===typeof e?e:"";e=[];var h=Q(a,c,f,d);e.push.apply(e,h);c=zb(b,c,f,d);e.push.apply(e,
c);return e}}}function Ab(a){return{addPluginContexts:function(b){var c=null!==b&&void 0!==b?b:[];a.forEach(function(a){try{a.contexts&&c.push.apply(c,a.contexts())}catch(e){I.error("Error adding plugin contexts",e)}});return c}}}function Bb(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1,c=0;for(a=a.slice(2);c<a.length;c++)if("*"===a[c])b=!0;else if(b)return!1;return!0}return 2==a.length?!0:!1}function Da(a){return(a=a.split("."))&&1<a.length?Bb(a):!1}function Ea(a){a=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(a);
if(null!==a&&Da(a[1]))return a.slice(1,6)}function R(a){if(a=Ea(a)){var b=a[0];return 5===a.length&&Da(b)}return!1}function Cb(a){return Array.isArray(a)&&a.every(function(a){return"string"===typeof a})}function sa(a){return Cb(a)?a.every(function(a){return R(a)}):"string"===typeof a?R(a):!1}function D(a){return pa(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===typeof a.data:!1}function Db(a){var b=0;if(null!=a&&"object"===typeof a&&!Array.isArray(a)){if(Object.prototype.hasOwnProperty.call(a,
"accept"))if(sa(a.accept))b+=1;else return!1;if(Object.prototype.hasOwnProperty.call(a,"reject"))if(sa(a.reject))b+=1;else return!1;return 0<b&&2>=b}return!1}function fa(a){return"function"===typeof a&&1>=a.length}function w(a){return fa(a)||D(a)}function Fa(a){return Array.isArray(a)&&2===a.length?Array.isArray(a[1])?fa(a[0])&&a[1].every(w):fa(a[0])&&w(a[1]):!1}function Ga(a){return Array.isArray(a)&&2===a.length?Db(a[0])?Array.isArray(a[1])?a[1].every(w):w(a[1]):!1:!1}function ra(a){return Fa(a)||
Ga(a)}function Eb(a,b){var c=0,d=0,e=a.accept;Array.isArray(e)?a.accept.some(function(a){return S(a,b)})&&d++:"string"===typeof e&&S(e,b)&&d++;e=a.reject;Array.isArray(e)?a.reject.some(function(a){return S(a,b)})&&c++:"string"===typeof e&&S(e,b)&&c++;return 0<d&&0===c?!0:!1}function S(a,b){if(!R(a))return!1;a=Ea(a);b=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(b);b=null!==b?b.slice(1,6):void 0;if(a&&b){if(!Fb(a[0],b[0]))return!1;for(var c=
1;5>c;c++)if(!Ha(a[c],b[c]))return!1;return!0}return!1}function Fb(a,b){b=b.split(".");a=a.split(".");if(b&&a){if(b.length!==a.length)return!1;for(var c=0;c<a.length;c++)if(!Ha(b[c],a[c]))return!1;return!0}return!1}function Ha(a,b){return a&&b&&"*"===a||a===b}function Ia(a){return Array.isArray(a)?a:[a]}function Q(a,b,c,d){var e;a=Ia(a).map(function(a){a:if(D(a))a=[a];else{if(fa(a)){b:{var e=void 0;try{var f={event:b.getPayload(),eventType:c,eventSchema:d};e=a(f);if(Array.isArray(e)&&e.every(D)||
D(e)){var g=e;break b}g=void 0;break b}catch(y){}g=void 0}if(D(g)){a=[g];break a}else if(Array.isArray(g)){a=g;break a}}a=void 0}if(a&&0!==a.length)return a});return(e=[]).concat.apply(e,a.filter(function(a){return null!=a&&a.filter(Boolean)}))}function zb(a,b,c,d){var e;a=Ia(a).map(function(a){a:{if(Fa(a)){var e=a[0],f=!1;try{var g={event:b.getPayload(),eventType:c,eventSchema:d};f=e(g)}catch(y){f=!1}if(!0===f){a=Q(a[1],b,c,d);break a}}else if(Ga(a)&&Eb(a[0],d)){a=Q(a[1],b,c,d);break a}a=[]}if(a&&
0!==a.length)return a});return(e=[]).concat.apply(e,a.filter(function(a){return null!=a&&a.filter(Boolean)}))}function Gb(a){return null==a?{type:"dtm",value:(new Date).getTime()}:"number"===typeof a?{type:"dtm",value:a}:"ttm"===a.type?{type:"ttm",value:a.value}:{type:"dtm",value:a.value||(new Date).getTime()}}function Hb(a){void 0===a&&(a={});var b=a.base64,c=a.corePlugins,d=null!==c&&void 0!==c?c:[];a=function(a,b,c){function d(a,b){a=f.getApplicableContexts(a);var c=[];b&&b.length&&c.push.apply(c,
b);a&&a.length&&c.push.apply(c,a);return c}var e=Ab(b),f=yb(),h=a,k={};return{track:function(a,f,g){a.withJsonProcessor(xb(h));a.add("eid",q.v4());a.addDict(k);g=Gb(g);a.add(g.type,g.value.toString());f=d(a,e.addPluginContexts(f));f=f&&f.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:f}:void 0;void 0!==f&&a.addJson("cx","co",f);b.forEach(function(b){try{b.beforeTrack&&b.beforeTrack(a)}catch(p){I.error("Plugin beforeTrack",p)}});"function"===typeof c&&c(a);var E=
a.build();b.forEach(function(a){try{a.afterTrack&&a.afterTrack(E)}catch(p){I.error("Plugin afterTrack",p)}});return E},addPayloadPair:function(a,b){k[a]=b},getBase64Encoding:function(){return h},setBase64Encoding:function(a){h=a},addPayloadDict:function(a){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&(k[b]=a[b])},resetPayloadPairs:function(a){k=qa(a)?a:{}},setTrackerVersion:function(a){k.tv=a},setTrackerNamespace:function(a){k.tna=a},setAppId:function(a){k.aid=a},setPlatform:function(a){k.p=
'use strict';(function(g,w){"object"===typeof exports&&"undefined"!==typeof module?w(exports):"function"===typeof define&&define.amd?define(["exports"],w):(g="undefined"!==typeof globalThis?globalThis:g||self,w(g.snowplowBrowserTracking={}))})(this,function(g){function w(a,b){for(var c=0,d=b.length,e=a.length;c<d;c++,e++)a[e]=b[c];return a}function ba(a){var b={exports:{}};return a(b,b.exports),b.exports}function vb(a){if(!a)return a;var b=0,c=0,d=[];if(a){a=unescape(encodeURIComponent(a));do{var e=
a.charCodeAt(b++);var f=a.charCodeAt(b++);var h=a.charCodeAt(b++);var k=e<<16|f<<8|h;e=k>>18&63;f=k>>12&63;h=k>>6&63;k&=63;d[c++]=K.charAt(e)+K.charAt(f)+K.charAt(h)+K.charAt(k)}while(b<a.length);b=d.join("");a=a.length%3;a=(a?b.slice(0,a-3):b)+"===".slice(a||3)}return a.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function ca(){var a={},b=[],c=[],d,e=function(b,c){null!=c&&""!==c&&(a[b]=c)};return{add:e,addDict:function(a){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&e(b,a[b])},
addJson:function(a,d,e){e&&na(e)&&(a={keyIfEncoded:a,keyIfNotEncoded:d,json:e},c.push(a),b.push(a))},getPayload:function(){return a},getJson:function(){return b},withJsonProcessor:function(a){d=a},build:function(){null===d||void 0===d?void 0:d(this,c);return a}}}function wb(a){return function(b,c){for(var d=0;d<c.length;d++){var e=c[d],f=JSON.stringify(e.json);a?b.add(e.keyIfEncoded,vb(f)):b.add(e.keyIfNotEncoded,f)}c.length=0}}function na(a){if(!oa(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,
b))return!0;return!1}function oa(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function xb(){var a=[],b=[];return{getGlobalPrimitives:function(){return a},getConditionalProviders:function(){return b},addGlobalContexts:function(c){for(var d=[],e=[],f=0;f<c.length;f++){var h=c[f];pa(h)?d.push(h):A(h)&&e.push(h)}a=a.concat(e);b=b.concat(d)},clearGlobalContexts:function(){b=[];a=[]},removeGlobalContexts:function(c){for(var d=function(c){pa(c)?
b=b.filter(function(a){return JSON.stringify(a)===JSON.stringify(c)}):A(c)&&(a=a.filter(function(a){return JSON.stringify(a)===JSON.stringify(c)}))},e=0;e<c.length;e++)d(c[e])},getApplicableContexts:function(c){a:{var d=0;for(var e=c.getJson();d<e.length;d++){var f=e[d];if("ue_px"===f.keyIfEncoded&&"object"===typeof f.json.data&&(f=f.json.data.schema,"string"==typeof f)){d=f;break a}}d=""}e=c.getPayload().e;f="string"===typeof e?e:"";e=[];var h=qa(a,c,f,d);e.push.apply(e,h);c=yb(b,c,f,d);e.push.apply(e,
c);return e}}}function zb(a){return{addPluginContexts:function(b){var c=null!==b&&void 0!==b?b:[];a.forEach(function(a){try{a.contexts&&c.push.apply(c,a.contexts())}catch(e){I.error("Error adding plugin contexts",e)}});return c}}}function Ab(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1,c=0;for(a=a.slice(2);c<a.length;c++)if("*"===a[c])b=!0;else if(b)return!1;return!0}return 2==a.length?!0:!1}function Ca(a){return(a=a.split("."))&&1<a.length?Ab(a):!1}function Da(a){a=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(a);
if(null!==a&&Ca(a[1]))return a.slice(1,6)}function R(a){if(a=Da(a)){var b=a[0];return 5===a.length&&Ca(b)}return!1}function Bb(a){return Array.isArray(a)&&a.every(function(a){return"string"===typeof a})}function ra(a){return Bb(a)?a.every(function(a){return R(a)}):"string"===typeof a?R(a):!1}function D(a){return na(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===typeof a.data:!1}function Cb(a){var b=0;if(null!=a&&"object"===typeof a&&!Array.isArray(a)){if(Object.prototype.hasOwnProperty.call(a,
"accept"))if(ra(a.accept))b+=1;else return!1;if(Object.prototype.hasOwnProperty.call(a,"reject"))if(ra(a.reject))b+=1;else return!1;return 0<b&&2>=b}return!1}function da(a){return"function"===typeof a&&1>=a.length}function A(a){return da(a)||D(a)}function Ea(a){return Array.isArray(a)&&2===a.length?Array.isArray(a[1])?da(a[0])&&a[1].every(A):da(a[0])&&A(a[1]):!1}function Fa(a){return Array.isArray(a)&&2===a.length?Cb(a[0])?Array.isArray(a[1])?a[1].every(A):A(a[1]):!1:!1}function pa(a){return Ea(a)||
Fa(a)}function Db(a,b){var c=0,d=0,e=a.accept;Array.isArray(e)?a.accept.some(function(a){return ea(a,b)})&&d++:"string"===typeof e&&ea(e,b)&&d++;e=a.reject;Array.isArray(e)?a.reject.some(function(a){return ea(a,b)})&&c++:"string"===typeof e&&ea(e,b)&&c++;return 0<d&&0===c?!0:!1}function ea(a,b){if(!R(a))return!1;a=Da(a);b=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(b);b=null!==b?b.slice(1,6):void 0;if(a&&b){if(!Eb(a[0],b[0]))return!1;
for(var c=1;5>c;c++)if(!Ga(a[c],b[c]))return!1;return!0}return!1}function Eb(a,b){b=b.split(".");a=a.split(".");if(b&&a){if(b.length!==a.length)return!1;for(var c=0;c<a.length;c++)if(!Ga(b[c],a[c]))return!1;return!0}return!1}function Ga(a,b){return a&&b&&"*"===a||a===b}function Ha(a){return Array.isArray(a)?a:[a]}function qa(a,b,c,d){var e;a=Ha(a).map(function(a){a:if(D(a))a=[a];else{if(da(a)){b:{var e=void 0;try{var f={event:b.getPayload(),eventType:c,eventSchema:d};e=a(f);if(Array.isArray(e)&&e.every(D)||
D(e)){var g=e;break b}g=void 0;break b}catch(y){}g=void 0}if(D(g)){a=[g];break a}else if(Array.isArray(g)){a=g;break a}}a=void 0}if(a&&0!==a.length)return a});return(e=[]).concat.apply(e,a.filter(function(a){return null!=a&&a.filter(Boolean)}))}function yb(a,b,c,d){var e;a=Ha(a).map(function(a){a:{if(Ea(a)){var e=a[0],f=!1;try{var g={event:b.getPayload(),eventType:c,eventSchema:d};f=e(g)}catch(y){f=!1}if(!0===f){a=qa(a[1],b,c,d);break a}}else if(Fa(a)&&Db(a[0],d)){a=qa(a[1],b,c,d);break a}a=[]}if(a&&
0!==a.length)return a});return(e=[]).concat.apply(e,a.filter(function(a){return null!=a&&a.filter(Boolean)}))}function Fb(a){return null==a?{type:"dtm",value:(new Date).getTime()}:"number"===typeof a?{type:"dtm",value:a}:"ttm"===a.type?{type:"ttm",value:a.value}:{type:"dtm",value:a.value||(new Date).getTime()}}function Gb(a){void 0===a&&(a={});var b=a.base64,c=a.corePlugins,d=null!==c&&void 0!==c?c:[];a=function(a,b,c){function d(a,b){a=f.getApplicableContexts(a);var c=[];b&&b.length&&c.push.apply(c,
b);a&&a.length&&c.push.apply(c,a);return c}var e=zb(b),f=xb(),h=a,k={};return{track:function(a,f,g){a.withJsonProcessor(wb(h));a.add("eid",r.v4());a.addDict(k);g=Fb(g);a.add(g.type,g.value.toString());f=d(a,e.addPluginContexts(f));f=f&&f.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:f}:void 0;void 0!==f&&a.addJson("cx","co",f);b.forEach(function(b){try{b.beforeTrack&&b.beforeTrack(a)}catch(p){I.error("Plugin beforeTrack",p)}});"function"===typeof c&&c(a);var E=
a.build();b.forEach(function(a){try{a.afterTrack&&a.afterTrack(E)}catch(p){I.error("Plugin afterTrack",p)}});return E},addPayloadPair:function(a,b){k[a]=b},getBase64Encoding:function(){return h},setBase64Encoding:function(a){h=a},addPayloadDict:function(a){for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&(k[b]=a[b])},resetPayloadPairs:function(a){k=oa(a)?a:{}},setTrackerVersion:function(a){k.tv=a},setTrackerNamespace:function(a){k.tna=a},setAppId:function(a){k.aid=a},setPlatform:function(a){k.p=
a},setUserId:function(a){k.uid=a},setScreenResolution:function(a,b){k.res=a+"x"+b},setViewport:function(a,b){k.vp=a+"x"+b},setColorDepth:function(a){k.cd=a},setTimezone:function(a){k.tz=a},setLang:function(a){k.lang=a},setIpAddress:function(a){k.ip=a},setUseragent:function(a){k.ua=a},addGlobalContexts:function(a){f.addGlobalContexts(a)},clearGlobalContexts:function(){f.clearGlobalContexts()},removeGlobalContexts:function(a){f.removeGlobalContexts(a)}}}(null!==b&&void 0!==b?b:!0,d,a.callback);var e=
A(A({},a),{addPlugin:function(a){var b,c;a=a.plugin;d.push(a);null===(b=a.logger)||void 0===b?void 0:b.call(a,I);null===(c=a.activateCorePlugin)||void 0===c?void 0:c.call(a,e)}});null===d||void 0===d?void 0:d.forEach(function(a){var b,c;null===(b=a.logger)||void 0===b?void 0:b.call(a,I);null===(c=a.activateCorePlugin)||void 0===c?void 0:c.call(a,e)});return e}function Ib(a){var b=a.event;a=b.schema;var c=b.data;b=ea();a={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",
data:{schema:a,data:c}};b.add("e","ue");b.addJson("ue_px","ue_pr",a);return b}function Jb(a){var b=a.pageUrl,c=a.pageTitle;a=a.referrer;var d=ea();d.add("e","pv");d.add("url",b);d.add("page",c);d.add("refr",a);return d}function Kb(a){var b=a.pageUrl,c=a.pageTitle,d=a.referrer,e=a.minXOffset,f=a.maxXOffset,h=a.minYOffset;a=a.maxYOffset;var k=ea();k.add("e","pp");k.add("url",b);k.add("page",c);k.add("refr",d);e&&!isNaN(Number(e))&&k.add("pp_mix",e.toString());f&&!isNaN(Number(f))&&k.add("pp_max",f.toString());
h&&!isNaN(Number(h))&&k.add("pp_miy",h.toString());a&&!isNaN(Number(a))&&k.add("pp_may",a.toString());return k}function Lb(a){var b=a.category,c=a.action,d=a.label,e=a.property;a=a.value;var f=ea();f.add("e","se");f.add("se_ca",b);f.add("se_ac",c);f.add("se_la",d);f.add("se_pr",e);f.add("se_va",null==a?void 0:a.toString());return f}function Mb(){try{var a=!!window.localStorage}catch(c){a=!0}if(!a)return!1;try{var b=window.localStorage;b.setItem("modernizr","modernizr");b.removeItem("modernizr");return!0}catch(c){return!1}}
function Nb(){if("innerWidth"in window){var a=window.innerWidth;var b=window.innerHeight}else b=document.documentElement||document.body,a=b.clientWidth,b=b.clientHeight;return 0<=a&&0<=b?a+"x"+b:null}function Ob(){var a=document.documentElement,b=document.body,c=Math.max(a.clientWidth,a.offsetWidth,a.scrollWidth);a=Math.max(a.clientHeight,a.offsetHeight,a.scrollHeight,b?Math.max(b.offsetHeight,b.scrollHeight):0);return isNaN(c)||isNaN(a)?"":c+"x"+a}function nb(a){return Number.isInteger&&Number.isInteger(a)||
"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function ob(a){if(!a||"string"!==typeof a.valueOf()){a=a.text||"";var b=document.getElementsByTagName("title");b&&null!=b[0]&&(a=b[0].text)}return a}function Wa(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return b?b[1]:a}function pb(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1));return a}function Xa(a){var b=window,c="",d=ta("referrer",b.location.href)||ta("referer",b.location.href);
if(d)return d;if(a)return a;try{c=b.top.document.referrer}catch(e){if(b.parent)try{c=b.parent.document.referrer}catch(f){c=""}}""===c&&(c=document.referrer);return c}function B(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 ta(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function Ja(a,b,c){void 0===c&&(c=63072E3);try{var d=window.localStorage,
e=Date.now()+1E3*c;d.setItem(a+".expires",e.toString());d.setItem(a,b);return!0}catch(f){return!1}}function qb(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function Pb(a,b){for(var c=window.location.hostname,d="_sp_root_domain_test_"+(new Date).getTime(),e="_test_value_"+(new Date).getTime(),f=c.split("."),h=f.length-1;0<=h;){var k=f.slice(h,f.length).join(".");x(d,e,0,"/",k,a,b);if(x(d)===e){x(d,"",-1,"/",k,a,b);c=document.cookie.split("; ");
q(q({},a),{addPlugin:function(a){var b,c;a=a.plugin;d.push(a);null===(b=a.logger)||void 0===b?void 0:b.call(a,I);null===(c=a.activateCorePlugin)||void 0===c?void 0:c.call(a,e)}});null===d||void 0===d?void 0:d.forEach(function(a){var b,c;null===(b=a.logger)||void 0===b?void 0:b.call(a,I);null===(c=a.activateCorePlugin)||void 0===c?void 0:c.call(a,e)});return e}function Hb(a){var b=a.event;a=b.schema;var c=b.data;b=ca();a={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",
data:{schema:a,data:c}};b.add("e","ue");b.addJson("ue_px","ue_pr",a);return b}function Ib(a){var b=a.pageUrl,c=a.pageTitle;a=a.referrer;var d=ca();d.add("e","pv");d.add("url",b);d.add("page",c);d.add("refr",a);return d}function Jb(a){var b=a.pageUrl,c=a.pageTitle,d=a.referrer,e=a.minXOffset,f=a.maxXOffset,h=a.minYOffset;a=a.maxYOffset;var k=ca();k.add("e","pp");k.add("url",b);k.add("page",c);k.add("refr",d);e&&!isNaN(Number(e))&&k.add("pp_mix",e.toString());f&&!isNaN(Number(f))&&k.add("pp_max",f.toString());
h&&!isNaN(Number(h))&&k.add("pp_miy",h.toString());a&&!isNaN(Number(a))&&k.add("pp_may",a.toString());return k}function Kb(a){var b=a.category,c=a.action,d=a.label,e=a.property;a=a.value;var f=ca();f.add("e","se");f.add("se_ca",b);f.add("se_ac",c);f.add("se_la",d);f.add("se_pr",e);f.add("se_va",null==a?void 0:a.toString());return f}function Lb(){try{var a=!!window.localStorage}catch(c){a=!0}if(!a)return!1;try{var b=window.localStorage;b.setItem("modernizr","modernizr");b.removeItem("modernizr");return!0}catch(c){return!1}}
function Mb(){if("innerWidth"in window){var a=window.innerWidth;var b=window.innerHeight}else b=document.documentElement||document.body,a=b.clientWidth,b=b.clientHeight;return 0<=a&&0<=b?a+"x"+b:null}function Nb(){var a=document.documentElement,b=document.body,c=Math.max(a.clientWidth,a.offsetWidth,a.scrollWidth);a=Math.max(a.clientHeight,a.offsetHeight,a.scrollHeight,b?Math.max(b.offsetHeight,b.scrollHeight):0);return isNaN(c)||isNaN(a)?"":c+"x"+a}function nb(a){return Number.isInteger&&Number.isInteger(a)||
"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function ob(a){if(!a||"string"!==typeof a.valueOf()){a=a.text||"";var b=document.getElementsByTagName("title");b&&null!=b[0]&&(a=b[0].text)}return a}function Va(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return b?b[1]:a}function pb(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1));return a}function Wa(a){var b=window,c="",d=sa("referrer",b.location.href)||sa("referer",b.location.href);
if(d)return d;if(a)return a;try{c=b.top.document.referrer}catch(e){if(b.parent)try{c=b.parent.document.referrer}catch(f){c=""}}""===c&&(c=document.referrer);return c}function B(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 sa(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function Ia(a,b,c){void 0===c&&(c=63072E3);try{var d=window.localStorage,
e=Date.now()+1E3*c;d.setItem(a+".expires",e.toString());d.setItem(a,b);return!0}catch(f){return!1}}function qb(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function Ob(a,b){for(var c=window.location.hostname,d="_sp_root_domain_test_"+(new Date).getTime(),e="_test_value_"+(new Date).getTime(),f=c.split("."),h=f.length-1;0<=h;){var k=f.slice(h,f.length).join(".");x(d,e,0,"/",k,a,b);if(x(d)===e){x(d,"",-1,"/",k,a,b);c=document.cookie.split("; ");
d=[];for(e=0;e<c.length;e++)"_sp_root_domain_test_"===c[e].substring(0,21)&&d.push(c[e]);c=d;for(d=0;d<c.length;d++)x(c[d],"",-1,"/",k,a,b);return k}--h}return c}function x(a,b,c,d,e,f,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:"")+(e?"; Domain="+e:"")+(f?"; SameSite="+f:"")+(h?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}
function Qb(a,b,c,d,e,f,h,k,g,l,J){function y(a){var b="?",c={co:!0,cx:!0},d=!0,e;for(e in a)a.hasOwnProperty(e)&&!c.hasOwnProperty(e)&&(d?d=!1:b+="&",b+=encodeURIComponent(e)+"="+encodeURIComponent(a[e]));for(var f in c)a.hasOwnProperty(f)&&c.hasOwnProperty(f)&&(b+="&"+f+"="+encodeURIComponent(a[f]));return b}function ha(a){var b=Object.keys(a).map(function(b){return[b,a[b]]}).reduce(function(a,b){a[b[0]]=b[1].toString();return a},{});return{evt:b,bytes:E(JSON.stringify(b))}}function E(a){for(var b=
0,c=0;c<a.length;c++){var d=a.charCodeAt(c);127>=d?b+=1:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,c++):b=65535>d?b+3:b+4}return b}function m(a){for(void 0===a&&(a=!1);n.length&&"string"!==typeof n[0]&&"object"!==typeof n[0];)n.shift();if(1>n.length)F=!1;else{if(!L||"string"!==typeof L.valueOf())throw"No collector configured";F=!0;if(w){var b=function(a){for(var b=0,c=0;b<a.length&&!(c+=a[b].bytes,c>=h);)b+=1;return b},d=void 0;if(ia(n)){d=L;var e=q(d,!0,a);var f=b(n)}else d=p(n[0]),e=q(d,!1,a),f=1;var k=
setTimeout(function(){e.abort();F=!1},l),E=function(a){for(var b=0;b<a;b++)n.shift();c&&Ja(T,JSON.stringify(n.slice(0,g)));m()};e.onreadystatechange=function(){4===e.readyState&&200<=e.status&&400>e.status?(clearTimeout(k),E(f)):4===e.readyState&&400<=e.status&&(clearTimeout(k),F=!1)};if(ia(n)){if(b=n.slice(0,f),0<b.length){a=!1;b=b.map(function(a){return a.evt});if(t){var rb=new Blob([x(Va(b))],{type:"application/json"});try{a=navigator.sendBeacon(d,rb)}catch(Ka){a=!1}}!0===a?E(f):e.send(x(Va(b)))}}else e.send()}else if(J||
ia(n))F=!1;else{d=new Image(1,1);var y=!0;d.onload=function(){y&&(y=!1,n.shift(),c&&Ja(T,JSON.stringify(n.slice(0,g))),m())};d.onerror=function(){y&&(F=y=!1)};d.src=p(n[0]);setTimeout(function(){y&&F&&(y=!1,m())},l)}}}function q(a,b,c){var d=new XMLHttpRequest;b?(d.open("POST",a,!c),d.setRequestHeader("Content-Type","application/json; charset=UTF-8")):d.open("GET",a,!c);d.withCredentials=!0;J&&d.setRequestHeader("SP-Anonymous","*");return d}function x(a){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
data:a})}function Va(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function p(a){return k?L+a.replace("?","?stm="+(new Date).getTime()+"&"):L+a}function v(a){function b(a,b,c){return(c=c.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))&&c.length?parseInt(c[0])<=a||parseInt(c[0])===a&&parseInt(c[1])<=b:!1}function c(a){return a.match("Version/.* Safari/")&&!a.match("Chrom(e|ium)")}return function(a,b){return(b=b.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&
b.length?parseInt(b[0])<=a:!1}(13,a)||b(10,15,a)&&c(a)}var F=!1,L,n=[];d="string"===typeof d?d.toLowerCase():d;var A=window.localStorage,u=window.navigator,B=null===d||!0===d||"beacon"===d||"true"===d,t=!(!(B&&u&&u.sendBeacon)||v(u.userAgent))&&B,w=!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),La="get"!==d&&w&&("post"===d||B),D=La?e:"/i",T="snowplowOutQueue_"+a+"_"+(La?"post2":"get");f=Mb()&&c&&La&&f||1;if(c)try{var M=A.getItem(T);n=M?JSON.parse(M):[]}catch(rb){}Array.isArray(n)||
(n=[]);b.outQueues.push(n);w&&1<f&&b.bufferFlushers.push(function(a){F||m(a)});var ia=function(a){return"object"===typeof a[0]};return{enqueueRequest:function(a,b){L=b+D;if(La){a=ha(a);if(a.bytes>=h){I.warn("Event ("+a.bytes+"B) too big, max is "+h);q(L,!0,!1).send(x(Va([a.evt])));return}n.push(a)}else n.push(y(a));a=!1;c&&(a=Ja(T,JSON.stringify(n.slice(0,g))));F||a&&!(n.length>=f)||m()},executeQueue:function(){F||m()},setUseLocalStorage:function(a){c=a},setAnonymousTracking:function(a){J=a},setCollectorUrl:function(a){L=
a+D},setBufferSize:function(a){f=a}}}function sb(a,b,c){if("translate.googleusercontent.com"===a)""===c&&(c=b),a=(a=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(b))&&1<(null===a||void 0===a?void 0:a.length)?ta("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=Wa(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=Wa(b);return[a,b,c]}function Rb(a,b,c,d,e,f){var h;void 0===f&&(f={});a=function(a,b,c,d,e,f){function h(){U=sb(window.location.hostname,window.location.href,
Xa());U[1]!==N&&(ua=Xa(N));sa=pb(U[0]);N=U[1]}function k(a){var b=(new Date).getTime();a=a.target;if(null===a||void 0===a?0:a.href){b="_sp="+(ja+"."+b);var c=a.href.split("#"),d=c[0].split("?"),e=d.shift();if(d=d.join("?")){for(var f=!0,V=d.split("&"),h=0;h<V.length;h++)if("_sp="===V[h].substr(0,4)){f=!1;V[h]=b;d=V.join("&");break}f&&(d=b+"&"+d)}else d=b;c[0]=e+"?"+d;b=c.join("#");a.href=b}}function g(a){for(var b=0;b<document.links.length;b++){var c=document.links[b];!c.spDecorationEnabled&&a(c)&&
(B(c,"click",k,!0),B(c,"mousedown",k,!0),c.spDecorationEnabled=!0)}}function l(a){if(ya){var b=/#.*/;a=a.replace(b,"")}za&&(b=/[{}]/g,a=a.replace(b,""));return a}function y(a){return(a=/^([a-z]+):/.exec(a))?a[1]:null}function m(a){a=ka+a+"."+W;if("localStorage"==r){try{var b=window.localStorage,c=b.getItem(a+".expires");if(null===c||+c>Date.now())var d=b.getItem(a);else b.removeItem(a),b.removeItem(a+".expires"),d=void 0}catch(Vb){d=void 0}return d}if("cookie"==r||"cookieAndLocalStorage"==r)return x(a)}
function ha(){h();W=Sb((va||sa)+(Ya||"/")).slice(0,4)}function J(){Ma=(new Date).getTime()}function n(){var a=u(),b=a[0];b<Na?Na=b:b>Oa&&(Oa=b);a=a[1];a<Pa?Pa=a:a>Qa&&(Qa=a);J()}function u(){var a=document.documentElement;return a?[a.scrollLeft||window.pageXOffset,a.scrollTop||window.pageYOffset]:[0,0]}function v(){var a=u(),b=a[0];Oa=Na=b;Qa=Pa=a=a[1]}function w(){t(ka+"ses."+W,"*",tb)}function Ua(a,b,c,d,e,f){t(ka+"id."+W,a+"."+b+"."+c+"."+d+"."+e+"."+f,Ca)}function t(a,b,c){if(!O||la)"localStorage"==
r?Ja(a,b,c):("cookie"==r||"cookieAndLocalStorage"==r)&&x(a,b,c,Ya,va,Ra,Sa)}function E(a){var b=ka+"id."+W,c=ka+"ses."+W;qb(b);qb(c);x(b,"",-1,"/",va,Ra,Sa);x(c,"",-1,"/",va,Ra,Sa);null!==a&&void 0!==a&&a.preserveSession||(z=q.v4(),G=0);null!==a&&void 0!==a&&a.preserveUser||(ja=q.v4(),X=null)}function D(a){a&&a.stateStorageStrategy&&(f.stateStorageStrategy=a.stateStorageStrategy,r=pa(f));O=!!f.anonymousTracking;la=qa(f);Za=ra(f);P.setUseLocalStorage("localStorage"==r||"cookieAndLocalStorage"==r);
P.setAnonymousTracking(Za)}function T(){if(!O||la){var a="none"!=r&&!!m("ses"),b=M();b[1]?ja=b[1]:(ja=O?"":q.v4(),b[1]=ja);z=b[6];a||(b[3]++,z=q.v4(),b[6]=z,b[5]=b[4]);"none"!=r&&(w(),b[4]=Math.round((new Date).getTime()/1E3),b.shift(),Ua.apply(null,b))}}function M(){if("none"==r)return[];var a=Math.round((new Date).getTime()/1E3),b=m("id");b?(a=b.split("."),a.unshift("0")):a=["1",ja,a,0,a,""];a[6]||(a[6]=q.v4());return a}function ia(a){return 0===a.indexOf("http")?a:("https:"===document.location.protocol?
"https":"http")+"://"+a}function mb(){ub&&null!=e.pageViewId||(e.pageViewId=q.v4())}function K(){null==e.pageViewId&&(e.pageViewId=q.v4());return e.pageViewId}function da(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:K()}}]}}}function ea(a){var b=a.title,c=a.context,d=a.timestamp;a=a.contextCallback;h();vb&&mb();vb=!0;ma=document.title;wa=b;b=ob(wa||ma);C.track(Jb({pageUrl:l(na||N),pageTitle:b,referrer:l(Ta||ua)}),(c||[]).concat(a?
function Pb(a,b,c,d,e,f,h,k,g,l,J){function y(a){var b="?",c={co:!0,cx:!0},d=!0,e;for(e in a)a.hasOwnProperty(e)&&!c.hasOwnProperty(e)&&(d?d=!1:b+="&",b+=encodeURIComponent(e)+"="+encodeURIComponent(a[e]));for(var f in c)a.hasOwnProperty(f)&&c.hasOwnProperty(f)&&(b+="&"+f+"="+encodeURIComponent(a[f]));return b}function fa(a){var b=Object.keys(a).map(function(b){return[b,a[b]]}).reduce(function(a,b){a[b[0]]=b[1].toString();return a},{});return{evt:b,bytes:E(JSON.stringify(b))}}function E(a){for(var b=
0,c=0;c<a.length;c++){var d=a.charCodeAt(c);127>=d?b+=1:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,c++):b=65535>d?b+3:b+4}return b}function m(a){for(void 0===a&&(a=!1);n.length&&"string"!==typeof n[0]&&"object"!==typeof n[0];)n.shift();if(1>n.length)F=!1;else{if(!M||"string"!==typeof M.valueOf())throw"No collector configured";F=!0;if(B){var b=function(a){for(var b=0,c=0;b<a.length&&!(c+=a[b].bytes,c>=h);)b+=1;return b},d=void 0;if(ha(n)){d=M;var e=r(d,!0,a);var f=b(n)}else d=p(n[0]),e=r(d,!1,a),f=1;var k=
setTimeout(function(){e.abort();F=!1},l),E=function(a){for(var b=0;b<a;b++)n.shift();c&&Ia(Ka,JSON.stringify(n.slice(0,g)));m()};e.onreadystatechange=function(){4===e.readyState&&200<=e.status&&400>e.status?(clearTimeout(k),E(f)):4===e.readyState&&400<=e.status&&(clearTimeout(k),F=!1)};if(ha(n)){if(b=n.slice(0,f),0<b.length){a=!1;b=b.map(function(a){return a.evt});if(v){var L=new Blob([x(Ua(b))],{type:"application/json"});try{a=navigator.sendBeacon(d,L)}catch(Ja){a=!1}}!0===a?E(f):e.send(x(Ua(b)))}}else e.send()}else if(J||
ha(n))F=!1;else{d=new Image(1,1);var y=!0;d.onload=function(){y&&(y=!1,n.shift(),c&&Ia(Ka,JSON.stringify(n.slice(0,g))),m())};d.onerror=function(){y&&(F=y=!1)};d.src=p(n[0]);setTimeout(function(){y&&F&&(y=!1,m())},l)}}}function r(a,b,c){var d=new XMLHttpRequest;b?(d.open("POST",a,!c),d.setRequestHeader("Content-Type","application/json; charset=UTF-8")):d.open("GET",a,!c);d.withCredentials=!0;J&&d.setRequestHeader("SP-Anonymous","*");return d}function x(a){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",
data:a})}function Ua(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function p(a){return k?M+a.replace("?","?stm="+(new Date).getTime()+"&"):M+a}function w(a){function b(a,b,c){return(c=c.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))&&c.length?parseInt(c[0])<=a||parseInt(c[0])===a&&parseInt(c[1])<=b:!1}function c(a){return a.match("Version/.* Safari/")&&!a.match("Chrom(e|ium)")}return function(a,b){return(b=b.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&
b.length?parseInt(b[0])<=a:!1}(13,a)||b(10,15,a)&&c(a)}var F=!1,M,n=[];d="string"===typeof d?d.toLowerCase():d;var q=null===d||!0===d||"beacon"===d||"true"===d,v=!(!(q&&window.navigator&&window.navigator.sendBeacon)||w(window.navigator.userAgent))&&q,B=!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),u="get"!==d&&B&&("post"===d||q),A=u?e:"/i",Ka="snowplowOutQueue_"+a+"_"+(u?"post2":"get");f=c&&Lb()&&u&&f||1;if(c)try{var D=window.localStorage.getItem(Ka);n=D?JSON.parse(D):[]}catch(L){}Array.isArray(n)||
(n=[]);b.outQueues.push(n);B&&1<f&&b.bufferFlushers.push(function(a){F||m(a)});var ha=function(a){return"object"===typeof a[0]};return{enqueueRequest:function(a,b){M=b+A;if(u){a=fa(a);if(a.bytes>=h){I.warn("Event ("+a.bytes+"B) too big, max is "+h);r(M,!0,!1).send(x(Ua([a.evt])));return}n.push(a)}else n.push(y(a));a=!1;c&&(a=Ia(Ka,JSON.stringify(n.slice(0,g))));F||a&&!(n.length>=f)||m()},executeQueue:function(){F||m()},setUseLocalStorage:function(a){c=a},setAnonymousTracking:function(a){J=a},setCollectorUrl:function(a){M=
a+A},setBufferSize:function(a){f=a}}}function rb(a,b,c){if("translate.googleusercontent.com"===a)""===c&&(c=b),a=(a=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(b))&&1<(null===a||void 0===a?void 0:a.length)?sa("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=Va(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=Va(b);return[a,b,c]}function Qb(a,b,c,d,e,f){var h;void 0===f&&(f={});a=function(a,b,c,d,e,f){function h(){S=rb(window.location.hostname,window.location.href,
Wa());S[1]!==N&&(ta=Wa(N));ra=pb(S[0]);N=S[1]}function k(a){var b=(new Date).getTime();a=a.target;if(null===a||void 0===a?0:a.href){b="_sp="+(ia+"."+b);var c=a.href.split("#"),d=c[0].split("?"),e=d.shift();if(d=d.join("?")){for(var f=!0,T=d.split("&"),h=0;h<T.length;h++)if("_sp="===T[h].substr(0,4)){f=!1;T[h]=b;d=T.join("&");break}f&&(d=b+"&"+d)}else d=b;c[0]=e+"?"+d;b=c.join("#");a.href=b}}function g(a){for(var b=0;b<document.links.length;b++){var c=document.links[b];!c.spDecorationEnabled&&a(c)&&
(B(c,"click",k,!0),B(c,"mousedown",k,!0),c.spDecorationEnabled=!0)}}function l(a){if(xa){var b=/#.*/;a=a.replace(b,"")}ya&&(b=/[{}]/g,a=a.replace(b,""));return a}function y(a){return(a=/^([a-z]+):/.exec(a))?a[1]:null}function m(a){a=ja+a+"."+U;if("localStorage"==t){try{var b=window.localStorage,c=b.getItem(a+".expires");if(null===c||+c>Date.now())var d=b.getItem(a);else b.removeItem(a),b.removeItem(a+".expires"),d=void 0}catch(Ub){d=void 0}return d}if("cookie"==t||"cookieAndLocalStorage"==t)return x(a)}
function fa(){h();U=Rb((ua||ra)+(Xa||"/")).slice(0,4)}function J(){La=(new Date).getTime()}function n(){var a=u(),b=a[0];b<Ma?Ma=b:b>Na&&(Na=b);a=a[1];a<Oa?Oa=a:a>Pa&&(Pa=a);J()}function u(){var a=document.documentElement;return a?[a.scrollLeft||window.pageXOffset,a.scrollTop||window.pageYOffset]:[0,0]}function w(){var a=u(),b=a[0];Na=Ma=b;Pa=Oa=a=a[1]}function v(){A(ja+"ses."+U,"*",sb)}function Ta(a,b,c,d,e,f){A(ja+"id."+U,a+"."+b+"."+c+"."+d+"."+e+"."+f,Ba)}function A(a,b,c){if(!O||ka)"localStorage"==
t?Ia(a,b,c):("cookie"==t||"cookieAndLocalStorage"==t)&&x(a,b,c,Xa,ua,Qa,Ra)}function E(a){var b=ja+"id."+U,c=ja+"ses."+U;qb(b);qb(c);x(b,"",-1,"/",ua,Qa,Ra);x(c,"",-1,"/",ua,Qa,Ra);null!==a&&void 0!==a&&a.preserveSession||(z=r.v4(),G=0);null!==a&&void 0!==a&&a.preserveUser||(ia=r.v4(),V=null)}function D(a){a&&a.stateStorageStrategy&&(f.stateStorageStrategy=a.stateStorageStrategy,t=na(f));O=!!f.anonymousTracking;ka=oa(f);Ya=pa(f);P.setUseLocalStorage("localStorage"==t||"cookieAndLocalStorage"==t);
P.setAnonymousTracking(Ya)}function ha(){if(!O||ka){var a="none"!=t&&!!m("ses"),b=L();b[1]?ia=b[1]:(ia=O?"":r.v4(),b[1]=ia);z=b[6];a||(b[3]++,z=r.v4(),b[6]=z,b[5]=b[4]);"none"!=t&&(v(),b[4]=Math.round((new Date).getTime()/1E3),b.shift(),Ta.apply(null,b))}}function L(){if("none"==t)return[];var a=Math.round((new Date).getTime()/1E3),b=m("id");b?(a=b.split("."),a.unshift("0")):a=["1",ia,a,0,a,""];a[6]||(a[6]=r.v4());return a}function mb(a){return 0===a.indexOf("http")?a:("https:"===document.location.protocol?
"https":"http")+"://"+a}function Q(){tb&&null!=e.pageViewId||(e.pageViewId=r.v4())}function K(){null==e.pageViewId&&(e.pageViewId=r.v4());return e.pageViewId}function ca(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:K()}}]}}}function da(a){var b=a.title,c=a.context,d=a.timestamp;a=a.contextCallback;h();ub&&Q();ub=!0;la=document.title;va=b;b=ob(va||la);C.track(Ib({pageUrl:l(ma||N),pageTitle:b,referrer:l(Sa||ta)}),(c||[]).concat(a?
a():[]),d);d=new Date;b=!1;if(H.enabled&&!H.installed){b=H.installed=!0;var e={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}}),c=function(){};window.addEventListener("testPassiveEventSupport",c,b);window.removeEventListener("testPassiveEventSupport",c,b);e.hasSupport=a}}};e.update();var f="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":
"DOMMouseScroll";Object.prototype.hasOwnProperty.call(e,"hasSupport")?B(document,f,J,{passive:!0}):B(document,f,J);v();f=function(a,b){void 0===b&&(b=J);return function(a){return B(document,a,b)}};"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(f(document));["resize","focus","blur"].forEach(f(window));f(window,n)("scroll")}if(H.enabled&&(Ia||b))for(d in Ma=d.getTime(),d=void 0,H.configurations)if(b=H.configurations[d])window.clearInterval(b.activityInterval),fa(b,c,a)}
function fa(a,b,c){var d=function(a,b){h();a({context:b,pageViewId:K(),minXOffset:Na,minYOffset:Pa,maxXOffset:Oa,maxYOffset:Qa});v()},e=function(){Ma+a.configHeartBeatTimer>(new Date).getTime()&&d(a.callback,(b||[]).concat(c?c():[]))};a.activityInterval=0!=a.configMinimumVisitLength?window.setTimeout(function(){Ma+a.configMinimumVisitLength>(new Date).getTime()&&d(a.callback,(b||[]).concat(c?c():[]));a.activityInterval=window.setInterval(e,a.configHeartBeatTimer)},a.configMinimumVisitLength):window.setInterval(e,
a.configHeartBeatTimer)}function S(a){var b=a.minimumVisitLength,c=a.heartbeatDelay;a=a.callback;if(nb(b)&&nb(c))return{configMinimumVisitLength:1E3*b,configHeartBeatTimer:1E3*c,callback:a};I.warn("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function oa(a){var b=a.context,c=a.minXOffset,d=a.minYOffset,e=a.maxXOffset;a=a.maxYOffset;var f=document.title;f!==ma&&(ma=f,wa=void 0);C.track(Kb({pageUrl:l(na||N),pageTitle:ob(wa||ma),referrer:l(Ta||
ua),minXOffset:Math.round(c),maxXOffset:Math.round(e),minYOffset:Math.round(d),maxYOffset:Math.round(a)}),b)}var Q,R,Ka,Y,Z,aa,ba,ca,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb;f.eventMethod=null!==(Q=f.eventMethod)&&void 0!==Q?Q:"post";var pa=function(a){var b;return null!==(b=a.stateStorageStrategy)&&void 0!==b?b:"cookieAndLocalStorage"},qa=function(a){var b,c;return"boolean"===typeof a.anonymousTracking?!1:null!==(c=!0===(null===(b=a.anonymousTracking)||void 0===b?void 0:b.withSessionTracking))&&void 0!==
c?c:!1},ra=function(a){var b,c;return"boolean"===typeof a.anonymousTracking?!1:null!==(c=!0===(null===(b=a.anonymousTracking)||void 0===b?void 0:b.withServerAnonymisation))&&void 0!==c?c:!1};f.plugins=null!==(R=f.plugins)&&void 0!==R?R:[];(null!==(Y=null===(Ka=null===f||void 0===f?void 0:f.contexts)||void 0===Ka?void 0:Ka.webPage)&&void 0!==Y?Y:1)&&f.plugins.push(da());var C=Hb({base64:f.encodeBase64,corePlugins:f.plugins,callback:function(a){var b=Math.round((new Date).getTime()/1E3),c=m("ses"),
d=M(),e=d[0],f=d[1],k=d[2],V=d[3],g=d[4],y=d[5];d=d[6];var n=xa?!!x(xa):!1;Ba||n?E():("0"===e?(z=d,c||"none"==r||(V++,y=g,z=q.v4()),G=V):(new Date).getTime()-kb>1E3*tb&&(z=q.v4(),G++),a.add("vp",Nb()),a.add("ds",Ob()),a.add("vid",la?G:O?null:G),a.add("sid",la?z:O?null:z),a.add("duid",O?null:f),a.add("uid",O?null:X),h(),a.add("refr",l(Ta||ua)),a.add("url",l(na||N)),"none"!=r&&(Ua(f,k,G,b,y,z),w()),kb=(new Date).getTime());b=xa?!!x(xa):!1;Ba||b||P.enqueueRequest(a.build(),lb)}}),Da=navigator.userLanguage||
navigator.language,Ea=document.characterSet||document.charset,U=sb(window.location.hostname,window.location.href,Xa()),sa=pb(U[0]),N=U[1],ua=U[2],Ta,Fa=null!==(Z=f.platform)&&void 0!==Z?Z:"web",lb=ia(d),Ga=null!==(aa=f.postPath)&&void 0!==aa?aa:"/com.snowplowanalytics.snowplow/tp2",Ha=null!==(ba=f.appId)&&void 0!==ba?ba:"",na,ma=document.title,wa,Ia=null!==(ca=f.resetActivityTrackingOnPageView)&&void 0!==ca?ca:!0,ya,za,ka=null!==($a=f.cookieName)&&void 0!==$a?$a:"_sp_",va=null!==(ab=f.cookieDomain)&&
void 0!==ab?ab:void 0,Ya="/",Ra=null!==(bb=f.cookieSameSite)&&void 0!==bb?bb:"None",Sa=null!==(cb=f.cookieSecure)&&void 0!==cb?cb:!0,Aa=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,Ba="undefined"!==typeof f.respectDoNotTrack?f.respectDoNotTrack&&("yes"===Aa||"1"===Aa):!1,xa,Ca=null!==(db=f.cookieLifetime)&&void 0!==db?db:63072E3,tb=null!==(eb=f.sessionCookieTimeout)&&void 0!==eb?eb:1800,la=qa(f),Za=ra(f),O=!!f.anonymousTracking,r=pa(f),Ma,kb=(new Date).getTime(),Na,Oa,Pa,Qa,W,ja,
z,G=1,X,P=Qb(a,e,"localStorage"==r||"cookieAndLocalStorage"==r,f.eventMethod,Ga,null!==(fb=f.bufferSize)&&void 0!==fb?fb:1,null!==(gb=f.maxPostBytes)&&void 0!==gb?gb:4E4,null!==(hb=f.useStm)&&void 0!==hb?hb:!0,null!==(ib=f.maxLocalStorageQueueSize)&&void 0!==ib?ib:1E3,null!==(jb=f.connectionTimeout)&&void 0!==jb?jb:5E3,Za),ub=!1,vb=!1,H={enabled:!1,installed:!1,configurations:{}};f.hasOwnProperty("discoverRootDomain")&&f.discoverRootDomain&&(va=Pb(Ra,Sa));C.setTrackerVersion(c);C.setTrackerNamespace(b);
C.setAppId(Ha);C.setPlatform(Fa);C.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0");C.addPayloadPair("cs",Ea);C.addPayloadPair("lang",Da);C.addPayloadPair("res",screen.width+"x"+screen.height);C.addPayloadPair("cd",screen.colorDepth);ha();T();f.crossDomainLinker&&g(f.crossDomainLinker);return A(A({},{getDomainSessionIndex:function(){return G},getPageViewId:function(){return K()},newSession:function(){var a=Math.round((new Date).getTime()/1E3),b=M(),c=b[1],d=b[2],e=b[3],f=b[4],h=b[5],k=b[6];
"0"===b[0]?(z=k,"none"!=r&&(e++,h=f,z=q.v4()),G=e,w()):(z=q.v4(),G++);"none"!=r&&(Ua(c,d,G,a,h,z),w());kb=(new Date).getTime()},getCookieName:function(a){return ka+a+"."+W},getUserId:function(){return X},getDomainUserId:function(){return M()[1]},getDomainUserInfo:function(){return M()},setReferrerUrl:function(a){Ta=a},setCustomUrl:function(a){h();var b=N,c;y(a)?na=a:"/"===a.slice(0,1)?na=y(b)+"://"+Wa(b)+a:(b=l(b),0<=(c=b.indexOf("?"))&&(b=b.slice(0,c)),(c=b.lastIndexOf("/"))!==b.length-1&&(b=b.slice(0,
c+1)),na=b+a)},setDocumentTitle:function(a){ma=document.title;wa=a},discardHashTag:function(a){ya=a},discardBrace:function(a){za=a},setCookiePath:function(a){Ya=a;ha()},setVisitorCookieTimeout:function(a){Ca=a},crossDomainLinker:function(a){g(a)},enableActivityTracking:function(a){H.enabled=!0;H.configurations.pagePing=S(A(A({},a),{callback:oa}))},enableActivityTrackingCallback:function(a){H.enabled=!0;H.configurations.callback=S(a)},updatePageActivity:function(){J()},setOptOutCookie:function(a){xa=
a},setUserId:function(a){X=a},setUserIdFromLocation:function(a){h();X=ta(a,N)},setUserIdFromReferrer:function(a){h();X=ta(a,ua)},setUserIdFromCookie:function(a){X=x(a)},setCollectorUrl:function(a){lb=ia(a);P.setCollectorUrl(lb)},setBufferSize:function(a){P.setBufferSize(a)},flushBuffer:function(a){void 0===a&&(a={});P.executeQueue();a.newBufferSize&&P.setBufferSize(a.newBufferSize)},trackPageView:function(a){void 0===a&&(a={});ea(a)},preservePageViewId:function(){ub=!0},disableAnonymousTracking:function(a){f.anonymousTracking=
!1;D(a);T();P.executeQueue()},enableAnonymousTracking:function(a){f.anonymousTracking=a&&(null===a||void 0===a?void 0:a.options)||!0;D(a);la||mb()},clearUserData:E}),{id:a,namespace:b,core:C,sharedState:e})}(a,b,c,d,e,f);var k=A(A({},a),{addPlugin:function(a){var b,c;k.core.addPlugin(a);null===(c=(b=a.plugin).activateBrowserPlugin)||void 0===c?void 0:c.call(b,k)}});null===(h=f.plugins)||void 0===h?void 0:h.forEach(function(a){var b;null===(b=a.activateBrowserPlugin)||void 0===b?void 0:b.call(a,k)});
return k}function l(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(K);a=K;for(var d=[],e=0;e<c.length;e++){var f=c[e];a.hasOwnProperty(f)?d.push(a[f]):I.warn(f+" not configured")}d.forEach(b)}catch(h){I.error("Function failed",h)}}function Tb(){function a(){"hidden"==e.visibilityState&&d.bufferFlushers.forEach(function(a){a(!1)})}function b(){var a;if(!d.hasLoaded)for(d.hasLoaded=!0,a=0;a<d.registeredOnLoadHandlers.length;a++)d.registeredOnLoadHandlers[a]();return!0}function c(){e.addEventListener?
e.addEventListener("DOMContentLoaded",function k(){e.removeEventListener("DOMContentLoaded",k,!1);b()}):e.attachEvent&&e.attachEvent("onreadystatechange",function ha(){"complete"===e.readyState&&(e.detachEvent("onreadystatechange",ha),b())});B(f,"load",b,!1)}var d=new Ub,e=document,f=window;e.visibilityState&&B(e,"visibilitychange",a,!1);B(f,"beforeunload",function(){d.bufferFlushers.forEach(function(a){a(!1)})},!1);"loading"===document.readyState?c():b();return d}for(var A=function(){A=Object.assign||
function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var e in b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e])}return a};return A.apply(this,arguments)},ya=oa(function(a){var b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(b){var c=new Uint8Array(16);a.exports=function(){b(c);return c}}else{var d=Array(16);
a.exports=function(){for(var a=0,b;16>a;a++)0===(a&3)&&(b=4294967296*Math.random()),d[a]=b>>>((a&3)<<3)&255;return d}}}),m=[],t=0;256>t;++t)m[t]=(t+256).toString(16).substr(1);var za=function(a,b){b=b||0;return[m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]]].join("")},Aa,Y,Z=0,aa=0;t=function(a,b,c){c=b&&c||0;"string"==typeof a&&(b="binary"===a?Array(16):null,a=null);a=
a||{};a=a.random||(a.rng||ya)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(b)for(var d=0;16>d;++d)b[c+d]=a[d];return b||za(a)};t.v1=function(a,b,c){c=b&&c||0;var d=b||[];a=a||{};var e=a.node||Aa,f=void 0!==a.clockseq?a.clockseq:Y;if(null==e||null==f){var h=ya();null==e&&(e=Aa=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]);null==f&&(f=Y=(h[6]<<8|h[7])&16383)}h=void 0!==a.msecs?a.msecs:(new Date).getTime();var k=void 0!==a.nsecs?a.nsecs:aa+1,g=h-Z+(k-aa)/1E4;0>g&&void 0===a.clockseq&&(f=f+1&16383);(0>g||h>Z)&&void 0===
a.nsecs&&(k=0);if(1E4<=k)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Z=h;aa=k;Y=f;h+=122192928E5;a=(1E4*(h&268435455)+k)%4294967296;d[c++]=a>>>24&255;d[c++]=a>>>16&255;d[c++]=a>>>8&255;d[c++]=a&255;a=h/4294967296*1E4&268435455;d[c++]=a>>>8&255;d[c++]=a&255;d[c++]=a>>>24&15|16;d[c++]=a>>>16&255;d[c++]=f>>>8|128;d[c++]=f&255;for(f=0;6>f;++f)d[c+f]=e[f];return b?b:za(d)};var q=t.v4=t,da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u;(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"})(u||(u={}));var I=function(a){void 0===a&&(a=u.warn);return{setLogLevel:function(b){a=u[b]?b:u.warn},warn:function(b,c){for(var d=[],e=2;e<arguments.length;e++)d[e-2]=arguments[e];a>=u.warn&&"undefined"!==typeof console&&(e="Snowplow: "+b,c?console.warn.apply(console,v([e+"\n",c],d)):console.warn.apply(console,v([e],d)))},error:function(b,c){for(var d=[],e=2;e<arguments.length;e++)d[e-2]=arguments[e];a>=u.error&&
"undefined"!==typeof console&&(e="Snowplow: "+b+"\n",c?console.error.apply(console,v([e+"\n",c],d)):console.error.apply(console,v([e],d)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=u.debug&&"undefined"!==typeof console&&console.debug.apply(console,v(["Snowplow: "+b],c))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=u.info&&"undefined"!==typeof console&&console.info.apply(console,v(["Snowplow: "+b],c))}}}(),ba=oa(function(a){(function(){var b=
"DOMMouseScroll";Object.prototype.hasOwnProperty.call(e,"hasSupport")?B(document,f,J,{passive:!0}):B(document,f,J);w();f=function(a,b){void 0===b&&(b=J);return function(a){return B(document,a,b)}};"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(f(document));["resize","focus","blur"].forEach(f(window));f(window,n)("scroll")}if(H.enabled&&(Ha||b))for(d in La=d.getTime(),d=void 0,H.configurations)if(b=H.configurations[d])window.clearInterval(b.activityInterval),ea(b,c,a)}
function ea(a,b,c){var d=function(a,b){h();a({context:b,pageViewId:K(),minXOffset:Ma,minYOffset:Oa,maxXOffset:Na,maxYOffset:Pa});w()},e=function(){La+a.configHeartBeatTimer>(new Date).getTime()&&d(a.callback,(b||[]).concat(c?c():[]))};a.activityInterval=0!=a.configMinimumVisitLength?window.setTimeout(function(){La+a.configMinimumVisitLength>(new Date).getTime()&&d(a.callback,(b||[]).concat(c?c():[]));a.activityInterval=window.setInterval(e,a.configHeartBeatTimer)},a.configMinimumVisitLength):window.setInterval(e,
a.configHeartBeatTimer)}function ba(a){var b=a.minimumVisitLength,c=a.heartbeatDelay;a=a.callback;if(nb(b)&&nb(c))return{configMinimumVisitLength:1E3*b,configHeartBeatTimer:1E3*c,callback:a};I.warn("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function qa(a){var b=a.context,c=a.minXOffset,d=a.minYOffset,e=a.maxXOffset;a=a.maxYOffset;var f=document.title;f!==la&&(la=f,va=void 0);C.track(Jb({pageUrl:l(ma||N),pageTitle:ob(va||la),referrer:l(Sa||
ta),minXOffset:Math.round(c),maxXOffset:Math.round(e),minYOffset:Math.round(d),maxYOffset:Math.round(a)}),b)}var Ja,R,W,X,Y,Z,aa,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb;f.eventMethod=null!==(Ja=f.eventMethod)&&void 0!==Ja?Ja:"post";var na=function(a){var b;return null!==(b=a.stateStorageStrategy)&&void 0!==b?b:"cookieAndLocalStorage"},oa=function(a){var b,c;return"boolean"===typeof a.anonymousTracking?!1:null!==(c=!0===(null===(b=a.anonymousTracking)||void 0===b?void 0:b.withSessionTracking))&&void 0!==
c?c:!1},pa=function(a){var b,c;return"boolean"===typeof a.anonymousTracking?!1:null!==(c=!0===(null===(b=a.anonymousTracking)||void 0===b?void 0:b.withServerAnonymisation))&&void 0!==c?c:!1};f.plugins=null!==(R=f.plugins)&&void 0!==R?R:[];(null!==(X=null===(W=null===f||void 0===f?void 0:f.contexts)||void 0===W?void 0:W.webPage)&&void 0!==X?X:1)&&f.plugins.push(ca());var C=Gb({base64:f.encodeBase64,corePlugins:f.plugins,callback:function(a){var b=Math.round((new Date).getTime()/1E3),c=m("ses"),d=L(),
e=d[0],f=d[1],k=d[2],T=d[3],g=d[4],y=d[5];d=d[6];var n=wa?!!x(wa):!1;Aa||n?E():("0"===e?(z=d,c||"none"==t||(T++,y=g,z=r.v4()),G=T):(new Date).getTime()-kb>1E3*sb&&(z=r.v4(),G++),a.add("vp",Mb()),a.add("ds",Nb()),a.add("vid",ka?G:O?null:G),a.add("sid",ka?z:O?null:z),a.add("duid",O?null:f),a.add("uid",O?null:V),h(),a.add("refr",l(Sa||ta)),a.add("url",l(ma||N)),"none"!=t&&(Ta(f,k,G,b,y,z),v()),kb=(new Date).getTime());b=wa?!!x(wa):!1;Aa||b||P.enqueueRequest(a.build(),lb)}}),Ca=navigator.userLanguage||
navigator.language,Da=document.characterSet||document.charset,S=rb(window.location.hostname,window.location.href,Wa()),ra=pb(S[0]),N=S[1],ta=S[2],Sa,Ea=null!==(Y=f.platform)&&void 0!==Y?Y:"web",lb=mb(d),Fa=null!==(Z=f.postPath)&&void 0!==Z?Z:"/com.snowplowanalytics.snowplow/tp2",Ga=null!==(aa=f.appId)&&void 0!==aa?aa:"",ma,la=document.title,va,Ha=null!==(Za=f.resetActivityTrackingOnPageView)&&void 0!==Za?Za:!0,xa,ya,ja=null!==($a=f.cookieName)&&void 0!==$a?$a:"_sp_",ua=null!==(ab=f.cookieDomain)&&
void 0!==ab?ab:void 0,Xa="/",Qa=null!==(bb=f.cookieSameSite)&&void 0!==bb?bb:"None",Ra=null!==(cb=f.cookieSecure)&&void 0!==cb?cb:!0,za=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,Aa="undefined"!==typeof f.respectDoNotTrack?f.respectDoNotTrack&&("yes"===za||"1"===za):!1,wa,Ba=null!==(db=f.cookieLifetime)&&void 0!==db?db:63072E3,sb=null!==(eb=f.sessionCookieTimeout)&&void 0!==eb?eb:1800,ka=oa(f),Ya=pa(f),O=!!f.anonymousTracking,t=na(f),La,kb=(new Date).getTime(),Ma,Na,Oa,Pa,U,ia,
z,G=1,V,P=Pb(a,e,"localStorage"==t||"cookieAndLocalStorage"==t,f.eventMethod,Fa,null!==(fb=f.bufferSize)&&void 0!==fb?fb:1,null!==(gb=f.maxPostBytes)&&void 0!==gb?gb:4E4,null!==(hb=f.useStm)&&void 0!==hb?hb:!0,null!==(ib=f.maxLocalStorageQueueSize)&&void 0!==ib?ib:1E3,null!==(jb=f.connectionTimeout)&&void 0!==jb?jb:5E3,Ya),tb=!1,ub=!1,H={enabled:!1,installed:!1,configurations:{}};f.hasOwnProperty("discoverRootDomain")&&f.discoverRootDomain&&(ua=Ob(Qa,Ra));C.setTrackerVersion(c);C.setTrackerNamespace(b);
C.setAppId(Ga);C.setPlatform(Ea);C.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0");C.addPayloadPair("cs",Da);C.addPayloadPair("lang",Ca);C.addPayloadPair("res",screen.width+"x"+screen.height);C.addPayloadPair("cd",screen.colorDepth);fa();ha();f.crossDomainLinker&&g(f.crossDomainLinker);return q(q({},{getDomainSessionIndex:function(){return G},getPageViewId:function(){return K()},newSession:function(){var a=Math.round((new Date).getTime()/1E3),b=L(),c=b[1],d=b[2],e=b[3],f=b[4],h=b[5],k=b[6];
"0"===b[0]?(z=k,"none"!=t&&(e++,h=f,z=r.v4()),G=e,v()):(z=r.v4(),G++);"none"!=t&&(Ta(c,d,G,a,h,z),v());kb=(new Date).getTime()},getCookieName:function(a){return ja+a+"."+U},getUserId:function(){return V},getDomainUserId:function(){return L()[1]},getDomainUserInfo:function(){return L()},setReferrerUrl:function(a){Sa=a},setCustomUrl:function(a){h();var b=N,c;y(a)?ma=a:"/"===a.slice(0,1)?ma=y(b)+"://"+Va(b)+a:(b=l(b),0<=(c=b.indexOf("?"))&&(b=b.slice(0,c)),(c=b.lastIndexOf("/"))!==b.length-1&&(b=b.slice(0,
c+1)),ma=b+a)},setDocumentTitle:function(a){la=document.title;va=a},discardHashTag:function(a){xa=a},discardBrace:function(a){ya=a},setCookiePath:function(a){Xa=a;fa()},setVisitorCookieTimeout:function(a){Ba=a},crossDomainLinker:function(a){g(a)},enableActivityTracking:function(a){H.enabled=!0;H.configurations.pagePing=ba(q(q({},a),{callback:qa}))},enableActivityTrackingCallback:function(a){H.enabled=!0;H.configurations.callback=ba(a)},updatePageActivity:function(){J()},setOptOutCookie:function(a){wa=
a},setUserId:function(a){V=a},setUserIdFromLocation:function(a){h();V=sa(a,N)},setUserIdFromReferrer:function(a){h();V=sa(a,ta)},setUserIdFromCookie:function(a){V=x(a)},setCollectorUrl:function(a){lb=mb(a);P.setCollectorUrl(lb)},setBufferSize:function(a){P.setBufferSize(a)},flushBuffer:function(a){void 0===a&&(a={});P.executeQueue();a.newBufferSize&&P.setBufferSize(a.newBufferSize)},trackPageView:function(a){void 0===a&&(a={});da(a)},preservePageViewId:function(){tb=!0},disableAnonymousTracking:function(a){f.anonymousTracking=
!1;D(a);ha();P.executeQueue()},enableAnonymousTracking:function(a){f.anonymousTracking=a&&(null===a||void 0===a?void 0:a.options)||!0;D(a);ka||Q()},clearUserData:E}),{id:a,namespace:b,core:C,sharedState:e})}(a,b,c,d,e,f);var k=q(q({},a),{addPlugin:function(a){var b,c;k.core.addPlugin(a);null===(c=(b=a.plugin).activateBrowserPlugin)||void 0===c?void 0:c.call(b,k)}});null===(h=f.plugins)||void 0===h?void 0:h.forEach(function(a){var b;null===(b=a.activateBrowserPlugin)||void 0===b?void 0:b.call(a,k)});
return k}function l(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(Q);a=Q;for(var d=[],e=0;e<c.length;e++){var f=c[e];a.hasOwnProperty(f)?d.push(a[f]):I.warn(f+" not configured")}d.forEach(b)}catch(h){I.error("Function failed",h)}}function Sb(){function a(){"hidden"==e.visibilityState&&d.bufferFlushers.forEach(function(a){a(!1)})}function b(){var a;if(!d.hasLoaded)for(d.hasLoaded=!0,a=0;a<d.registeredOnLoadHandlers.length;a++)d.registeredOnLoadHandlers[a]();return!0}function c(){e.addEventListener?
e.addEventListener("DOMContentLoaded",function k(){e.removeEventListener("DOMContentLoaded",k,!1);b()}):e.attachEvent&&e.attachEvent("onreadystatechange",function fa(){"complete"===e.readyState&&(e.detachEvent("onreadystatechange",fa),b())});B(f,"load",b,!1)}var d=new Tb,e=document,f=window;e.visibilityState&&B(e,"visibilitychange",a,!1);B(f,"beforeunload",function(){d.bufferFlushers.forEach(function(a){a(!1)})},!1);"loading"===document.readyState?c():b();return d}for(var q=function(){q=Object.assign||
function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var e in b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e])}return a};return q.apply(this,arguments)},xa=ba(function(a){var b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(b){var c=new Uint8Array(16);a.exports=function(){b(c);return c}}else{var d=Array(16);
a.exports=function(){for(var a=0,b;16>a;a++)0===(a&3)&&(b=4294967296*Math.random()),d[a]=b>>>((a&3)<<3)&255;return d}}}),m=[],u=0;256>u;++u)m[u]=(u+256).toString(16).substr(1);var ya=function(a,b){b=b||0;return[m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],"-",m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]],m[a[b++]]].join("")},za,W,X=0,Y=0;u=function(a,b,c){c=b&&c||0;"string"==typeof a&&(b="binary"===a?Array(16):null,a=null);a=a||
{};a=a.random||(a.rng||xa)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(b)for(var d=0;16>d;++d)b[c+d]=a[d];return b||ya(a)};u.v1=function(a,b,c){c=b&&c||0;var d=b||[];a=a||{};var e=a.node||za,f=void 0!==a.clockseq?a.clockseq:W;if(null==e||null==f){var h=xa();null==e&&(e=za=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]);null==f&&(f=W=(h[6]<<8|h[7])&16383)}h=void 0!==a.msecs?a.msecs:(new Date).getTime();var k=void 0!==a.nsecs?a.nsecs:Y+1,g=h-X+(k-Y)/1E4;0>g&&void 0===a.clockseq&&(f=f+1&16383);(0>g||h>X)&&void 0===a.nsecs&&
(k=0);if(1E4<=k)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");X=h;Y=k;W=f;h+=122192928E5;a=(1E4*(h&268435455)+k)%4294967296;d[c++]=a>>>24&255;d[c++]=a>>>16&255;d[c++]=a>>>8&255;d[c++]=a&255;a=h/4294967296*1E4&268435455;d[c++]=a>>>8&255;d[c++]=a&255;d[c++]=a>>>24&15|16;d[c++]=a>>>16&255;d[c++]=f>>>8|128;d[c++]=f&255;for(f=0;6>f;++f)d[c+f]=e[f];return b?b:ya(d)};var r=u.v4=u,K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",v;(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"})(v||(v={}));var I=function(a){void 0===a&&(a=v.warn);return{setLogLevel:function(b){a=v[b]?b:v.warn},warn:function(b,c){for(var d=[],e=2;e<arguments.length;e++)d[e-2]=arguments[e];a>=v.warn&&"undefined"!==typeof console&&(e="Snowplow: "+b,c?console.warn.apply(console,w([e+"\n",c],d)):console.warn.apply(console,w([e],d)))},error:function(b,c){for(var d=[],e=2;e<arguments.length;e++)d[e-2]=arguments[e];a>=v.error&&"undefined"!==
typeof console&&(e="Snowplow: "+b+"\n",c?console.error.apply(console,w([e+"\n",c],d)):console.error.apply(console,w([e],d)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=v.debug&&"undefined"!==typeof console&&console.debug.apply(console,w(["Snowplow: "+b],c))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=v.info&&"undefined"!==typeof console&&console.info.apply(console,w(["Snowplow: "+b],c))}}}(),Z=ba(function(a){(function(){var b=
{rotl:function(a,b){return a<<b|a>>>32-b},rotr:function(a,b){return a<<32-b|a>>>b},endian:function(a){if(a.constructor==Number)return b.rotl(a,8)&16711935|b.rotl(a,24)&4278255360;for(var c=0;c<a.length;c++)a[c]=b.endian(a[c]);return a},randomBytes:function(a){for(var b=[];0<a;a--)b.push(Math.floor(256*Math.random()));return b},bytesToWords:function(a){for(var b=[],c=0,f=0;c<a.length;c++,f+=8)b[f>>>5]|=a[c]<<24-f%32;return b},wordsToBytes:function(a){for(var b=[],c=0;c<32*a.length;c+=8)b.push(a[c>>>
5]>>>24-c%32&255);return b},bytesToHex:function(a){for(var b=[],c=0;c<a.length;c++)b.push((a[c]>>>4).toString(16)),b.push((a[c]&15).toString(16));return b.join("")},hexToBytes:function(a){for(var b=[],c=0;c<a.length;c+=2)b.push(parseInt(a.substr(c,2),16));return b},bytesToBase64:function(a){for(var b=[],c=0;c<a.length;c+=3)for(var f=a[c]<<16|a[c+1]<<8|a[c+2],h=0;4>h;h++)8*c+6*h<=8*a.length?b.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-h)&63)):b.push("=");
return b.join("")},base64ToBytes:function(a){a=a.replace(/[^A-Z0-9+\/]/ig,"");for(var b=[],c=0,f=0;c<a.length;f=++c%4)0!=f&&b.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(c-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(c))>>>6-2*f);return b}};a.exports=b})()}),ca={utf8:{stringToBytes:function(a){return ca.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(ca.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("")}}},Ba=ca,Sb=oa(function(a){(function(){var b=Ba.utf8,c=Ba.bin,d=function(a){a.constructor==String?a=b.stringToBytes(a):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString());var c=ba.bytesToWords(a),
d=8*a.length;a=[];var f=1732584193,e=-271733879,g=-1732584194,l=271733878,m=-1009589776;c[d>>5]|=128<<24-d%32;c[(d+64>>>9<<4)+15]=d;for(d=0;d<c.length;d+=16){for(var q=f,u=e,v=g,w=l,x=m,p=0;80>p;p++){if(16>p)a[p]=c[d+p];else{var t=a[p-3]^a[p-8]^a[p-14]^a[p-16];a[p]=t<<1|t>>>31}t=(f<<5|f>>>27)+m+(a[p]>>>0)+(20>p?(e&g|~e&l)+1518500249:40>p?(e^g^l)+1859775393:60>p?(e&g|e&l|g&l)-1894007588:(e^g^l)-899497514);m=l;l=g;g=e<<30|e>>>2;e=f;f=t}f+=q;e+=u;g+=v;l+=w;m+=x}return[f,e,g,l,m]},e=function(a,b){a=ba.wordsToBytes(d(a));
return b&&b.asBytes?a:b&&b.asString?c.bytesToString(a):ba.bytesToHex(a)};e._blocksize=16;e._digestsize=20;a.exports=e})()}),K={},Ub=function(){return function(){this.outQueues=[];this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Ca="undefined"!==typeof window?Tb():void 0;g.addGlobalContexts=function(a,b){l(b,function(b){b.core.addGlobalContexts(a)})};g.addPlugin=function(a,b){l(b,function(b){b.addPlugin(a)})};g.clearGlobalContexts=function(a){l(a,function(a){a.core.clearGlobalContexts()})};
return b.join("")},base64ToBytes:function(a){a=a.replace(/[^A-Z0-9+\/]/ig,"");for(var b=[],c=0,f=0;c<a.length;f=++c%4)0!=f&&b.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(c-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(c))>>>6-2*f);return b}};a.exports=b})()}),aa={utf8:{stringToBytes:function(a){return aa.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(aa.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("")}}},Aa=aa,Rb=ba(function(a){(function(){var b=Aa.utf8,c=Aa.bin,d=function(a){a.constructor==String?a=b.stringToBytes(a):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString());var c=Z.bytesToWords(a),
d=8*a.length;a=[];var f=1732584193,e=-271733879,g=-1732584194,l=271733878,m=-1009589776;c[d>>5]|=128<<24-d%32;c[(d+64>>>9<<4)+15]=d;for(d=0;d<c.length;d+=16){for(var r=f,u=e,v=g,w=l,x=m,p=0;80>p;p++){if(16>p)a[p]=c[d+p];else{var q=a[p-3]^a[p-8]^a[p-14]^a[p-16];a[p]=q<<1|q>>>31}q=(f<<5|f>>>27)+m+(a[p]>>>0)+(20>p?(e&g|~e&l)+1518500249:40>p?(e^g^l)+1859775393:60>p?(e&g|e&l|g&l)-1894007588:(e^g^l)-899497514);m=l;l=g;g=e<<30|e>>>2;e=f;f=q}f+=r;e+=u;g+=v;l+=w;m+=x}return[f,e,g,l,m]},e=function(a,b){a=Z.wordsToBytes(d(a));
return b&&b.asBytes?a:b&&b.asString?c.bytesToString(a):Z.bytesToHex(a)};e._blocksize=16;e._digestsize=20;a.exports=e})()}),Q={},Tb=function(){return function(){this.outQueues=[];this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Ba="undefined"!==typeof window?Sb():void 0;g.addGlobalContexts=function(a,b){l(b,function(b){b.core.addGlobalContexts(a)})};g.addPlugin=function(a,b){l(b,function(b){b.addPlugin(a)})};g.clearGlobalContexts=function(a){l(a,function(a){a.core.clearGlobalContexts()})};
g.clearUserData=function(a,b){l(b,function(b){b.clearUserData(a)})};g.crossDomainLinker=function(a,b){l(b,function(b){b.crossDomainLinker(a)})};g.disableAnonymousTracking=function(a,b){l(b,function(b){b.disableAnonymousTracking(a)})};g.discardBrace=function(a,b){l(b,function(b){b.discardBrace(a)})};g.discardHashTag=function(a,b){l(b,function(b){b.discardHashTag(a)})};g.enableActivityTracking=function(a,b){l(b,function(b){b.enableActivityTracking(a)})};g.enableActivityTrackingCallback=function(a,b){l(b,
function(b){b.enableActivityTrackingCallback(a)})};g.enableAnonymousTracking=function(a,b){l(b,function(b){b.enableAnonymousTracking(a)})};g.flushBuffer=function(a,b){l(b,function(b){b.flushBuffer(a)})};g.newSession=function(a){l(a,function(a){a.newSession()})};g.newTracker=function(a,b,c){void 0===c&&(c={});if(Ca)return K.hasOwnProperty(a)?a=null:(K[a]=Rb(a,a,"js-3.1.0",b,Ca,c),a=K[a]),a};g.preservePageViewId=function(a){l(a,function(a){a.preservePageViewId()})};g.removeGlobalContexts=function(a,
function(b){b.enableActivityTrackingCallback(a)})};g.enableAnonymousTracking=function(a,b){l(b,function(b){b.enableAnonymousTracking(a)})};g.flushBuffer=function(a,b){l(b,function(b){b.flushBuffer(a)})};g.newSession=function(a){l(a,function(a){a.newSession()})};g.newTracker=function(a,b,c){void 0===c&&(c={});if(Ba)return Q.hasOwnProperty(a)?a=null:(Q[a]=Qb(a,a,"js-3.1.1-beta.1",b,Ba,c),a=Q[a]),a};g.preservePageViewId=function(a){l(a,function(a){a.preservePageViewId()})};g.removeGlobalContexts=function(a,
b){l(b,function(b){b.core.removeGlobalContexts(a)})};g.setBufferSize=function(a,b){l(b,function(b){b.setBufferSize(a)})};g.setCollectorUrl=function(a,b){l(b,function(b){b.setCollectorUrl(a)})};g.setCookiePath=function(a,b){l(b,function(b){b.setCookiePath(a)})};g.setCustomUrl=function(a,b){l(b,function(b){b.setCustomUrl(a)})};g.setDocumentTitle=function(a,b){l(b,function(b){b.setDocumentTitle(a)})};g.setOptOutCookie=function(a,b){l(b,function(b){b.setOptOutCookie(a)})};g.setReferrerUrl=function(a,
b){l(b,function(b){b.setReferrerUrl(a)})};g.setUserId=function(a,b){l(b,function(b){b.setUserId(a)})};g.setUserIdFromCookie=function(a,b){l(b,function(b){b.setUserIdFromCookie(a)})};g.setUserIdFromLocation=function(a,b){l(b,function(b){b.setUserIdFromLocation(a)})};g.setUserIdFromReferrer=function(a,b){l(b,function(b){b.setUserIdFromReferrer(a)})};g.setVisitorCookieTimeout=function(a,b){l(b,function(b){b.setVisitorCookieTimeout(a)})};g.trackPageView=function(a,b){l(b,function(b){b.trackPageView(a)})};
g.trackSelfDescribingEvent=function(a,b){l(b,function(b){b.core.track(Ib({event:a.event}),a.context,a.timestamp)})};g.trackStructEvent=function(a,b){l(b,function(b){b.core.track(Lb(a),a.context,a.timestamp)})};g.updatePageActivity=function(a){l(a,function(a){a.updatePageActivity()})};g.version="3.1.0";Object.defineProperty(g,"__esModule",{value:!0})})
g.trackSelfDescribingEvent=function(a,b){l(b,function(b){b.core.track(Hb({event:a.event}),a.context,a.timestamp)})};g.trackStructEvent=function(a,b){l(b,function(b){b.core.track(Kb(a),a.context,a.timestamp)})};g.updatePageActivity=function(a){l(a,function(a){a.updatePageActivity()})};g.version="3.1.1-beta.1";Object.defineProperty(g,"__esModule",{value:!0})})
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@snowplow/browser-tracker",
"version": "3.1.0",
"version": "3.1.1-beta.1",
"description": "Browser tracker for Snowplow",

@@ -39,4 +39,4 @@ "keywords": [

"dependencies": {
"@snowplow/browser-tracker-core": "3.1.0",
"@snowplow/tracker-core": "3.1.0",
"@snowplow/browser-tracker-core": "3.1.1-beta.1",
"@snowplow/tracker-core": "3.1.1-beta.1",
"tslib": "^2.1.0"

@@ -43,0 +43,0 @@ },

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc