@snowplow/browser-tracker-core
Advanced tools
Comparing version 3.0.0-alpha.4 to 3.0.0-beta.1
@@ -621,6 +621,2 @@ /* | ||
/** | ||
* Only log deprecation warnings if they won't cause an error | ||
*/ | ||
declare function warn(message: string): void; | ||
/** | ||
* Add a name-value pair to the querystring of a URL | ||
@@ -791,2 +787,2 @@ * | ||
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, warn, 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, 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 }; |
@@ -621,6 +621,2 @@ /* | ||
/** | ||
* Only log deprecation warnings if they won't cause an error | ||
*/ | ||
declare function warn(message: string): void; | ||
/** | ||
* Add a name-value pair to the querystring of a URL | ||
@@ -791,2 +787,2 @@ * | ||
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, warn, 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, 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 }; |
@@ -621,6 +621,2 @@ /* | ||
/** | ||
* Only log deprecation warnings if they won't cause an error | ||
*/ | ||
declare function warn(message: string): void; | ||
/** | ||
* Add a name-value pair to the querystring of a URL | ||
@@ -791,2 +787,2 @@ * | ||
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, warn, 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, 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-alpha.4 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow Browser trackers v3.0.0-beta.1 (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,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function t(e){return!(!e||"string"!=typeof e.valueOf())}function n(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function r(e){if(!t(e)){e=e.text||"";var n=ne.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function o(e){var t=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return t?t[1]:e}function i(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function a(e){var t="",n=c("referrer",te.location.href)||c("referer",te.location.href);if(n)return n;if(e)return e;try{t=te.top.document.referrer}catch(e){if(te.parent)try{t=te.parent.document.referrer}catch(e){t=""}}return""===t&&(t=ne.referrer),t}function u(e,t,n,r){return e.addEventListener?(e.addEventListener(t,n,r),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n)}function c(e,t){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function s(e){"undefined"!=typeof console&&console.warn("Snowplow: "+e)}function l(e,t,n){n=t+"="+n;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,t.length+1)===t+"="){i=!1,a[u]=n,r=a.join("&");break}i&&(r=n+"&"+r)}else r=n;return e[0]=o+"?"+r,e.join("#")}function f(e){try{var t=re.getItem(e+".expires");if(null===t||+t>Date.now())return re.getItem(e);re.removeItem(e),re.removeItem(e+".expires")}catch(e){}}function d(e,t,n){void 0===n&&(n=63072e3);try{var r=Date.now()+1e3*n;return re.setItem(e+".expires",r.toString()),re.setItem(e,t),!0}catch(e){return!1}}function p(e){try{return re.removeItem(e),re.removeItem(e+".expires"),!0}catch(e){return!1}}function g(e,t){for(var n="_sp_root_domain_test_"+(new Date).getTime(),r="_test_value_"+(new Date).getTime(),o=te.location.hostname.split("."),i=o.length-1;0<=i;){var a=o.slice(i,o.length).join(".");if(m(n,r,0,"/",a,e,t),m(n)===r){for(v(n,a,e,t),n=h("_sp_root_domain_test_"),r=0;r<n.length;r++)v(n[r],a,e,t);return a}--i}return te.location.hostname}function v(e,t,n,r){m(e,"",-1,"/",t,n,r)}function h(e){for(var t=ne.cookie.split("; "),n=[],r=0;r<t.length;r++)t[r].substring(0,e.length)===e&&n.push(t[r]);return n}function m(e,t,n,r,o,i,a){return 1<arguments.length?ne.cookie=e+"="+encodeURIComponent(null!=t?t:"")+(n?"; Expires="+new Date(+new Date+1e3*n).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+ne.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function y(e){return e.className.match(/\S+/g)||[]}function w(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}function b(e){var t={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)t[e[n]]=!0}return t}function S(e){var t={exports:{}};return e(t,t.exports),t.exports}function k(e){if(!e)return e;switch(4-e.length%4){case 2:e+="==";break;case 3:e+="="}return function(e){var t=0,n=0,r="",o=[];if(!e)return e;e+="";do{var i=ve.indexOf(e.charAt(t++)),a=ve.indexOf(e.charAt(t++));r=ve.indexOf(e.charAt(t++));var u=ve.indexOf(e.charAt(t++)),c=i<<18|a<<12|r<<6|u;i=c>>16&255,a=c>>8&255,c&=255,o[n++]=64===r?String.fromCharCode(i):64===u?String.fromCharCode(i,a):String.fromCharCode(i,a,c)}while(t<e.length);return function(e){return decodeURIComponent(e.split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}((r=o.join("")).replace(/\0+$/,""))}(e=e.replace(/-/g,"+").replace(/_/g,"/"))}function T(e){if(!e)return e;var t=0,n=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(t++),i=e.charCodeAt(t++),a=e.charCodeAt(t++),u=o<<16|i<<8|a;o=u>>18&63,i=u>>12&63,a=u>>6&63,u&=63,r[n++]=ve.charAt(o)+ve.charAt(i)+ve.charAt(a)+ve.charAt(u)}while(t<e.length);t=r.join(""),e=((e=e.length%3)?t.slice(0,e-3):t)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function x(){var e,t={},n=[],r=function(e,n){null!=n&&""!==n&&(t[e]=n)};return{add:r,addDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r(t,e[t])},addJson:function(e,t,r){r&&A(r)&&n.push([e,t,r])},withJsonProcessor:function(t){e=t},build:function(){return null==e||e(this,n),t}}}function A(e){if(!O(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function O(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function C(){var e=[],t=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return t},addGlobalContexts:function(n){for(var r=[],o=[],i=0;i<n.length;i++){var a=n[i];M(a)?r.push(a):B(a)&&o.push(a)}e=e.concat(o),t=t.concat(r)},clearGlobalContexts:function(){t=[],e=[]},removeGlobalContexts:function(n){for(var r=function(n){M(n)?t=t.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})):B(n)&&(e=e.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})))},o=0;o<n.length;o++)r(n[o])},getApplicableContexts:function(n){if(!(!A(n=n.build())||!("e"in n))&&"string"==typeof n.e){n=ie({},n);try{Object.prototype.hasOwnProperty.call(n,"ue_px")&&(n.ue_px=JSON.parse(k(n.ue_px)));var r=n}catch(e){r=n}var o,i,a,u,c,s,l,f,d;return n="string"==typeof(null===(i=null===(o=r.ue_px)||void 0===o?void 0:o.data)||void 0===i?void 0:i.schema)?null===(u=null===(a=r.ue_px)||void 0===a?void 0:a.data)||void 0===u?void 0:u.schema:"string"==typeof(null===(s=null===(c=r.ue_pr)||void 0===c?void 0:c.data)||void 0===s?void 0:s.schema)?null===(f=null===(l=r.ue_pr)||void 0===l?void 0:l.data)||void 0===f?void 0:f.schema:"string"==typeof(null==r?void 0:r.schema)?null==r?void 0:r.schema:"",o=null!==(d=null==r?void 0:r.e)&&void 0!==d?d:"",d=[],i=z(e,r,o,n),d.push.apply(d,i),o=function(e,t,n,r){var o;return e=V(e).map((function(e){e:{if(E(e)){var o=e[0],i=!1;try{i=o({event:t,eventType:n,eventSchema:r})}catch(e){i=!1}if(!0===i){e=z(e[1],t,n,r);break e}}else if(_(e)&&function(e,t){var n=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return U(e,t)}))&&r++:"string"==typeof o&&U(o,t)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return U(e,t)}))&&n++:"string"==typeof o&&U(o,t)&&n++,0<r&&0===n}(e[0],r)){e=z(e[1],t,n,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)})))}(t,r,o,n),d.push.apply(d,o),d}return[]}}}function P(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var t=!1,n=0;for(e=e.slice(2);n<e.length;n++)if("*"===e[n])t=!0;else if(t)return!1;return!0}return 2==e.length}(e)}function I(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))&&P(e[1]))return e.slice(1,6)}function D(e){if(e=I(e)){var t=e[0];return 5===e.length&&P(t)}return!1}function N(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return D(e)})):"string"==typeof e&&D(e)}function L(e){return!!(A(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function j(e){return"function"==typeof e&&1>=e.length}function B(e){return j(e)||L(e)}function E(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?j(e[0])&&e[1].every(B):j(e[0])&&B(e[1]))}function _(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var t=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!N(e.accept))return!1;t+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!N(e.reject))return!1;t+=1}return 0<t&&2>=t}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(B):B(e[1])))}function M(e){return E(e)||_(e)}function U(e,t){if(!D(e))return!1;if(e=I(e),t=null!==(t=/^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(t))?t.slice(1,6):void 0,e&&t){if(!function(e,t){if(t=t.split("."),e=e.split("."),t&&e){if(t.length!==e.length)return!1;for(var n=0;n<e.length;n++)if(!R(t[n],e[n]))return!1;return!0}return!1}(e[0],t[0]))return!1;for(var n=1;5>n;n++)if(!R(e[n],t[n]))return!1;return!0}return!1}function R(e,t){return e&&t&&"*"===e||e===t}function V(e){return Array.isArray(e)?e:[e]}function z(e,t,n,r){var o;return e=V(e).map((function(e){e:if(L(e))e=[e];else{if(j(e)){t:{var o=void 0;try{if(o=e({event:t,eventType:n,eventSchema:r}),Array.isArray(o)&&o.every(L)||L(o)){var i=o;break t}i=void 0;break t}catch(e){}i=void 0}if(L(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 H(e){void 0===e&&(e={});var t=e.base64,n=e.corePlugins,r=null!=n?n:[];e=function(e,t,n){function r(e,t){e=i.getApplicableContexts(e);var n=[];return t&&t.length&&n.push.apply(n,t),e&&e.length&&n.push.apply(n,e),n}var o=function(e){return{addPluginContexts:function(t){var n=null!=t?t:[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){console.warn("Snowplow: error with plugin context",e)}})),n}}}(t),i=C(),a=e,u={};return{track:function(e,i,c){e.withJsonProcessor(function(e){return function(t,n){for(var r=0;r<n.length;r++){var o=n[r],i=JSON.stringify(o[2]);e?t.add(o[0],T(i)):t.add(o[1],i)}n.length=0}}(a)),e.add("eid",ge.v4()),e.addDict(u),c=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()}}(c),e.add(c.type,c.value.toString()),void 0!==(i=(i=r(e,o.addPluginContexts(i)))&&i.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:i}:void 0)&&e.addJson("cx","co",i),t.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){console.warn("Snowplow: error with plugin beforeTrack",e)}})),"function"==typeof n&&n(e);var s=e.build();return t.forEach((function(e){try{e.afterTrack&&e.afterTrack(s)}catch(e){console.warn("Snowplow: error with plugin ",e)}})),s},addPayloadPair:function(e,t){u[e]=t},getBase64Encoding:function(){return a},setBase64Encoding:function(e){a=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(u[t]=e[t])},resetPayloadPairs:function(e){u=O(e)?e:{}},setTrackerVersion:function(e){u.tv=e},setTrackerNamespace:function(e){u.tna=e},setAppId:function(e){u.aid=e},setPlatform:function(e){u.p=e},setUserId:function(e){u.uid=e},setScreenResolution:function(e,t){u.res=e+"x"+t},setViewport:function(e,t){u.vp=e+"x"+t},setColorDepth:function(e){u.cd=e},setTimezone:function(e){u.tz=e},setLang:function(e){u.lang=e},setIpAddress:function(e){u.ip=e},setUseragent:function(e){u.ua=e},addGlobalContexts:function(e){i.addGlobalContexts(e)},clearGlobalContexts:function(){i.clearGlobalContexts()},removeGlobalContexts:function(e){i.removeGlobalContexts(e)}}}(null==t||t,r,e.callback);var o=ie(ie({},e),{addPlugin:function(e){var t;r.push(e),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,o)}});return null==r||r.forEach((function(e){var t;null===(t=e.activateCorePlugin)||void 0===t||t.call(e,o)})),o}function J(e){var t=e.pageUrl,n=e.pageTitle;e=e.referrer;var r=x();return r.add("e","pv"),r.add("url",t),r.add("page",n),r.add("refr",e),r}function F(e){var t=e.pageUrl,n=e.pageTitle,r=e.referrer,o=e.minXOffset,i=e.maxXOffset,a=e.minYOffset;e=e.maxYOffset;var u=x();return u.add("e","pp"),u.add("url",t),u.add("page",n),u.add("refr",r),o&&!isNaN(Number(o))&&u.add("pp_mix",o.toString()),i&&!isNaN(Number(i))&&u.add("pp_max",i.toString()),a&&!isNaN(Number(a))&&u.add("pp_miy",a.toString()),e&&!isNaN(Number(e))&&u.add("pp_may",e.toString()),u}function G(){try{return!!be.localStorage}catch(e){return!0}}function W(){if(!G())return!1;try{return be.localStorage.setItem("modernizr","modernizr"),be.localStorage.removeItem("modernizr"),!0}catch(e){return!1}}function X(){if("innerWidth"in be)var e=be.innerWidth,t=be.innerHeight;else e=(t=Se.documentElement||Se.body).clientWidth,t=t.clientHeight;return 0<=e&&0<=t?e+"x"+t:null}function q(){var e=Se.documentElement,t=Se.body,n=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,t?Math.max(t.offsetHeight,t.scrollHeight):0),isNaN(n)||isNaN(e)?"":n+"x"+e}function Q(e,n,r,o,i,a,u,c,l,f,p){function g(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);127>=r?t+=1:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,n++):t=65535>r?t+3:t+4}return t}function v(e){for(void 0===e&&(e=!1);k.length&&"string"!=typeof k[0]&&"object"!=typeof k[0];)k.shift();if(1>k.length)S=!1;else{if(!t(b))throw"No collector configured";if(S=!0,C){var n=function(e){for(var t=0,n=0;t<e.length&&!((n+=e[t].bytes)>=u);)t+=1;return t},o=void 0;if(L(k))var i=h(o=b,!0,e),a=n(k);else o=w(k[0]),i=h(o,!1,e),a=1;var c=setTimeout((function(){i.abort(),S=!1}),f),s=function(e){for(var t=0;t<e;t++)k.shift();r&&d(D,JSON.stringify(k.slice(0,l))),v()};if(i.onreadystatechange=function(){4===i.readyState&&200<=i.status&&400>i.status?(clearTimeout(c),s(a)):4===i.readyState&&400<=i.status&&(clearTimeout(c),S=!1)},L(k)){if(0<(n=k.slice(0,a)).length){if(e=!1,n=n.map((function(e){return e.evt})),O){var g=new Blob([m(y(n))],{type:"application/json"});try{e=navigator.sendBeacon(o,g)}catch(t){e=!1}}!0===e?s(a):i.send(m(y(n)))}}else i.send()}else if(p||L(k))S=!1;else{o=new Image(1,1);var T=!0;o.onload=function(){T&&(T=!1,k.shift(),r&&d(D,JSON.stringify(k.slice(0,l))),v())},o.onerror=function(){T&&(S=T=!1)},o.src=w(k[0]),setTimeout((function(){T&&S&&(T=!1,v())}),f)}}}function h(e,t,n){var r=new XMLHttpRequest;return t?(r.open("POST",e,!n),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!n),r.withCredentials=!0,p&&r.setRequestHeader("SP-Anonymous","*"),r}function m(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function y(e){for(var t=(new Date).getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function w(e){return c?b+e.replace("?","?stm="+(new Date).getTime()+"&"):b+e}var b,S=!1,k=[];o="string"==typeof o?o.toLowerCase():o;var T=window.localStorage,x=window.navigator,A=null===o||!0===o||"beacon"===o||"true"===o,O=!(!(A&&x&&x.sendBeacon)||function(e){return function(e,t){return!(!(t=t.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))||!t.length)&&parseInt(t[0])<=13}(0,e)||function(e,t,n){return!(!(n=n.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!n.length)&&(parseInt(n[0])<=e||parseInt(n[0])===e&&parseInt(n[1])<=t)}(10,15,e)&&function(e){return e.match("Version/.* Safari/")&&!e.match("Chrom(e|ium)")}(e)}(x.userAgent))&&A,C=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),P="get"!==o&&C&&("post"===o||A),I=P?i:"/i",D="snowplowOutQueue_"+e+"_"+(P?"post2":"get");if(a=W()&&r&&P&&a||1,r)try{var N=T.getItem(D);k=N?JSON.parse(N):[]}catch(e){}Array.isArray(k)||(k=[]),n.outQueues.push(k),C&&1<a&&n.bufferFlushers.push((function(e){S||v(e)}));var L=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,t){if(b=t+I,P){if((e=function(e){var t=Object.keys(e).map((function(t){return[t,e[t]]})).reduce((function(e,t){return e[t[0]]=t[1].toString(),e}),{});return{evt:t,bytes:g(JSON.stringify(t))}}(e)).bytes>=u)return s("Event ("+e.bytes+"B) too big, max is "+u),void h(b,!0,!1).send(m(y([e.evt])));k.push(e)}else k.push(function(e){var t,n="?",r={co:!0,cx:!0},o=!0;for(t in e)e.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(o?o=!1:n+="&",n+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]));for(var i in r)e.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(n+="&"+i+"="+encodeURIComponent(e[i]));return n}(e));e=!1,r&&(e=d(D,JSON.stringify(k.slice(0,l)))),S||e&&!(k.length>=a)||v()},executeQueue:function(){S||v()},setUseLocalStorage:function(e){r=e},setAnonymousTracking:function(e){p=e},setCollectorUrl:function(e){b=e+I},setBufferSize:function(e){a=e}}}function Y(e,t,n){return"translate.googleusercontent.com"===e?(""===n&&(n=t),e=o(t=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(t))&&1<(null==e?void 0:e.length)?c("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=o(t=document.links[0].href)),[e,t,n]}function Z(e,t,h,y,w,b){var S;void 0===b&&(b={}),e=function(e,t,h,y,w,b){function S(){(Fe=Y(Re.location.hostname,Re.location.href,a()))[1]!==We&&(Xe=a(We)),Ge=i(Fe[0]),We=Fe[1]}function k(e){var t=(new Date).getTime();null!=(e=e.target)&&e.href&&(e.href=l(e.href,"_sp",Be+"."+t))}function T(e){for(var t=0;t<Ue.links.length;t++){var n=Ue.links[t];!n.spDecorationEnabled&&e(n)&&(u(n,"click",k,!0),u(n,"mousedown",k,!0),n.spDecorationEnabled=!0)}}function x(e){if(Ae){var t=/#.*/;e=e.replace(t,"")}return Oe&&(t=/[{}]/g,e=e.replace(t,"")),e}function A(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function O(e){return e=et+e+"."+je,"localStorage"==dt?f(e):"cookie"==dt||"cookieAndLocalStorage"==dt?m(e):void 0}function C(){S(),je=we((tt||Ge)+(nt||"/")).slice(0,4)}function P(){Pe=(new Date).getTime()}function I(){var e=D(),t=e[0];t<Ie?Ie=t:t>De&&(De=t),(e=e[1])<Ne?Ne=e:e>Le&&(Le=e),P()}function D(){var e=Ue.compatMode&&"BackCompat"!==Ue.compatMode?Ue.documentElement:Ue.body;return[e.scrollLeft||Re.pageXOffset,e.scrollTop||Re.pageYOffset]}function N(){var e=D(),t=e[0];De=Ie=t,Le=Ne=e=e[1]}function L(){B(et+"ses."+je,"*",ct)}function j(e,t,n,r,o,i){B(et+"id."+je,e+"."+t+"."+n+"."+r+"."+o+"."+i,ut)}function B(e,t,n){ft&&!st||("localStorage"==dt?d(e,t,n):("cookie"==dt||"cookieAndLocalStorage"==dt)&&m(e,t,n,nt,tt,rt,ot))}function E(){var e=et+"id."+je,t=et+"ses."+je;p(e),p(t),v(e,tt,rt,ot),v(t,tt,rt,ot)}function _(){if(!ft||st){var e="none"!=dt&&!!O("ses"),t=M();t[1]?Be=t[1]:(Be=ft?"":ge.v4(),t[1]=Be),Ee=t[6],e||(t[3]++,Ee=ge.v4(),t[6]=Ee,t[5]=t[4]),"none"!=dt&&(L(),t[4]=Math.round((new Date).getTime()/1e3),t.shift(),j.apply(null,t))}}function M(){if("none"==dt)return[];var e=Math.round((new Date).getTime()/1e3),t=O("id");return t?(e=t.split(".")).unshift("0"):e=["1",Be,e,0,e,""],e[6]||(e[6]=ge.v4()),e}function U(e){return 0===e.indexOf("http")?e:("https:"===Ue.location.protocol?"https":"http")+"://"+e}function R(){ht&&null!=w.pageViewId||(w.pageViewId=ge.v4())}function V(){return null==w.pageViewId&&(w.pageViewId=ge.v4()),w.pageViewId}function z(e,t,n){var r=function(e,t){S(),e({context:t,pageViewId:V(),minXOffset:Ie,minYOffset:Ne,maxXOffset:De,maxYOffset:Le}),N()},o=function(){Pe+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[]))};e.activityInterval=0!=e.configMinimumVisitLength?Re.setTimeout((function(){Pe+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[])),e.activityInterval=Re.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):Re.setInterval(o,e.configHeartBeatTimer)}function G(e){var t=e.minimumVisitLength,r=e.heartbeatDelay;if(e=e.callback,n(t)&&n(r))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*r,callback:e};s("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function W(e){var t=e.context,n=e.minXOffset,o=e.minYOffset,i=e.maxXOffset;e=e.maxYOffset;var a=Ue.title;a!==Ke&&(Ke=a,xe=void 0),Me.track(F({pageUrl:x(Te||We),pageTitle:r(xe||Ke),referrer:x(ke||Xe),minXOffset:Math.round(n),maxXOffset:Math.round(i),minYOffset:Math.round(o),maxYOffset:Math.round(e)}),t)}var Z,K,$,ee,te,ne,re,oe,ae,ue,ce,se,le,fe,de,pe,ve,he,me;b.eventMethod=null!==(Z=b.eventMethod)&&void 0!==Z?Z:"post";var ye=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},be=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n)},Se=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n)};b.plugins=null!==(K=b.plugins)&&void 0!==K?K:[],(null===(ee=null===($=null==b?void 0:b.contexts)||void 0===$?void 0:$.webPage)||void 0===ee||ee)&&b.plugins.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:V()}}]}});var ke,Te,xe,Ae,Oe,Ce,Pe,Ie,De,Ne,Le,je,Be,Ee,_e,Me=H({base64:b.encodeBase64,corePlugins:b.plugins,callback:function(e){var t=Math.round((new Date).getTime()/1e3),n=O("ses"),r=M(),o=r[0],i=r[1],a=r[2],u=r[3],c=r[4],s=r[5];r=r[6];var l=!!Ce&&!!m(Ce);at||l?E():("0"===o?(Ee=r,n||"none"==dt||(u++,s=c,Ee=ge.v4()),gt=u):(new Date).getTime()-pt>1e3*ct&&(Ee=ge.v4(),gt++),e.add("vp",X()),e.add("ds",q()),e.add("vid",st?gt:ft?null:gt),e.add("sid",st?Ee:ft?null:Ee),e.add("duid",ft?null:i),e.add("uid",ft?null:_e),S(),e.add("refr",x(ke||Xe)),e.add("url",x(Te||We)),"none"!=dt&&(j(i,a,gt,t,s,Ee),L()),pt=(new Date).getTime()),t=!!Ce&&!!m(Ce),at||t||vt.enqueueRequest(e.build(),Qe)}}),Ue=document,Re=window,Ve=navigator,ze=screen,He=Ve.userLanguage||Ve.language,Je=Ue.characterSet||Ue.charset,Fe=Y(Re.location.hostname,Re.location.href,a()),Ge=i(Fe[0]),We=Fe[1],Xe=Fe[2],qe=null!==(te=b.platform)&&void 0!==te?te:"web",Qe=U(y),Ye=null!==(ne=b.postPath)&&void 0!==ne?ne:"/com.snowplowanalytics.snowplow/tp2",Ze=null!==(re=b.appId)&&void 0!==re?re:"",Ke=Ue.title,$e=null===(oe=b.resetActivityTrackingOnPageView)||void 0===oe||oe,et=null!==(ae=b.cookieName)&&void 0!==ae?ae:"_sp_",tt=null!==(ue=b.cookieDomain)&&void 0!==ue?ue:void 0,nt="/",rt=null!==(ce=b.cookieSameSite)&&void 0!==ce?ce:"None",ot=null===(se=b.cookieSecure)||void 0===se||se,it=Ve.doNotTrack||Ve.msDoNotTrack||Re.doNotTrack,at=void 0!==b.respectDoNotTrack&&(b.respectDoNotTrack&&("yes"===it||"1"===it)),ut=null!==(le=b.cookieLifetime)&&void 0!==le?le:63072e3,ct=null!==(fe=b.sessionCookieTimeout)&&void 0!==fe?fe:1800,st=be(b),lt=Se(b),ft=!!b.anonymousTracking,dt=ye(b),pt=(new Date).getTime(),gt=1,vt=Q(e,w,"localStorage"==dt||"cookieAndLocalStorage"==dt,b.eventMethod,Ye,null!==(de=b.bufferSize)&&void 0!==de?de:1,null!==(pe=b.maxPostBytes)&&void 0!==pe?pe:4e4,null===(ve=b.useStm)||void 0===ve||ve,null!==(he=b.maxLocalStorageQueueSize)&&void 0!==he?he:1e3,null!==(me=b.connectionTimeout)&&void 0!==me?me:5e3,lt),ht=!1,mt=!1,yt={enabled:!1,installed:!1,configurations:{}};return b.hasOwnProperty("discoverRootDomain")&&b.discoverRootDomain&&(tt=g(rt,ot)),Me.setTrackerVersion(h),Me.setTrackerNamespace(t),Me.setAppId(Ze),Me.setPlatform(qe),Me.addPayloadPair("cookie",Ve.cookieEnabled?"1":"0"),Me.addPayloadPair("cs",Je),Me.addPayloadPair("lang",He),Me.addPayloadPair("res",ze.width+"x"+ze.height),Me.addPayloadPair("cd",ze.colorDepth),C(),_(),b.crossDomainLinker&&T(b.crossDomainLinker),ie(ie({},{getDomainSessionIndex:function(){return gt},getPageViewId:function(){return V()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),t=M(),n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6];"0"===t[0]?(Ee=u,"none"!=dt&&(o++,a=i,Ee=ge.v4()),gt=o,L()):(Ee=ge.v4(),gt++),"none"!=dt&&(j(n,r,gt,e,a,Ee),L()),pt=(new Date).getTime()},getCookieName:function(e){return et+e+"."+je},getUserId:function(){return _e},getDomainUserId:function(){return M()[1]},getDomainUserInfo:function(){return M()},setReferrerUrl:function(e){ke=e},setCustomUrl:function(e){S();var t,n=We;A(e)?Te=e:"/"===e.slice(0,1)?Te=A(n)+"://"+o(n)+e:(0<=(t=(n=x(n)).indexOf("?"))&&(n=n.slice(0,t)),(t=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,t+1)),Te=n+e)},setDocumentTitle:function(e){Ke=Ue.title,xe=e},discardHashTag:function(e){Ae=e},discardBrace:function(e){Oe=e},setCookiePath:function(e){nt=e,C()},setVisitorCookieTimeout:function(e){ut=e},crossDomainLinker:function(e){T(e)},enableActivityTracking:function(e){yt.enabled=!0,yt.configurations.pagePing=G(ie(ie({},e),{callback:W}))},enableActivityTrackingCallback:function(e){yt.enabled=!0,yt.configurations.callback=G(e)},updatePageActivity:function(){P()},setOptOutCookie:function(e){Ce=e},setUserId:function(e){_e=e},setUserIdFromLocation:function(e){S(),_e=c(e,We)},setUserIdFromReferrer:function(e){S(),_e=c(e,Xe)},setUserIdFromCookie:function(e){_e=m(e)},setCollectorUrl:function(e){Qe=U(e),vt.setCollectorUrl(Qe)},setBufferSize:function(e){vt.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),vt.executeQueue(),e.newBufferSize&&vt.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var t=e.title,n=e.context,o=e.timestamp;if(e=e.contextCallback,S(),mt&&R(),mt=!0,Ke=Ue.title,t=r((xe=t)||Ke),Me.track(J({pageUrl:x(Te||We),pageTitle:t,referrer:x(ke||Xe)}),(n||[]).concat(e?e():[]),o),o=new Date,t=!1,yt.enabled&&!yt.installed){t=yt.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),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(Ue,a,P,{passive:!0}):u(Ue,a,P),N(),a=function(e,t){return void 0===t&&(t=P),function(e){return u(Ue,e,t)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(a(Ue)),["resize","focus","blur"].forEach(a(Re)),a(Re,I)("scroll")}if(yt.enabled&&($e||t))for(o in Pe=o.getTime(),o=void 0,yt.configurations)(t=yt.configurations[o])&&(window.clearInterval(t.activityInterval),z(t,n,e))}(e)},preservePageViewId:function(){ht=!0},disableAnonymousTracking:function(e){e&&e.stateStorageStrategy?(b.stateStorageStrategy=e.stateStorageStrategy,b.anonymousTracking=!1,dt=ye(b)):b.anonymousTracking=!1,ft=!!b.anonymousTracking,st=be(b),lt=Se(b),vt.setUseLocalStorage("localStorage"==dt||"cookieAndLocalStorage"==dt),vt.setAnonymousTracking(lt),_(),vt.executeQueue()},enableAnonymousTracking:function(e){b.anonymousTracking=e&&(null==e?void 0:e.options)||!0,ft=!!b.anonymousTracking,st=be(b),lt=Se(b),st||R(),vt.setAnonymousTracking(lt)},clearUserData:E}),{id:e,core:Me,sharedState:w})}(e,t,h,y,w,b);var k=ie(ie({},e),{addPlugin:function(e){var t,n;null===(t=b.plugins)||void 0===t||t.push(e),null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,k)}});return null===(S=b.plugins)||void 0===S||S.forEach((function(e){var t;null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,k)})),k}function K(e){return ee(e,ke)}function $(){return Object.keys(ke)}function ee(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];t.hasOwnProperty(o)?n.push(t[o]):s(o+" not configured")}return n}for(var te=window,ne=document,re=window.localStorage,oe=window.sessionStorage,ie=function(){return(ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ae=S((function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=Array(16);e.exports=function(){for(var e,t=0;16>t;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}})),ue=[],ce=0;256>ce;++ce)ue[ce]=(ce+256).toString(16).substr(1);var se,le,fe=function(e,t){return t=t||0,[ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],"-",ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]],ue[e[t++]]].join("")},de=0,pe=0;(ce=function(e,t,n){if(n=t&&n||0,"string"==typeof e&&(t="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||ae)())[6]=15&e[6]|64,e[8]=63&e[8]|128,t)for(var r=0;16>r;++r)t[n+r]=e[r];return t||fe(e)}).v1=function(e,t,n){n=t&&n||0;var r=t||[],o=(e=e||{}).node||se,i=void 0!==e.clockseq?e.clockseq:le;if(null==o||null==i){var a=ae();null==o&&(o=se=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=le=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var u=void 0!==e.nsecs?e.nsecs:pe+1,c=a-de+(u-pe)/1e4;if(0>c&&void 0===e.clockseq&&(i=i+1&16383),(0>c||a>de)&&void 0===e.nsecs&&(u=0),1e4<=u)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(de=a,pe=u,le=i,e=(1e4*(268435455&(a+=122192928e5))+u)%4294967296,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e,e=a/4294967296*1e4&268435455,r[n++]=e>>>8&255,r[n++]=255&e,r[n++]=e>>>24&15|16,r[n++]=e>>>16&255,r[n++]=i>>>8|128,r[n++]=255&i,i=0;6>i;++i)r[n+i]=o[i];return t||fe(r)};var ge=ce.v4=ce,ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",he=S((function(e){var t;t={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n<e.length;n++)e[n]=t.endian(e[n]);return e},randomBytes:function(e){for(var t=[];0<e;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;4>o;o++)8*n+6*o<=8*e.length?t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n))>>>6-2*r);return t}},e.exports=t})),me={utf8:{stringToBytes:function(e){return me.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(me.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},ye=me,we=S((function(e){var t,n,r,o;t=ye.utf8,n=ye.bin,r=function(e){e.constructor==String?e=t.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 n=he.bytesToWords(e),r=8*e.length;e=[];var o=1732584193,i=-271733879,a=-1732584194,u=271733878,c=-1009589776;for(n[r>>5]|=128<<24-r%32,n[15+(r+64>>>9<<4)]=r,r=0;r<n.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]=n[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,t){return e=he.wordsToBytes(r(e)),t&&t.asBytes?e:t&&t.asString?n.bytesToString(e):he.bytesToHex(e)})._blocksize=16,o._digestsize=20,e.exports=o})),be=window,Se=document,ke={},Te=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Te,e.addEventListener=u,e.addTracker=function(e,t,n,r,o,i){return ke.hasOwnProperty(e)?null:(ke[e]=Z(e,t,n,r,o,i),ke[e])},e.allTrackerNames=$,e.allTrackers=function(){return ke},e.attemptDeleteLocalStorage=p,e.attemptGetLocalStorage=f,e.attemptGetSessionStorage=function(e){try{return oe.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=d,e.attemptWriteSessionStorage=function(e,t){try{return oe.setItem(e,t),!0}catch(e){return!1}},e.cookie=m,e.createSharedState=function(){function e(){var e;if(!r.hasLoaded)for(r.hasLoaded=!0,e=0;e<r.registeredOnLoadHandlers.length;e++)r.registeredOnLoadHandlers[e]();return!0}var t=document,n=window,r=new Te;return document.visibilityState&&u(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&r.bufferFlushers.forEach((function(e){e(!1)}))}),!1),u(n,"beforeunload",(function(){r.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())})),u(n,"load",e,!1),r},e.decorateQuerystring=l,e.deleteCookie=v,e.detectDocumentSize=q,e.detectViewport=X,e.dispatchToTrackers=function(e,t){try{K(null!=e?e:$()).forEach(t)}catch(e){s("function failed")}},e.dispatchToTrackersInCollection=function(e,t,n){try{ee(null!=e?e:Object.keys(t),t).forEach(n)}catch(e){s("function failed")}},e.findRootDomain=g,e.fixupDomain=i,e.fixupTitle=r,e.fixupUrl=Y,e.fromQuerystring=c,e.getCookiesWithPrefix=h,e.getCssClasses=y,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=b(e);return w(e,(function(e){e:{var r=0;for(e=y(e);r<e.length;r++)if(n[e[r]]){r=!0;break e}r=!1}return r===t}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=e.hasOwnProperty("allowlist"),n=b(e);return w(e,(function(e){return e.name in n===t}))},e.getHostName=o,e.getReferrer=a,e.getTracker=function(e){return ke.hasOwnProperty(e)?ke[e]:(s(e+" not configured"),null)},e.getTrackers=K,e.hasLocalStorage=G,e.hasSessionStorage=function(){try{return!!be.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=n,e.isString=t,e.isValueInArray=function(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},e.localStorageAccessible=W,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 ke.hasOwnProperty(e)},e.warn=s,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowBrowserTrackerCore={})}(this,(function(e){function t(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}function n(e){var t={exports:{}};return e(t,t.exports),t.exports}function r(e){if(!e)return e;var t=0,n=0,r=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(t++),i=e.charCodeAt(t++),a=e.charCodeAt(t++),u=o<<16|i<<8|a;o=u>>18&63,i=u>>12&63,a=u>>6&63,u&=63,r[n++]=de.charAt(o)+de.charAt(i)+de.charAt(a)+de.charAt(u)}while(t<e.length);t=r.join(""),e=((e=e.length%3)?t.slice(0,e-3):t)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function o(){var e,t={},n=[],r=[],o=function(e,n){null!=n&&""!==n&&(t[e]=n)};return{add:o,addDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o(t,e[t])},addJson:function(e,t,o){o&&i(o)&&(e=[e,t,o],r.push(e),n.push(e))},getPayload:function(){return t},getJson:function(){return n},withJsonProcessor:function(t){e=t},build:function(){return null==e||e(this,r),t}}}function i(e){if(!a(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function a(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function u(){var e=[],t=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return t},addGlobalContexts:function(n){for(var r=[],o=[],i=0;i<n.length;i++){var a=n[i];y(a)?r.push(a):g(a)&&o.push(a)}e=e.concat(o),t=t.concat(r)},clearGlobalContexts:function(){t=[],e=[]},removeGlobalContexts:function(n){for(var r=function(n){y(n)?t=t.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})):g(n)&&(e=e.filter((function(e){return JSON.stringify(e)===JSON.stringify(n)})))},o=0;o<n.length;o++)r(n[o])},getApplicableContexts:function(n){e:{for(var r=0,o=n.getJson();r<o.length;r++){var i=o[r];if(3===i.length&&"ue_px"===i[0]&&"object"==typeof i[2].data&&"string"==typeof(i=i[2].data.schema)){r=i;break e}}r=""}i="string"==typeof(o=n.getPayload().e)?o:"",o=[];var a=S(e,n,i,r);return o.push.apply(o,a),n=function(e,t,n,r){var o;return e=b(e).map((function(e){e:{if(v(e)){var o=e[0],i=!1;try{i=o({event:t.getPayload(),eventType:n,eventSchema:r})}catch(e){i=!1}if(!0===i){e=S(e[1],t,n,r);break e}}else if(h(e)&&function(e,t){var n=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return m(e,t)}))&&r++:"string"==typeof o&&m(o,t)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return m(e,t)}))&&n++:"string"==typeof o&&m(o,t)&&n++,0<r&&0===n}(e[0],r)){e=S(e[1],t,n,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)})))}(t,n,i,r),o.push.apply(o,n),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 t=!1,n=0;for(e=e.slice(2);n<e.length;n++)if("*"===e[n])t=!0;else if(t)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 t=e[0];return 5===e.length&&c(t)}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 t=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!f(e.accept))return!1;t+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!f(e.reject))return!1;t+=1}return 0<t&&2>=t}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(g):g(e[1])))}function y(e){return v(e)||h(e)}function m(e,t){if(!l(e))return!1;if(e=s(e),t=null!==(t=/^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(t))?t.slice(1,6):void 0,e&&t){if(!function(e,t){if(t=t.split("."),e=e.split("."),t&&e){if(t.length!==e.length)return!1;for(var n=0;n<e.length;n++)if(!w(t[n],e[n]))return!1;return!0}return!1}(e[0],t[0]))return!1;for(var n=1;5>n;n++)if(!w(e[n],t[n]))return!1;return!0}return!1}function w(e,t){return e&&t&&"*"===e||e===t}function b(e){return Array.isArray(e)?e:[e]}function S(e,t,n,r){var o;return e=b(e).map((function(e){e:if(d(e))e=[e];else{if(p(e)){t:{var o=void 0;try{if(o=e({event:t.getPayload(),eventType:n,eventSchema:r}),Array.isArray(o)&&o.every(d)||d(o)){var i=o;break t}i=void 0;break t}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 t=e.base64,n=e.corePlugins,o=null!=n?n:[];e=function(e,t,n){function o(e,t){e=c.getApplicableContexts(e);var n=[];return t&&t.length&&n.push.apply(n,t),e&&e.length&&n.push.apply(n,e),n}var i=function(e){return{addPluginContexts:function(t){var n=null!=t?t:[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){pe.error("Error adding plugin contexts",e)}})),n}}}(t),c=u(),s=e,l={};return{track:function(e,a,u){e.withJsonProcessor(function(e){return function(t,n){for(var o=0;o<n.length;o++){var i=n[o],a=JSON.stringify(i[2]);e?t.add(i[0],r(a)):t.add(i[1],a)}n.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),t.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){pe.error("Plugin beforeTrack",e)}})),"function"==typeof n&&n(e);var c=e.build();return t.forEach((function(e){try{e.afterTrack&&e.afterTrack(c)}catch(e){pe.error("Plugin afterTrack",e)}})),c},addPayloadPair:function(e,t){l[e]=t},getBase64Encoding:function(){return s},setBase64Encoding:function(e){s=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(l[t]=e[t])},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,t){l.res=e+"x"+t},setViewport:function(e,t){l.vp=e+"x"+t},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==t||t,o,e.callback);var i=ee(ee({},e),{addPlugin:function(e){var t;o.push(e),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,i)}});return null==o||o.forEach((function(e){var t,n;null===(t=e.logger)||void 0===t||t.call(e,pe),null===(n=e.activateCorePlugin)||void 0===n||n.call(e,i)})),i}function T(e){var t=e.pageUrl,n=e.pageTitle;e=e.referrer;var r=o();return r.add("e","pv"),r.add("url",t),r.add("page",n),r.add("refr",e),r}function x(e){var t=e.pageUrl,n=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",t),c.add("page",n),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!!me.localStorage}catch(e){return!0}}function O(){if(!A())return!1;try{return me.localStorage.setItem("modernizr","modernizr"),me.localStorage.removeItem("modernizr"),!0}catch(e){return!1}}function P(){if("innerWidth"in me)var e=me.innerWidth,t=me.innerHeight;else e=(t=we.documentElement||we.body).clientWidth,t=t.clientHeight;return 0<=e&&0<=t?e+"x"+t:null}function C(){var e=we.documentElement,t=we.body,n=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,t?Math.max(t.offsetHeight,t.scrollHeight):0),isNaN(n)||isNaN(e)?"":n+"x"+e}function I(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(!I(e)){e=e.text||"";var t=Se.getElementsByTagName("title");t&&null!=t[0]&&(e=t[0].text)}return e}function L(e){var t=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return t?t[1]:e}function B(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function E(e){var t="",n=M("referrer",be.location.href)||M("referer",be.location.href);if(n)return n;if(e)return e;try{t=be.top.document.referrer}catch(e){if(be.parent)try{t=be.parent.document.referrer}catch(e){t=""}}return""===t&&(t=Se.referrer),t}function j(e,t,n,r){return e.addEventListener?(e.addEventListener(t,n,r),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n)}function M(e,t){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function U(e,t,n){n=t+"="+n;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,t.length+1)===t+"="){i=!1,a[u]=n,r=a.join("&");break}i&&(r=n+"&"+r)}else r=n;return e[0]=o+"?"+r,e.join("#")}function _(e){try{var t=ke.getItem(e+".expires");if(null===t||+t>Date.now())return ke.getItem(e);ke.removeItem(e),ke.removeItem(e+".expires")}catch(e){}}function V(e,t,n){void 0===n&&(n=63072e3);try{var r=Date.now()+1e3*n;return ke.setItem(e+".expires",r.toString()),ke.setItem(e,t),!0}catch(e){return!1}}function R(e){try{return ke.removeItem(e),ke.removeItem(e+".expires"),!0}catch(e){return!1}}function z(e,t){for(var n="_sp_root_domain_test_"+(new Date).getTime(),r="_test_value_"+(new Date).getTime(),o=be.location.hostname.split("."),i=o.length-1;0<=i;){var a=o.slice(i,o.length).join(".");if(F(n,r,0,"/",a,e,t),F(n)===r){for(H(n,a,e,t),n=J("_sp_root_domain_test_"),r=0;r<n.length;r++)H(n[r],a,e,t);return a}--i}return be.location.hostname}function H(e,t,n,r){F(e,"",-1,"/",t,n,r)}function J(e){for(var t=Se.cookie.split("; "),n=[],r=0;r<t.length;r++)t[r].substring(0,e.length)===e&&n.push(t[r]);return n}function F(e,t,n,r,o,i,a){return 1<arguments.length?Se.cookie=e+"="+encodeURIComponent(null!=t?t:"")+(n?"; Expires="+new Date(+new Date+1e3*n).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+Se.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function G(e){return e.className.match(/\S+/g)||[]}function W(e,t){return e.hasOwnProperty("filter")&&e.filter?e.filter:t}function X(e){var t={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)t[e[n]]=!0}return t}function q(e,t,n,r,o,i,a,u,c,s,l){function f(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);127>=r?t+=1:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,n++):t=65535>r?t+3:t+4}return t}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)m=!1;else{if(!I(y))throw"No collector configured";if(m=!0,x){var t=function(e){for(var t=0,n=0;t<e.length&&!((n+=e[t].bytes)>=a);)t+=1;return t},r=void 0;if(N(w))var o=p(r=y,!0,e),i=t(w);else r=h(w[0]),o=p(r,!1,e),i=1;var u=setTimeout((function(){o.abort(),m=!1}),s),f=function(e){for(var t=0;t<e;t++)w.shift();n&&V(C,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),m=!1)},N(w)){if(0<(t=w.slice(0,i)).length){if(e=!1,t=t.map((function(e){return e.evt})),T){var b=new Blob([g(v(t))],{type:"application/json"});try{e=navigator.sendBeacon(r,b)}catch(t){e=!1}}!0===e?f(i):o.send(g(v(t)))}}else o.send()}else if(l||N(w))m=!1;else{r=new Image(1,1);var S=!0;r.onload=function(){S&&(S=!1,w.shift(),n&&V(C,JSON.stringify(w.slice(0,c))),d())},r.onerror=function(){S&&(m=S=!1)},r.src=h(w[0]),setTimeout((function(){S&&m&&(S=!1,d())}),s)}}}function p(e,t,n){var r=new XMLHttpRequest;return t?(r.open("POST",e,!n),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!n),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 t=(new Date).getTime().toString(),n=0;n<e.length;n++)e[n].stm=t;return e}function h(e){return u?y+e.replace("?","?stm="+(new Date).getTime()+"&"):y+e}var y,m=!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,t){return!(!(t=t.match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))||!t.length)&&parseInt(t[0])<=13}(0,e)||function(e,t,n){return!(!(n=n.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!n.length)&&(parseInt(n[0])<=e||parseInt(n[0])===e&&parseInt(n[1])<=t)}(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",C="snowplowOutQueue_"+e+"_"+(A?"post2":"get");if(i=O()&&n&&A&&i||1,n)try{var D=b.getItem(C);w=D?JSON.parse(D):[]}catch(e){}Array.isArray(w)||(w=[]),t.outQueues.push(w),x&&1<i&&t.bufferFlushers.push((function(e){m||d(e)}));var N=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,t){if(y=t+P,A){if((e=function(e){var t=Object.keys(e).map((function(t){return[t,e[t]]})).reduce((function(e,t){return e[t[0]]=t[1].toString(),e}),{});return{evt:t,bytes:f(JSON.stringify(t))}}(e)).bytes>=a)return pe.warn("Event ("+e.bytes+"B) too big, max is "+a),void p(y,!0,!1).send(g(v([e.evt])));w.push(e)}else w.push(function(e){var t,n="?",r={co:!0,cx:!0},o=!0;for(t in e)e.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(o?o=!1:n+="&",n+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]));for(var i in r)e.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(n+="&"+i+"="+encodeURIComponent(e[i]));return n}(e));e=!1,n&&(e=V(C,JSON.stringify(w.slice(0,c)))),m||e&&!(w.length>=i)||d()},executeQueue:function(){m||d()},setUseLocalStorage:function(e){n=e},setAnonymousTracking:function(e){l=e},setCollectorUrl:function(e){y=e+P},setBufferSize:function(e){i=e}}}function Q(e,t,n){return"translate.googleusercontent.com"===e?(""===n&&(n=t),e=L(t=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(t))&&1<(null==e?void 0:e.length)?M("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=L(t=document.links[0].href)),[e,t,n]}function Y(e,t,n,r,o,i){var a;void 0===i&&(i={}),e=function(e,t,n,r,o,i){function a(){(Fe=Q(Ae.location.hostname,Ae.location.href,E()))[1]!==We&&(Xe=E(We)),Ge=B(Fe[0]),We=Fe[1]}function u(e){var t=(new Date).getTime();null!=(e=e.target)&&e.href&&(e.href=U(e.href,"_sp",_e+"."+t))}function c(e){for(var t=0;t<xe.links.length;t++){var n=xe.links[t];!n.spDecorationEnabled&&e(n)&&(j(n,"click",u,!0),j(n,"mousedown",u,!0),n.spDecorationEnabled=!0)}}function s(e){if(Ie){var t=/#.*/;e=e.replace(t,"")}return De&&(t=/[{}]/g,e=e.replace(t,"")),e}function l(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function f(e){return e=et+e+"."+Ue,"localStorage"==dt?_(e):"cookie"==dt||"cookieAndLocalStorage"==dt?F(e):void 0}function d(){a(),Ue=ye((tt||Ge)+(nt||"/")).slice(0,4)}function p(){Le=(new Date).getTime()}function g(){var e=v(),t=e[0];t<Be?Be=t:t>Ee&&(Ee=t),(e=e[1])<je?je=e:e>Me&&(Me=e),p()}function v(){var e=xe.compatMode&&"BackCompat"!==xe.compatMode?xe.documentElement:xe.body;return[e.scrollLeft||Ae.pageXOffset,e.scrollTop||Ae.pageYOffset]}function h(){var e=v(),t=e[0];Ee=Be=t,Me=je=e=e[1]}function y(){w(et+"ses."+Ue,"*",ct)}function m(e,t,n,r,o,i){w(et+"id."+Ue,e+"."+t+"."+n+"."+r+"."+o+"."+i,ut)}function w(e,t,n){ft&&!st||("localStorage"==dt?V(e,t,n):("cookie"==dt||"cookieAndLocalStorage"==dt)&&F(e,t,n,nt,tt,rt,ot))}function b(){var e=et+"id."+Ue,t=et+"ses."+Ue;R(e),R(t),H(e,tt,rt,ot),H(t,tt,rt,ot)}function S(){if(!ft||st){var e="none"!=dt&&!!f("ses"),t=A();t[1]?_e=t[1]:(_e=ft?"":fe.v4(),t[1]=_e),Ve=t[6],e||(t[3]++,Ve=fe.v4(),t[6]=Ve,t[5]=t[4]),"none"!=dt&&(y(),t[4]=Math.round((new Date).getTime()/1e3),t.shift(),m.apply(null,t))}}function A(){if("none"==dt)return[];var e=Math.round((new Date).getTime()/1e3),t=f("id");return t?(e=t.split(".")).unshift("0"):e=["1",_e,e,0,e,""],e[6]||(e[6]=fe.v4()),e}function O(e){return 0===e.indexOf("http")?e:("https:"===xe.location.protocol?"https":"http")+"://"+e}function I(){ht&&null!=o.pageViewId||(o.pageViewId=fe.v4())}function J(){return null==o.pageViewId&&(o.pageViewId=fe.v4()),o.pageViewId}function G(e,t,n){var r=function(e,t){a(),e({context:t,pageViewId:J(),minXOffset:Be,minYOffset:je,maxXOffset:Ee,maxYOffset:Me}),h()},o=function(){Le+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[]))};e.activityInterval=0!=e.configMinimumVisitLength?Ae.setTimeout((function(){Le+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(t||[]).concat(n?n():[])),e.activityInterval=Ae.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):Ae.setInterval(o,e.configHeartBeatTimer)}function W(e){var t=e.minimumVisitLength,n=e.heartbeatDelay;if(e=e.callback,D(t)&&D(n))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*n,callback:e};pe.warn("Activity tracking not enabled, please provide integer values for minimumVisitLength and heartbeatDelay.")}function X(e){var t=e.context,n=e.minXOffset,r=e.minYOffset,o=e.maxXOffset;e=e.maxYOffset;var i=xe.title;i!==Ke&&(Ke=i,Ce=void 0),ze.track(x({pageUrl:s(Te||We),pageTitle:N(Ce||Ke),referrer:s(ke||Xe),minXOffset:Math.round(n),maxXOffset:Math.round(o),minYOffset:Math.round(r),maxYOffset:Math.round(e)}),t)}var Y,Z,K,$,te,ne,re,oe,ie,ae,ue,ce,se,le,de,ge,ve,he,me;i.eventMethod=null!==(Y=i.eventMethod)&&void 0!==Y?Y:"post";var we=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},be=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n)},Se=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n)};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,Ce,Ie,De,Ne,Le,Be,Ee,je,Me,Ue,_e,Ve,Re,ze=k({base64:i.encodeBase64,corePlugins:i.plugins,callback:function(e){var t=Math.round((new Date).getTime()/1e3),n=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=!!Ne&&!!F(Ne);at||p?b():("0"===o?(Ve=r,n||"none"==dt||(c++,d=l,Ve=fe.v4()),gt=c):(new Date).getTime()-pt>1e3*ct&&(Ve=fe.v4(),gt++),e.add("vp",P()),e.add("ds",C()),e.add("vid",st?gt:ft?null:gt),e.add("sid",st?Ve:ft?null:Ve),e.add("duid",ft?null:i),e.add("uid",ft?null:Re),a(),e.add("refr",s(ke||Xe)),e.add("url",s(Te||We)),"none"!=dt&&(m(i,u,gt,t,d,Ve),y()),pt=(new Date).getTime()),t=!!Ne&&!!F(Ne),at||t||vt.enqueueRequest(e.build(),Qe)}}),He=Oe.userLanguage||Oe.language,Je=xe.characterSet||xe.charset,Fe=Q(Ae.location.hostname,Ae.location.href,E()),Ge=B(Fe[0]),We=Fe[1],Xe=Fe[2],qe=null!==(te=i.platform)&&void 0!==te?te:"web",Qe=O(r),Ye=null!==(ne=i.postPath)&&void 0!==ne?ne:"/com.snowplowanalytics.snowplow/tp2",Ze=null!==(re=i.appId)&&void 0!==re?re:"",Ke=xe.title,$e=null===(oe=i.resetActivityTrackingOnPageView)||void 0===oe||oe,et=null!==(ie=i.cookieName)&&void 0!==ie?ie:"_sp_",tt=null!==(ae=i.cookieDomain)&&void 0!==ae?ae:void 0,nt="/",rt=null!==(ue=i.cookieSameSite)&&void 0!==ue?ue:"None",ot=null===(ce=i.cookieSecure)||void 0===ce||ce,it=Oe.doNotTrack||Oe.msDoNotTrack||Ae.doNotTrack,at=void 0!==i.respectDoNotTrack&&(i.respectDoNotTrack&&("yes"===it||"1"===it)),ut=null!==(se=i.cookieLifetime)&&void 0!==se?se:63072e3,ct=null!==(le=i.sessionCookieTimeout)&&void 0!==le?le:1800,st=be(i),lt=Se(i),ft=!!i.anonymousTracking,dt=we(i),pt=(new Date).getTime(),gt=1,vt=q(e,o,"localStorage"==dt||"cookieAndLocalStorage"==dt,i.eventMethod,Ye,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!==(me=i.connectionTimeout)&&void 0!==me?me:5e3,lt),ht=!1,yt=!1,mt={enabled:!1,installed:!1,configurations:{}};return i.hasOwnProperty("discoverRootDomain")&&i.discoverRootDomain&&(tt=z(rt,ot)),ze.setTrackerVersion(n),ze.setTrackerNamespace(t),ze.setAppId(Ze),ze.setPlatform(qe),ze.addPayloadPair("cookie",Oe.cookieEnabled?"1":"0"),ze.addPayloadPair("cs",Je),ze.addPayloadPair("lang",He),ze.addPayloadPair("res",Pe.width+"x"+Pe.height),ze.addPayloadPair("cd",Pe.colorDepth),d(),S(),i.crossDomainLinker&&c(i.crossDomainLinker),ee(ee({},{getDomainSessionIndex:function(){return gt},getPageViewId:function(){return J()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),t=A(),n=t[1],r=t[2],o=t[3],i=t[4],a=t[5],u=t[6];"0"===t[0]?(Ve=u,"none"!=dt&&(o++,a=i,Ve=fe.v4()),gt=o,y()):(Ve=fe.v4(),gt++),"none"!=dt&&(m(n,r,gt,e,a,Ve),y()),pt=(new Date).getTime()},getCookieName:function(e){return et+e+"."+Ue},getUserId:function(){return Re},getDomainUserId:function(){return A()[1]},getDomainUserInfo:function(){return A()},setReferrerUrl:function(e){ke=e},setCustomUrl:function(e){a();var t,n=We;l(e)?Te=e:"/"===e.slice(0,1)?Te=l(n)+"://"+L(n)+e:(0<=(t=(n=s(n)).indexOf("?"))&&(n=n.slice(0,t)),(t=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,t+1)),Te=n+e)},setDocumentTitle:function(e){Ke=xe.title,Ce=e},discardHashTag:function(e){Ie=e},discardBrace:function(e){De=e},setCookiePath:function(e){nt=e,d()},setVisitorCookieTimeout:function(e){ut=e},crossDomainLinker:function(e){c(e)},enableActivityTracking:function(e){mt.enabled=!0,mt.configurations.pagePing=W(ee(ee({},e),{callback:X}))},enableActivityTrackingCallback:function(e){mt.enabled=!0,mt.configurations.callback=W(e)},updatePageActivity:function(){p()},setOptOutCookie:function(e){Ne=e},setUserId:function(e){Re=e},setUserIdFromLocation:function(e){a(),Re=M(e,We)},setUserIdFromReferrer:function(e){a(),Re=M(e,Xe)},setUserIdFromCookie:function(e){Re=F(e)},setCollectorUrl:function(e){Qe=O(e),vt.setCollectorUrl(Qe)},setBufferSize:function(e){vt.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),vt.executeQueue(),e.newBufferSize&&vt.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),function(e){var t=e.title,n=e.context,r=e.timestamp;if(e=e.contextCallback,a(),yt&&I(),yt=!0,Ke=xe.title,t=N((Ce=t)||Ke),ze.track(T({pageUrl:s(Te||We),pageTitle:t,referrer:s(ke||Xe)}),(n||[]).concat(e?e():[]),r),r=new Date,t=!1,mt.enabled&&!mt.installed){t=mt.installed=!0;var o={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),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")?j(xe,i,p,{passive:!0}):j(xe,i,p),h(),i=function(e,t){return void 0===t&&(t=p),function(e){return j(xe,e,t)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(i(xe)),["resize","focus","blur"].forEach(i(Ae)),i(Ae,g)("scroll")}if(mt.enabled&&($e||t))for(r in Le=r.getTime(),r=void 0,mt.configurations)(t=mt.configurations[r])&&(window.clearInterval(t.activityInterval),G(t,n,e))}(e)},preservePageViewId:function(){ht=!0},disableAnonymousTracking:function(e){e&&e.stateStorageStrategy?(i.stateStorageStrategy=e.stateStorageStrategy,i.anonymousTracking=!1,dt=we(i)):i.anonymousTracking=!1,ft=!!i.anonymousTracking,st=be(i),lt=Se(i),vt.setUseLocalStorage("localStorage"==dt||"cookieAndLocalStorage"==dt),vt.setAnonymousTracking(lt),S(),vt.executeQueue()},enableAnonymousTracking:function(e){i.anonymousTracking=e&&(null==e?void 0:e.options)||!0,ft=!!i.anonymousTracking,st=be(i),lt=Se(i),st||I(),vt.setAnonymousTracking(lt)},clearUserData:b}),{id:e,core:ze,sharedState:o})}(e,t,n,r,o,i);var u=ee(ee({},e),{addPlugin:function(e){var t,n;null===(t=i.plugins)||void 0===t||t.push(e),null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)}});return null===(a=i.plugins)||void 0===a||a.forEach((function(e){var t;null===(t=e.activateBrowserPlugin)||void 0===t||t.call(e,u)})),u}function Z(e){return $(e,Ce)}function K(){return Object.keys(Ce)}function $(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];t.hasOwnProperty(o)?n.push(t[o]):pe.warn(o+" not configured")}return n}for(var ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},te=n((function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=Array(16);e.exports=function(){for(var e,t=0;16>t;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}})),ne=[],re=0;256>re;++re)ne[re]=(re+256).toString(16).substr(1);var oe,ie,ae=function(e,t){return t=t||0,[ne[e[t++]],ne[e[t++]],ne[e[t++]],ne[e[t++]],"-",ne[e[t++]],ne[e[t++]],"-",ne[e[t++]],ne[e[t++]],"-",ne[e[t++]],ne[e[t++]],"-",ne[e[t++]],ne[e[t++]],ne[e[t++]],ne[e[t++]],ne[e[t++]],ne[e[t++]]].join("")},ue=0,ce=0;(re=function(e,t,n){if(n=t&&n||0,"string"==typeof e&&(t="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||te)())[6]=15&e[6]|64,e[8]=63&e[8]|128,t)for(var r=0;16>r;++r)t[n+r]=e[r];return t||ae(e)}).v1=function(e,t,n){n=t&&n||0;var r=t||[],o=(e=e||{}).node||oe,i=void 0!==e.clockseq?e.clockseq:ie;if(null==o||null==i){var a=te();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[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e,e=a/4294967296*1e4&268435455,r[n++]=e>>>8&255,r[n++]=255&e,r[n++]=e>>>24&15|16,r[n++]=e>>>16&255,r[n++]=i>>>8|128,r[n++]=255&i,i=0;6>i;++i)r[n+i]=o[i];return t||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(t){e=se[t]?t:se.warn},warn:function(n,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: "+n,r?console.warn.apply(console,t([i+"\n",r],o)):console.warn.apply(console,t([i],o)))},error:function(n,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.error&&"undefined"!=typeof console&&(i="Snowplow: "+n+"\n",r?console.error.apply(console,t([i+"\n",r],o)):console.error.apply(console,t([i],o)))},debug:function(n){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,t(["Snowplow: "+n],r))},info:function(n){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,t(["Snowplow: "+n],r))}}}(),ge=n((function(e){var t;t={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&t.rotl(e,8)|4278255360&t.rotl(e,24);for(var n=0;n<e.length;n++)e[n]=t.endian(e[n]);return e},randomBytes:function(e){for(var t=[];0<e;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;4>o;o++)8*n+6*o<=8*e.length?t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(n))>>>6-2*r);return t}},e.exports=t})),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 t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},he=ve,ye=n((function(e){var t,n,r,o;t=he.utf8,n=he.bin,r=function(e){e.constructor==String?e=t.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 n=ge.bytesToWords(e),r=8*e.length;e=[];var o=1732584193,i=-271733879,a=-1732584194,u=271733878,c=-1009589776;for(n[r>>5]|=128<<24-r%32,n[15+(r+64>>>9<<4)]=r,r=0;r<n.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]=n[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,t){return e=ge.wordsToBytes(r(e)),t&&t.asBytes?e:t&&t.asString?n.bytesToString(e):ge.bytesToHex(e)})._blocksize=16,o._digestsize=20,e.exports=o})),me=window,we=document,be=window,Se=document,ke=window.localStorage,Te=window.sessionStorage,xe=document,Ae=window,Oe=navigator,Pe=screen,Ce={},Ie=document,De=window,Ne=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=Ne,e.addEventListener=j,e.addTracker=function(e,t,n,r,o,i){return Ce.hasOwnProperty(e)?null:(Ce[e]=Y(e,t,n,r,o,i),Ce[e])},e.allTrackerNames=K,e.allTrackers=function(){return Ce},e.attemptDeleteLocalStorage=R,e.attemptGetLocalStorage=_,e.attemptGetSessionStorage=function(e){try{return Te.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=V,e.attemptWriteSessionStorage=function(e,t){try{return Te.setItem(e,t),!0}catch(e){return!1}},e.cookie=F,e.createSharedState=function(){function e(){var e;if(!t.hasLoaded)for(t.hasLoaded=!0,e=0;e<t.registeredOnLoadHandlers.length;e++)t.registeredOnLoadHandlers[e]();return!0}var t=new Ne;return document.visibilityState&&j(Ie,"visibilitychange",(function(){"hidden"==Ie.visibilityState&&t.bufferFlushers.forEach((function(e){e(!1)}))}),!1),j(De,"beforeunload",(function(){t.bufferFlushers.forEach((function(e){e(!1)}))}),!1),Ie.addEventListener?Ie.addEventListener("DOMContentLoaded",(function t(){Ie.removeEventListener("DOMContentLoaded",t,!1),e()})):Ie.attachEvent&&Ie.attachEvent("onreadystatechange",(function t(){"complete"===Ie.readyState&&(Ie.detachEvent("onreadystatechange",t),e())})),j(De,"load",e,!1),t},e.decorateQuerystring=U,e.deleteCookie=H,e.detectDocumentSize=C,e.detectViewport=P,e.dispatchToTrackers=function(e,t){try{Z(null!=e?e:K()).forEach(t)}catch(e){pe.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,t,n){try{$(null!=e?e:Object.keys(t),t).forEach(n)}catch(e){pe.error("Function failed",e)}},e.findRootDomain=z,e.fixupDomain=B,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 t=Object.prototype.hasOwnProperty.call(e,"allowlist"),n=X(e);return W(e,(function(e){e:{var r=0;for(e=G(e);r<e.length;r++)if(n[e[r]]){r=!0;break e}r=!1}return r===t}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var t=e.hasOwnProperty("allowlist"),n=X(e);return W(e,(function(e){return e.name in n===t}))},e.getHostName=L,e.getReferrer=E,e.getTracker=function(e){return Ce.hasOwnProperty(e)?Ce[e]:(pe.warn(e+" not configured"),null)},e.getTrackers=Z,e.hasLocalStorage=A,e.hasSessionStorage=function(){try{return!!me.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=D,e.isString=I,e.isValueInArray=function(e,t){for(var n=0;n<t.length;n++)if(t[n]===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 Ce.hasOwnProperty(e)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker-core", | ||
"version": "3.0.0-alpha.4", | ||
"version": "3.0.0-beta.1", | ||
"description": "Core functionality for Snowplow Browser trackers", | ||
@@ -24,3 +24,3 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/tracker-core": "3.0.0-alpha.4", | ||
"@snowplow/tracker-core": "3.0.0-beta.1", | ||
"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
1056018
8601
+ Added@snowplow/tracker-core@3.0.0-beta.1(transitive)
- Removed@snowplow/tracker-core@3.0.0-alpha.4(transitive)