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

@snowplow/browser-tracker-core

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker-core - npm Package Compare versions

Comparing version 3.23.1 to 3.24.0

26

dist/index.module.d.ts

@@ -50,2 +50,4 @@ /*

pageViewId?: string;
/* URL of the page view which the `pageViewId` was generated for */
pageViewUrl?: string;
}

@@ -102,2 +104,4 @@ declare function createSharedState(): SharedState;

type ExtendedCrossDomainLinkerOptions = boolean | ExtendedCrossDomainLinkerAttributes;
/* Setting for the `preservePageViewIdForUrl` configuration that decides how to preserve the pageViewId on URL changes. */
type PreservePageViewIdForUrl = boolean | "full" | "pathname" | "pathnameAndSearch";
/**

@@ -322,2 +326,12 @@ * The configuration object for initialising the tracker

onRequestFailure?: (data: RequestFailure) => void;
/**
* Decide how the `pageViewId` should be preserved based on the URL.
* If set to `false`, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization).
* If set to `true` or `'full'`, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event).
* If set to `'pathname'`, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change).
* If set to `'pathnameAndSearch'`, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change).
* If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored.
* Defaults to `false`.
*/
preservePageViewIdForUrl?: PreservePageViewIdForUrl;
};

@@ -616,2 +630,12 @@ /**

/**
* Decide how the `pageViewId` should be preserved based on the URL.
* If set to `false`, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization).
* If set to `true` or `'full'`, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event).
* If set to `'pathname'`, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change).
* If set to `'pathnameAndSearch'`, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change).
* If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored.
* Defaults to `false`.
*/
preservePageViewIdForUrl: (preserve: PreservePageViewIdForUrl) => void;
/**
* Log visit to this page

@@ -999,2 +1023,2 @@ *

declare function fixupUrl(hostName: string, href: string, referrer: string): string[];
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, BuiltInContexts, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, ExtendedCrossDomainLinkerAttributes, ExtendedCrossDomainLinkerOptions, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, ClearUserDataConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, ParsedIdCookie, BrowserTracker, ClientSession, GetBatch, PostBatch, EventBatch, RequestFailure, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, createCrossDomainParameterValue, urlSafeBase64Encode, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, fixupUrl, BrowserPlugin, SharedState, createSharedState };
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, BuiltInContexts, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, ExtendedCrossDomainLinkerAttributes, ExtendedCrossDomainLinkerOptions, PreservePageViewIdForUrl, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, ClearUserDataConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, ParsedIdCookie, BrowserTracker, ClientSession, GetBatch, PostBatch, EventBatch, RequestFailure, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, createCrossDomainParameterValue, urlSafeBase64Encode, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, fixupUrl, BrowserPlugin, SharedState, createSharedState };

@@ -50,2 +50,4 @@ /*

pageViewId?: string;
/* URL of the page view which the `pageViewId` was generated for */
pageViewUrl?: string;
}

@@ -102,2 +104,4 @@ declare function createSharedState(): SharedState;

type ExtendedCrossDomainLinkerOptions = boolean | ExtendedCrossDomainLinkerAttributes;
/* Setting for the `preservePageViewIdForUrl` configuration that decides how to preserve the pageViewId on URL changes. */
type PreservePageViewIdForUrl = boolean | "full" | "pathname" | "pathnameAndSearch";
/**

@@ -322,2 +326,12 @@ * The configuration object for initialising the tracker

onRequestFailure?: (data: RequestFailure) => void;
/**
* Decide how the `pageViewId` should be preserved based on the URL.
* If set to `false`, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization).
* If set to `true` or `'full'`, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event).
* If set to `'pathname'`, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change).
* If set to `'pathnameAndSearch'`, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change).
* If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored.
* Defaults to `false`.
*/
preservePageViewIdForUrl?: PreservePageViewIdForUrl;
};

@@ -616,2 +630,12 @@ /**

/**
* Decide how the `pageViewId` should be preserved based on the URL.
* If set to `false`, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization).
* If set to `true` or `'full'`, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event).
* If set to `'pathname'`, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change).
* If set to `'pathnameAndSearch'`, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change).
* If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored.
* Defaults to `false`.
*/
preservePageViewIdForUrl: (preserve: PreservePageViewIdForUrl) => void;
/**
* Log visit to this page

@@ -999,2 +1023,2 @@ *

declare function fixupUrl(hostName: string, href: string, referrer: string): string[];
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, BuiltInContexts, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, ExtendedCrossDomainLinkerAttributes, ExtendedCrossDomainLinkerOptions, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, ClearUserDataConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, ParsedIdCookie, BrowserTracker, ClientSession, GetBatch, PostBatch, EventBatch, RequestFailure, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, createCrossDomainParameterValue, urlSafeBase64Encode, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, fixupUrl, BrowserPlugin, SharedState, createSharedState };
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, BuiltInContexts, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, ExtendedCrossDomainLinkerAttributes, ExtendedCrossDomainLinkerOptions, PreservePageViewIdForUrl, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, ClearUserDataConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, ParsedIdCookie, BrowserTracker, ClientSession, GetBatch, PostBatch, EventBatch, RequestFailure, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, createCrossDomainParameterValue, urlSafeBase64Encode, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, fixupUrl, BrowserPlugin, SharedState, createSharedState };

@@ -50,2 +50,4 @@ /*

pageViewId?: string;
/* URL of the page view which the `pageViewId` was generated for */
pageViewUrl?: string;
}

@@ -102,2 +104,4 @@ declare function createSharedState(): SharedState;

type ExtendedCrossDomainLinkerOptions = boolean | ExtendedCrossDomainLinkerAttributes;
/* Setting for the `preservePageViewIdForUrl` configuration that decides how to preserve the pageViewId on URL changes. */
type PreservePageViewIdForUrl = boolean | "full" | "pathname" | "pathnameAndSearch";
/**

@@ -322,2 +326,12 @@ * The configuration object for initialising the tracker

onRequestFailure?: (data: RequestFailure) => void;
/**
* Decide how the `pageViewId` should be preserved based on the URL.
* If set to `false`, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization).
* If set to `true` or `'full'`, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event).
* If set to `'pathname'`, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change).
* If set to `'pathnameAndSearch'`, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change).
* If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored.
* Defaults to `false`.
*/
preservePageViewIdForUrl?: PreservePageViewIdForUrl;
};

@@ -616,2 +630,12 @@ /**

/**
* Decide how the `pageViewId` should be preserved based on the URL.
* If set to `false`, the `pageViewId` will be regenerated on the second and each following page view event (first page view doesn't change the page view ID since tracker initialization).
* If set to `true` or `'full'`, the `pageViewId` will be kept the same for all page views with that exact URL (even for events tracked before the page view event).
* If set to `'pathname'`, the `pageViewId` will be kept the same for all page views with the same pathname (search params or fragment may change).
* If set to `'pathnameAndSearch'`, the `pageViewId` will be kept the same for all page views with the same pathname and search params (fragment may change).
* If `preservePageViewId` is enabled, the `preservePageViewIdForUrl` setting is ignored.
* Defaults to `false`.
*/
preservePageViewIdForUrl: (preserve: PreservePageViewIdForUrl) => void;
/**
* Log visit to this page

@@ -999,2 +1023,2 @@ *

declare function fixupUrl(hostName: string, href: string, referrer: string): string[];
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, BuiltInContexts, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, ExtendedCrossDomainLinkerAttributes, ExtendedCrossDomainLinkerOptions, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, ClearUserDataConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, ParsedIdCookie, BrowserTracker, ClientSession, GetBatch, PostBatch, EventBatch, RequestFailure, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, createCrossDomainParameterValue, urlSafeBase64Encode, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, fixupUrl, BrowserPlugin, SharedState, createSharedState };
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, BuiltInContexts, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, ExtendedCrossDomainLinkerAttributes, ExtendedCrossDomainLinkerOptions, PreservePageViewIdForUrl, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, ClearUserDataConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, ParsedIdCookie, BrowserTracker, ClientSession, GetBatch, PostBatch, EventBatch, RequestFailure, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, createCrossDomainParameterValue, urlSafeBase64Encode, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, fixupUrl, BrowserPlugin, SharedState, createSharedState };

4

dist/index.umd.min.js
/*!
* Core functionality for Snowplow Browser trackers v3.23.1 (http://bit.ly/sp-js)
* Core functionality for Snowplow Browser trackers v3.24.0 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang

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

"use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function n(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],r=[],i=[],a=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:a,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(n,e[n])},addJson:function(e,n,i){i&&o(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},r.push(e),t.push(e))},addContextEntity:function(e){i.push(e)},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r,i),n}}}function r(e){return function(t,r,o){for(var i=function(n,r,o){if(n=JSON.stringify(n),e){if(o=t.add,n){var i=0,a=0,u=[];if(n){n=unescape(encodeURIComponent(n));do{var c=n.charCodeAt(i++),s=n.charCodeAt(i++),l=n.charCodeAt(i++),f=c<<16|s<<8|l;c=f>>18&63,s=f>>12&63,l=f>>6&63,f&=63,u[a++]=ke.charAt(c)+ke.charAt(s)+ke.charAt(l)+ke.charAt(f)}while(i<n.length);i=u.join(""),n=((n=n.length%3)?i.slice(0,n-3):i)+"===".slice(n||3)}n=n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o.call(t,r,n)}else t.add(o,n)},a=function(n,r){if(!n){var o=t.getPayload();if(e?o.cx:o.co){var i=(n=JSON).parse;if(e){if(o=o.cx){switch(4-o.length%4){case 2:o+="==";break;case 3:o+="="}o=function(e){var n,t=0,r=0,o="",i=[];if(!e)return e;e+="";do{var a=ke.indexOf(e.charAt(t++)),u=ke.indexOf(e.charAt(t++));o=ke.indexOf(e.charAt(t++));var c=ke.indexOf(e.charAt(t++)),s=a<<18|u<<12|o<<6|c;a=s>>16&255,u=s>>8&255,s&=255,i[r++]=64===o?String.fromCharCode(a):64===c?String.fromCharCode(a,u):String.fromCharCode(a,u,s)}while(t<e.length);return o=i.join(""),n=o.replace(/\0+$/,""),decodeURIComponent(n.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(o=o.replace(/-/g,"+").replace(/_/g,"/"))}}else o=o.co;n=i.call(n,o)}else n=void 0}return n?n.data=n.data.concat(r.data):n=r,n},u=void 0,c=0;c<r.length;c++){var s=r[c];"cx"===s.keyIfEncoded?u=a(u,s.json):i(s.json,s.keyIfEncoded,s.keyIfNotEncoded)}r.length=0,o.length&&(u=a(u,r={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n([],o,!0)}),o.length=0),u&&i(u,"cx","co")}}function o(e){if(!i(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function i(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function a(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];m(a)?r.push(a):v(a)&&o.push(a)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){m(t)?n=n.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})):v(t)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var i=o[r];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){r=i;break e}}r=""}i="string"==typeof(o=t.getPayload().e)?o:"",o=[];var a=b(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=w(e).map((function(e){e:{if(g(e)){var o=e[0],i=!1;try{i=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,r);break e}}else if(p(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return h(e,n)}))&&r++:"string"==typeof o&&h(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return h(e,n)}))&&t++:"string"==typeof o&&h(o,n)&&t++,0<r&&0===t}(e[0],r)){e=b(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,r),o.push.apply(o,t),o}}}function u(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}(e)}function c(e){if(null!==(e=/^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(e))&&u(e[1]))return e.slice(1,6)}function s(e){if(e=c(e)){var n=e[0];return 5===e.length&&u(n)}return!1}function l(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return s(e)})):"string"==typeof e&&s(e)}function f(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function d(e){return"function"==typeof e&&1>=e.length}function v(e){return d(e)||f(e)}function g(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?d(e[0])&&e[1].every(v):d(e[0])&&v(e[1]))}function p(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!l(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!l(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(v):v(e[1])))}function m(e){return g(e)||p(e)}function h(e,n){if(!s(e))return!1;if(e=c(e),n=null!==(n=/^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(n))?n.slice(1,6):void 0,e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!y(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!y(e[t],n[t]))return!1;return!0}return!1}function y(e,n){return e&&n&&"*"===e||e===n}function w(e){return Array.isArray(e)?e:[e]}function b(e,n,t,r){var o;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(f)||f(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(f(i)){e=[i];break e}if(Array.isArray(i)){e=i;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,o,u,c,s,l,f,d=e.base64,v=e.corePlugins,g=null!=v?v:[];t=null==d||d,o=g,u=e.callback,c=function(e){return{addPluginContexts:function(t){var r=t?n([],t,!0):[];return e.forEach((function(e){try{e.contexts&&r.push.apply(r,e.contexts())}catch(e){Te.error("Error adding plugin contexts",e)}})),r}}}(o),s=a(),l=t,f={};var p=oe(oe({},e={track:function(e,n,t){e.withJsonProcessor(r(l)),e.add("eid",Se.v4()),e.addDict(f),t=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(t),e.add(t.type,t.value.toString()),n=function(e,n){e=s.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}(e,c.addPluginContexts(n)),void 0!==(n=n&&n.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n}:void 0)&&e.addJson("cx","co",n),o.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){Te.error("Plugin beforeTrack",e)}})),"function"==typeof u&&u(e);var i=e.build();return o.forEach((function(e){try{e.afterTrack&&e.afterTrack(i)}catch(e){Te.error("Plugin afterTrack",e)}})),i},addPayloadPair:function(e,n){f[e]=n},getBase64Encoding:function(){return l},setBase64Encoding:function(e){l=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(f[n]=e[n])},resetPayloadPairs:function(e){f=i(e)?e:{}},setTrackerVersion:function(e){f.tv=e},setTrackerNamespace:function(e){f.tna=e},setAppId:function(e){f.aid=e},setPlatform:function(e){f.p=e},setUserId:function(e){f.uid=e},setScreenResolution:function(e,n){f.res=e+"x"+n},setViewport:function(e,n){f.vp=e+"x"+n},setColorDepth:function(e){f.cd=e},setTimezone:function(e){f.tz=e},setLang:function(e){f.lang=e},setIpAddress:function(e){f.ip=e},setUseragent:function(e){f.ua=e},addGlobalContexts:function(e){s.addGlobalContexts(e)},clearGlobalContexts:function(){s.clearGlobalContexts()},removeGlobalContexts:function(e){s.removeGlobalContexts(e)}}),{addPlugin:function(e){var n,t;e=e.plugin,g.push(e),null===(n=e.logger)||void 0===n||n.call(e,Te),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)}});return null==g||g.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,Te),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)})),p}function k(e){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())return n.getItem(e);n.removeItem(e),n.removeItem(e+".expires")}catch(e){}}function T(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function x(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function I(e){try{return window.sessionStorage.getItem(e)}catch(e){}}function C(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}}function A(e,n,t){var r,o=(new Date).getTime();n=oe(oe({},Ee),n);var i=t.domainUserId,a=t.userId,u=t.sessionId,c=t.sourceId,s=t.sourcePlatform,l=t.event,f=l.currentTarget;return l="function"==typeof n.reason?n.reason(l):null===(r=null==f?void 0:f.textContent)||void 0===r?void 0:r.trim(),e?[i,o,n.sessionId&&u,n.userId&&O(a||""),n.sourceId&&O(c||""),n.sourcePlatform&&s,n.reason&&O(l||"")].map((function(e){return e||""})).join(".").replace(/([.]*$)/,""):t.domainUserId+"."+o}function O(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function P(e){return!(!e||"string"!=typeof e.valueOf())}function E(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function D(e){if(!P(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function L(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function j(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function N(e){var n=window,t=B("referrer",n.location.href)||B("referer",n.location.href);if(t)return t;if(e)return e;try{if(n.top)return n.top.document.referrer;if(n.parent)return n.parent.document.referrer}catch(e){}return document.referrer}function _(e,n,t,r){return e.addEventListener?(e.addEventListener(n,t,r),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function B(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function R(e,n,t){t=n+"="+t;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),u=0;u<a.length;u++)if(a[u].substr(0,n.length+1)===n+"="){i=!1,a[u]=t,r=a.join("&");break}i&&(r=t+"&"+r)}else r=t;return e[0]=o+"?"+r,e.join("#")}function U(e,n){for(var t=window.location.hostname,r="_sp_root_domain_test_"+(new Date).getTime(),o="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-2;0<=a;a--){var u=i.slice(a).join(".");if(z(r,o,0,"/",u,e,n),z(r)===o){for(M(r,u,e,n),t=V("_sp_root_domain_test_"),r=0;r<t.length;r++)M(t[r],u,e,n);return u}}return t}function M(e,n,t,r){z(e,"",-1,"/",n,t,r)}function V(e){for(var n=document.cookie.split("; "),t=[],r=0;r<n.length;r++)n[r].substring(0,e.length)===e&&t.push(n[r]);return t}function z(e,n,t,r,o,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function H(e){return e.className.match(/\S+/g)||[]}function F(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function J(e){var n={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)n[e[t]]=!0}return n}function q(){try{return!!window.localStorage}catch(e){return!0}}function G(){if(!q())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function W(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=L(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?B("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=L(n=document.links[0].href)),[e,n,t]}function Q(e,n){return void 0===n&&(n={memorizedVisitCount:1}),n=n.memorizedVisitCount,"0"===e[0]?(e[7]=e[6],e[5]=e[4],e[3]++):e[3]=n,n=Se.v4(),e[6]=n,e[10]=0,e[8]="",e[9]=void 0,n}function X(e){e[4]=Math.round((new Date).getTime()/1e3)}function Z(e,n,t){var r=e[9];return{userId:t?"00000000-0000-0000-0000-000000000000":e[1],sessionId:e[6],eventIndex:e[10],sessionIndex:e[3],previousSessionId:t?null:e[7]||null,storageMechanism:"localStorage"==n?"LOCAL_STORAGE":"COOKIE_1",firstEventId:e[8]||null,firstEventTimestamp:r?new Date(r).toISOString():null}}function Y(){return"ResizeObserver"in window?(Oe||(Oe=K()),function(){if(!De){De=!0;var e=new ResizeObserver((function(e){for(var n=0;n<e.length;n++){var t=e[n];t.target!==document.body&&t.target!==document.documentElement||(Oe=K())}}));e.observe(document.body),e.observe(document.documentElement)}}(),Oe):K()}function K(){var e=$;if("innerWidth"in window)var n=window.innerWidth,t=window.innerHeight;else n=(t=document.documentElement||document.body).clientWidth,t=t.clientHeight;e=e(n=0<=n&&0<=t?n+Le+t:null),n=$;var r=document.documentElement,o=document.body;return t=Math.max(r.clientWidth,r.offsetWidth,r.scrollWidth),r=Math.max(r.clientHeight,r.offsetHeight,r.scrollHeight,o?Math.max(o.offsetHeight,o.scrollHeight):0),{viewport:e,documentSize:n(t=isNaN(t)||isNaN(r)?"":t+Le+r),resolution:$(screen.width+Le+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 $(e){return e&&e.split(Le).map((function(e){return Math.floor(Number(e))})).join(Le)}function ee(e,r,o,i,a,u){void 0===u&&(u={});var c=[];e=function(e,r,o,i,a,u){function s(){(sn=W(window.location.hostname,window.location.href,N()))[1]!==fn&&(dn=N(fn)),ln=j(sn[0]),fn=sn[1]}function l(e){for(var n=function(e){return function(n){var t=n.currentTarget;n=A(e,Fn,{domainUserId:nn,userId:rn||void 0,sessionId:tn,sourceId:mn,sourcePlatform:vn,event:n}),null!=t&&t.href&&(t.href=R(t.href,"_sp",n))}}(Hn),t=0;t<document.links.length;t++){var r=document.links[t];!r.spDecorationEnabled&&e(r)&&(r.addEventListener("click",n,!0),r.addEventListener("mousedown",n,!0),r.spDecorationEnabled=!0)}}function f(e){if(Ge){var n=/#.*/;e=e.replace(n,"")}return We&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function v(e){return e=wn+e+"."+en,"localStorage"==Dn?k(e):"cookie"==Dn||"cookieAndLocalStorage"==Dn?z(e):void 0}function g(){s(),en=Pe((bn||ln)+(Sn||"/")).slice(0,4)}function p(){Xe=(new Date).getTime()}function m(){var e=h(),n=e[0];n<Ze?Ze=n:n>Ye&&(Ye=n),(e=e[1])<Ke?Ke=e:e>$e&&($e=e),p()}function h(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function y(){var e=h(),n=e[0];Ye=Ze=n,$e=Ke=e=e[1]}function w(){return O(wn+"ses."+en,"*",An)}function b(e){var t=wn+"id."+en,r=En;return e=n([],e,!0),r&&(e[1]="",e[7]=""),e.shift(),O(t,r=e.join("."),Cn)}function O(e,n,t){return!(En&&!On)&&("localStorage"==Dn?T(e,n,t):("cookie"==Dn||"cookieAndLocalStorage"==Dn)&&(z(e,n,t,Sn,bn,kn,Tn),-1!==document.cookie.indexOf("".concat(e,"="))))}function V(e){var n=wn+"id."+en,t=wn+"ses."+en;x(n),x(t),M(n,bn,kn,Tn),M(t,bn,kn,Tn),null!=e&&e.preserveSession||(tn=Se.v4(),jn=1),null!=e&&e.preserveUser||(nn=En?"":Se.v4(),rn=null)}function H(e){e&&e.stateStorageStrategy&&(u.stateStorageStrategy=e.stateStorageStrategy,Dn=Ue(u)),En=!!u.anonymousTracking,On=Me(u),Pn=Ve(u),Nn.setUseLocalStorage("localStorage"==Dn||"cookieAndLocalStorage"==Dn),Nn.setAnonymousTracking(Pn)}function F(){if(!En||On){var e="none"!=Dn&&!!v("ses"),n=J();if(n[1])var t=n[1];else t=En?"":Se.v4(),n[1]=t;nn=t,tn=e?n[6]:Q(n),jn=n[3],"none"!=Dn&&(w(),X(n),b(n))}}function J(){return"none"==Dn?["1","",0,0,0,void 0,"","","",void 0,0]:function(e,n,t,r){var o=Math.round((new Date).getTime()/1e3);e?(e=e.split(".")).unshift("0"):e=["1",n,o,r,o,"",t],e[6]&&"undefined"!==e[6]||(e[6]=Se.v4()),e[7]&&"undefined"!==e[7]||(e[7]=""),e[8]&&"undefined"!==e[8]||(e[8]=""),e[9]&&"undefined"!==e[9]||(e[9]=""),e[10]&&"undefined"!==e[10]||(e[10]=0);var i=function(e,n){return e=parseInt(e),isNaN(e)?n:e};return n=function(e){return e?i(e,void 0):void 0},[e[0],e[1],i(e[2],o),i(e[3],r),i(e[4],o),n(e[5]),e[6],e[7],e[8],n(e[9]),i(e[10],0)]}(v("id")||void 0,nn,tn,jn)}function q(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function K(){_n&&null!=a.pageViewId||(a.pageViewId=Se.v4())}function $(){return null==a.pageViewId&&(a.pageViewId=Se.v4()),a.pageViewId}function ee(){if("none"===Dn||En||!He)return null;var e=I("_sp_tab_id");return e||(C("_sp_tab_id",Se.v4()),e=I("_sp_tab_id")),e||null}function ne(e){var n=e.title,r=e.context,o=e.timestamp;if(e=e.contextCallback,s(),Bn&&K(),Bn=!0,hn=document.title,n=D((qe=n)||hn),un.track(function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o}({pageUrl:f(Je||fn),pageTitle:n,referrer:f(Fe||dn)}),(r||[]).concat(e?e():[]),o),o=new Date,n=!1,Rn.enabled&&!Rn.installed){n=Rn.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),i.hasSupport=e}}};i.update();var a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(i,"hasSupport")?_(document,a,p,{passive:!0}):_(document,a,p),y(),a=function(e,n){return void 0===n&&(n=p),function(e){return _(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(a(document)),["resize","focus","blur"].forEach(a(window)),a(window,m)("scroll")}if(Rn.enabled&&(yn||n))for(o in Xe=o.getTime(),o=void 0,Rn.configurations)(n=Rn.configurations[o])&&(window.clearInterval(n.activityInterval),te(n,r,e))}function te(e,n,t){var r=function(e,n){s(),e({context:n,pageViewId:$(),minXOffset:Ze,minYOffset:Ke,maxXOffset:Ye,maxYOffset:$e}),y()},o=function(){Xe+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(o,e.configHeartBeatTimer):window.setTimeout((function(){Xe+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength)}function re(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,E(n)&&E(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};Te.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function ie(e){var n=e.context,r=e.minXOffset,o=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==hn&&(hn=e,qe=void 0);var u=(e=un).track,c=f(Je||fn),s=D(qe||hn),l=f(Fe||dn);r=Math.round(r),i=Math.round(i),o=Math.round(o),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",c),d.add("page",s),d.add("refr",l),r&&!isNaN(Number(r))&&d.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),o&&!isNaN(Number(o))&&d.add("pp_miy",o.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),u.call(e,d,n)}function ae(e){var n=Rn.configurations[e];0===(null==n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null==n?void 0:n.activityInterval):window.clearInterval(null==n?void 0:n.activityInterval),Rn.configurations[e]=void 0}var ue,ce,se,le,fe,de,ve,ge,pe,me,he,ye,we,be,ke,xe,Ie,Ce,Ae,Oe,Ee,De,Le,je,Ne,_e,Be,Re;u.eventMethod=null!==(ue=u.eventMethod)&&void 0!==ue?ue:"post";var Ue=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Me=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==t&&t)},Ve=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==t&&t)},ze=null!==(se=null===(ce=null==u?void 0:u.contexts)||void 0===ce?void 0:ce.browser)&&void 0!==se&&se,He=null===(fe=null===(le=null==u?void 0:u.contexts)||void 0===le?void 0:le.webPage)||void 0===fe||fe;c.push({beforeTrack:function(e){var n=v("ses"),t=J(),r=0===t[10];if(on=!!Qe&&!!z(Qe),In||on)V();else{if("0"===t[0]?(tn=n||"none"==Dn?t[6]:Q(t),jn=t[3]):(new Date).getTime()-Ln>1e3*An&&(jn++,tn=Q(t,{memorizedVisitCount:jn})),X(t),0===t[10]){var o=e.build();t[8]=o.eid,o=o.dtm||o.ttm,t[9]=o?parseInt(o):void 0}t[10]+=1;var i=(o=Y()).documentSize;e.add("vp",o.viewport),e.add("ds",i),e.add("vid",On?jn:En?null:jn),e.add("sid",On?tn:En?null:tn),e.add("duid",En?null:t[1]),e.add("uid",En?null:rn),s(),e.add("refr",f(Fe||dn)),e.add("url",f(Je||fn)),o=Z(t,Dn,En),!Un||En&&!On||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:o}),"none"!=Dn&&(b(t),e=w(),n&&!r||!e||!Mn||Vn||(Mn(o),Vn=!1)),Ln=(new Date).getTime()}}}),He&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:$()}}]}}),ze&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",data:oe(oe({},Y()),{tabId:ee()})}]}}),c.push.apply(c,null!==(de=u.plugins)&&void 0!==de?de:[]);var Fe,Je,qe,Ge,We,Qe,Xe,Ze,Ye,Ke,$e,en,nn,tn,rn,on,an,un=S({base64:u.encodeBase64,corePlugins:c,callback:function(e){In||on||Nn.enqueueRequest(e.build(),gn)}}),cn=document.characterSet||document.charset,sn=W(window.location.hostname,window.location.href,N()),ln=j(sn[0]),fn=sn[1],dn=sn[2],vn=null!==(ve=u.platform)&&void 0!==ve?ve:"web",gn=q(i),pn=null!==(ge=u.postPath)&&void 0!==ge?ge:"/com.snowplowanalytics.snowplow/tp2",mn=null!==(pe=u.appId)&&void 0!==pe?pe:"",hn=document.title,yn=null===(me=u.resetActivityTrackingOnPageView)||void 0===me||me,wn=null!==(he=u.cookieName)&&void 0!==he?he:"_sp_",bn=null!==(ye=u.cookieDomain)&&void 0!==ye?ye:void 0,Sn="/",kn=null!==(we=u.cookieSameSite)&&void 0!==we?we:"None",Tn=null===(be=u.cookieSecure)||void 0===be||be,xn=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,In=void 0!==u.respectDoNotTrack&&(u.respectDoNotTrack&&("yes"===xn||"1"===xn)),Cn=null!==(ke=u.cookieLifetime)&&void 0!==ke?ke:63072e3,An=null!==(xe=u.sessionCookieTimeout)&&void 0!==xe?xe:1800,On=Me(u),Pn=Ve(u),En=!!u.anonymousTracking,Dn=Ue(u),Ln=(new Date).getTime(),jn=1,Nn=function(e,n,t,r,o,i,a,u,c,s,l,f,d,v,g,p,m,h,y,w){function b(e){var n=Object.keys(e).map((function(n){return[n,e[n]]})).reduce((function(e,n){return e[n[0]]=n[1].toString(),e}),{});return{evt:n,bytes:S(JSON.stringify(n))}}function S(e){for(var n=0,t=0;t<e.length;t++){var r=e.charCodeAt(t);127>=r?n+=1:2047>=r?n+=2:55296<=r&&57343>=r?(n+=4,t++):n=65535>r?n+3:n+4}return n}function k(e,n){var t=O(n,!0,!1),r=D([e.evt]);t.onreadystatechange=function(){4===t.readyState&&(A(t.status)?null==y||y(r):null==w||w({status:t.status,message:t.statusText,events:r,willRetry:!1}))},t.send(E(r))}function x(e){for(var n=0;n<e;n++)U.shift();t&&T(q,JSON.stringify(U.slice(0,s)))}function I(e,n,t){e.onreadystatechange=function(){if(4===e.readyState)if(clearTimeout(r),A(e.status))x(n),null==y||y(t),C();else{var o=e.status;(o=!(A(o)||!h||!g.includes(o)&&p.includes(o)))||(Te.error("Status ".concat(e.status,", will not retry.")),x(n)),null==w||w({status:e.status,message:e.statusText,events:t,willRetry:o}),R=!1}};var r=setTimeout((function(){e.abort(),h||x(n),null==w||w({status:0,message:"timeout",events:t,willRetry:h}),R=!1}),l)}function C(e){for(void 0===e&&(e=!1);U.length&&"string"!=typeof U[0]&&"object"!=typeof U[0];)U.shift();if(U.length){if(!P(j))throw"No collector configured";if(R=!0,m&&!M){var n=O(m,!1,e);M=!0,n.timeout=l,n.onreadystatechange=function(){4===n.readyState&&C()},n.send()}else if(H){var r=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},o=void 0,i=void 0,u=void 0;if(Q(U)?(i=O(o=j,!0,e),u=r(U)):(i=O(o=L(U[0]),!1,e),u=1),Q(U)){if(0<(e=U.slice(0,u)).length){r=!1;var c=e.map((function(e){return e.evt}));if(z){var d=new Blob([E(D(c))],{type:"application/json"});try{r=window.navigator.sendBeacon(o,d)}catch(e){r=!1}}!0===r?(x(u),null==y||y(e),C()):(I(i,u,o=D(c)),i.send(E(o)))}}else I(i,u,[o]),i.send()}else if(f||Q(U))R=!1;else{i=new Image(1,1);var v=!0;i.onload=function(){v&&(v=!1,U.shift(),t&&T(q,JSON.stringify(U.slice(0,s))),C())},i.onerror=function(){v&&(R=v=!1)},i.src=L(U[0]),setTimeout((function(){v&&R&&(v=!1,C())}),l)}}else R=!1}function A(e){return 200<=e&&300>e}function O(e,n,t){var r=new XMLHttpRequest;for(var o in n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=v,f&&r.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,o)&&r.setRequestHeader(o,d[o]);return r}function E(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function D(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function L(e){return c?j+e.replace("?","?stm="+(new Date).getTime()+"&"):j+e}void 0===h&&(h=!0);var j,N,_,B,R=!1,U=[],M=!1,V=!0===(r="string"==typeof r?r.toLowerCase():r)||"beacon"===r||"true"===r,z=!(!V||!window.navigator||"function"!=typeof window.navigator.sendBeacon||(N=window.navigator.userAgent,(B=(B=N).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&B.length&&parseInt(B[0])<=13||function(e,n,t){return!(!(t=t.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!t.length)&&(parseInt(t[0])<=e||parseInt(t[0])===e&&parseInt(t[1])<=n)}(10,15,N)&&(_=N).match("Version/.* Safari/")&&!_.match("Chrom(e|ium)")))&&V,H=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),F="get"!==r&&H&&("post"===r||V),J=F?o:"/i",q="snowplowOutQueue_".concat(e,"_").concat(F?"post2":"get");if(V&&(d={}),i=t&&G()&&F&&i||1,t)try{var W=window.localStorage.getItem(q);U=W?JSON.parse(W):[]}catch(N){}Array.isArray(U)||(U=[]),n.outQueues.push(U),H&&1<i&&n.bufferFlushers.push((function(e){R||C(e)}));var Q=function(e){return"object"==typeof e[0]&&"evt"in e[0]};return{enqueueRequest:function(e,n){if(j=n+J,F){if((e=b(e)).bytes>=a)return Te.warn("Event ("+e.bytes+"B) too big, max is "+a),void k(e,j);U.push(e)}else{var r,c="?",l={co:!0,cx:!0},f=!0;for(r in e)e.hasOwnProperty(r)&&!l.hasOwnProperty(r)&&(f?f=!1:c+="&",c+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(c+="&"+d+"="+encodeURIComponent(e[d]));if(0<u&&(l=S(l=L(c)))>=u)return Te.warn("Event ("+l+"B) too big, max is "+u),void(H&&(e=b(e),k(e,n+o)));U.push(c)}n=!1,t&&(n=T(q,JSON.stringify(U.slice(0,s)))),R||n&&!(U.length>=i)||C()},executeQueue:function(){R||C()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){j=e+J},setBufferSize:function(e){i=e}}}(e,a,"localStorage"==Dn||"cookieAndLocalStorage"==Dn,u.eventMethod,pn,null!==(Ie=u.bufferSize)&&void 0!==Ie?Ie:1,null!==(Ce=u.maxPostBytes)&&void 0!==Ce?Ce:4e4,null!==(Ae=u.maxGetBytes)&&void 0!==Ae?Ae:0,null===(Oe=u.useStm)||void 0===Oe||Oe,null!==(Ee=u.maxLocalStorageQueueSize)&&void 0!==Ee?Ee:1e3,null!==(De=u.connectionTimeout)&&void 0!==De?De:5e3,Pn,null!==(Le=u.customHeaders)&&void 0!==Le?Le:{},null===(je=u.withCredentials)||void 0===je||je,null!==(Ne=u.retryStatusCodes)&&void 0!==Ne?Ne:[],(null!==(_e=u.dontRetryStatusCodes)&&void 0!==_e?_e:[]).concat([400,401,403,410,422]),u.idService,u.retryFailedRequests,u.onRequestSuccess,u.onRequestFailure),_n=!1,Bn=!1,Rn={enabled:!1,installed:!1,configurations:{}},Un=null!==(Re=null===(Be=u.contexts)||void 0===Be?void 0:Be.session)&&void 0!==Re&&Re,Mn=u.onSessionUpdateCallback,Vn=!1,zn="boolean"==typeof(an=u.useExtendedCrossDomainLinker||!1)?{useExtendedCrossDomainLinker:an}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:an},Hn=zn.useExtendedCrossDomainLinker,Fn=zn.collectCrossDomainAttributes;u.hasOwnProperty("discoverRootDomain")&&u.discoverRootDomain&&(bn=U(kn,Tn));var Jn=Y(),qn=Jn.browserLanguage,Gn=Jn.resolution,Wn=Jn.colorDepth,Qn=Jn.cookiesEnabled;return un.setTrackerVersion(o),un.setTrackerNamespace(r),un.setAppId(mn),un.setPlatform(vn),un.addPayloadPair("cookie",Qn?"1":"0"),un.addPayloadPair("cs",cn),un.addPayloadPair("lang",qn),un.addPayloadPair("res",Gn),un.addPayloadPair("cd",Wn),g(),F(),u.crossDomainLinker&&l(u.crossDomainLinker),oe(oe({},{getDomainSessionIndex:function(){return jn},getPageViewId:$,getTabId:ee,newSession:function(){var e=J();if("0"===e[0]?(tn="none"!=Dn?Q(e):e[6],jn=e[3]):(jn++,tn=Q(e,{memorizedVisitCount:jn})),X(e),"none"!=Dn){var n=Z(e,Dn,En);b(e),w()&&Mn&&(Vn=!0,Mn(n))}Ln=(new Date).getTime()},getCookieName:function(e){return wn+e+"."+en},getUserId:function(){return rn},getDomainUserId:function(){return J()[1]},getDomainUserInfo:function(){return J()},setReferrerUrl:function(e){Fe=e},setCustomUrl:function(e){s();var n,t=fn;d(e)?Je=e:"/"===e.slice(0,1)?Je=d(t)+"://"+L(t)+e:(0<=(n=(t=f(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Je=t+e)},setDocumentTitle:function(e){hn=document.title,qe=e},discardHashTag:function(e){Ge=e},discardBrace:function(e){We=e},setCookiePath:function(e){Sn=e,g()},setVisitorCookieTimeout:function(e){Cn=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){Rn.configurations.pagePing||(Rn.enabled=!0,Rn.configurations.pagePing=re(oe(oe({},e),{callback:ie})))},enableActivityTrackingCallback:function(e){Rn.configurations.callback||(Rn.enabled=!0,Rn.configurations.callback=re(e))},disableActivityTracking:function(){ae("pagePing")},disableActivityTrackingCallback:function(){ae("callback")},updatePageActivity:function(){p()},setOptOutCookie:function(e){Qe=e},setUserId:function(e){rn=e},setUserIdFromLocation:function(e){s(),rn=B(e,fn)},setUserIdFromReferrer:function(e){s(),rn=B(e,dn)},setUserIdFromCookie:function(e){rn=z(e)},setCollectorUrl:function(e){gn=q(e),Nn.setCollectorUrl(gn)},setBufferSize:function(e){Nn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Nn.executeQueue(),e.newBufferSize&&Nn.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),ne(e)},preservePageViewId:function(){_n=!0},disableAnonymousTracking:function(e){u.anonymousTracking=!1,H(e),F(),Nn.executeQueue()},enableAnonymousTracking:function(e){var n;u.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,H(e),On||K()},clearUserData:V}),{id:e,namespace:r,core:un,sharedState:a})}(e,r,o,i,a,u);var s=oe(oe({},e),{addPlugin:function(e){var n,t;s.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,s)}});return c.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,s)})),s}function ne(e){return re(e,je)}function te(){return Object.keys(je)}function re(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):Te.warn(o+" not configured")}return t}var oe=function(){return oe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},oe.apply(this,arguments)},ie={},ae="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(ae){var ue=new Uint8Array(16);ie=function(){return ae(ue),ue}}else{var ce=Array(16);ie=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),ce[n]=e>>>((3&n)<<3)&255;return ce}}for(var se=[],le=0;256>le;++le)se[le]=(le+256).toString(16).substr(1);var fe,de,ve=function(e,n){return n=n||0,[se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]]].join("")},ge=ie,pe=0,me=0,he=ie,ye=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||he)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||ve(e)};ye.v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||fe,i=void 0!==e.clockseq?e.clockseq:de;if(null==o||null==i){var a=ge();null==o&&(o=fe=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=de=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:me+1,c=a-pe+(u-me)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>pe)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(pe=a,me=u,de=i,e=(1e4*(268435455&(a+=122192928e5))+u)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=a/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=i>>>8|128,r[t++]=255&i,i=0;6>i;++i)r[t+i]=o[i];return n||ve(r)};var we,be,Se=ye.v4=ye,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(be=we||(we={}))[be.none=0]="none",be[be.error=1]="error",be[be.warn=2]="warn",be[be.debug=3]="debug",be[be.info=4]="info";var Te=function(e){return void 0===e&&(e=we.warn),{setLogLevel:function(n){e=we[n]?n:we.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=we.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o,!1)):console.warn.apply(console,n([i],o,!1)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=we.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o,!1)):console.error.apply(console,n([i],o,!1)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=we.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r,!1))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=we.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r,!1))}}}(),xe={},Ie={};!function(){var e={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var t=0;t<n.length;t++)n[t]=e.endian(n[t]);return n},randomBytes:function(e){for(var n=[];0<e;e--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(e){for(var n=[],t=0,r=0;t<e.length;t++,r+=8)n[r>>>5]|=e[t]<<24-r%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t<e.length;t++)n.push((e[t]>>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return n},bytesToBase64:function(e){for(var n=[],t=0;t<e.length;t+=3)for(var r=e[t]<<16|e[t+1]<<8|e[t+2],o=0;4>o;o++)8*t+6*o<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,r=0;t<e.length;r=++t%4)0!=r&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*r);return n}};Ie=e}();var Ce={utf8:{stringToBytes:function(e){return Ce.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Ce.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],t=0;t<e.length;t++)n.push(255&e.charCodeAt(t));return n},bytesToString:function(e){for(var n=[],t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return n.join("")}}},Ae=Ce;!function(){var e=Ie,n=Ae.utf8,t=Ae.bin,r=function(r,o){var i=e.wordsToBytes,a=r;a.constructor==String?a=n.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()),r=e.bytesToWords(a);var u=8*a.length;a=[];var c=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(r[u>>5]|=128<<24-u%32,r[15+(u+64>>>9<<4)]=u,u=0;u<r.length;u+=16){for(var v=c,g=s,p=l,m=f,h=d,y=0;80>y;y++){if(16>y)a[y]=r[u+y];else{var w=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=w<<1|w>>>31}w=(c<<5|c>>>27)+d+(a[y]>>>0)+(20>y?1518500249+(s&l|~s&f):40>y?1859775393+(s^l^f):60>y?(s&l|s&f|l&f)-1894007588:(s^l^f)-899497514),d=f,f=l,l=s<<30|s>>>2,s=c,c=w}c+=v,s+=g,l+=p,f+=m,d+=h}return i=i.call(e,[c,s,l,f,d]),o&&o.asBytes?i:o&&o.asString?t.bytesToString(i):e.bytesToHex(i)};r._blocksize=16,r._digestsize=20,xe=r}();var Oe,Pe=xe,Ee={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1},De=!1,Le="x",je={},Ne=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ne,e.addEventListener=_,e.addTracker=function(e,n,t,r,o,i){return je.hasOwnProperty(e)?null:(je[e]=ee(e,n,t,r,o,i),je[e])},e.allTrackerNames=te,e.allTrackers=function(){return je},e.attemptDeleteLocalStorage=x,e.attemptGetLocalStorage=k,e.attemptGetSessionStorage=I,e.attemptWriteLocalStorage=T,e.attemptWriteSessionStorage=C,e.cookie=z,e.createCrossDomainParameterValue=A,e.createSharedState=function(){function e(){var e;if(!n.hasLoaded)for(n.hasLoaded=!0,e=0;e<n.registeredOnLoadHandlers.length;e++)n.registeredOnLoadHandlers[e]();return!0}var n=new Ne,t=document,r=window;return t.visibilityState&&_(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),_(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function n(){t.removeEventListener("DOMContentLoaded",n,!1),e()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e())})),_(r,"load",e,!1)):e(),n},e.decorateQuerystring=R,e.deleteCookie=M,e.dispatchToTrackers=function(e,n){try{ne(null!=e?e:te()).forEach(n)}catch(e){Te.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{re(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){Te.error("Function failed",e)}},e.findRootDomain=U,e.fixupDomain=j,e.fixupTitle=D,e.fixupUrl=W,e.fromQuerystring=B,e.getCookiesWithPrefix=V,e.getCssClasses=H,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=Object.prototype.hasOwnProperty.call(e,"allowlist"),t=J(e);return F(e,(function(e){e:{var r=0;for(e=H(e);r<e.length;r++)if(t[e[r]]){r=!0;break e}r=!1}return r===n}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=e.hasOwnProperty("allowlist"),t=J(e);return F(e,(function(e){return e.name in t===n}))},e.getHostName=L,e.getReferrer=N,e.getTracker=function(e){return je.hasOwnProperty(e)?je[e]:(Te.warn(e+" not configured"),null)},e.getTrackers=ne,e.hasLocalStorage=q,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=E,e.isString=P,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=G,e.parseAndValidateFloat=function(e){return e=parseFloat(e),isNaN(e)?void 0:e},e.parseAndValidateInt=function(e){return e=parseInt(e),isNaN(e)?void 0:e},e.trackerExists=function(e){return je.hasOwnProperty(e)},e.urlSafeBase64Encode=O,Object.defineProperty(e,"__esModule",{value:!0})}));
"use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function n(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],r=[],i=[],a=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:a,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(n,e[n])},addJson:function(e,n,i){i&&o(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},r.push(e),t.push(e))},addContextEntity:function(e){i.push(e)},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r,i),n}}}function r(e){return function(t,r,o){for(var i=function(n,r,o){if(n=JSON.stringify(n),e){if(o=t.add,n){var i=0,a=0,u=[];if(n){n=unescape(encodeURIComponent(n));do{var c=n.charCodeAt(i++),s=n.charCodeAt(i++),l=n.charCodeAt(i++),f=c<<16|s<<8|l;c=f>>18&63,s=f>>12&63,l=f>>6&63,f&=63,u[a++]=ke.charAt(c)+ke.charAt(s)+ke.charAt(l)+ke.charAt(f)}while(i<n.length);i=u.join(""),n=((n=n.length%3)?i.slice(0,n-3):i)+"===".slice(n||3)}n=n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}o.call(t,r,n)}else t.add(o,n)},a=function(n,r){if(!n){var o=t.getPayload();if(e?o.cx:o.co){var i=(n=JSON).parse;if(e){if(o=o.cx){switch(4-o.length%4){case 2:o+="==";break;case 3:o+="="}o=function(e){var n,t=0,r=0,o="",i=[];if(!e)return e;e+="";do{var a=ke.indexOf(e.charAt(t++)),u=ke.indexOf(e.charAt(t++));o=ke.indexOf(e.charAt(t++));var c=ke.indexOf(e.charAt(t++)),s=a<<18|u<<12|o<<6|c;a=s>>16&255,u=s>>8&255,s&=255,i[r++]=64===o?String.fromCharCode(a):64===c?String.fromCharCode(a,u):String.fromCharCode(a,u,s)}while(t<e.length);return o=i.join(""),n=o.replace(/\0+$/,""),decodeURIComponent(n.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(o=o.replace(/-/g,"+").replace(/_/g,"/"))}}else o=o.co;n=i.call(n,o)}else n=void 0}return n?n.data=n.data.concat(r.data):n=r,n},u=void 0,c=0;c<r.length;c++){var s=r[c];"cx"===s.keyIfEncoded?u=a(u,s.json):i(s.json,s.keyIfEncoded,s.keyIfNotEncoded)}r.length=0,o.length&&(u=a(u,r={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n([],o,!0)}),o.length=0),u&&i(u,"cx","co")}}function o(e){if(!i(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function i(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function a(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];m(a)?r.push(a):v(a)&&o.push(a)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){m(t)?n=n.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})):v(t)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var i=o[r];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){r=i;break e}}r=""}i="string"==typeof(o=t.getPayload().e)?o:"",o=[];var a=b(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=w(e).map((function(e){e:{if(g(e)){var o=e[0],i=!1;try{i=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,r);break e}}else if(p(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return h(e,n)}))&&r++:"string"==typeof o&&h(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return h(e,n)}))&&t++:"string"==typeof o&&h(o,n)&&t++,0<r&&0===t}(e[0],r)){e=b(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,r),o.push.apply(o,t),o}}}function u(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}(e)}function c(e){if(null!==(e=/^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(e))&&u(e[1]))return e.slice(1,6)}function s(e){if(e=c(e)){var n=e[0];return 5===e.length&&u(n)}return!1}function l(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return s(e)})):"string"==typeof e&&s(e)}function f(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function d(e){return"function"==typeof e&&1>=e.length}function v(e){return d(e)||f(e)}function g(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?d(e[0])&&e[1].every(v):d(e[0])&&v(e[1]))}function p(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!l(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!l(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(v):v(e[1])))}function m(e){return g(e)||p(e)}function h(e,n){if(!s(e))return!1;if(e=c(e),n=null!==(n=/^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(n))?n.slice(1,6):void 0,e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!y(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!y(e[t],n[t]))return!1;return!0}return!1}function y(e,n){return e&&n&&"*"===e||e===n}function w(e){return Array.isArray(e)?e:[e]}function b(e,n,t,r){var o;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(f)||f(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(f(i)){e=[i];break e}if(Array.isArray(i)){e=i;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,o,u,c,s,l,f,d=e.base64,v=e.corePlugins,g=null!=v?v:[];t=null==d||d,o=g,u=e.callback,c=function(e){return{addPluginContexts:function(t){var r=t?n([],t,!0):[];return e.forEach((function(e){try{e.contexts&&r.push.apply(r,e.contexts())}catch(e){Te.error("Error adding plugin contexts",e)}})),r}}}(o),s=a(),l=t,f={};var p=oe(oe({},e={track:function(e,n,t){e.withJsonProcessor(r(l)),e.add("eid",Se.v4()),e.addDict(f),t=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(t),e.add(t.type,t.value.toString()),n=function(e,n){e=s.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}(e,c.addPluginContexts(n)),void 0!==(n=n&&n.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n}:void 0)&&e.addJson("cx","co",n),o.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){Te.error("Plugin beforeTrack",e)}})),"function"==typeof u&&u(e);var i=e.build();return o.forEach((function(e){try{e.afterTrack&&e.afterTrack(i)}catch(e){Te.error("Plugin afterTrack",e)}})),i},addPayloadPair:function(e,n){f[e]=n},getBase64Encoding:function(){return l},setBase64Encoding:function(e){l=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(f[n]=e[n])},resetPayloadPairs:function(e){f=i(e)?e:{}},setTrackerVersion:function(e){f.tv=e},setTrackerNamespace:function(e){f.tna=e},setAppId:function(e){f.aid=e},setPlatform:function(e){f.p=e},setUserId:function(e){f.uid=e},setScreenResolution:function(e,n){f.res=e+"x"+n},setViewport:function(e,n){f.vp=e+"x"+n},setColorDepth:function(e){f.cd=e},setTimezone:function(e){f.tz=e},setLang:function(e){f.lang=e},setIpAddress:function(e){f.ip=e},setUseragent:function(e){f.ua=e},addGlobalContexts:function(e){s.addGlobalContexts(e)},clearGlobalContexts:function(){s.clearGlobalContexts()},removeGlobalContexts:function(e){s.removeGlobalContexts(e)}}),{addPlugin:function(e){var n,t;e=e.plugin,g.push(e),null===(n=e.logger)||void 0===n||n.call(e,Te),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)}});return null==g||g.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,Te),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)})),p}function k(e){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())return n.getItem(e);n.removeItem(e),n.removeItem(e+".expires")}catch(e){}}function T(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function x(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function I(e){try{return window.sessionStorage.getItem(e)}catch(e){}}function A(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}}function C(e,n,t){var r,o=(new Date).getTime();n=oe(oe({},Ee),n);var i=t.domainUserId,a=t.userId,u=t.sessionId,c=t.sourceId,s=t.sourcePlatform,l=t.event,f=l.currentTarget;return l="function"==typeof n.reason?n.reason(l):null===(r=null==f?void 0:f.textContent)||void 0===r?void 0:r.trim(),e?[i,o,n.sessionId&&u,n.userId&&P(a||""),n.sourceId&&P(c||""),n.sourcePlatform&&s,n.reason&&P(l||"")].map((function(e){return e||""})).join(".").replace(/([.]*$)/,""):t.domainUserId+"."+o}function P(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function O(e){return!(!e||"string"!=typeof e.valueOf())}function E(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function L(e){if(!O(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function D(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function j(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function N(e){var n=window,t=_("referrer",n.location.href)||_("referer",n.location.href);if(t)return t;if(e)return e;try{if(n.top)return n.top.document.referrer;if(n.parent)return n.parent.document.referrer}catch(e){}return document.referrer}function U(e,n,t,r){return e.addEventListener?(e.addEventListener(n,t,r),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function _(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function B(e,n,t){t=n+"="+t;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),u=0;u<a.length;u++)if(a[u].substr(0,n.length+1)===n+"="){i=!1,a[u]=t,r=a.join("&");break}i&&(r=t+"&"+r)}else r=t;return e[0]=o+"?"+r,e.join("#")}function R(e,n){for(var t=window.location.hostname,r="_sp_root_domain_test_"+(new Date).getTime(),o="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-2;0<=a;a--){var u=i.slice(a).join(".");if(z(r,o,0,"/",u,e,n),z(r)===o){for(V(r,u,e,n),t=M("_sp_root_domain_test_"),r=0;r<t.length;r++)V(t[r],u,e,n);return u}}return t}function V(e,n,t,r){z(e,"",-1,"/",n,t,r)}function M(e){for(var n=document.cookie.split("; "),t=[],r=0;r<n.length;r++)n[r].substring(0,e.length)===e&&t.push(n[r]);return t}function z(e,n,t,r,o,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function H(e){return e.className.match(/\S+/g)||[]}function F(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function J(e){var n={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)n[e[t]]=!0}return n}function q(){try{return!!window.localStorage}catch(e){return!0}}function G(){if(!q())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function W(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=D(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?_("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=D(n=document.links[0].href)),[e,n,t]}function Q(e,n){return void 0===n&&(n={memorizedVisitCount:1}),n=n.memorizedVisitCount,"0"===e[0]?(e[7]=e[6],e[5]=e[4],e[3]++):e[3]=n,n=Se.v4(),e[6]=n,e[10]=0,e[8]="",e[9]=void 0,n}function X(e){e[4]=Math.round((new Date).getTime()/1e3)}function Z(e,n,t){var r=e[9];return{userId:t?"00000000-0000-0000-0000-000000000000":e[1],sessionId:e[6],eventIndex:e[10],sessionIndex:e[3],previousSessionId:t?null:e[7]||null,storageMechanism:"localStorage"==n?"LOCAL_STORAGE":"COOKIE_1",firstEventId:e[8]||null,firstEventTimestamp:r?new Date(r).toISOString():null}}function Y(){return"ResizeObserver"in window?(Pe||(Pe=K()),function(){if(!Le){Le=!0;var e=new ResizeObserver((function(e){for(var n=0;n<e.length;n++){var t=e[n];t.target!==document.body&&t.target!==document.documentElement||(Pe=K())}}));e.observe(document.body),e.observe(document.documentElement)}}(),Pe):K()}function K(){var e=$;if("innerWidth"in window)var n=window.innerWidth,t=window.innerHeight;else n=(t=document.documentElement||document.body).clientWidth,t=t.clientHeight;e=e(n=0<=n&&0<=t?n+De+t:null),n=$;var r=document.documentElement,o=document.body;return t=Math.max(r.clientWidth,r.offsetWidth,r.scrollWidth),r=Math.max(r.clientHeight,r.offsetHeight,r.scrollHeight,o?Math.max(o.offsetHeight,o.scrollHeight):0),{viewport:e,documentSize:n(t=isNaN(t)||isNaN(r)?"":t+De+r),resolution:$(screen.width+De+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 $(e){return e&&e.split(De).map((function(e){return Math.floor(Number(e))})).join(De)}function ee(e,r,o,i,a,u){void 0===u&&(u={});var c=[];e=function(e,r,o,i,a,u){function s(){(ln=W(window.location.hostname,window.location.href,N()))[1]!==dn&&(vn=N(dn)),fn=j(ln[0]),dn=ln[1]}function l(e){for(var n=function(e){return function(n){var t=n.currentTarget;n=C(e,qn,{domainUserId:tn,userId:on||void 0,sessionId:rn,sourceId:hn,sourcePlatform:gn,event:n}),null!=t&&t.href&&(t.href=B(t.href,"_sp",n))}}(Jn),t=0;t<document.links.length;t++){var r=document.links[t];!r.spDecorationEnabled&&e(r)&&(r.addEventListener("click",n,!0),r.addEventListener("mousedown",n,!0),r.spDecorationEnabled=!0)}}function f(e){if(We){var n=/#.*/;e=e.replace(n,"")}return Qe&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function v(e){return e=bn+e+"."+nn,"localStorage"==Dn?k(e):"cookie"==Dn||"cookieAndLocalStorage"==Dn?z(e):void 0}function g(){s(),nn=Oe((Sn||fn)+(kn||"/")).slice(0,4)}function p(){Ze=(new Date).getTime()}function m(){var e=h(),n=e[0];n<Ye?Ye=n:n>Ke&&(Ke=n),(e=e[1])<$e?$e=e:e>en&&(en=e),p()}function h(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function y(){var e=h(),n=e[0];Ke=Ye=n,en=$e=e=e[1]}function w(){return P(bn+"ses."+nn,"*",Pn)}function b(e){var t=bn+"id."+nn,r=Ln;return e=n([],e,!0),r&&(e[1]="",e[7]=""),e.shift(),P(t,r=e.join("."),Cn)}function P(e,n,t){return!(Ln&&!On)&&("localStorage"==Dn?T(e,n,t):("cookie"==Dn||"cookieAndLocalStorage"==Dn)&&(z(e,n,t,kn,Sn,Tn,xn),-1!==document.cookie.indexOf("".concat(e,"="))))}function M(e){var n=bn+"id."+nn,t=bn+"ses."+nn;x(n),x(t),V(n,Sn,Tn,xn),V(t,Sn,Tn,xn),null!=e&&e.preserveSession||(rn=Se.v4(),Nn=1),null!=e&&e.preserveUser||(tn=Ln?"":Se.v4(),on=null)}function H(e){e&&e.stateStorageStrategy&&(u.stateStorageStrategy=e.stateStorageStrategy,Dn=Ve(u)),Ln=!!u.anonymousTracking,On=Me(u),En=ze(u),Un.setUseLocalStorage("localStorage"==Dn||"cookieAndLocalStorage"==Dn),Un.setAnonymousTracking(En)}function F(){if(!Ln||On){var e="none"!=Dn&&!!v("ses"),n=J();if(n[1])var t=n[1];else t=Ln?"":Se.v4(),n[1]=t;tn=t,rn=e?n[6]:Q(n),Nn=n[3],"none"!=Dn&&(w(),X(n),b(n))}}function J(){return"none"==Dn?["1","",0,0,0,void 0,"","","",void 0,0]:function(e,n,t,r){var o=Math.round((new Date).getTime()/1e3);e?(e=e.split(".")).unshift("0"):e=["1",n,o,r,o,"",t],e[6]&&"undefined"!==e[6]||(e[6]=Se.v4()),e[7]&&"undefined"!==e[7]||(e[7]=""),e[8]&&"undefined"!==e[8]||(e[8]=""),e[9]&&"undefined"!==e[9]||(e[9]=""),e[10]&&"undefined"!==e[10]||(e[10]=0);var i=function(e,n){return e=parseInt(e),isNaN(e)?n:e};return n=function(e){return e?i(e,void 0):void 0},[e[0],e[1],i(e[2],o),i(e[3],r),i(e[4],o),n(e[5]),e[6],e[7],e[8],n(e[9]),i(e[10],0)]}(v("id")||void 0,tn,rn,Nn)}function q(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function K(){_n&&null!=a.pageViewId||(a.pageViewId=Se.v4(),a.pageViewUrl=qe||dn)}function $(){return function(){if(null==a.pageViewId)return!0;if(_n||!Bn)return!1;if(void 0===a.pageViewUrl)return!0;var e=qe||dn;if(!0===Bn||"full"==Bn||!("URL"in window))return a.pageViewUrl!=e;e=new URL(e);var n=new URL(a.pageViewUrl);return"pathname"==Bn?e.pathname!=n.pathname:"pathnameAndSearch"==Bn&&(e.pathname!=n.pathname||e.search!=n.search)}()&&(a.pageViewId=Se.v4(),a.pageViewUrl=qe||dn),a.pageViewId}function ee(){if("none"===Dn||Ln||!Fe)return null;var e=I("_sp_tab_id");return e||(A("_sp_tab_id",Se.v4()),e=I("_sp_tab_id")),e||null}function ne(e){var n=e.title,r=e.context,o=e.timestamp;if(e=e.contextCallback,s(),Rn&&Rn==$()&&K(),Rn=$(),yn=document.title,n=L((Ge=null!=n?n:Ge)||yn),cn.track(function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o}({pageUrl:f(qe||dn),pageTitle:n,referrer:f(Je||vn)}),(r||[]).concat(e?e():[]),o),o=new Date,n=!1,Vn.enabled&&!Vn.installed){n=Vn.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),i.hasSupport=e}}};i.update();var a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(i,"hasSupport")?U(document,a,p,{passive:!0}):U(document,a,p),y(),a=function(e,n){return void 0===n&&(n=p),function(e){return U(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(a(document)),["resize","focus","blur"].forEach(a(window)),a(window,m)("scroll")}if(Vn.enabled&&(wn||n))for(o in Ze=o.getTime(),o=void 0,Vn.configurations)(n=Vn.configurations[o])&&(window.clearInterval(n.activityInterval),te(n,r,e))}function te(e,n,t){var r=function(e,n){s(),e({context:n,pageViewId:$(),minXOffset:Ye,minYOffset:$e,maxXOffset:Ke,maxYOffset:en}),y()},o=function(){Ze+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(o,e.configHeartBeatTimer):window.setTimeout((function(){Ze+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength)}function re(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,E(n)&&E(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};Te.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function ie(e){var n=e.context,r=e.minXOffset,o=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==yn&&(yn=e,Ge=void 0);var u=(e=cn).track,c=f(qe||dn),s=L(Ge||yn),l=f(Je||vn);r=Math.round(r),i=Math.round(i),o=Math.round(o),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",c),d.add("page",s),d.add("refr",l),r&&!isNaN(Number(r))&&d.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),o&&!isNaN(Number(o))&&d.add("pp_miy",o.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),u.call(e,d,n)}function ae(e){var n=Vn.configurations[e];0===(null==n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null==n?void 0:n.activityInterval):window.clearInterval(null==n?void 0:n.activityInterval),Vn.configurations[e]=void 0}var ue,ce,se,le,fe,de,ve,ge,pe,me,he,ye,we,be,ke,xe,Ie,Ae,Ce,Pe,Ee,Le,De,je,Ne,Ue,_e,Be,Re;u.eventMethod=null!==(ue=u.eventMethod)&&void 0!==ue?ue:"post";var Ve=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Me=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==t&&t)},ze=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==t&&t)},He=null!==(se=null===(ce=null==u?void 0:u.contexts)||void 0===ce?void 0:ce.browser)&&void 0!==se&&se,Fe=null===(fe=null===(le=null==u?void 0:u.contexts)||void 0===le?void 0:le.webPage)||void 0===fe||fe;c.push({beforeTrack:function(e){var n=v("ses"),t=J(),r=0===t[10];if(an=!!Xe&&!!z(Xe),An||an)M();else{if("0"===t[0]?(rn=n||"none"==Dn?t[6]:Q(t),Nn=t[3]):(new Date).getTime()-jn>1e3*Pn&&(Nn++,rn=Q(t,{memorizedVisitCount:Nn})),X(t),0===t[10]){var o=e.build();t[8]=o.eid,o=o.dtm||o.ttm,t[9]=o?parseInt(o):void 0}t[10]+=1;var i=(o=Y()).documentSize;e.add("vp",o.viewport),e.add("ds",i),e.add("vid",On?Nn:Ln?null:Nn),e.add("sid",On?rn:Ln?null:rn),e.add("duid",Ln?null:t[1]),e.add("uid",Ln?null:on),s(),e.add("refr",f(Je||vn)),e.add("url",f(qe||dn)),o=Z(t,Dn,Ln),!Mn||Ln&&!On||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:o}),"none"!=Dn&&(b(t),e=w(),n&&!r||!e||!zn||Hn||(zn(o),Hn=!1)),jn=(new Date).getTime()}}}),Fe&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:$()}}]}}),He&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",data:oe(oe({},Y()),{tabId:ee()})}]}}),c.push.apply(c,null!==(de=u.plugins)&&void 0!==de?de:[]);var Je,qe,Ge,We,Qe,Xe,Ze,Ye,Ke,$e,en,nn,tn,rn,on,an,un,cn=S({base64:u.encodeBase64,corePlugins:c,callback:function(e){An||an||Un.enqueueRequest(e.build(),pn)}}),sn=document.characterSet||document.charset,ln=W(window.location.hostname,window.location.href,N()),fn=j(ln[0]),dn=ln[1],vn=ln[2],gn=null!==(ve=u.platform)&&void 0!==ve?ve:"web",pn=q(i),mn=null!==(ge=u.postPath)&&void 0!==ge?ge:"/com.snowplowanalytics.snowplow/tp2",hn=null!==(pe=u.appId)&&void 0!==pe?pe:"",yn=document.title,wn=null===(me=u.resetActivityTrackingOnPageView)||void 0===me||me,bn=null!==(he=u.cookieName)&&void 0!==he?he:"_sp_",Sn=null!==(ye=u.cookieDomain)&&void 0!==ye?ye:void 0,kn="/",Tn=null!==(we=u.cookieSameSite)&&void 0!==we?we:"None",xn=null===(be=u.cookieSecure)||void 0===be||be,In=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,An=void 0!==u.respectDoNotTrack&&(u.respectDoNotTrack&&("yes"===In||"1"===In)),Cn=null!==(ke=u.cookieLifetime)&&void 0!==ke?ke:63072e3,Pn=null!==(xe=u.sessionCookieTimeout)&&void 0!==xe?xe:1800,On=Me(u),En=ze(u),Ln=!!u.anonymousTracking,Dn=Ve(u),jn=(new Date).getTime(),Nn=1,Un=function(e,n,t,r,o,i,a,u,c,s,l,f,d,v,g,p,m,h,y,w){function b(e){var n=Object.keys(e).map((function(n){return[n,e[n]]})).reduce((function(e,n){return e[n[0]]=n[1].toString(),e}),{});return{evt:n,bytes:S(JSON.stringify(n))}}function S(e){for(var n=0,t=0;t<e.length;t++){var r=e.charCodeAt(t);127>=r?n+=1:2047>=r?n+=2:55296<=r&&57343>=r?(n+=4,t++):n=65535>r?n+3:n+4}return n}function k(e,n){var t=P(n,!0,!1),r=L([e.evt]);t.onreadystatechange=function(){4===t.readyState&&(C(t.status)?null==y||y(r):null==w||w({status:t.status,message:t.statusText,events:r,willRetry:!1}))},t.send(E(r))}function x(e){for(var n=0;n<e;n++)R.shift();t&&T(q,JSON.stringify(R.slice(0,s)))}function I(e,n,t){e.onreadystatechange=function(){if(4===e.readyState)if(clearTimeout(r),C(e.status))x(n),null==y||y(t),A();else{var o=e.status;(o=!(C(o)||!h||!g.includes(o)&&p.includes(o)))||(Te.error("Status ".concat(e.status,", will not retry.")),x(n)),null==w||w({status:e.status,message:e.statusText,events:t,willRetry:o}),B=!1}};var r=setTimeout((function(){e.abort(),h||x(n),null==w||w({status:0,message:"timeout",events:t,willRetry:h}),B=!1}),l)}function A(e){for(void 0===e&&(e=!1);R.length&&"string"!=typeof R[0]&&"object"!=typeof R[0];)R.shift();if(R.length){if(!O(j))throw"No collector configured";if(B=!0,m&&!V){var n=P(m,!1,e);V=!0,n.timeout=l,n.onreadystatechange=function(){4===n.readyState&&A()},n.send()}else if(H){var r=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},o=void 0,i=void 0,u=void 0;if(Q(R)?(i=P(o=j,!0,e),u=r(R)):(i=P(o=D(R[0]),!1,e),u=1),Q(R)){if(0<(e=R.slice(0,u)).length){r=!1;var c=e.map((function(e){return e.evt}));if(z){var d=new Blob([E(L(c))],{type:"application/json"});try{r=window.navigator.sendBeacon(o,d)}catch(e){r=!1}}!0===r?(x(u),null==y||y(e),A()):(I(i,u,o=L(c)),i.send(E(o)))}}else I(i,u,[o]),i.send()}else if(f||Q(R))B=!1;else{i=new Image(1,1);var v=!0;i.onload=function(){v&&(v=!1,R.shift(),t&&T(q,JSON.stringify(R.slice(0,s))),A())},i.onerror=function(){v&&(B=v=!1)},i.src=D(R[0]),setTimeout((function(){v&&B&&(v=!1,A())}),l)}}else B=!1}function C(e){return 200<=e&&300>e}function P(e,n,t){var r=new XMLHttpRequest;for(var o in n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=v,f&&r.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,o)&&r.setRequestHeader(o,d[o]);return r}function E(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function L(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function D(e){return c?j+e.replace("?","?stm="+(new Date).getTime()+"&"):j+e}void 0===h&&(h=!0);var j,N,U,_,B=!1,R=[],V=!1,M=!0===(r="string"==typeof r?r.toLowerCase():r)||"beacon"===r||"true"===r,z=!(!M||!window.navigator||"function"!=typeof window.navigator.sendBeacon||(N=window.navigator.userAgent,(_=(_=N).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&_.length&&parseInt(_[0])<=13||function(e,n,t){return!(!(t=t.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!t.length)&&(parseInt(t[0])<=e||parseInt(t[0])===e&&parseInt(t[1])<=n)}(10,15,N)&&(U=N).match("Version/.* Safari/")&&!U.match("Chrom(e|ium)")))&&M,H=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),F="get"!==r&&H&&("post"===r||M),J=F?o:"/i",q="snowplowOutQueue_".concat(e,"_").concat(F?"post2":"get");if(M&&(d={}),i=t&&G()&&F&&i||1,t)try{var W=window.localStorage.getItem(q);R=W?JSON.parse(W):[]}catch(N){}Array.isArray(R)||(R=[]),n.outQueues.push(R),H&&1<i&&n.bufferFlushers.push((function(e){B||A(e)}));var Q=function(e){return"object"==typeof e[0]&&"evt"in e[0]};return{enqueueRequest:function(e,n){if(j=n+J,F){if((e=b(e)).bytes>=a)return Te.warn("Event ("+e.bytes+"B) too big, max is "+a),void k(e,j);R.push(e)}else{var r,c="?",l={co:!0,cx:!0},f=!0;for(r in e)e.hasOwnProperty(r)&&!l.hasOwnProperty(r)&&(f?f=!1:c+="&",c+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(c+="&"+d+"="+encodeURIComponent(e[d]));if(0<u&&(l=S(l=D(c)))>=u)return Te.warn("Event ("+l+"B) too big, max is "+u),void(H&&(e=b(e),k(e,n+o)));R.push(c)}n=!1,t&&(n=T(q,JSON.stringify(R.slice(0,s)))),B||n&&!(R.length>=i)||A()},executeQueue:function(){B||A()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){j=e+J},setBufferSize:function(e){i=e}}}(e,a,"localStorage"==Dn||"cookieAndLocalStorage"==Dn,u.eventMethod,mn,null!==(Ie=u.bufferSize)&&void 0!==Ie?Ie:1,null!==(Ae=u.maxPostBytes)&&void 0!==Ae?Ae:4e4,null!==(Ce=u.maxGetBytes)&&void 0!==Ce?Ce:0,null===(Pe=u.useStm)||void 0===Pe||Pe,null!==(Ee=u.maxLocalStorageQueueSize)&&void 0!==Ee?Ee:1e3,null!==(Le=u.connectionTimeout)&&void 0!==Le?Le:5e3,En,null!==(De=u.customHeaders)&&void 0!==De?De:{},null===(je=u.withCredentials)||void 0===je||je,null!==(Ne=u.retryStatusCodes)&&void 0!==Ne?Ne:[],(null!==(Ue=u.dontRetryStatusCodes)&&void 0!==Ue?Ue:[]).concat([400,401,403,410,422]),u.idService,u.retryFailedRequests,u.onRequestSuccess,u.onRequestFailure),_n=!1,Bn=null!==(_e=u.preservePageViewIdForUrl)&&void 0!==_e&&_e,Rn=void 0,Vn={enabled:!1,installed:!1,configurations:{}},Mn=null!==(Re=null===(Be=u.contexts)||void 0===Be?void 0:Be.session)&&void 0!==Re&&Re,zn=u.onSessionUpdateCallback,Hn=!1,Fn="boolean"==typeof(un=u.useExtendedCrossDomainLinker||!1)?{useExtendedCrossDomainLinker:un}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:un},Jn=Fn.useExtendedCrossDomainLinker,qn=Fn.collectCrossDomainAttributes;u.hasOwnProperty("discoverRootDomain")&&u.discoverRootDomain&&(Sn=R(Tn,xn));var Gn=Y(),Wn=Gn.browserLanguage,Qn=Gn.resolution,Xn=Gn.colorDepth,Zn=Gn.cookiesEnabled;return cn.setTrackerVersion(o),cn.setTrackerNamespace(r),cn.setAppId(hn),cn.setPlatform(gn),cn.addPayloadPair("cookie",Zn?"1":"0"),cn.addPayloadPair("cs",sn),cn.addPayloadPair("lang",Wn),cn.addPayloadPair("res",Qn),cn.addPayloadPair("cd",Xn),g(),F(),u.crossDomainLinker&&l(u.crossDomainLinker),oe(oe({},{getDomainSessionIndex:function(){return Nn},getPageViewId:$,getTabId:ee,newSession:function(){var e=J();if("0"===e[0]?(rn="none"!=Dn?Q(e):e[6],Nn=e[3]):(Nn++,rn=Q(e,{memorizedVisitCount:Nn})),X(e),"none"!=Dn){var n=Z(e,Dn,Ln);b(e),w()&&zn&&(Hn=!0,zn(n))}jn=(new Date).getTime()},getCookieName:function(e){return bn+e+"."+nn},getUserId:function(){return on},getDomainUserId:function(){return J()[1]},getDomainUserInfo:function(){return J()},setReferrerUrl:function(e){Je=e},setCustomUrl:function(e){s();var n,t=dn;d(e)?qe=e:"/"===e.slice(0,1)?qe=d(t)+"://"+D(t)+e:(0<=(n=(t=f(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),qe=t+e)},setDocumentTitle:function(e){yn=document.title,Ge=e},discardHashTag:function(e){We=e},discardBrace:function(e){Qe=e},setCookiePath:function(e){kn=e,g()},setVisitorCookieTimeout:function(e){Cn=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){Vn.configurations.pagePing||(Vn.enabled=!0,Vn.configurations.pagePing=re(oe(oe({},e),{callback:ie})))},enableActivityTrackingCallback:function(e){Vn.configurations.callback||(Vn.enabled=!0,Vn.configurations.callback=re(e))},disableActivityTracking:function(){ae("pagePing")},disableActivityTrackingCallback:function(){ae("callback")},updatePageActivity:function(){p()},setOptOutCookie:function(e){Xe=e},setUserId:function(e){on=e},setUserIdFromLocation:function(e){s(),on=_(e,dn)},setUserIdFromReferrer:function(e){s(),on=_(e,vn)},setUserIdFromCookie:function(e){on=z(e)},setCollectorUrl:function(e){pn=q(e),Un.setCollectorUrl(pn)},setBufferSize:function(e){Un.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),Un.executeQueue(),e.newBufferSize&&Un.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),ne(e)},preservePageViewId:function(){_n=!0},preservePageViewIdForUrl:function(e){Bn=e},disableAnonymousTracking:function(e){u.anonymousTracking=!1,H(e),F(),Un.executeQueue()},enableAnonymousTracking:function(e){var n;u.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,H(e),On||K()},clearUserData:M}),{id:e,namespace:r,core:cn,sharedState:a})}(e,r,o,i,a,u);var s=oe(oe({},e),{addPlugin:function(e){var n,t;s.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,s)}});return c.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,s)})),s}function ne(e){return re(e,je)}function te(){return Object.keys(je)}function re(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):Te.warn(o+" not configured")}return t}var oe=function(){return oe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},oe.apply(this,arguments)},ie={},ae="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(ae){var ue=new Uint8Array(16);ie=function(){return ae(ue),ue}}else{var ce=Array(16);ie=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),ce[n]=e>>>((3&n)<<3)&255;return ce}}for(var se=[],le=0;256>le;++le)se[le]=(le+256).toString(16).substr(1);var fe,de,ve=function(e,n){return n=n||0,[se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],"-",se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]],se[e[n++]]].join("")},ge=ie,pe=0,me=0,he=ie,ye=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||he)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||ve(e)};ye.v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||fe,i=void 0!==e.clockseq?e.clockseq:de;if(null==o||null==i){var a=ge();null==o&&(o=fe=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=de=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:me+1,c=a-pe+(u-me)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>pe)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(pe=a,me=u,de=i,e=(1e4*(268435455&(a+=122192928e5))+u)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=a/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=i>>>8|128,r[t++]=255&i,i=0;6>i;++i)r[t+i]=o[i];return n||ve(r)};var we,be,Se=ye.v4=ye,ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(be=we||(we={}))[be.none=0]="none",be[be.error=1]="error",be[be.warn=2]="warn",be[be.debug=3]="debug",be[be.info=4]="info";var Te=function(e){return void 0===e&&(e=we.warn),{setLogLevel:function(n){e=we[n]?n:we.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=we.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o,!1)):console.warn.apply(console,n([i],o,!1)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=we.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o,!1)):console.error.apply(console,n([i],o,!1)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=we.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r,!1))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=we.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r,!1))}}}(),xe={},Ie={};!function(){var e={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var t=0;t<n.length;t++)n[t]=e.endian(n[t]);return n},randomBytes:function(e){for(var n=[];0<e;e--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(e){for(var n=[],t=0,r=0;t<e.length;t++,r+=8)n[r>>>5]|=e[t]<<24-r%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t<e.length;t++)n.push((e[t]>>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return n},bytesToBase64:function(e){for(var n=[],t=0;t<e.length;t+=3)for(var r=e[t]<<16|e[t+1]<<8|e[t+2],o=0;4>o;o++)8*t+6*o<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,r=0;t<e.length;r=++t%4)0!=r&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*r);return n}};Ie=e}();var Ae={utf8:{stringToBytes:function(e){return Ae.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Ae.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],t=0;t<e.length;t++)n.push(255&e.charCodeAt(t));return n},bytesToString:function(e){for(var n=[],t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return n.join("")}}},Ce=Ae;!function(){var e=Ie,n=Ce.utf8,t=Ce.bin,r=function(r,o){var i=e.wordsToBytes,a=r;a.constructor==String?a=n.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()),r=e.bytesToWords(a);var u=8*a.length;a=[];var c=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(r[u>>5]|=128<<24-u%32,r[15+(u+64>>>9<<4)]=u,u=0;u<r.length;u+=16){for(var v=c,g=s,p=l,m=f,h=d,y=0;80>y;y++){if(16>y)a[y]=r[u+y];else{var w=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=w<<1|w>>>31}w=(c<<5|c>>>27)+d+(a[y]>>>0)+(20>y?1518500249+(s&l|~s&f):40>y?1859775393+(s^l^f):60>y?(s&l|s&f|l&f)-1894007588:(s^l^f)-899497514),d=f,f=l,l=s<<30|s>>>2,s=c,c=w}c+=v,s+=g,l+=p,f+=m,d+=h}return i=i.call(e,[c,s,l,f,d]),o&&o.asBytes?i:o&&o.asString?t.bytesToString(i):e.bytesToHex(i)};r._blocksize=16,r._digestsize=20,xe=r}();var Pe,Oe=xe,Ee={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1},Le=!1,De="x",je={},Ne=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ne,e.addEventListener=U,e.addTracker=function(e,n,t,r,o,i){return je.hasOwnProperty(e)?null:(je[e]=ee(e,n,t,r,o,i),je[e])},e.allTrackerNames=te,e.allTrackers=function(){return je},e.attemptDeleteLocalStorage=x,e.attemptGetLocalStorage=k,e.attemptGetSessionStorage=I,e.attemptWriteLocalStorage=T,e.attemptWriteSessionStorage=A,e.cookie=z,e.createCrossDomainParameterValue=C,e.createSharedState=function(){function e(){var e;if(!n.hasLoaded)for(n.hasLoaded=!0,e=0;e<n.registeredOnLoadHandlers.length;e++)n.registeredOnLoadHandlers[e]();return!0}var n=new Ne,t=document,r=window;return t.visibilityState&&U(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),U(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function n(){t.removeEventListener("DOMContentLoaded",n,!1),e()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e())})),U(r,"load",e,!1)):e(),n},e.decorateQuerystring=B,e.deleteCookie=V,e.dispatchToTrackers=function(e,n){try{ne(null!=e?e:te()).forEach(n)}catch(e){Te.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{re(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){Te.error("Function failed",e)}},e.findRootDomain=R,e.fixupDomain=j,e.fixupTitle=L,e.fixupUrl=W,e.fromQuerystring=_,e.getCookiesWithPrefix=M,e.getCssClasses=H,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=Object.prototype.hasOwnProperty.call(e,"allowlist"),t=J(e);return F(e,(function(e){e:{var r=0;for(e=H(e);r<e.length;r++)if(t[e[r]]){r=!0;break e}r=!1}return r===n}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=e.hasOwnProperty("allowlist"),t=J(e);return F(e,(function(e){return e.name in t===n}))},e.getHostName=D,e.getReferrer=N,e.getTracker=function(e){return je.hasOwnProperty(e)?je[e]:(Te.warn(e+" not configured"),null)},e.getTrackers=ne,e.hasLocalStorage=q,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=E,e.isString=O,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=G,e.parseAndValidateFloat=function(e){return e=parseFloat(e),isNaN(e)?void 0:e},e.parseAndValidateInt=function(e){return e=parseInt(e),isNaN(e)?void 0:e},e.trackerExists=function(e){return je.hasOwnProperty(e)},e.urlSafeBase64Encode=P,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@snowplow/browser-tracker-core",
"version": "3.23.1",
"version": "3.24.0",
"description": "Core functionality for Snowplow Browser trackers",

@@ -21,3 +21,3 @@ "homepage": "http://bit.ly/sp-js",

"dependencies": {
"@snowplow/tracker-core": "3.23.1",
"@snowplow/tracker-core": "3.24.0",
"sha1": "^1.1.1",

@@ -24,0 +24,0 @@ "tslib": "^2.3.1",

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 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