@snowplow/browser-tracker-core
Advanced tools
Comparing version 3.0.0-beta.4 to 3.0.0-beta.5
@@ -30,3 +30,3 @@ /* | ||
*/ | ||
import { CorePlugin, CommonEventProperties, SelfDescribingJson, TrackerCore } from "@snowplow/tracker-core"; | ||
import { CorePlugin, CommonEventProperties, SelfDescribingJson, TrackerCore, CorePluginConfiguration } from "@snowplow/tracker-core"; | ||
declare global { | ||
@@ -272,12 +272,31 @@ interface Document { | ||
} | ||
/** | ||
* The configuration that can be changed when disabling anonymous tracking | ||
*/ | ||
interface DisableAnonymousTrackingConfiguration { | ||
/* Available configurations for different storage strategies */ | ||
stateStorageStrategy?: StateStorageStrategy; | ||
} | ||
/** | ||
* The configuration that can be changed when enabling anonymous tracking | ||
*/ | ||
interface EnableAnonymousTrackingConfiguration { | ||
/* Configuration for Anonymous Tracking */ | ||
options?: AnonymousTrackingOptions; | ||
} | ||
/** | ||
* The configuration that can be changed when flushing the buffer | ||
*/ | ||
interface FlushBufferConfiguration { | ||
/* The size of the buffer after this flush */ | ||
newBufferSize?: number; | ||
} | ||
/** | ||
* The configuration of the plugin to add | ||
*/ | ||
interface BrowserPluginConfiguration extends CorePluginConfiguration { | ||
/* The plugin to add */ | ||
plugin: BrowserPlugin; | ||
} | ||
/** | ||
* The Browser Tracker | ||
@@ -288,2 +307,4 @@ */ | ||
id: string; | ||
/** The tracker namespace */ | ||
namespace: string; | ||
/** The instance of the core library which this tracker has initialised */ | ||
@@ -479,3 +500,7 @@ core: TrackerCore; | ||
clearUserData: () => void; | ||
addPlugin: (plugin: BrowserPlugin) => void; | ||
/** | ||
* Add a plugin into the plugin collection after Tracker has already been initialised | ||
* @param configuration The plugin to add | ||
*/ | ||
addPlugin: (configuration: BrowserPluginConfiguration) => void; | ||
} | ||
@@ -747,3 +772,3 @@ /** | ||
name: string; | ||
}>(criterion: FilterCriterion<T>): (elt: T) => boolean; | ||
}>(criterion?: FilterCriterion<T>): (elt: T) => boolean; | ||
/** | ||
@@ -791,2 +816,2 @@ * List the classes of a DOM element without using elt.classList (for compatibility with IE 9) | ||
declare function fixupUrl(hostName: string, href: string, referrer: string): string[]; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; |
@@ -30,3 +30,3 @@ /* | ||
*/ | ||
import { CorePlugin, CommonEventProperties, SelfDescribingJson, TrackerCore } from "@snowplow/tracker-core"; | ||
import { CorePlugin, CommonEventProperties, SelfDescribingJson, TrackerCore, CorePluginConfiguration } from "@snowplow/tracker-core"; | ||
declare global { | ||
@@ -272,12 +272,31 @@ interface Document { | ||
} | ||
/** | ||
* The configuration that can be changed when disabling anonymous tracking | ||
*/ | ||
interface DisableAnonymousTrackingConfiguration { | ||
/* Available configurations for different storage strategies */ | ||
stateStorageStrategy?: StateStorageStrategy; | ||
} | ||
/** | ||
* The configuration that can be changed when enabling anonymous tracking | ||
*/ | ||
interface EnableAnonymousTrackingConfiguration { | ||
/* Configuration for Anonymous Tracking */ | ||
options?: AnonymousTrackingOptions; | ||
} | ||
/** | ||
* The configuration that can be changed when flushing the buffer | ||
*/ | ||
interface FlushBufferConfiguration { | ||
/* The size of the buffer after this flush */ | ||
newBufferSize?: number; | ||
} | ||
/** | ||
* The configuration of the plugin to add | ||
*/ | ||
interface BrowserPluginConfiguration extends CorePluginConfiguration { | ||
/* The plugin to add */ | ||
plugin: BrowserPlugin; | ||
} | ||
/** | ||
* The Browser Tracker | ||
@@ -288,2 +307,4 @@ */ | ||
id: string; | ||
/** The tracker namespace */ | ||
namespace: string; | ||
/** The instance of the core library which this tracker has initialised */ | ||
@@ -479,3 +500,7 @@ core: TrackerCore; | ||
clearUserData: () => void; | ||
addPlugin: (plugin: BrowserPlugin) => void; | ||
/** | ||
* Add a plugin into the plugin collection after Tracker has already been initialised | ||
* @param configuration The plugin to add | ||
*/ | ||
addPlugin: (configuration: BrowserPluginConfiguration) => void; | ||
} | ||
@@ -747,3 +772,3 @@ /** | ||
name: string; | ||
}>(criterion: FilterCriterion<T>): (elt: T) => boolean; | ||
}>(criterion?: FilterCriterion<T>): (elt: T) => boolean; | ||
/** | ||
@@ -791,2 +816,2 @@ * List the classes of a DOM element without using elt.classList (for compatibility with IE 9) | ||
declare function fixupUrl(hostName: string, href: string, referrer: string): string[]; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; |
@@ -30,3 +30,3 @@ /* | ||
*/ | ||
import { CorePlugin, CommonEventProperties, SelfDescribingJson, TrackerCore } from "@snowplow/tracker-core"; | ||
import { CorePlugin, CommonEventProperties, SelfDescribingJson, TrackerCore, CorePluginConfiguration } from "@snowplow/tracker-core"; | ||
declare global { | ||
@@ -272,12 +272,31 @@ interface Document { | ||
} | ||
/** | ||
* The configuration that can be changed when disabling anonymous tracking | ||
*/ | ||
interface DisableAnonymousTrackingConfiguration { | ||
/* Available configurations for different storage strategies */ | ||
stateStorageStrategy?: StateStorageStrategy; | ||
} | ||
/** | ||
* The configuration that can be changed when enabling anonymous tracking | ||
*/ | ||
interface EnableAnonymousTrackingConfiguration { | ||
/* Configuration for Anonymous Tracking */ | ||
options?: AnonymousTrackingOptions; | ||
} | ||
/** | ||
* The configuration that can be changed when flushing the buffer | ||
*/ | ||
interface FlushBufferConfiguration { | ||
/* The size of the buffer after this flush */ | ||
newBufferSize?: number; | ||
} | ||
/** | ||
* The configuration of the plugin to add | ||
*/ | ||
interface BrowserPluginConfiguration extends CorePluginConfiguration { | ||
/* The plugin to add */ | ||
plugin: BrowserPlugin; | ||
} | ||
/** | ||
* The Browser Tracker | ||
@@ -288,2 +307,4 @@ */ | ||
id: string; | ||
/** The tracker namespace */ | ||
namespace: string; | ||
/** The instance of the core library which this tracker has initialised */ | ||
@@ -479,3 +500,7 @@ core: TrackerCore; | ||
clearUserData: () => void; | ||
addPlugin: (plugin: BrowserPlugin) => void; | ||
/** | ||
* Add a plugin into the plugin collection after Tracker has already been initialised | ||
* @param configuration The plugin to add | ||
*/ | ||
addPlugin: (configuration: BrowserPluginConfiguration) => void; | ||
} | ||
@@ -747,3 +772,3 @@ /** | ||
name: string; | ||
}>(criterion: FilterCriterion<T>): (elt: T) => boolean; | ||
}>(criterion?: FilterCriterion<T>): (elt: T) => boolean; | ||
/** | ||
@@ -791,2 +816,2 @@ * List the classes of a DOM element without using elt.classList (for compatibility with IE 9) | ||
declare function fixupUrl(hostName: string, href: string, referrer: string): string[]; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; | ||
export { dispatchToTrackers, dispatchToTrackersInCollection, trackerExists, addTracker, getTracker, getTrackers, allTrackers, allTrackerNames, AnonymousTrackingOptions, StateStorageStrategy, Platform, CookieSameSite, EventMethod, TrackerConfiguration, ActivityCallbackData, ActivityCallback, ActivityTrackingConfiguration, ActivityTrackingConfigurationCallback, PageViewEvent, DisableAnonymousTrackingConfiguration, EnableAnonymousTrackingConfiguration, FlushBufferConfiguration, BrowserPluginConfiguration, BrowserTracker, FilterCriterion, isString, isInteger, isFunction, fixupTitle, getHostName, fixupDomain, getReferrer, addEventListener, fromQuerystring, decorateQuerystring, attemptGetLocalStorage, attemptWriteLocalStorage, attemptDeleteLocalStorage, attemptGetSessionStorage, attemptWriteSessionStorage, findRootDomain, isValueInArray, deleteCookie, getCookiesWithPrefix, cookie, parseAndValidateInt, parseAndValidateFloat, getFilterByClass, getFilterByName, getCssClasses, hasSessionStorage, hasLocalStorage, localStorageAccessible, detectViewport, detectDocumentSize, fixupUrl, BrowserPlugin, SharedState, createSharedState }; |
/*! | ||
* Core functionality for Snowplow Browser trackers v3.0.0-beta.4 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow Browser trackers v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Copyright 2021 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){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e}function t(e){var n={exports:{}};return e(n,n.exports),n.exports}function r(e){if(!e)return e;var n=0,t=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(n++),i=e.charCodeAt(n++),a=e.charCodeAt(n++),u=o<<16|i<<8|a;o=u>>18&63,i=u>>12&63,a=u>>6&63,u&=63,r[t++]=de.charAt(o)+de.charAt(i)+de.charAt(a)+de.charAt(u)}while(n<e.length);n=r.join(""),e=((e=e.length%3)?n.slice(0,e-3):n)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function o(){var e,n={},t=[],r=[],o=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:o,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o(n,e[n])},addJson:function(e,n,o){o&&i(o)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:o},r.push(e),t.push(e))},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r),n}}}function i(e){if(!a(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function a(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function u(){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):g(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)})):g(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=S(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=b(e).map((function(e){e:{if(v(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=S(e[1],n,t,r);break e}}else if(h(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return y(e,n)}))&&r++:"string"==typeof o&&y(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return y(e,n)}))&&t++:"string"==typeof o&&y(o,n)&&t++,0<r&&0===t}(e[0],r)){e=S(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 c(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 s(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))&&c(e[1]))return e.slice(1,6)}function l(e){if(e=s(e)){var n=e[0];return 5===e.length&&c(n)}return!1}function f(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return l(e)})):"string"==typeof e&&l(e)}function d(e){return!!(i(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function p(e){return"function"==typeof e&&1>=e.length}function g(e){return p(e)||d(e)}function v(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?p(e[0])&&e[1].every(g):p(e[0])&&g(e[1]))}function h(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(!f(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!f(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(g):g(e[1])))}function m(e){return v(e)||h(e)}function y(e,n){if(!l(e))return!1;if(e=s(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(!w(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!w(e[t],n[t]))return!1;return!0}return!1}function w(e,n){return e&&n&&"*"===e||e===n}function b(e){return Array.isArray(e)?e:[e]}function S(e,n,t,r){var o;return e=b(e).map((function(e){e:if(d(e))e=[e];else{if(p(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(d)||d(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(d(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 k(e){void 0===e&&(e={});var n=e.base64,t=e.corePlugins,o=null!=t?t:[];e=function(e,n,t){function o(e,n){e=c.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}var i=function(e){return{addPluginContexts:function(n){var t=null!=n?n:[];return e.forEach((function(e){try{e.contexts&&t.push.apply(t,e.contexts())}catch(e){pe.error("Error adding plugin contexts",e)}})),t}}}(n),c=u(),s=e,l={};return{track:function(e,a,u){e.withJsonProcessor(function(e){return function(n,t){for(var o=0;o<t.length;o++){var i=t[o],a=JSON.stringify(i.json);e?n.add(i.keyIfEncoded,r(a)):n.add(i.keyIfNotEncoded,a)}t.length=0}}(s)),e.add("eid",fe.v4()),e.addDict(l),u=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()}}(u),e.add(u.type,u.value.toString()),void 0!==(a=(a=o(e,i.addPluginContexts(a)))&&a.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:a}:void 0)&&e.addJson("cx","co",a),n.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){pe.error("Plugin beforeTrack",e)}})),"function"==typeof t&&t(e);var c=e.build();return n.forEach((function(e){try{e.afterTrack&&e.afterTrack(c)}catch(e){pe.error("Plugin afterTrack",e)}})),c},addPayloadPair:function(e,n){l[e]=n},getBase64Encoding:function(){return s},setBase64Encoding:function(e){s=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(l[n]=e[n])},resetPayloadPairs:function(e){l=a(e)?e:{}},setTrackerVersion:function(e){l.tv=e},setTrackerNamespace:function(e){l.tna=e},setAppId:function(e){l.aid=e},setPlatform:function(e){l.p=e},setUserId:function(e){l.uid=e},setScreenResolution:function(e,n){l.res=e+"x"+n},setViewport:function(e,n){l.vp=e+"x"+n},setColorDepth:function(e){l.cd=e},setTimezone:function(e){l.tz=e},setLang:function(e){l.lang=e},setIpAddress:function(e){l.ip=e},setUseragent:function(e){l.ua=e},addGlobalContexts:function(e){c.addGlobalContexts(e)},clearGlobalContexts:function(){c.clearGlobalContexts()},removeGlobalContexts:function(e){c.removeGlobalContexts(e)}}}(null==n||n,o,e.callback);var i=ee(ee({},e),{addPlugin:function(e){var n;o.push(e),null===(n=e.activateCorePlugin)||void 0===n||n.call(e,i)}});return null==o||o.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,pe),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)})),i}function T(e){var n=e.pageUrl,t=e.pageTitle;e=e.referrer;var r=o();return r.add("e","pv"),r.add("url",n),r.add("page",t),r.add("refr",e),r}function x(e){var n=e.pageUrl,t=e.pageTitle,r=e.referrer,i=e.minXOffset,a=e.maxXOffset,u=e.minYOffset;e=e.maxYOffset;var c=o();return c.add("e","pp"),c.add("url",n),c.add("page",t),c.add("refr",r),i&&!isNaN(Number(i))&&c.add("pp_mix",i.toString()),a&&!isNaN(Number(a))&&c.add("pp_max",a.toString()),u&&!isNaN(Number(u))&&c.add("pp_miy",u.toString()),e&&!isNaN(Number(e))&&c.add("pp_may",e.toString()),c}function A(){try{return!!window.localStorage}catch(e){return!0}}function O(){if(!A())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function P(){if("innerWidth"in window)var e=window.innerWidth,n=window.innerHeight;else e=(n=document.documentElement||document.body).clientWidth,n=n.clientHeight;return 0<=e&&0<=n?e+"x"+n:null}function I(){var e=document.documentElement,n=document.body,t=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,n?Math.max(n.offsetHeight,n.scrollHeight):0),isNaN(t)||isNaN(e)?"":t+"x"+e}function C(e){return!(!e||"string"!=typeof e.valueOf())}function D(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function N(e){if(!C(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function E(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function L(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function j(e){var n=window,t="",r=M("referrer",n.location.href)||M("referer",n.location.href);if(r)return r;if(e)return e;try{t=n.top.document.referrer}catch(e){if(n.parent)try{t=n.parent.document.referrer}catch(e){t=""}}return""===t&&(t=document.referrer),t}function B(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 M(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function U(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 _(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 V(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem(e+".expires",o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function R(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function z(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-1;0<=a;){var u=i.slice(a,i.length).join(".");if(F(r,o,0,"/",u,e,n),F(r)===o){for(H(r,u,e,n),t=J("_sp_root_domain_test_"),r=0;r<t.length;r++)H(t[r],u,e,n);return u}--a}return t}function H(e,n,t,r){F(e,"",-1,"/",n,t,r)}function J(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 F(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 G(e){return e.className.match(/\S+/g)||[]}function W(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function X(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(e,n,t,r,o,i,a,u,c,s,l){function f(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 d(e){for(void 0===e&&(e=!1);w.length&&"string"!=typeof w[0]&&"object"!=typeof w[0];)w.shift();if(1>w.length)y=!1;else{if(!C(m))throw"No collector configured";if(y=!0,x){var n=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},r=void 0;if(N(w))var o=p(r=m,!0,e),i=n(w);else r=h(w[0]),o=p(r,!1,e),i=1;var u=setTimeout((function(){o.abort(),y=!1}),s),f=function(e){for(var n=0;n<e;n++)w.shift();t&&V(I,JSON.stringify(w.slice(0,c))),d()};if(o.onreadystatechange=function(){4===o.readyState&&200<=o.status&&400>o.status?(clearTimeout(u),f(i)):4===o.readyState&&400<=o.status&&(clearTimeout(u),y=!1)},N(w)){if(0<(n=w.slice(0,i)).length){if(e=!1,n=n.map((function(e){return e.evt})),T){var b=new Blob([g(v(n))],{type:"application/json"});try{e=navigator.sendBeacon(r,b)}catch(n){e=!1}}!0===e?f(i):o.send(g(v(n)))}}else o.send()}else if(l||N(w))y=!1;else{r=new Image(1,1);var S=!0;r.onload=function(){S&&(S=!1,w.shift(),t&&V(I,JSON.stringify(w.slice(0,c))),d())},r.onerror=function(){S&&(y=S=!1)},r.src=h(w[0]),setTimeout((function(){S&&y&&(S=!1,d())}),s)}}}function p(e,n,t){var r=new XMLHttpRequest;return n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=!0,l&&r.setRequestHeader("SP-Anonymous","*"),r}function g(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function v(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function h(e){return u?m+e.replace("?","?stm="+(new Date).getTime()+"&"):m+e}var m,y=!1,w=[];r="string"==typeof r?r.toLowerCase():r;var b=window.localStorage,S=window.navigator,k=null===r||!0===r||"beacon"===r||"true"===r,T=!(!(k&&S&&S.sendBeacon)||function(e){return function(e,n){return!(!(n=n.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))||!n.length)&&parseInt(n[0])<=13}(0,e)||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,e)&&function(e){return e.match("Version/.* Safari/")&&!e.match("Chrom(e|ium)")}(e)}(S.userAgent))&&k,x=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),A="get"!==r&&x&&("post"===r||k),P=A?o:"/i",I="snowplowOutQueue_"+e+"_"+(A?"post2":"get");if(i=O()&&t&&A&&i||1,t)try{var D=b.getItem(I);w=D?JSON.parse(D):[]}catch(e){}Array.isArray(w)||(w=[]),n.outQueues.push(w),x&&1<i&&n.bufferFlushers.push((function(e){y||d(e)}));var N=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,n){if(m=n+P,A){if((e=function(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:f(JSON.stringify(n))}}(e)).bytes>=a)return pe.warn("Event ("+e.bytes+"B) too big, max is "+a),void p(m,!0,!1).send(g(v([e.evt])));w.push(e)}else w.push(function(e){var n,t="?",r={co:!0,cx:!0},o=!0;for(n in e)e.hasOwnProperty(n)&&!r.hasOwnProperty(n)&&(o?o=!1:t+="&",t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));for(var i in r)e.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(t+="&"+i+"="+encodeURIComponent(e[i]));return t}(e));e=!1,t&&(e=V(I,JSON.stringify(w.slice(0,c)))),y||e&&!(w.length>=i)||d()},executeQueue:function(){y||d()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){l=e},setCollectorUrl:function(e){m=e+P},setBufferSize:function(e){i=e}}}function Q(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=E(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?M("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=E(n=document.links[0].href)),[e,n,t]}function Y(e,n,t,r,o,i){var a;void 0===i&&(i={}),e=function(e,n,t,r,o,i){function a(){(Re=Q(window.location.hostname,window.location.href,j()))[1]!==He&&(Je=j(He)),ze=L(Re[0]),He=Re[1]}function u(e){var n=(new Date).getTime();null!=(e=e.target)&&e.href&&(e.href=U(e.href,"_sp",je+"."+n))}function c(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(B(t,"click",u,!0),B(t,"mousedown",u,!0),t.spDecorationEnabled=!0)}}function s(e){if(Ae){var n=/#.*/;e=e.replace(n,"")}return Oe&&(n=/[{}]/g,e=e.replace(n,"")),e}function l(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function f(e){return e=Ye+e+"."+Le,"localStorage"==sn?_(e):"cookie"==sn||"cookieAndLocalStorage"==sn?F(e):void 0}function d(){a(),Le=me((Ze||ze)+(Ke||"/")).slice(0,4)}function p(){Ie=(new Date).getTime()}function g(){var e=v(),n=e[0];n<Ce?Ce=n:n>De&&(De=n),(e=e[1])<Ne?Ne=e:e>Ee&&(Ee=e),p()}function v(){var e=document.compatMode&&"BackCompat"!==document.compatMode?document.documentElement:document.body;return[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]}function h(){var e=v(),n=e[0];De=Ce=n,Ee=Ne=e=e[1]}function m(){w(Ye+"ses."+Le,"*",on)}function y(e,n,t,r,o,i){w(Ye+"id."+Le,e+"."+n+"."+t+"."+r+"."+o+"."+i,rn)}function w(e,n,t){cn&&!an||("localStorage"==sn?V(e,n,t):("cookie"==sn||"cookieAndLocalStorage"==sn)&&F(e,n,t,Ke,Ze,$e,en))}function b(){var e=Ye+"id."+Le,n=Ye+"ses."+Le;R(e),R(n),H(e,Ze,$e,en),H(n,Ze,$e,en)}function S(){if(!cn||an){var e="none"!=sn&&!!f("ses"),n=A();n[1]?je=n[1]:(je=cn?"":fe.v4(),n[1]=je),Be=n[6],e||(n[3]++,Be=fe.v4(),n[6]=Be,n[5]=n[4]),"none"!=sn&&(m(),n[4]=Math.round((new Date).getTime()/1e3),n.shift(),y.apply(null,n))}}function A(){if("none"==sn)return[];var e=Math.round((new Date).getTime()/1e3),n=f("id");return n?(e=n.split(".")).unshift("0"):e=["1",je,e,0,e,""],e[6]||(e[6]=fe.v4()),e}function O(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function C(){pn&&null!=o.pageViewId||(o.pageViewId=fe.v4())}function J(){return null==o.pageViewId&&(o.pageViewId=fe.v4()),o.pageViewId}function G(e,n,t){var r=function(e,n){a(),e({context:n,pageViewId:J(),minXOffset:Ce,minYOffset:Ne,maxXOffset:De,maxYOffset:Ee}),h()},o=function(){Ie+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0!=e.configMinimumVisitLength?window.setTimeout((function(){Ie+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):window.setInterval(o,e.configHeartBeatTimer)}function W(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,D(n)&&D(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};pe.warn("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function X(e){var n=e.context,t=e.minXOffset,r=e.minYOffset,o=e.maxXOffset;e=e.maxYOffset;var i=document.title;i!==qe&&(qe=i,xe=void 0),Ue.track(x({pageUrl:s(Te||He),pageTitle:N(xe||qe),referrer:s(ke||Je),minXOffset:Math.round(t),maxXOffset:Math.round(o),minYOffset:Math.round(r),maxYOffset:Math.round(e)}),n)}var Y,Z,K,$,ne,te,re,oe,ie,ae,ue,ce,se,le,de,ge,ve,he,ye;i.eventMethod=null!==(Y=i.eventMethod)&&void 0!==Y?Y:"post";var we=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},be=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)},Se=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)};i.plugins=null!==(Z=i.plugins)&&void 0!==Z?Z:[],(null===($=null===(K=null==i?void 0:i.contexts)||void 0===K?void 0:K.webPage)||void 0===$||$)&&i.plugins.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:J()}}]}});var ke,Te,xe,Ae,Oe,Pe,Ie,Ce,De,Ne,Ee,Le,je,Be,Me,Ue=k({base64:i.encodeBase64,corePlugins:i.plugins,callback:function(e){var n=Math.round((new Date).getTime()/1e3),t=f("ses"),r=A(),o=r[0],i=r[1],u=r[2],c=r[3],l=r[4],d=r[5];r=r[6];var p=!!Pe&&!!F(Pe);tn||p?b():("0"===o?(Be=r,t||"none"==sn||(c++,d=l,Be=fe.v4()),fn=c):(new Date).getTime()-ln>1e3*on&&(Be=fe.v4(),fn++),e.add("vp",P()),e.add("ds",I()),e.add("vid",an?fn:cn?null:fn),e.add("sid",an?Be:cn?null:Be),e.add("duid",cn?null:i),e.add("uid",cn?null:Me),a(),e.add("refr",s(ke||Je)),e.add("url",s(Te||He)),"none"!=sn&&(y(i,u,fn,n,d,Be),m()),ln=(new Date).getTime()),n=!!Pe&&!!F(Pe),tn||n||dn.enqueueRequest(e.build(),Ge)}}),_e=navigator.userLanguage||navigator.language,Ve=document.characterSet||document.charset,Re=Q(window.location.hostname,window.location.href,j()),ze=L(Re[0]),He=Re[1],Je=Re[2],Fe=null!==(ne=i.platform)&&void 0!==ne?ne:"web",Ge=O(r),We=null!==(te=i.postPath)&&void 0!==te?te:"/com.snowplowanalytics.snowplow/tp2",Xe=null!==(re=i.appId)&&void 0!==re?re:"",qe=document.title,Qe=null===(oe=i.resetActivityTrackingOnPageView)||void 0===oe||oe,Ye=null!==(ie=i.cookieName)&&void 0!==ie?ie:"_sp_",Ze=null!==(ae=i.cookieDomain)&&void 0!==ae?ae:void 0,Ke="/",$e=null!==(ue=i.cookieSameSite)&&void 0!==ue?ue:"None",en=null===(ce=i.cookieSecure)||void 0===ce||ce,nn=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,tn=void 0!==i.respectDoNotTrack&&(i.respectDoNotTrack&&("yes"===nn||"1"===nn)),rn=null!==(se=i.cookieLifetime)&&void 0!==se?se:63072e3,on=null!==(le=i.sessionCookieTimeout)&&void 0!==le?le:1800,an=be(i),un=Se(i),cn=!!i.anonymousTracking,sn=we(i),ln=(new Date).getTime(),fn=1,dn=q(e,o,"localStorage"==sn||"cookieAndLocalStorage"==sn,i.eventMethod,We,null!==(de=i.bufferSize)&&void 0!==de?de:1,null!==(ge=i.maxPostBytes)&&void 0!==ge?ge:4e4,null===(ve=i.useStm)||void 0===ve||ve,null!==(he=i.maxLocalStorageQueueSize)&&void 0!==he?he:1e3,null!==(ye=i.connectionTimeout)&&void 0!==ye?ye:5e3,un),pn=!1,gn=!1,vn={enabled:!1,installed:!1,configurations:{}};return i.hasOwnProperty("discoverRootDomain")&&i.discoverRootDomain&&(Ze=z($e,en)),Ue.setTrackerVersion(t),Ue.setTrackerNamespace(n),Ue.setAppId(Xe),Ue.setPlatform(Fe),Ue.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0"),Ue.addPayloadPair("cs",Ve),Ue.addPayloadPair("lang",_e),Ue.addPayloadPair("res",screen.width+"x"+screen.height),Ue.addPayloadPair("cd",screen.colorDepth),d(),S(),i.crossDomainLinker&&c(i.crossDomainLinker),ee(ee({},{getDomainSessionIndex:function(){return fn},getPageViewId:function(){return J()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),n=A(),t=n[1],r=n[2],o=n[3],i=n[4],a=n[5],u=n[6];"0"===n[0]?(Be=u,"none"!=sn&&(o++,a=i,Be=fe.v4()),fn=o,m()):(Be=fe.v4(),fn++),"none"!=sn&&(y(t,r,fn,e,a,Be),m()),ln=(new Date).getTime()},getCookieName:function(e){return Ye+e+"."+Le},getUserId:function(){return Me},getDomainUserId:function(){return A()[1]},getDomainUserInfo:function(){return A()},setReferrerUrl:function(e){ke=e},setCustomUrl:function(e){a();var n,t=He;l(e)?Te=e:"/"===e.slice(0,1)?Te=l(t)+"://"+E(t)+e:(0<=(n=(t=s(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Te=t+e)},setDocumentTitle:function(e){qe=document.title,xe=e},discardHashTag:function(e){Ae=e},discardBrace:function(e){Oe=e},setCookiePath:function(e){Ke=e,d()},setVisitorCookieTimeout:function(e){rn=e},crossDomainLinker:function(e){c(e)},enableActivityTracking:function(e){vn.enabled=!0,vn.configurations.pagePing=W(ee(ee({},e),{callback:X}))},enableActivityTrackingCallback:function(e){vn.enabled=!0,vn.configurations.callback=W(e)},updatePageActivity:function(){p()},setOptOutCookie:function(e){Pe=e},setUserId:function(e){Me=e},setUserIdFromLocation:function(e){a(),Me=M(e,He)},setUserIdFromReferrer:function(e){a(),Me=M(e,Je)},setUserIdFromCookie:function(e){Me=F(e)},setCollectorUrl:function(e){Ge=O(e),dn.setCollectorUrl(Ge)},setBufferSize:function(e){dn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),dn.executeQueue(),e.newBufferSize&&dn.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var n=e.title,t=e.context,r=e.timestamp;if(e=e.contextCallback,a(),gn&&C(),gn=!0,qe=document.title,n=N((xe=n)||qe),Ue.track(T({pageUrl:s(Te||He),pageTitle:n,referrer:s(ke||Je)}),(t||[]).concat(e?e():[]),r),r=new Date,n=!1,vn.enabled&&!vn.installed){n=vn.installed=!0;var o={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),o.hasSupport=e}}};o.update();var i="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(o,"hasSupport")?B(document,i,p,{passive:!0}):B(document,i,p),h(),i=function(e,n){return void 0===n&&(n=p),function(e){return B(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(i(document)),["resize","focus","blur"].forEach(i(window)),i(window,g)("scroll")}if(vn.enabled&&(Qe||n))for(r in Ie=r.getTime(),r=void 0,vn.configurations)(n=vn.configurations[r])&&(window.clearInterval(n.activityInterval),G(n,t,e))}(e)},preservePageViewId:function(){pn=!0},disableAnonymousTracking:function(e){e&&e.stateStorageStrategy?(i.stateStorageStrategy=e.stateStorageStrategy,i.anonymousTracking=!1,sn=we(i)):i.anonymousTracking=!1,cn=!!i.anonymousTracking,an=be(i),un=Se(i),dn.setUseLocalStorage("localStorage"==sn||"cookieAndLocalStorage"==sn),dn.setAnonymousTracking(un),S(),dn.executeQueue()},enableAnonymousTracking:function(e){i.anonymousTracking=e&&(null==e?void 0:e.options)||!0,cn=!!i.anonymousTracking,an=be(i),un=Se(i),an||C(),dn.setAnonymousTracking(un)},clearUserData:b}),{id:e,core:Ue,sharedState:o})}(e,n,t,r,o,i);var u=ee(ee({},e),{addPlugin:function(e){var n,t;null===(n=i.plugins)||void 0===n||n.push(e),null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,u)}});return null===(a=i.plugins)||void 0===a||a.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)})),u}function Z(e){return $(e,ye)}function K(){return Object.keys(ye)}function $(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):pe.warn(o+" not configured")}return t}for(var ee=function(){return(ee=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}).apply(this,arguments)},ne=t((function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=Array(16);e.exports=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}})),te=[],re=0;256>re;++re)te[re]=(re+256).toString(16).substr(1);var oe,ie,ae=function(e,n){return n=n||0,[te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]]].join("")},ue=0,ce=0;(re=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||ne)())[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||ae(e)}).v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||oe,i=void 0!==e.clockseq?e.clockseq:ie;if(null==o||null==i){var a=ne();null==o&&(o=oe=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=ie=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:ce+1,c=a-ue+(u-ce)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>ue)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(ue=a,ce=u,ie=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||ae(r)};var se,le,fe=re.v4=re,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(le=se||(se={}))[le.none=0]="none",le[le.error=1]="error",le[le.warn=2]="warn",le[le.debug=3]="debug",le[le.info=4]="info";var pe=function(e){return void 0===e&&(e=se.warn),{setLogLevel:function(n){e=se[n]?n:se.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.warn&&"undefined"!=typeof console&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o)):console.warn.apply(console,n([i],o)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o)):console.error.apply(console,n([i],o)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=se.debug&&"undefined"!=typeof console&&"undefined"!=typeof console&&console.warn.apply(console,n(["Snowplow: "+t],r))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=se.info&&"undefined"!=typeof console&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r))}}}(),ge=t((function(e){var n;n={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},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}},e.exports=n})),ve={utf8:{stringToBytes:function(e){return ve.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ve.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("")}}},he=ve,me=t((function(e){var n,t,r,o;n=he.utf8,t=he.bin,r=function(e){e.constructor==String?e=n.stringToBytes(e):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());var t=ge.bytesToWords(e),r=8*e.length;e=[];var o=1732584193,i=-271733879,a=-1732584194,u=271733878,c=-1009589776;for(t[r>>5]|=128<<24-r%32,t[15+(r+64>>>9<<4)]=r,r=0;r<t.length;r+=16){for(var s=o,l=i,f=a,d=u,p=c,g=0;80>g;g++){if(16>g)e[g]=t[r+g];else{var v=e[g-3]^e[g-8]^e[g-14]^e[g-16];e[g]=v<<1|v>>>31}v=(o<<5|o>>>27)+c+(e[g]>>>0)+(20>g?1518500249+(i&a|~i&u):40>g?1859775393+(i^a^u):60>g?(i&a|i&u|a&u)-1894007588:(i^a^u)-899497514),c=u,u=a,a=i<<30|i>>>2,i=o,o=v}o+=s,i+=l,a+=f,u+=d,c+=p}return[o,i,a,u,c]},(o=function(e,n){return e=ge.wordsToBytes(r(e)),n&&n.asBytes?e:n&&n.asString?t.bytesToString(e):ge.bytesToHex(e)})._blocksize=16,o._digestsize=20,e.exports=o})),ye={},we=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=we,e.addEventListener=B,e.addTracker=function(e,n,t,r,o,i){return ye.hasOwnProperty(e)?null:(ye[e]=Y(e,n,t,r,o,i),ye[e])},e.allTrackerNames=K,e.allTrackers=function(){return ye},e.attemptDeleteLocalStorage=R,e.attemptGetLocalStorage=_,e.attemptGetSessionStorage=function(e){try{return window.sessionStorage.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=V,e.attemptWriteSessionStorage=function(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}},e.cookie=F,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 we,t=document,r=window;return t.visibilityState&&B(t,"visibilitychange",(function(){"hidden"==document.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),B(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),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())})),B(r,"load",e,!1),n},e.decorateQuerystring=U,e.deleteCookie=H,e.detectDocumentSize=I,e.detectViewport=P,e.dispatchToTrackers=function(e,n){try{Z(null!=e?e:K()).forEach(n)}catch(e){pe.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{$(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){pe.error("Function failed",e)}},e.findRootDomain=z,e.fixupDomain=L,e.fixupTitle=N,e.fixupUrl=Q,e.fromQuerystring=M,e.getCookiesWithPrefix=J,e.getCssClasses=G,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=X(e);return W(e,(function(e){e:{var r=0;for(e=G(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=X(e);return W(e,(function(e){return e.name in t===n}))},e.getHostName=E,e.getReferrer=j,e.getTracker=function(e){return ye.hasOwnProperty(e)?ye[e]:(pe.warn(e+" not configured"),null)},e.getTrackers=Z,e.hasLocalStorage=A,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=D,e.isString=C,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=O,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 ye.hasOwnProperty(e)},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){for(var t=0,r=n.length,o=e.length;t<r;t++,o++)e[o]=n[t];return e}function t(e){var n={exports:{}};return e(n,n.exports),n.exports}function r(e){if(!e)return e;var n=0,t=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(n++),i=e.charCodeAt(n++),a=e.charCodeAt(n++),u=o<<16|i<<8|a;o=u>>18&63,i=u>>12&63,a=u>>6&63,u&=63,r[t++]=de.charAt(o)+de.charAt(i)+de.charAt(a)+de.charAt(u)}while(n<e.length);n=r.join(""),e=((e=e.length%3)?n.slice(0,e-3):n)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function o(){var e,n={},t=[],r=[],o=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:o,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o(n,e[n])},addJson:function(e,n,o){o&&i(o)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:o},r.push(e),t.push(e))},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r),n}}}function i(e){if(!a(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function a(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function u(){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):p(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)})):p(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=S(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=b(e).map((function(e){e:{if(v(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=S(e[1],n,t,r);break e}}else if(h(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return y(e,n)}))&&r++:"string"==typeof o&&y(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return y(e,n)}))&&t++:"string"==typeof o&&y(o,n)&&t++,0<r&&0===t}(e[0],r)){e=S(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 c(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 s(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))&&c(e[1]))return e.slice(1,6)}function l(e){if(e=s(e)){var n=e[0];return 5===e.length&&c(n)}return!1}function f(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return l(e)})):"string"==typeof e&&l(e)}function d(e){return!!(i(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function g(e){return"function"==typeof e&&1>=e.length}function p(e){return g(e)||d(e)}function v(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?g(e[0])&&e[1].every(p):g(e[0])&&p(e[1]))}function h(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(!f(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!f(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(p):p(e[1])))}function m(e){return v(e)||h(e)}function y(e,n){if(!l(e))return!1;if(e=s(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(!w(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!w(e[t],n[t]))return!1;return!0}return!1}function w(e,n){return e&&n&&"*"===e||e===n}function b(e){return Array.isArray(e)?e:[e]}function S(e,n,t,r){var o;return e=b(e).map((function(e){e:if(d(e))e=[e];else{if(g(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(d)||d(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(d(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 k(e){void 0===e&&(e={});var n=e.base64,t=e.corePlugins,o=null!=t?t:[];e=function(e,n,t){function o(e,n){e=c.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}var i=function(e){return{addPluginContexts:function(n){var t=null!=n?n:[];return e.forEach((function(e){try{e.contexts&&t.push.apply(t,e.contexts())}catch(e){ge.error("Error adding plugin contexts",e)}})),t}}}(n),c=u(),s=e,l={};return{track:function(e,a,u){e.withJsonProcessor(function(e){return function(n,t){for(var o=0;o<t.length;o++){var i=t[o],a=JSON.stringify(i.json);e?n.add(i.keyIfEncoded,r(a)):n.add(i.keyIfNotEncoded,a)}t.length=0}}(s)),e.add("eid",fe.v4()),e.addDict(l),u=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()}}(u),e.add(u.type,u.value.toString()),void 0!==(a=(a=o(e,i.addPluginContexts(a)))&&a.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:a}:void 0)&&e.addJson("cx","co",a),n.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){ge.error("Plugin beforeTrack",e)}})),"function"==typeof t&&t(e);var c=e.build();return n.forEach((function(e){try{e.afterTrack&&e.afterTrack(c)}catch(e){ge.error("Plugin afterTrack",e)}})),c},addPayloadPair:function(e,n){l[e]=n},getBase64Encoding:function(){return s},setBase64Encoding:function(e){s=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(l[n]=e[n])},resetPayloadPairs:function(e){l=a(e)?e:{}},setTrackerVersion:function(e){l.tv=e},setTrackerNamespace:function(e){l.tna=e},setAppId:function(e){l.aid=e},setPlatform:function(e){l.p=e},setUserId:function(e){l.uid=e},setScreenResolution:function(e,n){l.res=e+"x"+n},setViewport:function(e,n){l.vp=e+"x"+n},setColorDepth:function(e){l.cd=e},setTimezone:function(e){l.tz=e},setLang:function(e){l.lang=e},setIpAddress:function(e){l.ip=e},setUseragent:function(e){l.ua=e},addGlobalContexts:function(e){c.addGlobalContexts(e)},clearGlobalContexts:function(){c.clearGlobalContexts()},removeGlobalContexts:function(e){c.removeGlobalContexts(e)}}}(null==n||n,o,e.callback);var i=ee(ee({},e),{addPlugin:function(e){var n,t;e=e.plugin,o.push(e),null===(n=e.logger)||void 0===n||n.call(e,ge),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)}});return null==o||o.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,ge),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)})),i}function T(e){var n=e.pageUrl,t=e.pageTitle;e=e.referrer;var r=o();return r.add("e","pv"),r.add("url",n),r.add("page",t),r.add("refr",e),r}function x(e){var n=e.pageUrl,t=e.pageTitle,r=e.referrer,i=e.minXOffset,a=e.maxXOffset,u=e.minYOffset;e=e.maxYOffset;var c=o();return c.add("e","pp"),c.add("url",n),c.add("page",t),c.add("refr",r),i&&!isNaN(Number(i))&&c.add("pp_mix",i.toString()),a&&!isNaN(Number(a))&&c.add("pp_max",a.toString()),u&&!isNaN(Number(u))&&c.add("pp_miy",u.toString()),e&&!isNaN(Number(e))&&c.add("pp_may",e.toString()),c}function A(){try{return!!window.localStorage}catch(e){return!0}}function O(){if(!A())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function P(){if("innerWidth"in window)var e=window.innerWidth,n=window.innerHeight;else e=(n=document.documentElement||document.body).clientWidth,n=n.clientHeight;return 0<=e&&0<=n?e+"x"+n:null}function I(){var e=document.documentElement,n=document.body,t=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,n?Math.max(n.offsetHeight,n.scrollHeight):0),isNaN(t)||isNaN(e)?"":t+"x"+e}function C(e){return!(!e||"string"!=typeof e.valueOf())}function D(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function N(e){if(!C(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function E(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function L(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function j(e){var n=window,t="",r=M("referrer",n.location.href)||M("referer",n.location.href);if(r)return r;if(e)return e;try{t=n.top.document.referrer}catch(e){if(n.parent)try{t=n.parent.document.referrer}catch(e){t=""}}return""===t&&(t=document.referrer),t}function B(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 M(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function U(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 _(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 V(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem(e+".expires",o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function R(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function z(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-1;0<=a;){var u=i.slice(a,i.length).join(".");if(F(r,o,0,"/",u,e,n),F(r)===o){for(H(r,u,e,n),t=J("_sp_root_domain_test_"),r=0;r<t.length;r++)H(t[r],u,e,n);return u}--a}return t}function H(e,n,t,r){F(e,"",-1,"/",n,t,r)}function J(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 F(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 G(e){return e.className.match(/\S+/g)||[]}function W(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function X(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(e,n,t,r,o,i,a,u,c,s,l){function f(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 d(e){for(void 0===e&&(e=!1);w.length&&"string"!=typeof w[0]&&"object"!=typeof w[0];)w.shift();if(1>w.length)y=!1;else{if(!C(m))throw"No collector configured";if(y=!0,x){var n=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},r=void 0;if(N(w))var o=g(r=m,!0,e),i=n(w);else r=h(w[0]),o=g(r,!1,e),i=1;var u=setTimeout((function(){o.abort(),y=!1}),s),f=function(e){for(var n=0;n<e;n++)w.shift();t&&V(I,JSON.stringify(w.slice(0,c))),d()};if(o.onreadystatechange=function(){4===o.readyState&&200<=o.status&&400>o.status?(clearTimeout(u),f(i)):4===o.readyState&&400<=o.status&&(clearTimeout(u),y=!1)},N(w)){if(0<(n=w.slice(0,i)).length){if(e=!1,n=n.map((function(e){return e.evt})),T){var b=new Blob([p(v(n))],{type:"application/json"});try{e=navigator.sendBeacon(r,b)}catch(n){e=!1}}!0===e?f(i):o.send(p(v(n)))}}else o.send()}else if(l||N(w))y=!1;else{r=new Image(1,1);var S=!0;r.onload=function(){S&&(S=!1,w.shift(),t&&V(I,JSON.stringify(w.slice(0,c))),d())},r.onerror=function(){S&&(y=S=!1)},r.src=h(w[0]),setTimeout((function(){S&&y&&(S=!1,d())}),s)}}}function g(e,n,t){var r=new XMLHttpRequest;return n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=!0,l&&r.setRequestHeader("SP-Anonymous","*"),r}function p(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function v(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function h(e){return u?m+e.replace("?","?stm="+(new Date).getTime()+"&"):m+e}var m,y=!1,w=[];r="string"==typeof r?r.toLowerCase():r;var b=window.localStorage,S=window.navigator,k=null===r||!0===r||"beacon"===r||"true"===r,T=!(!(k&&S&&S.sendBeacon)||function(e){return function(e,n){return!(!(n=n.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))||!n.length)&&parseInt(n[0])<=13}(0,e)||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,e)&&function(e){return e.match("Version/.* Safari/")&&!e.match("Chrom(e|ium)")}(e)}(S.userAgent))&&k,x=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),A="get"!==r&&x&&("post"===r||k),P=A?o:"/i",I="snowplowOutQueue_"+e+"_"+(A?"post2":"get");if(i=O()&&t&&A&&i||1,t)try{var D=b.getItem(I);w=D?JSON.parse(D):[]}catch(e){}Array.isArray(w)||(w=[]),n.outQueues.push(w),x&&1<i&&n.bufferFlushers.push((function(e){y||d(e)}));var N=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,n){if(m=n+P,A){if((e=function(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:f(JSON.stringify(n))}}(e)).bytes>=a)return ge.warn("Event ("+e.bytes+"B) too big, max is "+a),void g(m,!0,!1).send(p(v([e.evt])));w.push(e)}else w.push(function(e){var n,t="?",r={co:!0,cx:!0},o=!0;for(n in e)e.hasOwnProperty(n)&&!r.hasOwnProperty(n)&&(o?o=!1:t+="&",t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));for(var i in r)e.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(t+="&"+i+"="+encodeURIComponent(e[i]));return t}(e));e=!1,t&&(e=V(I,JSON.stringify(w.slice(0,c)))),y||e&&!(w.length>=i)||d()},executeQueue:function(){y||d()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){l=e},setCollectorUrl:function(e){m=e+P},setBufferSize:function(e){i=e}}}function Q(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=E(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?M("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=E(n=document.links[0].href)),[e,n,t]}function Y(e,n,t,r,o,i){var a;void 0===i&&(i={}),e=function(e,n,t,r,o,i){function a(){(Re=Q(window.location.hostname,window.location.href,j()))[1]!==He&&(Je=j(He)),ze=L(Re[0]),He=Re[1]}function u(e){var n=(new Date).getTime();null!=(e=e.target)&&e.href&&(e.href=U(e.href,"_sp",je+"."+n))}function c(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(B(t,"click",u,!0),B(t,"mousedown",u,!0),t.spDecorationEnabled=!0)}}function s(e){if(Ae){var n=/#.*/;e=e.replace(n,"")}return Oe&&(n=/[{}]/g,e=e.replace(n,"")),e}function l(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function f(e){return e=Ye+e+"."+Le,"localStorage"==sn?_(e):"cookie"==sn||"cookieAndLocalStorage"==sn?F(e):void 0}function d(){a(),Le=me((Ze||ze)+(Ke||"/")).slice(0,4)}function g(){Ie=(new Date).getTime()}function p(){var e=v(),n=e[0];n<Ce?Ce=n:n>De&&(De=n),(e=e[1])<Ne?Ne=e:e>Ee&&(Ee=e),g()}function v(){var e=document.compatMode&&"BackCompat"!==document.compatMode?document.documentElement:document.body;return[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]}function h(){var e=v(),n=e[0];De=Ce=n,Ee=Ne=e=e[1]}function m(){w(Ye+"ses."+Le,"*",on)}function y(e,n,t,r,o,i){w(Ye+"id."+Le,e+"."+n+"."+t+"."+r+"."+o+"."+i,rn)}function w(e,n,t){cn&&!an||("localStorage"==sn?V(e,n,t):("cookie"==sn||"cookieAndLocalStorage"==sn)&&F(e,n,t,Ke,Ze,$e,en))}function b(){var e=Ye+"id."+Le,n=Ye+"ses."+Le;R(e),R(n),H(e,Ze,$e,en),H(n,Ze,$e,en)}function S(){if(!cn||an){var e="none"!=sn&&!!f("ses"),n=A();n[1]?je=n[1]:(je=cn?"":fe.v4(),n[1]=je),Be=n[6],e||(n[3]++,Be=fe.v4(),n[6]=Be,n[5]=n[4]),"none"!=sn&&(m(),n[4]=Math.round((new Date).getTime()/1e3),n.shift(),y.apply(null,n))}}function A(){if("none"==sn)return[];var e=Math.round((new Date).getTime()/1e3),n=f("id");return n?(e=n.split(".")).unshift("0"):e=["1",je,e,0,e,""],e[6]||(e[6]=fe.v4()),e}function O(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function C(){gn&&null!=o.pageViewId||(o.pageViewId=fe.v4())}function J(){return null==o.pageViewId&&(o.pageViewId=fe.v4()),o.pageViewId}function G(e,n,t){var r=function(e,n){a(),e({context:n,pageViewId:J(),minXOffset:Ce,minYOffset:Ne,maxXOffset:De,maxYOffset:Ee}),h()},o=function(){Ie+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0!=e.configMinimumVisitLength?window.setTimeout((function(){Ie+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):window.setInterval(o,e.configHeartBeatTimer)}function W(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,D(n)&&D(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};ge.warn("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function X(e){var n=e.context,t=e.minXOffset,r=e.minYOffset,o=e.maxXOffset;e=e.maxYOffset;var i=document.title;i!==qe&&(qe=i,xe=void 0),Ue.track(x({pageUrl:s(Te||He),pageTitle:N(xe||qe),referrer:s(ke||Je),minXOffset:Math.round(t),maxXOffset:Math.round(o),minYOffset:Math.round(r),maxYOffset:Math.round(e)}),n)}var Y,Z,K,$,ne,te,re,oe,ie,ae,ue,ce,se,le,de,pe,ve,he,ye;i.eventMethod=null!==(Y=i.eventMethod)&&void 0!==Y?Y:"post";var we=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},be=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)},Se=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)};i.plugins=null!==(Z=i.plugins)&&void 0!==Z?Z:[],(null===($=null===(K=null==i?void 0:i.contexts)||void 0===K?void 0:K.webPage)||void 0===$||$)&&i.plugins.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:J()}}]}});var ke,Te,xe,Ae,Oe,Pe,Ie,Ce,De,Ne,Ee,Le,je,Be,Me,Ue=k({base64:i.encodeBase64,corePlugins:i.plugins,callback:function(e){var n=Math.round((new Date).getTime()/1e3),t=f("ses"),r=A(),o=r[0],i=r[1],u=r[2],c=r[3],l=r[4],d=r[5];r=r[6];var g=!!Pe&&!!F(Pe);tn||g?b():("0"===o?(Be=r,t||"none"==sn||(c++,d=l,Be=fe.v4()),fn=c):(new Date).getTime()-ln>1e3*on&&(Be=fe.v4(),fn++),e.add("vp",P()),e.add("ds",I()),e.add("vid",an?fn:cn?null:fn),e.add("sid",an?Be:cn?null:Be),e.add("duid",cn?null:i),e.add("uid",cn?null:Me),a(),e.add("refr",s(ke||Je)),e.add("url",s(Te||He)),"none"!=sn&&(y(i,u,fn,n,d,Be),m()),ln=(new Date).getTime()),n=!!Pe&&!!F(Pe),tn||n||dn.enqueueRequest(e.build(),Ge)}}),_e=navigator.userLanguage||navigator.language,Ve=document.characterSet||document.charset,Re=Q(window.location.hostname,window.location.href,j()),ze=L(Re[0]),He=Re[1],Je=Re[2],Fe=null!==(ne=i.platform)&&void 0!==ne?ne:"web",Ge=O(r),We=null!==(te=i.postPath)&&void 0!==te?te:"/com.snowplowanalytics.snowplow/tp2",Xe=null!==(re=i.appId)&&void 0!==re?re:"",qe=document.title,Qe=null===(oe=i.resetActivityTrackingOnPageView)||void 0===oe||oe,Ye=null!==(ie=i.cookieName)&&void 0!==ie?ie:"_sp_",Ze=null!==(ae=i.cookieDomain)&&void 0!==ae?ae:void 0,Ke="/",$e=null!==(ue=i.cookieSameSite)&&void 0!==ue?ue:"None",en=null===(ce=i.cookieSecure)||void 0===ce||ce,nn=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,tn=void 0!==i.respectDoNotTrack&&(i.respectDoNotTrack&&("yes"===nn||"1"===nn)),rn=null!==(se=i.cookieLifetime)&&void 0!==se?se:63072e3,on=null!==(le=i.sessionCookieTimeout)&&void 0!==le?le:1800,an=be(i),un=Se(i),cn=!!i.anonymousTracking,sn=we(i),ln=(new Date).getTime(),fn=1,dn=q(e,o,"localStorage"==sn||"cookieAndLocalStorage"==sn,i.eventMethod,We,null!==(de=i.bufferSize)&&void 0!==de?de:1,null!==(pe=i.maxPostBytes)&&void 0!==pe?pe:4e4,null===(ve=i.useStm)||void 0===ve||ve,null!==(he=i.maxLocalStorageQueueSize)&&void 0!==he?he:1e3,null!==(ye=i.connectionTimeout)&&void 0!==ye?ye:5e3,un),gn=!1,pn=!1,vn={enabled:!1,installed:!1,configurations:{}};return i.hasOwnProperty("discoverRootDomain")&&i.discoverRootDomain&&(Ze=z($e,en)),Ue.setTrackerVersion(t),Ue.setTrackerNamespace(n),Ue.setAppId(Xe),Ue.setPlatform(Fe),Ue.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0"),Ue.addPayloadPair("cs",Ve),Ue.addPayloadPair("lang",_e),Ue.addPayloadPair("res",screen.width+"x"+screen.height),Ue.addPayloadPair("cd",screen.colorDepth),d(),S(),i.crossDomainLinker&&c(i.crossDomainLinker),ee(ee({},{getDomainSessionIndex:function(){return fn},getPageViewId:function(){return J()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),n=A(),t=n[1],r=n[2],o=n[3],i=n[4],a=n[5],u=n[6];"0"===n[0]?(Be=u,"none"!=sn&&(o++,a=i,Be=fe.v4()),fn=o,m()):(Be=fe.v4(),fn++),"none"!=sn&&(y(t,r,fn,e,a,Be),m()),ln=(new Date).getTime()},getCookieName:function(e){return Ye+e+"."+Le},getUserId:function(){return Me},getDomainUserId:function(){return A()[1]},getDomainUserInfo:function(){return A()},setReferrerUrl:function(e){ke=e},setCustomUrl:function(e){a();var n,t=He;l(e)?Te=e:"/"===e.slice(0,1)?Te=l(t)+"://"+E(t)+e:(0<=(n=(t=s(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Te=t+e)},setDocumentTitle:function(e){qe=document.title,xe=e},discardHashTag:function(e){Ae=e},discardBrace:function(e){Oe=e},setCookiePath:function(e){Ke=e,d()},setVisitorCookieTimeout:function(e){rn=e},crossDomainLinker:function(e){c(e)},enableActivityTracking:function(e){vn.enabled=!0,vn.configurations.pagePing=W(ee(ee({},e),{callback:X}))},enableActivityTrackingCallback:function(e){vn.enabled=!0,vn.configurations.callback=W(e)},updatePageActivity:function(){g()},setOptOutCookie:function(e){Pe=e},setUserId:function(e){Me=e},setUserIdFromLocation:function(e){a(),Me=M(e,He)},setUserIdFromReferrer:function(e){a(),Me=M(e,Je)},setUserIdFromCookie:function(e){Me=F(e)},setCollectorUrl:function(e){Ge=O(e),dn.setCollectorUrl(Ge)},setBufferSize:function(e){dn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),dn.executeQueue(),e.newBufferSize&&dn.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var n=e.title,t=e.context,r=e.timestamp;if(e=e.contextCallback,a(),pn&&C(),pn=!0,qe=document.title,n=N((xe=n)||qe),Ue.track(T({pageUrl:s(Te||He),pageTitle:n,referrer:s(ke||Je)}),(t||[]).concat(e?e():[]),r),r=new Date,n=!1,vn.enabled&&!vn.installed){n=vn.installed=!0;var o={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),o.hasSupport=e}}};o.update();var i="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(o,"hasSupport")?B(document,i,g,{passive:!0}):B(document,i,g),h(),i=function(e,n){return void 0===n&&(n=g),function(e){return B(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(i(document)),["resize","focus","blur"].forEach(i(window)),i(window,p)("scroll")}if(vn.enabled&&(Qe||n))for(r in Ie=r.getTime(),r=void 0,vn.configurations)(n=vn.configurations[r])&&(window.clearInterval(n.activityInterval),G(n,t,e))}(e)},preservePageViewId:function(){gn=!0},disableAnonymousTracking:function(e){e&&e.stateStorageStrategy?(i.stateStorageStrategy=e.stateStorageStrategy,i.anonymousTracking=!1,sn=we(i)):i.anonymousTracking=!1,cn=!!i.anonymousTracking,an=be(i),un=Se(i),dn.setUseLocalStorage("localStorage"==sn||"cookieAndLocalStorage"==sn),dn.setAnonymousTracking(un),S(),dn.executeQueue()},enableAnonymousTracking:function(e){i.anonymousTracking=e&&(null==e?void 0:e.options)||!0,cn=!!i.anonymousTracking,an=be(i),un=Se(i),an||C(),dn.setAnonymousTracking(un)},clearUserData:b}),{id:e,namespace:n,core:Ue,sharedState:o})}(e,n,t,r,o,i);var u=ee(ee({},e),{addPlugin:function(e){var n,t;u.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,u)}});return null===(a=i.plugins)||void 0===a||a.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)})),u}function Z(e){return $(e,ye)}function K(){return Object.keys(ye)}function $(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):ge.warn(o+" not configured")}return t}for(var ee=function(){return(ee=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}).apply(this,arguments)},ne=t((function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=Array(16);e.exports=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}})),te=[],re=0;256>re;++re)te[re]=(re+256).toString(16).substr(1);var oe,ie,ae=function(e,n){return n=n||0,[te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],"-",te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]],te[e[n++]]].join("")},ue=0,ce=0;(re=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||ne)())[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||ae(e)}).v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||oe,i=void 0!==e.clockseq?e.clockseq:ie;if(null==o||null==i){var a=ne();null==o&&(o=oe=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=ie=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:ce+1,c=a-ue+(u-ce)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>ue)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(ue=a,ce=u,ie=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||ae(r)};var se,le,fe=re.v4=re,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(le=se||(se={}))[le.none=0]="none",le[le.error=1]="error",le[le.warn=2]="warn",le[le.debug=3]="debug",le[le.info=4]="info";var ge=function(e){return void 0===e&&(e=se.warn),{setLogLevel:function(n){e=se[n]?n:se.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o)):console.warn.apply(console,n([i],o)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o)):console.error.apply(console,n([i],o)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=se.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=se.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r))}}}(),pe=t((function(e){var n;n={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},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}},e.exports=n})),ve={utf8:{stringToBytes:function(e){return ve.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ve.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("")}}},he=ve,me=t((function(e){var n,t,r,o;n=he.utf8,t=he.bin,r=function(e){e.constructor==String?e=n.stringToBytes(e):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());var t=pe.bytesToWords(e),r=8*e.length;e=[];var o=1732584193,i=-271733879,a=-1732584194,u=271733878,c=-1009589776;for(t[r>>5]|=128<<24-r%32,t[15+(r+64>>>9<<4)]=r,r=0;r<t.length;r+=16){for(var s=o,l=i,f=a,d=u,g=c,p=0;80>p;p++){if(16>p)e[p]=t[r+p];else{var v=e[p-3]^e[p-8]^e[p-14]^e[p-16];e[p]=v<<1|v>>>31}v=(o<<5|o>>>27)+c+(e[p]>>>0)+(20>p?1518500249+(i&a|~i&u):40>p?1859775393+(i^a^u):60>p?(i&a|i&u|a&u)-1894007588:(i^a^u)-899497514),c=u,u=a,a=i<<30|i>>>2,i=o,o=v}o+=s,i+=l,a+=f,u+=d,c+=g}return[o,i,a,u,c]},(o=function(e,n){return e=pe.wordsToBytes(r(e)),n&&n.asBytes?e:n&&n.asString?t.bytesToString(e):pe.bytesToHex(e)})._blocksize=16,o._digestsize=20,e.exports=o})),ye={},we=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=we,e.addEventListener=B,e.addTracker=function(e,n,t,r,o,i){return ye.hasOwnProperty(e)?null:(ye[e]=Y(e,n,t,r,o,i),ye[e])},e.allTrackerNames=K,e.allTrackers=function(){return ye},e.attemptDeleteLocalStorage=R,e.attemptGetLocalStorage=_,e.attemptGetSessionStorage=function(e){try{return window.sessionStorage.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=V,e.attemptWriteSessionStorage=function(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}},e.cookie=F,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 we,t=document,r=window;return t.visibilityState&&B(t,"visibilitychange",(function(){"hidden"==document.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),B(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),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())})),B(r,"load",e,!1),n},e.decorateQuerystring=U,e.deleteCookie=H,e.detectDocumentSize=I,e.detectViewport=P,e.dispatchToTrackers=function(e,n){try{Z(null!=e?e:K()).forEach(n)}catch(e){ge.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{$(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){ge.error("Function failed",e)}},e.findRootDomain=z,e.fixupDomain=L,e.fixupTitle=N,e.fixupUrl=Q,e.fromQuerystring=M,e.getCookiesWithPrefix=J,e.getCssClasses=G,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=X(e);return W(e,(function(e){e:{var r=0;for(e=G(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=X(e);return W(e,(function(e){return e.name in t===n}))},e.getHostName=E,e.getReferrer=j,e.getTracker=function(e){return ye.hasOwnProperty(e)?ye[e]:(ge.warn(e+" not configured"),null)},e.getTrackers=Z,e.hasLocalStorage=A,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=D,e.isString=C,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=O,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 ye.hasOwnProperty(e)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker-core", | ||
"version": "3.0.0-beta.4", | ||
"version": "3.0.0-beta.5", | ||
"description": "Core functionality for Snowplow Browser trackers", | ||
@@ -24,3 +24,3 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/tracker-core": "3.0.0-beta.4", | ||
"@snowplow/tracker-core": "3.0.0-beta.5", | ||
"sha1": "^1.1.1", | ||
@@ -27,0 +27,0 @@ "tslib": "^2.1.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1056232
8659
+ Added@snowplow/tracker-core@3.0.0-beta.5(transitive)
- Removed@snowplow/tracker-core@3.0.0-beta.4(transitive)