Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@matomo.org>2020-07-24 14:11:05 +0300
committersgiehl <stefan@matomo.org>2020-07-24 15:28:48 +0300
commit679e73f1236969db0c2d767655cb84456a727d24 (patch)
tree648722fa79cb524f8819857e79163e0c1cf16d59
parent6b5f8138180716d5088d764f0b41d5787159b28a (diff)
parent3e1234a887f56a1cf853e29ba89370b234af5127 (diff)
Merge branch '3.x-dev' into 4.x-dev
-rw-r--r--CHANGELOG.md13
-rw-r--r--LegacyAutoloader.php11
-rwxr-xr-xconfig/global.ini.php6
-rw-r--r--config/global.php2
-rw-r--r--core/DeviceDetector/DeviceDetectorFactory.php3
-rw-r--r--core/Nonce.php39
-rw-r--r--core/Option.php23
-rw-r--r--core/Tracker/Request.php10
-rw-r--r--core/Tracker/Settings.php11
-rw-r--r--core/Tracker/Visit.php18
-rw-r--r--js/piwik.js200
-rw-r--r--js/piwik.min.js77
-rw-r--r--js/tracker.php13
-rw-r--r--libs/Zend/Session.php7
-rw-r--r--matomo.js77
-rw-r--r--piwik.js77
-rw-r--r--plugins/API/Menu.php4
-rw-r--r--plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml8
-rw-r--r--plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__API.getSuggestedValuesForSegment.xml4
-rw-r--r--plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__VisitsSummary.get_range.xml10
m---------plugins/CustomVariables0
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getBrand_day.xml2
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getModel_day.xml2
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml2
-rw-r--r--plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png4
-rw-r--r--plugins/Live/templates/getLastVisitsStart.twig4
-rw-r--r--plugins/Login/Controller.php44
-rw-r--r--plugins/Login/PasswordResetter.php48
-rw-r--r--plugins/Login/lang/en.json3
-rw-r--r--plugins/Login/templates/confirmResetPassword.twig45
-rw-r--r--plugins/Login/tests/Integration/PasswordResetterTest.php23
-rw-r--r--plugins/Login/tests/UI/Login_spec.js11
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png3
-rw-r--r--plugins/Morpheus/templates/javascriptCode.twig4
-rw-r--r--plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getImageTrackingCode.xml2
-rw-r--r--plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getJavascriptTag.xml4
-rw-r--r--plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getImageTrackingCode.xml2
-rw-r--r--plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getJavascriptTag.xml4
-rw-r--r--plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getImageTrackingCode.xml2
-rw-r--r--plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getJavascriptTag.xml4
-rw-r--r--plugins/UsersManager/API.php32
-rw-r--r--plugins/UsersManager/config/config.php4
-rw-r--r--plugins/UsersManager/tests/Integration/APITest.php26
-rw-r--r--plugins/UsersManager/tests/Integration/UserPreferencesTest.php32
-rw-r--r--tests/PHPUnit/Integration/OptionTest.php33
-rw-r--r--tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php26
-rw-r--r--tests/PHPUnit/System/expected/test_Archive_InvalidationWebsite2_NewDataShouldAppear__Actions.getPageUrls_month.xml12
-rw-r--r--tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_pageurlNotContainsSegment__Live.getLastVisitsDetails_month.xml2
-rw-r--r--tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml4
-rw-r--r--tests/PHPUnit/Unit/NonceTest.php6
-rw-r--r--tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png4
-rw-r--r--tests/UI/expected-screenshots/OneClickUpdate_login.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png4
-rw-r--r--tests/javascript/index.php80
55 files changed, 798 insertions, 299 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bb1f52fa5..82ff231a3a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -141,6 +141,19 @@ These are only recommendations (because we will keep backward compatibility for
* The _idvc, _idts, _viewts and _ects tracker parameters are no longer used, the values are calculated server side.
Note: tracking these values server side means replaying log data in the past will result in inaccurate values for these dimensions.
+## Matomo 3.14.0
+
+### New API
+
+The following new JavaScript tracker methods have been added:
+
+* `_paq.push(['setVisitorId', visitorId]);`. This can be used to force a specific visitorId. It takes a 16 digit hexadecimal string.
+* `_paq.push(['requireCookieConsent']);`. Call this method if cookies should be only used when consent was given.
+* `_paq.push(['rememberCookieConsentGiven']);`. Call this method when a user gives you cookie consent.
+* `_paq.push(['forgetCookieConsentGiven']);`. Call this method when a user revokes cookie consent.
+* `_paq.push(['setCookieConsentGiven']);`. Call this method to let the tracker know consent was given for the current page view (won't be remembered across requests).
+* For more info on consent have a look at https://developer.matomo.org/guides/tracking-javascript-guide#asking-for-consent
+
## Matomo 3.13.6
### API Changes
diff --git a/LegacyAutoloader.php b/LegacyAutoloader.php
index 511cf8ce29..44b4a62e28 100644
--- a/LegacyAutoloader.php
+++ b/LegacyAutoloader.php
@@ -14,10 +14,15 @@ class LegacyAutoloader
public function load_class($className)
{
- if (strpos($className, 'Piwik\\') === 0) {
+ if (strpos($className, 'Matomo\\') === 0) {
+ $newName = 'Piwik' . substr($className, 6);
+ if (class_exists($newName) && !class_exists($className, false)) {
+ @class_alias($newName, $className);
+ }
+ } elseif (strpos($className, 'Piwik\\') === 0) {
$newName = 'Matomo' . substr($className, 5);
- if (class_exists($newName)) {
- class_alias($newName, $className);
+ if (class_exists($newName) && !class_exists($className, false)) {
+ @class_alias($newName, $className);
}
}
}
diff --git a/config/global.ini.php b/config/global.ini.php
index a15991e392..7c1ba59e37 100755
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -62,7 +62,7 @@ host = localhost
username = "@USERNAME@"
password =
dbname = matomo_tests
-tables_prefix = matomotests_
+tables_prefix =
port = 3306
adapter = PDO\MYSQL
type = InnoDB
@@ -744,8 +744,8 @@ enable_tracking_failures_notification = 1
[Tracker]
; When enabled and a userId is set, then the visitorId will be automatically set based on the userId. This allows to
-; identify the same user as the same visitor across devices.
-; Disabling this feature can be useful for example when using the third party cookie, where all Matomo tracked sites
+; identify the same user as the same visitor across devices.
+; Disabling this feature can be useful for example when using the third party cookie, where all Matomo tracked sites
; use the same "global" visitorId for a device and you want to see when the same user switches between devices.
enable_userid_overwrites_visitorid = 1
diff --git a/config/global.php b/config/global.php
index ab4a17119a..9b199520dc 100644
--- a/config/global.php
+++ b/config/global.php
@@ -79,6 +79,8 @@ return array(
'Piwik\Translation\Loader\LoaderInterface' => DI\object('Piwik\Translation\Loader\LoaderCache')
->constructor(DI\get('Piwik\Translation\Loader\JsonFileLoader')),
+ 'DeviceDetector\Cache\Cache' => DI\object('Piwik\DeviceDetector\DeviceDetectorCache')->constructor(86400),
+
'observers.global' => array(),
/**
diff --git a/core/DeviceDetector/DeviceDetectorFactory.php b/core/DeviceDetector/DeviceDetectorFactory.php
index a10c06092b..6aa340e639 100644
--- a/core/DeviceDetector/DeviceDetectorFactory.php
+++ b/core/DeviceDetector/DeviceDetectorFactory.php
@@ -10,6 +10,7 @@ namespace Piwik\DeviceDetector;
use DeviceDetector\DeviceDetector;
use Piwik\Common;
+use Piwik\Container\StaticContainer;
class DeviceDetectorFactory
{
@@ -51,7 +52,7 @@ class DeviceDetectorFactory
{
$deviceDetector = new DeviceDetector($userAgent);
$deviceDetector->discardBotInformation();
- $deviceDetector->setCache(new DeviceDetectorCache(86400));
+ $deviceDetector->setCache(StaticContainer::get('DeviceDetector\Cache\Cache'));
$deviceDetector->parse();
return $deviceDetector;
}
diff --git a/core/Nonce.php b/core/Nonce.php
index 9f5a9091bc..ef0b09bf21 100644
--- a/core/Nonce.php
+++ b/core/Nonce.php
@@ -127,28 +127,35 @@ class Nonce
public static function getAcceptableOrigins()
{
$host = Url::getCurrentHost(null);
- $port = '';
-
- // parse host:port
- if (preg_match('/^([^:]+):([0-9]+)$/D', $host, $matches)) {
- $host = $matches[1];
- $port = $matches[2];
- }
if (empty($host)) {
return array();
}
- // standard ports
- $origins = array(
- 'http://' . $host,
- 'https://' . $host,
- );
-
- // non-standard ports
- if (!empty($port) && $port != 80 && $port != 443) {
- $origins[] = 'http://' . $host . ':' . $port;
+ // parse host:port
+ if (preg_match('/^([^:]+):([0-9]+)$/D', $host, $matches)) {
+ $host = $matches[1];
+ $port = $matches[2];
+ $origins = array(
+ 'http://' . $host,
+ 'https://' . $host,
+ );
+ if ($port != 443) {
+ $origins[] = 'http://' . $host .':' . $port;
+ }
$origins[] = 'https://' . $host . ':' . $port;
+ } elseif (Config::getInstance()->General['force_ssl']) {
+ $origins = array(
+ 'https://' . $host,
+ 'https://' . $host . ':443',
+ );
+ } else {
+ $origins = array(
+ 'http://' . $host,
+ 'https://' . $host,
+ 'http://' . $host . ':80',
+ 'https://' . $host . ':443',
+ );
}
return $origins;
diff --git a/core/Option.php b/core/Option.php
index be6bdef8f4..4b9fc05985 100644
--- a/core/Option.php
+++ b/core/Option.php
@@ -49,10 +49,11 @@ class Option
}
/**
- * Returns option values for options whose names are like a given pattern.
+ * Returns option values for options whose names are like a given pattern. Only `%` is supported as part of the
+ * pattern.
*
* @param string $namePattern The pattern used in the SQL `LIKE` expression
- * used to SELECT options.
+ * used to SELECT options.`'%'` characters should be used as wildcard. Underscore match is not supported.
* @return array Array mapping option names with option values.
*/
public static function getLike($namePattern)
@@ -85,10 +86,10 @@ class Option
}
/**
- * Deletes all options that match the supplied pattern.
+ * Deletes all options that match the supplied pattern. Only `%` is supported as part of the
+ * pattern.
*
- * @param string $namePattern Pattern of key to match. `'%'` characters should be used as wildcards, and literal
- * `'_'` characters should be escaped.
+ * @param string $namePattern Pattern of key to match. `'%'` characters should be used as wildcard. Underscore match is not supported.
* @param string $value If supplied, options will be deleted only if their value matches this value.
*/
public static function deleteLike($namePattern, $value = null)
@@ -231,6 +232,8 @@ class Option
protected function deleteNameLike($name, $value = null)
{
$name = $this->trimOptionNameIfNeeded($name);
+ $name = $this->getNameForLike($name);
+
$sql = 'DELETE FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
$bind[] = $name;
@@ -244,9 +247,19 @@ class Option
$this->clearCache();
}
+ private function getNameForLike($name)
+ {
+ $name = str_replace('\_', '###NOREPLACE###', $name);
+ $name = str_replace('_', '\_', $name);
+ $name = str_replace( '###NOREPLACE###', '\_', $name);
+ return $name;
+ }
+
protected function getNameLike($name)
{
$name = $this->trimOptionNameIfNeeded($name);
+ $name = $this->getNameForLike($name);
+
$sql = 'SELECT option_name, option_value FROM `' . Common::prefixTable('option') . '` WHERE option_name LIKE ?';
$bind = array($name);
$rows = Db::fetchAll($sql, $bind);
diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php
index 57458fa000..98133e4319 100644
--- a/core/Tracker/Request.php
+++ b/core/Tracker/Request.php
@@ -208,7 +208,7 @@ class Request
return true;
}
}
-
+
Piwik::postEvent('Request.initAuthenticationObject');
/** @var \Piwik\Auth $auth */
@@ -541,7 +541,7 @@ class Request
return Common::getRequestVar('ua', $default, 'string', $this->params);
}
- protected function shouldUseThirdPartyCookie()
+ public function shouldUseThirdPartyCookie()
{
return (bool)Config::getInstance()->Tracker['use_third_party_id_cookie'];
}
@@ -567,6 +567,10 @@ class Request
return;
}
+ if (\Piwik\Tracker\IgnoreCookie::isIgnoreCookieFound()) {
+ return;
+ }
+
$cookie = $this->makeThirdPartyCookieUID();
$idVisitor = bin2hex($idVisitor);
$cookie->set(0, $idVisitor);
@@ -631,7 +635,7 @@ class Request
$found = false;
if (TrackerConfig::getConfigValue('enable_userid_overwrites_visitorid')) {
- // If User ID is set it takes precedence
+ // If User ID is set it takes precedence
$userId = $this->getForcedUserId();
if ($userId) {
$userIdHashed = $this->getUserIdHashed($userId);
diff --git a/core/Tracker/Settings.php b/core/Tracker/Settings.php
index 656d07dcca..74a66d0c65 100644
--- a/core/Tracker/Settings.php
+++ b/core/Tracker/Settings.php
@@ -57,6 +57,17 @@ class Settings // TODO: merge w/ visitor recognizer or make it it's own service.
$os = empty($os['short_name']) ? 'UNK' : $os['short_name'];
}
+ $client = $deviceDetector->getClient();
+ if (!empty($client['name']) && $client['name'] === 'Internet Explorer') {
+ // we assume cookies are disabled... when in tracker cookies are disabled, this ensures when upgrading to this version
+ // that no fingerprint changes in the 30min window during the upgrade...
+ // We don't include it anymore as it otherwise may cause new visits to be created when switching between
+ // cookies disabled and enabled in IE11 or older. Before Matomo 3.13.7 when cookies were disabled, then
+ // this value was set to 0. For people with cookies enabled the fingerprint is not as relevant as the visitorId
+ // is used to identify a visitor
+ $plugin_Cookie = '0';
+ }
+
$browserLang = substr($request->getBrowserLanguage(), 0, 20); // limit the length of this string to match db
$trackerConfig = Config::getInstance()->Tracker;
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 738f734f16..61c5893455 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -561,10 +561,26 @@ class Visit implements VisitInterface
*/
private function setIdVisitorForExistingVisit($valuesToUpdate)
{
- // Might update the idvisitor when it was forced or overwritten for this visit
if (strlen($this->visitProperties->getProperty('idvisitor')) == Tracker::LENGTH_BINARY_ID) {
$valuesToUpdate['idvisitor'] = $this->visitProperties->getProperty('idvisitor');
}
+
+ $visitorId = $this->request->getVisitorId();
+ if ($visitorId && strlen($visitorId) === Tracker::LENGTH_BINARY_ID) {
+ // Might update the idvisitor when it was forced or overwritten for this visit
+ $valuesToUpdate['idvisitor'] = $this->request->getVisitorId();
+ }
+
+ if (TrackerConfig::getConfigValue('enable_userid_overwrites_visitorid')) {
+ // User ID takes precedence and overwrites idvisitor value
+ $userId = $this->request->getForcedUserId();
+ if ($userId) {
+ $userIdHash = $this->request->getUserIdHashed($userId);
+ $binIdVisitor = Common::hex2bin($userIdHash);
+ $this->visitProperties->setProperty('idvisitor', $binIdVisitor);
+ $valuesToUpdate['idvisitor'] = $binIdVisitor;
+ }
+ }
if (TrackerConfig::getConfigValue('enable_userid_overwrites_visitorid')) {
// User ID takes precedence and overwrites idvisitor value
diff --git a/js/piwik.js b/js/piwik.js
index d15eac4b1b..e6db6e4848 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -36,7 +36,8 @@
/*members Piwik, Matomo, encodeURIComponent, decodeURIComponent, getElementsByTagName,
shift, unshift, piwikAsyncInit, matomoAsyncInit, matomoPluginAsyncInit , frameElement, self, hasFocus,
createElement, appendChild, characterSet, charset, all,
- addEventListener, attachEvent, removeEventListener, detachEvent, disableCookies,
+ addEventListener, attachEvent, removeEventListener, detachEvent, disableCookies, setCookieConsentGiven,
+ areCookiesEnabled, getRememberedCookieConsent, rememberCookieConsentGiven, forgetCookieConsentGiven, requireCookieConsent,
cookie, domain, readyState, documentElement, doScroll, title, text, contentWindow, postMessage,
location, top, onerror, document, referrer, parent, links, href, protocol, name,
performance, mozPerformance, msPerformance, webkitPerformance, timing, connectEnd, requestStart, responseStart,
@@ -2136,6 +2137,7 @@ if (typeof window.Matomo !== 'object') {
// constants
CONSENT_COOKIE_NAME = 'mtm_consent',
+ COOKIE_CONSENT_COOKIE_NAME = 'mtm_cookie_consent',
CONSENT_REMOVED_COOKIE_NAME = 'mtm_consent_removed',
// Current URL and Referrer URL
@@ -2370,7 +2372,10 @@ if (typeof window.Matomo !== 'object') {
consentRequestsQueue = [],
// a unique ID for this tracker during this request
- uniqueTrackerId = trackerIdCounter++;
+ uniqueTrackerId = trackerIdCounter++,
+
+ // whether a tracking request has been sent yet during this page view
+ hasSentTrackingRequestYet = false;
// Document title
try {
@@ -2952,6 +2957,9 @@ if (typeof window.Matomo !== 'object') {
consentRequestsQueue.push(request);
return;
}
+
+ hasSentTrackingRequestYet = true;
+
if (!configDoNotTrack && request) {
if (configConsentRequired && configHasConsent) { // send a consent=1 when explicit consent is given for the apache logs
request += '&consent=1';
@@ -3018,6 +3026,8 @@ if (typeof window.Matomo !== 'object') {
return;
}
+ hasSentTrackingRequestYet = true;
+
makeSureThereIsAGapAfterFirstTrackingRequestToPreventMultipleVisitorCreation(function () {
var chunks = arrayChunk(requests, 50);
@@ -3126,8 +3136,12 @@ if (typeof window.Matomo !== 'object') {
browserFeatures.java = '1';
}
- // other browser features
- browserFeatures.cookie = hasCookies();
+ if (!isDefined(windowAlias.showModalDialog) && isDefined(navigatorAlias.cookieEnabled)) {
+ browserFeatures.cookie = navigatorAlias.cookieEnabled ? '1' : '0';
+ } else {
+ // Eg IE11 ... prevent error when cookieEnabled is requested within modal dialog. see #11507
+ browserFeatures.cookie = hasCookies();
+ }
}
var width = parseInt(screenAlias.width, 10);
@@ -3432,7 +3446,6 @@ if (typeof window.Matomo !== 'object') {
function setSiteId(siteId) {
configTrackerSiteId = siteId;
- setVisitorIdCookie();
}
function sortObjectByKeys(value) {
@@ -4818,9 +4831,6 @@ if (typeof window.Matomo !== 'object') {
this.getContent = function () {
return content;
};
- this.setVisitorId = function (visitorId) {
- visitorUUID = visitorId;
- };
this.buildContentImpressionRequest = buildContentImpressionRequest;
this.buildContentInteractionRequest = buildContentInteractionRequest;
@@ -5048,6 +5058,22 @@ if (typeof window.Matomo !== 'object') {
};
/**
+ * Sets a Visitor ID to this visitor. Should be a 16 digit hex string.
+ * The visitorId won't be persisted in a cookie or something similar and needs to be set every time.
+ *
+ * @param string User ID
+ */
+ this.setVisitorId = function (visitorId) {
+ var validation = /[0-9A-Fa-f]{16}/g;
+
+ if (isString(visitorId) && validation.test(visitorId)) {
+ visitorUUID = visitorId;
+ } else {
+ logConsoleError('Invalid visitorId set' + visitorId);
+ }
+ };
+
+ /**
* Gets the User ID if set.
*
* @returns string User ID
@@ -5755,7 +5781,6 @@ if (typeof window.Matomo !== 'object') {
*/
this.disableCookies = function () {
configCookiesDisabled = true;
- browserFeatures.cookie = '0';
if (configTrackerSiteId) {
deleteCookies();
@@ -5763,6 +5788,115 @@ if (typeof window.Matomo !== 'object') {
};
/**
+ * Detects if cookies are enabled or not
+ * @returns {boolean}
+ */
+ this.areCookiesEnabled = function () {
+ return !configCookiesDisabled;
+ };
+
+ /**
+ * Enables cookies if they were disabled previously.
+ */
+ this.setCookieConsentGiven = function () {
+ if (configCookiesDisabled && !configDoNotTrack) {
+ configCookiesDisabled = false;
+ if (configTrackerSiteId && hasSentTrackingRequestYet) {
+ setVisitorIdCookie();
+
+ // sets attribution cookie, and updates visitorId in the backend
+ // because hasSentTrackingRequestYet=true we assume there might not be another tracking
+ // request within this page view so we trigger one ourselves.
+ // if no tracking request has been sent yet, we don't set the attribution cookie cause Matomo
+ // sets the cookie only when there is a tracking request. It'll be set if the user sends
+ // a tracking request afterwards
+ var request = getRequest('ping=1', null, 'ping');
+ sendRequest(request, configTrackerPause);
+ }
+ }
+ };
+
+ /**
+ * When called, no cookies will be set until you have called `setCookieConsentGiven()`
+ * unless consent was given previously AND you called {@link rememberCookieConsentGiven()} when the user
+ * gave consent.
+ *
+ * This may be useful when you want to implement for example a popup to ask for cookie consent.
+ * Once the user has given consent, you should call {@link setCookieConsentGiven()}
+ * or {@link rememberCookieConsentGiven()}.
+ *
+ * If you require tracking consent for example because you are tracking personal data and GDPR applies to you,
+ * then have a look at `_paq.push(['requireConsent'])` instead.
+ *
+ * If the user has already given consent in the past, you can either decide to not call `requireCookieConsent` at all
+ * or call `_paq.push(['setCookieConsentGiven'])` on each page view at any time after calling `requireCookieConsent`.
+ *
+ * When the user gives you the consent to set cookies, you can also call `_paq.push(['rememberCookieConsentGiven', optionalTimeoutInHours])`
+ * and for the duration while the cookie consent is remembered, any call to `requireCoookieConsent` will be automatically ignored
+ * until you call `forgetCookieConsentGiven`.
+ * `forgetCookieConsentGiven` needs to be called when the user removes consent for using cookies. This means if you call `rememberCookieConsentGiven` at the
+ * time the user gives you consent, you do not need to ever call `_paq.push(['setCookieConsentGiven'])` as the consent
+ * will be detected automatically through cookies.
+ */
+ this.requireCookieConsent = function() {
+ if (this.getRememberedCookieConsent()) {
+ return false;
+ }
+ this.disableCookies();
+ return true;
+ };
+
+ /**
+ * If the user has given cookie consent previously and this consent was remembered, it will return the number
+ * in milliseconds since 1970/01/01 which is the date when the user has given cookie consent. Please note that
+ * the returned time depends on the users local time which may not always be correct.
+ *
+ * @returns number|string
+ */
+ this.getRememberedCookieConsent = function () {
+ return getCookie(COOKIE_CONSENT_COOKIE_NAME);
+ };
+
+ /**
+ * Calling this method will remove any previously given cookie consent and it disables cookies for subsequent
+ * page views. You may call this method if the user removes cookie consent manually, or if you
+ * want to re-ask for cookie consent after a specific time period.
+ */
+ this.forgetCookieConsentGiven = function () {
+ deleteCookie(COOKIE_CONSENT_COOKIE_NAME, configCookiePath, configCookieDomain);
+ this.disableCookies();
+ };
+
+ /**
+ * Calling this method will remember that the user has given cookie consent across multiple requests by setting
+ * a cookie named "mtm_cookie_consent". You can optionally define the lifetime of that cookie in hours
+ * using a parameter.
+ *
+ * When you call this method, we imply that the user has given cookie consent for this page view, and will also
+ * imply consent for all future page views unless the cookie expires or the user
+ * deletes all her or his cookies. Remembering cookie consent means even if you call {@link disableCookies()},
+ * then cookies will still be enabled and it won't disable cookies since the user has given consent for cookies.
+ *
+ * Please note that this feature requires you to set the `cookieDomain` and `cookiePath` correctly. Please
+ * also note that when you call this method, consent will be implied for all sites that match the configured
+ * cookieDomain and cookiePath. Depending on your website structure, you may need to restrict or widen the
+ * scope of the cookie domain/path to ensure the consent is applied to the sites you want.
+ *
+ * @param int hoursToExpire After how many hours the cookie consent should expire. By default the consent is valid
+ * for 30 years unless cookies are deleted by the user or the browser prior to this
+ */
+ this.rememberCookieConsentGiven = function (hoursToExpire) {
+ if (hoursToExpire) {
+ hoursToExpire = hoursToExpire * 60 * 60 * 1000;
+ } else {
+ hoursToExpire = 30 * 365 * 24 * 60 * 60 * 1000;
+ }
+ this.setCookieConsentGiven();
+ var now = new Date().getTime();
+ setCookie(COOKIE_CONSENT_COOKIE_NAME, now, hoursToExpire, configCookiePath, configCookieDomain, configCookieIsSecure);
+ };
+
+ /**
* One off cookies clearing. Useful to call this when you know for sure a new visitor is using the same browser,
* it maybe helps to "reset" tracking cookies to prevent data reuse for different users.
*/
@@ -6556,10 +6690,6 @@ if (typeof window.Matomo !== 'object') {
* This may be useful when you want to implement for example a popup to ask for consent before tracking the user.
* Once the user has given consent, you should call {@link setConsentGiven()} or {@link rememberConsentGiven()}.
*
- * Please note that when consent is required, we will temporarily set cookies but not track any data. Those
- * cookies will only exist during this page view and deleted as soon as the user navigates to a different page
- * or closes the browser.
- *
* If you require consent for tracking personal data for example, you should first call
* `_paq.push(['requireConsent'])`.
*
@@ -6574,6 +6704,11 @@ if (typeof window.Matomo !== 'object') {
this.requireConsent = function () {
configConsentRequired = true;
configHasConsent = this.hasRememberedConsent();
+ if (!configHasConsent) {
+ // we won't call this.disableCookies() since we don't want to delete any cookies just yet
+ // user might call `setConsentGiven` next
+ configCookiesDisabled = true;
+ }
// Matomo.addPlugin might not be defined at this point, we add the plugin directly also to make JSLint happy
// We also want to make sure to define an unload listener for each tracker, not only one tracker.
coreConsentCounter++;
@@ -6591,10 +6726,16 @@ if (typeof window.Matomo !== 'object') {
* Call this method once the user has given consent. This will cause all tracking requests from this
* page view to be sent. Please note that the given consent won't be remembered across page views. If you
* want to remember consent across page views, call {@link rememberConsentGiven()} instead.
+ *
+ * It will also automatically enable cookies if they were disabled previously.
+ *
+ * @param bool [setCookieConsent=true] Internal parameter. Defines whether cookies should be enabled or not.
*/
- this.setConsentGiven = function () {
+ this.setConsentGiven = function (setCookieConsent) {
configHasConsent = true;
+
deleteCookie(CONSENT_REMOVED_COOKIE_NAME, configCookiePath, configCookieDomain);
+
var i, requestType;
for (i = 0; i < consentRequestsQueue.length; i++) {
requestType = typeof consentRequestsQueue[i];
@@ -6605,11 +6746,23 @@ if (typeof window.Matomo !== 'object') {
}
}
consentRequestsQueue = [];
+
+ // we need to enable cookies after sending the previous requests as it will make sure that we send
+ // a ping request if needed. Cookies are only set once we call `getRequest`. Above only calls sendRequest
+ // meaning no cookies will be created unless we called enableCookies after at least one request has been sent.
+ // this will cause a ping request to be sent that sets the cookies and also updates the newly generated visitorId
+ // on the server.
+ // If the user calls setConsentGiven before sending any tracking request (which usually is the case) then
+ // nothing will need to be done as it only enables cookies and the next tracking request will set the cookies
+ // etc.
+ if (!isDefined(setCookieConsent) || setCookieConsent) {
+ this.setCookieConsentGiven();
+ }
};
/**
* Calling this method will remember that the user has given consent across multiple requests by setting
- * a cookie. You can optionally define the lifetime of that cookie in milliseconds using a parameter.
+ * a cookie. You can optionally define the lifetime of that cookie in hours using a parameter.
*
* When you call this method, we imply that the user has given consent for this page view, and will also
* imply consent for all future page views unless the cookie expires (if timeout defined) or the user
@@ -6621,6 +6774,9 @@ if (typeof window.Matomo !== 'object') {
* for all sites that match the configured cookieDomain and cookiePath. Depending on your website structure,
* you may need to restrict or widen the scope of the cookie domain/path to ensure the consent is applied
* to the sites you want.
+ *
+ * @param int hoursToExpire After how many hours the consent should expire. By default the consent is valid
+ * for 30 years unless cookies are deleted by the user or the browser prior to this
*/
this.rememberConsentGiven = function (hoursToExpire) {
if (hoursToExpire) {
@@ -6628,7 +6784,10 @@ if (typeof window.Matomo !== 'object') {
} else {
hoursToExpire = 30 * 365 * 24 * 60 * 60 * 1000;
}
- this.setConsentGiven();
+ var setCookieConsent = true;
+ // we currently always enable cookies if we remember consent cause we don't store across requests whether
+ // cookies should be automatically enabled or not.
+ this.setConsentGiven(setCookieConsent);
var now = new Date().getTime();
setCookie(CONSENT_COOKIE_NAME, now, hoursToExpire, configCookiePath, configCookieDomain, configCookieIsSecure);
};
@@ -6644,6 +6803,7 @@ if (typeof window.Matomo !== 'object') {
deleteCookie(CONSENT_COOKIE_NAME, configCookiePath, configCookieDomain);
setCookie(CONSENT_REMOVED_COOKIE_NAME, new Date().getTime(), thirtyYears, configCookiePath, configCookieDomain, configCookieIsSecure);
+ this.forgetCookieConsentGiven();
this.requireConsent();
};
@@ -6665,7 +6825,11 @@ if (typeof window.Matomo !== 'object') {
/**
* Alias for rememberConsentGiven(). After calling this function, the current user will be tracked.
*/
- this.forgetUserOptOut = this.rememberConsentGiven;
+ this.forgetUserOptOut = function () {
+ // we can't automatically enable cookies here as we don't know if user actually gave consent for cookies
+ var setCookieConsent = false;
+ this.rememberConsentGiven(0, setCookieConsent);
+ };
/**
* Mark performance metrics as available, once onload event has finished
@@ -6728,7 +6892,7 @@ if (typeof window.Matomo !== 'object') {
* Constructor
************************************************************/
- var applyFirst = ['addTracker', 'disableCookies', 'setTrackerUrl', 'setAPIUrl', 'enableCrossDomainLinking', 'setCrossDomainLinkingTimeout', 'setSessionCookieTimeout', 'setVisitorCookieTimeout', 'setCookieNamePrefix', 'setSecureCookie', 'setCookiePath', 'setCookieDomain', 'setDomains', 'setUserId', 'setSiteId', 'alwaysUseSendBeacon', 'enableLinkTracking', 'requireConsent', 'setConsentGiven'];
+ var applyFirst = ['addTracker', 'forgetCookieConsentGiven', 'requireCookieConsent', 'disableCookies', 'setTrackerUrl', 'setAPIUrl', 'enableCrossDomainLinking', 'setCrossDomainLinkingTimeout', 'setSessionCookieTimeout', 'setVisitorCookieTimeout', 'setCookieNamePrefix', 'setSecureCookie', 'setCookiePath', 'setCookieDomain', 'setDomains', 'setUserId', 'setVisitorId', 'setSiteId', 'alwaysUseSendBeacon', 'enableLinkTracking', 'setCookieConsentGiven', 'requireConsent', 'setConsentGiven'];
function createFirstTracker(matomoUrl, siteId)
{
diff --git a/js/piwik.min.js b/js/piwik.min.js
index ceac1f78db..0875c5db97 100644
--- a/js/piwik.min.js
+++ b/js/piwik.min.js
@@ -29,43 +29,44 @@ ao=ae.findFirstNodeHavingAttribute(ap,this.CONTENT_PIECE_ATTR);if(!ao){ao=ae.fin
},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||S.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap
}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(ao){if(ae.hasNodeAttribute(ao,this.CONTENT_IGNOREINTERACTION_ATTR)){return true}if(ae.hasNodeCssClass(ao,this.CONTENT_IGNOREINTERACTION_CLASS)){return true}if(ae.hasNodeCssClass(ao,this.LEGACY_CONTENT_IGNOREINTERACTION_CLASS)){return true}return false}};function W(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(Q(ap,"matomo.php")){ap=f(ap,"matomo.php".length)
}else{if(Q(ap,"piwik.php")){ap=f(ap,"piwik.php".length)}else{if(Q(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(Q(ap,"/js/")){ap=f(ap,"js/".length)}return ap}function N(av){var ax="Matomo_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}S.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=S.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,av,aq){var au=S.name.split("###"),at=au[1],ao=au[2],ar=au[3],aw=W(ap,av);n(aw+"plugins/Overlay/client/client.js?v=1",function(){Matomo_Overlay_Client.initialize(aw,aq,at,ao,ar)})}function u(){var aq;try{aq=S.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return S.self!==S.top
-}catch(ao){return true}}function P(ce,b9){var bI=this,bc="mtm_consent",cM="mtm_consent_removed",b4=aa(G.domain,S.location.href,K()),cU=L(b4[0]),bN=o(b4[1]),bn=o(b4[2]),cS=false,ci="GET",da=ci,aH="application/x-www-form-urlencoded; charset=UTF-8",cx=aH,aD=ce||"",bH="",cZ="",b6=b9||"",by="",bO="",a3,bi="",c6=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ax=[cU],bz=[],bL=[],a7=[],bJ=500,cW=true,cJ,a4,bR,c7=1800,bP,ao,cq=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bG=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bj="_pk_",av="pk_vid",aY=180,cX,bp,bS=false,bl=false,cQ,bd,bv,cK=33955200000,co=1800000,c5=15768000000,a1=true,bE=false,bg=false,bQ=false,aP=false,cb,bW={},cm={},bm={},bt=200,ct={},c0={},c8={},ca=[],cf=false,cC=false,ap=false,c9=false,cN=false,aM=false,bb=u(),cy=null,cY=null,cc,aQ,bA,b7=am,bo,aK,cr=0,bu=["id","ses","cvar","ref"],cB=false,bB=null,cL=[],aw=T++;
-try{bi=G.title}catch(cz){bi=""}function de(dq,dn,dm,dp,dl,dk){if(bl){return}var dj;if(dm){dj=new Date();dj.setTime(dj.getTime()+dm)}G.cookie=dq+"="+s(dn)+(dm?";expires="+dj.toGMTString():"")+";path="+(dp||"/")+(dl?";domain="+dl:"")+(dk?";secure":"")+";SameSite=Lax"}function aC(dl){if(bl){return 0}var dj=new RegExp("(^|;)[ ]*"+dl+"=([^;]*)"),dk=dj.exec(G.cookie);return dk?R(dk[2]):0}bB=!aC(cM);function b2(dj){var dk;dj=j(dj,av);if(bP){dk=new RegExp("#.*");return dj.replace(dk,"")}return dj}function bV(dl,dj){var dm=r(dj),dk;if(dm){return dj}if(dj.slice(0,1)==="/"){return r(dl)+"://"+d(dl)+dj}dl=b2(dl);dk=dl.indexOf("?");if(dk>=0){dl=dl.slice(0,dk)}dk=dl.lastIndexOf("/");if(dk!==dl.length-1){dl=dl.slice(0,dk+1)}return dl+dj}function cH(dl,dj){var dk;dl=String(dl).toLowerCase();dj=String(dj).toLowerCase();if(dl===dj){return true}if(dj.slice(0,1)==="."){if(dl===dj.slice(1)){return true}dk=dl.length-dj.length;if((dk>0)&&(dl.slice(dk)===dj)){return true}}return false}function cl(dj){var dk=document.createElement("a");
-if(dj.indexOf("//")!==0&&dj.indexOf("http")!==0){if(dj.indexOf("*")===0){dj=dj.substr(1)}if(dj.indexOf(".")===0){dj=dj.substr(1)}dj="http://"+dj}dk.href=v.toAbsoluteUrl(dj);if(dk.pathname){return dk.pathname}return""}function a2(dk,dj){if(!aj(dj,"/")){dj="/"+dj}if(!aj(dk,"/")){dk="/"+dk}var dl=(dj==="/"||dj==="/*");if(dl){return true}if(dk===dj){return true}dj=String(dj).toLowerCase();dk=String(dk).toLowerCase();if(Q(dj,"*")){dj=dj.slice(0,-1);dl=(!dj||dj==="/");if(dl){return true}if(dk===dj){return true}return dk.indexOf(dj)===0}if(!Q(dk,"/")){dk+="/"}if(!Q(dj,"/")){dj+="/"}return dk.indexOf(dj)===0}function ar(dn,dq){var dk,dj,dl,dm,dp;for(dk=0;dk<ax.length;dk++){dm=L(ax[dk]);dp=cl(ax[dk]);if(cH(dn,dm)&&a2(dq,dp)){return true}}return false}function aU(dm){var dk,dj,dl;for(dk=0;dk<ax.length;dk++){dj=L(ax[dk].toLowerCase());if(dm===dj){return true}if(dj.slice(0,1)==="."){if(dm===dj.slice(1)){return true}dl=dm.length-dj.length;if((dl>0)&&(dm.slice(dl)===dj)){return true}}}return false}function cp(dj,dl){dj=dj.replace("send_image=0","send_image=1");
-var dk=new Image(1,1);dk.onload=function(){E=0;if(typeof dl==="function"){dl({request:dj,trackerUrl:aD,success:true})}};dk.onerror=function(){if(typeof dl==="function"){dl({request:dj,trackerUrl:aD,success:false})}};dk.src=aD+(aD.indexOf("?")<0?"?":"&")+dj}function cE(dj){if(da==="POST"){return true}return dj&&(dj.length>2000||dj.indexOf('{"requests"')===0)}function aJ(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a5(dn,dr,dq){var dl=aJ();if(!dl){return false}var dm={type:"application/x-www-form-urlencoded; charset=UTF-8"};var ds=false;var dk=aD;try{var dj=new Blob([dn],dm);if(dq&&!cE(dn)){dj=new Blob([],dm);dk=dk+(dk.indexOf("?")<0?"?":"&")+dn}ds=g.sendBeacon(dk,dj)}catch(dp){return false}if(ds&&typeof dr==="function"){dr({request:dn,trackerUrl:aD,success:true,isSendBeacon:true})}return ds}function c4(dk,dl,dj){if(!J(dj)||null===dj){dj=true}if(l&&a5(dk,dl,dj)){return}setTimeout(function(){if(l&&a5(dk,dl,dj)){return}var dp;try{var dn=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
-dn.open("POST",aD,true);dn.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dq=l&&a5(dk,dl,dj);if(!dq&&dj){cp(dk,dl)}else{if(typeof dl==="function"){dl({request:dk,trackerUrl:aD,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dl==="function")){dl({request:dk,trackerUrl:aD,success:true,xhr:this})}}};dn.setRequestHeader("Content-Type",cx);dn.withCredentials=true;dn.send(dk)}catch(dm){dp=l&&a5(dk,dl,dj);if(!dp&&dj){cp(dk,dl)}else{if(typeof dl==="function"){dl({request:dk,trackerUrl:aD,success:false})}}}},50)}function cg(dk){var dj=new Date();var dl=dj.getTime()+dk;if(!q||dl>q){q=dl}}function cn(dj){if(cc||!a4||!bB){return}cc=setTimeout(function dk(){cc=null;if(!bb){bb=(!G.hasFocus||G.hasFocus())}if(!bb){cn(a4);return}if(bR()){return}var dl=new Date(),dm=a4-(dl.getTime()-cY);dm=Math.min(a4,dm);cn(dm)},dj||a4)}function bK(){if(!cc){return}clearTimeout(cc);cc=null}function a9(){bb=true;cy=new Date().getTime()}function dd(){var dj=new Date().getTime();
-return !cy||(dj-cy)>a4}function ay(){if(dd()){bR()}bK()}function dg(){if(aM||!a4){return}aM=true;an(S,"focus",a9);an(S,"blur",ay);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aM&&dd()){bR()}}})}function cD(dn){var dk=new Date();var dj=dk.getTime();cY=dj;if(cC&&dj<cC){var dl=cC-dj;setTimeout(dn,dl);cg(dl+50);cC+=50;return}if(cC===false){var dm=800;cC=dj+dm}dn()}function aN(){if(aC(cM)){bB=false}else{if(aC(bc)){bB=true}}}function bF(dk,dj,dl){aN();if(!bB){cL.push(dk);return}if(!cQ&&dk){if(cB&&bB){dk+="&consent=1"}cD(function(){if(cW&&a5(dk,dl,true)){cg(100);return}if(cE(dk)){c4(dk,dl)}else{cp(dk,dl)}cg(dj)})}if(!aM){dg()}}function ck(dj){if(cQ){return false}return(dj&&dj.length)}function c3(dj,dn){if(!dn||dn>=dj.length){return[dj]}var dk=0;var dl=dj.length;var dm=[];for(dk;dk<dl;dk+=dn){dm.push(dj.slice(dk,dk+dn))}return dm}function df(dk,dj){if(!ck(dk)){return}if(!bB){cL.push(dk);return}cD(function(){var dn=c3(dk,50);var dl=0,dm;for(dl;dl<dn.length;dl++){dm='{"requests":["?'+dn[dl].join('","?')+'"]}';
-if(cW&&a5(dm,null,false)){cg(100)}else{c4(dm,null,false)}}cg(dj)})}function aS(dj){return bj+dj+"."+b6+"."+bo}function bY(dl,dk,dj){de(dl,"",-86400,dk,dj)}function b5(){if(bl){return"0"}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){return g.cookieEnabled?"1":"0"}var dj=bj+"testcookie";de(dj,"1",undefined,bp,cX,bS);var dk=aC(dj)==="1"?"1":"0";bY(dj);return dk}function bh(){bo=b7((cX||cU)+(bp||"/")).slice(0,4)}function cI(){if(J(c8.res)){return c8}var dk,dm,dn={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",fla:"application/x-shockwave-flash",java:"application/x-java-vm",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(dk in dn){if(Object.prototype.hasOwnProperty.call(dn,dk)){dm=g.mimeTypes[dn[dk]];c8[dk]=(dm&&dm.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(g.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(g.javaEnabled)&&g.javaEnabled()){c8.java="1"
-}c8.cookie=b5()}var dl=parseInt(X.width,10);var dj=parseInt(X.height,10);c8.res=parseInt(dl,10)+"x"+parseInt(dj,10);return c8}function bX(){var dk=aS("cvar"),dj=aC(dk);if(dj&&dj.length){dj=S.JSON.parse(dj);if(V(dj)){return dj}}return{}}function cF(){if(aP===false){aP=bX()}}function cR(){var dj=cI();return b7((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dj)+(new Date()).getTime()+Math.random()).slice(0,16)}function aA(){var dj=cI();return b7((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dj)).slice(0,6)}function be(){return Math.floor((new Date()).getTime()/1000)}function aI(){var dk=be();var dl=aA();var dj=String(dk)+dl;return dj}function c2(dl){dl=String(dl);var dp=aA();var dm=dp.length;var dn=dl.substr(-1*dm,dm);var dk=parseInt(dl.substr(0,dl.length-dm),10);if(dk&&dn&&dn===dp){var dj=be();if(aY<=0){return true}if(dj>=dk&&dj<=(dk+aY)){return true}}return false}function dh(dj){if(!cN){return""}var dn=e(dj,av);if(!dn){return""}dn=String(dn);var dl=new RegExp("^[a-zA-Z0-9]+$");
-if(dn.length===32&&dl.test(dn)){var dk=dn.substr(16,32);if(c2(dk)){var dm=dn.substr(0,16);return dm}}return""}function cO(){if(!bO){bO=dh(bN)}var dl=new Date(),dj=Math.round(dl.getTime()/1000),dk=aS("id"),dp=aC(dk),dn,dm;if(dp){dn=dp.split(".");dn.unshift("0");if(bO.length){dn[1]=bO}return dn}if(bO.length){dm=bO}else{if("0"===b5()){dm=""}else{dm=cR()}}dn=["1",dm,dj];return dn}function aX(){var dm=cO(),dk=dm[0],dl=dm[1],dj=dm[2];return{newVisitor:dk,uuid:dl,createTs:dj}}function aG(){var dm=new Date(),dk=dm.getTime(),dn=aX().createTs;var dj=parseInt(dn,10);var dl=(dj*1000)+cK-dk;return dl}function aL(dj){if(!b6){return}var dl=new Date(),dk=Math.round(dl.getTime()/1000);if(!J(dj)){dj=aX()}var dm=dj.uuid+"."+dj.createTs+".";de(aS("id"),dm,aG(),bp,cX,bS)}function bM(){var dj=aC(aS("ref"));if(dj.length){try{dj=S.JSON.parse(dj);if(V(dj)){return dj}}catch(dk){}}return["","",0,""]}function bw(dk){var dj="testvalue";de("test",dj,10000,null,dk);if(aC("test")===dj){bY("test",null,dk);return true}return false
-}function aE(){var dk=bl;bl=false;var dj,dl;for(dj=0;dj<bu.length;dj++){dl=aS(bu[dj]);if(dl!==cM&&dl!==bc&&0!==aC(dl)){bY(dl,bp,cX)}}bl=dk}function b3(dj){b6=dj;aL()}function di(dn){if(!dn||!V(dn)){return}var dm=[];var dl;for(dl in dn){if(Object.prototype.hasOwnProperty.call(dn,dl)){dm.push(dl)}}var dp={};dm.sort();var dj=dm.length;var dk;for(dk=0;dk<dj;dk++){dp[dm[dk]]=dn[dm[dk]]}return dp}function cd(){de(aS("ses"),"1",co,bp,cX,bS)}function bf(){var dm="";var dk="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dl=dk.length;var dj;for(dj=0;dj<6;dj++){dm+=dk.charAt(Math.floor(Math.random()*dl))}return dm}function az(dj){if(h&&h.timing&&h&&h.timing.connectEnd&&h.timing.fetchStart){dj+="&pf_net="+(h.timing.connectEnd-h.timing.fetchStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.requestStart){dj+="&pf_srv="+(h.timing.responseStart-h.timing.requestStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.responseEnd){dj+="&pf_tfr="+(h.timing.responseEnd-h.timing.responseStart)
-}if(h&&h.timing&&h&&h.timing.domInteractive&&h.timing.domLoading){dj+="&pf_dm1="+(h.timing.domInteractive-h.timing.domLoading)}if(h&&h.timing&&h&&h.timing.domComplete&&h.timing.domInteractive){dj+="&pf_dm2="+(h.timing.domComplete-h.timing.domInteractive)}if(h&&h.timing&&h&&h.timing.loadEventEnd&&h.timing.loadEventStart){dj+="&pf_onl="+(h.timing.loadEventEnd-h.timing.loadEventStart)}return dj}function cs(dl,dG,dH){var dF,dk=new Date(),dt=Math.round(dk.getTime()/1000),dq,dD,dm=1024,dM,du,dC=aP,dn=aS("ses"),dA=aS("ref"),dx=aS("cvar"),dy=aC(dn),dE=bM(),dI=a3||bN,dr,dj;if(bl){aE()}if(cQ){return""}var dz=aX();var dw=G.characterSet||G.charset;if(!dw||dw.toLowerCase()==="utf-8"){dw=null}dr=dE[0];dj=dE[1];dq=dE[2];dD=dE[3];if(!dy){if(!bv||!dr.length){for(dF in cq){if(Object.prototype.hasOwnProperty.call(cq,dF)){dr=e(dI,cq[dF]);if(dr.length){break}}}for(dF in bG){if(Object.prototype.hasOwnProperty.call(bG,dF)){dj=e(dI,bG[dF]);if(dj.length){break}}}}dM=d(bn);du=dD.length?d(dD):"";if(dM.length&&!aU(dM)&&(!bv||!du.length||aU(du))){dD=bn
-}if(dD.length||dr.length){dq=dt;dE=[dr,dj,dq,b2(dD.slice(0,dm))];de(dA,S.JSON.stringify(dE),c5,bp,cX,bS)}}dl+="&idsite="+b6+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dk.getHours()+"&m="+dk.getMinutes()+"&s="+dk.getSeconds()+"&url="+s(b2(dI))+(bn.length?"&urlref="+s(b2(bn)):"")+((by&&by.length)?"&uid="+s(by):"")+"&_id="+dz.uuid+"&_idn="+dz.newVisitor+(dr.length?"&_rcn="+s(dr):"")+(dj.length?"&_rck="+s(dj):"")+"&_refts="+dq+(String(dD).length?"&_ref="+s(b2(dD.slice(0,dm))):"")+(dw?"&cs="+s(dw):"")+"&send_image=0";var dL=cI();for(dF in dL){if(Object.prototype.hasOwnProperty.call(dL,dF)){dl+="&"+dF+"="+dL[dF]}}var dK=[];if(dG){for(dF in dG){if(Object.prototype.hasOwnProperty.call(dG,dF)&&/^dimension\d+$/.test(dF)){var dp=dF.replace("dimension","");dK.push(parseInt(dp,10));dK.push(String(dp));dl+="&"+dF+"="+s(dG[dF]);delete dG[dF]}}}if(dG&&B(dG)){dG=null}for(dF in ct){if(Object.prototype.hasOwnProperty.call(ct,dF)){dl+="&"+dF+"="+s(ct[dF])}}for(dF in bm){if(Object.prototype.hasOwnProperty.call(bm,dF)){var dv=(-1===M(dK,dF));
-if(dv){dl+="&dimension"+dF+"="+s(bm[dF])}}}if(dG){dl+="&data="+s(S.JSON.stringify(dG))}else{if(ao){dl+="&data="+s(S.JSON.stringify(ao))}}function ds(dN,dO){var dP=S.JSON.stringify(dN);if(dP.length>2){return"&"+dO+"="+s(dP)}return""}var dJ=di(bW);var dB=di(cm);dl+=ds(dJ,"cvar");dl+=ds(dB,"e_cvar");if(aP){dl+=ds(aP,"_cvar");for(dF in dC){if(Object.prototype.hasOwnProperty.call(dC,dF)){if(aP[dF][0]===""||aP[dF][1]===""){delete aP[dF]}}}if(bQ){de(dx,S.JSON.stringify(aP),co,bp,cX,bS)}}if(a1&&bE&&!bg){dl=az(dl);bg=true}if(aK){dl+="&pv_id="+aK}aL(dz);cd();dl+=ac(dH,{tracker:bI,request:dl});if(cZ.length){dl+="&"+cZ}if(A(cb)){dl=cb(dl)}return dl}bR=function a6(){var dj=new Date();dj=dj.getTime();if(!cY){return false}if((cY+(1000*c7))<=dj){return false}if(cY+a4<=dj){bI.ping();return true}return false};function bq(dm,dl,dr,dn,dj,du){var dq="idgoal=0",dk=new Date(),ds=[],dt,dp=String(dm).length;if(dp){dq+="&ec_id="+s(dm)}dq+="&revenue="+dl;if(String(dr).length){dq+="&ec_st="+dr}if(String(dn).length){dq+="&ec_tx="+dn
-}if(String(dj).length){dq+="&ec_sh="+dj}if(String(du).length){dq+="&ec_dt="+du}if(c0){for(dt in c0){if(Object.prototype.hasOwnProperty.call(c0,dt)){if(!J(c0[dt][1])){c0[dt][1]=""}if(!J(c0[dt][2])){c0[dt][2]=""}if(!J(c0[dt][3])||String(c0[dt][3]).length===0){c0[dt][3]=0}if(!J(c0[dt][4])||String(c0[dt][4]).length===0){c0[dt][4]=1}ds.push(c0[dt])}}dq+="&ec_items="+s(S.JSON.stringify(ds))}dq=cs(dq,ao,"ecommerce");bF(dq,bJ);if(dp){c0={}}}function bZ(dj,dn,dm,dl,dk,dp){if(String(dj).length&&J(dn)){bq(dj,dn,dm,dl,dk,dp)}}function bs(dj){if(J(dj)){bq("",dj,"","","","")}}function b0(dk,dm,dl){aK=bf();var dj=cs("action_name="+s(al(dk||bi)),dm,"log");if(!bg){dj=az(dj)}bF(dj,bJ,dl)}function aZ(dl,dk){var dm,dj="(^| )(piwik[_-]"+dk+"|matomo[_-]"+dk;if(dl){for(dm=0;dm<dl.length;dm++){dj+="|"+dl[dm]}}dj+=")( |$)";return new RegExp(dj)}function aT(dj){return(aD&&dj&&0===String(dj).indexOf(aD))}function cv(dn,dj,dp,dk){if(aT(dj)){return 0}var dm=aZ(bL,"download"),dl=aZ(a7,"link"),dq=new RegExp("\\.("+c6.join("|")+")([?&#]|$)","i");
-if(dl.test(dn)){return"link"}if(dk||dm.test(dn)||dq.test(dj)){return"download"}if(dp){return 0}return"link"}function au(dk){var dj;dj=dk.parentNode;while(dj!==null&&J(dj)){if(ae.isLinkElement(dk)){break}dk=dj;dj=dk.parentNode}return dk}function dc(dp){dp=au(dp);if(!ae.hasNodeAttribute(dp,"href")){return}if(!J(dp.href)){return}var dn=ae.getAttributeValueFromNode(dp,"href");var dk=dp.pathname||cl(dp.href);var dq=dp.hostname||d(dp.href);var dr=dq.toLowerCase();var dl=dp.href.replace(dq,dr);var dm=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dm.test(dl)){var dj=cv(dp.className,dl,ar(dr,dk),ae.hasNodeAttribute(dp,"download"));if(dj){return{type:dj,href:dl}}}}function aO(dj,dk,dl,dm){var dn=v.buildInteractionRequestParams(dj,dk,dl,dm);if(!dn){return}return cs(dn,null,"contentInteraction")}function ba(dj,dk){if(!dj||!dk){return false}var dl=v.findTargetNode(dj);if(v.shouldIgnoreInteraction(dl)){return false}dl=v.findTargetNodeNoDefault(dj);if(dl&&!U(dl,dk)){return false
-}return true}function cu(dl,dk,dn){if(!dl){return}var dj=v.findParentContentNode(dl);if(!dj){return}if(!ba(dj,dl)){return}var dm=v.buildContentBlock(dj);if(!dm){return}if(!dm.target&&dn){dm.target=dn}return v.buildInteractionRequestParams(dk,dm.name,dm.piece,dm.target)}function aV(dk){if(!ca||!ca.length){return false}var dj,dl;for(dj=0;dj<ca.length;dj++){dl=ca[dj];if(dl&&dl.name===dk.name&&dl.piece===dk.piece&&dl.target===dk.target){return true}}return false}function aW(dj){return function(dn){if(!dj){return}var dl=v.findParentContentNode(dj);var dk;if(dn){dk=dn.target||dn.srcElement}if(!dk){dk=dj}if(!ba(dl,dk)){return}if(!dl){return false}var dp=v.findTargetNode(dl);if(!dp||v.shouldIgnoreInteraction(dp)){return false}var dm=dc(dp);if(c9&&dm&&dm.type){return dm.type}return bI.trackContentInteractionNode(dk,"click")}}function b1(dl){if(!dl||!dl.length){return}var dj,dk;for(dj=0;dj<dl.length;dj++){dk=v.findTargetNode(dl[dj]);if(dk&&!dk.contentInteractionTrackingSetupDone){dk.contentInteractionTrackingSetupDone=true;
-an(dk,"click",aW(dk))}}}function bx(dl,dm){if(!dl||!dl.length){return[]}var dj,dk;for(dj=0;dj<dl.length;dj++){if(aV(dl[dj])){dl.splice(dj,1);dj--}else{ca.push(dl[dj])}}if(!dl||!dl.length){return[]}b1(dm);var dn=[];for(dj=0;dj<dl.length;dj++){dk=cs(v.buildImpressionRequestParams(dl[dj].name,dl[dj].piece,dl[dj].target),undefined,"contentImpressions");if(dk){dn.push(dk)}}return dn}function cA(dk){var dj=v.collectContent(dk);return bx(dj,dk)}function a8(dk){if(!dk||!dk.length){return[]}var dj;for(dj=0;dj<dk.length;dj++){if(!v.isNodeVisible(dk[dj])){dk.splice(dj,1);dj--}}if(!dk||!dk.length){return[]}return cA(dk)}function aF(dl,dj,dk){var dm=v.buildImpressionRequestParams(dl,dj,dk);return cs(dm,null,"contentImpression")}function db(dm,dk){if(!dm){return}var dj=v.findParentContentNode(dm);var dl=v.buildContentBlock(dj);if(!dl){return}if(!dk){dk="Unknown"}return aO(dk,dl.name,dl.piece,dl.target)}function cP(dk,dm,dj,dl){return"e_c="+s(dk)+"&e_a="+s(dm)+(J(dj)?"&e_n="+s(dj):"")+(J(dl)?"&e_v="+s(dl):"")
-}function at(dl,dn,dj,dm,dq,dp){if(!Y(dl)||!Y(dn)){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");return false}var dk=cs(cP(dl,dn,dj,dm),dq,"event");bF(dk,bJ,dp)}function b8(dj,dm,dk,dn){var dl=cs("search="+s(dj)+(dm?"&search_cat="+s(dm):"")+(J(dk)?"&search_count="+dk:""),dn,"sitesearch");bF(dl,bJ)}function cT(dj,dn,dm,dl){var dk=cs("idgoal="+dj+(dn?"&revenue="+dn:""),dm,"goal");bF(dk,bJ,dl)}function c1(dm,dj,dr,dq,dl){var dp=dj+"="+s(b2(dm));var dk=cu(dl,"click",dm);if(dk){dp+="&"+dk}var dn=cs(dp,dr,"link");bF(dn,bJ,dq)}function bU(dk,dj){if(dk!==""){return dk+dj.charAt(0).toUpperCase()+dj.slice(1)}return dj}function ch(dp){var dn,dj,dm=["","webkit","ms","moz"],dl;if(!bd){for(dj=0;dj<dm.length;dj++){dl=dm[dj];if(Object.prototype.hasOwnProperty.call(G,bU(dl,"hidden"))){if(G[bU(dl,"visibilityState")]==="prerender"){dn=true}break}}}if(dn){an(G,dl+"visibilitychange",function dk(){G.removeEventListener(dl+"visibilitychange",dk,false);
-dp()});return}dp()}function br(){var dk=bI.getVisitorId();var dj=aI();return dk+dj}function cj(dj){if(!dj){return}if(!ae.hasNodeAttribute(dj,"href")){return}var dk=ae.getAttributeValueFromNode(dj,"href");if(!dk||aT(dk)){return}if(!bI.getVisitorId()){return}dk=j(dk,av);var dl=br();dk=F(dk,av,dl);ae.setAnyAttribute(dj,"href",dk)}function bk(dm){var dn=ae.getAttributeValueFromNode(dm,"href");if(!dn){return false}dn=String(dn);var dk=dn.indexOf("//")===0||dn.indexOf("http://")===0||dn.indexOf("https://")===0;if(!dk){return false}var dj=dm.pathname||cl(dm.href);var dl=(dm.hostname||d(dm.href)).toLowerCase();if(ar(dl,dj)){if(!cH(cU,L(dl))){return true}return false}return false}function cG(dj){var dk=dc(dj);if(dk&&dk.type){dk.href=o(dk.href);c1(dk.href,dk.type,undefined,null,dj);return}if(cN){dj=au(dj);if(bk(dj)){cj(dj)}}}function cw(){return G.all&&!G.addEventListener}function cV(dj){var dl=dj.which;var dk=(typeof dj.button);if(!dl&&dk!=="undefined"){if(cw()){if(dj.button&1){dl=1}else{if(dj.button&2){dl=3
-}else{if(dj.button&4){dl=2}}}}else{if(dj.button===0||dj.button==="0"){dl=1}else{if(dj.button&1){dl=2}else{if(dj.button&2){dl=3}}}}}return dl}function bT(dj){switch(cV(dj)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function a0(dj){return dj.target||dj.srcElement}function aB(dj){return function(dm){dm=dm||S.event;var dl=bT(dm);var dn=a0(dm);if(dm.type==="click"){var dk=false;if(dj&&dl==="middle"){dk=true}if(dn&&!dk){cG(dn)}}else{if(dm.type==="mousedown"){if(dl==="middle"&&dn){aQ=dl;bA=dn}else{aQ=bA=null}}else{if(dm.type==="mouseup"){if(dl===aQ&&dn===bA){cG(dn)}aQ=bA=null}else{if(dm.type==="contextmenu"){cG(dn)}}}}}}function aq(dl,dk){var dj=typeof dk;if(dj==="undefined"){dk=true}an(dl,"click",aB(dk),false);if(dk){an(dl,"mouseup",aB(dk),false);an(dl,"mousedown",aB(dk),false);an(dl,"contextmenu",aB(dk),false)}}function bD(dl,dn){ap=true;var dm,dk=aZ(bz,"ignore"),dp=G.links,dj=null,dq=null;if(dp){for(dm=0;dm<dp.length;dm++){dj=dp[dm];if(!dk.test(dj.className)){dq=typeof dj.matomoTrackers;
-if("undefined"===dq){dj.matomoTrackers=[]}if(-1===M(dj.matomoTrackers,dn)){dj.matomoTrackers.push(dn);aq(dj,dl)}}}}}function aR(dk,dn,dp){if(cf){return true}cf=true;var dq=false;var dm,dl;function dj(){dq=true}m(function(){function dr(dt){setTimeout(function(){if(!cf){return}dq=false;dp.trackVisibleContentImpressions();dr(dt)},dt)}function ds(dt){setTimeout(function(){if(!cf){return}if(dq){dq=false;dp.trackVisibleContentImpressions()}ds(dt)},dt)}if(dk){dm=["scroll","resize"];for(dl=0;dl<dm.length;dl++){if(G.addEventListener){G.addEventListener(dm[dl],dj,false)}else{S.attachEvent("on"+dm[dl],dj)}}ds(100)}if(dn&&dn>0){dn=parseInt(dn,10);dr(dn)}})}var bC={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dj=this.requests;this.requests=[];if(dj.length===1){bF(dj[0],bJ)}else{df(dj,bJ)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dk){if(!this.canQueue()){df(dk,bJ);return}var dj;for(dj=0;dj<dk.length;dj++){this.push(dk[dj])}},push:function(dj){if(!dj){return
-}if(!this.canQueue()){bF(dj,bJ);return}bC.requests.push(dj);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bC.timeout=null;bC.sendRequests()},bC.interval);var dk="RequestQueue"+aw;if(!Object.prototype.hasOwnProperty.call(b,dk)){b[dk]={unload:function(){if(bC.timeout){clearTimeout(bC.timeout)}bC.sendRequests()}}}}};bh();aL();this.hasConsent=function(){return bB};this.getVisitorId=function(){return aX().uuid};this.getVisitorInfo=function(){return cO()};this.getAttributionInfo=function(){return bM()};this.getAttributionCampaignName=function(){return bM()[0]};this.getAttributionCampaignKeyword=function(){return bM()[1]};this.getAttributionReferrerTimestamp=function(){return bM()[2]};this.getAttributionReferrerUrl=function(){return bM()[3]};this.setTrackerUrl=function(dj){aD=dj};this.getTrackerUrl=function(){return aD};this.getMatomoUrl=function(){return W(this.getTrackerUrl(),bH)};this.getPiwikUrl=function(){return this.getMatomoUrl()};this.addTracker=function(dl,dk){if(!J(dl)||null===dl){dl=this.getTrackerUrl()
-}var dj=new P(dl,dk);I.push(dj);t.trigger("TrackerAdded",[this]);return dj};this.getSiteId=function(){return b6};this.setSiteId=function(dj){b3(dj)};this.resetUserId=function(){by=""};this.setUserId=function(dj){if(Y(dj)){by=dj}};this.getUserId=function(){return by};this.setCustomData=function(dj,dk){if(V(dj)){ao=dj}else{if(!ao){ao={}}ao[dj]=dk}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dj){cb=dj};this.appendToTrackingUrl=function(dj){cZ=dj};this.getRequest=function(dj){return cs(dj)};this.addPlugin=function(dj,dk){b[dj]=dk};this.setCustomDimension=function(dj,dk){dj=parseInt(dj,10);if(dj>0){if(!J(dk)){dk=""}if(!w(dk)){dk=String(dk)}bm[dj]=dk}};this.getCustomDimension=function(dj){dj=parseInt(dj,10);if(dj>0&&Object.prototype.hasOwnProperty.call(bm,dj)){return bm[dj]}};this.deleteCustomDimension=function(dj){dj=parseInt(dj,10);if(dj>0){delete bm[dj]}};this.setCustomVariable=function(dk,dj,dn,dl){var dm;if(!J(dl)){dl="visit"}if(!J(dj)){return}if(!J(dn)){dn=""
-}if(dk>0){dj=!w(dj)?String(dj):dj;dn=!w(dn)?String(dn):dn;dm=[dj.slice(0,bt),dn.slice(0,bt)];if(dl==="visit"||dl===2){cF();aP[dk]=dm}else{if(dl==="page"||dl===3){bW[dk]=dm}else{if(dl==="event"){cm[dk]=dm}}}}};this.getCustomVariable=function(dk,dl){var dj;if(!J(dl)){dl="visit"}if(dl==="page"||dl===3){dj=bW[dk]}else{if(dl==="event"){dj=cm[dk]}else{if(dl==="visit"||dl===2){cF();dj=aP[dk]}}}if(!J(dj)||(dj&&dj[0]==="")){return false}return dj};this.deleteCustomVariable=function(dj,dk){if(this.getCustomVariable(dj,dk)){this.setCustomVariable(dj,"","",dk)}};this.deleteCustomVariables=function(dj){if(dj==="page"||dj===3){bW={}}else{if(dj==="event"){cm={}}else{if(dj==="visit"||dj===2){aP={}}}}};this.storeCustomVariablesInCookie=function(){bQ=true};this.setLinkTrackingTimer=function(dj){bJ=dj};this.getLinkTrackingTimer=function(){return bJ};this.setDownloadExtensions=function(dj){if(w(dj)){dj=dj.split("|")}c6=dj};this.addDownloadExtensions=function(dk){var dj;if(w(dk)){dk=dk.split("|")}for(dj=0;dj<dk.length;
-dj++){c6.push(dk[dj])}};this.removeDownloadExtensions=function(dl){var dk,dj=[];if(w(dl)){dl=dl.split("|")}for(dk=0;dk<c6.length;dk++){if(M(dl,c6[dk])===-1){dj.push(c6[dk])}}c6=dj};this.setDomains=function(dj){ax=w(dj)?[dj]:dj;var dn=false,dl=0,dk;for(dl;dl<ax.length;dl++){dk=String(ax[dl]);if(cH(cU,L(dk))){dn=true;break}var dm=cl(dk);if(dm&&dm!=="/"&&dm!=="/*"){dn=true;break}}if(!dn){ax.push(cU)}};this.enableCrossDomainLinking=function(){cN=true};this.disableCrossDomainLinking=function(){cN=false};this.isCrossDomainLinkingEnabled=function(){return cN};this.setCrossDomainLinkingTimeout=function(dj){aY=dj};this.getCrossDomainLinkingUrlParameter=function(){return s(av)+"="+s(br())};this.setIgnoreClasses=function(dj){bz=w(dj)?[dj]:dj};this.setRequestMethod=function(dj){da=dj||ci};this.setRequestContentType=function(dj){cx=dj||aH};this.setReferrerUrl=function(dj){bn=dj};this.setCustomUrl=function(dj){a3=bV(bN,dj)};this.getCurrentUrl=function(){return a3||bN};this.setDocumentTitle=function(dj){bi=dj
-};this.setAPIUrl=function(dj){bH=dj};this.setDownloadClasses=function(dj){bL=w(dj)?[dj]:dj};this.setLinkClasses=function(dj){a7=w(dj)?[dj]:dj};this.setCampaignNameKey=function(dj){cq=w(dj)?[dj]:dj};this.setCampaignKeywordKey=function(dj){bG=w(dj)?[dj]:dj};this.discardHashTag=function(dj){bP=dj};this.setCookieNamePrefix=function(dj){bj=dj;if(aP){aP=bX()}};this.setCookieDomain=function(dj){var dk=L(dj);if(bw(dk)){cX=dk;bh()}};this.getCookieDomain=function(){return cX};this.hasCookies=function(){return"1"===b5()};this.setSessionCookie=function(dl,dk,dj){if(!dl){throw new Error("Missing cookie name")}if(!J(dj)){dj=co}bu.push(dl);de(aS(dl),dk,dj,bp,cX)};this.getCookie=function(dk){var dj=aC(aS(dk));if(dj===0){return null}return dj};this.setCookiePath=function(dj){bp=dj;bh()};this.getCookiePath=function(dj){return bp};this.setVisitorCookieTimeout=function(dj){cK=dj*1000};this.setSessionCookieTimeout=function(dj){co=dj*1000};this.getSessionCookieTimeout=function(){return co};this.setReferralCookieTimeout=function(dj){c5=dj*1000
-};this.setConversionAttributionFirstReferrer=function(dj){bv=dj};this.setSecureCookie=function(dj){bS=dj};this.disableCookies=function(){bl=true;c8.cookie="0";if(b6){aE()}};this.deleteCookies=function(){aE()};this.setDoNotTrack=function(dk){var dj=g.doNotTrack||g.msDoNotTrack;cQ=dk&&(dj==="yes"||dj==="1");if(cQ){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cW=true};this.disableAlwaysUseSendBeacon=function(){cW=false};this.addListener=function(dk,dj){aq(dk,dj)};this.enableLinkTracking=function(dk){c9=true;var dj=this;ch(function(){p(function(){bD(dk,dj)});m(function(){bD(dk,dj)})})};this.enableJSErrorTracking=function(){if(cS){return}cS=true;var dj=S.onerror;S.onerror=function(dp,dm,dl,dn,dk){ch(function(){var dq="JavaScript Errors";var dr=dm+":"+dl;if(dn){dr+=":"+dn}at(dq,dr,dp)});if(dj){return dj(dp,dm,dl,dn,dk)}return false}};this.disablePerformanceTracking=function(){a1=false};this.setVisitStandardLength=function(dj){dj=Math.max(dj,5);c7=dj};this.enableHeartBeatTimer=function(dj){dj=Math.max(dj,5);
-a4=(dj||15)*1000;if(cY!==null){dg()}};this.disableHeartBeatTimer=function(){bK();if(a4||aM){if(S.removeEventListener){S.removeEventListener("focus",a9);S.removeEventListener("blur",ay)}else{if(S.detachEvent){S.detachEvent("onfocus",a9);S.detachEvent("onblur",ay)}}}a4=null;aM=false};this.killFrame=function(){if(S.location!==S.top.location){S.top.location=S.location}};this.redirectFile=function(dj){if(S.location.protocol==="file:"){S.location=dj}};this.setCountPreRendered=function(dj){bd=dj};this.trackGoal=function(dj,dm,dl,dk){ch(function(){cT(dj,dm,dl,dk)})};this.trackLink=function(dk,dj,dm,dl){ch(function(){c1(dk,dj,dm,dl)})};this.getNumTrackedPageViews=function(){return cr};this.trackPageView=function(dj,dl,dk){ca=[];cL=[];if(N(b6)){ch(function(){Z(aD,bH,b6)})}else{ch(function(){cr++;b0(dj,dl,dk)})}};this.trackAllContentImpressions=function(){if(N(b6)){return}ch(function(){p(function(){var dj=v.findContentNodes();var dk=cA(dj);bC.pushMultiple(dk)})})};this.trackVisibleContentImpressions=function(dj,dk){if(N(b6)){return
-}if(!J(dj)){dj=true}if(!J(dk)){dk=750}aR(dj,dk,this);ch(function(){m(function(){var dl=v.findContentNodes();var dm=a8(dl);bC.pushMultiple(dm)})})};this.trackContentImpression=function(dl,dj,dk){if(N(b6)){return}dl=a(dl);dj=a(dj);dk=a(dk);if(!dl){return}dj=dj||"Unknown";ch(function(){var dm=aF(dl,dj,dk);bC.push(dm)})};this.trackContentImpressionsWithinNode=function(dj){if(N(b6)||!dj){return}ch(function(){if(cf){m(function(){var dk=v.findContentNodesWithinNode(dj);var dl=a8(dk);bC.pushMultiple(dl)})}else{p(function(){var dk=v.findContentNodesWithinNode(dj);var dl=cA(dk);bC.pushMultiple(dl)})}})};this.trackContentInteraction=function(dl,dm,dj,dk){if(N(b6)){return}dl=a(dl);dm=a(dm);dj=a(dj);dk=a(dk);if(!dl||!dm){return}dj=dj||"Unknown";ch(function(){var dn=aO(dl,dm,dj,dk);if(dn){bC.push(dn)}})};this.trackContentInteractionNode=function(dl,dk){if(N(b6)||!dl){return}var dj=null;ch(function(){dj=db(dl,dk);if(dj){bC.push(dj)}});return dj};this.logAllContentBlocksOnPage=function(){var dl=v.findContentNodes();
-var dj=v.collectContent(dl);var dk=typeof console;if(dk!=="undefined"&&console&&console.log){console.log(dj)}};this.trackEvent=function(dk,dm,dj,dl,dp,dn){ch(function(){at(dk,dm,dj,dl,dp,dn)})};this.trackSiteSearch=function(dj,dl,dk,dm){ca=[];ch(function(){b8(dj,dl,dk,dm)})};this.setEcommerceView=function(dn,dj,dl,dk){ct={};if(Y(dl)){dl=String(dl)}if(!J(dl)||dl===null||dl===false||!dl.length){dl=""}else{if(dl instanceof Array){dl=S.JSON.stringify(dl)}}var dm="_pkc";ct[dm]=dl;if(J(dk)&&dk!==null&&dk!==false&&String(dk).length){dm="_pkp";ct[dm]=dk}if(!Y(dn)&&!Y(dj)){return}if(Y(dn)){dm="_pks";ct[dm]=dn}if(!Y(dj)){dj=""}dm="_pkn";ct[dm]=dj};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c0))};this.addEcommerceItem=function(dn,dj,dl,dk,dm){if(Y(dn)){c0[dn]=[String(dn),dj,dl,dk,dm]}};this.removeEcommerceItem=function(dj){if(Y(dj)){dj=String(dj);delete c0[dj]}};this.clearEcommerceCart=function(){c0={}};this.trackEcommerceOrder=function(dj,dn,dm,dl,dk,dp){bZ(dj,dn,dm,dl,dk,dp)
-};this.trackEcommerceCartUpdate=function(dj){bs(dj)};this.trackRequest=function(dk,dm,dl,dj){ch(function(){var dn=cs(dk,dm,dj);bF(dn,bJ,dl)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bC.enabled=false};this.setRequestQueueInterval=function(dj){if(dj<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bC.interval=dj};this.queueRequest=function(dj){ch(function(){var dk=cs(dj);bC.push(dk)})};this.isConsentRequired=function(){return cB};this.getRememberedConsent=function(){var dj=aC(bc);if(aC(cM)){if(dj){bY(bc,bp,cX)}return null}if(!dj||dj===0){return null}return dj};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cB=true;bB=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bB){aE()}}}};this.setConsentGiven=function(){bB=true;bY(cM,bp,cX);var dk,dj;for(dk=0;dk<cL.length;dk++){dj=typeof cL[dk];if(dj==="string"){bF(cL[dk],bJ)}else{if(dj==="object"){df(cL[dk],bJ)
-}}}cL=[]};this.rememberConsentGiven=function(dk){if(dk){dk=dk*60*60*1000}else{dk=30*365*24*60*60*1000}this.setConsentGiven();var dj=new Date().getTime();de(bc,dj,dk,bp,cX,bS)};this.forgetConsentGiven=function(){var dj=30*365*24*60*60*1000;bY(bc,bp,cX);de(cM,new Date().getTime(),dj,bp,cX,bS);this.requireConsent()};this.isUserOptedOut=function(){return !bB};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=this.rememberConsentGiven;m(function(){setTimeout(function(){bE=true},0)});t.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')
-}av[ap]++}}}}return au}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getMatomoUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);
-aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;t={initialized:false,JSON:S.JSON,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:m,onReady:p,isNodeVisible:i,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||S,ar)
-}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ap,ao){if(!J(ao)){ao=this.getAsyncTracker().getSiteId()}if(!J(ap)){ap=this.getAsyncTracker().getTrackerUrl()}return new P(ap,ao)},getAsyncTrackers:function(){return I},addTracker:function(aq,ap){var ao;if(!I.length){ao=ad(aq,ap)}else{ao=I[0].addTracker(aq,ap)}return ao},getAsyncTracker:function(at,ar){var aq;if(I&&I.length&&I[0]){aq=I[0]}else{return ad(at,ar)}if(!ar&&!at){return aq}if((!J(ar)||null===ar)&&aq){ar=aq.getSiteId()}if((!J(at)||null===at)&&aq){at=aq.getTrackerUrl()}var ap,ao=0;for(ao;ao<I.length;ao++){ap=I[ao];if(ap&&String(ap.getSiteId())===String(ar)&&ap.getTrackerUrl()===at){return ap}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return t});define("matomo",[],function(){return t})}return t}())}
+}catch(ao){return true}}function P(cf,ca){var bJ=this,bd="mtm_consent",cF="mtm_cookie_consent",cO="mtm_consent_removed",b5=aa(G.domain,S.location.href,K()),cW=L(b5[0]),bO=o(b5[1]),bo=o(b5[2]),cU=false,cj="GET",dc=cj,aI="application/x-www-form-urlencoded; charset=UTF-8",cy=aI,aE=cf||"",bI="",c1="",b7=ca||"",bz="",bP="",a4,bj="",c8=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cW],bA=[],bM=[],a8=[],bK=500,cY=true,cL,a5,bS,c9=1800,bQ,ao,cr=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bH=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bk="_pk_",av="pk_vid",aZ=180,cZ,bq,bT=false,bm=false,cS,be,bw,cM=33955200000,cp=1800000,c7=15768000000,a2=true,bF=false,bh=false,bR=false,aQ=false,cc,bX={},cn={},bn={},bu=200,cu={},c2={},da={},cb=[],cg=false,cD=false,ap=false,db=false,cP=false,aN=false,bc=u(),cz=null,c0=null,cd,aR,bB,b8=am,bp,aL,cs=0,bv=["id","ses","cvar","ref"],cC=false,bC=null,cN=[],ax=T++,aw=false;
+try{bj=G.title}catch(cA){bj=""}function dg(ds,dq,dp,dr,dn,dm){if(bm){return}var dl;if(dp){dl=new Date();dl.setTime(dl.getTime()+dp)}G.cookie=ds+"="+s(dq)+(dp?";expires="+dl.toGMTString():"")+";path="+(dr||"/")+(dn?";domain="+dn:"")+(dm?";secure":"")+";SameSite=Lax"}function aD(dn){if(bm){return 0}var dl=new RegExp("(^|;)[ ]*"+dn+"=([^;]*)"),dm=dl.exec(G.cookie);return dm?R(dm[2]):0}bC=!aD(cO);function b3(dl){var dm;dl=j(dl,av);if(bQ){dm=new RegExp("#.*");return dl.replace(dm,"")}return dl}function bW(dn,dl){var dp=r(dl),dm;if(dp){return dl}if(dl.slice(0,1)==="/"){return r(dn)+"://"+d(dn)+dl}dn=b3(dn);dm=dn.indexOf("?");if(dm>=0){dn=dn.slice(0,dm)}dm=dn.lastIndexOf("/");if(dm!==dn.length-1){dn=dn.slice(0,dm+1)}return dn+dl}function cJ(dn,dl){var dm;dn=String(dn).toLowerCase();dl=String(dl).toLowerCase();if(dn===dl){return true}if(dl.slice(0,1)==="."){if(dn===dl.slice(1)){return true}dm=dn.length-dl.length;if((dm>0)&&(dn.slice(dm)===dl)){return true}}return false}function cm(dl){var dm=document.createElement("a");
+if(dl.indexOf("//")!==0&&dl.indexOf("http")!==0){if(dl.indexOf("*")===0){dl=dl.substr(1)}if(dl.indexOf(".")===0){dl=dl.substr(1)}dl="http://"+dl}dm.href=v.toAbsoluteUrl(dl);if(dm.pathname){return dm.pathname}return""}function a3(dm,dl){if(!aj(dl,"/")){dl="/"+dl}if(!aj(dm,"/")){dm="/"+dm}var dn=(dl==="/"||dl==="/*");if(dn){return true}if(dm===dl){return true}dl=String(dl).toLowerCase();dm=String(dm).toLowerCase();if(Q(dl,"*")){dl=dl.slice(0,-1);dn=(!dl||dl==="/");if(dn){return true}if(dm===dl){return true}return dm.indexOf(dl)===0}if(!Q(dm,"/")){dm+="/"}if(!Q(dl,"/")){dl+="/"}return dm.indexOf(dl)===0}function ar(dq,ds){var dm,dl,dn,dp,dr;for(dm=0;dm<ay.length;dm++){dp=L(ay[dm]);dr=cm(ay[dm]);if(cJ(dq,dp)&&a3(ds,dr)){return true}}return false}function aV(dp){var dm,dl,dn;for(dm=0;dm<ay.length;dm++){dl=L(ay[dm].toLowerCase());if(dp===dl){return true}if(dl.slice(0,1)==="."){if(dp===dl.slice(1)){return true}dn=dp.length-dl.length;if((dn>0)&&(dp.slice(dn)===dl)){return true}}}return false}function cq(dl,dn){dl=dl.replace("send_image=0","send_image=1");
+var dm=new Image(1,1);dm.onload=function(){E=0;if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:true})}};dm.onerror=function(){if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:false})}};dm.src=aE+(aE.indexOf("?")<0?"?":"&")+dl}function cG(dl){if(dc==="POST"){return true}return dl&&(dl.length>2000||dl.indexOf('{"requests"')===0)}function aK(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a6(dq,dt,ds){var dn=aK();if(!dn){return false}var dp={type:"application/x-www-form-urlencoded; charset=UTF-8"};var du=false;var dm=aE;try{var dl=new Blob([dq],dp);if(ds&&!cG(dq)){dl=new Blob([],dp);dm=dm+(dm.indexOf("?")<0?"?":"&")+dq}du=g.sendBeacon(dm,dl)}catch(dr){return false}if(du&&typeof dt==="function"){dt({request:dq,trackerUrl:aE,success:true,isSendBeacon:true})}return du}function c6(dm,dn,dl){if(!J(dl)||null===dl){dl=true}if(l&&a6(dm,dn,dl)){return}setTimeout(function(){if(l&&a6(dm,dn,dl)){return}var dr;try{var dq=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
+dq.open("POST",aE,true);dq.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var ds=l&&a6(dm,dn,dl);if(!ds&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dn==="function")){dn({request:dm,trackerUrl:aE,success:true,xhr:this})}}};dq.setRequestHeader("Content-Type",cy);dq.withCredentials=true;dq.send(dm)}catch(dp){dr=l&&a6(dm,dn,dl);if(!dr&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false})}}}},50)}function ch(dm){var dl=new Date();var dn=dl.getTime()+dm;if(!q||dn>q){q=dn}}function co(dl){if(cd||!a5||!bC){return}cd=setTimeout(function dm(){cd=null;if(!bc){bc=(!G.hasFocus||G.hasFocus())}if(!bc){co(a5);return}if(bS()){return}var dn=new Date(),dp=a5-(dn.getTime()-c0);dp=Math.min(a5,dp);co(dp)},dl||a5)}function bL(){if(!cd){return}clearTimeout(cd);cd=null}function ba(){bc=true;cz=new Date().getTime()}function df(){var dl=new Date().getTime();
+return !cz||(dl-cz)>a5}function az(){if(df()){bS()}bL()}function di(){if(aN||!a5){return}aN=true;an(S,"focus",ba);an(S,"blur",az);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aN&&df()){bS()}}})}function cE(dq){var dm=new Date();var dl=dm.getTime();c0=dl;if(cD&&dl<cD){var dn=cD-dl;setTimeout(dq,dn);ch(dn+50);cD+=50;return}if(cD===false){var dp=800;cD=dl+dp}dq()}function aO(){if(aD(cO)){bC=false}else{if(aD(bd)){bC=true}}}function bG(dm,dl,dn){aO();if(!bC){cN.push(dm);return}aw=true;if(!cS&&dm){if(cC&&bC){dm+="&consent=1"}cE(function(){if(cY&&a6(dm,dn,true)){ch(100);return}if(cG(dm)){c6(dm,dn)}else{cq(dm,dn)}ch(dl)})}if(!aN){di()}}function cl(dl){if(cS){return false}return(dl&&dl.length)}function c5(dl,dq){if(!dq||dq>=dl.length){return[dl]}var dm=0;var dn=dl.length;var dp=[];for(dm;dm<dn;dm+=dq){dp.push(dl.slice(dm,dm+dq))}return dp}function dh(dm,dl){if(!cl(dm)){return}if(!bC){cN.push(dm);return}aw=true;cE(function(){var dq=c5(dm,50);var dn=0,dp;for(dn;dn<dq.length;dn++){dp='{"requests":["?'+dq[dn].join('","?')+'"]}';
+if(cY&&a6(dp,null,false)){ch(100)}else{c6(dp,null,false)}}ch(dl)})}function aT(dl){return bk+dl+"."+b7+"."+bp}function b0(dn,dm,dl){dg(dn,"",-86400,dm,dl)}function b6(){if(bm){return"0"}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){return g.cookieEnabled?"1":"0"}var dl=bk+"testcookie";dg(dl,"1",undefined,bq,cZ,bT);var dm=aD(dl)==="1"?"1":"0";b0(dl);return dm}function bi(){bp=b8((cZ||cW)+(bq||"/")).slice(0,4)}function cK(){if(J(da.res)){return da}var dm,dp,dq={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",fla:"application/x-shockwave-flash",java:"application/x-java-vm",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(dm in dq){if(Object.prototype.hasOwnProperty.call(dq,dm)){dp=g.mimeTypes[dq[dm]];da[dm]=(dp&&dp.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(g.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(g.javaEnabled)&&g.javaEnabled()){da.java="1"
+}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){da.cookie=g.cookieEnabled?"1":"0"}else{da.cookie=b6()}}var dn=parseInt(X.width,10);var dl=parseInt(X.height,10);da.res=parseInt(dn,10)+"x"+parseInt(dl,10);return da}function bY(){var dm=aT("cvar"),dl=aD(dm);if(dl&&dl.length){dl=S.JSON.parse(dl);if(V(dl)){return dl}}return{}}function cH(){if(aQ===false){aQ=bY()}}function cT(){var dl=cK();return b8((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dl)+(new Date()).getTime()+Math.random()).slice(0,16)}function aB(){var dl=cK();return b8((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dl)).slice(0,6)}function bf(){return Math.floor((new Date()).getTime()/1000)}function aJ(){var dm=bf();var dn=aB();var dl=String(dm)+dn;return dl}function c4(dn){dn=String(dn);var dr=aB();var dp=dr.length;var dq=dn.substr(-1*dp,dp);var dm=parseInt(dn.substr(0,dn.length-dp),10);if(dm&&dq&&dq===dr){var dl=bf();if(aZ<=0){return true}if(dl>=dm&&dl<=(dm+aZ)){return true}}return false}function dj(dl){if(!cP){return""
+}var dq=e(dl,av);if(!dq){return""}dq=String(dq);var dn=new RegExp("^[a-zA-Z0-9]+$");if(dq.length===32&&dn.test(dq)){var dm=dq.substr(16,32);if(c4(dm)){var dp=dq.substr(0,16);return dp}}return""}function cQ(){if(!bP){bP=dj(bO)}var dn=new Date(),dl=Math.round(dn.getTime()/1000),dm=aT("id"),dr=aD(dm),dq,dp;if(dr){dq=dr.split(".");dq.unshift("0");if(bP.length){dq[1]=bP}return dq}if(bP.length){dp=bP}else{if("0"===b6()){dp=""}else{dp=cT()}}dq=["1",dp,dl];return dq}function aY(){var dp=cQ(),dm=dp[0],dn=dp[1],dl=dp[2];return{newVisitor:dm,uuid:dn,createTs:dl}}function aH(){var dp=new Date(),dm=dp.getTime(),dq=aY().createTs;var dl=parseInt(dq,10);var dn=(dl*1000)+cM-dm;return dn}function aM(dl){if(!b7){return}var dn=new Date(),dm=Math.round(dn.getTime()/1000);if(!J(dl)){dl=aY()}var dp=dl.uuid+"."+dl.createTs+".";dg(aT("id"),dp,aH(),bq,cZ,bT)}function bN(){var dl=aD(aT("ref"));if(dl.length){try{dl=S.JSON.parse(dl);if(V(dl)){return dl}}catch(dm){}}return["","",0,""]}function bx(dm){var dl="testvalue";
+dg("test",dl,10000,null,dm);if(aD("test")===dl){b0("test",null,dm);return true}return false}function aF(){var dm=bm;bm=false;var dl,dn;for(dl=0;dl<bv.length;dl++){dn=aT(bv[dl]);if(dn!==cO&&dn!==bd&&0!==aD(dn)){b0(dn,bq,cZ)}}bm=dm}function b4(dl){b7=dl}function dk(dq){if(!dq||!V(dq)){return}var dp=[];var dn;for(dn in dq){if(Object.prototype.hasOwnProperty.call(dq,dn)){dp.push(dn)}}var dr={};dp.sort();var dl=dp.length;var dm;for(dm=0;dm<dl;dm++){dr[dp[dm]]=dq[dp[dm]]}return dr}function ce(){dg(aT("ses"),"1",cp,bq,cZ,bT)}function bg(){var dp="";var dm="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dn=dm.length;var dl;for(dl=0;dl<6;dl++){dp+=dm.charAt(Math.floor(Math.random()*dn))}return dp}function aA(dl){if(h&&h.timing&&h&&h.timing.connectEnd&&h.timing.fetchStart){dl+="&pf_net="+(h.timing.connectEnd-h.timing.fetchStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.requestStart){dl+="&pf_srv="+(h.timing.responseStart-h.timing.requestStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.responseEnd){dl+="&pf_tfr="+(h.timing.responseEnd-h.timing.responseStart)
+}if(h&&h.timing&&h&&h.timing.domInteractive&&h.timing.domLoading){dl+="&pf_dm1="+(h.timing.domInteractive-h.timing.domLoading)}if(h&&h.timing&&h&&h.timing.domComplete&&h.timing.domInteractive){dl+="&pf_dm2="+(h.timing.domComplete-h.timing.domInteractive)}if(h&&h.timing&&h&&h.timing.loadEventEnd&&h.timing.loadEventStart){dl+="&pf_onl="+(h.timing.loadEventEnd-h.timing.loadEventStart)}return dl}function ct(dn,dI,dJ){var dH,dm=new Date(),dv=Math.round(dm.getTime()/1000),ds,dF,dp=1024,dO,dw,dE=aQ,dq=aT("ses"),dC=aT("ref"),dz=aT("cvar"),dA=aD(dq),dG=bN(),dK=a4||bO,dt,dl;if(bm){aF()}if(cS){return""}var dB=aY();var dy=G.characterSet||G.charset;if(!dy||dy.toLowerCase()==="utf-8"){dy=null}dt=dG[0];dl=dG[1];ds=dG[2];dF=dG[3];if(!dA){if(!bw||!dt.length){for(dH in cr){if(Object.prototype.hasOwnProperty.call(cr,dH)){dt=e(dK,cr[dH]);if(dt.length){break}}}for(dH in bH){if(Object.prototype.hasOwnProperty.call(bH,dH)){dl=e(dK,bH[dH]);if(dl.length){break}}}}dO=d(bo);dw=dF.length?d(dF):"";if(dO.length&&!aV(dO)&&(!bw||!dw.length||aV(dw))){dF=bo
+}if(dF.length||dt.length){ds=dv;dG=[dt,dl,ds,b3(dF.slice(0,dp))];dg(dC,S.JSON.stringify(dG),c7,bq,cZ,bT)}}dn+="&idsite="+b7+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dm.getHours()+"&m="+dm.getMinutes()+"&s="+dm.getSeconds()+"&url="+s(b3(dK))+(bo.length?"&urlref="+s(b3(bo)):"")+((bz&&bz.length)?"&uid="+s(bz):"")+"&_id="+dB.uuid+"&_idn="+dB.newVisitor+(dt.length?"&_rcn="+s(dt):"")+(dl.length?"&_rck="+s(dl):"")+"&_refts="+ds+(String(dF).length?"&_ref="+s(b3(dF.slice(0,dp))):"")+(dy?"&cs="+s(dy):"")+"&send_image=0";var dN=cK();for(dH in dN){if(Object.prototype.hasOwnProperty.call(dN,dH)){dn+="&"+dH+"="+dN[dH]}}var dM=[];if(dI){for(dH in dI){if(Object.prototype.hasOwnProperty.call(dI,dH)&&/^dimension\d+$/.test(dH)){var dr=dH.replace("dimension","");dM.push(parseInt(dr,10));dM.push(String(dr));dn+="&"+dH+"="+s(dI[dH]);delete dI[dH]}}}if(dI&&B(dI)){dI=null}for(dH in cu){if(Object.prototype.hasOwnProperty.call(cu,dH)){dn+="&"+dH+"="+s(cu[dH])}}for(dH in bn){if(Object.prototype.hasOwnProperty.call(bn,dH)){var dx=(-1===M(dM,dH));
+if(dx){dn+="&dimension"+dH+"="+s(bn[dH])}}}if(dI){dn+="&data="+s(S.JSON.stringify(dI))}else{if(ao){dn+="&data="+s(S.JSON.stringify(ao))}}function du(dP,dQ){var dR=S.JSON.stringify(dP);if(dR.length>2){return"&"+dQ+"="+s(dR)}return""}var dL=dk(bX);var dD=dk(cn);dn+=du(dL,"cvar");dn+=du(dD,"e_cvar");if(aQ){dn+=du(aQ,"_cvar");for(dH in dE){if(Object.prototype.hasOwnProperty.call(dE,dH)){if(aQ[dH][0]===""||aQ[dH][1]===""){delete aQ[dH]}}}if(bR){dg(dz,S.JSON.stringify(aQ),cp,bq,cZ,bT)}}if(a2&&bF&&!bh){dn=aA(dn);bh=true}if(aL){dn+="&pv_id="+aL}aM(dB);ce();dn+=ac(dJ,{tracker:bJ,request:dn});if(c1.length){dn+="&"+c1}if(A(cc)){dn=cc(dn)}return dn}bS=function a7(){var dl=new Date();dl=dl.getTime();if(!c0){return false}if((c0+(1000*c9))<=dl){return false}if(c0+a5<=dl){bJ.ping();return true}return false};function br(dp,dn,dt,dq,dl,dw){var ds="idgoal=0",dm=new Date(),du=[],dv,dr=String(dp).length;if(dr){ds+="&ec_id="+s(dp)}ds+="&revenue="+dn;if(String(dt).length){ds+="&ec_st="+dt}if(String(dq).length){ds+="&ec_tx="+dq
+}if(String(dl).length){ds+="&ec_sh="+dl}if(String(dw).length){ds+="&ec_dt="+dw}if(c2){for(dv in c2){if(Object.prototype.hasOwnProperty.call(c2,dv)){if(!J(c2[dv][1])){c2[dv][1]=""}if(!J(c2[dv][2])){c2[dv][2]=""}if(!J(c2[dv][3])||String(c2[dv][3]).length===0){c2[dv][3]=0}if(!J(c2[dv][4])||String(c2[dv][4]).length===0){c2[dv][4]=1}du.push(c2[dv])}}ds+="&ec_items="+s(S.JSON.stringify(du))}ds=ct(ds,ao,"ecommerce");bG(ds,bK);if(dr){c2={}}}function bZ(dl,dq,dp,dn,dm,dr){if(String(dl).length&&J(dq)){br(dl,dq,dp,dn,dm,dr)}}function bt(dl){if(J(dl)){br("",dl,"","","","")}}function b1(dm,dp,dn){aL=bg();var dl=ct("action_name="+s(al(dm||bj)),dp,"log");if(!bh){dl=aA(dl)}bG(dl,bK,dn)}function a0(dn,dm){var dp,dl="(^| )(piwik[_-]"+dm+"|matomo[_-]"+dm;if(dn){for(dp=0;dp<dn.length;dp++){dl+="|"+dn[dp]}}dl+=")( |$)";return new RegExp(dl)}function aU(dl){return(aE&&dl&&0===String(dl).indexOf(aE))}function cw(dq,dl,dr,dm){if(aU(dl)){return 0}var dp=a0(bM,"download"),dn=a0(a8,"link"),ds=new RegExp("\\.("+c8.join("|")+")([?&#]|$)","i");
+if(dn.test(dq)){return"link"}if(dm||dp.test(dq)||ds.test(dl)){return"download"}if(dr){return 0}return"link"}function au(dm){var dl;dl=dm.parentNode;while(dl!==null&&J(dl)){if(ae.isLinkElement(dm)){break}dm=dl;dl=dm.parentNode}return dm}function de(dr){dr=au(dr);if(!ae.hasNodeAttribute(dr,"href")){return}if(!J(dr.href)){return}var dq=ae.getAttributeValueFromNode(dr,"href");var dm=dr.pathname||cm(dr.href);var ds=dr.hostname||d(dr.href);var dt=ds.toLowerCase();var dn=dr.href.replace(ds,dt);var dp=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dp.test(dn)){var dl=cw(dr.className,dn,ar(dt,dm),ae.hasNodeAttribute(dr,"download"));if(dl){return{type:dl,href:dn}}}}function aP(dl,dm,dn,dp){var dq=v.buildInteractionRequestParams(dl,dm,dn,dp);if(!dq){return}return ct(dq,null,"contentInteraction")}function bb(dl,dm){if(!dl||!dm){return false}var dn=v.findTargetNode(dl);if(v.shouldIgnoreInteraction(dn)){return false}dn=v.findTargetNodeNoDefault(dl);if(dn&&!U(dn,dm)){return false
+}return true}function cv(dn,dm,dq){if(!dn){return}var dl=v.findParentContentNode(dn);if(!dl){return}if(!bb(dl,dn)){return}var dp=v.buildContentBlock(dl);if(!dp){return}if(!dp.target&&dq){dp.target=dq}return v.buildInteractionRequestParams(dm,dp.name,dp.piece,dp.target)}function aW(dm){if(!cb||!cb.length){return false}var dl,dn;for(dl=0;dl<cb.length;dl++){dn=cb[dl];if(dn&&dn.name===dm.name&&dn.piece===dm.piece&&dn.target===dm.target){return true}}return false}function aX(dl){return function(dq){if(!dl){return}var dn=v.findParentContentNode(dl);var dm;if(dq){dm=dq.target||dq.srcElement}if(!dm){dm=dl}if(!bb(dn,dm)){return}if(!dn){return false}var dr=v.findTargetNode(dn);if(!dr||v.shouldIgnoreInteraction(dr)){return false}var dp=de(dr);if(db&&dp&&dp.type){return dp.type}return bJ.trackContentInteractionNode(dm,"click")}}function b2(dn){if(!dn||!dn.length){return}var dl,dm;for(dl=0;dl<dn.length;dl++){dm=v.findTargetNode(dn[dl]);if(dm&&!dm.contentInteractionTrackingSetupDone){dm.contentInteractionTrackingSetupDone=true;
+an(dm,"click",aX(dm))}}}function by(dn,dp){if(!dn||!dn.length){return[]}var dl,dm;for(dl=0;dl<dn.length;dl++){if(aW(dn[dl])){dn.splice(dl,1);dl--}else{cb.push(dn[dl])}}if(!dn||!dn.length){return[]}b2(dp);var dq=[];for(dl=0;dl<dn.length;dl++){dm=ct(v.buildImpressionRequestParams(dn[dl].name,dn[dl].piece,dn[dl].target),undefined,"contentImpressions");if(dm){dq.push(dm)}}return dq}function cB(dm){var dl=v.collectContent(dm);return by(dl,dm)}function a9(dm){if(!dm||!dm.length){return[]}var dl;for(dl=0;dl<dm.length;dl++){if(!v.isNodeVisible(dm[dl])){dm.splice(dl,1);dl--}}if(!dm||!dm.length){return[]}return cB(dm)}function aG(dn,dl,dm){var dp=v.buildImpressionRequestParams(dn,dl,dm);return ct(dp,null,"contentImpression")}function dd(dp,dm){if(!dp){return}var dl=v.findParentContentNode(dp);var dn=v.buildContentBlock(dl);if(!dn){return}if(!dm){dm="Unknown"}return aP(dm,dn.name,dn.piece,dn.target)}function cR(dm,dp,dl,dn){return"e_c="+s(dm)+"&e_a="+s(dp)+(J(dl)?"&e_n="+s(dl):"")+(J(dn)?"&e_v="+s(dn):"")
+}function at(dn,dq,dl,dp,ds,dr){if(!Y(dn)||!Y(dq)){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");return false}var dm=ct(cR(dn,dq,dl,dp),ds,"event");bG(dm,bK,dr)}function b9(dl,dp,dm,dq){var dn=ct("search="+s(dl)+(dp?"&search_cat="+s(dp):"")+(J(dm)?"&search_count="+dm:""),dq,"sitesearch");bG(dn,bK)}function cV(dl,dq,dp,dn){var dm=ct("idgoal="+dl+(dq?"&revenue="+dq:""),dp,"goal");bG(dm,bK,dn)}function c3(dp,dl,dt,ds,dn){var dr=dl+"="+s(b3(dp));var dm=cv(dn,"click",dp);if(dm){dr+="&"+dm}var dq=ct(dr,dt,"link");bG(dq,bK,ds)}function bV(dm,dl){if(dm!==""){return dm+dl.charAt(0).toUpperCase()+dl.slice(1)}return dl}function ci(dr){var dq,dl,dp=["","webkit","ms","moz"],dn;if(!be){for(dl=0;dl<dp.length;dl++){dn=dp[dl];if(Object.prototype.hasOwnProperty.call(G,bV(dn,"hidden"))){if(G[bV(dn,"visibilityState")]==="prerender"){dq=true}break}}}if(dq){an(G,dn+"visibilitychange",function dm(){G.removeEventListener(dn+"visibilitychange",dm,false);
+dr()});return}dr()}function bs(){var dm=bJ.getVisitorId();var dl=aJ();return dm+dl}function ck(dl){if(!dl){return}if(!ae.hasNodeAttribute(dl,"href")){return}var dm=ae.getAttributeValueFromNode(dl,"href");if(!dm||aU(dm)){return}if(!bJ.getVisitorId()){return}dm=j(dm,av);var dn=bs();dm=F(dm,av,dn);ae.setAnyAttribute(dl,"href",dm)}function bl(dp){var dq=ae.getAttributeValueFromNode(dp,"href");if(!dq){return false}dq=String(dq);var dm=dq.indexOf("//")===0||dq.indexOf("http://")===0||dq.indexOf("https://")===0;if(!dm){return false}var dl=dp.pathname||cm(dp.href);var dn=(dp.hostname||d(dp.href)).toLowerCase();if(ar(dn,dl)){if(!cJ(cW,L(dn))){return true}return false}return false}function cI(dl){var dm=de(dl);if(dm&&dm.type){dm.href=o(dm.href);c3(dm.href,dm.type,undefined,null,dl);return}if(cP){dl=au(dl);if(bl(dl)){ck(dl)}}}function cx(){return G.all&&!G.addEventListener}function cX(dl){var dn=dl.which;var dm=(typeof dl.button);if(!dn&&dm!=="undefined"){if(cx()){if(dl.button&1){dn=1}else{if(dl.button&2){dn=3
+}else{if(dl.button&4){dn=2}}}}else{if(dl.button===0||dl.button==="0"){dn=1}else{if(dl.button&1){dn=2}else{if(dl.button&2){dn=3}}}}}return dn}function bU(dl){switch(cX(dl)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function a1(dl){return dl.target||dl.srcElement}function aC(dl){return function(dp){dp=dp||S.event;var dn=bU(dp);var dq=a1(dp);if(dp.type==="click"){var dm=false;if(dl&&dn==="middle"){dm=true}if(dq&&!dm){cI(dq)}}else{if(dp.type==="mousedown"){if(dn==="middle"&&dq){aR=dn;bB=dq}else{aR=bB=null}}else{if(dp.type==="mouseup"){if(dn===aR&&dq===bB){cI(dq)}aR=bB=null}else{if(dp.type==="contextmenu"){cI(dq)}}}}}}function aq(dn,dm){var dl=typeof dm;if(dl==="undefined"){dm=true}an(dn,"click",aC(dm),false);if(dm){an(dn,"mouseup",aC(dm),false);an(dn,"mousedown",aC(dm),false);an(dn,"contextmenu",aC(dm),false)}}function bE(dn,dq){ap=true;var dp,dm=a0(bA,"ignore"),dr=G.links,dl=null,ds=null;if(dr){for(dp=0;dp<dr.length;dp++){dl=dr[dp];if(!dm.test(dl.className)){ds=typeof dl.matomoTrackers;
+if("undefined"===ds){dl.matomoTrackers=[]}if(-1===M(dl.matomoTrackers,dq)){dl.matomoTrackers.push(dq);aq(dl,dn)}}}}}function aS(dm,dq,dr){if(cg){return true}cg=true;var ds=false;var dp,dn;function dl(){ds=true}m(function(){function dt(dv){setTimeout(function(){if(!cg){return}ds=false;dr.trackVisibleContentImpressions();dt(dv)},dv)}function du(dv){setTimeout(function(){if(!cg){return}if(ds){ds=false;dr.trackVisibleContentImpressions()}du(dv)},dv)}if(dm){dp=["scroll","resize"];for(dn=0;dn<dp.length;dn++){if(G.addEventListener){G.addEventListener(dp[dn],dl,false)}else{S.attachEvent("on"+dp[dn],dl)}}du(100)}if(dq&&dq>0){dq=parseInt(dq,10);dt(dq)}})}var bD={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dl=this.requests;this.requests=[];if(dl.length===1){bG(dl[0],bK)}else{dh(dl,bK)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dm){if(!this.canQueue()){dh(dm,bK);return}var dl;for(dl=0;dl<dm.length;dl++){this.push(dm[dl])}},push:function(dl){if(!dl){return
+}if(!this.canQueue()){bG(dl,bK);return}bD.requests.push(dl);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bD.timeout=null;bD.sendRequests()},bD.interval);var dm="RequestQueue"+ax;if(!Object.prototype.hasOwnProperty.call(b,dm)){b[dm]={unload:function(){if(bD.timeout){clearTimeout(bD.timeout)}bD.sendRequests()}}}}};bi();aM();this.hasConsent=function(){return bC};this.getVisitorId=function(){return aY().uuid};this.getVisitorInfo=function(){return cQ()};this.getAttributionInfo=function(){return bN()};this.getAttributionCampaignName=function(){return bN()[0]};this.getAttributionCampaignKeyword=function(){return bN()[1]};this.getAttributionReferrerTimestamp=function(){return bN()[2]};this.getAttributionReferrerUrl=function(){return bN()[3]};this.setTrackerUrl=function(dl){aE=dl};this.getTrackerUrl=function(){return aE};this.getMatomoUrl=function(){return W(this.getTrackerUrl(),bI)};this.getPiwikUrl=function(){return this.getMatomoUrl()};this.addTracker=function(dn,dm){if(!J(dn)||null===dn){dn=this.getTrackerUrl()
+}var dl=new P(dn,dm);I.push(dl);t.trigger("TrackerAdded",[this]);return dl};this.getSiteId=function(){return b7};this.setSiteId=function(dl){b4(dl)};this.resetUserId=function(){bz=""};this.setUserId=function(dl){if(Y(dl)){bz=dl}};this.setVisitorId=function(dm){var dl=/[0-9A-Fa-f]{16}/g;if(w(dm)&&dl.test(dm)){bP=dm}else{ak("Invalid visitorId set"+dm)}};this.getUserId=function(){return bz};this.setCustomData=function(dl,dm){if(V(dl)){ao=dl}else{if(!ao){ao={}}ao[dl]=dm}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dl){cc=dl};this.appendToTrackingUrl=function(dl){c1=dl};this.getRequest=function(dl){return ct(dl)};this.addPlugin=function(dl,dm){b[dl]=dm};this.setCustomDimension=function(dl,dm){dl=parseInt(dl,10);if(dl>0){if(!J(dm)){dm=""}if(!w(dm)){dm=String(dm)}bn[dl]=dm}};this.getCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0&&Object.prototype.hasOwnProperty.call(bn,dl)){return bn[dl]}};this.deleteCustomDimension=function(dl){dl=parseInt(dl,10);
+if(dl>0){delete bn[dl]}};this.setCustomVariable=function(dm,dl,dq,dn){var dp;if(!J(dn)){dn="visit"}if(!J(dl)){return}if(!J(dq)){dq=""}if(dm>0){dl=!w(dl)?String(dl):dl;dq=!w(dq)?String(dq):dq;dp=[dl.slice(0,bu),dq.slice(0,bu)];if(dn==="visit"||dn===2){cH();aQ[dm]=dp}else{if(dn==="page"||dn===3){bX[dm]=dp}else{if(dn==="event"){cn[dm]=dp}}}}};this.getCustomVariable=function(dm,dn){var dl;if(!J(dn)){dn="visit"}if(dn==="page"||dn===3){dl=bX[dm]}else{if(dn==="event"){dl=cn[dm]}else{if(dn==="visit"||dn===2){cH();dl=aQ[dm]}}}if(!J(dl)||(dl&&dl[0]==="")){return false}return dl};this.deleteCustomVariable=function(dl,dm){if(this.getCustomVariable(dl,dm)){this.setCustomVariable(dl,"","",dm)}};this.deleteCustomVariables=function(dl){if(dl==="page"||dl===3){bX={}}else{if(dl==="event"){cn={}}else{if(dl==="visit"||dl===2){aQ={}}}}};this.storeCustomVariablesInCookie=function(){bR=true};this.setLinkTrackingTimer=function(dl){bK=dl};this.getLinkTrackingTimer=function(){return bK};this.setDownloadExtensions=function(dl){if(w(dl)){dl=dl.split("|")
+}c8=dl};this.addDownloadExtensions=function(dm){var dl;if(w(dm)){dm=dm.split("|")}for(dl=0;dl<dm.length;dl++){c8.push(dm[dl])}};this.removeDownloadExtensions=function(dn){var dm,dl=[];if(w(dn)){dn=dn.split("|")}for(dm=0;dm<c8.length;dm++){if(M(dn,c8[dm])===-1){dl.push(c8[dm])}}c8=dl};this.setDomains=function(dl){ay=w(dl)?[dl]:dl;var dq=false,dn=0,dm;for(dn;dn<ay.length;dn++){dm=String(ay[dn]);if(cJ(cW,L(dm))){dq=true;break}var dp=cm(dm);if(dp&&dp!=="/"&&dp!=="/*"){dq=true;break}}if(!dq){ay.push(cW)}};this.enableCrossDomainLinking=function(){cP=true};this.disableCrossDomainLinking=function(){cP=false};this.isCrossDomainLinkingEnabled=function(){return cP};this.setCrossDomainLinkingTimeout=function(dl){aZ=dl};this.getCrossDomainLinkingUrlParameter=function(){return s(av)+"="+s(bs())};this.setIgnoreClasses=function(dl){bA=w(dl)?[dl]:dl};this.setRequestMethod=function(dl){dc=dl||cj};this.setRequestContentType=function(dl){cy=dl||aI};this.setReferrerUrl=function(dl){bo=dl};this.setCustomUrl=function(dl){a4=bW(bO,dl)
+};this.getCurrentUrl=function(){return a4||bO};this.setDocumentTitle=function(dl){bj=dl};this.setAPIUrl=function(dl){bI=dl};this.setDownloadClasses=function(dl){bM=w(dl)?[dl]:dl};this.setLinkClasses=function(dl){a8=w(dl)?[dl]:dl};this.setCampaignNameKey=function(dl){cr=w(dl)?[dl]:dl};this.setCampaignKeywordKey=function(dl){bH=w(dl)?[dl]:dl};this.discardHashTag=function(dl){bQ=dl};this.setCookieNamePrefix=function(dl){bk=dl;if(aQ){aQ=bY()}};this.setCookieDomain=function(dl){var dm=L(dl);if(bx(dm)){cZ=dm;bi()}};this.getCookieDomain=function(){return cZ};this.hasCookies=function(){return"1"===b6()};this.setSessionCookie=function(dn,dm,dl){if(!dn){throw new Error("Missing cookie name")}if(!J(dl)){dl=cp}bv.push(dn);dg(aT(dn),dm,dl,bq,cZ)};this.getCookie=function(dm){var dl=aD(aT(dm));if(dl===0){return null}return dl};this.setCookiePath=function(dl){bq=dl;bi()};this.getCookiePath=function(dl){return bq};this.setVisitorCookieTimeout=function(dl){cM=dl*1000};this.setSessionCookieTimeout=function(dl){cp=dl*1000
+};this.getSessionCookieTimeout=function(){return cp};this.setReferralCookieTimeout=function(dl){c7=dl*1000};this.setConversionAttributionFirstReferrer=function(dl){bw=dl};this.setSecureCookie=function(dl){bT=dl};this.disableCookies=function(){bm=true;if(b7){aF()}};this.areCookiesEnabled=function(){return !bm};this.setCookieConsentGiven=function(){if(bm&&!cS){bm=false;if(b7&&aw){aM();var dl=ct("ping=1",null,"ping");bG(dl,bK)}}};this.requireCookieConsent=function(){if(this.getRememberedCookieConsent()){return false}this.disableCookies();return true};this.getRememberedCookieConsent=function(){return aD(cF)};this.forgetCookieConsentGiven=function(){b0(cF,bq,cZ);this.disableCookies()};this.rememberCookieConsentGiven=function(dm){if(dm){dm=dm*60*60*1000}else{dm=30*365*24*60*60*1000}this.setCookieConsentGiven();var dl=new Date().getTime();dg(cF,dl,dm,bq,cZ,bT)};this.deleteCookies=function(){aF()};this.setDoNotTrack=function(dm){var dl=g.doNotTrack||g.msDoNotTrack;cS=dm&&(dl==="yes"||dl==="1");
+if(cS){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cY=true};this.disableAlwaysUseSendBeacon=function(){cY=false};this.addListener=function(dm,dl){aq(dm,dl)};this.enableLinkTracking=function(dm){db=true;var dl=this;ci(function(){p(function(){bE(dm,dl)});m(function(){bE(dm,dl)})})};this.enableJSErrorTracking=function(){if(cU){return}cU=true;var dl=S.onerror;S.onerror=function(dr,dp,dn,dq,dm){ci(function(){var ds="JavaScript Errors";var dt=dp+":"+dn;if(dq){dt+=":"+dq}at(ds,dt,dr)});if(dl){return dl(dr,dp,dn,dq,dm)}return false}};this.disablePerformanceTracking=function(){a2=false};this.setVisitStandardLength=function(dl){dl=Math.max(dl,5);c9=dl};this.enableHeartBeatTimer=function(dl){dl=Math.max(dl,5);a5=(dl||15)*1000;if(c0!==null){di()}};this.disableHeartBeatTimer=function(){bL();if(a5||aN){if(S.removeEventListener){S.removeEventListener("focus",ba);S.removeEventListener("blur",az)}else{if(S.detachEvent){S.detachEvent("onfocus",ba);S.detachEvent("onblur",az)}}}a5=null;aN=false
+};this.killFrame=function(){if(S.location!==S.top.location){S.top.location=S.location}};this.redirectFile=function(dl){if(S.location.protocol==="file:"){S.location=dl}};this.setCountPreRendered=function(dl){be=dl};this.trackGoal=function(dl,dp,dn,dm){ci(function(){cV(dl,dp,dn,dm)})};this.trackLink=function(dm,dl,dp,dn){ci(function(){c3(dm,dl,dp,dn)})};this.getNumTrackedPageViews=function(){return cs};this.trackPageView=function(dl,dn,dm){cb=[];cN=[];if(N(b7)){ci(function(){Z(aE,bI,b7)})}else{ci(function(){cs++;b1(dl,dn,dm)})}};this.trackAllContentImpressions=function(){if(N(b7)){return}ci(function(){p(function(){var dl=v.findContentNodes();var dm=cB(dl);bD.pushMultiple(dm)})})};this.trackVisibleContentImpressions=function(dl,dm){if(N(b7)){return}if(!J(dl)){dl=true}if(!J(dm)){dm=750}aS(dl,dm,this);ci(function(){m(function(){var dn=v.findContentNodes();var dp=a9(dn);bD.pushMultiple(dp)})})};this.trackContentImpression=function(dn,dl,dm){if(N(b7)){return}dn=a(dn);dl=a(dl);dm=a(dm);if(!dn){return
+}dl=dl||"Unknown";ci(function(){var dp=aG(dn,dl,dm);bD.push(dp)})};this.trackContentImpressionsWithinNode=function(dl){if(N(b7)||!dl){return}ci(function(){if(cg){m(function(){var dm=v.findContentNodesWithinNode(dl);var dn=a9(dm);bD.pushMultiple(dn)})}else{p(function(){var dm=v.findContentNodesWithinNode(dl);var dn=cB(dm);bD.pushMultiple(dn)})}})};this.trackContentInteraction=function(dn,dp,dl,dm){if(N(b7)){return}dn=a(dn);dp=a(dp);dl=a(dl);dm=a(dm);if(!dn||!dp){return}dl=dl||"Unknown";ci(function(){var dq=aP(dn,dp,dl,dm);if(dq){bD.push(dq)}})};this.trackContentInteractionNode=function(dn,dm){if(N(b7)||!dn){return}var dl=null;ci(function(){dl=dd(dn,dm);if(dl){bD.push(dl)}});return dl};this.logAllContentBlocksOnPage=function(){var dn=v.findContentNodes();var dl=v.collectContent(dn);var dm=typeof console;if(dm!=="undefined"&&console&&console.log){console.log(dl)}};this.trackEvent=function(dm,dp,dl,dn,dr,dq){ci(function(){at(dm,dp,dl,dn,dr,dq)})};this.trackSiteSearch=function(dl,dn,dm,dp){cb=[];
+ci(function(){b9(dl,dn,dm,dp)})};this.setEcommerceView=function(dq,dl,dn,dm){cu={};if(Y(dn)){dn=String(dn)}if(!J(dn)||dn===null||dn===false||!dn.length){dn=""}else{if(dn instanceof Array){dn=S.JSON.stringify(dn)}}var dp="_pkc";cu[dp]=dn;if(J(dm)&&dm!==null&&dm!==false&&String(dm).length){dp="_pkp";cu[dp]=dm}if(!Y(dq)&&!Y(dl)){return}if(Y(dq)){dp="_pks";cu[dp]=dq}if(!Y(dl)){dl=""}dp="_pkn";cu[dp]=dl};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c2))};this.addEcommerceItem=function(dq,dl,dn,dm,dp){if(Y(dq)){c2[dq]=[String(dq),dl,dn,dm,dp]}};this.removeEcommerceItem=function(dl){if(Y(dl)){dl=String(dl);delete c2[dl]}};this.clearEcommerceCart=function(){c2={}};this.trackEcommerceOrder=function(dl,dq,dp,dn,dm,dr){bZ(dl,dq,dp,dn,dm,dr)};this.trackEcommerceCartUpdate=function(dl){bt(dl)};this.trackRequest=function(dm,dp,dn,dl){ci(function(){var dq=ct(dm,dp,dl);bG(dq,bK,dn)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bD.enabled=false
+};this.setRequestQueueInterval=function(dl){if(dl<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bD.interval=dl};this.queueRequest=function(dl){ci(function(){var dm=ct(dl);bD.push(dm)})};this.isConsentRequired=function(){return cC};this.getRememberedConsent=function(){var dl=aD(bd);if(aD(cO)){if(dl){b0(bd,bq,cZ)}return null}if(!dl||dl===0){return null}return dl};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cC=true;bC=this.hasRememberedConsent();if(!bC){bm=true}x++;b["CoreConsent"+x]={unload:function(){if(!bC){aF()}}}};this.setConsentGiven=function(dm){bC=true;b0(cO,bq,cZ);var dn,dl;for(dn=0;dn<cN.length;dn++){dl=typeof cN[dn];if(dl==="string"){bG(cN[dn],bK)}else{if(dl==="object"){dh(cN[dn],bK)}}}cN=[];if(!J(dm)||dm){this.setCookieConsentGiven()}};this.rememberConsentGiven=function(dn){if(dn){dn=dn*60*60*1000}else{dn=30*365*24*60*60*1000}var dl=true;this.setConsentGiven(dl);var dm=new Date().getTime();
+dg(bd,dm,dn,bq,cZ,bT)};this.forgetConsentGiven=function(){var dl=30*365*24*60*60*1000;b0(bd,bq,cZ);dg(cO,new Date().getTime(),dl,bq,cZ,bT);this.forgetCookieConsentGiven();this.requireConsent()};this.isUserOptedOut=function(){return !bC};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=function(){var dl=false;this.rememberConsentGiven(0,dl)};m(function(){setTimeout(function(){bF=true},0)});t.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven"];
+function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getMatomoUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()
+}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;t={initialized:false,JSON:S.JSON,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:m,onReady:p,isNodeVisible:i,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||S,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ap,ao){if(!J(ao)){ao=this.getAsyncTracker().getSiteId()}if(!J(ap)){ap=this.getAsyncTracker().getTrackerUrl()}return new P(ap,ao)},getAsyncTrackers:function(){return I},addTracker:function(aq,ap){var ao;if(!I.length){ao=ad(aq,ap)}else{ao=I[0].addTracker(aq,ap)
+}return ao},getAsyncTracker:function(at,ar){var aq;if(I&&I.length&&I[0]){aq=I[0]}else{return ad(at,ar)}if(!ar&&!at){return aq}if((!J(ar)||null===ar)&&aq){ar=aq.getSiteId()}if((!J(at)||null===at)&&aq){at=aq.getTrackerUrl()}var ap,ao=0;for(ao;ao<I.length;ao++){ap=I[ao];if(ap&&String(ap.getSiteId())===String(ar)&&ap.getTrackerUrl()===at){return ap}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return t});define("matomo",[],function(){return t})}return t}())}
/*!!! pluginTrackerHook */
-(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;
-if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.matomoPluginAsyncInit&&window.matomoPluginAsyncInit.length){var a=0;for(a;a<window.matomoPluginAsyncInit.length;a++){if(typeof window.matomoPluginAsyncInit[a]==="function"){window.matomoPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}if(window&&window.matomoAsyncInit){window.matomoAsyncInit()}if(!window.Matomo.getAsyncTrackers().length){if(b()){window.Matomo.addTracker()}else{_paq={push:function(c){var d=typeof console;if(d!=="undefined"&&console&&console.error){console.error("_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Matomo.trigger("MatomoInitialized",[]);
-window.Matomo.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Matomo}}());if(typeof piwik_log!=="function"){piwik_log=function(c,e,g,f){function b(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var d,a=window.Matomo.getTracker(g,e);a.setDocumentTitle(c);a.setCustomData(f);d=b("tracker_pause");if(d){a.setLinkTrackingTimer(d)}d=b("download_extensions");if(d){a.setDownloadExtensions(d)}d=b("hosts_alias");if(d){a.setDomains(d)}d=b("ignore_classes");if(d){a.setIgnoreClasses(d)}a.trackPageView();if(b("install_tracker")){piwik_track=function(i,j,k,h){a.setSiteId(j);a.setTrackerUrl(k);a.trackLink(i,h)};a.enableLinkTracking()}}}
+(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.matomoPluginAsyncInit&&window.matomoPluginAsyncInit.length){var a=0;for(a;a<window.matomoPluginAsyncInit.length;a++){if(typeof window.matomoPluginAsyncInit[a]==="function"){window.matomoPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()
+}if(window&&window.matomoAsyncInit){window.matomoAsyncInit()}if(!window.Matomo.getAsyncTrackers().length){if(b()){window.Matomo.addTracker()}else{_paq={push:function(c){var d=typeof console;if(d!=="undefined"&&console&&console.error){console.error("_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Matomo.trigger("MatomoInitialized",[]);window.Matomo.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Matomo}}());if(typeof piwik_log!=="function"){piwik_log=function(c,e,g,f){function b(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var d,a=window.Matomo.getTracker(g,e);a.setDocumentTitle(c);
+a.setCustomData(f);d=b("tracker_pause");if(d){a.setLinkTrackingTimer(d)}d=b("download_extensions");if(d){a.setDownloadExtensions(d)}d=b("hosts_alias");if(d){a.setDomains(d)}d=b("ignore_classes");if(d){a.setIgnoreClasses(d)}a.trackPageView();if(b("install_tracker")){piwik_track=function(i,j,k,h){a.setSiteId(j);a.setTrackerUrl(k);a.trackLink(i,h)};a.enableLinkTracking()}}}
/*!! @license-end */; \ No newline at end of file
diff --git a/js/tracker.php b/js/tracker.php
index 8098163654..0e70c4c641 100644
--- a/js/tracker.php
+++ b/js/tracker.php
@@ -67,6 +67,19 @@ $environment = new \Piwik\Application\Environment(null, array(
));
$environment->init();
+if (!\Piwik\Tracker\IgnoreCookie::isIgnoreCookieFound()) {
+
+ $request = new \Piwik\Tracker\Request(array());
+
+ if ($request->shouldUseThirdPartyCookie()) {
+ $visitorId = $request->getVisitorIdForThirdPartyCookie();
+ if (!$visitorId) {
+ $visitorId = \Piwik\Common::hex2bin(\Piwik\Tracker\Visit::generateUniqueVisitorId());
+ }
+ $request->setThirdPartyCookie($visitorId);
+ }
+}
+
ProxyHttp::serverStaticFile($file, "application/javascript; charset=UTF-8", $daysExpireFarFuture, $byteStart, $byteEnd);
exit;
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php
index 21451e0ffa..f097920613 100644
--- a/libs/Zend/Session.php
+++ b/libs/Zend/Session.php
@@ -478,13 +478,6 @@ class Zend_Session extends Zend_Session_Abstract
. " output started in {$filename}/{$linenum}");
}
- // See http://www.php.net/manual/en/ref.session.php for explanation
- if (!self::$_unitTestEnabled && defined('SID')) {
- /** @see Zend_Session_Exception */
- // require_once 'Zend/Session/Exception.php';
- throw new Zend_Session_Exception('session has already been started by session.auto-start or session_start()');
- }
-
/**
* Hack to throw exceptions on start instead of php errors
* @see http://framework.zend.com/issues/browse/ZF-1325
diff --git a/matomo.js b/matomo.js
index ceac1f78db..0875c5db97 100644
--- a/matomo.js
+++ b/matomo.js
@@ -29,43 +29,44 @@ ao=ae.findFirstNodeHavingAttribute(ap,this.CONTENT_PIECE_ATTR);if(!ao){ao=ae.fin
},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||S.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap
}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(ao){if(ae.hasNodeAttribute(ao,this.CONTENT_IGNOREINTERACTION_ATTR)){return true}if(ae.hasNodeCssClass(ao,this.CONTENT_IGNOREINTERACTION_CLASS)){return true}if(ae.hasNodeCssClass(ao,this.LEGACY_CONTENT_IGNOREINTERACTION_CLASS)){return true}return false}};function W(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(Q(ap,"matomo.php")){ap=f(ap,"matomo.php".length)
}else{if(Q(ap,"piwik.php")){ap=f(ap,"piwik.php".length)}else{if(Q(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(Q(ap,"/js/")){ap=f(ap,"js/".length)}return ap}function N(av){var ax="Matomo_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}S.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=S.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,av,aq){var au=S.name.split("###"),at=au[1],ao=au[2],ar=au[3],aw=W(ap,av);n(aw+"plugins/Overlay/client/client.js?v=1",function(){Matomo_Overlay_Client.initialize(aw,aq,at,ao,ar)})}function u(){var aq;try{aq=S.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return S.self!==S.top
-}catch(ao){return true}}function P(ce,b9){var bI=this,bc="mtm_consent",cM="mtm_consent_removed",b4=aa(G.domain,S.location.href,K()),cU=L(b4[0]),bN=o(b4[1]),bn=o(b4[2]),cS=false,ci="GET",da=ci,aH="application/x-www-form-urlencoded; charset=UTF-8",cx=aH,aD=ce||"",bH="",cZ="",b6=b9||"",by="",bO="",a3,bi="",c6=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ax=[cU],bz=[],bL=[],a7=[],bJ=500,cW=true,cJ,a4,bR,c7=1800,bP,ao,cq=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bG=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bj="_pk_",av="pk_vid",aY=180,cX,bp,bS=false,bl=false,cQ,bd,bv,cK=33955200000,co=1800000,c5=15768000000,a1=true,bE=false,bg=false,bQ=false,aP=false,cb,bW={},cm={},bm={},bt=200,ct={},c0={},c8={},ca=[],cf=false,cC=false,ap=false,c9=false,cN=false,aM=false,bb=u(),cy=null,cY=null,cc,aQ,bA,b7=am,bo,aK,cr=0,bu=["id","ses","cvar","ref"],cB=false,bB=null,cL=[],aw=T++;
-try{bi=G.title}catch(cz){bi=""}function de(dq,dn,dm,dp,dl,dk){if(bl){return}var dj;if(dm){dj=new Date();dj.setTime(dj.getTime()+dm)}G.cookie=dq+"="+s(dn)+(dm?";expires="+dj.toGMTString():"")+";path="+(dp||"/")+(dl?";domain="+dl:"")+(dk?";secure":"")+";SameSite=Lax"}function aC(dl){if(bl){return 0}var dj=new RegExp("(^|;)[ ]*"+dl+"=([^;]*)"),dk=dj.exec(G.cookie);return dk?R(dk[2]):0}bB=!aC(cM);function b2(dj){var dk;dj=j(dj,av);if(bP){dk=new RegExp("#.*");return dj.replace(dk,"")}return dj}function bV(dl,dj){var dm=r(dj),dk;if(dm){return dj}if(dj.slice(0,1)==="/"){return r(dl)+"://"+d(dl)+dj}dl=b2(dl);dk=dl.indexOf("?");if(dk>=0){dl=dl.slice(0,dk)}dk=dl.lastIndexOf("/");if(dk!==dl.length-1){dl=dl.slice(0,dk+1)}return dl+dj}function cH(dl,dj){var dk;dl=String(dl).toLowerCase();dj=String(dj).toLowerCase();if(dl===dj){return true}if(dj.slice(0,1)==="."){if(dl===dj.slice(1)){return true}dk=dl.length-dj.length;if((dk>0)&&(dl.slice(dk)===dj)){return true}}return false}function cl(dj){var dk=document.createElement("a");
-if(dj.indexOf("//")!==0&&dj.indexOf("http")!==0){if(dj.indexOf("*")===0){dj=dj.substr(1)}if(dj.indexOf(".")===0){dj=dj.substr(1)}dj="http://"+dj}dk.href=v.toAbsoluteUrl(dj);if(dk.pathname){return dk.pathname}return""}function a2(dk,dj){if(!aj(dj,"/")){dj="/"+dj}if(!aj(dk,"/")){dk="/"+dk}var dl=(dj==="/"||dj==="/*");if(dl){return true}if(dk===dj){return true}dj=String(dj).toLowerCase();dk=String(dk).toLowerCase();if(Q(dj,"*")){dj=dj.slice(0,-1);dl=(!dj||dj==="/");if(dl){return true}if(dk===dj){return true}return dk.indexOf(dj)===0}if(!Q(dk,"/")){dk+="/"}if(!Q(dj,"/")){dj+="/"}return dk.indexOf(dj)===0}function ar(dn,dq){var dk,dj,dl,dm,dp;for(dk=0;dk<ax.length;dk++){dm=L(ax[dk]);dp=cl(ax[dk]);if(cH(dn,dm)&&a2(dq,dp)){return true}}return false}function aU(dm){var dk,dj,dl;for(dk=0;dk<ax.length;dk++){dj=L(ax[dk].toLowerCase());if(dm===dj){return true}if(dj.slice(0,1)==="."){if(dm===dj.slice(1)){return true}dl=dm.length-dj.length;if((dl>0)&&(dm.slice(dl)===dj)){return true}}}return false}function cp(dj,dl){dj=dj.replace("send_image=0","send_image=1");
-var dk=new Image(1,1);dk.onload=function(){E=0;if(typeof dl==="function"){dl({request:dj,trackerUrl:aD,success:true})}};dk.onerror=function(){if(typeof dl==="function"){dl({request:dj,trackerUrl:aD,success:false})}};dk.src=aD+(aD.indexOf("?")<0?"?":"&")+dj}function cE(dj){if(da==="POST"){return true}return dj&&(dj.length>2000||dj.indexOf('{"requests"')===0)}function aJ(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a5(dn,dr,dq){var dl=aJ();if(!dl){return false}var dm={type:"application/x-www-form-urlencoded; charset=UTF-8"};var ds=false;var dk=aD;try{var dj=new Blob([dn],dm);if(dq&&!cE(dn)){dj=new Blob([],dm);dk=dk+(dk.indexOf("?")<0?"?":"&")+dn}ds=g.sendBeacon(dk,dj)}catch(dp){return false}if(ds&&typeof dr==="function"){dr({request:dn,trackerUrl:aD,success:true,isSendBeacon:true})}return ds}function c4(dk,dl,dj){if(!J(dj)||null===dj){dj=true}if(l&&a5(dk,dl,dj)){return}setTimeout(function(){if(l&&a5(dk,dl,dj)){return}var dp;try{var dn=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
-dn.open("POST",aD,true);dn.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dq=l&&a5(dk,dl,dj);if(!dq&&dj){cp(dk,dl)}else{if(typeof dl==="function"){dl({request:dk,trackerUrl:aD,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dl==="function")){dl({request:dk,trackerUrl:aD,success:true,xhr:this})}}};dn.setRequestHeader("Content-Type",cx);dn.withCredentials=true;dn.send(dk)}catch(dm){dp=l&&a5(dk,dl,dj);if(!dp&&dj){cp(dk,dl)}else{if(typeof dl==="function"){dl({request:dk,trackerUrl:aD,success:false})}}}},50)}function cg(dk){var dj=new Date();var dl=dj.getTime()+dk;if(!q||dl>q){q=dl}}function cn(dj){if(cc||!a4||!bB){return}cc=setTimeout(function dk(){cc=null;if(!bb){bb=(!G.hasFocus||G.hasFocus())}if(!bb){cn(a4);return}if(bR()){return}var dl=new Date(),dm=a4-(dl.getTime()-cY);dm=Math.min(a4,dm);cn(dm)},dj||a4)}function bK(){if(!cc){return}clearTimeout(cc);cc=null}function a9(){bb=true;cy=new Date().getTime()}function dd(){var dj=new Date().getTime();
-return !cy||(dj-cy)>a4}function ay(){if(dd()){bR()}bK()}function dg(){if(aM||!a4){return}aM=true;an(S,"focus",a9);an(S,"blur",ay);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aM&&dd()){bR()}}})}function cD(dn){var dk=new Date();var dj=dk.getTime();cY=dj;if(cC&&dj<cC){var dl=cC-dj;setTimeout(dn,dl);cg(dl+50);cC+=50;return}if(cC===false){var dm=800;cC=dj+dm}dn()}function aN(){if(aC(cM)){bB=false}else{if(aC(bc)){bB=true}}}function bF(dk,dj,dl){aN();if(!bB){cL.push(dk);return}if(!cQ&&dk){if(cB&&bB){dk+="&consent=1"}cD(function(){if(cW&&a5(dk,dl,true)){cg(100);return}if(cE(dk)){c4(dk,dl)}else{cp(dk,dl)}cg(dj)})}if(!aM){dg()}}function ck(dj){if(cQ){return false}return(dj&&dj.length)}function c3(dj,dn){if(!dn||dn>=dj.length){return[dj]}var dk=0;var dl=dj.length;var dm=[];for(dk;dk<dl;dk+=dn){dm.push(dj.slice(dk,dk+dn))}return dm}function df(dk,dj){if(!ck(dk)){return}if(!bB){cL.push(dk);return}cD(function(){var dn=c3(dk,50);var dl=0,dm;for(dl;dl<dn.length;dl++){dm='{"requests":["?'+dn[dl].join('","?')+'"]}';
-if(cW&&a5(dm,null,false)){cg(100)}else{c4(dm,null,false)}}cg(dj)})}function aS(dj){return bj+dj+"."+b6+"."+bo}function bY(dl,dk,dj){de(dl,"",-86400,dk,dj)}function b5(){if(bl){return"0"}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){return g.cookieEnabled?"1":"0"}var dj=bj+"testcookie";de(dj,"1",undefined,bp,cX,bS);var dk=aC(dj)==="1"?"1":"0";bY(dj);return dk}function bh(){bo=b7((cX||cU)+(bp||"/")).slice(0,4)}function cI(){if(J(c8.res)){return c8}var dk,dm,dn={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",fla:"application/x-shockwave-flash",java:"application/x-java-vm",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(dk in dn){if(Object.prototype.hasOwnProperty.call(dn,dk)){dm=g.mimeTypes[dn[dk]];c8[dk]=(dm&&dm.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(g.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(g.javaEnabled)&&g.javaEnabled()){c8.java="1"
-}c8.cookie=b5()}var dl=parseInt(X.width,10);var dj=parseInt(X.height,10);c8.res=parseInt(dl,10)+"x"+parseInt(dj,10);return c8}function bX(){var dk=aS("cvar"),dj=aC(dk);if(dj&&dj.length){dj=S.JSON.parse(dj);if(V(dj)){return dj}}return{}}function cF(){if(aP===false){aP=bX()}}function cR(){var dj=cI();return b7((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dj)+(new Date()).getTime()+Math.random()).slice(0,16)}function aA(){var dj=cI();return b7((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dj)).slice(0,6)}function be(){return Math.floor((new Date()).getTime()/1000)}function aI(){var dk=be();var dl=aA();var dj=String(dk)+dl;return dj}function c2(dl){dl=String(dl);var dp=aA();var dm=dp.length;var dn=dl.substr(-1*dm,dm);var dk=parseInt(dl.substr(0,dl.length-dm),10);if(dk&&dn&&dn===dp){var dj=be();if(aY<=0){return true}if(dj>=dk&&dj<=(dk+aY)){return true}}return false}function dh(dj){if(!cN){return""}var dn=e(dj,av);if(!dn){return""}dn=String(dn);var dl=new RegExp("^[a-zA-Z0-9]+$");
-if(dn.length===32&&dl.test(dn)){var dk=dn.substr(16,32);if(c2(dk)){var dm=dn.substr(0,16);return dm}}return""}function cO(){if(!bO){bO=dh(bN)}var dl=new Date(),dj=Math.round(dl.getTime()/1000),dk=aS("id"),dp=aC(dk),dn,dm;if(dp){dn=dp.split(".");dn.unshift("0");if(bO.length){dn[1]=bO}return dn}if(bO.length){dm=bO}else{if("0"===b5()){dm=""}else{dm=cR()}}dn=["1",dm,dj];return dn}function aX(){var dm=cO(),dk=dm[0],dl=dm[1],dj=dm[2];return{newVisitor:dk,uuid:dl,createTs:dj}}function aG(){var dm=new Date(),dk=dm.getTime(),dn=aX().createTs;var dj=parseInt(dn,10);var dl=(dj*1000)+cK-dk;return dl}function aL(dj){if(!b6){return}var dl=new Date(),dk=Math.round(dl.getTime()/1000);if(!J(dj)){dj=aX()}var dm=dj.uuid+"."+dj.createTs+".";de(aS("id"),dm,aG(),bp,cX,bS)}function bM(){var dj=aC(aS("ref"));if(dj.length){try{dj=S.JSON.parse(dj);if(V(dj)){return dj}}catch(dk){}}return["","",0,""]}function bw(dk){var dj="testvalue";de("test",dj,10000,null,dk);if(aC("test")===dj){bY("test",null,dk);return true}return false
-}function aE(){var dk=bl;bl=false;var dj,dl;for(dj=0;dj<bu.length;dj++){dl=aS(bu[dj]);if(dl!==cM&&dl!==bc&&0!==aC(dl)){bY(dl,bp,cX)}}bl=dk}function b3(dj){b6=dj;aL()}function di(dn){if(!dn||!V(dn)){return}var dm=[];var dl;for(dl in dn){if(Object.prototype.hasOwnProperty.call(dn,dl)){dm.push(dl)}}var dp={};dm.sort();var dj=dm.length;var dk;for(dk=0;dk<dj;dk++){dp[dm[dk]]=dn[dm[dk]]}return dp}function cd(){de(aS("ses"),"1",co,bp,cX,bS)}function bf(){var dm="";var dk="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dl=dk.length;var dj;for(dj=0;dj<6;dj++){dm+=dk.charAt(Math.floor(Math.random()*dl))}return dm}function az(dj){if(h&&h.timing&&h&&h.timing.connectEnd&&h.timing.fetchStart){dj+="&pf_net="+(h.timing.connectEnd-h.timing.fetchStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.requestStart){dj+="&pf_srv="+(h.timing.responseStart-h.timing.requestStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.responseEnd){dj+="&pf_tfr="+(h.timing.responseEnd-h.timing.responseStart)
-}if(h&&h.timing&&h&&h.timing.domInteractive&&h.timing.domLoading){dj+="&pf_dm1="+(h.timing.domInteractive-h.timing.domLoading)}if(h&&h.timing&&h&&h.timing.domComplete&&h.timing.domInteractive){dj+="&pf_dm2="+(h.timing.domComplete-h.timing.domInteractive)}if(h&&h.timing&&h&&h.timing.loadEventEnd&&h.timing.loadEventStart){dj+="&pf_onl="+(h.timing.loadEventEnd-h.timing.loadEventStart)}return dj}function cs(dl,dG,dH){var dF,dk=new Date(),dt=Math.round(dk.getTime()/1000),dq,dD,dm=1024,dM,du,dC=aP,dn=aS("ses"),dA=aS("ref"),dx=aS("cvar"),dy=aC(dn),dE=bM(),dI=a3||bN,dr,dj;if(bl){aE()}if(cQ){return""}var dz=aX();var dw=G.characterSet||G.charset;if(!dw||dw.toLowerCase()==="utf-8"){dw=null}dr=dE[0];dj=dE[1];dq=dE[2];dD=dE[3];if(!dy){if(!bv||!dr.length){for(dF in cq){if(Object.prototype.hasOwnProperty.call(cq,dF)){dr=e(dI,cq[dF]);if(dr.length){break}}}for(dF in bG){if(Object.prototype.hasOwnProperty.call(bG,dF)){dj=e(dI,bG[dF]);if(dj.length){break}}}}dM=d(bn);du=dD.length?d(dD):"";if(dM.length&&!aU(dM)&&(!bv||!du.length||aU(du))){dD=bn
-}if(dD.length||dr.length){dq=dt;dE=[dr,dj,dq,b2(dD.slice(0,dm))];de(dA,S.JSON.stringify(dE),c5,bp,cX,bS)}}dl+="&idsite="+b6+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dk.getHours()+"&m="+dk.getMinutes()+"&s="+dk.getSeconds()+"&url="+s(b2(dI))+(bn.length?"&urlref="+s(b2(bn)):"")+((by&&by.length)?"&uid="+s(by):"")+"&_id="+dz.uuid+"&_idn="+dz.newVisitor+(dr.length?"&_rcn="+s(dr):"")+(dj.length?"&_rck="+s(dj):"")+"&_refts="+dq+(String(dD).length?"&_ref="+s(b2(dD.slice(0,dm))):"")+(dw?"&cs="+s(dw):"")+"&send_image=0";var dL=cI();for(dF in dL){if(Object.prototype.hasOwnProperty.call(dL,dF)){dl+="&"+dF+"="+dL[dF]}}var dK=[];if(dG){for(dF in dG){if(Object.prototype.hasOwnProperty.call(dG,dF)&&/^dimension\d+$/.test(dF)){var dp=dF.replace("dimension","");dK.push(parseInt(dp,10));dK.push(String(dp));dl+="&"+dF+"="+s(dG[dF]);delete dG[dF]}}}if(dG&&B(dG)){dG=null}for(dF in ct){if(Object.prototype.hasOwnProperty.call(ct,dF)){dl+="&"+dF+"="+s(ct[dF])}}for(dF in bm){if(Object.prototype.hasOwnProperty.call(bm,dF)){var dv=(-1===M(dK,dF));
-if(dv){dl+="&dimension"+dF+"="+s(bm[dF])}}}if(dG){dl+="&data="+s(S.JSON.stringify(dG))}else{if(ao){dl+="&data="+s(S.JSON.stringify(ao))}}function ds(dN,dO){var dP=S.JSON.stringify(dN);if(dP.length>2){return"&"+dO+"="+s(dP)}return""}var dJ=di(bW);var dB=di(cm);dl+=ds(dJ,"cvar");dl+=ds(dB,"e_cvar");if(aP){dl+=ds(aP,"_cvar");for(dF in dC){if(Object.prototype.hasOwnProperty.call(dC,dF)){if(aP[dF][0]===""||aP[dF][1]===""){delete aP[dF]}}}if(bQ){de(dx,S.JSON.stringify(aP),co,bp,cX,bS)}}if(a1&&bE&&!bg){dl=az(dl);bg=true}if(aK){dl+="&pv_id="+aK}aL(dz);cd();dl+=ac(dH,{tracker:bI,request:dl});if(cZ.length){dl+="&"+cZ}if(A(cb)){dl=cb(dl)}return dl}bR=function a6(){var dj=new Date();dj=dj.getTime();if(!cY){return false}if((cY+(1000*c7))<=dj){return false}if(cY+a4<=dj){bI.ping();return true}return false};function bq(dm,dl,dr,dn,dj,du){var dq="idgoal=0",dk=new Date(),ds=[],dt,dp=String(dm).length;if(dp){dq+="&ec_id="+s(dm)}dq+="&revenue="+dl;if(String(dr).length){dq+="&ec_st="+dr}if(String(dn).length){dq+="&ec_tx="+dn
-}if(String(dj).length){dq+="&ec_sh="+dj}if(String(du).length){dq+="&ec_dt="+du}if(c0){for(dt in c0){if(Object.prototype.hasOwnProperty.call(c0,dt)){if(!J(c0[dt][1])){c0[dt][1]=""}if(!J(c0[dt][2])){c0[dt][2]=""}if(!J(c0[dt][3])||String(c0[dt][3]).length===0){c0[dt][3]=0}if(!J(c0[dt][4])||String(c0[dt][4]).length===0){c0[dt][4]=1}ds.push(c0[dt])}}dq+="&ec_items="+s(S.JSON.stringify(ds))}dq=cs(dq,ao,"ecommerce");bF(dq,bJ);if(dp){c0={}}}function bZ(dj,dn,dm,dl,dk,dp){if(String(dj).length&&J(dn)){bq(dj,dn,dm,dl,dk,dp)}}function bs(dj){if(J(dj)){bq("",dj,"","","","")}}function b0(dk,dm,dl){aK=bf();var dj=cs("action_name="+s(al(dk||bi)),dm,"log");if(!bg){dj=az(dj)}bF(dj,bJ,dl)}function aZ(dl,dk){var dm,dj="(^| )(piwik[_-]"+dk+"|matomo[_-]"+dk;if(dl){for(dm=0;dm<dl.length;dm++){dj+="|"+dl[dm]}}dj+=")( |$)";return new RegExp(dj)}function aT(dj){return(aD&&dj&&0===String(dj).indexOf(aD))}function cv(dn,dj,dp,dk){if(aT(dj)){return 0}var dm=aZ(bL,"download"),dl=aZ(a7,"link"),dq=new RegExp("\\.("+c6.join("|")+")([?&#]|$)","i");
-if(dl.test(dn)){return"link"}if(dk||dm.test(dn)||dq.test(dj)){return"download"}if(dp){return 0}return"link"}function au(dk){var dj;dj=dk.parentNode;while(dj!==null&&J(dj)){if(ae.isLinkElement(dk)){break}dk=dj;dj=dk.parentNode}return dk}function dc(dp){dp=au(dp);if(!ae.hasNodeAttribute(dp,"href")){return}if(!J(dp.href)){return}var dn=ae.getAttributeValueFromNode(dp,"href");var dk=dp.pathname||cl(dp.href);var dq=dp.hostname||d(dp.href);var dr=dq.toLowerCase();var dl=dp.href.replace(dq,dr);var dm=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dm.test(dl)){var dj=cv(dp.className,dl,ar(dr,dk),ae.hasNodeAttribute(dp,"download"));if(dj){return{type:dj,href:dl}}}}function aO(dj,dk,dl,dm){var dn=v.buildInteractionRequestParams(dj,dk,dl,dm);if(!dn){return}return cs(dn,null,"contentInteraction")}function ba(dj,dk){if(!dj||!dk){return false}var dl=v.findTargetNode(dj);if(v.shouldIgnoreInteraction(dl)){return false}dl=v.findTargetNodeNoDefault(dj);if(dl&&!U(dl,dk)){return false
-}return true}function cu(dl,dk,dn){if(!dl){return}var dj=v.findParentContentNode(dl);if(!dj){return}if(!ba(dj,dl)){return}var dm=v.buildContentBlock(dj);if(!dm){return}if(!dm.target&&dn){dm.target=dn}return v.buildInteractionRequestParams(dk,dm.name,dm.piece,dm.target)}function aV(dk){if(!ca||!ca.length){return false}var dj,dl;for(dj=0;dj<ca.length;dj++){dl=ca[dj];if(dl&&dl.name===dk.name&&dl.piece===dk.piece&&dl.target===dk.target){return true}}return false}function aW(dj){return function(dn){if(!dj){return}var dl=v.findParentContentNode(dj);var dk;if(dn){dk=dn.target||dn.srcElement}if(!dk){dk=dj}if(!ba(dl,dk)){return}if(!dl){return false}var dp=v.findTargetNode(dl);if(!dp||v.shouldIgnoreInteraction(dp)){return false}var dm=dc(dp);if(c9&&dm&&dm.type){return dm.type}return bI.trackContentInteractionNode(dk,"click")}}function b1(dl){if(!dl||!dl.length){return}var dj,dk;for(dj=0;dj<dl.length;dj++){dk=v.findTargetNode(dl[dj]);if(dk&&!dk.contentInteractionTrackingSetupDone){dk.contentInteractionTrackingSetupDone=true;
-an(dk,"click",aW(dk))}}}function bx(dl,dm){if(!dl||!dl.length){return[]}var dj,dk;for(dj=0;dj<dl.length;dj++){if(aV(dl[dj])){dl.splice(dj,1);dj--}else{ca.push(dl[dj])}}if(!dl||!dl.length){return[]}b1(dm);var dn=[];for(dj=0;dj<dl.length;dj++){dk=cs(v.buildImpressionRequestParams(dl[dj].name,dl[dj].piece,dl[dj].target),undefined,"contentImpressions");if(dk){dn.push(dk)}}return dn}function cA(dk){var dj=v.collectContent(dk);return bx(dj,dk)}function a8(dk){if(!dk||!dk.length){return[]}var dj;for(dj=0;dj<dk.length;dj++){if(!v.isNodeVisible(dk[dj])){dk.splice(dj,1);dj--}}if(!dk||!dk.length){return[]}return cA(dk)}function aF(dl,dj,dk){var dm=v.buildImpressionRequestParams(dl,dj,dk);return cs(dm,null,"contentImpression")}function db(dm,dk){if(!dm){return}var dj=v.findParentContentNode(dm);var dl=v.buildContentBlock(dj);if(!dl){return}if(!dk){dk="Unknown"}return aO(dk,dl.name,dl.piece,dl.target)}function cP(dk,dm,dj,dl){return"e_c="+s(dk)+"&e_a="+s(dm)+(J(dj)?"&e_n="+s(dj):"")+(J(dl)?"&e_v="+s(dl):"")
-}function at(dl,dn,dj,dm,dq,dp){if(!Y(dl)||!Y(dn)){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");return false}var dk=cs(cP(dl,dn,dj,dm),dq,"event");bF(dk,bJ,dp)}function b8(dj,dm,dk,dn){var dl=cs("search="+s(dj)+(dm?"&search_cat="+s(dm):"")+(J(dk)?"&search_count="+dk:""),dn,"sitesearch");bF(dl,bJ)}function cT(dj,dn,dm,dl){var dk=cs("idgoal="+dj+(dn?"&revenue="+dn:""),dm,"goal");bF(dk,bJ,dl)}function c1(dm,dj,dr,dq,dl){var dp=dj+"="+s(b2(dm));var dk=cu(dl,"click",dm);if(dk){dp+="&"+dk}var dn=cs(dp,dr,"link");bF(dn,bJ,dq)}function bU(dk,dj){if(dk!==""){return dk+dj.charAt(0).toUpperCase()+dj.slice(1)}return dj}function ch(dp){var dn,dj,dm=["","webkit","ms","moz"],dl;if(!bd){for(dj=0;dj<dm.length;dj++){dl=dm[dj];if(Object.prototype.hasOwnProperty.call(G,bU(dl,"hidden"))){if(G[bU(dl,"visibilityState")]==="prerender"){dn=true}break}}}if(dn){an(G,dl+"visibilitychange",function dk(){G.removeEventListener(dl+"visibilitychange",dk,false);
-dp()});return}dp()}function br(){var dk=bI.getVisitorId();var dj=aI();return dk+dj}function cj(dj){if(!dj){return}if(!ae.hasNodeAttribute(dj,"href")){return}var dk=ae.getAttributeValueFromNode(dj,"href");if(!dk||aT(dk)){return}if(!bI.getVisitorId()){return}dk=j(dk,av);var dl=br();dk=F(dk,av,dl);ae.setAnyAttribute(dj,"href",dk)}function bk(dm){var dn=ae.getAttributeValueFromNode(dm,"href");if(!dn){return false}dn=String(dn);var dk=dn.indexOf("//")===0||dn.indexOf("http://")===0||dn.indexOf("https://")===0;if(!dk){return false}var dj=dm.pathname||cl(dm.href);var dl=(dm.hostname||d(dm.href)).toLowerCase();if(ar(dl,dj)){if(!cH(cU,L(dl))){return true}return false}return false}function cG(dj){var dk=dc(dj);if(dk&&dk.type){dk.href=o(dk.href);c1(dk.href,dk.type,undefined,null,dj);return}if(cN){dj=au(dj);if(bk(dj)){cj(dj)}}}function cw(){return G.all&&!G.addEventListener}function cV(dj){var dl=dj.which;var dk=(typeof dj.button);if(!dl&&dk!=="undefined"){if(cw()){if(dj.button&1){dl=1}else{if(dj.button&2){dl=3
-}else{if(dj.button&4){dl=2}}}}else{if(dj.button===0||dj.button==="0"){dl=1}else{if(dj.button&1){dl=2}else{if(dj.button&2){dl=3}}}}}return dl}function bT(dj){switch(cV(dj)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function a0(dj){return dj.target||dj.srcElement}function aB(dj){return function(dm){dm=dm||S.event;var dl=bT(dm);var dn=a0(dm);if(dm.type==="click"){var dk=false;if(dj&&dl==="middle"){dk=true}if(dn&&!dk){cG(dn)}}else{if(dm.type==="mousedown"){if(dl==="middle"&&dn){aQ=dl;bA=dn}else{aQ=bA=null}}else{if(dm.type==="mouseup"){if(dl===aQ&&dn===bA){cG(dn)}aQ=bA=null}else{if(dm.type==="contextmenu"){cG(dn)}}}}}}function aq(dl,dk){var dj=typeof dk;if(dj==="undefined"){dk=true}an(dl,"click",aB(dk),false);if(dk){an(dl,"mouseup",aB(dk),false);an(dl,"mousedown",aB(dk),false);an(dl,"contextmenu",aB(dk),false)}}function bD(dl,dn){ap=true;var dm,dk=aZ(bz,"ignore"),dp=G.links,dj=null,dq=null;if(dp){for(dm=0;dm<dp.length;dm++){dj=dp[dm];if(!dk.test(dj.className)){dq=typeof dj.matomoTrackers;
-if("undefined"===dq){dj.matomoTrackers=[]}if(-1===M(dj.matomoTrackers,dn)){dj.matomoTrackers.push(dn);aq(dj,dl)}}}}}function aR(dk,dn,dp){if(cf){return true}cf=true;var dq=false;var dm,dl;function dj(){dq=true}m(function(){function dr(dt){setTimeout(function(){if(!cf){return}dq=false;dp.trackVisibleContentImpressions();dr(dt)},dt)}function ds(dt){setTimeout(function(){if(!cf){return}if(dq){dq=false;dp.trackVisibleContentImpressions()}ds(dt)},dt)}if(dk){dm=["scroll","resize"];for(dl=0;dl<dm.length;dl++){if(G.addEventListener){G.addEventListener(dm[dl],dj,false)}else{S.attachEvent("on"+dm[dl],dj)}}ds(100)}if(dn&&dn>0){dn=parseInt(dn,10);dr(dn)}})}var bC={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dj=this.requests;this.requests=[];if(dj.length===1){bF(dj[0],bJ)}else{df(dj,bJ)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dk){if(!this.canQueue()){df(dk,bJ);return}var dj;for(dj=0;dj<dk.length;dj++){this.push(dk[dj])}},push:function(dj){if(!dj){return
-}if(!this.canQueue()){bF(dj,bJ);return}bC.requests.push(dj);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bC.timeout=null;bC.sendRequests()},bC.interval);var dk="RequestQueue"+aw;if(!Object.prototype.hasOwnProperty.call(b,dk)){b[dk]={unload:function(){if(bC.timeout){clearTimeout(bC.timeout)}bC.sendRequests()}}}}};bh();aL();this.hasConsent=function(){return bB};this.getVisitorId=function(){return aX().uuid};this.getVisitorInfo=function(){return cO()};this.getAttributionInfo=function(){return bM()};this.getAttributionCampaignName=function(){return bM()[0]};this.getAttributionCampaignKeyword=function(){return bM()[1]};this.getAttributionReferrerTimestamp=function(){return bM()[2]};this.getAttributionReferrerUrl=function(){return bM()[3]};this.setTrackerUrl=function(dj){aD=dj};this.getTrackerUrl=function(){return aD};this.getMatomoUrl=function(){return W(this.getTrackerUrl(),bH)};this.getPiwikUrl=function(){return this.getMatomoUrl()};this.addTracker=function(dl,dk){if(!J(dl)||null===dl){dl=this.getTrackerUrl()
-}var dj=new P(dl,dk);I.push(dj);t.trigger("TrackerAdded",[this]);return dj};this.getSiteId=function(){return b6};this.setSiteId=function(dj){b3(dj)};this.resetUserId=function(){by=""};this.setUserId=function(dj){if(Y(dj)){by=dj}};this.getUserId=function(){return by};this.setCustomData=function(dj,dk){if(V(dj)){ao=dj}else{if(!ao){ao={}}ao[dj]=dk}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dj){cb=dj};this.appendToTrackingUrl=function(dj){cZ=dj};this.getRequest=function(dj){return cs(dj)};this.addPlugin=function(dj,dk){b[dj]=dk};this.setCustomDimension=function(dj,dk){dj=parseInt(dj,10);if(dj>0){if(!J(dk)){dk=""}if(!w(dk)){dk=String(dk)}bm[dj]=dk}};this.getCustomDimension=function(dj){dj=parseInt(dj,10);if(dj>0&&Object.prototype.hasOwnProperty.call(bm,dj)){return bm[dj]}};this.deleteCustomDimension=function(dj){dj=parseInt(dj,10);if(dj>0){delete bm[dj]}};this.setCustomVariable=function(dk,dj,dn,dl){var dm;if(!J(dl)){dl="visit"}if(!J(dj)){return}if(!J(dn)){dn=""
-}if(dk>0){dj=!w(dj)?String(dj):dj;dn=!w(dn)?String(dn):dn;dm=[dj.slice(0,bt),dn.slice(0,bt)];if(dl==="visit"||dl===2){cF();aP[dk]=dm}else{if(dl==="page"||dl===3){bW[dk]=dm}else{if(dl==="event"){cm[dk]=dm}}}}};this.getCustomVariable=function(dk,dl){var dj;if(!J(dl)){dl="visit"}if(dl==="page"||dl===3){dj=bW[dk]}else{if(dl==="event"){dj=cm[dk]}else{if(dl==="visit"||dl===2){cF();dj=aP[dk]}}}if(!J(dj)||(dj&&dj[0]==="")){return false}return dj};this.deleteCustomVariable=function(dj,dk){if(this.getCustomVariable(dj,dk)){this.setCustomVariable(dj,"","",dk)}};this.deleteCustomVariables=function(dj){if(dj==="page"||dj===3){bW={}}else{if(dj==="event"){cm={}}else{if(dj==="visit"||dj===2){aP={}}}}};this.storeCustomVariablesInCookie=function(){bQ=true};this.setLinkTrackingTimer=function(dj){bJ=dj};this.getLinkTrackingTimer=function(){return bJ};this.setDownloadExtensions=function(dj){if(w(dj)){dj=dj.split("|")}c6=dj};this.addDownloadExtensions=function(dk){var dj;if(w(dk)){dk=dk.split("|")}for(dj=0;dj<dk.length;
-dj++){c6.push(dk[dj])}};this.removeDownloadExtensions=function(dl){var dk,dj=[];if(w(dl)){dl=dl.split("|")}for(dk=0;dk<c6.length;dk++){if(M(dl,c6[dk])===-1){dj.push(c6[dk])}}c6=dj};this.setDomains=function(dj){ax=w(dj)?[dj]:dj;var dn=false,dl=0,dk;for(dl;dl<ax.length;dl++){dk=String(ax[dl]);if(cH(cU,L(dk))){dn=true;break}var dm=cl(dk);if(dm&&dm!=="/"&&dm!=="/*"){dn=true;break}}if(!dn){ax.push(cU)}};this.enableCrossDomainLinking=function(){cN=true};this.disableCrossDomainLinking=function(){cN=false};this.isCrossDomainLinkingEnabled=function(){return cN};this.setCrossDomainLinkingTimeout=function(dj){aY=dj};this.getCrossDomainLinkingUrlParameter=function(){return s(av)+"="+s(br())};this.setIgnoreClasses=function(dj){bz=w(dj)?[dj]:dj};this.setRequestMethod=function(dj){da=dj||ci};this.setRequestContentType=function(dj){cx=dj||aH};this.setReferrerUrl=function(dj){bn=dj};this.setCustomUrl=function(dj){a3=bV(bN,dj)};this.getCurrentUrl=function(){return a3||bN};this.setDocumentTitle=function(dj){bi=dj
-};this.setAPIUrl=function(dj){bH=dj};this.setDownloadClasses=function(dj){bL=w(dj)?[dj]:dj};this.setLinkClasses=function(dj){a7=w(dj)?[dj]:dj};this.setCampaignNameKey=function(dj){cq=w(dj)?[dj]:dj};this.setCampaignKeywordKey=function(dj){bG=w(dj)?[dj]:dj};this.discardHashTag=function(dj){bP=dj};this.setCookieNamePrefix=function(dj){bj=dj;if(aP){aP=bX()}};this.setCookieDomain=function(dj){var dk=L(dj);if(bw(dk)){cX=dk;bh()}};this.getCookieDomain=function(){return cX};this.hasCookies=function(){return"1"===b5()};this.setSessionCookie=function(dl,dk,dj){if(!dl){throw new Error("Missing cookie name")}if(!J(dj)){dj=co}bu.push(dl);de(aS(dl),dk,dj,bp,cX)};this.getCookie=function(dk){var dj=aC(aS(dk));if(dj===0){return null}return dj};this.setCookiePath=function(dj){bp=dj;bh()};this.getCookiePath=function(dj){return bp};this.setVisitorCookieTimeout=function(dj){cK=dj*1000};this.setSessionCookieTimeout=function(dj){co=dj*1000};this.getSessionCookieTimeout=function(){return co};this.setReferralCookieTimeout=function(dj){c5=dj*1000
-};this.setConversionAttributionFirstReferrer=function(dj){bv=dj};this.setSecureCookie=function(dj){bS=dj};this.disableCookies=function(){bl=true;c8.cookie="0";if(b6){aE()}};this.deleteCookies=function(){aE()};this.setDoNotTrack=function(dk){var dj=g.doNotTrack||g.msDoNotTrack;cQ=dk&&(dj==="yes"||dj==="1");if(cQ){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cW=true};this.disableAlwaysUseSendBeacon=function(){cW=false};this.addListener=function(dk,dj){aq(dk,dj)};this.enableLinkTracking=function(dk){c9=true;var dj=this;ch(function(){p(function(){bD(dk,dj)});m(function(){bD(dk,dj)})})};this.enableJSErrorTracking=function(){if(cS){return}cS=true;var dj=S.onerror;S.onerror=function(dp,dm,dl,dn,dk){ch(function(){var dq="JavaScript Errors";var dr=dm+":"+dl;if(dn){dr+=":"+dn}at(dq,dr,dp)});if(dj){return dj(dp,dm,dl,dn,dk)}return false}};this.disablePerformanceTracking=function(){a1=false};this.setVisitStandardLength=function(dj){dj=Math.max(dj,5);c7=dj};this.enableHeartBeatTimer=function(dj){dj=Math.max(dj,5);
-a4=(dj||15)*1000;if(cY!==null){dg()}};this.disableHeartBeatTimer=function(){bK();if(a4||aM){if(S.removeEventListener){S.removeEventListener("focus",a9);S.removeEventListener("blur",ay)}else{if(S.detachEvent){S.detachEvent("onfocus",a9);S.detachEvent("onblur",ay)}}}a4=null;aM=false};this.killFrame=function(){if(S.location!==S.top.location){S.top.location=S.location}};this.redirectFile=function(dj){if(S.location.protocol==="file:"){S.location=dj}};this.setCountPreRendered=function(dj){bd=dj};this.trackGoal=function(dj,dm,dl,dk){ch(function(){cT(dj,dm,dl,dk)})};this.trackLink=function(dk,dj,dm,dl){ch(function(){c1(dk,dj,dm,dl)})};this.getNumTrackedPageViews=function(){return cr};this.trackPageView=function(dj,dl,dk){ca=[];cL=[];if(N(b6)){ch(function(){Z(aD,bH,b6)})}else{ch(function(){cr++;b0(dj,dl,dk)})}};this.trackAllContentImpressions=function(){if(N(b6)){return}ch(function(){p(function(){var dj=v.findContentNodes();var dk=cA(dj);bC.pushMultiple(dk)})})};this.trackVisibleContentImpressions=function(dj,dk){if(N(b6)){return
-}if(!J(dj)){dj=true}if(!J(dk)){dk=750}aR(dj,dk,this);ch(function(){m(function(){var dl=v.findContentNodes();var dm=a8(dl);bC.pushMultiple(dm)})})};this.trackContentImpression=function(dl,dj,dk){if(N(b6)){return}dl=a(dl);dj=a(dj);dk=a(dk);if(!dl){return}dj=dj||"Unknown";ch(function(){var dm=aF(dl,dj,dk);bC.push(dm)})};this.trackContentImpressionsWithinNode=function(dj){if(N(b6)||!dj){return}ch(function(){if(cf){m(function(){var dk=v.findContentNodesWithinNode(dj);var dl=a8(dk);bC.pushMultiple(dl)})}else{p(function(){var dk=v.findContentNodesWithinNode(dj);var dl=cA(dk);bC.pushMultiple(dl)})}})};this.trackContentInteraction=function(dl,dm,dj,dk){if(N(b6)){return}dl=a(dl);dm=a(dm);dj=a(dj);dk=a(dk);if(!dl||!dm){return}dj=dj||"Unknown";ch(function(){var dn=aO(dl,dm,dj,dk);if(dn){bC.push(dn)}})};this.trackContentInteractionNode=function(dl,dk){if(N(b6)||!dl){return}var dj=null;ch(function(){dj=db(dl,dk);if(dj){bC.push(dj)}});return dj};this.logAllContentBlocksOnPage=function(){var dl=v.findContentNodes();
-var dj=v.collectContent(dl);var dk=typeof console;if(dk!=="undefined"&&console&&console.log){console.log(dj)}};this.trackEvent=function(dk,dm,dj,dl,dp,dn){ch(function(){at(dk,dm,dj,dl,dp,dn)})};this.trackSiteSearch=function(dj,dl,dk,dm){ca=[];ch(function(){b8(dj,dl,dk,dm)})};this.setEcommerceView=function(dn,dj,dl,dk){ct={};if(Y(dl)){dl=String(dl)}if(!J(dl)||dl===null||dl===false||!dl.length){dl=""}else{if(dl instanceof Array){dl=S.JSON.stringify(dl)}}var dm="_pkc";ct[dm]=dl;if(J(dk)&&dk!==null&&dk!==false&&String(dk).length){dm="_pkp";ct[dm]=dk}if(!Y(dn)&&!Y(dj)){return}if(Y(dn)){dm="_pks";ct[dm]=dn}if(!Y(dj)){dj=""}dm="_pkn";ct[dm]=dj};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c0))};this.addEcommerceItem=function(dn,dj,dl,dk,dm){if(Y(dn)){c0[dn]=[String(dn),dj,dl,dk,dm]}};this.removeEcommerceItem=function(dj){if(Y(dj)){dj=String(dj);delete c0[dj]}};this.clearEcommerceCart=function(){c0={}};this.trackEcommerceOrder=function(dj,dn,dm,dl,dk,dp){bZ(dj,dn,dm,dl,dk,dp)
-};this.trackEcommerceCartUpdate=function(dj){bs(dj)};this.trackRequest=function(dk,dm,dl,dj){ch(function(){var dn=cs(dk,dm,dj);bF(dn,bJ,dl)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bC.enabled=false};this.setRequestQueueInterval=function(dj){if(dj<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bC.interval=dj};this.queueRequest=function(dj){ch(function(){var dk=cs(dj);bC.push(dk)})};this.isConsentRequired=function(){return cB};this.getRememberedConsent=function(){var dj=aC(bc);if(aC(cM)){if(dj){bY(bc,bp,cX)}return null}if(!dj||dj===0){return null}return dj};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cB=true;bB=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bB){aE()}}}};this.setConsentGiven=function(){bB=true;bY(cM,bp,cX);var dk,dj;for(dk=0;dk<cL.length;dk++){dj=typeof cL[dk];if(dj==="string"){bF(cL[dk],bJ)}else{if(dj==="object"){df(cL[dk],bJ)
-}}}cL=[]};this.rememberConsentGiven=function(dk){if(dk){dk=dk*60*60*1000}else{dk=30*365*24*60*60*1000}this.setConsentGiven();var dj=new Date().getTime();de(bc,dj,dk,bp,cX,bS)};this.forgetConsentGiven=function(){var dj=30*365*24*60*60*1000;bY(bc,bp,cX);de(cM,new Date().getTime(),dj,bp,cX,bS);this.requireConsent()};this.isUserOptedOut=function(){return !bB};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=this.rememberConsentGiven;m(function(){setTimeout(function(){bE=true},0)});t.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')
-}av[ap]++}}}}return au}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getMatomoUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);
-aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;t={initialized:false,JSON:S.JSON,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:m,onReady:p,isNodeVisible:i,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||S,ar)
-}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ap,ao){if(!J(ao)){ao=this.getAsyncTracker().getSiteId()}if(!J(ap)){ap=this.getAsyncTracker().getTrackerUrl()}return new P(ap,ao)},getAsyncTrackers:function(){return I},addTracker:function(aq,ap){var ao;if(!I.length){ao=ad(aq,ap)}else{ao=I[0].addTracker(aq,ap)}return ao},getAsyncTracker:function(at,ar){var aq;if(I&&I.length&&I[0]){aq=I[0]}else{return ad(at,ar)}if(!ar&&!at){return aq}if((!J(ar)||null===ar)&&aq){ar=aq.getSiteId()}if((!J(at)||null===at)&&aq){at=aq.getTrackerUrl()}var ap,ao=0;for(ao;ao<I.length;ao++){ap=I[ao];if(ap&&String(ap.getSiteId())===String(ar)&&ap.getTrackerUrl()===at){return ap}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return t});define("matomo",[],function(){return t})}return t}())}
+}catch(ao){return true}}function P(cf,ca){var bJ=this,bd="mtm_consent",cF="mtm_cookie_consent",cO="mtm_consent_removed",b5=aa(G.domain,S.location.href,K()),cW=L(b5[0]),bO=o(b5[1]),bo=o(b5[2]),cU=false,cj="GET",dc=cj,aI="application/x-www-form-urlencoded; charset=UTF-8",cy=aI,aE=cf||"",bI="",c1="",b7=ca||"",bz="",bP="",a4,bj="",c8=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cW],bA=[],bM=[],a8=[],bK=500,cY=true,cL,a5,bS,c9=1800,bQ,ao,cr=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bH=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bk="_pk_",av="pk_vid",aZ=180,cZ,bq,bT=false,bm=false,cS,be,bw,cM=33955200000,cp=1800000,c7=15768000000,a2=true,bF=false,bh=false,bR=false,aQ=false,cc,bX={},cn={},bn={},bu=200,cu={},c2={},da={},cb=[],cg=false,cD=false,ap=false,db=false,cP=false,aN=false,bc=u(),cz=null,c0=null,cd,aR,bB,b8=am,bp,aL,cs=0,bv=["id","ses","cvar","ref"],cC=false,bC=null,cN=[],ax=T++,aw=false;
+try{bj=G.title}catch(cA){bj=""}function dg(ds,dq,dp,dr,dn,dm){if(bm){return}var dl;if(dp){dl=new Date();dl.setTime(dl.getTime()+dp)}G.cookie=ds+"="+s(dq)+(dp?";expires="+dl.toGMTString():"")+";path="+(dr||"/")+(dn?";domain="+dn:"")+(dm?";secure":"")+";SameSite=Lax"}function aD(dn){if(bm){return 0}var dl=new RegExp("(^|;)[ ]*"+dn+"=([^;]*)"),dm=dl.exec(G.cookie);return dm?R(dm[2]):0}bC=!aD(cO);function b3(dl){var dm;dl=j(dl,av);if(bQ){dm=new RegExp("#.*");return dl.replace(dm,"")}return dl}function bW(dn,dl){var dp=r(dl),dm;if(dp){return dl}if(dl.slice(0,1)==="/"){return r(dn)+"://"+d(dn)+dl}dn=b3(dn);dm=dn.indexOf("?");if(dm>=0){dn=dn.slice(0,dm)}dm=dn.lastIndexOf("/");if(dm!==dn.length-1){dn=dn.slice(0,dm+1)}return dn+dl}function cJ(dn,dl){var dm;dn=String(dn).toLowerCase();dl=String(dl).toLowerCase();if(dn===dl){return true}if(dl.slice(0,1)==="."){if(dn===dl.slice(1)){return true}dm=dn.length-dl.length;if((dm>0)&&(dn.slice(dm)===dl)){return true}}return false}function cm(dl){var dm=document.createElement("a");
+if(dl.indexOf("//")!==0&&dl.indexOf("http")!==0){if(dl.indexOf("*")===0){dl=dl.substr(1)}if(dl.indexOf(".")===0){dl=dl.substr(1)}dl="http://"+dl}dm.href=v.toAbsoluteUrl(dl);if(dm.pathname){return dm.pathname}return""}function a3(dm,dl){if(!aj(dl,"/")){dl="/"+dl}if(!aj(dm,"/")){dm="/"+dm}var dn=(dl==="/"||dl==="/*");if(dn){return true}if(dm===dl){return true}dl=String(dl).toLowerCase();dm=String(dm).toLowerCase();if(Q(dl,"*")){dl=dl.slice(0,-1);dn=(!dl||dl==="/");if(dn){return true}if(dm===dl){return true}return dm.indexOf(dl)===0}if(!Q(dm,"/")){dm+="/"}if(!Q(dl,"/")){dl+="/"}return dm.indexOf(dl)===0}function ar(dq,ds){var dm,dl,dn,dp,dr;for(dm=0;dm<ay.length;dm++){dp=L(ay[dm]);dr=cm(ay[dm]);if(cJ(dq,dp)&&a3(ds,dr)){return true}}return false}function aV(dp){var dm,dl,dn;for(dm=0;dm<ay.length;dm++){dl=L(ay[dm].toLowerCase());if(dp===dl){return true}if(dl.slice(0,1)==="."){if(dp===dl.slice(1)){return true}dn=dp.length-dl.length;if((dn>0)&&(dp.slice(dn)===dl)){return true}}}return false}function cq(dl,dn){dl=dl.replace("send_image=0","send_image=1");
+var dm=new Image(1,1);dm.onload=function(){E=0;if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:true})}};dm.onerror=function(){if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:false})}};dm.src=aE+(aE.indexOf("?")<0?"?":"&")+dl}function cG(dl){if(dc==="POST"){return true}return dl&&(dl.length>2000||dl.indexOf('{"requests"')===0)}function aK(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a6(dq,dt,ds){var dn=aK();if(!dn){return false}var dp={type:"application/x-www-form-urlencoded; charset=UTF-8"};var du=false;var dm=aE;try{var dl=new Blob([dq],dp);if(ds&&!cG(dq)){dl=new Blob([],dp);dm=dm+(dm.indexOf("?")<0?"?":"&")+dq}du=g.sendBeacon(dm,dl)}catch(dr){return false}if(du&&typeof dt==="function"){dt({request:dq,trackerUrl:aE,success:true,isSendBeacon:true})}return du}function c6(dm,dn,dl){if(!J(dl)||null===dl){dl=true}if(l&&a6(dm,dn,dl)){return}setTimeout(function(){if(l&&a6(dm,dn,dl)){return}var dr;try{var dq=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
+dq.open("POST",aE,true);dq.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var ds=l&&a6(dm,dn,dl);if(!ds&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dn==="function")){dn({request:dm,trackerUrl:aE,success:true,xhr:this})}}};dq.setRequestHeader("Content-Type",cy);dq.withCredentials=true;dq.send(dm)}catch(dp){dr=l&&a6(dm,dn,dl);if(!dr&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false})}}}},50)}function ch(dm){var dl=new Date();var dn=dl.getTime()+dm;if(!q||dn>q){q=dn}}function co(dl){if(cd||!a5||!bC){return}cd=setTimeout(function dm(){cd=null;if(!bc){bc=(!G.hasFocus||G.hasFocus())}if(!bc){co(a5);return}if(bS()){return}var dn=new Date(),dp=a5-(dn.getTime()-c0);dp=Math.min(a5,dp);co(dp)},dl||a5)}function bL(){if(!cd){return}clearTimeout(cd);cd=null}function ba(){bc=true;cz=new Date().getTime()}function df(){var dl=new Date().getTime();
+return !cz||(dl-cz)>a5}function az(){if(df()){bS()}bL()}function di(){if(aN||!a5){return}aN=true;an(S,"focus",ba);an(S,"blur",az);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aN&&df()){bS()}}})}function cE(dq){var dm=new Date();var dl=dm.getTime();c0=dl;if(cD&&dl<cD){var dn=cD-dl;setTimeout(dq,dn);ch(dn+50);cD+=50;return}if(cD===false){var dp=800;cD=dl+dp}dq()}function aO(){if(aD(cO)){bC=false}else{if(aD(bd)){bC=true}}}function bG(dm,dl,dn){aO();if(!bC){cN.push(dm);return}aw=true;if(!cS&&dm){if(cC&&bC){dm+="&consent=1"}cE(function(){if(cY&&a6(dm,dn,true)){ch(100);return}if(cG(dm)){c6(dm,dn)}else{cq(dm,dn)}ch(dl)})}if(!aN){di()}}function cl(dl){if(cS){return false}return(dl&&dl.length)}function c5(dl,dq){if(!dq||dq>=dl.length){return[dl]}var dm=0;var dn=dl.length;var dp=[];for(dm;dm<dn;dm+=dq){dp.push(dl.slice(dm,dm+dq))}return dp}function dh(dm,dl){if(!cl(dm)){return}if(!bC){cN.push(dm);return}aw=true;cE(function(){var dq=c5(dm,50);var dn=0,dp;for(dn;dn<dq.length;dn++){dp='{"requests":["?'+dq[dn].join('","?')+'"]}';
+if(cY&&a6(dp,null,false)){ch(100)}else{c6(dp,null,false)}}ch(dl)})}function aT(dl){return bk+dl+"."+b7+"."+bp}function b0(dn,dm,dl){dg(dn,"",-86400,dm,dl)}function b6(){if(bm){return"0"}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){return g.cookieEnabled?"1":"0"}var dl=bk+"testcookie";dg(dl,"1",undefined,bq,cZ,bT);var dm=aD(dl)==="1"?"1":"0";b0(dl);return dm}function bi(){bp=b8((cZ||cW)+(bq||"/")).slice(0,4)}function cK(){if(J(da.res)){return da}var dm,dp,dq={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",fla:"application/x-shockwave-flash",java:"application/x-java-vm",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(dm in dq){if(Object.prototype.hasOwnProperty.call(dq,dm)){dp=g.mimeTypes[dq[dm]];da[dm]=(dp&&dp.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(g.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(g.javaEnabled)&&g.javaEnabled()){da.java="1"
+}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){da.cookie=g.cookieEnabled?"1":"0"}else{da.cookie=b6()}}var dn=parseInt(X.width,10);var dl=parseInt(X.height,10);da.res=parseInt(dn,10)+"x"+parseInt(dl,10);return da}function bY(){var dm=aT("cvar"),dl=aD(dm);if(dl&&dl.length){dl=S.JSON.parse(dl);if(V(dl)){return dl}}return{}}function cH(){if(aQ===false){aQ=bY()}}function cT(){var dl=cK();return b8((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dl)+(new Date()).getTime()+Math.random()).slice(0,16)}function aB(){var dl=cK();return b8((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dl)).slice(0,6)}function bf(){return Math.floor((new Date()).getTime()/1000)}function aJ(){var dm=bf();var dn=aB();var dl=String(dm)+dn;return dl}function c4(dn){dn=String(dn);var dr=aB();var dp=dr.length;var dq=dn.substr(-1*dp,dp);var dm=parseInt(dn.substr(0,dn.length-dp),10);if(dm&&dq&&dq===dr){var dl=bf();if(aZ<=0){return true}if(dl>=dm&&dl<=(dm+aZ)){return true}}return false}function dj(dl){if(!cP){return""
+}var dq=e(dl,av);if(!dq){return""}dq=String(dq);var dn=new RegExp("^[a-zA-Z0-9]+$");if(dq.length===32&&dn.test(dq)){var dm=dq.substr(16,32);if(c4(dm)){var dp=dq.substr(0,16);return dp}}return""}function cQ(){if(!bP){bP=dj(bO)}var dn=new Date(),dl=Math.round(dn.getTime()/1000),dm=aT("id"),dr=aD(dm),dq,dp;if(dr){dq=dr.split(".");dq.unshift("0");if(bP.length){dq[1]=bP}return dq}if(bP.length){dp=bP}else{if("0"===b6()){dp=""}else{dp=cT()}}dq=["1",dp,dl];return dq}function aY(){var dp=cQ(),dm=dp[0],dn=dp[1],dl=dp[2];return{newVisitor:dm,uuid:dn,createTs:dl}}function aH(){var dp=new Date(),dm=dp.getTime(),dq=aY().createTs;var dl=parseInt(dq,10);var dn=(dl*1000)+cM-dm;return dn}function aM(dl){if(!b7){return}var dn=new Date(),dm=Math.round(dn.getTime()/1000);if(!J(dl)){dl=aY()}var dp=dl.uuid+"."+dl.createTs+".";dg(aT("id"),dp,aH(),bq,cZ,bT)}function bN(){var dl=aD(aT("ref"));if(dl.length){try{dl=S.JSON.parse(dl);if(V(dl)){return dl}}catch(dm){}}return["","",0,""]}function bx(dm){var dl="testvalue";
+dg("test",dl,10000,null,dm);if(aD("test")===dl){b0("test",null,dm);return true}return false}function aF(){var dm=bm;bm=false;var dl,dn;for(dl=0;dl<bv.length;dl++){dn=aT(bv[dl]);if(dn!==cO&&dn!==bd&&0!==aD(dn)){b0(dn,bq,cZ)}}bm=dm}function b4(dl){b7=dl}function dk(dq){if(!dq||!V(dq)){return}var dp=[];var dn;for(dn in dq){if(Object.prototype.hasOwnProperty.call(dq,dn)){dp.push(dn)}}var dr={};dp.sort();var dl=dp.length;var dm;for(dm=0;dm<dl;dm++){dr[dp[dm]]=dq[dp[dm]]}return dr}function ce(){dg(aT("ses"),"1",cp,bq,cZ,bT)}function bg(){var dp="";var dm="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dn=dm.length;var dl;for(dl=0;dl<6;dl++){dp+=dm.charAt(Math.floor(Math.random()*dn))}return dp}function aA(dl){if(h&&h.timing&&h&&h.timing.connectEnd&&h.timing.fetchStart){dl+="&pf_net="+(h.timing.connectEnd-h.timing.fetchStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.requestStart){dl+="&pf_srv="+(h.timing.responseStart-h.timing.requestStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.responseEnd){dl+="&pf_tfr="+(h.timing.responseEnd-h.timing.responseStart)
+}if(h&&h.timing&&h&&h.timing.domInteractive&&h.timing.domLoading){dl+="&pf_dm1="+(h.timing.domInteractive-h.timing.domLoading)}if(h&&h.timing&&h&&h.timing.domComplete&&h.timing.domInteractive){dl+="&pf_dm2="+(h.timing.domComplete-h.timing.domInteractive)}if(h&&h.timing&&h&&h.timing.loadEventEnd&&h.timing.loadEventStart){dl+="&pf_onl="+(h.timing.loadEventEnd-h.timing.loadEventStart)}return dl}function ct(dn,dI,dJ){var dH,dm=new Date(),dv=Math.round(dm.getTime()/1000),ds,dF,dp=1024,dO,dw,dE=aQ,dq=aT("ses"),dC=aT("ref"),dz=aT("cvar"),dA=aD(dq),dG=bN(),dK=a4||bO,dt,dl;if(bm){aF()}if(cS){return""}var dB=aY();var dy=G.characterSet||G.charset;if(!dy||dy.toLowerCase()==="utf-8"){dy=null}dt=dG[0];dl=dG[1];ds=dG[2];dF=dG[3];if(!dA){if(!bw||!dt.length){for(dH in cr){if(Object.prototype.hasOwnProperty.call(cr,dH)){dt=e(dK,cr[dH]);if(dt.length){break}}}for(dH in bH){if(Object.prototype.hasOwnProperty.call(bH,dH)){dl=e(dK,bH[dH]);if(dl.length){break}}}}dO=d(bo);dw=dF.length?d(dF):"";if(dO.length&&!aV(dO)&&(!bw||!dw.length||aV(dw))){dF=bo
+}if(dF.length||dt.length){ds=dv;dG=[dt,dl,ds,b3(dF.slice(0,dp))];dg(dC,S.JSON.stringify(dG),c7,bq,cZ,bT)}}dn+="&idsite="+b7+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dm.getHours()+"&m="+dm.getMinutes()+"&s="+dm.getSeconds()+"&url="+s(b3(dK))+(bo.length?"&urlref="+s(b3(bo)):"")+((bz&&bz.length)?"&uid="+s(bz):"")+"&_id="+dB.uuid+"&_idn="+dB.newVisitor+(dt.length?"&_rcn="+s(dt):"")+(dl.length?"&_rck="+s(dl):"")+"&_refts="+ds+(String(dF).length?"&_ref="+s(b3(dF.slice(0,dp))):"")+(dy?"&cs="+s(dy):"")+"&send_image=0";var dN=cK();for(dH in dN){if(Object.prototype.hasOwnProperty.call(dN,dH)){dn+="&"+dH+"="+dN[dH]}}var dM=[];if(dI){for(dH in dI){if(Object.prototype.hasOwnProperty.call(dI,dH)&&/^dimension\d+$/.test(dH)){var dr=dH.replace("dimension","");dM.push(parseInt(dr,10));dM.push(String(dr));dn+="&"+dH+"="+s(dI[dH]);delete dI[dH]}}}if(dI&&B(dI)){dI=null}for(dH in cu){if(Object.prototype.hasOwnProperty.call(cu,dH)){dn+="&"+dH+"="+s(cu[dH])}}for(dH in bn){if(Object.prototype.hasOwnProperty.call(bn,dH)){var dx=(-1===M(dM,dH));
+if(dx){dn+="&dimension"+dH+"="+s(bn[dH])}}}if(dI){dn+="&data="+s(S.JSON.stringify(dI))}else{if(ao){dn+="&data="+s(S.JSON.stringify(ao))}}function du(dP,dQ){var dR=S.JSON.stringify(dP);if(dR.length>2){return"&"+dQ+"="+s(dR)}return""}var dL=dk(bX);var dD=dk(cn);dn+=du(dL,"cvar");dn+=du(dD,"e_cvar");if(aQ){dn+=du(aQ,"_cvar");for(dH in dE){if(Object.prototype.hasOwnProperty.call(dE,dH)){if(aQ[dH][0]===""||aQ[dH][1]===""){delete aQ[dH]}}}if(bR){dg(dz,S.JSON.stringify(aQ),cp,bq,cZ,bT)}}if(a2&&bF&&!bh){dn=aA(dn);bh=true}if(aL){dn+="&pv_id="+aL}aM(dB);ce();dn+=ac(dJ,{tracker:bJ,request:dn});if(c1.length){dn+="&"+c1}if(A(cc)){dn=cc(dn)}return dn}bS=function a7(){var dl=new Date();dl=dl.getTime();if(!c0){return false}if((c0+(1000*c9))<=dl){return false}if(c0+a5<=dl){bJ.ping();return true}return false};function br(dp,dn,dt,dq,dl,dw){var ds="idgoal=0",dm=new Date(),du=[],dv,dr=String(dp).length;if(dr){ds+="&ec_id="+s(dp)}ds+="&revenue="+dn;if(String(dt).length){ds+="&ec_st="+dt}if(String(dq).length){ds+="&ec_tx="+dq
+}if(String(dl).length){ds+="&ec_sh="+dl}if(String(dw).length){ds+="&ec_dt="+dw}if(c2){for(dv in c2){if(Object.prototype.hasOwnProperty.call(c2,dv)){if(!J(c2[dv][1])){c2[dv][1]=""}if(!J(c2[dv][2])){c2[dv][2]=""}if(!J(c2[dv][3])||String(c2[dv][3]).length===0){c2[dv][3]=0}if(!J(c2[dv][4])||String(c2[dv][4]).length===0){c2[dv][4]=1}du.push(c2[dv])}}ds+="&ec_items="+s(S.JSON.stringify(du))}ds=ct(ds,ao,"ecommerce");bG(ds,bK);if(dr){c2={}}}function bZ(dl,dq,dp,dn,dm,dr){if(String(dl).length&&J(dq)){br(dl,dq,dp,dn,dm,dr)}}function bt(dl){if(J(dl)){br("",dl,"","","","")}}function b1(dm,dp,dn){aL=bg();var dl=ct("action_name="+s(al(dm||bj)),dp,"log");if(!bh){dl=aA(dl)}bG(dl,bK,dn)}function a0(dn,dm){var dp,dl="(^| )(piwik[_-]"+dm+"|matomo[_-]"+dm;if(dn){for(dp=0;dp<dn.length;dp++){dl+="|"+dn[dp]}}dl+=")( |$)";return new RegExp(dl)}function aU(dl){return(aE&&dl&&0===String(dl).indexOf(aE))}function cw(dq,dl,dr,dm){if(aU(dl)){return 0}var dp=a0(bM,"download"),dn=a0(a8,"link"),ds=new RegExp("\\.("+c8.join("|")+")([?&#]|$)","i");
+if(dn.test(dq)){return"link"}if(dm||dp.test(dq)||ds.test(dl)){return"download"}if(dr){return 0}return"link"}function au(dm){var dl;dl=dm.parentNode;while(dl!==null&&J(dl)){if(ae.isLinkElement(dm)){break}dm=dl;dl=dm.parentNode}return dm}function de(dr){dr=au(dr);if(!ae.hasNodeAttribute(dr,"href")){return}if(!J(dr.href)){return}var dq=ae.getAttributeValueFromNode(dr,"href");var dm=dr.pathname||cm(dr.href);var ds=dr.hostname||d(dr.href);var dt=ds.toLowerCase();var dn=dr.href.replace(ds,dt);var dp=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dp.test(dn)){var dl=cw(dr.className,dn,ar(dt,dm),ae.hasNodeAttribute(dr,"download"));if(dl){return{type:dl,href:dn}}}}function aP(dl,dm,dn,dp){var dq=v.buildInteractionRequestParams(dl,dm,dn,dp);if(!dq){return}return ct(dq,null,"contentInteraction")}function bb(dl,dm){if(!dl||!dm){return false}var dn=v.findTargetNode(dl);if(v.shouldIgnoreInteraction(dn)){return false}dn=v.findTargetNodeNoDefault(dl);if(dn&&!U(dn,dm)){return false
+}return true}function cv(dn,dm,dq){if(!dn){return}var dl=v.findParentContentNode(dn);if(!dl){return}if(!bb(dl,dn)){return}var dp=v.buildContentBlock(dl);if(!dp){return}if(!dp.target&&dq){dp.target=dq}return v.buildInteractionRequestParams(dm,dp.name,dp.piece,dp.target)}function aW(dm){if(!cb||!cb.length){return false}var dl,dn;for(dl=0;dl<cb.length;dl++){dn=cb[dl];if(dn&&dn.name===dm.name&&dn.piece===dm.piece&&dn.target===dm.target){return true}}return false}function aX(dl){return function(dq){if(!dl){return}var dn=v.findParentContentNode(dl);var dm;if(dq){dm=dq.target||dq.srcElement}if(!dm){dm=dl}if(!bb(dn,dm)){return}if(!dn){return false}var dr=v.findTargetNode(dn);if(!dr||v.shouldIgnoreInteraction(dr)){return false}var dp=de(dr);if(db&&dp&&dp.type){return dp.type}return bJ.trackContentInteractionNode(dm,"click")}}function b2(dn){if(!dn||!dn.length){return}var dl,dm;for(dl=0;dl<dn.length;dl++){dm=v.findTargetNode(dn[dl]);if(dm&&!dm.contentInteractionTrackingSetupDone){dm.contentInteractionTrackingSetupDone=true;
+an(dm,"click",aX(dm))}}}function by(dn,dp){if(!dn||!dn.length){return[]}var dl,dm;for(dl=0;dl<dn.length;dl++){if(aW(dn[dl])){dn.splice(dl,1);dl--}else{cb.push(dn[dl])}}if(!dn||!dn.length){return[]}b2(dp);var dq=[];for(dl=0;dl<dn.length;dl++){dm=ct(v.buildImpressionRequestParams(dn[dl].name,dn[dl].piece,dn[dl].target),undefined,"contentImpressions");if(dm){dq.push(dm)}}return dq}function cB(dm){var dl=v.collectContent(dm);return by(dl,dm)}function a9(dm){if(!dm||!dm.length){return[]}var dl;for(dl=0;dl<dm.length;dl++){if(!v.isNodeVisible(dm[dl])){dm.splice(dl,1);dl--}}if(!dm||!dm.length){return[]}return cB(dm)}function aG(dn,dl,dm){var dp=v.buildImpressionRequestParams(dn,dl,dm);return ct(dp,null,"contentImpression")}function dd(dp,dm){if(!dp){return}var dl=v.findParentContentNode(dp);var dn=v.buildContentBlock(dl);if(!dn){return}if(!dm){dm="Unknown"}return aP(dm,dn.name,dn.piece,dn.target)}function cR(dm,dp,dl,dn){return"e_c="+s(dm)+"&e_a="+s(dp)+(J(dl)?"&e_n="+s(dl):"")+(J(dn)?"&e_v="+s(dn):"")
+}function at(dn,dq,dl,dp,ds,dr){if(!Y(dn)||!Y(dq)){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");return false}var dm=ct(cR(dn,dq,dl,dp),ds,"event");bG(dm,bK,dr)}function b9(dl,dp,dm,dq){var dn=ct("search="+s(dl)+(dp?"&search_cat="+s(dp):"")+(J(dm)?"&search_count="+dm:""),dq,"sitesearch");bG(dn,bK)}function cV(dl,dq,dp,dn){var dm=ct("idgoal="+dl+(dq?"&revenue="+dq:""),dp,"goal");bG(dm,bK,dn)}function c3(dp,dl,dt,ds,dn){var dr=dl+"="+s(b3(dp));var dm=cv(dn,"click",dp);if(dm){dr+="&"+dm}var dq=ct(dr,dt,"link");bG(dq,bK,ds)}function bV(dm,dl){if(dm!==""){return dm+dl.charAt(0).toUpperCase()+dl.slice(1)}return dl}function ci(dr){var dq,dl,dp=["","webkit","ms","moz"],dn;if(!be){for(dl=0;dl<dp.length;dl++){dn=dp[dl];if(Object.prototype.hasOwnProperty.call(G,bV(dn,"hidden"))){if(G[bV(dn,"visibilityState")]==="prerender"){dq=true}break}}}if(dq){an(G,dn+"visibilitychange",function dm(){G.removeEventListener(dn+"visibilitychange",dm,false);
+dr()});return}dr()}function bs(){var dm=bJ.getVisitorId();var dl=aJ();return dm+dl}function ck(dl){if(!dl){return}if(!ae.hasNodeAttribute(dl,"href")){return}var dm=ae.getAttributeValueFromNode(dl,"href");if(!dm||aU(dm)){return}if(!bJ.getVisitorId()){return}dm=j(dm,av);var dn=bs();dm=F(dm,av,dn);ae.setAnyAttribute(dl,"href",dm)}function bl(dp){var dq=ae.getAttributeValueFromNode(dp,"href");if(!dq){return false}dq=String(dq);var dm=dq.indexOf("//")===0||dq.indexOf("http://")===0||dq.indexOf("https://")===0;if(!dm){return false}var dl=dp.pathname||cm(dp.href);var dn=(dp.hostname||d(dp.href)).toLowerCase();if(ar(dn,dl)){if(!cJ(cW,L(dn))){return true}return false}return false}function cI(dl){var dm=de(dl);if(dm&&dm.type){dm.href=o(dm.href);c3(dm.href,dm.type,undefined,null,dl);return}if(cP){dl=au(dl);if(bl(dl)){ck(dl)}}}function cx(){return G.all&&!G.addEventListener}function cX(dl){var dn=dl.which;var dm=(typeof dl.button);if(!dn&&dm!=="undefined"){if(cx()){if(dl.button&1){dn=1}else{if(dl.button&2){dn=3
+}else{if(dl.button&4){dn=2}}}}else{if(dl.button===0||dl.button==="0"){dn=1}else{if(dl.button&1){dn=2}else{if(dl.button&2){dn=3}}}}}return dn}function bU(dl){switch(cX(dl)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function a1(dl){return dl.target||dl.srcElement}function aC(dl){return function(dp){dp=dp||S.event;var dn=bU(dp);var dq=a1(dp);if(dp.type==="click"){var dm=false;if(dl&&dn==="middle"){dm=true}if(dq&&!dm){cI(dq)}}else{if(dp.type==="mousedown"){if(dn==="middle"&&dq){aR=dn;bB=dq}else{aR=bB=null}}else{if(dp.type==="mouseup"){if(dn===aR&&dq===bB){cI(dq)}aR=bB=null}else{if(dp.type==="contextmenu"){cI(dq)}}}}}}function aq(dn,dm){var dl=typeof dm;if(dl==="undefined"){dm=true}an(dn,"click",aC(dm),false);if(dm){an(dn,"mouseup",aC(dm),false);an(dn,"mousedown",aC(dm),false);an(dn,"contextmenu",aC(dm),false)}}function bE(dn,dq){ap=true;var dp,dm=a0(bA,"ignore"),dr=G.links,dl=null,ds=null;if(dr){for(dp=0;dp<dr.length;dp++){dl=dr[dp];if(!dm.test(dl.className)){ds=typeof dl.matomoTrackers;
+if("undefined"===ds){dl.matomoTrackers=[]}if(-1===M(dl.matomoTrackers,dq)){dl.matomoTrackers.push(dq);aq(dl,dn)}}}}}function aS(dm,dq,dr){if(cg){return true}cg=true;var ds=false;var dp,dn;function dl(){ds=true}m(function(){function dt(dv){setTimeout(function(){if(!cg){return}ds=false;dr.trackVisibleContentImpressions();dt(dv)},dv)}function du(dv){setTimeout(function(){if(!cg){return}if(ds){ds=false;dr.trackVisibleContentImpressions()}du(dv)},dv)}if(dm){dp=["scroll","resize"];for(dn=0;dn<dp.length;dn++){if(G.addEventListener){G.addEventListener(dp[dn],dl,false)}else{S.attachEvent("on"+dp[dn],dl)}}du(100)}if(dq&&dq>0){dq=parseInt(dq,10);dt(dq)}})}var bD={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dl=this.requests;this.requests=[];if(dl.length===1){bG(dl[0],bK)}else{dh(dl,bK)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dm){if(!this.canQueue()){dh(dm,bK);return}var dl;for(dl=0;dl<dm.length;dl++){this.push(dm[dl])}},push:function(dl){if(!dl){return
+}if(!this.canQueue()){bG(dl,bK);return}bD.requests.push(dl);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bD.timeout=null;bD.sendRequests()},bD.interval);var dm="RequestQueue"+ax;if(!Object.prototype.hasOwnProperty.call(b,dm)){b[dm]={unload:function(){if(bD.timeout){clearTimeout(bD.timeout)}bD.sendRequests()}}}}};bi();aM();this.hasConsent=function(){return bC};this.getVisitorId=function(){return aY().uuid};this.getVisitorInfo=function(){return cQ()};this.getAttributionInfo=function(){return bN()};this.getAttributionCampaignName=function(){return bN()[0]};this.getAttributionCampaignKeyword=function(){return bN()[1]};this.getAttributionReferrerTimestamp=function(){return bN()[2]};this.getAttributionReferrerUrl=function(){return bN()[3]};this.setTrackerUrl=function(dl){aE=dl};this.getTrackerUrl=function(){return aE};this.getMatomoUrl=function(){return W(this.getTrackerUrl(),bI)};this.getPiwikUrl=function(){return this.getMatomoUrl()};this.addTracker=function(dn,dm){if(!J(dn)||null===dn){dn=this.getTrackerUrl()
+}var dl=new P(dn,dm);I.push(dl);t.trigger("TrackerAdded",[this]);return dl};this.getSiteId=function(){return b7};this.setSiteId=function(dl){b4(dl)};this.resetUserId=function(){bz=""};this.setUserId=function(dl){if(Y(dl)){bz=dl}};this.setVisitorId=function(dm){var dl=/[0-9A-Fa-f]{16}/g;if(w(dm)&&dl.test(dm)){bP=dm}else{ak("Invalid visitorId set"+dm)}};this.getUserId=function(){return bz};this.setCustomData=function(dl,dm){if(V(dl)){ao=dl}else{if(!ao){ao={}}ao[dl]=dm}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dl){cc=dl};this.appendToTrackingUrl=function(dl){c1=dl};this.getRequest=function(dl){return ct(dl)};this.addPlugin=function(dl,dm){b[dl]=dm};this.setCustomDimension=function(dl,dm){dl=parseInt(dl,10);if(dl>0){if(!J(dm)){dm=""}if(!w(dm)){dm=String(dm)}bn[dl]=dm}};this.getCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0&&Object.prototype.hasOwnProperty.call(bn,dl)){return bn[dl]}};this.deleteCustomDimension=function(dl){dl=parseInt(dl,10);
+if(dl>0){delete bn[dl]}};this.setCustomVariable=function(dm,dl,dq,dn){var dp;if(!J(dn)){dn="visit"}if(!J(dl)){return}if(!J(dq)){dq=""}if(dm>0){dl=!w(dl)?String(dl):dl;dq=!w(dq)?String(dq):dq;dp=[dl.slice(0,bu),dq.slice(0,bu)];if(dn==="visit"||dn===2){cH();aQ[dm]=dp}else{if(dn==="page"||dn===3){bX[dm]=dp}else{if(dn==="event"){cn[dm]=dp}}}}};this.getCustomVariable=function(dm,dn){var dl;if(!J(dn)){dn="visit"}if(dn==="page"||dn===3){dl=bX[dm]}else{if(dn==="event"){dl=cn[dm]}else{if(dn==="visit"||dn===2){cH();dl=aQ[dm]}}}if(!J(dl)||(dl&&dl[0]==="")){return false}return dl};this.deleteCustomVariable=function(dl,dm){if(this.getCustomVariable(dl,dm)){this.setCustomVariable(dl,"","",dm)}};this.deleteCustomVariables=function(dl){if(dl==="page"||dl===3){bX={}}else{if(dl==="event"){cn={}}else{if(dl==="visit"||dl===2){aQ={}}}}};this.storeCustomVariablesInCookie=function(){bR=true};this.setLinkTrackingTimer=function(dl){bK=dl};this.getLinkTrackingTimer=function(){return bK};this.setDownloadExtensions=function(dl){if(w(dl)){dl=dl.split("|")
+}c8=dl};this.addDownloadExtensions=function(dm){var dl;if(w(dm)){dm=dm.split("|")}for(dl=0;dl<dm.length;dl++){c8.push(dm[dl])}};this.removeDownloadExtensions=function(dn){var dm,dl=[];if(w(dn)){dn=dn.split("|")}for(dm=0;dm<c8.length;dm++){if(M(dn,c8[dm])===-1){dl.push(c8[dm])}}c8=dl};this.setDomains=function(dl){ay=w(dl)?[dl]:dl;var dq=false,dn=0,dm;for(dn;dn<ay.length;dn++){dm=String(ay[dn]);if(cJ(cW,L(dm))){dq=true;break}var dp=cm(dm);if(dp&&dp!=="/"&&dp!=="/*"){dq=true;break}}if(!dq){ay.push(cW)}};this.enableCrossDomainLinking=function(){cP=true};this.disableCrossDomainLinking=function(){cP=false};this.isCrossDomainLinkingEnabled=function(){return cP};this.setCrossDomainLinkingTimeout=function(dl){aZ=dl};this.getCrossDomainLinkingUrlParameter=function(){return s(av)+"="+s(bs())};this.setIgnoreClasses=function(dl){bA=w(dl)?[dl]:dl};this.setRequestMethod=function(dl){dc=dl||cj};this.setRequestContentType=function(dl){cy=dl||aI};this.setReferrerUrl=function(dl){bo=dl};this.setCustomUrl=function(dl){a4=bW(bO,dl)
+};this.getCurrentUrl=function(){return a4||bO};this.setDocumentTitle=function(dl){bj=dl};this.setAPIUrl=function(dl){bI=dl};this.setDownloadClasses=function(dl){bM=w(dl)?[dl]:dl};this.setLinkClasses=function(dl){a8=w(dl)?[dl]:dl};this.setCampaignNameKey=function(dl){cr=w(dl)?[dl]:dl};this.setCampaignKeywordKey=function(dl){bH=w(dl)?[dl]:dl};this.discardHashTag=function(dl){bQ=dl};this.setCookieNamePrefix=function(dl){bk=dl;if(aQ){aQ=bY()}};this.setCookieDomain=function(dl){var dm=L(dl);if(bx(dm)){cZ=dm;bi()}};this.getCookieDomain=function(){return cZ};this.hasCookies=function(){return"1"===b6()};this.setSessionCookie=function(dn,dm,dl){if(!dn){throw new Error("Missing cookie name")}if(!J(dl)){dl=cp}bv.push(dn);dg(aT(dn),dm,dl,bq,cZ)};this.getCookie=function(dm){var dl=aD(aT(dm));if(dl===0){return null}return dl};this.setCookiePath=function(dl){bq=dl;bi()};this.getCookiePath=function(dl){return bq};this.setVisitorCookieTimeout=function(dl){cM=dl*1000};this.setSessionCookieTimeout=function(dl){cp=dl*1000
+};this.getSessionCookieTimeout=function(){return cp};this.setReferralCookieTimeout=function(dl){c7=dl*1000};this.setConversionAttributionFirstReferrer=function(dl){bw=dl};this.setSecureCookie=function(dl){bT=dl};this.disableCookies=function(){bm=true;if(b7){aF()}};this.areCookiesEnabled=function(){return !bm};this.setCookieConsentGiven=function(){if(bm&&!cS){bm=false;if(b7&&aw){aM();var dl=ct("ping=1",null,"ping");bG(dl,bK)}}};this.requireCookieConsent=function(){if(this.getRememberedCookieConsent()){return false}this.disableCookies();return true};this.getRememberedCookieConsent=function(){return aD(cF)};this.forgetCookieConsentGiven=function(){b0(cF,bq,cZ);this.disableCookies()};this.rememberCookieConsentGiven=function(dm){if(dm){dm=dm*60*60*1000}else{dm=30*365*24*60*60*1000}this.setCookieConsentGiven();var dl=new Date().getTime();dg(cF,dl,dm,bq,cZ,bT)};this.deleteCookies=function(){aF()};this.setDoNotTrack=function(dm){var dl=g.doNotTrack||g.msDoNotTrack;cS=dm&&(dl==="yes"||dl==="1");
+if(cS){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cY=true};this.disableAlwaysUseSendBeacon=function(){cY=false};this.addListener=function(dm,dl){aq(dm,dl)};this.enableLinkTracking=function(dm){db=true;var dl=this;ci(function(){p(function(){bE(dm,dl)});m(function(){bE(dm,dl)})})};this.enableJSErrorTracking=function(){if(cU){return}cU=true;var dl=S.onerror;S.onerror=function(dr,dp,dn,dq,dm){ci(function(){var ds="JavaScript Errors";var dt=dp+":"+dn;if(dq){dt+=":"+dq}at(ds,dt,dr)});if(dl){return dl(dr,dp,dn,dq,dm)}return false}};this.disablePerformanceTracking=function(){a2=false};this.setVisitStandardLength=function(dl){dl=Math.max(dl,5);c9=dl};this.enableHeartBeatTimer=function(dl){dl=Math.max(dl,5);a5=(dl||15)*1000;if(c0!==null){di()}};this.disableHeartBeatTimer=function(){bL();if(a5||aN){if(S.removeEventListener){S.removeEventListener("focus",ba);S.removeEventListener("blur",az)}else{if(S.detachEvent){S.detachEvent("onfocus",ba);S.detachEvent("onblur",az)}}}a5=null;aN=false
+};this.killFrame=function(){if(S.location!==S.top.location){S.top.location=S.location}};this.redirectFile=function(dl){if(S.location.protocol==="file:"){S.location=dl}};this.setCountPreRendered=function(dl){be=dl};this.trackGoal=function(dl,dp,dn,dm){ci(function(){cV(dl,dp,dn,dm)})};this.trackLink=function(dm,dl,dp,dn){ci(function(){c3(dm,dl,dp,dn)})};this.getNumTrackedPageViews=function(){return cs};this.trackPageView=function(dl,dn,dm){cb=[];cN=[];if(N(b7)){ci(function(){Z(aE,bI,b7)})}else{ci(function(){cs++;b1(dl,dn,dm)})}};this.trackAllContentImpressions=function(){if(N(b7)){return}ci(function(){p(function(){var dl=v.findContentNodes();var dm=cB(dl);bD.pushMultiple(dm)})})};this.trackVisibleContentImpressions=function(dl,dm){if(N(b7)){return}if(!J(dl)){dl=true}if(!J(dm)){dm=750}aS(dl,dm,this);ci(function(){m(function(){var dn=v.findContentNodes();var dp=a9(dn);bD.pushMultiple(dp)})})};this.trackContentImpression=function(dn,dl,dm){if(N(b7)){return}dn=a(dn);dl=a(dl);dm=a(dm);if(!dn){return
+}dl=dl||"Unknown";ci(function(){var dp=aG(dn,dl,dm);bD.push(dp)})};this.trackContentImpressionsWithinNode=function(dl){if(N(b7)||!dl){return}ci(function(){if(cg){m(function(){var dm=v.findContentNodesWithinNode(dl);var dn=a9(dm);bD.pushMultiple(dn)})}else{p(function(){var dm=v.findContentNodesWithinNode(dl);var dn=cB(dm);bD.pushMultiple(dn)})}})};this.trackContentInteraction=function(dn,dp,dl,dm){if(N(b7)){return}dn=a(dn);dp=a(dp);dl=a(dl);dm=a(dm);if(!dn||!dp){return}dl=dl||"Unknown";ci(function(){var dq=aP(dn,dp,dl,dm);if(dq){bD.push(dq)}})};this.trackContentInteractionNode=function(dn,dm){if(N(b7)||!dn){return}var dl=null;ci(function(){dl=dd(dn,dm);if(dl){bD.push(dl)}});return dl};this.logAllContentBlocksOnPage=function(){var dn=v.findContentNodes();var dl=v.collectContent(dn);var dm=typeof console;if(dm!=="undefined"&&console&&console.log){console.log(dl)}};this.trackEvent=function(dm,dp,dl,dn,dr,dq){ci(function(){at(dm,dp,dl,dn,dr,dq)})};this.trackSiteSearch=function(dl,dn,dm,dp){cb=[];
+ci(function(){b9(dl,dn,dm,dp)})};this.setEcommerceView=function(dq,dl,dn,dm){cu={};if(Y(dn)){dn=String(dn)}if(!J(dn)||dn===null||dn===false||!dn.length){dn=""}else{if(dn instanceof Array){dn=S.JSON.stringify(dn)}}var dp="_pkc";cu[dp]=dn;if(J(dm)&&dm!==null&&dm!==false&&String(dm).length){dp="_pkp";cu[dp]=dm}if(!Y(dq)&&!Y(dl)){return}if(Y(dq)){dp="_pks";cu[dp]=dq}if(!Y(dl)){dl=""}dp="_pkn";cu[dp]=dl};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c2))};this.addEcommerceItem=function(dq,dl,dn,dm,dp){if(Y(dq)){c2[dq]=[String(dq),dl,dn,dm,dp]}};this.removeEcommerceItem=function(dl){if(Y(dl)){dl=String(dl);delete c2[dl]}};this.clearEcommerceCart=function(){c2={}};this.trackEcommerceOrder=function(dl,dq,dp,dn,dm,dr){bZ(dl,dq,dp,dn,dm,dr)};this.trackEcommerceCartUpdate=function(dl){bt(dl)};this.trackRequest=function(dm,dp,dn,dl){ci(function(){var dq=ct(dm,dp,dl);bG(dq,bK,dn)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bD.enabled=false
+};this.setRequestQueueInterval=function(dl){if(dl<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bD.interval=dl};this.queueRequest=function(dl){ci(function(){var dm=ct(dl);bD.push(dm)})};this.isConsentRequired=function(){return cC};this.getRememberedConsent=function(){var dl=aD(bd);if(aD(cO)){if(dl){b0(bd,bq,cZ)}return null}if(!dl||dl===0){return null}return dl};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cC=true;bC=this.hasRememberedConsent();if(!bC){bm=true}x++;b["CoreConsent"+x]={unload:function(){if(!bC){aF()}}}};this.setConsentGiven=function(dm){bC=true;b0(cO,bq,cZ);var dn,dl;for(dn=0;dn<cN.length;dn++){dl=typeof cN[dn];if(dl==="string"){bG(cN[dn],bK)}else{if(dl==="object"){dh(cN[dn],bK)}}}cN=[];if(!J(dm)||dm){this.setCookieConsentGiven()}};this.rememberConsentGiven=function(dn){if(dn){dn=dn*60*60*1000}else{dn=30*365*24*60*60*1000}var dl=true;this.setConsentGiven(dl);var dm=new Date().getTime();
+dg(bd,dm,dn,bq,cZ,bT)};this.forgetConsentGiven=function(){var dl=30*365*24*60*60*1000;b0(bd,bq,cZ);dg(cO,new Date().getTime(),dl,bq,cZ,bT);this.forgetCookieConsentGiven();this.requireConsent()};this.isUserOptedOut=function(){return !bC};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=function(){var dl=false;this.rememberConsentGiven(0,dl)};m(function(){setTimeout(function(){bF=true},0)});t.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven"];
+function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getMatomoUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()
+}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;t={initialized:false,JSON:S.JSON,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:m,onReady:p,isNodeVisible:i,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||S,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ap,ao){if(!J(ao)){ao=this.getAsyncTracker().getSiteId()}if(!J(ap)){ap=this.getAsyncTracker().getTrackerUrl()}return new P(ap,ao)},getAsyncTrackers:function(){return I},addTracker:function(aq,ap){var ao;if(!I.length){ao=ad(aq,ap)}else{ao=I[0].addTracker(aq,ap)
+}return ao},getAsyncTracker:function(at,ar){var aq;if(I&&I.length&&I[0]){aq=I[0]}else{return ad(at,ar)}if(!ar&&!at){return aq}if((!J(ar)||null===ar)&&aq){ar=aq.getSiteId()}if((!J(at)||null===at)&&aq){at=aq.getTrackerUrl()}var ap,ao=0;for(ao;ao<I.length;ao++){ap=I[ao];if(ap&&String(ap.getSiteId())===String(ar)&&ap.getTrackerUrl()===at){return ap}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return t});define("matomo",[],function(){return t})}return t}())}
/*!!! pluginTrackerHook */
-(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;
-if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.matomoPluginAsyncInit&&window.matomoPluginAsyncInit.length){var a=0;for(a;a<window.matomoPluginAsyncInit.length;a++){if(typeof window.matomoPluginAsyncInit[a]==="function"){window.matomoPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}if(window&&window.matomoAsyncInit){window.matomoAsyncInit()}if(!window.Matomo.getAsyncTrackers().length){if(b()){window.Matomo.addTracker()}else{_paq={push:function(c){var d=typeof console;if(d!=="undefined"&&console&&console.error){console.error("_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Matomo.trigger("MatomoInitialized",[]);
-window.Matomo.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Matomo}}());if(typeof piwik_log!=="function"){piwik_log=function(c,e,g,f){function b(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var d,a=window.Matomo.getTracker(g,e);a.setDocumentTitle(c);a.setCustomData(f);d=b("tracker_pause");if(d){a.setLinkTrackingTimer(d)}d=b("download_extensions");if(d){a.setDownloadExtensions(d)}d=b("hosts_alias");if(d){a.setDomains(d)}d=b("ignore_classes");if(d){a.setIgnoreClasses(d)}a.trackPageView();if(b("install_tracker")){piwik_track=function(i,j,k,h){a.setSiteId(j);a.setTrackerUrl(k);a.trackLink(i,h)};a.enableLinkTracking()}}}
+(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.matomoPluginAsyncInit&&window.matomoPluginAsyncInit.length){var a=0;for(a;a<window.matomoPluginAsyncInit.length;a++){if(typeof window.matomoPluginAsyncInit[a]==="function"){window.matomoPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()
+}if(window&&window.matomoAsyncInit){window.matomoAsyncInit()}if(!window.Matomo.getAsyncTrackers().length){if(b()){window.Matomo.addTracker()}else{_paq={push:function(c){var d=typeof console;if(d!=="undefined"&&console&&console.error){console.error("_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Matomo.trigger("MatomoInitialized",[]);window.Matomo.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Matomo}}());if(typeof piwik_log!=="function"){piwik_log=function(c,e,g,f){function b(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var d,a=window.Matomo.getTracker(g,e);a.setDocumentTitle(c);
+a.setCustomData(f);d=b("tracker_pause");if(d){a.setLinkTrackingTimer(d)}d=b("download_extensions");if(d){a.setDownloadExtensions(d)}d=b("hosts_alias");if(d){a.setDomains(d)}d=b("ignore_classes");if(d){a.setIgnoreClasses(d)}a.trackPageView();if(b("install_tracker")){piwik_track=function(i,j,k,h){a.setSiteId(j);a.setTrackerUrl(k);a.trackLink(i,h)};a.enableLinkTracking()}}}
/*!! @license-end */; \ No newline at end of file
diff --git a/piwik.js b/piwik.js
index ceac1f78db..0875c5db97 100644
--- a/piwik.js
+++ b/piwik.js
@@ -29,43 +29,44 @@ ao=ae.findFirstNodeHavingAttribute(ap,this.CONTENT_PIECE_ATTR);if(!ao){ao=ae.fin
},buildContentBlock:function(aq){if(!aq){return}var ao=this.findContentName(aq);var ap=this.findContentPiece(aq);var ar=this.findContentTarget(aq);ao=this.trim(ao);ap=this.trim(ap);ar=this.trim(ar);return{name:ao||"Unknown",piece:ap||"Unknown",target:ar||""}},collectContent:function(ar){if(!ar||!ar.length){return[]}var aq=[];var ao,ap;for(ao=0;ao<ar.length;ao++){ap=this.buildContentBlock(ar[ao]);if(J(ap)){aq.push(ap)}}return aq},setLocation:function(ao){this.location=ao},getLocation:function(){var ao=this.location||S.location;if(!ao.origin){ao.origin=ao.protocol+"//"+ao.hostname+(ao.port?":"+ao.port:"")}return ao},toAbsoluteUrl:function(ap){if((!ap||String(ap)!==ap)&&ap!==""){return ap}if(""===ap){return this.getLocation().href}if(ap.search(/^\/\//)!==-1){return this.getLocation().protocol+ap}if(ap.search(/:\/\//)!==-1){return ap}if(0===ap.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ap}if(0===ap.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ap
}if(0===ap.search("^[a-zA-Z]{2,11}:")){return ap}if(ap.search(/^\//)!==-1){return this.getLocation().origin+ap}var ao="(.*/)";var aq=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ao))[0];return aq+ap},isUrlToCurrentDomain:function(ap){var aq=this.toAbsoluteUrl(ap);if(!aq){return false}var ao=this.getLocation().origin;if(ao===aq){return true}if(0===String(aq).indexOf(ao)){if(":"===String(aq).substr(ao.length,1)){return false}return true}return false},setHrefAttribute:function(ap,ao){if(!ap||!ao){return}ae.setAnyAttribute(ap,"href",ao)},shouldIgnoreInteraction:function(ao){if(ae.hasNodeAttribute(ao,this.CONTENT_IGNOREINTERACTION_ATTR)){return true}if(ae.hasNodeCssClass(ao,this.CONTENT_IGNOREINTERACTION_CLASS)){return true}if(ae.hasNodeCssClass(ao,this.LEGACY_CONTENT_IGNOREINTERACTION_CLASS)){return true}return false}};function W(ap,at){if(at){return at}ap=v.toAbsoluteUrl(ap);if(z(ap,"?")){var ar=ap.indexOf("?");ap=ap.slice(0,ar)}if(Q(ap,"matomo.php")){ap=f(ap,"matomo.php".length)
}else{if(Q(ap,"piwik.php")){ap=f(ap,"piwik.php".length)}else{if(Q(ap,".php")){var ao=ap.lastIndexOf("/");var aq=1;ap=ap.slice(0,ao+aq)}}}if(Q(ap,"/js/")){ap=f(ap,"js/".length)}return ap}function N(av){var ax="Matomo_Overlay";var ap=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aq=ap.exec(G.referrer);if(aq){var at=aq[1];if(at!==String(av)){return false}var au=aq[2],ao=aq[3],ar=aq[4];if(!ar){ar=""}else{if(ar.indexOf("&segment=")===0){ar=ar.substr("&segment=".length)}}S.name=ax+"###"+au+"###"+ao+"###"+ar}var aw=S.name.split("###");return aw.length===4&&aw[0]===ax}function Z(ap,av,aq){var au=S.name.split("###"),at=au[1],ao=au[2],ar=au[3],aw=W(ap,av);n(aw+"plugins/Overlay/client/client.js?v=1",function(){Matomo_Overlay_Client.initialize(aw,aq,at,ao,ar)})}function u(){var aq;try{aq=S.frameElement}catch(ap){return true}if(J(aq)){return(aq&&String(aq.nodeName).toLowerCase()==="iframe")?true:false}try{return S.self!==S.top
-}catch(ao){return true}}function P(ce,b9){var bI=this,bc="mtm_consent",cM="mtm_consent_removed",b4=aa(G.domain,S.location.href,K()),cU=L(b4[0]),bN=o(b4[1]),bn=o(b4[2]),cS=false,ci="GET",da=ci,aH="application/x-www-form-urlencoded; charset=UTF-8",cx=aH,aD=ce||"",bH="",cZ="",b6=b9||"",by="",bO="",a3,bi="",c6=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ax=[cU],bz=[],bL=[],a7=[],bJ=500,cW=true,cJ,a4,bR,c7=1800,bP,ao,cq=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bG=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bj="_pk_",av="pk_vid",aY=180,cX,bp,bS=false,bl=false,cQ,bd,bv,cK=33955200000,co=1800000,c5=15768000000,a1=true,bE=false,bg=false,bQ=false,aP=false,cb,bW={},cm={},bm={},bt=200,ct={},c0={},c8={},ca=[],cf=false,cC=false,ap=false,c9=false,cN=false,aM=false,bb=u(),cy=null,cY=null,cc,aQ,bA,b7=am,bo,aK,cr=0,bu=["id","ses","cvar","ref"],cB=false,bB=null,cL=[],aw=T++;
-try{bi=G.title}catch(cz){bi=""}function de(dq,dn,dm,dp,dl,dk){if(bl){return}var dj;if(dm){dj=new Date();dj.setTime(dj.getTime()+dm)}G.cookie=dq+"="+s(dn)+(dm?";expires="+dj.toGMTString():"")+";path="+(dp||"/")+(dl?";domain="+dl:"")+(dk?";secure":"")+";SameSite=Lax"}function aC(dl){if(bl){return 0}var dj=new RegExp("(^|;)[ ]*"+dl+"=([^;]*)"),dk=dj.exec(G.cookie);return dk?R(dk[2]):0}bB=!aC(cM);function b2(dj){var dk;dj=j(dj,av);if(bP){dk=new RegExp("#.*");return dj.replace(dk,"")}return dj}function bV(dl,dj){var dm=r(dj),dk;if(dm){return dj}if(dj.slice(0,1)==="/"){return r(dl)+"://"+d(dl)+dj}dl=b2(dl);dk=dl.indexOf("?");if(dk>=0){dl=dl.slice(0,dk)}dk=dl.lastIndexOf("/");if(dk!==dl.length-1){dl=dl.slice(0,dk+1)}return dl+dj}function cH(dl,dj){var dk;dl=String(dl).toLowerCase();dj=String(dj).toLowerCase();if(dl===dj){return true}if(dj.slice(0,1)==="."){if(dl===dj.slice(1)){return true}dk=dl.length-dj.length;if((dk>0)&&(dl.slice(dk)===dj)){return true}}return false}function cl(dj){var dk=document.createElement("a");
-if(dj.indexOf("//")!==0&&dj.indexOf("http")!==0){if(dj.indexOf("*")===0){dj=dj.substr(1)}if(dj.indexOf(".")===0){dj=dj.substr(1)}dj="http://"+dj}dk.href=v.toAbsoluteUrl(dj);if(dk.pathname){return dk.pathname}return""}function a2(dk,dj){if(!aj(dj,"/")){dj="/"+dj}if(!aj(dk,"/")){dk="/"+dk}var dl=(dj==="/"||dj==="/*");if(dl){return true}if(dk===dj){return true}dj=String(dj).toLowerCase();dk=String(dk).toLowerCase();if(Q(dj,"*")){dj=dj.slice(0,-1);dl=(!dj||dj==="/");if(dl){return true}if(dk===dj){return true}return dk.indexOf(dj)===0}if(!Q(dk,"/")){dk+="/"}if(!Q(dj,"/")){dj+="/"}return dk.indexOf(dj)===0}function ar(dn,dq){var dk,dj,dl,dm,dp;for(dk=0;dk<ax.length;dk++){dm=L(ax[dk]);dp=cl(ax[dk]);if(cH(dn,dm)&&a2(dq,dp)){return true}}return false}function aU(dm){var dk,dj,dl;for(dk=0;dk<ax.length;dk++){dj=L(ax[dk].toLowerCase());if(dm===dj){return true}if(dj.slice(0,1)==="."){if(dm===dj.slice(1)){return true}dl=dm.length-dj.length;if((dl>0)&&(dm.slice(dl)===dj)){return true}}}return false}function cp(dj,dl){dj=dj.replace("send_image=0","send_image=1");
-var dk=new Image(1,1);dk.onload=function(){E=0;if(typeof dl==="function"){dl({request:dj,trackerUrl:aD,success:true})}};dk.onerror=function(){if(typeof dl==="function"){dl({request:dj,trackerUrl:aD,success:false})}};dk.src=aD+(aD.indexOf("?")<0?"?":"&")+dj}function cE(dj){if(da==="POST"){return true}return dj&&(dj.length>2000||dj.indexOf('{"requests"')===0)}function aJ(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a5(dn,dr,dq){var dl=aJ();if(!dl){return false}var dm={type:"application/x-www-form-urlencoded; charset=UTF-8"};var ds=false;var dk=aD;try{var dj=new Blob([dn],dm);if(dq&&!cE(dn)){dj=new Blob([],dm);dk=dk+(dk.indexOf("?")<0?"?":"&")+dn}ds=g.sendBeacon(dk,dj)}catch(dp){return false}if(ds&&typeof dr==="function"){dr({request:dn,trackerUrl:aD,success:true,isSendBeacon:true})}return ds}function c4(dk,dl,dj){if(!J(dj)||null===dj){dj=true}if(l&&a5(dk,dl,dj)){return}setTimeout(function(){if(l&&a5(dk,dl,dj)){return}var dp;try{var dn=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
-dn.open("POST",aD,true);dn.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var dq=l&&a5(dk,dl,dj);if(!dq&&dj){cp(dk,dl)}else{if(typeof dl==="function"){dl({request:dk,trackerUrl:aD,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dl==="function")){dl({request:dk,trackerUrl:aD,success:true,xhr:this})}}};dn.setRequestHeader("Content-Type",cx);dn.withCredentials=true;dn.send(dk)}catch(dm){dp=l&&a5(dk,dl,dj);if(!dp&&dj){cp(dk,dl)}else{if(typeof dl==="function"){dl({request:dk,trackerUrl:aD,success:false})}}}},50)}function cg(dk){var dj=new Date();var dl=dj.getTime()+dk;if(!q||dl>q){q=dl}}function cn(dj){if(cc||!a4||!bB){return}cc=setTimeout(function dk(){cc=null;if(!bb){bb=(!G.hasFocus||G.hasFocus())}if(!bb){cn(a4);return}if(bR()){return}var dl=new Date(),dm=a4-(dl.getTime()-cY);dm=Math.min(a4,dm);cn(dm)},dj||a4)}function bK(){if(!cc){return}clearTimeout(cc);cc=null}function a9(){bb=true;cy=new Date().getTime()}function dd(){var dj=new Date().getTime();
-return !cy||(dj-cy)>a4}function ay(){if(dd()){bR()}bK()}function dg(){if(aM||!a4){return}aM=true;an(S,"focus",a9);an(S,"blur",ay);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aM&&dd()){bR()}}})}function cD(dn){var dk=new Date();var dj=dk.getTime();cY=dj;if(cC&&dj<cC){var dl=cC-dj;setTimeout(dn,dl);cg(dl+50);cC+=50;return}if(cC===false){var dm=800;cC=dj+dm}dn()}function aN(){if(aC(cM)){bB=false}else{if(aC(bc)){bB=true}}}function bF(dk,dj,dl){aN();if(!bB){cL.push(dk);return}if(!cQ&&dk){if(cB&&bB){dk+="&consent=1"}cD(function(){if(cW&&a5(dk,dl,true)){cg(100);return}if(cE(dk)){c4(dk,dl)}else{cp(dk,dl)}cg(dj)})}if(!aM){dg()}}function ck(dj){if(cQ){return false}return(dj&&dj.length)}function c3(dj,dn){if(!dn||dn>=dj.length){return[dj]}var dk=0;var dl=dj.length;var dm=[];for(dk;dk<dl;dk+=dn){dm.push(dj.slice(dk,dk+dn))}return dm}function df(dk,dj){if(!ck(dk)){return}if(!bB){cL.push(dk);return}cD(function(){var dn=c3(dk,50);var dl=0,dm;for(dl;dl<dn.length;dl++){dm='{"requests":["?'+dn[dl].join('","?')+'"]}';
-if(cW&&a5(dm,null,false)){cg(100)}else{c4(dm,null,false)}}cg(dj)})}function aS(dj){return bj+dj+"."+b6+"."+bo}function bY(dl,dk,dj){de(dl,"",-86400,dk,dj)}function b5(){if(bl){return"0"}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){return g.cookieEnabled?"1":"0"}var dj=bj+"testcookie";de(dj,"1",undefined,bp,cX,bS);var dk=aC(dj)==="1"?"1":"0";bY(dj);return dk}function bh(){bo=b7((cX||cU)+(bp||"/")).slice(0,4)}function cI(){if(J(c8.res)){return c8}var dk,dm,dn={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",fla:"application/x-shockwave-flash",java:"application/x-java-vm",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(dk in dn){if(Object.prototype.hasOwnProperty.call(dn,dk)){dm=g.mimeTypes[dn[dk]];c8[dk]=(dm&&dm.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(g.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(g.javaEnabled)&&g.javaEnabled()){c8.java="1"
-}c8.cookie=b5()}var dl=parseInt(X.width,10);var dj=parseInt(X.height,10);c8.res=parseInt(dl,10)+"x"+parseInt(dj,10);return c8}function bX(){var dk=aS("cvar"),dj=aC(dk);if(dj&&dj.length){dj=S.JSON.parse(dj);if(V(dj)){return dj}}return{}}function cF(){if(aP===false){aP=bX()}}function cR(){var dj=cI();return b7((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dj)+(new Date()).getTime()+Math.random()).slice(0,16)}function aA(){var dj=cI();return b7((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dj)).slice(0,6)}function be(){return Math.floor((new Date()).getTime()/1000)}function aI(){var dk=be();var dl=aA();var dj=String(dk)+dl;return dj}function c2(dl){dl=String(dl);var dp=aA();var dm=dp.length;var dn=dl.substr(-1*dm,dm);var dk=parseInt(dl.substr(0,dl.length-dm),10);if(dk&&dn&&dn===dp){var dj=be();if(aY<=0){return true}if(dj>=dk&&dj<=(dk+aY)){return true}}return false}function dh(dj){if(!cN){return""}var dn=e(dj,av);if(!dn){return""}dn=String(dn);var dl=new RegExp("^[a-zA-Z0-9]+$");
-if(dn.length===32&&dl.test(dn)){var dk=dn.substr(16,32);if(c2(dk)){var dm=dn.substr(0,16);return dm}}return""}function cO(){if(!bO){bO=dh(bN)}var dl=new Date(),dj=Math.round(dl.getTime()/1000),dk=aS("id"),dp=aC(dk),dn,dm;if(dp){dn=dp.split(".");dn.unshift("0");if(bO.length){dn[1]=bO}return dn}if(bO.length){dm=bO}else{if("0"===b5()){dm=""}else{dm=cR()}}dn=["1",dm,dj];return dn}function aX(){var dm=cO(),dk=dm[0],dl=dm[1],dj=dm[2];return{newVisitor:dk,uuid:dl,createTs:dj}}function aG(){var dm=new Date(),dk=dm.getTime(),dn=aX().createTs;var dj=parseInt(dn,10);var dl=(dj*1000)+cK-dk;return dl}function aL(dj){if(!b6){return}var dl=new Date(),dk=Math.round(dl.getTime()/1000);if(!J(dj)){dj=aX()}var dm=dj.uuid+"."+dj.createTs+".";de(aS("id"),dm,aG(),bp,cX,bS)}function bM(){var dj=aC(aS("ref"));if(dj.length){try{dj=S.JSON.parse(dj);if(V(dj)){return dj}}catch(dk){}}return["","",0,""]}function bw(dk){var dj="testvalue";de("test",dj,10000,null,dk);if(aC("test")===dj){bY("test",null,dk);return true}return false
-}function aE(){var dk=bl;bl=false;var dj,dl;for(dj=0;dj<bu.length;dj++){dl=aS(bu[dj]);if(dl!==cM&&dl!==bc&&0!==aC(dl)){bY(dl,bp,cX)}}bl=dk}function b3(dj){b6=dj;aL()}function di(dn){if(!dn||!V(dn)){return}var dm=[];var dl;for(dl in dn){if(Object.prototype.hasOwnProperty.call(dn,dl)){dm.push(dl)}}var dp={};dm.sort();var dj=dm.length;var dk;for(dk=0;dk<dj;dk++){dp[dm[dk]]=dn[dm[dk]]}return dp}function cd(){de(aS("ses"),"1",co,bp,cX,bS)}function bf(){var dm="";var dk="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dl=dk.length;var dj;for(dj=0;dj<6;dj++){dm+=dk.charAt(Math.floor(Math.random()*dl))}return dm}function az(dj){if(h&&h.timing&&h&&h.timing.connectEnd&&h.timing.fetchStart){dj+="&pf_net="+(h.timing.connectEnd-h.timing.fetchStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.requestStart){dj+="&pf_srv="+(h.timing.responseStart-h.timing.requestStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.responseEnd){dj+="&pf_tfr="+(h.timing.responseEnd-h.timing.responseStart)
-}if(h&&h.timing&&h&&h.timing.domInteractive&&h.timing.domLoading){dj+="&pf_dm1="+(h.timing.domInteractive-h.timing.domLoading)}if(h&&h.timing&&h&&h.timing.domComplete&&h.timing.domInteractive){dj+="&pf_dm2="+(h.timing.domComplete-h.timing.domInteractive)}if(h&&h.timing&&h&&h.timing.loadEventEnd&&h.timing.loadEventStart){dj+="&pf_onl="+(h.timing.loadEventEnd-h.timing.loadEventStart)}return dj}function cs(dl,dG,dH){var dF,dk=new Date(),dt=Math.round(dk.getTime()/1000),dq,dD,dm=1024,dM,du,dC=aP,dn=aS("ses"),dA=aS("ref"),dx=aS("cvar"),dy=aC(dn),dE=bM(),dI=a3||bN,dr,dj;if(bl){aE()}if(cQ){return""}var dz=aX();var dw=G.characterSet||G.charset;if(!dw||dw.toLowerCase()==="utf-8"){dw=null}dr=dE[0];dj=dE[1];dq=dE[2];dD=dE[3];if(!dy){if(!bv||!dr.length){for(dF in cq){if(Object.prototype.hasOwnProperty.call(cq,dF)){dr=e(dI,cq[dF]);if(dr.length){break}}}for(dF in bG){if(Object.prototype.hasOwnProperty.call(bG,dF)){dj=e(dI,bG[dF]);if(dj.length){break}}}}dM=d(bn);du=dD.length?d(dD):"";if(dM.length&&!aU(dM)&&(!bv||!du.length||aU(du))){dD=bn
-}if(dD.length||dr.length){dq=dt;dE=[dr,dj,dq,b2(dD.slice(0,dm))];de(dA,S.JSON.stringify(dE),c5,bp,cX,bS)}}dl+="&idsite="+b6+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dk.getHours()+"&m="+dk.getMinutes()+"&s="+dk.getSeconds()+"&url="+s(b2(dI))+(bn.length?"&urlref="+s(b2(bn)):"")+((by&&by.length)?"&uid="+s(by):"")+"&_id="+dz.uuid+"&_idn="+dz.newVisitor+(dr.length?"&_rcn="+s(dr):"")+(dj.length?"&_rck="+s(dj):"")+"&_refts="+dq+(String(dD).length?"&_ref="+s(b2(dD.slice(0,dm))):"")+(dw?"&cs="+s(dw):"")+"&send_image=0";var dL=cI();for(dF in dL){if(Object.prototype.hasOwnProperty.call(dL,dF)){dl+="&"+dF+"="+dL[dF]}}var dK=[];if(dG){for(dF in dG){if(Object.prototype.hasOwnProperty.call(dG,dF)&&/^dimension\d+$/.test(dF)){var dp=dF.replace("dimension","");dK.push(parseInt(dp,10));dK.push(String(dp));dl+="&"+dF+"="+s(dG[dF]);delete dG[dF]}}}if(dG&&B(dG)){dG=null}for(dF in ct){if(Object.prototype.hasOwnProperty.call(ct,dF)){dl+="&"+dF+"="+s(ct[dF])}}for(dF in bm){if(Object.prototype.hasOwnProperty.call(bm,dF)){var dv=(-1===M(dK,dF));
-if(dv){dl+="&dimension"+dF+"="+s(bm[dF])}}}if(dG){dl+="&data="+s(S.JSON.stringify(dG))}else{if(ao){dl+="&data="+s(S.JSON.stringify(ao))}}function ds(dN,dO){var dP=S.JSON.stringify(dN);if(dP.length>2){return"&"+dO+"="+s(dP)}return""}var dJ=di(bW);var dB=di(cm);dl+=ds(dJ,"cvar");dl+=ds(dB,"e_cvar");if(aP){dl+=ds(aP,"_cvar");for(dF in dC){if(Object.prototype.hasOwnProperty.call(dC,dF)){if(aP[dF][0]===""||aP[dF][1]===""){delete aP[dF]}}}if(bQ){de(dx,S.JSON.stringify(aP),co,bp,cX,bS)}}if(a1&&bE&&!bg){dl=az(dl);bg=true}if(aK){dl+="&pv_id="+aK}aL(dz);cd();dl+=ac(dH,{tracker:bI,request:dl});if(cZ.length){dl+="&"+cZ}if(A(cb)){dl=cb(dl)}return dl}bR=function a6(){var dj=new Date();dj=dj.getTime();if(!cY){return false}if((cY+(1000*c7))<=dj){return false}if(cY+a4<=dj){bI.ping();return true}return false};function bq(dm,dl,dr,dn,dj,du){var dq="idgoal=0",dk=new Date(),ds=[],dt,dp=String(dm).length;if(dp){dq+="&ec_id="+s(dm)}dq+="&revenue="+dl;if(String(dr).length){dq+="&ec_st="+dr}if(String(dn).length){dq+="&ec_tx="+dn
-}if(String(dj).length){dq+="&ec_sh="+dj}if(String(du).length){dq+="&ec_dt="+du}if(c0){for(dt in c0){if(Object.prototype.hasOwnProperty.call(c0,dt)){if(!J(c0[dt][1])){c0[dt][1]=""}if(!J(c0[dt][2])){c0[dt][2]=""}if(!J(c0[dt][3])||String(c0[dt][3]).length===0){c0[dt][3]=0}if(!J(c0[dt][4])||String(c0[dt][4]).length===0){c0[dt][4]=1}ds.push(c0[dt])}}dq+="&ec_items="+s(S.JSON.stringify(ds))}dq=cs(dq,ao,"ecommerce");bF(dq,bJ);if(dp){c0={}}}function bZ(dj,dn,dm,dl,dk,dp){if(String(dj).length&&J(dn)){bq(dj,dn,dm,dl,dk,dp)}}function bs(dj){if(J(dj)){bq("",dj,"","","","")}}function b0(dk,dm,dl){aK=bf();var dj=cs("action_name="+s(al(dk||bi)),dm,"log");if(!bg){dj=az(dj)}bF(dj,bJ,dl)}function aZ(dl,dk){var dm,dj="(^| )(piwik[_-]"+dk+"|matomo[_-]"+dk;if(dl){for(dm=0;dm<dl.length;dm++){dj+="|"+dl[dm]}}dj+=")( |$)";return new RegExp(dj)}function aT(dj){return(aD&&dj&&0===String(dj).indexOf(aD))}function cv(dn,dj,dp,dk){if(aT(dj)){return 0}var dm=aZ(bL,"download"),dl=aZ(a7,"link"),dq=new RegExp("\\.("+c6.join("|")+")([?&#]|$)","i");
-if(dl.test(dn)){return"link"}if(dk||dm.test(dn)||dq.test(dj)){return"download"}if(dp){return 0}return"link"}function au(dk){var dj;dj=dk.parentNode;while(dj!==null&&J(dj)){if(ae.isLinkElement(dk)){break}dk=dj;dj=dk.parentNode}return dk}function dc(dp){dp=au(dp);if(!ae.hasNodeAttribute(dp,"href")){return}if(!J(dp.href)){return}var dn=ae.getAttributeValueFromNode(dp,"href");var dk=dp.pathname||cl(dp.href);var dq=dp.hostname||d(dp.href);var dr=dq.toLowerCase();var dl=dp.href.replace(dq,dr);var dm=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dm.test(dl)){var dj=cv(dp.className,dl,ar(dr,dk),ae.hasNodeAttribute(dp,"download"));if(dj){return{type:dj,href:dl}}}}function aO(dj,dk,dl,dm){var dn=v.buildInteractionRequestParams(dj,dk,dl,dm);if(!dn){return}return cs(dn,null,"contentInteraction")}function ba(dj,dk){if(!dj||!dk){return false}var dl=v.findTargetNode(dj);if(v.shouldIgnoreInteraction(dl)){return false}dl=v.findTargetNodeNoDefault(dj);if(dl&&!U(dl,dk)){return false
-}return true}function cu(dl,dk,dn){if(!dl){return}var dj=v.findParentContentNode(dl);if(!dj){return}if(!ba(dj,dl)){return}var dm=v.buildContentBlock(dj);if(!dm){return}if(!dm.target&&dn){dm.target=dn}return v.buildInteractionRequestParams(dk,dm.name,dm.piece,dm.target)}function aV(dk){if(!ca||!ca.length){return false}var dj,dl;for(dj=0;dj<ca.length;dj++){dl=ca[dj];if(dl&&dl.name===dk.name&&dl.piece===dk.piece&&dl.target===dk.target){return true}}return false}function aW(dj){return function(dn){if(!dj){return}var dl=v.findParentContentNode(dj);var dk;if(dn){dk=dn.target||dn.srcElement}if(!dk){dk=dj}if(!ba(dl,dk)){return}if(!dl){return false}var dp=v.findTargetNode(dl);if(!dp||v.shouldIgnoreInteraction(dp)){return false}var dm=dc(dp);if(c9&&dm&&dm.type){return dm.type}return bI.trackContentInteractionNode(dk,"click")}}function b1(dl){if(!dl||!dl.length){return}var dj,dk;for(dj=0;dj<dl.length;dj++){dk=v.findTargetNode(dl[dj]);if(dk&&!dk.contentInteractionTrackingSetupDone){dk.contentInteractionTrackingSetupDone=true;
-an(dk,"click",aW(dk))}}}function bx(dl,dm){if(!dl||!dl.length){return[]}var dj,dk;for(dj=0;dj<dl.length;dj++){if(aV(dl[dj])){dl.splice(dj,1);dj--}else{ca.push(dl[dj])}}if(!dl||!dl.length){return[]}b1(dm);var dn=[];for(dj=0;dj<dl.length;dj++){dk=cs(v.buildImpressionRequestParams(dl[dj].name,dl[dj].piece,dl[dj].target),undefined,"contentImpressions");if(dk){dn.push(dk)}}return dn}function cA(dk){var dj=v.collectContent(dk);return bx(dj,dk)}function a8(dk){if(!dk||!dk.length){return[]}var dj;for(dj=0;dj<dk.length;dj++){if(!v.isNodeVisible(dk[dj])){dk.splice(dj,1);dj--}}if(!dk||!dk.length){return[]}return cA(dk)}function aF(dl,dj,dk){var dm=v.buildImpressionRequestParams(dl,dj,dk);return cs(dm,null,"contentImpression")}function db(dm,dk){if(!dm){return}var dj=v.findParentContentNode(dm);var dl=v.buildContentBlock(dj);if(!dl){return}if(!dk){dk="Unknown"}return aO(dk,dl.name,dl.piece,dl.target)}function cP(dk,dm,dj,dl){return"e_c="+s(dk)+"&e_a="+s(dm)+(J(dj)?"&e_n="+s(dj):"")+(J(dl)?"&e_v="+s(dl):"")
-}function at(dl,dn,dj,dm,dq,dp){if(!Y(dl)||!Y(dn)){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");return false}var dk=cs(cP(dl,dn,dj,dm),dq,"event");bF(dk,bJ,dp)}function b8(dj,dm,dk,dn){var dl=cs("search="+s(dj)+(dm?"&search_cat="+s(dm):"")+(J(dk)?"&search_count="+dk:""),dn,"sitesearch");bF(dl,bJ)}function cT(dj,dn,dm,dl){var dk=cs("idgoal="+dj+(dn?"&revenue="+dn:""),dm,"goal");bF(dk,bJ,dl)}function c1(dm,dj,dr,dq,dl){var dp=dj+"="+s(b2(dm));var dk=cu(dl,"click",dm);if(dk){dp+="&"+dk}var dn=cs(dp,dr,"link");bF(dn,bJ,dq)}function bU(dk,dj){if(dk!==""){return dk+dj.charAt(0).toUpperCase()+dj.slice(1)}return dj}function ch(dp){var dn,dj,dm=["","webkit","ms","moz"],dl;if(!bd){for(dj=0;dj<dm.length;dj++){dl=dm[dj];if(Object.prototype.hasOwnProperty.call(G,bU(dl,"hidden"))){if(G[bU(dl,"visibilityState")]==="prerender"){dn=true}break}}}if(dn){an(G,dl+"visibilitychange",function dk(){G.removeEventListener(dl+"visibilitychange",dk,false);
-dp()});return}dp()}function br(){var dk=bI.getVisitorId();var dj=aI();return dk+dj}function cj(dj){if(!dj){return}if(!ae.hasNodeAttribute(dj,"href")){return}var dk=ae.getAttributeValueFromNode(dj,"href");if(!dk||aT(dk)){return}if(!bI.getVisitorId()){return}dk=j(dk,av);var dl=br();dk=F(dk,av,dl);ae.setAnyAttribute(dj,"href",dk)}function bk(dm){var dn=ae.getAttributeValueFromNode(dm,"href");if(!dn){return false}dn=String(dn);var dk=dn.indexOf("//")===0||dn.indexOf("http://")===0||dn.indexOf("https://")===0;if(!dk){return false}var dj=dm.pathname||cl(dm.href);var dl=(dm.hostname||d(dm.href)).toLowerCase();if(ar(dl,dj)){if(!cH(cU,L(dl))){return true}return false}return false}function cG(dj){var dk=dc(dj);if(dk&&dk.type){dk.href=o(dk.href);c1(dk.href,dk.type,undefined,null,dj);return}if(cN){dj=au(dj);if(bk(dj)){cj(dj)}}}function cw(){return G.all&&!G.addEventListener}function cV(dj){var dl=dj.which;var dk=(typeof dj.button);if(!dl&&dk!=="undefined"){if(cw()){if(dj.button&1){dl=1}else{if(dj.button&2){dl=3
-}else{if(dj.button&4){dl=2}}}}else{if(dj.button===0||dj.button==="0"){dl=1}else{if(dj.button&1){dl=2}else{if(dj.button&2){dl=3}}}}}return dl}function bT(dj){switch(cV(dj)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function a0(dj){return dj.target||dj.srcElement}function aB(dj){return function(dm){dm=dm||S.event;var dl=bT(dm);var dn=a0(dm);if(dm.type==="click"){var dk=false;if(dj&&dl==="middle"){dk=true}if(dn&&!dk){cG(dn)}}else{if(dm.type==="mousedown"){if(dl==="middle"&&dn){aQ=dl;bA=dn}else{aQ=bA=null}}else{if(dm.type==="mouseup"){if(dl===aQ&&dn===bA){cG(dn)}aQ=bA=null}else{if(dm.type==="contextmenu"){cG(dn)}}}}}}function aq(dl,dk){var dj=typeof dk;if(dj==="undefined"){dk=true}an(dl,"click",aB(dk),false);if(dk){an(dl,"mouseup",aB(dk),false);an(dl,"mousedown",aB(dk),false);an(dl,"contextmenu",aB(dk),false)}}function bD(dl,dn){ap=true;var dm,dk=aZ(bz,"ignore"),dp=G.links,dj=null,dq=null;if(dp){for(dm=0;dm<dp.length;dm++){dj=dp[dm];if(!dk.test(dj.className)){dq=typeof dj.matomoTrackers;
-if("undefined"===dq){dj.matomoTrackers=[]}if(-1===M(dj.matomoTrackers,dn)){dj.matomoTrackers.push(dn);aq(dj,dl)}}}}}function aR(dk,dn,dp){if(cf){return true}cf=true;var dq=false;var dm,dl;function dj(){dq=true}m(function(){function dr(dt){setTimeout(function(){if(!cf){return}dq=false;dp.trackVisibleContentImpressions();dr(dt)},dt)}function ds(dt){setTimeout(function(){if(!cf){return}if(dq){dq=false;dp.trackVisibleContentImpressions()}ds(dt)},dt)}if(dk){dm=["scroll","resize"];for(dl=0;dl<dm.length;dl++){if(G.addEventListener){G.addEventListener(dm[dl],dj,false)}else{S.attachEvent("on"+dm[dl],dj)}}ds(100)}if(dn&&dn>0){dn=parseInt(dn,10);dr(dn)}})}var bC={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dj=this.requests;this.requests=[];if(dj.length===1){bF(dj[0],bJ)}else{df(dj,bJ)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dk){if(!this.canQueue()){df(dk,bJ);return}var dj;for(dj=0;dj<dk.length;dj++){this.push(dk[dj])}},push:function(dj){if(!dj){return
-}if(!this.canQueue()){bF(dj,bJ);return}bC.requests.push(dj);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bC.timeout=null;bC.sendRequests()},bC.interval);var dk="RequestQueue"+aw;if(!Object.prototype.hasOwnProperty.call(b,dk)){b[dk]={unload:function(){if(bC.timeout){clearTimeout(bC.timeout)}bC.sendRequests()}}}}};bh();aL();this.hasConsent=function(){return bB};this.getVisitorId=function(){return aX().uuid};this.getVisitorInfo=function(){return cO()};this.getAttributionInfo=function(){return bM()};this.getAttributionCampaignName=function(){return bM()[0]};this.getAttributionCampaignKeyword=function(){return bM()[1]};this.getAttributionReferrerTimestamp=function(){return bM()[2]};this.getAttributionReferrerUrl=function(){return bM()[3]};this.setTrackerUrl=function(dj){aD=dj};this.getTrackerUrl=function(){return aD};this.getMatomoUrl=function(){return W(this.getTrackerUrl(),bH)};this.getPiwikUrl=function(){return this.getMatomoUrl()};this.addTracker=function(dl,dk){if(!J(dl)||null===dl){dl=this.getTrackerUrl()
-}var dj=new P(dl,dk);I.push(dj);t.trigger("TrackerAdded",[this]);return dj};this.getSiteId=function(){return b6};this.setSiteId=function(dj){b3(dj)};this.resetUserId=function(){by=""};this.setUserId=function(dj){if(Y(dj)){by=dj}};this.getUserId=function(){return by};this.setCustomData=function(dj,dk){if(V(dj)){ao=dj}else{if(!ao){ao={}}ao[dj]=dk}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dj){cb=dj};this.appendToTrackingUrl=function(dj){cZ=dj};this.getRequest=function(dj){return cs(dj)};this.addPlugin=function(dj,dk){b[dj]=dk};this.setCustomDimension=function(dj,dk){dj=parseInt(dj,10);if(dj>0){if(!J(dk)){dk=""}if(!w(dk)){dk=String(dk)}bm[dj]=dk}};this.getCustomDimension=function(dj){dj=parseInt(dj,10);if(dj>0&&Object.prototype.hasOwnProperty.call(bm,dj)){return bm[dj]}};this.deleteCustomDimension=function(dj){dj=parseInt(dj,10);if(dj>0){delete bm[dj]}};this.setCustomVariable=function(dk,dj,dn,dl){var dm;if(!J(dl)){dl="visit"}if(!J(dj)){return}if(!J(dn)){dn=""
-}if(dk>0){dj=!w(dj)?String(dj):dj;dn=!w(dn)?String(dn):dn;dm=[dj.slice(0,bt),dn.slice(0,bt)];if(dl==="visit"||dl===2){cF();aP[dk]=dm}else{if(dl==="page"||dl===3){bW[dk]=dm}else{if(dl==="event"){cm[dk]=dm}}}}};this.getCustomVariable=function(dk,dl){var dj;if(!J(dl)){dl="visit"}if(dl==="page"||dl===3){dj=bW[dk]}else{if(dl==="event"){dj=cm[dk]}else{if(dl==="visit"||dl===2){cF();dj=aP[dk]}}}if(!J(dj)||(dj&&dj[0]==="")){return false}return dj};this.deleteCustomVariable=function(dj,dk){if(this.getCustomVariable(dj,dk)){this.setCustomVariable(dj,"","",dk)}};this.deleteCustomVariables=function(dj){if(dj==="page"||dj===3){bW={}}else{if(dj==="event"){cm={}}else{if(dj==="visit"||dj===2){aP={}}}}};this.storeCustomVariablesInCookie=function(){bQ=true};this.setLinkTrackingTimer=function(dj){bJ=dj};this.getLinkTrackingTimer=function(){return bJ};this.setDownloadExtensions=function(dj){if(w(dj)){dj=dj.split("|")}c6=dj};this.addDownloadExtensions=function(dk){var dj;if(w(dk)){dk=dk.split("|")}for(dj=0;dj<dk.length;
-dj++){c6.push(dk[dj])}};this.removeDownloadExtensions=function(dl){var dk,dj=[];if(w(dl)){dl=dl.split("|")}for(dk=0;dk<c6.length;dk++){if(M(dl,c6[dk])===-1){dj.push(c6[dk])}}c6=dj};this.setDomains=function(dj){ax=w(dj)?[dj]:dj;var dn=false,dl=0,dk;for(dl;dl<ax.length;dl++){dk=String(ax[dl]);if(cH(cU,L(dk))){dn=true;break}var dm=cl(dk);if(dm&&dm!=="/"&&dm!=="/*"){dn=true;break}}if(!dn){ax.push(cU)}};this.enableCrossDomainLinking=function(){cN=true};this.disableCrossDomainLinking=function(){cN=false};this.isCrossDomainLinkingEnabled=function(){return cN};this.setCrossDomainLinkingTimeout=function(dj){aY=dj};this.getCrossDomainLinkingUrlParameter=function(){return s(av)+"="+s(br())};this.setIgnoreClasses=function(dj){bz=w(dj)?[dj]:dj};this.setRequestMethod=function(dj){da=dj||ci};this.setRequestContentType=function(dj){cx=dj||aH};this.setReferrerUrl=function(dj){bn=dj};this.setCustomUrl=function(dj){a3=bV(bN,dj)};this.getCurrentUrl=function(){return a3||bN};this.setDocumentTitle=function(dj){bi=dj
-};this.setAPIUrl=function(dj){bH=dj};this.setDownloadClasses=function(dj){bL=w(dj)?[dj]:dj};this.setLinkClasses=function(dj){a7=w(dj)?[dj]:dj};this.setCampaignNameKey=function(dj){cq=w(dj)?[dj]:dj};this.setCampaignKeywordKey=function(dj){bG=w(dj)?[dj]:dj};this.discardHashTag=function(dj){bP=dj};this.setCookieNamePrefix=function(dj){bj=dj;if(aP){aP=bX()}};this.setCookieDomain=function(dj){var dk=L(dj);if(bw(dk)){cX=dk;bh()}};this.getCookieDomain=function(){return cX};this.hasCookies=function(){return"1"===b5()};this.setSessionCookie=function(dl,dk,dj){if(!dl){throw new Error("Missing cookie name")}if(!J(dj)){dj=co}bu.push(dl);de(aS(dl),dk,dj,bp,cX)};this.getCookie=function(dk){var dj=aC(aS(dk));if(dj===0){return null}return dj};this.setCookiePath=function(dj){bp=dj;bh()};this.getCookiePath=function(dj){return bp};this.setVisitorCookieTimeout=function(dj){cK=dj*1000};this.setSessionCookieTimeout=function(dj){co=dj*1000};this.getSessionCookieTimeout=function(){return co};this.setReferralCookieTimeout=function(dj){c5=dj*1000
-};this.setConversionAttributionFirstReferrer=function(dj){bv=dj};this.setSecureCookie=function(dj){bS=dj};this.disableCookies=function(){bl=true;c8.cookie="0";if(b6){aE()}};this.deleteCookies=function(){aE()};this.setDoNotTrack=function(dk){var dj=g.doNotTrack||g.msDoNotTrack;cQ=dk&&(dj==="yes"||dj==="1");if(cQ){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cW=true};this.disableAlwaysUseSendBeacon=function(){cW=false};this.addListener=function(dk,dj){aq(dk,dj)};this.enableLinkTracking=function(dk){c9=true;var dj=this;ch(function(){p(function(){bD(dk,dj)});m(function(){bD(dk,dj)})})};this.enableJSErrorTracking=function(){if(cS){return}cS=true;var dj=S.onerror;S.onerror=function(dp,dm,dl,dn,dk){ch(function(){var dq="JavaScript Errors";var dr=dm+":"+dl;if(dn){dr+=":"+dn}at(dq,dr,dp)});if(dj){return dj(dp,dm,dl,dn,dk)}return false}};this.disablePerformanceTracking=function(){a1=false};this.setVisitStandardLength=function(dj){dj=Math.max(dj,5);c7=dj};this.enableHeartBeatTimer=function(dj){dj=Math.max(dj,5);
-a4=(dj||15)*1000;if(cY!==null){dg()}};this.disableHeartBeatTimer=function(){bK();if(a4||aM){if(S.removeEventListener){S.removeEventListener("focus",a9);S.removeEventListener("blur",ay)}else{if(S.detachEvent){S.detachEvent("onfocus",a9);S.detachEvent("onblur",ay)}}}a4=null;aM=false};this.killFrame=function(){if(S.location!==S.top.location){S.top.location=S.location}};this.redirectFile=function(dj){if(S.location.protocol==="file:"){S.location=dj}};this.setCountPreRendered=function(dj){bd=dj};this.trackGoal=function(dj,dm,dl,dk){ch(function(){cT(dj,dm,dl,dk)})};this.trackLink=function(dk,dj,dm,dl){ch(function(){c1(dk,dj,dm,dl)})};this.getNumTrackedPageViews=function(){return cr};this.trackPageView=function(dj,dl,dk){ca=[];cL=[];if(N(b6)){ch(function(){Z(aD,bH,b6)})}else{ch(function(){cr++;b0(dj,dl,dk)})}};this.trackAllContentImpressions=function(){if(N(b6)){return}ch(function(){p(function(){var dj=v.findContentNodes();var dk=cA(dj);bC.pushMultiple(dk)})})};this.trackVisibleContentImpressions=function(dj,dk){if(N(b6)){return
-}if(!J(dj)){dj=true}if(!J(dk)){dk=750}aR(dj,dk,this);ch(function(){m(function(){var dl=v.findContentNodes();var dm=a8(dl);bC.pushMultiple(dm)})})};this.trackContentImpression=function(dl,dj,dk){if(N(b6)){return}dl=a(dl);dj=a(dj);dk=a(dk);if(!dl){return}dj=dj||"Unknown";ch(function(){var dm=aF(dl,dj,dk);bC.push(dm)})};this.trackContentImpressionsWithinNode=function(dj){if(N(b6)||!dj){return}ch(function(){if(cf){m(function(){var dk=v.findContentNodesWithinNode(dj);var dl=a8(dk);bC.pushMultiple(dl)})}else{p(function(){var dk=v.findContentNodesWithinNode(dj);var dl=cA(dk);bC.pushMultiple(dl)})}})};this.trackContentInteraction=function(dl,dm,dj,dk){if(N(b6)){return}dl=a(dl);dm=a(dm);dj=a(dj);dk=a(dk);if(!dl||!dm){return}dj=dj||"Unknown";ch(function(){var dn=aO(dl,dm,dj,dk);if(dn){bC.push(dn)}})};this.trackContentInteractionNode=function(dl,dk){if(N(b6)||!dl){return}var dj=null;ch(function(){dj=db(dl,dk);if(dj){bC.push(dj)}});return dj};this.logAllContentBlocksOnPage=function(){var dl=v.findContentNodes();
-var dj=v.collectContent(dl);var dk=typeof console;if(dk!=="undefined"&&console&&console.log){console.log(dj)}};this.trackEvent=function(dk,dm,dj,dl,dp,dn){ch(function(){at(dk,dm,dj,dl,dp,dn)})};this.trackSiteSearch=function(dj,dl,dk,dm){ca=[];ch(function(){b8(dj,dl,dk,dm)})};this.setEcommerceView=function(dn,dj,dl,dk){ct={};if(Y(dl)){dl=String(dl)}if(!J(dl)||dl===null||dl===false||!dl.length){dl=""}else{if(dl instanceof Array){dl=S.JSON.stringify(dl)}}var dm="_pkc";ct[dm]=dl;if(J(dk)&&dk!==null&&dk!==false&&String(dk).length){dm="_pkp";ct[dm]=dk}if(!Y(dn)&&!Y(dj)){return}if(Y(dn)){dm="_pks";ct[dm]=dn}if(!Y(dj)){dj=""}dm="_pkn";ct[dm]=dj};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c0))};this.addEcommerceItem=function(dn,dj,dl,dk,dm){if(Y(dn)){c0[dn]=[String(dn),dj,dl,dk,dm]}};this.removeEcommerceItem=function(dj){if(Y(dj)){dj=String(dj);delete c0[dj]}};this.clearEcommerceCart=function(){c0={}};this.trackEcommerceOrder=function(dj,dn,dm,dl,dk,dp){bZ(dj,dn,dm,dl,dk,dp)
-};this.trackEcommerceCartUpdate=function(dj){bs(dj)};this.trackRequest=function(dk,dm,dl,dj){ch(function(){var dn=cs(dk,dm,dj);bF(dn,bJ,dl)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bC.enabled=false};this.setRequestQueueInterval=function(dj){if(dj<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bC.interval=dj};this.queueRequest=function(dj){ch(function(){var dk=cs(dj);bC.push(dk)})};this.isConsentRequired=function(){return cB};this.getRememberedConsent=function(){var dj=aC(bc);if(aC(cM)){if(dj){bY(bc,bp,cX)}return null}if(!dj||dj===0){return null}return dj};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cB=true;bB=this.hasRememberedConsent();x++;b["CoreConsent"+x]={unload:function(){if(!bB){aE()}}}};this.setConsentGiven=function(){bB=true;bY(cM,bp,cX);var dk,dj;for(dk=0;dk<cL.length;dk++){dj=typeof cL[dk];if(dj==="string"){bF(cL[dk],bJ)}else{if(dj==="object"){df(cL[dk],bJ)
-}}}cL=[]};this.rememberConsentGiven=function(dk){if(dk){dk=dk*60*60*1000}else{dk=30*365*24*60*60*1000}this.setConsentGiven();var dj=new Date().getTime();de(bc,dj,dk,bp,cX,bS)};this.forgetConsentGiven=function(){var dj=30*365*24*60*60*1000;bY(bc,bp,cX);de(cM,new Date().getTime(),dj,bp,cX,bS);this.requireConsent()};this.isUserOptedOut=function(){return !bB};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=this.rememberConsentGiven;m(function(){setTimeout(function(){bE=true},0)});t.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')
-}av[ap]++}}}}return au}var C=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","requireConsent","setConsentGiven"];function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getMatomoUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);
-aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;t={initialized:false,JSON:S.JSON,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:m,onReady:p,isNodeVisible:i,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||S,ar)
-}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ap,ao){if(!J(ao)){ao=this.getAsyncTracker().getSiteId()}if(!J(ap)){ap=this.getAsyncTracker().getTrackerUrl()}return new P(ap,ao)},getAsyncTrackers:function(){return I},addTracker:function(aq,ap){var ao;if(!I.length){ao=ad(aq,ap)}else{ao=I[0].addTracker(aq,ap)}return ao},getAsyncTracker:function(at,ar){var aq;if(I&&I.length&&I[0]){aq=I[0]}else{return ad(at,ar)}if(!ar&&!at){return aq}if((!J(ar)||null===ar)&&aq){ar=aq.getSiteId()}if((!J(at)||null===at)&&aq){at=aq.getTrackerUrl()}var ap,ao=0;for(ao;ao<I.length;ao++){ap=I[ao];if(ap&&String(ap.getSiteId())===String(ar)&&ap.getTrackerUrl()===at){return ap}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return t});define("matomo",[],function(){return t})}return t}())}
+}catch(ao){return true}}function P(cf,ca){var bJ=this,bd="mtm_consent",cF="mtm_cookie_consent",cO="mtm_consent_removed",b5=aa(G.domain,S.location.href,K()),cW=L(b5[0]),bO=o(b5[1]),bo=o(b5[2]),cU=false,cj="GET",dc=cj,aI="application/x-www-form-urlencoded; charset=UTF-8",cy=aI,aE=cf||"",bI="",c1="",b7=ca||"",bz="",bP="",a4,bj="",c8=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ay=[cW],bA=[],bM=[],a8=[],bK=500,cY=true,cL,a5,bS,c9=1800,bQ,ao,cr=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bH=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],bk="_pk_",av="pk_vid",aZ=180,cZ,bq,bT=false,bm=false,cS,be,bw,cM=33955200000,cp=1800000,c7=15768000000,a2=true,bF=false,bh=false,bR=false,aQ=false,cc,bX={},cn={},bn={},bu=200,cu={},c2={},da={},cb=[],cg=false,cD=false,ap=false,db=false,cP=false,aN=false,bc=u(),cz=null,c0=null,cd,aR,bB,b8=am,bp,aL,cs=0,bv=["id","ses","cvar","ref"],cC=false,bC=null,cN=[],ax=T++,aw=false;
+try{bj=G.title}catch(cA){bj=""}function dg(ds,dq,dp,dr,dn,dm){if(bm){return}var dl;if(dp){dl=new Date();dl.setTime(dl.getTime()+dp)}G.cookie=ds+"="+s(dq)+(dp?";expires="+dl.toGMTString():"")+";path="+(dr||"/")+(dn?";domain="+dn:"")+(dm?";secure":"")+";SameSite=Lax"}function aD(dn){if(bm){return 0}var dl=new RegExp("(^|;)[ ]*"+dn+"=([^;]*)"),dm=dl.exec(G.cookie);return dm?R(dm[2]):0}bC=!aD(cO);function b3(dl){var dm;dl=j(dl,av);if(bQ){dm=new RegExp("#.*");return dl.replace(dm,"")}return dl}function bW(dn,dl){var dp=r(dl),dm;if(dp){return dl}if(dl.slice(0,1)==="/"){return r(dn)+"://"+d(dn)+dl}dn=b3(dn);dm=dn.indexOf("?");if(dm>=0){dn=dn.slice(0,dm)}dm=dn.lastIndexOf("/");if(dm!==dn.length-1){dn=dn.slice(0,dm+1)}return dn+dl}function cJ(dn,dl){var dm;dn=String(dn).toLowerCase();dl=String(dl).toLowerCase();if(dn===dl){return true}if(dl.slice(0,1)==="."){if(dn===dl.slice(1)){return true}dm=dn.length-dl.length;if((dm>0)&&(dn.slice(dm)===dl)){return true}}return false}function cm(dl){var dm=document.createElement("a");
+if(dl.indexOf("//")!==0&&dl.indexOf("http")!==0){if(dl.indexOf("*")===0){dl=dl.substr(1)}if(dl.indexOf(".")===0){dl=dl.substr(1)}dl="http://"+dl}dm.href=v.toAbsoluteUrl(dl);if(dm.pathname){return dm.pathname}return""}function a3(dm,dl){if(!aj(dl,"/")){dl="/"+dl}if(!aj(dm,"/")){dm="/"+dm}var dn=(dl==="/"||dl==="/*");if(dn){return true}if(dm===dl){return true}dl=String(dl).toLowerCase();dm=String(dm).toLowerCase();if(Q(dl,"*")){dl=dl.slice(0,-1);dn=(!dl||dl==="/");if(dn){return true}if(dm===dl){return true}return dm.indexOf(dl)===0}if(!Q(dm,"/")){dm+="/"}if(!Q(dl,"/")){dl+="/"}return dm.indexOf(dl)===0}function ar(dq,ds){var dm,dl,dn,dp,dr;for(dm=0;dm<ay.length;dm++){dp=L(ay[dm]);dr=cm(ay[dm]);if(cJ(dq,dp)&&a3(ds,dr)){return true}}return false}function aV(dp){var dm,dl,dn;for(dm=0;dm<ay.length;dm++){dl=L(ay[dm].toLowerCase());if(dp===dl){return true}if(dl.slice(0,1)==="."){if(dp===dl.slice(1)){return true}dn=dp.length-dl.length;if((dn>0)&&(dp.slice(dn)===dl)){return true}}}return false}function cq(dl,dn){dl=dl.replace("send_image=0","send_image=1");
+var dm=new Image(1,1);dm.onload=function(){E=0;if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:true})}};dm.onerror=function(){if(typeof dn==="function"){dn({request:dl,trackerUrl:aE,success:false})}};dm.src=aE+(aE.indexOf("?")<0?"?":"&")+dl}function cG(dl){if(dc==="POST"){return true}return dl&&(dl.length>2000||dl.indexOf('{"requests"')===0)}function aK(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob}function a6(dq,dt,ds){var dn=aK();if(!dn){return false}var dp={type:"application/x-www-form-urlencoded; charset=UTF-8"};var du=false;var dm=aE;try{var dl=new Blob([dq],dp);if(ds&&!cG(dq)){dl=new Blob([],dp);dm=dm+(dm.indexOf("?")<0?"?":"&")+dq}du=g.sendBeacon(dm,dl)}catch(dr){return false}if(du&&typeof dt==="function"){dt({request:dq,trackerUrl:aE,success:true,isSendBeacon:true})}return du}function c6(dm,dn,dl){if(!J(dl)||null===dl){dl=true}if(l&&a6(dm,dn,dl)){return}setTimeout(function(){if(l&&a6(dm,dn,dl)){return}var dr;try{var dq=S.XMLHttpRequest?new S.XMLHttpRequest():S.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;
+dq.open("POST",aE,true);dq.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)){var ds=l&&a6(dm,dn,dl);if(!ds&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false,xhr:this})}}}else{if(this.readyState===4&&(typeof dn==="function")){dn({request:dm,trackerUrl:aE,success:true,xhr:this})}}};dq.setRequestHeader("Content-Type",cy);dq.withCredentials=true;dq.send(dm)}catch(dp){dr=l&&a6(dm,dn,dl);if(!dr&&dl){cq(dm,dn)}else{if(typeof dn==="function"){dn({request:dm,trackerUrl:aE,success:false})}}}},50)}function ch(dm){var dl=new Date();var dn=dl.getTime()+dm;if(!q||dn>q){q=dn}}function co(dl){if(cd||!a5||!bC){return}cd=setTimeout(function dm(){cd=null;if(!bc){bc=(!G.hasFocus||G.hasFocus())}if(!bc){co(a5);return}if(bS()){return}var dn=new Date(),dp=a5-(dn.getTime()-c0);dp=Math.min(a5,dp);co(dp)},dl||a5)}function bL(){if(!cd){return}clearTimeout(cd);cd=null}function ba(){bc=true;cz=new Date().getTime()}function df(){var dl=new Date().getTime();
+return !cz||(dl-cz)>a5}function az(){if(df()){bS()}bL()}function di(){if(aN||!a5){return}aN=true;an(S,"focus",ba);an(S,"blur",az);ab++;t.addPlugin("HeartBeat"+ab,{unload:function(){if(aN&&df()){bS()}}})}function cE(dq){var dm=new Date();var dl=dm.getTime();c0=dl;if(cD&&dl<cD){var dn=cD-dl;setTimeout(dq,dn);ch(dn+50);cD+=50;return}if(cD===false){var dp=800;cD=dl+dp}dq()}function aO(){if(aD(cO)){bC=false}else{if(aD(bd)){bC=true}}}function bG(dm,dl,dn){aO();if(!bC){cN.push(dm);return}aw=true;if(!cS&&dm){if(cC&&bC){dm+="&consent=1"}cE(function(){if(cY&&a6(dm,dn,true)){ch(100);return}if(cG(dm)){c6(dm,dn)}else{cq(dm,dn)}ch(dl)})}if(!aN){di()}}function cl(dl){if(cS){return false}return(dl&&dl.length)}function c5(dl,dq){if(!dq||dq>=dl.length){return[dl]}var dm=0;var dn=dl.length;var dp=[];for(dm;dm<dn;dm+=dq){dp.push(dl.slice(dm,dm+dq))}return dp}function dh(dm,dl){if(!cl(dm)){return}if(!bC){cN.push(dm);return}aw=true;cE(function(){var dq=c5(dm,50);var dn=0,dp;for(dn;dn<dq.length;dn++){dp='{"requests":["?'+dq[dn].join('","?')+'"]}';
+if(cY&&a6(dp,null,false)){ch(100)}else{c6(dp,null,false)}}ch(dl)})}function aT(dl){return bk+dl+"."+b7+"."+bp}function b0(dn,dm,dl){dg(dn,"",-86400,dm,dl)}function b6(){if(bm){return"0"}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){return g.cookieEnabled?"1":"0"}var dl=bk+"testcookie";dg(dl,"1",undefined,bq,cZ,bT);var dm=aD(dl)==="1"?"1":"0";b0(dl);return dm}function bi(){bp=b8((cZ||cW)+(bq||"/")).slice(0,4)}function cK(){if(J(da.res)){return da}var dm,dp,dq={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",fla:"application/x-shockwave-flash",java:"application/x-java-vm",ag:"application/x-silverlight"};if(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(dm in dq){if(Object.prototype.hasOwnProperty.call(dq,dm)){dp=g.mimeTypes[dq[dm]];da[dm]=(dp&&dp.enabledPlugin)?"1":"0"}}}if(!((new RegExp("Edge[ /](\\d+[\\.\\d]+)")).test(g.userAgent))&&typeof navigator.javaEnabled!=="unknown"&&J(g.javaEnabled)&&g.javaEnabled()){da.java="1"
+}if(!J(S.showModalDialog)&&J(g.cookieEnabled)){da.cookie=g.cookieEnabled?"1":"0"}else{da.cookie=b6()}}var dn=parseInt(X.width,10);var dl=parseInt(X.height,10);da.res=parseInt(dn,10)+"x"+parseInt(dl,10);return da}function bY(){var dm=aT("cvar"),dl=aD(dm);if(dl&&dl.length){dl=S.JSON.parse(dl);if(V(dl)){return dl}}return{}}function cH(){if(aQ===false){aQ=bY()}}function cT(){var dl=cK();return b8((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dl)+(new Date()).getTime()+Math.random()).slice(0,16)}function aB(){var dl=cK();return b8((g.userAgent||"")+(g.platform||"")+S.JSON.stringify(dl)).slice(0,6)}function bf(){return Math.floor((new Date()).getTime()/1000)}function aJ(){var dm=bf();var dn=aB();var dl=String(dm)+dn;return dl}function c4(dn){dn=String(dn);var dr=aB();var dp=dr.length;var dq=dn.substr(-1*dp,dp);var dm=parseInt(dn.substr(0,dn.length-dp),10);if(dm&&dq&&dq===dr){var dl=bf();if(aZ<=0){return true}if(dl>=dm&&dl<=(dm+aZ)){return true}}return false}function dj(dl){if(!cP){return""
+}var dq=e(dl,av);if(!dq){return""}dq=String(dq);var dn=new RegExp("^[a-zA-Z0-9]+$");if(dq.length===32&&dn.test(dq)){var dm=dq.substr(16,32);if(c4(dm)){var dp=dq.substr(0,16);return dp}}return""}function cQ(){if(!bP){bP=dj(bO)}var dn=new Date(),dl=Math.round(dn.getTime()/1000),dm=aT("id"),dr=aD(dm),dq,dp;if(dr){dq=dr.split(".");dq.unshift("0");if(bP.length){dq[1]=bP}return dq}if(bP.length){dp=bP}else{if("0"===b6()){dp=""}else{dp=cT()}}dq=["1",dp,dl];return dq}function aY(){var dp=cQ(),dm=dp[0],dn=dp[1],dl=dp[2];return{newVisitor:dm,uuid:dn,createTs:dl}}function aH(){var dp=new Date(),dm=dp.getTime(),dq=aY().createTs;var dl=parseInt(dq,10);var dn=(dl*1000)+cM-dm;return dn}function aM(dl){if(!b7){return}var dn=new Date(),dm=Math.round(dn.getTime()/1000);if(!J(dl)){dl=aY()}var dp=dl.uuid+"."+dl.createTs+".";dg(aT("id"),dp,aH(),bq,cZ,bT)}function bN(){var dl=aD(aT("ref"));if(dl.length){try{dl=S.JSON.parse(dl);if(V(dl)){return dl}}catch(dm){}}return["","",0,""]}function bx(dm){var dl="testvalue";
+dg("test",dl,10000,null,dm);if(aD("test")===dl){b0("test",null,dm);return true}return false}function aF(){var dm=bm;bm=false;var dl,dn;for(dl=0;dl<bv.length;dl++){dn=aT(bv[dl]);if(dn!==cO&&dn!==bd&&0!==aD(dn)){b0(dn,bq,cZ)}}bm=dm}function b4(dl){b7=dl}function dk(dq){if(!dq||!V(dq)){return}var dp=[];var dn;for(dn in dq){if(Object.prototype.hasOwnProperty.call(dq,dn)){dp.push(dn)}}var dr={};dp.sort();var dl=dp.length;var dm;for(dm=0;dm<dl;dm++){dr[dp[dm]]=dq[dp[dm]]}return dr}function ce(){dg(aT("ses"),"1",cp,bq,cZ,bT)}function bg(){var dp="";var dm="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";var dn=dm.length;var dl;for(dl=0;dl<6;dl++){dp+=dm.charAt(Math.floor(Math.random()*dn))}return dp}function aA(dl){if(h&&h.timing&&h&&h.timing.connectEnd&&h.timing.fetchStart){dl+="&pf_net="+(h.timing.connectEnd-h.timing.fetchStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.requestStart){dl+="&pf_srv="+(h.timing.responseStart-h.timing.requestStart)}if(h&&h.timing&&h&&h.timing.responseStart&&h.timing.responseEnd){dl+="&pf_tfr="+(h.timing.responseEnd-h.timing.responseStart)
+}if(h&&h.timing&&h&&h.timing.domInteractive&&h.timing.domLoading){dl+="&pf_dm1="+(h.timing.domInteractive-h.timing.domLoading)}if(h&&h.timing&&h&&h.timing.domComplete&&h.timing.domInteractive){dl+="&pf_dm2="+(h.timing.domComplete-h.timing.domInteractive)}if(h&&h.timing&&h&&h.timing.loadEventEnd&&h.timing.loadEventStart){dl+="&pf_onl="+(h.timing.loadEventEnd-h.timing.loadEventStart)}return dl}function ct(dn,dI,dJ){var dH,dm=new Date(),dv=Math.round(dm.getTime()/1000),ds,dF,dp=1024,dO,dw,dE=aQ,dq=aT("ses"),dC=aT("ref"),dz=aT("cvar"),dA=aD(dq),dG=bN(),dK=a4||bO,dt,dl;if(bm){aF()}if(cS){return""}var dB=aY();var dy=G.characterSet||G.charset;if(!dy||dy.toLowerCase()==="utf-8"){dy=null}dt=dG[0];dl=dG[1];ds=dG[2];dF=dG[3];if(!dA){if(!bw||!dt.length){for(dH in cr){if(Object.prototype.hasOwnProperty.call(cr,dH)){dt=e(dK,cr[dH]);if(dt.length){break}}}for(dH in bH){if(Object.prototype.hasOwnProperty.call(bH,dH)){dl=e(dK,bH[dH]);if(dl.length){break}}}}dO=d(bo);dw=dF.length?d(dF):"";if(dO.length&&!aV(dO)&&(!bw||!dw.length||aV(dw))){dF=bo
+}if(dF.length||dt.length){ds=dv;dG=[dt,dl,ds,b3(dF.slice(0,dp))];dg(dC,S.JSON.stringify(dG),c7,bq,cZ,bT)}}dn+="&idsite="+b7+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+dm.getHours()+"&m="+dm.getMinutes()+"&s="+dm.getSeconds()+"&url="+s(b3(dK))+(bo.length?"&urlref="+s(b3(bo)):"")+((bz&&bz.length)?"&uid="+s(bz):"")+"&_id="+dB.uuid+"&_idn="+dB.newVisitor+(dt.length?"&_rcn="+s(dt):"")+(dl.length?"&_rck="+s(dl):"")+"&_refts="+ds+(String(dF).length?"&_ref="+s(b3(dF.slice(0,dp))):"")+(dy?"&cs="+s(dy):"")+"&send_image=0";var dN=cK();for(dH in dN){if(Object.prototype.hasOwnProperty.call(dN,dH)){dn+="&"+dH+"="+dN[dH]}}var dM=[];if(dI){for(dH in dI){if(Object.prototype.hasOwnProperty.call(dI,dH)&&/^dimension\d+$/.test(dH)){var dr=dH.replace("dimension","");dM.push(parseInt(dr,10));dM.push(String(dr));dn+="&"+dH+"="+s(dI[dH]);delete dI[dH]}}}if(dI&&B(dI)){dI=null}for(dH in cu){if(Object.prototype.hasOwnProperty.call(cu,dH)){dn+="&"+dH+"="+s(cu[dH])}}for(dH in bn){if(Object.prototype.hasOwnProperty.call(bn,dH)){var dx=(-1===M(dM,dH));
+if(dx){dn+="&dimension"+dH+"="+s(bn[dH])}}}if(dI){dn+="&data="+s(S.JSON.stringify(dI))}else{if(ao){dn+="&data="+s(S.JSON.stringify(ao))}}function du(dP,dQ){var dR=S.JSON.stringify(dP);if(dR.length>2){return"&"+dQ+"="+s(dR)}return""}var dL=dk(bX);var dD=dk(cn);dn+=du(dL,"cvar");dn+=du(dD,"e_cvar");if(aQ){dn+=du(aQ,"_cvar");for(dH in dE){if(Object.prototype.hasOwnProperty.call(dE,dH)){if(aQ[dH][0]===""||aQ[dH][1]===""){delete aQ[dH]}}}if(bR){dg(dz,S.JSON.stringify(aQ),cp,bq,cZ,bT)}}if(a2&&bF&&!bh){dn=aA(dn);bh=true}if(aL){dn+="&pv_id="+aL}aM(dB);ce();dn+=ac(dJ,{tracker:bJ,request:dn});if(c1.length){dn+="&"+c1}if(A(cc)){dn=cc(dn)}return dn}bS=function a7(){var dl=new Date();dl=dl.getTime();if(!c0){return false}if((c0+(1000*c9))<=dl){return false}if(c0+a5<=dl){bJ.ping();return true}return false};function br(dp,dn,dt,dq,dl,dw){var ds="idgoal=0",dm=new Date(),du=[],dv,dr=String(dp).length;if(dr){ds+="&ec_id="+s(dp)}ds+="&revenue="+dn;if(String(dt).length){ds+="&ec_st="+dt}if(String(dq).length){ds+="&ec_tx="+dq
+}if(String(dl).length){ds+="&ec_sh="+dl}if(String(dw).length){ds+="&ec_dt="+dw}if(c2){for(dv in c2){if(Object.prototype.hasOwnProperty.call(c2,dv)){if(!J(c2[dv][1])){c2[dv][1]=""}if(!J(c2[dv][2])){c2[dv][2]=""}if(!J(c2[dv][3])||String(c2[dv][3]).length===0){c2[dv][3]=0}if(!J(c2[dv][4])||String(c2[dv][4]).length===0){c2[dv][4]=1}du.push(c2[dv])}}ds+="&ec_items="+s(S.JSON.stringify(du))}ds=ct(ds,ao,"ecommerce");bG(ds,bK);if(dr){c2={}}}function bZ(dl,dq,dp,dn,dm,dr){if(String(dl).length&&J(dq)){br(dl,dq,dp,dn,dm,dr)}}function bt(dl){if(J(dl)){br("",dl,"","","","")}}function b1(dm,dp,dn){aL=bg();var dl=ct("action_name="+s(al(dm||bj)),dp,"log");if(!bh){dl=aA(dl)}bG(dl,bK,dn)}function a0(dn,dm){var dp,dl="(^| )(piwik[_-]"+dm+"|matomo[_-]"+dm;if(dn){for(dp=0;dp<dn.length;dp++){dl+="|"+dn[dp]}}dl+=")( |$)";return new RegExp(dl)}function aU(dl){return(aE&&dl&&0===String(dl).indexOf(aE))}function cw(dq,dl,dr,dm){if(aU(dl)){return 0}var dp=a0(bM,"download"),dn=a0(a8,"link"),ds=new RegExp("\\.("+c8.join("|")+")([?&#]|$)","i");
+if(dn.test(dq)){return"link"}if(dm||dp.test(dq)||ds.test(dl)){return"download"}if(dr){return 0}return"link"}function au(dm){var dl;dl=dm.parentNode;while(dl!==null&&J(dl)){if(ae.isLinkElement(dm)){break}dm=dl;dl=dm.parentNode}return dm}function de(dr){dr=au(dr);if(!ae.hasNodeAttribute(dr,"href")){return}if(!J(dr.href)){return}var dq=ae.getAttributeValueFromNode(dr,"href");var dm=dr.pathname||cm(dr.href);var ds=dr.hostname||d(dr.href);var dt=ds.toLowerCase();var dn=dr.href.replace(ds,dt);var dp=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto|tel):","i");if(!dp.test(dn)){var dl=cw(dr.className,dn,ar(dt,dm),ae.hasNodeAttribute(dr,"download"));if(dl){return{type:dl,href:dn}}}}function aP(dl,dm,dn,dp){var dq=v.buildInteractionRequestParams(dl,dm,dn,dp);if(!dq){return}return ct(dq,null,"contentInteraction")}function bb(dl,dm){if(!dl||!dm){return false}var dn=v.findTargetNode(dl);if(v.shouldIgnoreInteraction(dn)){return false}dn=v.findTargetNodeNoDefault(dl);if(dn&&!U(dn,dm)){return false
+}return true}function cv(dn,dm,dq){if(!dn){return}var dl=v.findParentContentNode(dn);if(!dl){return}if(!bb(dl,dn)){return}var dp=v.buildContentBlock(dl);if(!dp){return}if(!dp.target&&dq){dp.target=dq}return v.buildInteractionRequestParams(dm,dp.name,dp.piece,dp.target)}function aW(dm){if(!cb||!cb.length){return false}var dl,dn;for(dl=0;dl<cb.length;dl++){dn=cb[dl];if(dn&&dn.name===dm.name&&dn.piece===dm.piece&&dn.target===dm.target){return true}}return false}function aX(dl){return function(dq){if(!dl){return}var dn=v.findParentContentNode(dl);var dm;if(dq){dm=dq.target||dq.srcElement}if(!dm){dm=dl}if(!bb(dn,dm)){return}if(!dn){return false}var dr=v.findTargetNode(dn);if(!dr||v.shouldIgnoreInteraction(dr)){return false}var dp=de(dr);if(db&&dp&&dp.type){return dp.type}return bJ.trackContentInteractionNode(dm,"click")}}function b2(dn){if(!dn||!dn.length){return}var dl,dm;for(dl=0;dl<dn.length;dl++){dm=v.findTargetNode(dn[dl]);if(dm&&!dm.contentInteractionTrackingSetupDone){dm.contentInteractionTrackingSetupDone=true;
+an(dm,"click",aX(dm))}}}function by(dn,dp){if(!dn||!dn.length){return[]}var dl,dm;for(dl=0;dl<dn.length;dl++){if(aW(dn[dl])){dn.splice(dl,1);dl--}else{cb.push(dn[dl])}}if(!dn||!dn.length){return[]}b2(dp);var dq=[];for(dl=0;dl<dn.length;dl++){dm=ct(v.buildImpressionRequestParams(dn[dl].name,dn[dl].piece,dn[dl].target),undefined,"contentImpressions");if(dm){dq.push(dm)}}return dq}function cB(dm){var dl=v.collectContent(dm);return by(dl,dm)}function a9(dm){if(!dm||!dm.length){return[]}var dl;for(dl=0;dl<dm.length;dl++){if(!v.isNodeVisible(dm[dl])){dm.splice(dl,1);dl--}}if(!dm||!dm.length){return[]}return cB(dm)}function aG(dn,dl,dm){var dp=v.buildImpressionRequestParams(dn,dl,dm);return ct(dp,null,"contentImpression")}function dd(dp,dm){if(!dp){return}var dl=v.findParentContentNode(dp);var dn=v.buildContentBlock(dl);if(!dn){return}if(!dm){dm="Unknown"}return aP(dm,dn.name,dn.piece,dn.target)}function cR(dm,dp,dl,dn){return"e_c="+s(dm)+"&e_a="+s(dp)+(J(dl)?"&e_n="+s(dl):"")+(J(dn)?"&e_v="+s(dn):"")
+}function at(dn,dq,dl,dp,ds,dr){if(!Y(dn)||!Y(dq)){ak("Error while logging event: Parameters `category` and `action` must not be empty or filled with whitespaces");return false}var dm=ct(cR(dn,dq,dl,dp),ds,"event");bG(dm,bK,dr)}function b9(dl,dp,dm,dq){var dn=ct("search="+s(dl)+(dp?"&search_cat="+s(dp):"")+(J(dm)?"&search_count="+dm:""),dq,"sitesearch");bG(dn,bK)}function cV(dl,dq,dp,dn){var dm=ct("idgoal="+dl+(dq?"&revenue="+dq:""),dp,"goal");bG(dm,bK,dn)}function c3(dp,dl,dt,ds,dn){var dr=dl+"="+s(b3(dp));var dm=cv(dn,"click",dp);if(dm){dr+="&"+dm}var dq=ct(dr,dt,"link");bG(dq,bK,ds)}function bV(dm,dl){if(dm!==""){return dm+dl.charAt(0).toUpperCase()+dl.slice(1)}return dl}function ci(dr){var dq,dl,dp=["","webkit","ms","moz"],dn;if(!be){for(dl=0;dl<dp.length;dl++){dn=dp[dl];if(Object.prototype.hasOwnProperty.call(G,bV(dn,"hidden"))){if(G[bV(dn,"visibilityState")]==="prerender"){dq=true}break}}}if(dq){an(G,dn+"visibilitychange",function dm(){G.removeEventListener(dn+"visibilitychange",dm,false);
+dr()});return}dr()}function bs(){var dm=bJ.getVisitorId();var dl=aJ();return dm+dl}function ck(dl){if(!dl){return}if(!ae.hasNodeAttribute(dl,"href")){return}var dm=ae.getAttributeValueFromNode(dl,"href");if(!dm||aU(dm)){return}if(!bJ.getVisitorId()){return}dm=j(dm,av);var dn=bs();dm=F(dm,av,dn);ae.setAnyAttribute(dl,"href",dm)}function bl(dp){var dq=ae.getAttributeValueFromNode(dp,"href");if(!dq){return false}dq=String(dq);var dm=dq.indexOf("//")===0||dq.indexOf("http://")===0||dq.indexOf("https://")===0;if(!dm){return false}var dl=dp.pathname||cm(dp.href);var dn=(dp.hostname||d(dp.href)).toLowerCase();if(ar(dn,dl)){if(!cJ(cW,L(dn))){return true}return false}return false}function cI(dl){var dm=de(dl);if(dm&&dm.type){dm.href=o(dm.href);c3(dm.href,dm.type,undefined,null,dl);return}if(cP){dl=au(dl);if(bl(dl)){ck(dl)}}}function cx(){return G.all&&!G.addEventListener}function cX(dl){var dn=dl.which;var dm=(typeof dl.button);if(!dn&&dm!=="undefined"){if(cx()){if(dl.button&1){dn=1}else{if(dl.button&2){dn=3
+}else{if(dl.button&4){dn=2}}}}else{if(dl.button===0||dl.button==="0"){dn=1}else{if(dl.button&1){dn=2}else{if(dl.button&2){dn=3}}}}}return dn}function bU(dl){switch(cX(dl)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function a1(dl){return dl.target||dl.srcElement}function aC(dl){return function(dp){dp=dp||S.event;var dn=bU(dp);var dq=a1(dp);if(dp.type==="click"){var dm=false;if(dl&&dn==="middle"){dm=true}if(dq&&!dm){cI(dq)}}else{if(dp.type==="mousedown"){if(dn==="middle"&&dq){aR=dn;bB=dq}else{aR=bB=null}}else{if(dp.type==="mouseup"){if(dn===aR&&dq===bB){cI(dq)}aR=bB=null}else{if(dp.type==="contextmenu"){cI(dq)}}}}}}function aq(dn,dm){var dl=typeof dm;if(dl==="undefined"){dm=true}an(dn,"click",aC(dm),false);if(dm){an(dn,"mouseup",aC(dm),false);an(dn,"mousedown",aC(dm),false);an(dn,"contextmenu",aC(dm),false)}}function bE(dn,dq){ap=true;var dp,dm=a0(bA,"ignore"),dr=G.links,dl=null,ds=null;if(dr){for(dp=0;dp<dr.length;dp++){dl=dr[dp];if(!dm.test(dl.className)){ds=typeof dl.matomoTrackers;
+if("undefined"===ds){dl.matomoTrackers=[]}if(-1===M(dl.matomoTrackers,dq)){dl.matomoTrackers.push(dq);aq(dl,dn)}}}}}function aS(dm,dq,dr){if(cg){return true}cg=true;var ds=false;var dp,dn;function dl(){ds=true}m(function(){function dt(dv){setTimeout(function(){if(!cg){return}ds=false;dr.trackVisibleContentImpressions();dt(dv)},dv)}function du(dv){setTimeout(function(){if(!cg){return}if(ds){ds=false;dr.trackVisibleContentImpressions()}du(dv)},dv)}if(dm){dp=["scroll","resize"];for(dn=0;dn<dp.length;dn++){if(G.addEventListener){G.addEventListener(dp[dn],dl,false)}else{S.attachEvent("on"+dp[dn],dl)}}du(100)}if(dq&&dq>0){dq=parseInt(dq,10);dt(dq)}})}var bD={enabled:true,requests:[],timeout:null,interval:2500,sendRequests:function(){var dl=this.requests;this.requests=[];if(dl.length===1){bG(dl[0],bK)}else{dh(dl,bK)}},canQueue:function(){return !l&&this.enabled},pushMultiple:function(dm){if(!this.canQueue()){dh(dm,bK);return}var dl;for(dl=0;dl<dm.length;dl++){this.push(dm[dl])}},push:function(dl){if(!dl){return
+}if(!this.canQueue()){bG(dl,bK);return}bD.requests.push(dl);if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.timeout=setTimeout(function(){bD.timeout=null;bD.sendRequests()},bD.interval);var dm="RequestQueue"+ax;if(!Object.prototype.hasOwnProperty.call(b,dm)){b[dm]={unload:function(){if(bD.timeout){clearTimeout(bD.timeout)}bD.sendRequests()}}}}};bi();aM();this.hasConsent=function(){return bC};this.getVisitorId=function(){return aY().uuid};this.getVisitorInfo=function(){return cQ()};this.getAttributionInfo=function(){return bN()};this.getAttributionCampaignName=function(){return bN()[0]};this.getAttributionCampaignKeyword=function(){return bN()[1]};this.getAttributionReferrerTimestamp=function(){return bN()[2]};this.getAttributionReferrerUrl=function(){return bN()[3]};this.setTrackerUrl=function(dl){aE=dl};this.getTrackerUrl=function(){return aE};this.getMatomoUrl=function(){return W(this.getTrackerUrl(),bI)};this.getPiwikUrl=function(){return this.getMatomoUrl()};this.addTracker=function(dn,dm){if(!J(dn)||null===dn){dn=this.getTrackerUrl()
+}var dl=new P(dn,dm);I.push(dl);t.trigger("TrackerAdded",[this]);return dl};this.getSiteId=function(){return b7};this.setSiteId=function(dl){b4(dl)};this.resetUserId=function(){bz=""};this.setUserId=function(dl){if(Y(dl)){bz=dl}};this.setVisitorId=function(dm){var dl=/[0-9A-Fa-f]{16}/g;if(w(dm)&&dl.test(dm)){bP=dm}else{ak("Invalid visitorId set"+dm)}};this.getUserId=function(){return bz};this.setCustomData=function(dl,dm){if(V(dl)){ao=dl}else{if(!ao){ao={}}ao[dl]=dm}};this.getCustomData=function(){return ao};this.setCustomRequestProcessing=function(dl){cc=dl};this.appendToTrackingUrl=function(dl){c1=dl};this.getRequest=function(dl){return ct(dl)};this.addPlugin=function(dl,dm){b[dl]=dm};this.setCustomDimension=function(dl,dm){dl=parseInt(dl,10);if(dl>0){if(!J(dm)){dm=""}if(!w(dm)){dm=String(dm)}bn[dl]=dm}};this.getCustomDimension=function(dl){dl=parseInt(dl,10);if(dl>0&&Object.prototype.hasOwnProperty.call(bn,dl)){return bn[dl]}};this.deleteCustomDimension=function(dl){dl=parseInt(dl,10);
+if(dl>0){delete bn[dl]}};this.setCustomVariable=function(dm,dl,dq,dn){var dp;if(!J(dn)){dn="visit"}if(!J(dl)){return}if(!J(dq)){dq=""}if(dm>0){dl=!w(dl)?String(dl):dl;dq=!w(dq)?String(dq):dq;dp=[dl.slice(0,bu),dq.slice(0,bu)];if(dn==="visit"||dn===2){cH();aQ[dm]=dp}else{if(dn==="page"||dn===3){bX[dm]=dp}else{if(dn==="event"){cn[dm]=dp}}}}};this.getCustomVariable=function(dm,dn){var dl;if(!J(dn)){dn="visit"}if(dn==="page"||dn===3){dl=bX[dm]}else{if(dn==="event"){dl=cn[dm]}else{if(dn==="visit"||dn===2){cH();dl=aQ[dm]}}}if(!J(dl)||(dl&&dl[0]==="")){return false}return dl};this.deleteCustomVariable=function(dl,dm){if(this.getCustomVariable(dl,dm)){this.setCustomVariable(dl,"","",dm)}};this.deleteCustomVariables=function(dl){if(dl==="page"||dl===3){bX={}}else{if(dl==="event"){cn={}}else{if(dl==="visit"||dl===2){aQ={}}}}};this.storeCustomVariablesInCookie=function(){bR=true};this.setLinkTrackingTimer=function(dl){bK=dl};this.getLinkTrackingTimer=function(){return bK};this.setDownloadExtensions=function(dl){if(w(dl)){dl=dl.split("|")
+}c8=dl};this.addDownloadExtensions=function(dm){var dl;if(w(dm)){dm=dm.split("|")}for(dl=0;dl<dm.length;dl++){c8.push(dm[dl])}};this.removeDownloadExtensions=function(dn){var dm,dl=[];if(w(dn)){dn=dn.split("|")}for(dm=0;dm<c8.length;dm++){if(M(dn,c8[dm])===-1){dl.push(c8[dm])}}c8=dl};this.setDomains=function(dl){ay=w(dl)?[dl]:dl;var dq=false,dn=0,dm;for(dn;dn<ay.length;dn++){dm=String(ay[dn]);if(cJ(cW,L(dm))){dq=true;break}var dp=cm(dm);if(dp&&dp!=="/"&&dp!=="/*"){dq=true;break}}if(!dq){ay.push(cW)}};this.enableCrossDomainLinking=function(){cP=true};this.disableCrossDomainLinking=function(){cP=false};this.isCrossDomainLinkingEnabled=function(){return cP};this.setCrossDomainLinkingTimeout=function(dl){aZ=dl};this.getCrossDomainLinkingUrlParameter=function(){return s(av)+"="+s(bs())};this.setIgnoreClasses=function(dl){bA=w(dl)?[dl]:dl};this.setRequestMethod=function(dl){dc=dl||cj};this.setRequestContentType=function(dl){cy=dl||aI};this.setReferrerUrl=function(dl){bo=dl};this.setCustomUrl=function(dl){a4=bW(bO,dl)
+};this.getCurrentUrl=function(){return a4||bO};this.setDocumentTitle=function(dl){bj=dl};this.setAPIUrl=function(dl){bI=dl};this.setDownloadClasses=function(dl){bM=w(dl)?[dl]:dl};this.setLinkClasses=function(dl){a8=w(dl)?[dl]:dl};this.setCampaignNameKey=function(dl){cr=w(dl)?[dl]:dl};this.setCampaignKeywordKey=function(dl){bH=w(dl)?[dl]:dl};this.discardHashTag=function(dl){bQ=dl};this.setCookieNamePrefix=function(dl){bk=dl;if(aQ){aQ=bY()}};this.setCookieDomain=function(dl){var dm=L(dl);if(bx(dm)){cZ=dm;bi()}};this.getCookieDomain=function(){return cZ};this.hasCookies=function(){return"1"===b6()};this.setSessionCookie=function(dn,dm,dl){if(!dn){throw new Error("Missing cookie name")}if(!J(dl)){dl=cp}bv.push(dn);dg(aT(dn),dm,dl,bq,cZ)};this.getCookie=function(dm){var dl=aD(aT(dm));if(dl===0){return null}return dl};this.setCookiePath=function(dl){bq=dl;bi()};this.getCookiePath=function(dl){return bq};this.setVisitorCookieTimeout=function(dl){cM=dl*1000};this.setSessionCookieTimeout=function(dl){cp=dl*1000
+};this.getSessionCookieTimeout=function(){return cp};this.setReferralCookieTimeout=function(dl){c7=dl*1000};this.setConversionAttributionFirstReferrer=function(dl){bw=dl};this.setSecureCookie=function(dl){bT=dl};this.disableCookies=function(){bm=true;if(b7){aF()}};this.areCookiesEnabled=function(){return !bm};this.setCookieConsentGiven=function(){if(bm&&!cS){bm=false;if(b7&&aw){aM();var dl=ct("ping=1",null,"ping");bG(dl,bK)}}};this.requireCookieConsent=function(){if(this.getRememberedCookieConsent()){return false}this.disableCookies();return true};this.getRememberedCookieConsent=function(){return aD(cF)};this.forgetCookieConsentGiven=function(){b0(cF,bq,cZ);this.disableCookies()};this.rememberCookieConsentGiven=function(dm){if(dm){dm=dm*60*60*1000}else{dm=30*365*24*60*60*1000}this.setCookieConsentGiven();var dl=new Date().getTime();dg(cF,dl,dm,bq,cZ,bT)};this.deleteCookies=function(){aF()};this.setDoNotTrack=function(dm){var dl=g.doNotTrack||g.msDoNotTrack;cS=dm&&(dl==="yes"||dl==="1");
+if(cS){this.disableCookies()}};this.alwaysUseSendBeacon=function(){cY=true};this.disableAlwaysUseSendBeacon=function(){cY=false};this.addListener=function(dm,dl){aq(dm,dl)};this.enableLinkTracking=function(dm){db=true;var dl=this;ci(function(){p(function(){bE(dm,dl)});m(function(){bE(dm,dl)})})};this.enableJSErrorTracking=function(){if(cU){return}cU=true;var dl=S.onerror;S.onerror=function(dr,dp,dn,dq,dm){ci(function(){var ds="JavaScript Errors";var dt=dp+":"+dn;if(dq){dt+=":"+dq}at(ds,dt,dr)});if(dl){return dl(dr,dp,dn,dq,dm)}return false}};this.disablePerformanceTracking=function(){a2=false};this.setVisitStandardLength=function(dl){dl=Math.max(dl,5);c9=dl};this.enableHeartBeatTimer=function(dl){dl=Math.max(dl,5);a5=(dl||15)*1000;if(c0!==null){di()}};this.disableHeartBeatTimer=function(){bL();if(a5||aN){if(S.removeEventListener){S.removeEventListener("focus",ba);S.removeEventListener("blur",az)}else{if(S.detachEvent){S.detachEvent("onfocus",ba);S.detachEvent("onblur",az)}}}a5=null;aN=false
+};this.killFrame=function(){if(S.location!==S.top.location){S.top.location=S.location}};this.redirectFile=function(dl){if(S.location.protocol==="file:"){S.location=dl}};this.setCountPreRendered=function(dl){be=dl};this.trackGoal=function(dl,dp,dn,dm){ci(function(){cV(dl,dp,dn,dm)})};this.trackLink=function(dm,dl,dp,dn){ci(function(){c3(dm,dl,dp,dn)})};this.getNumTrackedPageViews=function(){return cs};this.trackPageView=function(dl,dn,dm){cb=[];cN=[];if(N(b7)){ci(function(){Z(aE,bI,b7)})}else{ci(function(){cs++;b1(dl,dn,dm)})}};this.trackAllContentImpressions=function(){if(N(b7)){return}ci(function(){p(function(){var dl=v.findContentNodes();var dm=cB(dl);bD.pushMultiple(dm)})})};this.trackVisibleContentImpressions=function(dl,dm){if(N(b7)){return}if(!J(dl)){dl=true}if(!J(dm)){dm=750}aS(dl,dm,this);ci(function(){m(function(){var dn=v.findContentNodes();var dp=a9(dn);bD.pushMultiple(dp)})})};this.trackContentImpression=function(dn,dl,dm){if(N(b7)){return}dn=a(dn);dl=a(dl);dm=a(dm);if(!dn){return
+}dl=dl||"Unknown";ci(function(){var dp=aG(dn,dl,dm);bD.push(dp)})};this.trackContentImpressionsWithinNode=function(dl){if(N(b7)||!dl){return}ci(function(){if(cg){m(function(){var dm=v.findContentNodesWithinNode(dl);var dn=a9(dm);bD.pushMultiple(dn)})}else{p(function(){var dm=v.findContentNodesWithinNode(dl);var dn=cB(dm);bD.pushMultiple(dn)})}})};this.trackContentInteraction=function(dn,dp,dl,dm){if(N(b7)){return}dn=a(dn);dp=a(dp);dl=a(dl);dm=a(dm);if(!dn||!dp){return}dl=dl||"Unknown";ci(function(){var dq=aP(dn,dp,dl,dm);if(dq){bD.push(dq)}})};this.trackContentInteractionNode=function(dn,dm){if(N(b7)||!dn){return}var dl=null;ci(function(){dl=dd(dn,dm);if(dl){bD.push(dl)}});return dl};this.logAllContentBlocksOnPage=function(){var dn=v.findContentNodes();var dl=v.collectContent(dn);var dm=typeof console;if(dm!=="undefined"&&console&&console.log){console.log(dl)}};this.trackEvent=function(dm,dp,dl,dn,dr,dq){ci(function(){at(dm,dp,dl,dn,dr,dq)})};this.trackSiteSearch=function(dl,dn,dm,dp){cb=[];
+ci(function(){b9(dl,dn,dm,dp)})};this.setEcommerceView=function(dq,dl,dn,dm){cu={};if(Y(dn)){dn=String(dn)}if(!J(dn)||dn===null||dn===false||!dn.length){dn=""}else{if(dn instanceof Array){dn=S.JSON.stringify(dn)}}var dp="_pkc";cu[dp]=dn;if(J(dm)&&dm!==null&&dm!==false&&String(dm).length){dp="_pkp";cu[dp]=dm}if(!Y(dq)&&!Y(dl)){return}if(Y(dq)){dp="_pks";cu[dp]=dq}if(!Y(dl)){dl=""}dp="_pkn";cu[dp]=dl};this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(c2))};this.addEcommerceItem=function(dq,dl,dn,dm,dp){if(Y(dq)){c2[dq]=[String(dq),dl,dn,dm,dp]}};this.removeEcommerceItem=function(dl){if(Y(dl)){dl=String(dl);delete c2[dl]}};this.clearEcommerceCart=function(){c2={}};this.trackEcommerceOrder=function(dl,dq,dp,dn,dm,dr){bZ(dl,dq,dp,dn,dm,dr)};this.trackEcommerceCartUpdate=function(dl){bt(dl)};this.trackRequest=function(dm,dp,dn,dl){ci(function(){var dq=ct(dm,dp,dl);bG(dq,bK,dn)})};this.ping=function(){this.trackRequest("ping=1",null,null,"ping")};this.disableQueueRequest=function(){bD.enabled=false
+};this.setRequestQueueInterval=function(dl){if(dl<1000){throw new Error("Request queue interval needs to be at least 1000ms")}bD.interval=dl};this.queueRequest=function(dl){ci(function(){var dm=ct(dl);bD.push(dm)})};this.isConsentRequired=function(){return cC};this.getRememberedConsent=function(){var dl=aD(bd);if(aD(cO)){if(dl){b0(bd,bq,cZ)}return null}if(!dl||dl===0){return null}return dl};this.hasRememberedConsent=function(){return !!this.getRememberedConsent()};this.requireConsent=function(){cC=true;bC=this.hasRememberedConsent();if(!bC){bm=true}x++;b["CoreConsent"+x]={unload:function(){if(!bC){aF()}}}};this.setConsentGiven=function(dm){bC=true;b0(cO,bq,cZ);var dn,dl;for(dn=0;dn<cN.length;dn++){dl=typeof cN[dn];if(dl==="string"){bG(cN[dn],bK)}else{if(dl==="object"){dh(cN[dn],bK)}}}cN=[];if(!J(dm)||dm){this.setCookieConsentGiven()}};this.rememberConsentGiven=function(dn){if(dn){dn=dn*60*60*1000}else{dn=30*365*24*60*60*1000}var dl=true;this.setConsentGiven(dl);var dm=new Date().getTime();
+dg(bd,dm,dn,bq,cZ,bT)};this.forgetConsentGiven=function(){var dl=30*365*24*60*60*1000;b0(bd,bq,cZ);dg(cO,new Date().getTime(),dl,bq,cZ,bT);this.forgetCookieConsentGiven();this.requireConsent()};this.isUserOptedOut=function(){return !bC};this.optUserOut=this.forgetConsentGiven;this.forgetUserOptOut=function(){var dl=false;this.rememberConsentGiven(0,dl)};m(function(){setTimeout(function(){bF=true},0)});t.trigger("TrackerSetup",[this])}function H(){return{push:af}}function c(au,at){var av={};var aq,ar;for(aq=0;aq<at.length;aq++){var ao=at[aq];av[ao]=1;for(ar=0;ar<au.length;ar++){if(au[ar]&&au[ar][0]){var ap=au[ar][0];if(ao===ap){af(au[ar]);delete au[ar];if(av[ap]>1&&ap!=="addTracker"){ak("The method "+ap+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}av[ap]++}}}}return au}var C=["addTracker","forgetCookieConsentGiven","requireCookieConsent","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCrossDomainLinkingTimeout","setSessionCookieTimeout","setVisitorCookieTimeout","setCookieNamePrefix","setSecureCookie","setCookiePath","setCookieDomain","setDomains","setUserId","setVisitorId","setSiteId","alwaysUseSendBeacon","enableLinkTracking","setCookieConsentGiven","requireConsent","setConsentGiven"];
+function ad(aq,ap){var ao=new P(aq,ap);I.push(ao);_paq=c(_paq,C);for(E=0;E<_paq.length;E++){if(_paq[E]){af(_paq[E])}}_paq=new H();t.trigger("TrackerAdded",[ao]);return ao}an(S,"beforeunload",ai,false);an(S,"message",function(au){if(!au||!au.origin){return}var aw,ar,ap;var ax=d(au.origin);var at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){ap=d(at[ar].getMatomoUrl());if(ap===ax){aw=at[ar];break}}if(!aw){return}var aq=null;try{aq=JSON.parse(au.data)}catch(av){return}if(!aq){return}function ao(aA){var aC=G.getElementsByTagName("iframe");for(ar=0;ar<aC.length;ar++){var aB=aC[ar];var ay=d(aB.src);if(aB.contentWindow&&J(aB.contentWindow.postMessage)&&ay===ax){var az=JSON.stringify(aA);aB.contentWindow.postMessage(az,"*")}}}if(J(aq.maq_initial_value)){ao({maq_opted_in:aq.maq_initial_value&&aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}else{if(J(aq.maq_opted_in)){at=t.getAsyncTrackers();for(ar=0;ar<at.length;ar++){aw=at[ar];if(aq.maq_opted_in){aw.rememberConsentGiven()
+}else{aw.forgetConsentGiven()}}ao({maq_confirm_opted_in:aw.hasConsent(),maq_url:aw.getMatomoUrl(),maq_optout_by_default:aw.isConsentRequired()})}}},false);Date.prototype.getTimeAlias=Date.prototype.getTime;t={initialized:false,JSON:S.JSON,DOM:{addEventListener:function(ar,aq,ap,ao){var at=typeof ao;if(at==="undefined"){ao=false}an(ar,aq,ap,ao)},onLoad:m,onReady:p,isNodeVisible:i,isOrWasNodeVisible:v.isNodeVisible},on:function(ap,ao){if(!y[ap]){y[ap]=[]}y[ap].push(ao)},off:function(aq,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){if(y[aq][ao]===ap){y[aq].splice(ao,1)}}},trigger:function(aq,ar,ap){if(!y[aq]){return}var ao=0;for(ao;ao<y[aq].length;ao++){y[aq][ao].apply(ap||S,ar)}},addPlugin:function(ao,ap){b[ao]=ap},getTracker:function(ap,ao){if(!J(ao)){ao=this.getAsyncTracker().getSiteId()}if(!J(ap)){ap=this.getAsyncTracker().getTrackerUrl()}return new P(ap,ao)},getAsyncTrackers:function(){return I},addTracker:function(aq,ap){var ao;if(!I.length){ao=ad(aq,ap)}else{ao=I[0].addTracker(aq,ap)
+}return ao},getAsyncTracker:function(at,ar){var aq;if(I&&I.length&&I[0]){aq=I[0]}else{return ad(at,ar)}if(!ar&&!at){return aq}if((!J(ar)||null===ar)&&aq){ar=aq.getSiteId()}if((!J(at)||null===at)&&aq){at=aq.getTrackerUrl()}var ap,ao=0;for(ao;ao<I.length;ao++){ap=I[ao];if(ap&&String(ap.getSiteId())===String(ar)&&ap.getTrackerUrl()===at){return ap}}},retryMissedPluginCalls:function(){var ap=ah;ah=[];var ao=0;for(ao;ao<ap.length;ao++){af(ap[ao])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return t});define("matomo",[],function(){return t})}return t}())}
/*!!! pluginTrackerHook */
-(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;
-if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.matomoPluginAsyncInit&&window.matomoPluginAsyncInit.length){var a=0;for(a;a<window.matomoPluginAsyncInit.length;a++){if(typeof window.matomoPluginAsyncInit[a]==="function"){window.matomoPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}if(window&&window.matomoAsyncInit){window.matomoAsyncInit()}if(!window.Matomo.getAsyncTrackers().length){if(b()){window.Matomo.addTracker()}else{_paq={push:function(c){var d=typeof console;if(d!=="undefined"&&console&&console.error){console.error("_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Matomo.trigger("MatomoInitialized",[]);
-window.Matomo.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Matomo}}());if(typeof piwik_log!=="function"){piwik_log=function(c,e,g,f){function b(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var d,a=window.Matomo.getTracker(g,e);a.setDocumentTitle(c);a.setCustomData(f);d=b("tracker_pause");if(d){a.setLinkTrackingTimer(d)}d=b("download_extensions");if(d){a.setDownloadExtensions(d)}d=b("hosts_alias");if(d){a.setDomains(d)}d=b("ignore_classes");if(d){a.setIgnoreClasses(d)}a.trackPageView();if(b("install_tracker")){piwik_track=function(i,j,k,h){a.setSiteId(j);a.setTrackerUrl(k);a.trackLink(i,h)};a.enableLinkTracking()}}}
+(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.matomoPluginAsyncInit&&window.matomoPluginAsyncInit.length){var a=0;for(a;a<window.matomoPluginAsyncInit.length;a++){if(typeof window.matomoPluginAsyncInit[a]==="function"){window.matomoPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()
+}if(window&&window.matomoAsyncInit){window.matomoAsyncInit()}if(!window.Matomo.getAsyncTrackers().length){if(b()){window.Matomo.addTracker()}else{_paq={push:function(c){var d=typeof console;if(d!=="undefined"&&console&&console.error){console.error("_paq.push() was used but Matomo tracker was not initialized before the matomo.js file was loaded. Make sure to configure the tracker via _paq.push before loading matomo.js. Alternatively, you can create a tracker via Matomo.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Matomo.trigger("MatomoInitialized",[]);window.Matomo.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Matomo}}());if(typeof piwik_log!=="function"){piwik_log=function(c,e,g,f){function b(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var d,a=window.Matomo.getTracker(g,e);a.setDocumentTitle(c);
+a.setCustomData(f);d=b("tracker_pause");if(d){a.setLinkTrackingTimer(d)}d=b("download_extensions");if(d){a.setDownloadExtensions(d)}d=b("hosts_alias");if(d){a.setDomains(d)}d=b("ignore_classes");if(d){a.setIgnoreClasses(d)}a.trackPageView();if(b("install_tracker")){piwik_track=function(i,j,k,h){a.setSiteId(j);a.setTrackerUrl(k);a.trackLink(i,h)};a.enableLinkTracking()}}}
/*!! @license-end */; \ No newline at end of file
diff --git a/plugins/API/Menu.php b/plugins/API/Menu.php
index e79b5be6af..84ac6faf9d 100644
--- a/plugins/API/Menu.php
+++ b/plugins/API/Menu.php
@@ -8,7 +8,7 @@
*/
namespace Piwik\Plugins\API;
-use Piwik\DeviceDetector\DeviceDetectorCache;
+use Piwik\Container\StaticContainer;
use Piwik\Menu\MenuAdmin;
use Piwik\Menu\MenuTop;
use Piwik\Piwik;
@@ -51,7 +51,7 @@ class Menu extends \Piwik\Plugin\Menu
}
$ua = new OperatingSystem($_SERVER['HTTP_USER_AGENT']);
- $ua->setCache(new DeviceDetectorCache(86400));
+ $ua->setCache(StaticContainer::get('DeviceDetector\Cache\Cache'));
$parsedOS = $ua->parse();
if (!empty($parsedOS['short_name']) && in_array($parsedOS['short_name'], array(self::DD_SHORT_NAME_ANDROID, self::DD_SHORT_NAME_IOS))) {
diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml
index 50f6f02561..e4a75f4309 100644
--- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml
+++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml
@@ -3216,7 +3216,7 @@
<idVisit>28</idVisit>
<visitIp>2003:f6:93bf:26f:9ec7:a6ff:fe29:27df</visitIp>
- <fingerprint>b6f1d5120b2b15a2</fingerprint>
+ <fingerprint>47b25ed9972126db</fingerprint>
<actionDetails>
<row>
<type>action</type>
@@ -3610,7 +3610,7 @@
<idVisit>27</idVisit>
<visitIp>2003:f6:93bf:26f:9ec7:a6ff:fe29:27df</visitIp>
- <fingerprint>b6f1d5120b2b15a2</fingerprint>
+ <fingerprint>47b25ed9972126db</fingerprint>
<actionDetails>
<row>
<type>action</type>
@@ -4214,7 +4214,7 @@
<idVisit>26</idVisit>
<visitIp>137.82.0.0</visitIp>
- <fingerprint>31ea532c06bf48a0</fingerprint>
+ <fingerprint>02bc7f4e9b9d3069</fingerprint>
<actionDetails>
<row>
<type>action</type>
@@ -4986,7 +4986,7 @@
<idVisit>25</idVisit>
<visitIp>137.82.0.0</visitIp>
- <fingerprint>31ea532c06bf48a0</fingerprint>
+ <fingerprint>02bc7f4e9b9d3069</fingerprint>
<actionDetails>
<row>
<type>action</type>
diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__API.getSuggestedValuesForSegment.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__API.getSuggestedValuesForSegment.xml
index 77a1416d61..53b737fd3a 100644
--- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__API.getSuggestedValuesForSegment.xml
+++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__API.getSuggestedValuesForSegment.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
+ <row>02bc7f4e9b9d3069</row>
<row>05f59d2b325126c8</row>
<row>0fc8a7b5c1071e7d</row>
<row>17b5ac19cce8a192</row>
<row>289e2fcbb06929fa</row>
<row>28a7ee52024f3a89</row>
- <row>31ea532c06bf48a0</row>
<row>3e5f540b8952a4ab</row>
+ <row>47b25ed9972126db</row>
<row>65eefc1c2b3aa35c</row>
<row>85aaa85a2071daf5</row>
<row>9b641f2d195745f4</row>
<row>a36244db4114afa7</row>
- <row>b6f1d5120b2b15a2</row>
<row>cc20676f98f5d568</row>
<row>d5a95c7fe2a8286d</row>
<row>e61a3357f12d99f5</row>
diff --git a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__VisitsSummary.get_range.xml b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__VisitsSummary.get_range.xml
index d2daf5d2f8..18529da9ad 100644
--- a/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__VisitsSummary.get_range.xml
+++ b/plugins/API/tests/System/expected/test_AutoSuggestAPITest_fingerprint__VisitsSummary.get_range.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_visits>2</nb_visits>
- <nb_actions>6</nb_actions>
+ <nb_actions>5</nb_actions>
<nb_visits_converted>2</nb_visits_converted>
<bounce_count>1</bounce_count>
- <sum_visit_length>1623</sum_visit_length>
- <max_actions>5</max_actions>
+ <sum_visit_length>1622</sum_visit_length>
+ <max_actions>4</max_actions>
<bounce_rate>50%</bounce_rate>
- <nb_actions_per_visit>3</nb_actions_per_visit>
- <avg_time_on_site>812</avg_time_on_site>
+ <nb_actions_per_visit>2.5</nb_actions_per_visit>
+ <avg_time_on_site>811</avg_time_on_site>
</result> \ No newline at end of file
diff --git a/plugins/CustomVariables b/plugins/CustomVariables
-Subproject 26b5f6d98bf3a89e5ed11f40c94eee8491d6b08
+Subproject 1aee5523fb807e0d8a8cc5290e81133ca7dd563
diff --git a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getBrand_day.xml b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getBrand_day.xml
index 703ec64682..2bf75e28d9 100644
--- a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getBrand_day.xml
+++ b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getBrand_day.xml
@@ -24,7 +24,7 @@
</row>
<row>
<label>Unknown</label>
- <nb_uniq_visitors>2</nb_uniq_visitors>
+ <nb_uniq_visitors>3</nb_uniq_visitors>
<nb_visits>3</nb_visits>
<nb_actions>3</nb_actions>
<nb_users>0</nb_users>
diff --git a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getModel_day.xml b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getModel_day.xml
index 2d6509f655..1e4dc2c09c 100644
--- a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getModel_day.xml
+++ b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getModel_day.xml
@@ -44,7 +44,7 @@
</row>
<row>
<label>Unknown</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_uniq_visitors>2</nb_uniq_visitors>
<nb_visits>2</nb_visits>
<nb_actions>2</nb_actions>
<nb_users>0</nb_users>
diff --git a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml
index d959ebf6cb..6a22c1926e 100644
--- a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml
+++ b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml
@@ -46,7 +46,7 @@
</row>
<row>
<label>Unknown</label>
- <nb_uniq_visitors>1</nb_uniq_visitors>
+ <nb_uniq_visitors>2</nb_uniq_visitors>
<nb_visits>2</nb_visits>
<nb_actions>2</nb_actions>
<nb_users>0</nb_users>
diff --git a/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png b/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png
index bf3a20799c..d267226719 100644
--- a/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png
+++ b/plugins/Installation/tests/UI/expected-screenshots/Installation_js_tracking.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a6f5e6034ef4353021b67bee75de9d6ae942157d7216917bf8600602e35aa31f
-size 239288
+oid sha256:705ed714271df281728087c668dee48f4d5c4d05cc745059c3369d82574dca98
+size 240228
diff --git a/plugins/Live/templates/getLastVisitsStart.twig b/plugins/Live/templates/getLastVisitsStart.twig
index c0a380a501..a1b9c1f590 100644
--- a/plugins/Live/templates/getLastVisitsStart.twig
+++ b/plugins/Live/templates/getLastVisitsStart.twig
@@ -73,7 +73,7 @@
{% else %}
{% if action.url is defined and action.url is not empty %}
- <a href="{{ action.url|safelink|e('html_attr') }}" target="_blank">
+ <a href="{{ action.url|safelink|e('html_attr') }}" target="_blank" rel="noreferrer noopener">
{% endif %}
{% if action.type == 'action' %}
{# white spacing matters as Chrome tooltip display whitespaces #}
@@ -131,4 +131,4 @@ $(function () {
});
});
</script>
-{% endif %} \ No newline at end of file
+{% endif %}
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index aa26ed0406..a340368d41 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -9,6 +9,8 @@
namespace Piwik\Plugins\Login;
use Exception;
+use Piwik\Access;
+use Piwik\Auth\Password;
use Piwik\Common;
use Piwik\Config;
use Piwik\Container\StaticContainer;
@@ -18,6 +20,7 @@ use Piwik\Nonce;
use Piwik\Piwik;
use Piwik\Plugins\Login\Security\BruteForceDetection;
use Piwik\Plugins\UsersManager\Model AS UsersModel;
+use Piwik\Plugins\UsersManager\UserUpdater;
use Piwik\QuickForm2;
use Piwik\Session;
use Piwik\Url;
@@ -30,6 +33,8 @@ use Piwik\View;
*/
class Controller extends \Piwik\Plugin\ControllerAdmin
{
+ const NONCE_CONFIRMRESETPASSWORD = 'loginConfirmResetPassword';
+
/**
* @var PasswordResetter
*/
@@ -424,25 +429,49 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
*/
public function confirmResetPassword()
{
+ if (!Url::isValidHost()) {
+ throw new Exception("Cannot confirm reset password with untrusted hostname!");
+ }
+
$errorMessage = null;
+ $passwordHash = null;
- $login = Common::getRequestVar('login', '');
- $resetToken = Common::getRequestVar('resetToken', '');
+ $login = Common::getRequestVar('login');
+ $resetToken = Common::getRequestVar('resetToken');
try {
- $this->passwordResetter->confirmNewPassword($login, $resetToken);
+ $passwordHash = $this->passwordResetter->checkValidConfirmPasswordToken($login, $resetToken);
} catch (Exception $ex) {
Log::debug($ex);
$errorMessage = $ex->getMessage();
}
- if (is_null($errorMessage)) { // if success, show login w/ success message
- return $this->resetPasswordSuccess();
- } else {
- // show login page w/ error. this will keep the token in the URL
+ if (!empty($errorMessage)) {
return $this->login($errorMessage);
}
+
+ if (!empty($_POST['nonce'])
+ && !empty($_POST['mtmpasswordconfirm'])
+ && !empty($resetToken)
+ && !empty($login)
+ && !empty($passwordHash)
+ && empty($errorMessage)) {
+ Nonce::checkNonce(self::NONCE_CONFIRMRESETPASSWORD, $_POST['nonce']);
+ if ($this->passwordResetter->doesResetPasswordHashMatchesPassword($_POST['mtmpasswordconfirm'], $passwordHash)) {
+ $this->passwordResetter->setHashedPasswordForLogin($login, $passwordHash);
+ return $this->resetPasswordSuccess();
+ } else {
+ $errorMessage = Piwik::translate('Login_ConfirmPasswordResetWrongPassword');
+ }
+ }
+
+ $nonce = Nonce::getNonce(self::NONCE_CONFIRMRESETPASSWORD);
+
+ return $this->renderTemplateAs('confirmResetPassword', array(
+ 'nonce' => $nonce,
+ 'errorMessage' => $errorMessage
+ ), 'basic');
}
/**
@@ -452,6 +481,7 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
*/
public function resetPasswordSuccess()
{
+ $_POST = array(); // prevent showing error message username and password is missing
return $this->login($errorMessage = null, $infoMessage = Piwik::translate('Login_PasswordChanged'));
}
diff --git a/plugins/Login/PasswordResetter.php b/plugins/Login/PasswordResetter.php
index e9ce0d75f6..9c706440f9 100644
--- a/plugins/Login/PasswordResetter.php
+++ b/plugins/Login/PasswordResetter.php
@@ -191,20 +191,7 @@ class PasswordResetter
}
}
- /**
- * Confirms a password reset. This should be called after {@link initiatePasswordResetProcess()}
- * is called.
- *
- * This method will get the new password associated with a reset token and set it
- * as the specified user's password.
- *
- * @param string $login The login of the user whose password is being reset.
- * @param string $resetToken The generated string token contained in the reset password
- * email.
- * @throws Exception If there is no user with login '$login', if $resetToken is not a
- * valid token or if the token has expired.
- */
- public function confirmNewPassword($login, $resetToken)
+ public function checkValidConfirmPasswordToken($login, $resetToken)
{
// get password reset info & user info
$user = self::getUserInformation($login);
@@ -224,15 +211,32 @@ class PasswordResetter
// check that the stored password hash is valid (sanity check)
$resetPassword = $resetInfo['hash'];
+
$this->checkPasswordHash($resetPassword);
- // reset password of user
- $usersManager = $this->usersManagerApi;
- Access::doAsSuperUser(function () use ($usersManager, $user, $resetPassword) {
+ return $resetPassword;
+ }
+
+ /**
+ * Confirms a password reset. This should be called after {@link initiatePasswordResetProcess()}
+ * is called.
+ *
+ * This method will get the new password associated with a reset token and set it
+ * as the specified user's password.
+ *
+ * @param string $login The login of the user whose password is being reset.
+ * @param string $passwordHash The generated string token contained in the reset password
+ * email.
+ * @throws Exception If there is no user with login '$login', if $resetToken is not a
+ * valid token or if the token has expired.
+ */
+ public function setHashedPasswordForLogin($login, $passwordHash)
+ {
+ Access::doAsSuperUser(function () use ($login, $passwordHash) {
$userUpdater = new UserUpdater();
$userUpdater->updateUserWithoutCurrentPassword(
- $user['login'],
- $resetPassword,
+ $login,
+ $passwordHash,
$email = false,
$isPasswordHashed = true
);
@@ -293,6 +297,12 @@ class PasswordResetter
return $token;
}
+ public function doesResetPasswordHashMatchesPassword($passwordPlain, $passwordHash)
+ {
+ $passwordPlain = UsersManager::getPasswordHash($passwordPlain);
+ return $this->passwordHelper->verify($passwordPlain, $passwordHash);
+ }
+
/**
* Generates a hash using a hash "identifier" and some data to hash. The hash identifier is
* a string that differentiates the hash in some way.
diff --git a/plugins/Login/lang/en.json b/plugins/Login/lang/en.json
index d13dffbca8..8b72632048 100644
--- a/plugins/Login/lang/en.json
+++ b/plugins/Login/lang/en.json
@@ -20,6 +20,9 @@
"SettingBruteForceMaxFailedLoginsHelp": "If more than this number of failed logins are recorded within the time range configured below, block the IP.",
"SettingBruteForceTimeRange": "Count login retries within this time range in minutes",
"SettingBruteForceTimeRangeHelp": "Enter a number in minutes.",
+ "ConfirmPasswordReset": "Confirm password reset",
+ "ConfirmPasswordResetIntro": "To confirm it is really you who requested this password change, please enter your new password again.",
+ "ConfirmPasswordResetWrongPassword": "The entered password does not match your new password. If you don't remember your newly chosen password you can reset your password again. If you didn't request the password change, simply do nothing and your password won't be changed.",
"LoginNotAllowedBecauseBlocked": "You are currently not allowed to log in because you had too many failed logins, try again later.",
"CurrentlyBlockedIPs": "Currently blocked IPs",
"IPsAlwaysBlocked": "These IPs are always blocked",
diff --git a/plugins/Login/templates/confirmResetPassword.twig b/plugins/Login/templates/confirmResetPassword.twig
new file mode 100644
index 0000000000..4abb1b82dd
--- /dev/null
+++ b/plugins/Login/templates/confirmResetPassword.twig
@@ -0,0 +1,45 @@
+{% extends '@Login/loginLayout.twig' %}
+
+{% set title %}{{ 'Login_ConfirmPasswordToContinue'|translate }}{% endset %}
+
+{% block loginContent %}
+ <div class="contentForm loginForm confirmPasswordForm">
+ {% embed 'contentBlock.twig' with {'title': ('Login_ConfirmPasswordReset'|translate)} %}
+ {% block content %}
+ <p>{{ 'Login_ConfirmPasswordResetIntro'|translate }}</p>
+
+ <div class="message_container">
+ {% if errorMessage is not empty %}
+ <div piwik-notification
+ noclear="true"
+ context="error">
+ <strong>{{ 'General_Error'|translate }}</strong>: {{ errorMessage }}<br/>
+ </div>
+ {% endif %}
+ </div>
+ <br>
+
+ <form action="{{ linkTo({'module': 'Login', 'action': 'confirmResetPassword'}) }}" ng-non-bindable method="post">
+ <div class="row">
+ <div class="col s12 input-field">
+ <input type="hidden" name="nonce" value="{{ nonce }}"/>
+ <input type="password" placeholder="" name="mtmpasswordconfirm" id="mtmpasswordconfirm" class="input" value="" size="20"
+ autocorrect="off" autocapitalize="none"
+ tabindex="20" />
+ <label for="mtmpasswordconfirm"><i class="icon-locked icon"></i> {{ 'Login_NewPassword'|translate }}</label>
+ </div>
+ </div>
+
+ <div class="row actions">
+ <div class="col s12">
+ <input class="submit btn" id='login_reset_confirm' type="submit" value="{{ 'General_Confirm'|translate }}"
+ tabindex="100"/>
+ </div>
+ </div>
+
+ </form>
+ {% endblock %}
+ {% endembed %}
+ </div>
+
+{% endblock %} \ No newline at end of file
diff --git a/plugins/Login/tests/Integration/PasswordResetterTest.php b/plugins/Login/tests/Integration/PasswordResetterTest.php
index fe6f3f0b31..b600d031c4 100644
--- a/plugins/Login/tests/Integration/PasswordResetterTest.php
+++ b/plugins/Login/tests/Integration/PasswordResetterTest.php
@@ -54,19 +54,7 @@ class PasswordResetterTest extends IntegrationTestCase
public function test_passwordReset_processWorksAsExpected()
{
- $user = $this->userModel->getUser('superUserLogin');
- $password = $user['password'];
- $passwordModified = $user['ts_password_modified'];
-
- $this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
-
- $this->assertNotEmpty($this->capturedToken);
-
- $user = $this->userModel->getUser('superUserLogin');
- $this->assertEquals($password, $user['password']);
- $this->assertEquals($passwordModified, $user['ts_password_modified']);
-
- $this->passwordResetter->confirmNewPassword('superUserLogin', $this->capturedToken);
+ $this->passwordResetter->setHashedPasswordForLogin('superUserLogin', $this->capturedToken);
$this->checkPasswordIs(self::NEWPASSWORD);
}
@@ -118,6 +106,9 @@ class PasswordResetterTest extends IntegrationTestCase
Option::set($optionName, json_encode($data));
+ $this->assertTrue($this->passwordResetter->doesResetPasswordHashMatchesPassword(self::NEWPASSWORD, $data['hash']));
+ $this->assertFalse($this->passwordResetter->doesResetPasswordHashMatchesPassword('foobar', $data['hash']));
+
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$optionName = $this->passwordResetter->getPasswordResetInfoOptionName('superUserLogin');
@@ -134,7 +125,7 @@ class PasswordResetterTest extends IntegrationTestCase
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$this->assertNotEmpty($this->capturedToken);
- $this->passwordResetter->confirmNewPassword('superUserLogin', $this->capturedToken);
+ $this->passwordResetter->checkValidConfirmPasswordToken('superUserLogin', $this->capturedToken);
$this->checkPasswordIs(self::NEWPASSWORD);
sleep(1);
@@ -143,7 +134,7 @@ class PasswordResetterTest extends IntegrationTestCase
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', 'anotherpassword');
$this->assertNotEquals($oldCapturedToken, $this->capturedToken);
- $this->passwordResetter->confirmNewPassword('superUserLogin', $oldCapturedToken);
+ $this->passwordResetter->checkValidConfirmPasswordToken('superUserLogin', $oldCapturedToken);
}
public function test_passwordReset_shouldNeverGenerateTheSameToken()
@@ -172,7 +163,7 @@ class PasswordResetterTest extends IntegrationTestCase
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$this->assertNotEquals($oldCapturedToken, $this->capturedToken);
- $this->passwordResetter->confirmNewPassword('superUserLogin', $oldCapturedToken);
+ $this->passwordResetter->checkValidConfirmPasswordToken('superUserLogin', $oldCapturedToken);
}
/**
diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js
index 28f4020b20..89fc353559 100644
--- a/plugins/Login/tests/UI/Login_spec.js
+++ b/plugins/Login/tests/UI/Login_spec.js
@@ -149,7 +149,7 @@ describe("Login", function () {
expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset');
});
- it("should reset password when password reset link is clicked", async function() {
+ it("should show reset password confirmation page when password reset link is clicked", async function() {
var expectedMailOutputFile = PIWIK_INCLUDE_PATH + '/tmp/Login.resetPassword.mail.json',
fileContents = require("fs").readFileSync(expectedMailOutputFile),
mailSent = JSON.parse(fileContents),
@@ -163,6 +163,15 @@ describe("Login", function () {
await page.goto(resetUrl);
await page.waitForNetworkIdle();
+ expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset_confirm');
+ });
+
+ it("should reset password when password reset link is clicked", async function() {
+
+ await page.type("#mtmpasswordconfirm", "superUserPass2");
+ await page.click("#login_reset_confirm");
+ await page.waitForNetworkIdle();
+
expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset_complete');
});
diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png
new file mode 100644
index 0000000000..5cbabdf2f9
--- /dev/null
+++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ec46909c1a4f613f345285313d8b3b41fc446d123bddc096a2d45759f2c14c0b
+size 34444
diff --git a/plugins/Morpheus/templates/javascriptCode.twig b/plugins/Morpheus/templates/javascriptCode.twig
index dfa863d0d2..20780230d2 100644
--- a/plugins/Morpheus/templates/javascriptCode.twig
+++ b/plugins/Morpheus/templates/javascriptCode.twig
@@ -1,6 +1,6 @@
<!-- Matomo -->
<script type="text/javascript">
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
{$options} _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -9,7 +9,7 @@
{$optionsBeforeTrackerUrl}_paq.push(['setTrackerUrl', u+'{$matomoPhpFilename}']);
_paq.push(['setSiteId', '{$idSite}']);
{% if loadAsync %}var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'{$matomoJsFilename}'; s.parentNode.insertBefore(g,s);{% endif %}
+ g.type='text/javascript'; g.async=true; g.src=u+'{$matomoJsFilename}'; s.parentNode.insertBefore(g,s);{% endif %}
})();
</script>
diff --git a/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getImageTrackingCode.xml b/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getImageTrackingCode.xml
index a4f8633329..0c3bab6d2e 100644
--- a/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getImageTrackingCode.xml
+++ b/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getImageTrackingCode.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo Image Tracker--&gt;
-&lt;img referrerpolicy="no-referrer-when-downgrade" src=&quot;http://http://example.org/piwik/matomo.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0&quot; alt=&quot;&quot; /&gt;
+&lt;img referrerpolicy=&quot;no-referrer-when-downgrade&quot; src=&quot;http://http://example.org/piwik/matomo.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0&quot; alt=&quot;&quot; /&gt;
&lt;!-- End Matomo --&gt;</result> \ No newline at end of file
diff --git a/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getJavascriptTag.xml b/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getJavascriptTag.xml
index 17afa1ddc3..2ed83de275 100644
--- a/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getJavascriptTag.xml
+++ b/plugins/SitesManager/tests/System/expected/test_SitesManager_after3_7_0__SitesManager.getJavascriptTag.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -10,7 +10,7 @@
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
diff --git a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getImageTrackingCode.xml b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getImageTrackingCode.xml
index 86650d8ab1..f961aa82ed 100644
--- a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getImageTrackingCode.xml
+++ b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getImageTrackingCode.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo Image Tracker--&gt;
-&lt;img referrerpolicy="no-referrer-when-downgrade" src=&quot;http://http://example.org/piwik/piwik.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0&quot; alt=&quot;&quot; /&gt;
+&lt;img referrerpolicy=&quot;no-referrer-when-downgrade&quot; src=&quot;http://http://example.org/piwik/piwik.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0&quot; alt=&quot;&quot; /&gt;
&lt;!-- End Matomo --&gt;</result> \ No newline at end of file
diff --git a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getJavascriptTag.xml b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getJavascriptTag.xml
index 2c0a7d1cf9..f18e88255b 100644
--- a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getJavascriptTag.xml
+++ b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0__SitesManager.getJavascriptTag.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -10,7 +10,7 @@
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
diff --git a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getImageTrackingCode.xml b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getImageTrackingCode.xml
index a4f8633329..0c3bab6d2e 100644
--- a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getImageTrackingCode.xml
+++ b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getImageTrackingCode.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo Image Tracker--&gt;
-&lt;img referrerpolicy="no-referrer-when-downgrade" src=&quot;http://http://example.org/piwik/matomo.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0&quot; alt=&quot;&quot; /&gt;
+&lt;img referrerpolicy=&quot;no-referrer-when-downgrade&quot; src=&quot;http://http://example.org/piwik/matomo.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0&quot; alt=&quot;&quot; /&gt;
&lt;!-- End Matomo --&gt;</result> \ No newline at end of file
diff --git a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getJavascriptTag.xml b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getJavascriptTag.xml
index 17afa1ddc3..2ed83de275 100644
--- a/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getJavascriptTag.xml
+++ b/plugins/SitesManager/tests/System/expected/test_SitesManager_prior3_7_0_but_forced__SitesManager.getJavascriptTag.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -10,7 +10,7 @@
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 5286973b84..1b64000e23 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -179,7 +179,13 @@ class API extends \Piwik\Plugin\API
}
/**
- * Sets a user preference
+ * Sets a user preference. Plugins can add custom preference names by declaring them in their plugin config/config.php
+ * like this:
+ *
+ * ```php
+ * return array('usersmanager.user_preference_names' => DI\add(array('preference_name_1', 'preference_name_2')));
+ * ```
+ *
* @param string $userLogin
* @param string $preferenceName
* @param string $preferenceValue
@@ -188,7 +194,17 @@ class API extends \Piwik\Plugin\API
public function setUserPreference($userLogin, $preferenceName, $preferenceValue)
{
Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);
- Option::set($this->getPreferenceId($userLogin, $preferenceName), $preferenceValue);
+
+ if (!$this->model->userExists($userLogin)) {
+ throw new Exception('User does not exist: ' . $userLogin);
+ }
+
+ if ($userLogin === 'anonymous') {
+ Piwik::checkUserHasSuperUserAccess();
+ }
+
+ $nameIfSupported = $this->getPreferenceId($userLogin, $preferenceName);
+ Option::set($nameIfSupported, $preferenceValue);
}
/**
@@ -267,6 +283,18 @@ class API extends \Piwik\Plugin\API
if(false !== strpos($preference, self::OPTION_NAME_PREFERENCE_SEPARATOR)) {
throw new Exception("Preference name cannot contain underscores.");
}
+ $names = array(
+ self::PREFERENCE_DEFAULT_REPORT,
+ self::PREFERENCE_DEFAULT_REPORT_DATE,
+ 'isLDAPUser', // used in loginldap
+ 'hideSegmentDefinitionChangeMessage',// used in JS
+ );
+ $customPreferences = StaticContainer::get('usersmanager.user_preference_names');
+
+ if (!in_array($preference, $names, true)
+ && !in_array($preference, $customPreferences, true)) {
+ throw new Exception('Not supported preference name: ' . $preference);
+ }
return $login . self::OPTION_NAME_PREFERENCE_SEPARATOR . $preference;
}
diff --git a/plugins/UsersManager/config/config.php b/plugins/UsersManager/config/config.php
index d266508bcd..4463e40397 100644
--- a/plugins/UsersManager/config/config.php
+++ b/plugins/UsersManager/config/config.php
@@ -1,2 +1,4 @@
<?php
-return array();
+return array(
+ 'usersmanager.user_preference_names' => []
+);
diff --git a/plugins/UsersManager/tests/Integration/APITest.php b/plugins/UsersManager/tests/Integration/APITest.php
index e69da89f95..dcc235a563 100644
--- a/plugins/UsersManager/tests/Integration/APITest.php
+++ b/plugins/UsersManager/tests/Integration/APITest.php
@@ -12,7 +12,6 @@ use Piwik\Access\Role\View;
use Piwik\Access\Role\Write;
use Piwik\Auth\Password;
use Piwik\Config;
-use Piwik\Container\StaticContainer;
use Piwik\Mail;
use Piwik\Option;
use Piwik\Piwik;
@@ -203,7 +202,7 @@ class APITest extends IntegrationTestCase
public function test_getAllUsersPreferences_isEmpty_whenNoPreferenceAndMultipleRequested()
{
- $preferences = $this->api->getAllUsersPreferences(array('preferenceName', 'otherOne'));
+ $preferences = $this->api->getAllUsersPreferences(array('preferenceName', 'randomDoesNotExist'));
$this->assertEmpty($preferences);
}
@@ -254,24 +253,24 @@ class APITest extends IntegrationTestCase
$user2 = 'userLogin2';
$user3 = 'userLogin3';
$this->api->addUser($user2, 'password', 'userlogin2@password.de');
- $this->api->setUserPreference($user2, 'myPreferenceName', 'valueForUser2');
+ $this->api->setUserPreference($user2, API::PREFERENCE_DEFAULT_REPORT, 'valueForUser2');
$this->api->setUserPreference($user2, 'RandomNOTREQUESTED', 'RandomNOTREQUESTED');
$this->api->addUser($user3, 'password', 'userlogin3@password.de');
- $this->api->setUserPreference($user3, 'myPreferenceName', 'valueForUser3');
- $this->api->setUserPreference($user3, 'otherPreferenceHere', 'otherPreferenceVALUE');
+ $this->api->setUserPreference($user3, API::PREFERENCE_DEFAULT_REPORT, 'valueForUser3');
+ $this->api->setUserPreference($user3, API::PREFERENCE_DEFAULT_REPORT_DATE, 'otherPreferenceVALUE');
$this->api->setUserPreference($user3, 'RandomNOTREQUESTED', 'RandomNOTREQUESTED');
$expected = array(
$user2 => array(
- 'myPreferenceName' => 'valueForUser2'
+ API::PREFERENCE_DEFAULT_REPORT => 'valueForUser2'
),
$user3 => array(
- 'myPreferenceName' => 'valueForUser3',
- 'otherPreferenceHere' => 'otherPreferenceVALUE',
+ API::PREFERENCE_DEFAULT_REPORT => 'valueForUser3',
+ API::PREFERENCE_DEFAULT_REPORT_DATE => 'otherPreferenceVALUE',
),
);
- $result = $this->api->getAllUsersPreferences(array('myPreferenceName', 'otherPreferenceHere', 'randomDoesNotExist'));
+ $result = $this->api->getAllUsersPreferences(array(API::PREFERENCE_DEFAULT_REPORT, API::PREFERENCE_DEFAULT_REPORT_DATE, 'randomDoesNotExist'));
$this->assertSame($expected, $result);
}
@@ -280,15 +279,15 @@ class APITest extends IntegrationTestCase
{
$user2 = 'user_Login2';
$this->api->addUser($user2, 'password', 'userlogin2@password.de');
- $this->api->setUserPreference($user2, 'myPreferenceName', 'valueForUser2');
- $this->api->setUserPreference($user2, 'RandomNOTREQUESTED', 'RandomNOTREQUESTED');
+ $this->api->setUserPreference($user2, API::PREFERENCE_DEFAULT_REPORT, 'valueForUser2');
+ $this->api->setUserPreference($user2, API::PREFERENCE_DEFAULT_REPORT_DATE, 'RandomNOTREQUESTED');
$expected = array(
$user2 => array(
- 'myPreferenceName' => 'valueForUser2'
+ API::PREFERENCE_DEFAULT_REPORT => 'valueForUser2'
),
);
- $result = $this->api->getAllUsersPreferences(array('myPreferenceName', 'otherPreferenceHere', 'randomDoesNotExist'));
+ $result = $this->api->getAllUsersPreferences(array(API::PREFERENCE_DEFAULT_REPORT, 'randomDoesNotExist'));
$this->assertSame($expected, $result);
}
@@ -1016,6 +1015,7 @@ class APITest extends IntegrationTestCase
{
return array(
'Piwik\Access' => new FakeAccess(),
+ 'usersmanager.user_preference_names' => \DI\add(['randomDoesNotExist', 'RandomNOTREQUESTED', 'preferenceName']),
'observers.global' => \DI\add([
['Access.Capability.addCapabilities', function (&$capabilities) {
$capabilities[] = new TestCap1();
diff --git a/plugins/UsersManager/tests/Integration/UserPreferencesTest.php b/plugins/UsersManager/tests/Integration/UserPreferencesTest.php
index d7a442065f..bf17cf688e 100644
--- a/plugins/UsersManager/tests/Integration/UserPreferencesTest.php
+++ b/plugins/UsersManager/tests/Integration/UserPreferencesTest.php
@@ -36,6 +36,38 @@ class UserPreferencesTest extends IntegrationTestCase
$this->userPreferences = new UserPreferences();
$this->setSuperUser();
+
+ $identity = FakeAccess::$identity;
+ FakeAccess::$identity = 'foo'; // avoids error user already exists when it doesn't
+ APIUsersManager::getInstance()->addUser($identity, '22111214k4,mdw<L', 'foo@example.com');
+ FakeAccess::$identity = $identity;
+ }
+
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage User does not exist
+ */
+ public function test_getDefaultReport_WhenLoginNotExists()
+ {
+ APIUsersManager::getInstance()->setUserPreference(
+ 'foo',
+ APIUsersManager::PREFERENCE_DEFAULT_REPORT,
+ '1'
+ );
+ }
+
+
+ /**
+ * @expectedException \Exception
+ * @expectedExceptionMessage Not supported preference name
+ */
+ public function test_getDefaultReport_WhenWrongPreference()
+ {
+ APIUsersManager::getInstance()->setUserPreference(
+ Piwik::getCurrentUserLogin(),
+ 'foo',
+ '1'
+ );
}
public function test_getDefaultReport_ShouldReturnFalseByDefault()
diff --git a/tests/PHPUnit/Integration/OptionTest.php b/tests/PHPUnit/Integration/OptionTest.php
index b487f4f939..dfc279d7ba 100644
--- a/tests/PHPUnit/Integration/OptionTest.php
+++ b/tests/PHPUnit/Integration/OptionTest.php
@@ -175,4 +175,37 @@ class OptionTest extends IntegrationTestCase
Option::deleteLike("%\\_defaultReport");
$this->assertSame('0', Option::get('adefaultReport'));
}
+
+ public function testDeleteLike_underscoreNotWildcard()
+ {
+ // insert guard - to test unescaped underscore
+ Option::set('adefaultReport', '1', true);
+
+ Option::deleteLike("adefaul_Report"); // the underscore should not match a character
+ $this->assertSame('1', Option::get('adefaultReport'));
+ }
+
+ public function testGetLike()
+ {
+ Option::set('adefaultReport', '1', true);
+ Option::set('adefaultRepo', '1', true);
+ Option::set('adefaultRepppppppport', '1', true);
+
+ $values = Option::getLike("adefaultRepo%"); // the underscore should not match a character
+ $this->assertSame(array(
+ 'adefaultRepo' => '1',
+ 'adefaultReport' => '1'
+ ), $values);
+ }
+
+ public function testGetLike_underscoreNotWildcard()
+ {
+ // insert guard - to test unescaped underscore
+ Option::set('adefaultReport', '1', true);
+
+ $values = Option::getLike("adefaul_Report"); // the underscore should not match a character
+ $this->assertSame(array(), $values);
+ $values = Option::getLike("adefaul%Report");
+ $this->assertSame(array('adefaultReport' => '1'), $values);
+ }
}
diff --git a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
index e0d72dd5ae..47f6c5d54b 100644
--- a/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
+++ b/tests/PHPUnit/Integration/Tracker/TrackerCodeGeneratorTest.php
@@ -41,7 +41,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
_paq.push([\"setCookieDomain\", \"*.localhost\"]);
@@ -62,7 +62,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;noscript&gt;&lt;p&gt;&lt;img src=&quot;//piwik-server/piwik/matomo.php?idsite=1&amp;amp;rec=1&quot; style=&quot;border:0;&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;&lt;/noscript&gt;
@@ -80,7 +80,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -89,7 +89,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
@@ -118,7 +118,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);" . ($this->hasCustomVariables() ? "
// you can set up to 5 custom variables for each visitor
@@ -136,7 +136,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
@@ -165,7 +165,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);" . ($this->hasCustomVariables() ? "
// you can set up to 5 custom variables for each visitor
@@ -184,7 +184,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
@@ -209,7 +209,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = "&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\"setDocumentTitle\", document.domain + \"/\" + document.title]);
_paq.push(['trackPageView']);
@@ -246,7 +246,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = '&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);' . ($this->hasCustomVariables() ? '
// you can set up to 5 custom variables for each visitor
@@ -262,7 +262,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push([\'setTrackerUrl\', u+\'matomo.php\']);
_paq.push([\'setSiteId\', \'1\']);
var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];
- g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'matomo.js\'; s.parentNode.insertBefore(g,s);
+ g.type=\'text/javascript\'; g.async=true; g.src=u+\'matomo.js\'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
@@ -280,7 +280,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
$expected = '&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push([\'trackPageView\']);
_paq.push([\'enableLinkTracking\']);
@@ -289,7 +289,7 @@ class TrackerCodeGeneratorTest extends IntegrationTestCase
_paq.push([\'setTrackerUrl\', u+\'matomo.php\']);
_paq.push([\'setSiteId\', \'1\']);
var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];
- g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src=u+\'matomo.js\'; s.parentNode.insertBefore(g,s);
+ g.type=\'text/javascript\'; g.async=true; g.src=u+\'matomo.js\'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
diff --git a/tests/PHPUnit/System/expected/test_Archive_InvalidationWebsite2_NewDataShouldAppear__Actions.getPageUrls_month.xml b/tests/PHPUnit/System/expected/test_Archive_InvalidationWebsite2_NewDataShouldAppear__Actions.getPageUrls_month.xml
index ba5fa49ea6..154dd2715e 100644
--- a/tests/PHPUnit/System/expected/test_Archive_InvalidationWebsite2_NewDataShouldAppear__Actions.getPageUrls_month.xml
+++ b/tests/PHPUnit/System/expected/test_Archive_InvalidationWebsite2_NewDataShouldAppear__Actions.getPageUrls_month.xml
@@ -34,7 +34,7 @@
<entry_nb_actions>18</entry_nb_actions>
<entry_sum_visit_length>2</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
- <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
+ <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors>
<sum_daily_entry_nb_uniq_visitors>2</sum_daily_entry_nb_uniq_visitors>
<avg_time_on_page>0</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
@@ -51,7 +51,7 @@
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth />
<max_bandwidth />
- <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
+ <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors>
<avg_time_on_page>0</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
@@ -67,7 +67,7 @@
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth />
<max_bandwidth />
- <sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
+ <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
<avg_time_on_page>0</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
@@ -101,7 +101,7 @@
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth />
<max_bandwidth />
- <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
+ <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors>
<avg_bandwidth>0</avg_bandwidth>
<avg_page_load_time>0</avg_page_load_time>
<avg_time_on_page>0</avg_time_on_page>
@@ -119,7 +119,7 @@
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth />
<max_bandwidth />
- <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
+ <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors>
<avg_bandwidth>0</avg_bandwidth>
<avg_page_load_time>0</avg_page_load_time>
<avg_time_on_page>0</avg_time_on_page>
@@ -155,7 +155,7 @@
<min_bandwidth />
<max_bandwidth />
<exit_nb_visits>2</exit_nb_visits>
- <sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
+ <sum_daily_nb_uniq_visitors>3</sum_daily_nb_uniq_visitors>
<sum_daily_exit_nb_uniq_visitors>2</sum_daily_exit_nb_uniq_visitors>
<avg_time_on_page>0</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml
index 920abd9f87..cc59d5cde4 100644
--- a/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml
+++ b/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml
@@ -1806,7 +1806,7 @@
<idVisit>43</idVisit>
<visitIp>0.0.0.0</visitIp>
- <fingerprint>e8e54c258f211e0c</fingerprint>
+ <fingerprint>17d589ebdc2ca70b</fingerprint>
<actionDetails>
<row>
<type>action</type>
diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_pageurlNotContainsSegment__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_pageurlNotContainsSegment__Live.getLastVisitsDetails_month.xml
index 01d74e6651..887c043ac5 100644
--- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_pageurlNotContainsSegment__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_pageurlNotContainsSegment__Live.getLastVisitsDetails_month.xml
@@ -1409,7 +1409,7 @@
<idVisit>27</idVisit>
<visitIp>2003:f6:93bf:26f:9ec7:a6ff:fe29:27df</visitIp>
- <fingerprint>b6f1d5120b2b15a2</fingerprint>
+ <fingerprint>47b25ed9972126db</fingerprint>
<actionDetails>
<row>
<type>action</type>
diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
index 17afa1ddc3..2ed83de275 100644
--- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
+++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata_year__SitesManager.getJavascriptTag.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>&lt;!-- Matomo --&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
- var _paq = window._paq || [];
+ var _paq = window._paq = window._paq || [];
/* tracker methods like &quot;setCustomDimension&quot; should be called before &quot;trackPageView&quot; */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
@@ -10,7 +10,7 @@
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
&lt;/script&gt;
&lt;!-- End Matomo Code --&gt;
diff --git a/tests/PHPUnit/Unit/NonceTest.php b/tests/PHPUnit/Unit/NonceTest.php
index 46f1685503..9020257f31 100644
--- a/tests/PHPUnit/Unit/NonceTest.php
+++ b/tests/PHPUnit/Unit/NonceTest.php
@@ -24,9 +24,9 @@ class NonceTest extends \PHPUnit\Framework\TestCase
{
return array(
// HTTP_HOST => expected
- array('example.com', array('http://example.com', 'https://example.com')),
- array('example.com:80', array('http://example.com', 'https://example.com')),
- array('example.com:443', array('http://example.com', 'https://example.com')),
+ array('example.com', array('http://example.com', 'https://example.com', 'http://example.com:80', 'https://example.com:443', )),
+ array('example.com:80', array('http://example.com', 'https://example.com', 'http://example.com:80', 'https://example.com:80')),
+ array('example.com:443', array('http://example.com', 'https://example.com', 'https://example.com:443')),
array('example.com:8080', array('http://example.com', 'https://example.com', 'http://example.com:8080', 'https://example.com:8080')),
);
}
diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
index b0916a114a..5cb4e0c7c7 100644
--- a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
+++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c567275eb5dc4db269eae11f0e3db50efd4d9e274eca647a84e0e48043753fc7
-size 300986
+oid sha256:0216d21836034495908026a050a7806f849c473dfdffc7a2cbaaa4da589b0c69
+size 301455
diff --git a/tests/UI/expected-screenshots/OneClickUpdate_login.png b/tests/UI/expected-screenshots/OneClickUpdate_login.png
index 8bd34e7e7e..d8998e265b 100644
--- a/tests/UI/expected-screenshots/OneClickUpdate_login.png
+++ b/tests/UI/expected-screenshots/OneClickUpdate_login.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:81ba1bdb476809879d37e8fc05cc4fc09225cfff24f3de7efc1c39181fd514d8
-size 268589
+oid sha256:e4aa7576288c90312d52fe0348812888283b4736bb41d34093d56a4d8c99f402
+size 268933
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
index 3dde1b33bf..745a249b9d 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8bcaedd927c9fff0659e8f0f67b92106bb88cb5583608e5ef08761f2055dc3a6
-size 440607
+oid sha256:343e58c0da95c3430fd38a7a5b1924dc71ab1164d66743a32483925c6c37851f
+size 441065
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index bcc39a36f3..0753337864 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -47,6 +47,9 @@ function getContentToken() {
function getHeartbeatToken() {
return "<?php $token = md5(uniqid(mt_rand(), true)); echo $token; ?>";
}
+function getCookieConsentToken() {
+ return "<?php $token = md5(uniqid(mt_rand(), true)); echo $token; ?>";
+}
function getConsentToken() {
return "<?php $token = md5(uniqid(mt_rand(), true)); echo $token; ?>";
}
@@ -530,7 +533,9 @@ function PiwikTest() {
// we fix the line numbers so they match to the line numbers in ../../js/piwik.js
JSLINT.errors.forEach( function (item, index) {
- item.line += countOfLinesRemoved;
+ if (item) {
+ item.line += countOfLinesRemoved;
+ }
console.log(item);
});
@@ -2070,7 +2075,7 @@ function PiwikTest() {
});
test("API methods", function() {
- expect(111);
+ expect(118);
equal( typeof Piwik.addPlugin, 'function', 'addPlugin' );
equal( typeof Piwik.addPlugin, 'function', 'addTracker' );
@@ -2101,6 +2106,7 @@ function PiwikTest() {
equal( typeof tracker.resetUserId, 'function', 'resetUserId' );
equal( typeof tracker.setUserId, 'function', 'setUserId' );
equal( typeof tracker.setSiteId, 'function', 'setSiteId' );
+ equal( typeof tracker.setVisitorId, 'function', 'setVisitorId' );
equal( typeof tracker.setCustomData, 'function', 'setCustomData' );
equal( typeof tracker.getCustomData, 'function', 'getCustomData' );
equal( typeof tracker.setCustomRequestProcessing, 'function', 'setCustomRequestProcessing' );
@@ -2165,7 +2171,13 @@ function PiwikTest() {
equal( typeof tracker.disableQueueRequest, 'function', 'disableQueueRequest' );
equal( typeof tracker.setRequestQueueInterval, 'function', 'setRequestQueueInterval' );
equal( typeof tracker.disableCookies, 'function', 'disableCookies' );
+ equal( typeof tracker.setCookieConsentGiven, 'function', 'setCookieConsentGiven' );
+ equal( typeof tracker.areCookiesEnabled, 'function', 'areCookiesEnabled' );
equal( typeof tracker.deleteCookies, 'function', 'deleteCookies' );
+ equal( typeof tracker.requireCookieConsent, 'function', 'requireCookieConsent' );
+ equal( typeof tracker.getRememberedCookieConsent, 'function', 'getRememberedCookieConsent' );
+ equal( typeof tracker.rememberCookieConsentGiven, 'function', 'rememberCookieConsentGiven' );
+ equal( typeof tracker.forgetCookieConsentGiven, 'function', 'forgetCookieConsentGiven' );
// content
equal( typeof tracker.trackAllContentImpressions, 'function', 'trackAllContentImpressions' );
equal( typeof tracker.trackVisibleContentImpressions, 'function', 'trackVisibleContentImpressions' );
@@ -3115,7 +3127,7 @@ function PiwikTest() {
}
test("User ID and Visitor UUID", function() {
- expect(27);
+ expect(28);
deleteCookies();
var userIdString = 'userid@mydomain.org';
@@ -3141,6 +3153,11 @@ function PiwikTest() {
var visitorId = tracker.getVisitorId();
equal(visitorId, tracker.getVisitorId(), "Visitor ID is the same when called multiple times");
+ tracker.setVisitorId('invalid'); // invalid characters
+ tracker.setVisitorId('012345abc'); // too short
+ tracker.setVisitorId('');
+ equal(visitorId, tracker.getVisitorId(), "Visitor ID is not updated when invalid");
+
// Check that setting an empty user id will not change the visitor ID
var userId = '';
equal(userId, tracker.getUserId(), "by default user ID is set to empty string");
@@ -4810,7 +4827,7 @@ if ($mysql) {
});
test("Test API - consent", function() {
- expect(29);
+ expect(34);
var queue;
var tracker = Piwik.getTracker();
@@ -4820,8 +4837,12 @@ if ($mysql) {
strictEqual(tracker.getRememberedConsent(), null, "getConsentRequestsQueue, does not return consent cookie content as no consent given" );
strictEqual(tracker.hasConsent(), true, "hasConsent, assumes consent by default" );
- ok(!tracker.isConsentRequired(), 'by default consent is not required')
+ ok(!tracker.isConsentRequired(), 'by default consent is not required');
+ ok(tracker.areCookiesEnabled(), 'by default cookies are enabled');
tracker.requireConsent();
+ ok(!tracker.areCookiesEnabled(), 'require consent disables cookies');
+
+
ok(tracker.isConsentRequired(), 'consent is required after requiring it')
deepEqual(tracker.getConsentRequestsQueue(), [], "getConsentRequestsQueue, still empty after requiring consent" );
@@ -4841,7 +4862,10 @@ if ($mysql) {
strictEqual(tracker.hasRememberedConsent(), false, "getConsentRequestsQueue, has not remembered consent" );
strictEqual(tracker.getRememberedConsent(), null, "getConsentRequestsQueue, does not return consent cookie content as no consent given" );
+ tracker.requireConsent();
+ ok(!tracker.areCookiesEnabled(), 'after requiring consent, cookies are disabled');
tracker.rememberConsentGiven();
+ ok(tracker.areCookiesEnabled(), 'remember cookie consent enables cookies');
strictEqual(tracker.hasRememberedConsent(), true, "rememberConsentGiven, sets cookie to remember consent" );
var rememberedConsent = tracker.getRememberedConsent();
@@ -4869,7 +4893,8 @@ if ($mysql) {
var results = fetchTrackedRequests(getConsentToken() + '1');
strictEqual(true, results.indexOf('myFoo=bar&baz=1') > 0, "setConsentGiven does replay all queued requests" );
strictEqual(true, results.indexOf('myFoo=bar&baz=2') > 0, "setConsentGiven does replay all queued requests" );
- strictEqual(2, (results.match(/consent=1/g) || []).length, "consent=1 parameter appears in URL when explicit consent given");
+ strictEqual(true, results.indexOf('ping=1') > 0, "setConsentGiven does replay all queued requests" );// sent when enabling cookies as part of setConsentGiven. Called twice in total
+ strictEqual(4, (results.match(/consent=1/g) || []).length, "consent=1 parameter appears in URL when explicit consent given");
var results2 = fetchTrackedRequests(getConsentToken() + '2');
strictEqual(true, results2.indexOf('myFoo=bar&baz=3') > 0, "normal request" );
@@ -4878,6 +4903,49 @@ if ($mysql) {
}, 2000);
});
+ test("Test API - cookie consent", function() {
+ expect(16);
+
+ var queue;
+ var tracker = Piwik.getTracker();
+ tracker.setCustomData('token', getCookieConsentToken() + '1');
+ strictEqual(tracker.areCookiesEnabled(), true, "areCookiesEnabled, enabled by default" );
+ strictEqual(tracker.getRememberedCookieConsent(), 0, "getRememberedCookieConsent, not set by default" );
+
+ var success = tracker.requireCookieConsent();
+ ok(success, 'cookies were disabled after calling requireCookieConsent');
+ ok(!tracker.areCookiesEnabled(), 'disabling cookies disables cookies');
+
+ tracker.setCookieConsentGiven();
+ ok(tracker.areCookiesEnabled(), 'setCookieConsentGiven enables cookies');
+
+ tracker.rememberCookieConsentGiven();
+ var nowBefore = new Date().getTime() - 10000;
+ var nowAfter = new Date().getTime() + 10000;
+ var timeConsentGiven = tracker.getRememberedCookieConsent();
+ ok(timeConsentGiven && nowBefore < timeConsentGiven && nowAfter > timeConsentGiven, "getRememberedCookieConsent, returns time was given" );
+
+ success = tracker.requireCookieConsent();
+ ok(!success, 'cookies were not disabled because consent was remembered')
+ ok(tracker.areCookiesEnabled(), 'disableCookies wont disable cookies if cookie consent was remembered');
+
+ tracker.forgetCookieConsentGiven();
+ ok(!tracker.areCookiesEnabled(), 'forgetCookieConsentGiven will disable cookies');
+
+ tracker.setCookieConsentGiven();
+ ok(tracker.areCookiesEnabled(), 'cookies can be enabled again after forgetting cookies');
+
+ tracker.requireCookieConsent();
+ ok(!tracker.areCookiesEnabled(), 'requireCookieConsent works after forgetting cookies');
+
+ tracker.rememberCookieConsentGiven();
+ ok(tracker.areCookiesEnabled(), 'cookies are enabled before disabling it');
+
+ tracker.disableCookies();
+ ok(!tracker.areCookiesEnabled(), 'disable cookies always disables cookies');
+ tracker.forgetCookieConsentGiven();
+ });
+
test("Test API - optOut (via consent feature)", function () {
expect(9);