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:
authordizzy <diosmosis@users.noreply.github.com>2021-12-15 20:26:05 +0300
committerGitHub <noreply@github.com>2021-12-15 20:26:05 +0300
commitad62f307b0f007fc7fbc6f150ed63478c308c88f (patch)
tree404e47a707731a7374001b739916d11e82444548
parent8fb83ba71dfa1de1eabd0f4abd651c9d6b4b4710 (diff)
[Vue] add site selector model adapter and fix siteselector.vue bug (#18431)
* revert debugging change + fix issue * built vue files * fix another select issue * rebuild vue files * fix broken refactor * update two screenshots * add some more timeouts and update screenshots * initial conversion, loading w/o error * tweaks * get period selector work in UI * fix site selector model binding * rebuild vue * fix viewDate not being kept in sync * rebuild CoreHome * [Vue] fix modal notification placement (#18377) * Use separate div in modals to display notifications otherwise Vue will erase modal content when initializing NotificationGroup component. * built vue files * two fixes * couple UI test fixes * rebuild vue * update files * sidenav start * make getRef a utility method * tweak * add return type * finish converting side-nav directive * starting on reporting menu conversion * remove unused properties * convert reporting pages service * migrate report metadata store * remove angularjs files * migrating reporting pages store * make store adapters more immutable * get service adapters to work * fix a UI test * another html fix * migrate most of reporting menu directive and model * Use themed font family for input forms to override materialize.css styling * rebuild vue * add a missing div * ui test fixes * update styling * get to build * get to load in the UI w/o error * clone result of functions * fix compile issue * migrate widget loader and get to load in UI * rebuild vue * migrate widgetcontainer * migrate widget bydimension container * migrate widget + add tooltips directive * quick fix * Updating version to 4.6.0 * loading in page * update expected screenshot * add wait just in case travis is slow * fix ordering bug * add another wait * rebuild vue * css tweak * fix some bugs and tests * undo screenshot changes * Menus test passing locally * [Vue] date picker viewDate property is not kept up to date (#18385) * viewDate ref is not kept up to date * rebuild corehome * reporting menu subcategory items are meant to be normal links * update some screenshots * use innerText instead of text() since angularjs maintains newlines in HTML that vue does not add * trigger angularjs digest after ajaxhelper request * rebuild vue * update screenshots, fix bug in link generation in reporting menu and allow syncing multiple screenshot regexes at a time * undo box-shadow change for UI tests * fix more issues & update more tests * update some screenshots * fix some tests * rebuild CoreHome * quick fix * built vue files * fix angularjs issue * add comment * update umd files * 4.6.1-rc1 * 4.6.1 * fix field array title * apply some pr feedback * apply more pr feedback * another fix * tweak * fix ng-change not executed before ng-model * fix another set of issues * fix another issue * rebuild vue * better ng-change/ng-model fix * update some screenshots * rebuild vue * remove some TODOs * initiate initial ng-change ONLY for site selectors where this behavior applies * emit/broadcast on correct scope in wrapper * rebuild vue * fix some issues * couple more fixes * fix another title issue * rebuild vue * do not report on ajax errors in notifications if not logged in * migrate reporting page and model * rebuild vue * create sites selector model adapter * fix siteselector vue bug, initial site is only set if there is just one site available * rebuild vue * fix a bunch of bugs * fix another widget bug * built vue files * fix function signature * fix vue warning * fix ajax request race condition * rebuild vue * add new notification type "help" so the help notification is not cleared when clearing transient notifications * fix some bugs and tests * update screenshot * update screenshot & fix a test * allow using unminified jquery ui + fix bug in last fix * fix error when enrichedheadline is used in modal * add polyfill min.js * remove two todos * fix widget url logic * update some screenshots and fix sanitization/escape issue * update screenshots * rebuild vue * fix url location updating regression in MatomoUrl.updateLocation use * submodule * update screenshots and fix possible error in json parse * built vue files * Merge branch 'vue-period-selector-regression' into vue-reporting-menu * rebuild vue * use correct variable * rebuild vue * fix widget url logic * segment parameter can be undefined now for some reason * fix ngmodel binding in siteselector adapter (for last time hopefully) * the original site selector only set the first site to the first site in the initial sites query if there was only one site in the entire matomo instance * fix sitesmanager ui test failure * fix usersettings test failure * rebuild vue * more siteselector tweaks. * build CoreHome * more siteselector tweaks. * another siteselector issue * update screenshots * update screenshot and try to fix random failure * fix some issues in widget.vue when containerid is specified * fix couple tests * fix several test failures * fix test failure * extra change * fix last change and random failure * styling fix * fix last fix * real fix this time * fix stray request * proper fix * update build files * try to fix random failure * update screenshots * post loadPage event after url changes so URL changes are propagated properly to widgets, take columns param into account when re-rendering a page * Update ReportingMenu.vue merge conflicts * revert invalid UI file changes * fix two regressions in period selector comparison launching/detection (#18497) * forward compareSegments in when applying period selector change + check if comparing periods in period selector * built vue files * fix piwik-widget selector in dataTable.js * remove space * extra scope apply after hash change so angularjs notices, change css class to use kebab case, check for field using css class as well in Widget.vue * rebuild vue * built vue files * try to fix random failure * fix order of JS in karma tests * remove empty props * use promise chaining Co-authored-by: Justin Velluppillai <justin@innocraft.com> Co-authored-by: justinvelluppillai <justinvelluppillai@users.noreply.github.com> Co-authored-by: Matthieu Aubry <mattab@users.noreply.github.com> Co-authored-by: Peter Zhang <peter@innocraft.com> Co-authored-by: sgiehl <stefan@matomo.org>
-rw-r--r--plugins/CoreHome/CoreHome.php3
-rw-r--r--plugins/CoreHome/angularjs/siteselector/siteselector-model.service.js140
-rw-r--r--plugins/CoreHome/vue/dist/CoreHome.umd.js28
-rw-r--r--plugins/CoreHome/vue/dist/CoreHome.umd.min.js61
-rw-r--r--plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts24
-rw-r--r--plugins/CoreHome/vue/src/index.ts1
6 files changed, 87 insertions, 170 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 57ae291eec..76f2b7a3b1 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -247,9 +247,6 @@ class CoreHome extends \Piwik\Plugin
$jsFiles[] = "plugins/CoreHome/angularjs/content-table/content-table.directive.js";
- // TODO: [Vue] used by RollUpReporting, has to be kept for now.
- $jsFiles[] = "plugins/CoreHome/angularjs/siteselector/siteselector-model.service.js";
-
// we have to load these CoreAdminHome files here. If we loaded them in CoreAdminHome,
// there would be JS errors as CoreAdminHome is loaded first. Meaning it is loaded before
// any angular JS file is loaded etc.
diff --git a/plugins/CoreHome/angularjs/siteselector/siteselector-model.service.js b/plugins/CoreHome/angularjs/siteselector/siteselector-model.service.js
deleted file mode 100644
index eb10cd4235..0000000000
--- a/plugins/CoreHome/angularjs/siteselector/siteselector-model.service.js
+++ /dev/null
@@ -1,140 +0,0 @@
-/*!
- * Matomo - free/libre analytics platform
- *
- * @link https://matomo.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */
-(function () {
- angular.module('piwikApp').factory('siteSelectorModel', siteSelectorModel);
-
- siteSelectorModel.$inject = ['piwikApi', '$filter', 'piwik', '$q'];
-
- /**
- * @deprecated kept for angularjs code that uses it.
- */
- function siteSelectorModel(piwikApi, $filter, piwik, $q) {
-
- var initialSites = null;
- var limitPromise = null;
-
- var model = {
- sites : [],
- hasMultipleWebsites : false,
- isLoading : false,
- firstSiteName : '',
- onlySitesWithAdminAccess: false,
- updateWebsitesList: updateWebsitesList,
- searchSite: searchSite,
- loadSite: loadSite,
- loadInitialSites: loadInitialSites,
- hasMultipleSites: hasMultipleSites
- };
-
- return model;
-
- function updateWebsitesList(sites) {
-
- if (!sites || !sites.length) {
- model.sites = [];
- return [];
- }
-
- angular.forEach(sites, function (site) {
- if (site.group) site.name = '[' + site.group + '] ' + site.name;
- });
-
- model.sites = sortSites(sites);
-
- if (!model.firstSiteName) {
- model.firstSiteName = model.sites[0].name;
- }
-
- model.hasMultipleWebsites = model.hasMultipleWebsites || sites.length > 1;
-
- return model.sites;
- }
-
- function searchSite(term) {
-
- if (!term) {
- loadInitialSites();
- return;
- }
-
- if (model.isLoading) {
- if (model.currentRequest) {
- model.currentRequest.abort();
- } else if (limitPromise) {
- limitPromise.abort();
- limitPromise = null;
- }
- }
-
- model.isLoading = true;
-
- if (!limitPromise) {
- limitPromise = piwikApi.fetch({method: 'SitesManager.getNumWebsitesToDisplayPerPage'});
- }
-
- return limitPromise.then(function (response) {
- var limit = response.value;
-
- var methodToCall = 'SitesManager.getPatternMatchSites';
- if (model.onlySitesWithAdminAccess) {
- methodToCall = 'SitesManager.getSitesWithAdminAccess';
- }
-
- model.currentRequest = piwikApi.fetch({
- method: methodToCall,
- limit: limit,
- pattern: term
- });
-
- return model.currentRequest;
- }).then(function (response) {
- if (angular.isDefined(response)) {
- return updateWebsitesList(response);
- }
- }).finally(function () {
- model.isLoading = false;
- model.currentRequest = null;
- });
- }
-
- function loadSite(idsite) {
- if (idsite == 'all') {
- document.location.href = piwikHelper.getCurrentQueryStringWithParametersModified(piwikHelper.getQueryStringFromParameters({
- module: 'MultiSites',
- action: 'index',
- date: piwik.currentDateString,
- period: piwik.period
- }));
- } else {
- piwik.broadcast.propagateNewPage('segment=&idSite=' + idsite, false);
- }
- }
-
- function sortSites(websites)
- {
- return $filter('orderBy')(websites, '+name');
- }
-
- function loadInitialSites() {
- if (initialSites) {
- model.sites = initialSites;
- var deferred = $q.defer();
- deferred.resolve();
- return deferred.promise;
- }
-
- return searchSite('%').then(function () {
- initialSites = model.sites;
- model.isInitialized = true
- });
- }
-
- function hasMultipleSites() {
- return initialSites && initialSites.length > 1;
- }
- }
-})();
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.js b/plugins/CoreHome/vue/dist/CoreHome.umd.js
index c089a82c99..cdd3ed924b 100644
--- a/plugins/CoreHome/vue/dist/CoreHome.umd.js
+++ b/plugins/CoreHome/vue/dist/CoreHome.umd.js
@@ -5829,6 +5829,33 @@ SiteSelectorvue_type_script_lang_ts.render = SiteSelectorvue_type_template_id_cc
}
}
}));
+// CONCATENATED MODULE: ./plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+
+
+function siteSelectorModelAdapter() {
+ return {
+ get initialSites() {
+ return SiteSelector_SitesStore.initialSites.value;
+ },
+
+ loadSite: SiteSelector_SitesStore.loadSite.bind(SiteSelector_SitesStore),
+ loadInitialSites: function loadInitialSites() {
+ return cloneThenApply(SiteSelector_SitesStore.loadInitialSites());
+ },
+ searchSite: function searchSite() {
+ return cloneThenApply(SiteSelector_SitesStore.searchSite.apply(SiteSelector_SitesStore, arguments));
+ }
+ };
+}
+
+angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter);
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreHome/vue/src/QuickAccess/QuickAccess.vue?vue&type=template&id=08fc9316
var QuickAccessvue_type_template_id_08fc9316_hoisted_1 = {
@@ -10384,6 +10411,7 @@ function deleteCookie(name) {
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
index 8203501def..5b713d3eb4 100644
--- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
+++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js
@@ -4,7 +4,7 @@
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"DirectiveUtilities",(function(){return Ze})),n.d(t,"debounce",(function(){return di})),n.d(t,"createAngularJsAdapter",(function(){return Bt})),n.d(t,"transformAngularJsBoolAttr",(function(){return At})),n.d(t,"transformAngularJsIntAttr",(function(){return xt})),n.d(t,"removeAngularJsSpecificProperties",(function(){return It})),n.d(t,"activityIndicatorAdapter",(function(){return gs})),n.d(t,"ActivityIndicator",(function(){return Ha})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return ws})),n.d(t,"AjaxHelper",(function(){return $e})),n.d(t,"setCookie",(function(){return js})),n.d(t,"getCookie",(function(){return ks})),n.d(t,"deleteCookie",(function(){return Ss})),n.d(t,"MatomoUrl",(function(){return Pe})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return G})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return le})),n.d(t,"Range",(function(){return F})),n.d(t,"format",(function(){return D})),n.d(t,"getToday",(function(){return P})),n.d(t,"parseDate",(function(){return E})),n.d(t,"todayIsInRange",(function(){return V})),n.d(t,"Dropdown",(function(){return He})),n.d(t,"FocusAnywhereButHere",(function(){return Ge})),n.d(t,"FocusIf",(function(){return Qe})),n.d(t,"MatomoDialog",(function(){return wt})),n.d(t,"ExpandOnClick",(function(){return ot})),n.d(t,"ExpandOnHover",(function(){return ft})),n.d(t,"SideNav",(function(){return gt})),n.d(t,"EnrichedHeadline",(function(){return nn})),n.d(t,"ContentBlock",(function(){return pn})),n.d(t,"Comparisons",(function(){return Zn})),n.d(t,"MenuDropdown",(function(){return mr})),n.d(t,"DatePicker",(function(){return Sr})),n.d(t,"DateRangePicker",(function(){return Tr})),n.d(t,"PeriodDatePicker",(function(){return xr})),n.d(t,"Notification",(function(){return Ao})),n.d(t,"NotificationGroup",(function(){return zo})),n.d(t,"NotificationsStore",(function(){return Uo})),n.d(t,"SiteSelector",(function(){return gi})),n.d(t,"QuickAccess",(function(){return xi})),n.d(t,"FieldArray",(function(){return Yi})),n.d(t,"MultiPairField",(function(){return ma})),n.d(t,"PeriodSelector",(function(){return ro})),n.d(t,"ReportingMenu",(function(){return Vc})),n.d(t,"ReportingPagesStore",(function(){return ec})),n.d(t,"ReportMetadataStore",(function(){return $c})),n.d(t,"WidgetsStore",(function(){return kc})),n.d(t,"WidgetLoader",(function(){return zc})),n.d(t,"WidgetContainer",(function(){return dl})),n.d(t,"WidgetByDimensionContainer",(function(){return Tl})),n.d(t,"Widget",(function(){return Hl})),n.d(t,"ReportingPage",(function(){return hs})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */window.hasBlockedContent=!1},"8bbf":function(t,n){t.exports=e},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"DirectiveUtilities",(function(){return Ze})),n.d(t,"debounce",(function(){return di})),n.d(t,"createAngularJsAdapter",(function(){return Bt})),n.d(t,"transformAngularJsBoolAttr",(function(){return At})),n.d(t,"transformAngularJsIntAttr",(function(){return xt})),n.d(t,"removeAngularJsSpecificProperties",(function(){return It})),n.d(t,"activityIndicatorAdapter",(function(){return vs})),n.d(t,"ActivityIndicator",(function(){return Fa})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return js})),n.d(t,"AjaxHelper",(function(){return $e})),n.d(t,"setCookie",(function(){return ks})),n.d(t,"getCookie",(function(){return Ss})),n.d(t,"deleteCookie",(function(){return Cs})),n.d(t,"MatomoUrl",(function(){return Pe})),n.d(t,"Matomo",(function(){return S})),n.d(t,"Periods",(function(){return p})),n.d(t,"Day",(function(){return G})),n.d(t,"Week",(function(){return X})),n.d(t,"Month",(function(){return re})),n.d(t,"Year",(function(){return le})),n.d(t,"Range",(function(){return F})),n.d(t,"format",(function(){return D})),n.d(t,"getToday",(function(){return P})),n.d(t,"parseDate",(function(){return E})),n.d(t,"todayIsInRange",(function(){return V})),n.d(t,"Dropdown",(function(){return He})),n.d(t,"FocusAnywhereButHere",(function(){return Ge})),n.d(t,"FocusIf",(function(){return Qe})),n.d(t,"MatomoDialog",(function(){return wt})),n.d(t,"ExpandOnClick",(function(){return ot})),n.d(t,"ExpandOnHover",(function(){return ft})),n.d(t,"SideNav",(function(){return gt})),n.d(t,"EnrichedHeadline",(function(){return nn})),n.d(t,"ContentBlock",(function(){return pn})),n.d(t,"Comparisons",(function(){return Zn})),n.d(t,"MenuDropdown",(function(){return mr})),n.d(t,"DatePicker",(function(){return Sr})),n.d(t,"DateRangePicker",(function(){return Tr})),n.d(t,"PeriodDatePicker",(function(){return xr})),n.d(t,"Notification",(function(){return xo})),n.d(t,"NotificationGroup",(function(){return Yo})),n.d(t,"NotificationsStore",(function(){return qo})),n.d(t,"SiteSelector",(function(){return gi})),n.d(t,"QuickAccess",(function(){return Mi})),n.d(t,"FieldArray",(function(){return Qi})),n.d(t,"MultiPairField",(function(){return ha})),n.d(t,"PeriodSelector",(function(){return io})),n.d(t,"ReportingMenu",(function(){return Tc})),n.d(t,"ReportingPagesStore",(function(){return tc})),n.d(t,"ReportMetadataStore",(function(){return Rc})),n.d(t,"WidgetsStore",(function(){return Sc})),n.d(t,"WidgetLoader",(function(){return Yc})),n.d(t,"WidgetContainer",(function(){return pl})),n.d(t,"WidgetByDimensionContainer",(function(){return Nl})),n.d(t,"Widget",(function(){return Fl})),n.d(t,"ReportingPage",(function(){return gs})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var a=n("8bbf");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
@@ -270,161 +270,168 @@ function vt(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={insta
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var li=function(){function e(){var t=this;ii(this,e),ci(this,"state",Object(a["reactive"])({initialSites:[],isInitialized:!1})),ci(this,"currentRequest",void 0),ci(this,"limitRequest",void 0),ci(this,"initialSites",Object(a["computed"])((function(){return Object(a["readonly"])(t.state.initialSites)})))}return oi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(a["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,e.state.initialSites=t,Object(a["readonly"])(t)}))}},{key:"loadSite",value:function(e){"all"===e?Pe.updateUrl(ri(ri({},Pe.urlParsed.value),{},{module:"MultiSites",action:"index",date:Pe.parsed.value.date,period:Pe.parsed.value.period})):Pe.updateUrl(ri(ri({},Pe.urlParsed.value),{},{segment:"",idSite:e}),ri(ri({},Pe.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequest&&this.currentRequest.abort(),this.limitRequest||(this.limitRequest=$e.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequest=$e.fetch({method:a,limit:i,pattern:e}),t.currentRequest})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequest=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return ri(ri({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),si=new li,ui=300;function di(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ui;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t&&clearTimeout(t),t=setTimeout((function(){e.apply(void 0,i)}),n)}}function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(n),!0).forEach((function(t){mi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hi=Object(a["defineComponent"])({props:{modelValue:{Object:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:ti},directives:{FocusAnywhereButHere:Ge,FocusIf:Qe},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:S.idSite,showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.helper.registerShortcut("w",t,(function(t){t.altKey||(t.preventDefault?t.preventDefault():t.returnValue=!1,e.$refs.selectorLink.click(),e.$refs.selectorLink.focus())}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return si.initialSites.value&&si.initialSites.value.length>1},firstSiteName:function(){var e=si.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Pe.stringify(fi(fi({},Pe.urlParsed.value),{},{module:"MultiSites",action:"index",date:Pe.parsed.value.date,period:Pe.parsed.value.period}));return"?".concat(e)}},created:function(){this.searchSite=di(this.searchSite.bind(this))},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({idsite:"all",name:this.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.idsite,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.idsite&&si.loadSite(e.idsite))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return si.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,si.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Pe.stringify(fi(fi({},Pe.urlParsed.value),{},{segment:"",idSite:e})),n=Pe.stringify(fi(fi({},Pe.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});hi.render=Kr;var gi=hi,vi=(Bt({component:gi,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,i,a,o){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&o((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),a&&(a.$setViewValue(e),a.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var o=i;t.$watch("value",(function(t){Object(a["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),o&&(o.$setViewValue(e.modelValue),o.$render=function(){Object(a["nextTick"])((function(){Object(a["nextTick"])((function(){angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue}))}))})}}),{ref:"root",class:"quickAccessInside"}),bi=["title"],yi={class:"dropdown"},Oi={class:"no-result"},wi=["onClick"],ji=["onMouseenter","onClick"],ki={class:"quickAccessMatomoSearch"},Si=["onMouseenter","onClick"],Ci=["textContent"],Di={class:"quick-access-category helpCategory"},Pi=["href"];
+ */var li=function(){function e(){var t=this;ii(this,e),ci(this,"state",Object(a["reactive"])({initialSites:[],isInitialized:!1})),ci(this,"currentRequest",void 0),ci(this,"limitRequest",void 0),ci(this,"initialSites",Object(a["computed"])((function(){return Object(a["readonly"])(t.state.initialSites)})))}return oi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(a["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,e.state.initialSites=t,Object(a["readonly"])(t)}))}},{key:"loadSite",value:function(e){"all"===e?Pe.updateUrl(ri(ri({},Pe.urlParsed.value),{},{module:"MultiSites",action:"index",date:Pe.parsed.value.date,period:Pe.parsed.value.period})):Pe.updateUrl(ri(ri({},Pe.urlParsed.value),{},{segment:"",idSite:e}),ri(ri({},Pe.hashParsed.value),{},{segment:"",idSite:e}))}},{key:"searchSite",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?(this.currentRequest&&this.currentRequest.abort(),this.limitRequest||(this.limitRequest=$e.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,a="SitesManager.getPatternMatchSites";return n&&(a="SitesManager.getSitesWithAdminAccess"),t.currentRequest=$e.fetch({method:a,limit:i,pattern:e}),t.currentRequest})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequest=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return ri(ri({},e),{},{name:e.group?"[".concat(e.group,"] ").concat(e.name):e.name})})),t.sort((function(e,t){return e.name.toLowerCase()<t.name.toLowerCase()?-1:e.name.toLowerCase()>t.name.toLowerCase()?1:0})),t):[]}}]),e}(),si=new li,ui=300;function di(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ui;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t&&clearTimeout(t),t=setTimeout((function(){e.apply(void 0,i)}),n)}}function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(n),!0).forEach((function(t){mi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hi=Object(a["defineComponent"])({props:{modelValue:{Object:Object,default:function(e){return e.modelValue?e.modelValue:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}},showSelectedSite:{type:Boolean,default:!1},showAllSitesItem:{type:Boolean,default:!0},switchSiteOnSelect:{type:Boolean,default:!0},onlySitesWithAdminAccess:{type:Boolean,default:!1},name:{type:String,default:""},allSitesText:{type:String,default:C("General_MultiSitesSummary")},allSitesLocation:{type:String,default:"bottom"},placeholder:String},emits:["update:modelValue","blur"],components:{AllSitesLink:ti},directives:{FocusAnywhereButHere:Ge,FocusIf:Qe},watch:{searchTerm:function(){this.onSearchTermChanged()}},data:function(){return{searchTerm:"",activeSiteId:S.idSite,showSitesList:!1,isLoading:!1,sites:[],autocompleteMinSites:parseInt(S.config.autocomplete_min_sites,10)}},mounted:function(){var e=this;window.initTopControls(),this.loadInitialSites().then((function(){e.modelValue&&e.modelValue.id||e.hasMultipleSites||!e.sites[0]||e.$emit("update:modelValue",{id:e.sites[0].idsite,name:e.sites[0].name})}));var t=C("CoreHome_ShortcutWebsiteSelector");S.helper.registerShortcut("w",t,(function(t){t.altKey||(t.preventDefault?t.preventDefault():t.returnValue=!1,e.$refs.selectorLink.click(),e.$refs.selectorLink.focus())}))},computed:{shouldFocusOnSearch:function(){return this.showSitesList&&this.autocompleteMinSites<=this.sites.length||this.searchTerm},selectorLinkTitle:function(){var e;return this.hasMultipleSites?C("CoreHome_ChangeCurrentWebsite",(null===(e=this.modelValue)||void 0===e?void 0:e.name)||this.firstSiteName):""},hasMultipleSites:function(){return si.initialSites.value&&si.initialSites.value.length>1},firstSiteName:function(){var e=si.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Pe.stringify(fi(fi({},Pe.urlParsed.value),{},{module:"MultiSites",action:"index",date:Pe.parsed.value.date,period:Pe.parsed.value.period}));return"?".concat(e)}},created:function(){this.searchSite=di(this.searchSite.bind(this))},methods:{onSearchTermChanged:function(){this.searchTerm?(this.isLoading=!0,this.searchSite(this.searchTerm)):(this.isLoading=!1,this.loadInitialSites())},onAllSitesClick:function(e){this.switchSite({idsite:"all",name:this.allSitesText},e),this.showSitesList=!1},switchSite:function(e,t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&n&&t.target&&t.target.href?window.open(t.target.href,"_blank"):(this.$emit("update:modelValue",{id:e.idsite,name:e.name}),this.switchSiteOnSelect&&this.activeSiteId!==e.idsite&&si.loadSite(e.idsite))},onBlur:function(){this.showSitesList=!1,this.$emit("blur")},onClickSelector:function(){this.hasMultipleSites&&(this.showSitesList=!this.showSitesList,this.isLoading||this.searchTerm||this.loadInitialSites())},onPressEnter:function(e){"Enter"===e.key&&(e.preventDefault(),this.showSitesList=!this.showSitesList,this.showSitesList&&!this.isLoading&&this.loadInitialSites())},getMatchedSiteName:function(e){var t=e.toUpperCase().indexOf(this.searchTerm.toUpperCase());if(-1===t||this.isLoading)return S.helper.htmlEntities(e);var n=S.helper.htmlEntities(e.substring(0,t)),r=S.helper.htmlEntities(e.substring(t+this.searchTerm.length));return"".concat(n,'<span class="autocompleteMatched">').concat(this.searchTerm,"</span>").concat(r)},loadInitialSites:function(){var e=this;return si.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,si.searchSite(e,this.onlySitesWithAdminAccess).then((function(n){e===t.searchTerm&&n&&(t.sites=n)})).finally((function(){t.isLoading=!1}))},getUrlForSiteId:function(e){var t=Pe.stringify(fi(fi({},Pe.urlParsed.value),{},{segment:"",idSite:e})),n=Pe.stringify(fi(fi({},Pe.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});hi.render=Kr;var gi=hi;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Ei(e,t,n,r,i,o){var c=Object(a["resolveDirective"])("focus-if"),l=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",vi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,544),[[a["vShow"],!(e.searchTerm||e.searchActive)]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle},null,40,bi),[[a["vModelText"],e.searchTerm],[c,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",yi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",Oi,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,wi),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,ji)})),128))])})),128)),Object(a["createElementVNode"])("ul",ki,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,Ci)],42,Si)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",Di,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["createElementVNode"])("a",{href:"https://matomo.org?s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Pi)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}function Vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vi(Object(n),!0).forEach((function(t){Ni(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ii(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.$(window).height()&&t.right<=window.$(window).width()}function Bi(e){e&&e.scrollIntoView&&e.scrollIntoView()}var Ai=Object(a["defineComponent"])({props:{},directives:{FocusAnywhereButHere:Ge,FocusIf:Qe},watch:{searchActive:function(e){var t=this.$refs.root.parentElement.classList;t.toggle("active",e),t.toggle("expanded",e)}},mounted:function(){var e=this;this.$refs.root.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),Bi(e.$refs.root),e.activateSearch())}))},data:function(){var e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created:function(){this.searchMenu=di(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,i=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||i&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.root.querySelector("input").blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!Ii(e)&&Bi(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");return e&&e.length&&e.item(this.searchIndex)?e.item(this.searchIndex):null},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,i={},a=[],o=function(e){var t=Ti({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,si.searchSite(n).then((function(e){t.sites=e})).finally((function(){t.isLoading=!1})));var c=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var l=this.topMenuItems.filter(c),s=this.leftMenuItems.filter(c),u=this.segmentItems.filter(c);l.forEach(o),s.forEach(o),u.forEach(o),this.numMenuItems=l.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){si.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i=r.textContent.trim();i||(i=r.getAttribute("title").trim()),i&&(n.push({name:i,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r=window.$(n).find("> .item");r=r[0]?r[0].innerText.trim():"",r&&-1!==r.lastIndexOf("\n")&&(r=r.substr(0,r.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,i){var a=i.textContent.trim();a&&(t.push({name:a,category:r,index:e.menuIndexCounter+=1}),i.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i=r.querySelector(".segname").textContent.trim();i&&(n.push({name:i,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});Ai.render=Ei;var xi=Ai;
+ */Bt({component:gi,require:"?ngModel",scope:{showSelectedSite:{angularJsBind:"="},showAllSitesItem:{angularJsBind:"="},switchSiteOnSelect:{angularJsBind:"="},onlySitesWithAdminAccess:{angularJsBind:"="},name:{angularJsBind:"@"},allSitesText:{angularJsBind:"@"},allSitesLocation:{angularJsBind:"@"},placeholder:{angularJsBind:"@"},modelValue:{default:function(e,t,n){return n.siteid&&n.sitename?{id:n.siteid,name:S.helper.htmlDecode(n.sitename)}:S.idSite?{id:S.idSite,name:S.helper.htmlDecode(S.siteName)}:void 0}}},$inject:["$timeout"],directiveName:"piwikSiteselector",events:{"update:modelValue":function(e,t,n,r,i,a,o){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&o((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),a&&(a.$setViewValue(e),a.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var o=i;t.$watch("value",(function(t){Object(a["nextTick"])((function(){t!==e.modelValue&&(e.modelValue=t)}))})),r.siteid&&r.sitename?e.modelValue={id:r.siteid,name:S.helper.htmlDecode(r.sitename)}:S.idSite&&(e.modelValue={id:S.idSite,name:S.helper.htmlDecode(S.siteName)}),o&&(o.$setViewValue(e.modelValue),o.$render=function(){Object(a["nextTick"])((function(){Object(a["nextTick"])((function(){angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue}))}))})}});
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */Bt({component:xi,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,a,o){o()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function Mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Li={class:"fieldArray form-group"},$i={key:0,class:"fieldUiControl"},Ri=["onClick","title"];function Hi(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Li,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",Mi({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$i,[Object(a["createVNode"])(c,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n)},null,8,["model-value","options","onUpdate:modelValue","uicontrol","title","name"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Ri),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function Fi(e){return Wi(e)||qi(e)||Ui(e)||_i()}function _i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ui(e,t){if(e){if("string"===typeof e)return Ji(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ji(e,t):void 0}}function qi(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Wi(e){if(Array.isArray(e))return Ji(e)}function Ji(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gi=Zt("CorePluginsAdmin","Field"),zi=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:Gi},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&""===e.slice(-1)[0]||this.$emit("update:modelValue",[].concat(Fi(e||[]),[""]))},onEntryChange:function(e,t){var n=Fi(this.modelValue);n[t]=e,this.$emit("update:modelValue",n)},removeEntry:function(e){if(e>-1){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});zi.render=Hi;var Yi=zi;
+ */
+function vi(){return{get initialSites(){return si.initialSites.value},loadSite:si.loadSite.bind(si),loadInitialSites:function(){return Lt(si.loadInitialSites())},searchSite:function(){return Lt(si.searchSite.apply(si,arguments))}}}angular.module("piwikApp.service").factory("siteSelectorModel",vi);var bi={ref:"root",class:"quickAccessInside"},yi=["title"],Oi={class:"dropdown"},wi={class:"no-result"},ji=["onClick"],ki=["onMouseenter","onClick"],Si={class:"quickAccessMatomoSearch"},Ci=["onMouseenter","onClick"],Di=["textContent"],Pi={class:"quick-access-category helpCategory"},Ei=["href"];function Vi(e,t,n,r,i,o){var c=Object(a["resolveDirective"])("focus-if"),l=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",bi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,544),[[a["vShow"],!(e.searchTerm||e.searchActive)]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"s",onKeydown:t[1]||(t[1]=function(t){return e.onKeypress(t)}),onFocus:t[2]||(t[2]=function(t){return e.searchActive=!0}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),type:"text",tabindex:"2",title:e.quickAccessTitle},null,40,yi),[[a["vModelText"],e.searchTerm],[c,{},e.searchActive]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Oi,[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",wi,Object(a["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[a["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menuItems,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",{key:t.title},[Object(a["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(a["toDisplayString"])(t.title),9,ji),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.items,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:t.menuIndex===e.searchIndex}]),onMouseenter:function(n){return e.searchIndex=t.menuIndex},onClick:function(n){return e.selectMenuItem(t.index)},key:t.index},[Object(a["createElementVNode"])("a",null,Object(a["toDisplayString"])(t.name.trim()),1)],42,ki)})),128))])})),128)),Object(a["createElementVNode"])("ul",Si,[Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(a["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[a["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("li",{class:"no-result"},Object(a["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[a["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(t,n){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["result",{selected:e.numMenuItems+n===e.searchIndex}]),onMouseenter:function(t){return e.searchIndex=e.numMenuItems+n},onClick:function(n){return e.selectSite(t.idsite)},key:t.idsite},[Object(a["createElementVNode"])("a",{textContent:Object(a["toDisplayString"])(t.name)},null,8,Di)],42,Ci)),[[a["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(a["createElementVNode"])("ul",null,[Object(a["createElementVNode"])("li",Pi,Object(a["toDisplayString"])(e.translate("General_HelpResources")),1),Object(a["createElementVNode"])("li",{class:Object(a["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(a["createElementVNode"])("a",{href:"https://matomo.org?s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(a["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Ei)],34)])],512),[[a["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ni(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ti(Object(n),!0).forEach((function(t){Ii(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ii(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bi(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.$(window).height()&&t.right<=window.$(window).width()}function Ai(e){e&&e.scrollIntoView&&e.scrollIntoView()}var xi=Object(a["defineComponent"])({props:{},directives:{FocusAnywhereButHere:Ge,FocusIf:Qe},watch:{searchActive:function(e){var t=this.$refs.root.parentElement.classList;t.toggle("active",e),t.toggle("expanded",e)}},mounted:function(){var e=this;this.$refs.root.parentElement.classList.add("quick-access","piwikSelector"),"undefined"!==typeof window.initTopControls&&window.initTopControls&&window.initTopControls(),S.helper.registerShortcut("f",C("CoreHome_ShortcutSearch"),(function(t){t.altKey||(t.preventDefault(),Ai(e.$refs.root),e.activateSearch())}))},data:function(){var e=!!document.querySelector(".segmentEditorPanel");return{menuItems:[],numMenuItems:0,searchActive:!1,searchTerm:"",searchIndex:0,menuIndexCounter:-1,topMenuItems:null,leftMenuItems:null,segmentItems:null,hasSegmentSelector:e,sites:[],isLoading:!1}},created:function(){this.searchMenu=di(this.searchMenu.bind(this))},computed:{hasSitesSelector:function(){return!!document.querySelector(".top_controls [piwik-siteselector]")},quickAccessTitle:function(){var e="",t=[C("CoreHome_MenuEntries")];this.hasSegmentSelector&&t.push(C("CoreHome_Segments")),this.hasSitesSelector&&t.push(C("SitesManager_Sites"));while(t.length)e+=t.shift(),t.length>=2?e+=", ":1===t.length&&(e+=" ".concat(C("General_And")," "));return C("CoreHome_QuickAccessTitle",e)}},emits:["itemSelected","blur"],methods:{onKeypress:function(e){var t=this,n=this.searchTerm&&this.searchActive,r=9===e.which,i=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():r&&n||i&&n?this.deactivateSearch():setTimeout((function(){t.searchActive=!0,t.searchMenu(t.searchTerm)}))},highlightPreviousItem:function(){this.searchIndex-1<0?this.searchIndex=0:this.searchIndex-=1,this.makeSureSelectedItemIsInViewport()},highlightNextItem:function(){var e=this.$refs.root.querySelectorAll("li.result").length;e<=this.searchIndex+1?this.searchIndex=e-1:this.searchIndex+=1,this.makeSureSelectedItemIsInViewport()},clickQuickAccessMenuItem:function(){var e=this,t=this.getCurrentlySelectedElement();t&&setTimeout((function(){t.click(),e.$emit("itemSelected",t)}),20)},deactivateSearch:function(){this.searchTerm="",this.searchActive=!1,this.$refs.root.querySelector("input").blur()},makeSureSelectedItemIsInViewport:function(){var e=this.getCurrentlySelectedElement();e&&!Bi(e)&&Ai(e)},getCurrentlySelectedElement:function(){var e=this.$refs.root.querySelectorAll("li.result");return e&&e.length&&e.item(this.searchIndex)?e.item(this.searchIndex):null},searchMenu:function(e){var t=this,n=e.toLowerCase(),r=-1,i={},a=[],o=function(e){var t=Ni({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(a.push({title:n,items:[]}),i[n]=a.length-1);var o=i[n];a[o].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,si.searchSite(n).then((function(e){t.sites=e})).finally((function(){t.isLoading=!1})));var c=function(e){return-1!==e.name.toLowerCase().indexOf(n)||-1!==e.category.toLowerCase().indexOf(n)};null===this.topMenuItems&&(this.topMenuItems=this.getTopMenuItems()),null===this.leftMenuItems&&(this.leftMenuItems=this.getLeftMenuItems()),null===this.segmentItems&&(this.segmentItems=this.getSegmentItems());var l=this.topMenuItems.filter(c),s=this.leftMenuItems.filter(c),u=this.segmentItems.filter(c);l.forEach(o),s.forEach(o),u.forEach(o),this.numMenuItems=l.length+s.length+u.length,this.menuItems=a},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){si.loadSite(e)},selectMenuItem:function(e){var t=document.querySelector("[quick_access='".concat(e,"']"));if(t){this.deactivateSearch();var n=t.getAttribute("href");if(n&&n.length>10&&t&&t.click)try{t.click()}catch(r){window.$(t).click()}else window.$(t).click()}},onBlur:function(){this.searchActive=!1,this.$emit("blur")},activateSearch:function(){this.searchActive=!0},getTopMenuItems:function(){var e=this,t=C("CoreHome_Menu"),n=[];return document.querySelectorAll("nav .sidenav li > a").forEach((function(r){var i=r.textContent.trim();i||(i=r.getAttribute("title").trim()),i&&(n.push({name:i,index:e.menuIndexCounter+=1,category:t}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n},getLeftMenuItems:function(){var e=this,t=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach((function(n){var r=window.$(n).find("> .item");r=r[0]?r[0].innerText.trim():"",r&&-1!==r.lastIndexOf("\n")&&(r=r.substr(0,r.lastIndexOf("\n")).trim()),window.$(n).find("li .item").each((function(n,i){var a=i.textContent.trim();a&&(t.push({name:a,category:r,index:e.menuIndexCounter+=1}),i.setAttribute("quick_access","".concat(e.menuIndexCounter)))}))})),t},getSegmentItems:function(){var e=this;if(!this.hasSegmentSelector)return[];var t=C("CoreHome_Segments"),n=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach((function(r){var i=r.querySelector(".segname").textContent.trim();i&&(n.push({name:i,category:t,index:e.menuIndexCounter+=1}),r.setAttribute("quick_access","".concat(e.menuIndexCounter)))})),n}}});xi.render=Vi;var Mi=xi;
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */Bt({component:Mi,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,a,o){o()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function Li(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $i={class:"fieldArray form-group"},Ri={key:0,class:"fieldUiControl"},Hi=["onClick","title"];function Fi(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$i,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",Li({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ri,[Object(a["createVNode"])(c,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":function(t){return e.onEntryChange(t,n)},placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:"".concat(e.name,"-").concat(n)},null,8,["model-value","options","onUpdate:modelValue","uicontrol","title","name"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Hi),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function _i(e){return Ji(e)||Wi(e)||qi(e)||Ui()}function Ui(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function qi(e,t){if(e){if("string"===typeof e)return Gi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,t):void 0}}function Wi(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ji(e){if(Array.isArray(e))return Gi(e)}function Gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zi=Zt("CorePluginsAdmin","Field"),Yi=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:zi},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&""===e.slice(-1)[0]||this.$emit("update:modelValue",[].concat(_i(e||[]),[""]))},onEntryChange:function(e,t){var n=_i(this.modelValue);n[t]=e,this.$emit("update:modelValue",n)},removeEntry:function(e){if(e>-1){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}}}});Yi.render=Fi;var Qi=Yi;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */Bt({component:Yi,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Qi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ki={class:"multiPairField form-group"},Xi={key:1,class:"fieldUiControl fieldUiControl2"},Zi={key:2,class:"fieldUiControl fieldUiControl3"},ea={key:3,class:"fieldUiControl fieldUiControl4"},ta=["onClick","title"];function na(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ki,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Qi(r,"multiPairFieldTable".concat(n),!0),Qi(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(c,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xi,[Object(a["createVNode"])(c,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Zi,[Object(a["createVNode"])(c,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ea,[Object(a["createVNode"])(c,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ta),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach((function(t){aa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oa(e){return ua(e)||sa(e)||la(e)||ca()}function ca(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function la(e,t){if(e){if("string"===typeof e)return da(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0}}function sa(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ua(e){if(Array.isArray(e))return da(e)}function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var pa=Zt("CorePluginsAdmin","Field"),fa=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:pa},computed:{fieldCount:function(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(oa(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=oa(this.modelValue);r[e]=ia(ia({},r[e]),{},aa({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-1){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});fa.render=na;var ma=fa,ha=(Bt({component:ma,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),ga=["title"],va=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),ba={id:"periodMore",class:"dropdown"},ya={class:"flex"},Oa={key:0,class:"period-date"},wa={class:"period-type"},ja={id:"otherPeriods"},ka=["onDblclick","title"],Sa=["id","checked","onChange","onDblclick"],Ca={key:0,class:"compare-checkbox"},Da={id:"comparePeriodToDropdown"},Pa={key:1,class:"compare-date-range"},Ea={id:"comparePeriodStartDate"},Va=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),Ta={id:"comparePeriodEndDate"},Na={class:"apply-button-container"},Ia=["disabled","value"],Ba={key:2,id:"ajaxLoadingCalendar"},Aa={class:"loadingSegment"};
+ */Bt({component:Qi,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}});function Ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xi={class:"multiPairField form-group"},Zi={key:1,class:"fieldUiControl fieldUiControl2"},ea={key:2,class:"fieldUiControl fieldUiControl3"},ta={key:3,class:"fieldUiControl fieldUiControl4"},na=["onClick","title"];function ra(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Field");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Xi,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.modelValue,(function(t,n){var r;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},Ki(r,"multiPairFieldTable".concat(n),!0),Ki(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(a["createVNode"])(c,{"full-width":!0,modelValue:t[e.field1.key],"onUpdate:modelValue":[function(n){return t[e.field1.key]=n},function(t){return e.onEntryChange(n,e.field1.key,t)}],options:e.field1.availableValues,placeholder:" ",uicontrol:e.field1.uiControl,name:"".concat(e.name,"-p1-").concat(n),title:e.field1.title},null,8,["modelValue","onUpdate:modelValue","options","uicontrol","name","title"])],2)):Object(a["createCommentVNode"])("",!0),e.field2?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Zi,[Object(a["createVNode"])(c,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field2.key,t)},function(n){return t[e.field2.key]=n}],modelValue:t[e.field2.key],placeholder:" ",uicontrol:e.field2.uiControl,name:"".concat(e.name,"-p2-").concat(n),title:e.field2.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","name","title"])])):Object(a["createCommentVNode"])("",!0),e.field3?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ea,[Object(a["createVNode"])(c,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field3.key,t)},function(n){return t[e.field3.key]=n}],modelValue:t[e.field3.key],placeholder:" ",uicontrol:e.field3.uiControl,title:e.field3.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(a["createCommentVNode"])("",!0),e.field4?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ta,[Object(a["createVNode"])(c,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":[function(t){return e.onEntryChange(n,e.field4.key,t)},function(n){return t[e.field4.key]=n}],modelValue:t[e.field4.key],placeholder:" ",uicontrol:e.field4.uiControl,title:e.field4.title},null,8,["options","onUpdate:modelValue","modelValue","uicontrol","title"])])):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,na),[[a["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function ia(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ia(Object(n),!0).forEach((function(t){oa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ia(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ca(e){return da(e)||ua(e)||sa(e)||la()}function la(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sa(e,t){if(e){if("string"===typeof e)return pa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pa(e,t):void 0}}function ua(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function da(e){if(Array.isArray(e))return pa(e)}function pa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fa=Zt("CorePluginsAdmin","Field"),ma=Object(a["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:fa},computed:{fieldCount:function(){return this.field1&&this.field2&&this.field3&&this.field4?4:this.field1&&this.field2&&this.field3?3:this.field1&&this.field2?2:this.field1?1:0}},emits:["update:modelValue"],watch:{modelValue:function(e){this.checkEmptyModelValue(e)}},mounted:function(){this.checkEmptyModelValue(this.modelValue)},methods:{checkEmptyModelValue:function(e){e&&e.length&&!this.isEmptyValue(e.slice(-1)[0])||this.$emit("update:modelValue",[].concat(ca(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=ca(this.modelValue);r[e]=aa(aa({},r[e]),{},oa({},t,n)),this.$emit("update:modelValue",r)},removeEntry:function(e){if(e>-1){var t=this.modelValue.filter((function(t,n){return n!==e}));this.$emit("update:modelValue",t)}},isEmptyValue:function(e){var t=this.fieldCount;if(4===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key]&&!e[this.field4.key])return!1}else if(3===t){if(!e[this.field1.key]&&!e[this.field2.key]&&!e[this.field3.key])return!1}else if(2===t){if(!e[this.field1.key]&&!e[this.field2.key])return!1}else if(1===t&&!e[this.field1.key])return!1;return!0},makeEmptyValue:function(){var e={};return this.field1&&this.field1.key&&(e[this.field1.key]=""),this.field2&&this.field2.key&&(e[this.field2.key]=""),this.field3&&this.field3.key&&(e[this.field3.key]=""),this.field4&&this.field4.key&&(e[this.field4.key]=""),e}}});ma.render=ra;var ha=ma,ga=(Bt({component:ha,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,a){e!==t.modelValue&&(r.trigger("change",e),a&&a.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var a=i;a&&(a.$setViewValue(e.modelValue),a.$render=function(){angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),va=["title"],ba=Object(a["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),ya={id:"periodMore",class:"dropdown"},Oa={class:"flex"},wa={key:0,class:"period-date"},ja={class:"period-type"},ka={id:"otherPeriods"},Sa=["onDblclick","title"],Ca=["id","checked","onChange","onDblclick"],Da={key:0,class:"compare-checkbox"},Pa={id:"comparePeriodToDropdown"},Ea={key:1,class:"compare-date-range"},Va={id:"comparePeriodStartDate"},Ta=Object(a["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),Na={id:"comparePeriodEndDate"},Ia={class:"apply-button-container"},Ba=["disabled","value"],Aa={key:2,id:"ajaxLoadingCalendar"},xa={class:"loadingSegment"};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function xa(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("DateRangePicker"),l=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ha,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[va,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,ga),Object(a["createElementVNode"])("div",ba,[Object(a["createElementVNode"])("div",ya,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(c,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Oa,[Object(a["createVNode"])(l,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",wa,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",ja,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Sa),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,ka)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ca,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",Da,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Pa,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Ea,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),Va,Object(a["createElementVNode"])("div",Ta,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Na,[Object(a["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,Ia)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ba,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",Aa,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var Ma={class:"loadingPiwik"},La=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function $a(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ma,[La,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var Ra=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});Ra.render=$a;var Ha=Ra;function Fa(e,t){return Ja(e)||Wa(e,t)||Ua(e,t)||_a()}function _a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ua(e,t){if(e){if("string"===typeof e)return qa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qa(e,t):void 0}}function qa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wa(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(l){c=!0,i=l}finally{try{o||null==n["return"]||n["return"]()}finally{if(c)throw i}}return a}}function Ja(e){if(Array.isArray(e))return e}function Ga(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function za(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ga(Object(n),!0).forEach((function(t){Ya(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ga(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ya(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qa=Zt("CorePluginsAdmin","Field"),Ka=S.helper.htmlDecode("&nbsp;"),Xa=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,Ka)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,Ka)}],Za=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),eo=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function to(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var no=Object(a["defineComponent"])({props:{periods:Array},components:{DateRangePicker:Tr,PeriodDatePicker:xr,Field:Qa,ActivityIndicator:Ha},directives:{ExpandOnClick:ot},data:function(){return{comparePeriodDropdownOptions:Xa,periodValue:null,dateValue:null,selectedPeriod:null,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(a["watch"])((function(){return Pe.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=xn.isComparingPeriods(),Object(a["watch"])((function(){return xn.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=D(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return xn.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):this.dateValue,t=p.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],compareDates:["".concat(D(t[0]),",").concat(D(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[D(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=E(this.startRangeDate),t=E(this.endRangeDate),n=F.getLastNRange("day",2,e).startDate,r=Math.floor((t-e)/864e5),i=F.getLastNRange("day",1+r,n);return"".concat(D(i.startDate),",").concat(D(i.endDate))}var a=F.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return D(a)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=E(e),r=E(t);return!to(n)||!to(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return D(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(){this.period!==this.periodValue&&"range"!==this.period&&this.setPiwikPeriodAndDate(this.period,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=D(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Pe.hashParsed.value):(this.isLoadingNewPage=!0,n=Pe.parsed.value);var i=za({},n);delete i.comparePeriods,delete i.compareDates,Pe.updateLocation(za(za({},i),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Pe.parsed.value,t=e.date,n=e.period;this.periodValue=n,this.selectedPeriod=n,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(n,t)}catch(l){return}if("range"===n){var r=p.get(n).parse(t),i=r.getDateRange(),a=Fa(i,2),o=a[0],c=a[1];this.dateValue=o,this.startRangeDate=D(o),this.endRangeDate=D(c)}else this.dateValue=E(t),this.setRangeStartEndFromPeriod(n,t)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=D(n[0]<Za?Za:n[0]),this.endRangeDate=D(n[1]>eo?eo:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{E(this.compareStartDate)}catch(e){return!1}try{E(this.compareEndDate)}catch(e){return!1}return!0}}});no.render=xa;var ro=no,io=(Bt({component:ro,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),ao=["aria-label"],oo=["onClick"],co={class:"hidden"},lo={role:"menu"},so=["href","onClick","title"],uo=["href","onClick"],po=["onClick"],fo=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),mo=[fo],ho={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},go={class:"collapsible collapsible-accordion"},vo={class:"collapsible-header"},bo={class:"collapsible-body"},yo={key:0},Oo=["onClick","href"],wo={key:1},jo=["onClick","href"];
+ */function Ma(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("DateRangePicker"),l=Object(a["resolveComponent"])("PeriodDatePicker"),s=Object(a["resolveComponent"])("Field"),u=Object(a["resolveComponent"])("ActivityIndicator"),d=Object(a["resolveDirective"])("expand-on-click");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ga,[Object(a["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[ba,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.currentlyViewingText),1)],8,va),Object(a["createElementVNode"])("div",ya,[Object(a["createElementVNode"])("div",Oa,[Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(c,{class:"period-range","start-date":e.startRangeDate,"end-date":e.endRangeDate,onRangeChange:t[0]||(t[0]=function(t){return e.onRangeChange(t.start,t.end)}),onSubmit:t[1]||(t[1]=function(t){return e.onApplyClicked()})},null,8,["start-date","end-date"]),[[a["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",wa,[Object(a["createVNode"])(l,{id:"datepicker",period:e.selectedPeriod,date:e.periodValue===e.selectedPeriod?e.dateValue:null,onSelect:t[2]||(t[2]=function(t){return e.setPiwikPeriodAndDate(e.selectedPeriod,t.date)})},null,8,["period","date"])])):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("div",ja,[Object(a["createElementVNode"])("h6",null,Object(a["toDisplayString"])(e.translate("General_Period")),1),Object(a["createElementVNode"])("div",ka,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodsFiltered,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",{key:n},[Object(a["createElementVNode"])("label",{class:Object(a["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",name:"period",id:"period_id_".concat(n),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selectedPeriod=t}),checked:e.selectedPeriod===n,onChange:function(t){return e.selectedPeriod=n},onDblclick:function(t){return e.changeViewedPeriod(n)}},null,40,Ca),[[a["vModelRadio"],e.selectedPeriod]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Sa)])})),128))])])]),e.isComparisonEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Da,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[a["vModelCheckbox"],e.isComparing]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(a["createElementVNode"])("div",Pa,[Object(a["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(a["normalizeStyle"])({visibility:e.isComparing?"visible":"hidden"}),name:"comparePeriodToDropdown",uicontrol:"select",options:e.comparePeriodDropdownOptions,"full-width":!0,disabled:!e.isComparing},null,8,["modelValue","style","options","disabled"])])])):Object(a["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ea,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",Va,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareStartDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.compareStartDate=t}),name:"comparePeriodStartDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_StartDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])]),Ta,Object(a["createElementVNode"])("div",Na,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{modelValue:e.compareEndDate,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.compareEndDate=t}),name:"comparePeriodEndDate",uicontrol:"text","full-width":!0,title:e.translate("CoreHome_EndDate"),placeholder:"YYYY-MM-DD"},null,8,["modelValue","title"])])])])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Ia,[Object(a["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=function(t){return e.onApplyClicked()}),disabled:!e.isApplyEnabled(),value:e.translate("General_Apply")},null,8,Ba)]),e.isLoadingNewPage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Aa,[Object(a["createVNode"])(u,{loading:!0}),Object(a["createElementVNode"])("div",xa,Object(a["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(a["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var La={class:"loadingPiwik"},$a=Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function Ra(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",La,[$a,Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.loadingMessage),1)],512)),[[a["vShow"],e.loading]])}var Ha=Object(a["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});Ha.render=Ra;var Fa=Ha;function _a(e,t){return Ga(e)||Ja(e,t)||qa(e,t)||Ua()}function Ua(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function qa(e,t){if(e){if("string"===typeof e)return Wa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wa(e,t):void 0}}function Wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ja(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(l){c=!0,i=l}finally{try{o||null==n["return"]||n["return"]()}finally{if(c)throw i}}return a}}function Ga(e){if(Array.isArray(e))return e}function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach((function(t){Qa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ka=Zt("CorePluginsAdmin","Field"),Xa=S.helper.htmlDecode("&nbsp;"),Za=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,Xa)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,Xa)}],eo=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),to=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function no(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var ro=Object(a["defineComponent"])({props:{periods:Array},components:{DateRangePicker:Tr,PeriodDatePicker:xr,Field:Ka,ActivityIndicator:Fa},directives:{ExpandOnClick:ot},data:function(){return{comparePeriodDropdownOptions:Za,periodValue:null,dateValue:null,selectedPeriod:null,startRangeDate:null,endRangeDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:""}},mounted:function(){var e=this;S.on("hidePeriodSelector",(function(){window.$(e.$refs.root).hide()})),S.on("piwikPageChange",(function(){window.$(e.$refs.root).show()})),this.updateSelectedValuesFromHash(),Object(a["watch"])((function(){return Pe.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=xn.isComparingPeriods(),Object(a["watch"])((function(){return xn.isComparingPeriods()}),(function(t){e.isComparing=t})),window.initTopControls(),this.handleZIndexPositionRelativeCompareDropdownIssue()},computed:{currentlyViewingText:function(){var e;if("range"===this.periodValue){if(!this.startRangeDate||!this.endRangeDate)return C("General_Error");e="".concat(this.startRangeDate,",").concat(this.endRangeDate)}else{if(!this.dateValue)return C("General_Error");e=D(this.dateValue)}try{return p.parse(this.periodValue,e).getPrettyString()}catch(t){return C("General_Error")}},isComparisonEnabled:function(){return xn.isComparisonEnabled()},periodsFiltered:function(){return(this.periods||[]).filter((function(e){return p.isRecognizedPeriod(e)}))},selectedComparisonParams:function(){if(!this.isComparing)return{};if("custom"===this.comparePeriodType)return{comparePeriods:["range"],compareDates:["".concat(this.compareStartDate,",").concat(this.compareEndDate)]};if("previousPeriod"===this.comparePeriodType)return{comparePeriods:[this.selectedPeriod],compareDates:[this.previousPeriodDateToSelectedPeriod]};if("previousYear"===this.comparePeriodType){var e="range"===this.selectedPeriod?"".concat(this.startRangeDate,",").concat(this.endRangeDate):this.dateValue,t=p.parse(this.selectedPeriod,e).getDateRange();return t[0].setFullYear(t[0].getFullYear()-1),t[1].setFullYear(t[1].getFullYear()-1),"range"===this.selectedPeriod?{comparePeriods:["range"],compareDates:["".concat(D(t[0]),",").concat(D(t[1]))]}:{comparePeriods:[this.selectedPeriod],compareDates:[D(t[0])]}}return console.warn("Unknown compare period type: ".concat(this.comparePeriodType)),{}},previousPeriodDateToSelectedPeriod:function(){if("range"===this.selectedPeriod){var e=E(this.startRangeDate),t=E(this.endRangeDate),n=F.getLastNRange("day",2,e).startDate,r=Math.floor((t-e)/864e5),i=F.getLastNRange("day",1+r,n);return"".concat(D(i.startDate),",").concat(D(i.endDate))}var a=F.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return D(a)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=E(e),r=E(t);return!no(n)||!no(r)||n>r?(window.$("#alert").find("h2").text(C("General_InvalidDateRange")),S.helper.modalConfirm("#alert",{}),null):"".concat(e,",").concat(t)}return D(this.dateValue)}},methods:{handleZIndexPositionRelativeCompareDropdownIssue:function(){var e=window.$(this.$refs.root);e.on("focus","#comparePeriodToDropdown .select-dropdown",(function(){e.addClass("compare-dropdown-open")})).on("blur","#comparePeriodToDropdown .select-dropdown",(function(){e.removeClass("compare-dropdown-open")}))},changeViewedPeriod:function(){this.period!==this.periodValue&&"range"!==this.period&&this.setPiwikPeriodAndDate(this.period,this.dateValue)},setPiwikPeriodAndDate:function(e,t){this.periodValue=e,this.selectedPeriod=e,this.dateValue=t;var n=D(t);this.setRangeStartEndFromPeriod(e,n),this.propagateNewUrlParams(n,this.selectedPeriod),window.initTopControls()},propagateNewUrlParams:function(e,t){var n,r=this.selectedComparisonParams;S.helper.isAngularRenderingThePage()?(this.closePeriodSelector(),n=Pe.hashParsed.value):(this.isLoadingNewPage=!0,n=Pe.parsed.value);var i=Ya({},n);delete i.comparePeriods,delete i.compareDates,Pe.updateLocation(Ya(Ya({},i),{},{date:e,period:t},r))},onApplyClicked:function(){if("range"===this.selectedPeriod){var e=this.selectedDateString;if(!e)return;return this.periodValue="range",void this.propagateNewUrlParams(e,"range")}this.setPiwikPeriodAndDate(this.selectedPeriod,this.dateValue)},updateSelectedValuesFromHash:function(){var e=Pe.parsed.value,t=e.date,n=e.period;this.periodValue=n,this.selectedPeriod=n,this.dateValue=null,this.startRangeDate=null,this.endRangeDate=null;try{p.parse(n,t)}catch(l){return}if("range"===n){var r=p.get(n).parse(t),i=r.getDateRange(),a=_a(i,2),o=a[0],c=a[1];this.dateValue=o,this.startRangeDate=D(o),this.endRangeDate=D(c)}else this.dateValue=E(t),this.setRangeStartEndFromPeriod(n,t)},setRangeStartEndFromPeriod:function(e,t){var n=p.parse(e,t).getDateRange();this.startRangeDate=D(n[0]<eo?eo:n[0]),this.endRangeDate=D(n[1]>to?to:n[1])},getPeriodDisplayText:function(e){return p.get(e).getDisplayText()},onRangeChange:function(e,t){e&&t?(this.isRangeValid=!0,this.startRangeDate=e,this.endRangeDate=t):this.isRangeValid=!1},isApplyEnabled:function(){return!("range"===this.selectedPeriod&&!this.isRangeValid)&&!(this.isComparing&&"custom"===this.comparePeriodType&&!this.isCompareRangeValid())},closePeriodSelector:function(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid:function(){try{E(this.compareStartDate)}catch(e){return!1}try{E(this.compareEndDate)}catch(e){return!1}return!0}}});ro.render=Ma;var io=ro,ao=(Bt({component:io,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),oo=["aria-label"],co=["onClick"],lo={class:"hidden"},so={role:"menu"},uo=["href","onClick","title"],po=["href","onClick"],fo=["onClick"],mo=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),ho=[mo],go={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},vo={class:"collapsible collapsible-accordion"},bo={class:"collapsible-header"},yo={class:"collapsible-body"},Oo={key:0},wo=["onClick","href"],jo={key:1},ko=["onClick","href"];
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function ko(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("MenuDropdown"),l=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",io,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",co,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,oo),Object(a["createElementVNode"])("ul",lo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(a["toDisplayString"])(r.name),11,so)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,uo)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},mo,10,po)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,ao),Object(a["createElementVNode"])("ul",ho,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",go,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",vo,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",bo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",yo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,Oo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",wo,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,jo)]))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}var So={key:0},Co=["data-notification-instance-id"],Do={key:1},Po={class:"notification-body"},Eo=["innerHTML"],Vo={key:1};function To(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",So,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Do,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Po,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,Eo)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Vo,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Co)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var No=window,Io=No.$,Bo=Object(a["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&Io(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&$e.fetch({module:"CoreHome",action:"markNotificationAsRead"},{postParams:{notificationId:this.notificationId}})}}});Bo.render=To;var Ao=Bo;
+ */function So(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("MenuDropdown"),l=Object(a["resolveDirective"])("side-nav");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ao,[Object(a["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(a["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(a["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("span",lo,Object(a["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,co),Object(a["createElementVNode"])("ul",so,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{role:"menuitem",class:Object(a["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(a["withCtx"])((function(){return[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(r){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{class:Object(a["normalizeClass"])(["item",{active:r.id===e.activeSubsubcategory&&n.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?".concat(e.makeUrl(t,r)),onClick:function(n){return e.loadSubcategory(t,r,n)},title:r.tooltip,key:r.id},Object(a["toDisplayString"])(r.name),11,uo)})),128))]})),_:2},1032,["menu-title"])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(a["toDisplayString"])(n.name),9,po)),n.help?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:2,class:Object(a["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===n.id&&e.helpShownCategory.category===t.id&&n.help}]),tabindex:"5",href:"javascript:",onClick:function(r){return e.showHelp(t,n,r)}},ho,10,fo)):Object(a["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,oo),Object(a["createElementVNode"])("ul",go,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.menu,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",vo,[Object(a["createElementVNode"])("li",null,[Object(a["createElementVNode"])("a",bo,[Object(a["createElementVNode"])("i",{class:Object(a["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name),1)]),Object(a["createElementVNode"])("div",yo,[Object(a["createElementVNode"])("ul",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Oo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(n.subcategories,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(a["toDisplayString"])(n.name),9,wo)})),128))])):Object(a["createCommentVNode"])("",!0),n.isGroup?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",jo,[Object(a["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(a["toDisplayString"])(n.name),9,ko)]))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}var Co={key:0},Do=["data-notification-instance-id"],Po={key:1},Eo={class:"notification-body"},Vo=["innerHTML"],To={key:1};function No(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createBlock"])(a["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(a["withCtx"])((function(){return[e.deleted?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Co,[Object(a["createVNode"])(a["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(a["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{class:Object(a["normalizeClass"])(["notification system",e.cssClasses]),style:Object(a["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(a["openBlock"])(),Object(a["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(a["createCommentVNode"])("",!0),e.title?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",Po,Object(a["toDisplayString"])(e.title),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Eo,[e.message?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,Vo)):Object(a["createCommentVNode"])("",!0),e.message?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",To,[Object(a["renderSlot"])(e.$slots,"default")]))])],14,Do)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var Io=window,Bo=Io.$,Ao=Object(a["defineComponent"])({props:{notificationId:String,notificationInstanceId:String,title:String,context:String,type:String,noclear:Boolean,toastLength:{type:Number,default:12e3},style:[String,Object],animate:Boolean,message:String,cssClass:String},computed:{cssClasses:function(){var e={};return this.context&&(e["notification-".concat(this.context)]=!0),this.cssClass&&(e[this.cssClass]=!0),e},canClose:function(){return"persistent"===this.type||!this.noclear}},emits:["closed"],data:function(){return{deleted:!1}},mounted:function(){var e=this,t=function(){setTimeout((function(){e.deleted=!0}),e.toastLength)};"toast"===this.type&&t(),this.style&&Bo(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(a["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(a["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&$e.fetch({module:"CoreHome",action:"markNotificationAsRead"},{postParams:{notificationId:this.notificationId}})}}});Ao.render=No;var xo=Ao;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */Bt({component:Ao,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:At},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});function xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xo(Object(n),!0).forEach((function(t){Ho(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ro(e,t,n){return t&&$o(e.prototype,t),n&&$o(e,n),e}function Ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */Bt({component:xo,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:At},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){Fo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ro(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ho(e,t,n){return t&&Ro(e.prototype,t),n&&Ro(e,n),e}function Fo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var Fo=function(){function e(){Lo(this,e),Ho(this,"privateState",Object(a["reactive"])({notifications:[]})),Ho(this,"nextNotificationId",0)}return Ro(e,[{key:"state",get:function(){return Object(a["readonly"])(this.privateState)}},{key:"appendNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}},{key:"prependNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}},{key:"remove",value:function(e){this.privateState.notifications=this.privateState.notifications.filter((function(t){return t.id!==e}))}},{key:"parseNotificationDivs",value:function(){var e=this,t=$('[data-role="notification"]'),n=[];t.each((function(e,r){var i=$(r),a=i.data(),o=i.html();o&&n.push(Mo(Mo({},a),{},{message:o,animate:!1})),t.remove()})),n.forEach((function(t){return e.show(t)}))}},{key:"clearTransientNotifications",value:function(){this.privateState.notifications=this.privateState.notifications.filter((function(e){return"transient"!==e.type}))}},{key:"show",value:function(e){this.checkMessage(e.message);var t=e.prepend?this.prependNotification:this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content",i=document.querySelector(r);i&&(i.querySelector("#modalNotificationContainer")||window.$(i).prepend('<div id="modalNotificationContainer"/>'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var a=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,a);var o=(this.nextNotificationId+=1).toString();return t.call(this,Mo(Mo({},e),{},{noclear:!!e.noclear,group:a,notificationId:e.id,notificationInstanceId:o,type:e.type||"transient"})),o}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=$(e.placeat);if(!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");var n=document.createElement("div");n.style.position="absolute",n.style.top="".concat(t.offset().top,"px"),n.style.left="".concat(t.offset().left,"px"),n.style.zIndex="1000",document.body.appendChild(n);var r=Object(a["createApp"])({render:function(){return Object(a["createVNode"])(Ao,Mo(Mo({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.config.globalProperties.$sanitize=window.vueSanitize,r.config.globalProperties.translate=C,r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){var n=window.$(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,i=Object(a["createApp"])({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});i.config.globalProperties.$sanitize=window.vueSanitize,i.config.globalProperties.translate=C,i.component("NotificationGroup",r),i.mount(n[0])}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),_o=new Fo,Uo=_o;$((function(){return _o.parseNotificationDivs()})),
+ */var _o=function(){function e(){$o(this,e),Fo(this,"privateState",Object(a["reactive"])({notifications:[]})),Fo(this,"nextNotificationId",0)}return Ho(e,[{key:"state",get:function(){return Object(a["readonly"])(this.privateState)}},{key:"appendNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.push(e)}},{key:"prependNotification",value:function(e){this.checkMessage(e.message),e.id&&this.remove(e.id),this.privateState.notifications.unshift(e)}},{key:"remove",value:function(e){this.privateState.notifications=this.privateState.notifications.filter((function(t){return t.id!==e}))}},{key:"parseNotificationDivs",value:function(){var e=this,t=$('[data-role="notification"]'),n=[];t.each((function(e,r){var i=$(r),a=i.data(),o=i.html();o&&n.push(Lo(Lo({},a),{},{message:o,animate:!1})),t.remove()})),n.forEach((function(t){return e.show(t)}))}},{key:"clearTransientNotifications",value:function(){this.privateState.notifications=this.privateState.notifications.filter((function(e){return"transient"!==e.type}))}},{key:"show",value:function(e){this.checkMessage(e.message);var t=e.prepend?this.prependNotification:this.appendNotification,n="#notificationContainer";if(e.placeat)n=e.placeat;else{var r=".modal.open .modal-content",i=document.querySelector(r);i&&(i.querySelector("#modalNotificationContainer")||window.$(i).prepend('<div id="modalNotificationContainer"/>'),n="".concat(r," #modalNotificationContainer"),t=this.prependNotification)}var a=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,a);var o=(this.nextNotificationId+=1).toString();return t.call(this,Lo(Lo({},e),{},{noclear:!!e.noclear,group:a,notificationId:e.id,notificationInstanceId:o,type:e.type||"transient"})),o}},{key:"scrollToNotification",value:function(e){setTimeout((function(){var t=document.querySelector("[data-notification-instance-id='".concat(e,"']"));t&&S.helper.lazyScrollTo(t,250)}))}},{key:"toast",value:function(e){this.checkMessage(e.message);var t=$(e.placeat);if(!t.length)throw new Error("A valid selector is required for the placeat option when using Notification.toast().");var n=document.createElement("div");n.style.position="absolute",n.style.top="".concat(t.offset().top,"px"),n.style.left="".concat(t.offset().left,"px"),n.style.zIndex="1000",document.body.appendChild(n);var r=Object(a["createApp"])({render:function(){return Object(a["createVNode"])(xo,Lo(Lo({},e),{},{notificationId:e.id,type:"toast",onClosed:function(){r.unmount()}}))}});r.config.globalProperties.$sanitize=window.vueSanitize,r.config.globalProperties.translate=C,r.mount(n)}},{key:"initializeNotificationContainer",value:function(e,t){var n=window.$(e);if(!n.children(".notification-group").length){var r=window.CoreHome.NotificationGroup,i=Object(a["createApp"])({template:'<NotificationGroup :group="group"></NotificationGroup>',data:function(){return{group:t}}});i.config.globalProperties.$sanitize=window.vueSanitize,i.config.globalProperties.translate=C,i.component("NotificationGroup",r),i.mount(n[0])}}},{key:"checkMessage",value:function(e){if(!e)throw new Error("No message given, cannot display notification")}}]),e}(),Uo=new _o,qo=Uo;$((function(){return Uo.parseNotificationDivs()})),
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-angular.module("piwikApp").factory("notifications",(function(){return Uo}));var qo={class:"notification-group"},Wo=["innerHTML"];function Jo(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Notification");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",qo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.notifications,(function(t,n){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:t.id||"no-id-".concat(n),"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(a["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:function(n){return e.removeNotification(t.id)}},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Wo)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var Go=Object(a["defineComponent"])({props:{group:String},components:{Notification:Ao},computed:{notifications:function(){var e=this;return Uo.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){Uo.remove(e)}}});Go.render=Jo;var zo=Go;
+angular.module("piwikApp").factory("notifications",(function(){return qo}));var Wo={class:"notification-group"},Jo=["innerHTML"];function Go(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Notification");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Wo,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.notifications,(function(t,n){return Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:t.id||"no-id-".concat(n),"notification-id":t.id,title:t.title,context:t.context,type:t.type,noclear:t.noclear,"toast-length":t.toastLength,style:Object(a["normalizeStyle"])(t.style),animate:t.animate,message:t.message,"notification-instance-id":t.notificationInstanceId,"css-class":t.class,onClosed:function(n){return e.removeNotification(t.id)}},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Jo)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var zo=Object(a["defineComponent"])({props:{group:String},components:{Notification:xo},computed:{notifications:function(){var e=this;return qo.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){qo.remove(e)}}});zo.render=Go;var Yo=zo;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ko(e,t,n){return t&&Qo(e.prototype,t),n&&Qo(e,n),e}function Xo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */function Qo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xo(e,t,n){return t&&Ko(e.prototype,t),n&&Ko(e,n),e}function Zo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var Zo=function(){function e(){var t=this;Yo(this,e),Xo(this,"privateState",Object(a["reactive"])({pages:[]})),Xo(this,"state",Object(a["readonly"])(this.privateState)),Xo(this,"fetchAllPagesPromise",void 0),Xo(this,"pages",Object(a["computed"])((function(){return t.state.pages})))}return Ko(e,[{key:"findPageInCategory",value:function(e){return this.pages.value.find((function(t){return t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id}))}},{key:"findPage",value:function(e,t){return this.pages.value.find((function(n){return n&&n.category&&n.subcategory&&n.category.id===e&&"".concat(n.subcategory.id)===t}))}},{key:"reloadAllPages",value:function(){return this.fetchAllPagesPromise=null,this.getAllPages()}},{key:"getAllPages",value:function(){var e=this;return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=$e.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){e.privateState.pages=t}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),ec=new Zo;function tc(e){return ac(e)||ic(e)||rc(e)||nc()}function nc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function rc(e,t){if(e){if("string"===typeof e)return oc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oc(e,t):void 0}}function ic(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ac(e){if(Array.isArray(e))return oc(e)}function oc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
+ */var ec=function(){function e(){var t=this;Qo(this,e),Zo(this,"privateState",Object(a["reactive"])({pages:[]})),Zo(this,"state",Object(a["readonly"])(this.privateState)),Zo(this,"fetchAllPagesPromise",void 0),Zo(this,"pages",Object(a["computed"])((function(){return t.state.pages})))}return Xo(e,[{key:"findPageInCategory",value:function(e){return this.pages.value.find((function(t){return t&&t.category&&t.category.id===e&&t.subcategory&&t.subcategory.id}))}},{key:"findPage",value:function(e,t){return this.pages.value.find((function(n){return n&&n.category&&n.subcategory&&n.category.id===e&&"".concat(n.subcategory.id)===t}))}},{key:"reloadAllPages",value:function(){return this.fetchAllPagesPromise=null,this.getAllPages()}},{key:"getAllPages",value:function(){var e=this;return this.fetchAllPagesPromise||(this.fetchAllPagesPromise=$e.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){e.privateState.pages=t}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),tc=new ec;function nc(e){return oc(e)||ac(e)||ic(e)||rc()}function rc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ic(e,t){if(e){if("string"===typeof e)return cc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cc(e,t):void 0}}function ac(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function oc(e){if(Array.isArray(e))return cc(e)}function cc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function cc(e){var t=tc(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),t}function lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lc(Object(n),!0).forEach((function(t){fc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pc(e,t,n){return t&&dc(e.prototype,t),n&&dc(e,n),e}function fc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */function lc(e){var t=nc(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),t}function sc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sc(Object(n),!0).forEach((function(t){mc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fc(e,t,n){return t&&pc(e.prototype,t),n&&pc(e,n),e}function mc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function mc(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var hc=function(){function e(){var t=this;uc(this,e),fc(this,"privateState",Object(a["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),fc(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),fc(this,"activeCategory",Object(a["computed"])((function(){return t.state.value.activeCategoryId||Pe.parsed.value.category}))),fc(this,"activeSubcategory",Object(a["computed"])((function(){return t.state.value.activeSubcategoryId||Pe.parsed.value.subcategory}))),fc(this,"activeSubsubcategory",Object(a["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),fc(this,"menu",Object(a["computed"])((function(){return t.buildMenuFromPages()})))}return pc(e,[{key:"fetchMenuItems",value:function(){var e=this;return ec.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return ec.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=null,r=null,i=null;return this.menu.value.forEach((function(a){a.id===e&&(a.subcategories||[]).forEach((function(e){e.id===t&&(n=a,r=e),e.isGroup&&(e.subcategories||[]).forEach((function(o){o.id===t&&(n=a,r=e,i=o)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Pe.parsed.value.category,n=Pe.parsed.value.subcategory,r=ec.pages.value,i={};return r.forEach((function(a){var o=sc({},a.category),c=o.id,l=c===t;if(!i[c]){var s;i[c]=!0,o.subcategories=[];var u=r.filter((function(e){return e.category.id===c}));u.forEach((function(e){var t=sc({},e.subcategory),r=t.id===n&&l;if(e.widgets&&e.widgets[0]&&mc(e.subcategory.id)){s||(s=sc({},t),s.name=C("CoreHome_ChooseX",[o.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=a.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}o.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return o.subcategories.push(e)})):s&&o.subcategories.push(s),o.subcategories=cc(o.subcategories),e.push(o)}})),cc(e)}},{key:"toggleCategory",value:function(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.privateState.activeCategoryId===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),gc=new hc;function vc(e){return vc="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vc(e)}function bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oc(e,t,n){return t&&yc(e.prototype,t),n&&yc(e,n),e}function wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+ */function hc(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var gc=function(){function e(){var t=this;dc(this,e),mc(this,"privateState",Object(a["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),mc(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),mc(this,"activeCategory",Object(a["computed"])((function(){return t.state.value.activeCategoryId||Pe.parsed.value.category}))),mc(this,"activeSubcategory",Object(a["computed"])((function(){return t.state.value.activeSubcategoryId||Pe.parsed.value.subcategory}))),mc(this,"activeSubsubcategory",Object(a["computed"])((function(){var e=t.state.value.activeSubsubcategoryId;if(e)return e;var n=t.findSubcategory(t.activeCategory.value,t.activeSubcategory.value);return n.subsubcategory&&n.subsubcategory.id===t.activeSubcategory.value?n.subsubcategory.id:null}))),mc(this,"menu",Object(a["computed"])((function(){return t.buildMenuFromPages()})))}return fc(e,[{key:"fetchMenuItems",value:function(){var e=this;return tc.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return tc.reloadAllPages().then((function(){return e.menu.value}))}},{key:"findSubcategory",value:function(e,t){var n=null,r=null,i=null;return this.menu.value.forEach((function(a){a.id===e&&(a.subcategories||[]).forEach((function(e){e.id===t&&(n=a,r=e),e.isGroup&&(e.subcategories||[]).forEach((function(o){o.id===t&&(n=a,r=e,i=o)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Pe.parsed.value.category,n=Pe.parsed.value.subcategory,r=tc.pages.value,i={};return r.forEach((function(a){var o=uc({},a.category),c=o.id,l=c===t;if(!i[c]){var s;i[c]=!0,o.subcategories=[];var u=r.filter((function(e){return e.category.id===c}));u.forEach((function(e){var t=uc({},e.subcategory),r=t.id===n&&l;if(e.widgets&&e.widgets[0]&&hc(e.subcategory.id)){s||(s=uc({},t),s.name=C("CoreHome_ChooseX",[o.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=a.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}o.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return o.subcategories.push(e)})):s&&o.subcategories.push(s),o.subcategories=lc(o.subcategories),e.push(o)}})),lc(e)}},{key:"toggleCategory",value:function(e){return this.privateState.activeSubcategoryId=null,this.privateState.activeSubsubcategoryId=null,this.privateState.activeCategoryId===e.id?(this.privateState.activeCategoryId=null,!1):(this.privateState.activeCategoryId=e.id,!0)}},{key:"enterSubcategory",value:function(e,t,n){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,n&&(this.privateState.activeSubsubcategoryId=n.id))}}]),e}(),vc=new gc;function bc(e){return bc="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bc(e)}function yc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wc(e,t,n){return t&&Oc(e.prototype,t),n&&Oc(e,n),e}function jc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */var jc=function(){function e(){var t=this;bc(this,e),wc(this,"privateState",Object(a["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),wc(this,"state",Object(a["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(a["readonly"])(t.privateState)}))),wc(this,"widgets",Object(a["computed"])((function(){return t.state.value.categorizedWidgets})))}return Oc(e,[{key:"fetchAvailableWidgets",value:function(){var e=this;return Pe.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((function(t,n){try{window.widgetsHelper.getAvailableWidgets((function(n){e.privateState.categorizedWidgets=n,t(e.widgets.value)}))}catch(r){n(r)}}))):Promise.resolve(this.widgets.value)}},{key:"reloadAvailableWidgets",value:function(){return"object"===vc(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),kc=new jc;function Sc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sc(Object(n),!0).forEach((function(t){Dc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pc="reportingmenu-help",Ec=Object(a["defineComponent"])({components:{MenuDropdown:mr},directives:{SideNav:gt},props:{},data:function(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator:function(){return document.querySelector("nav .activateLeftMenu")},menu:function(){return gc.menu.value},activeCategory:function(){return gc.activeCategory.value},activeSubcategory:function(){return gc.activeSubcategory.value},activeSubsubcategory:function(){return gc.activeSubsubcategory.value},displayedCategory:function(){return Pe.parsed.value.category},displayedSubcategory:function(){return Pe.parsed.value.subcategory}},created:function(){var e=this;gc.fetchMenuItems().then((function(t){if(!Pe.parsed.value.subcategory){var n=t[0],r=n.subcategories[0];gc.enterSubcategory(n,r),e.propagateUrlChange(n,r)}})),Object(a["watch"])((function(){return Pe.parsed.value}),(function(e){var t=gc.findSubcategory(e.category,e.subcategory);gc.enterSubcategory(t.category,t.subcategory,t.subsubcategory)})),S.on("piwikPageChange",(function(){e.initialLoad||window.globalAjaxQueue.abort(),e.helpShownCategory=null,e.showSubcategoryHelpOnLoad&&(e.showHelp(e.showSubcategoryHelpOnLoad.category,e.showSubcategoryHelpOnLoad.subcategory),e.showSubcategoryHelpOnLoad=null),window.$("#loadingError").hide(),e.initialLoad=!1})),S.on("updateReportingMenu",(function(){gc.reloadMenuItems().then((function(){var e=Pe.parsed.value,t=e.category,n=e.subcategory;if(t&&n){var r=gc.findSubcategory(t,n);r&&gc.enterSubcategory(r.category,r.subcategory,r.subsubcategory)}})),kc.reloadAvailableWidgets()}))},methods:{propagateUrlChange:function(e,t){var n=Pe.parsed.value;n.category===e.id&&n.subcategory===t.id?this.loadSubcategory(e,t):Pe.updateHash(Cc(Cc({},Pe.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){Uo.remove(Pc);var t=gc.toggleCategory(e);if(t&&e.subcategories&&1===e.subcategories.length){this.helpShownCategory=null;var n=e.subcategories[0];this.propagateUrlChange(e,n)}},loadSubcategory:function(e,t,n){n&&(n.shiftKey||n.ctrlKey||n.metaKey)||(Uo.remove(Pc),t&&t.id===this.activeSubcategory&&(this.helpShownCategory=null,setTimeout((function(){S.postEvent("loadPage",e.id,t.id)}))))},makeUrl:function(e,t){var n=Pe.parsed.value,r=n.idSite,i=n.period,a=n.date,o=n.segment,c=n.comparePeriods,l=n.compareDates,s=n.compareSegments;return Pe.stringify({idSite:r,period:i,date:a,segment:o,comparePeriods:c,compareDates:l,compareSegments:s,category:e.id,subcategory:t.id})},htmlEntities:function(e){return S.helper.htmlEntities(e)},showHelp:function(e,t,n){var r=Pe.parsed.value,i=r.category,a=r.subcategory;if((i!==e.id||a!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void Pe.updateHash(Cc(Cc({},Pe.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return Uo.remove(Pc),void(this.helpShownCategory=null);var o=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),c="<strong>".concat(o,"</strong><br/>");Uo.show({context:"info",id:Pc,type:"help",noclear:!0,class:"help-notification",message:c+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Ec.render=ko;var Vc=Ec;
+ */var kc=function(){function e(){var t=this;yc(this,e),jc(this,"privateState",Object(a["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),jc(this,"state",Object(a["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(a["readonly"])(t.privateState)}))),jc(this,"widgets",Object(a["computed"])((function(){return t.state.value.categorizedWidgets})))}return wc(e,[{key:"fetchAvailableWidgets",value:function(){var e=this;return Pe.parsed.value.idSite?(this.privateState.isFetchedFirstTime=!0,new Promise((function(t,n){try{window.widgetsHelper.getAvailableWidgets((function(n){e.privateState.categorizedWidgets=n,t(e.widgets.value)}))}catch(r){n(r)}}))):Promise.resolve(this.widgets.value)}},{key:"reloadAvailableWidgets",value:function(){return"object"===bc(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),Sc=new kc;function Cc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cc(Object(n),!0).forEach((function(t){Pc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ec="reportingmenu-help",Vc=Object(a["defineComponent"])({components:{MenuDropdown:mr},directives:{SideNav:gt},props:{},data:function(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator:function(){return document.querySelector("nav .activateLeftMenu")},menu:function(){return vc.menu.value},activeCategory:function(){return vc.activeCategory.value},activeSubcategory:function(){return vc.activeSubcategory.value},activeSubsubcategory:function(){return vc.activeSubsubcategory.value},displayedCategory:function(){return Pe.parsed.value.category},displayedSubcategory:function(){return Pe.parsed.value.subcategory}},created:function(){var e=this;vc.fetchMenuItems().then((function(t){if(!Pe.parsed.value.subcategory){var n=t[0],r=n.subcategories[0];vc.enterSubcategory(n,r),e.propagateUrlChange(n,r)}})),Object(a["watch"])((function(){return Pe.parsed.value}),(function(e){var t=vc.findSubcategory(e.category,e.subcategory);vc.enterSubcategory(t.category,t.subcategory,t.subsubcategory)})),S.on("piwikPageChange",(function(){e.initialLoad||window.globalAjaxQueue.abort(),e.helpShownCategory=null,e.showSubcategoryHelpOnLoad&&(e.showHelp(e.showSubcategoryHelpOnLoad.category,e.showSubcategoryHelpOnLoad.subcategory),e.showSubcategoryHelpOnLoad=null),window.$("#loadingError").hide(),e.initialLoad=!1})),S.on("updateReportingMenu",(function(){vc.reloadMenuItems().then((function(){var e=Pe.parsed.value,t=e.category,n=e.subcategory;if(t&&n){var r=vc.findSubcategory(t,n);r&&vc.enterSubcategory(r.category,r.subcategory,r.subsubcategory)}})),Sc.reloadAvailableWidgets()}))},methods:{propagateUrlChange:function(e,t){var n=Pe.parsed.value;n.category===e.id&&n.subcategory===t.id?this.loadSubcategory(e,t):Pe.updateHash(Dc(Dc({},Pe.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){qo.remove(Ec);var t=vc.toggleCategory(e);if(t&&e.subcategories&&1===e.subcategories.length){this.helpShownCategory=null;var n=e.subcategories[0];this.propagateUrlChange(e,n)}},loadSubcategory:function(e,t,n){n&&(n.shiftKey||n.ctrlKey||n.metaKey)||(qo.remove(Ec),t&&t.id===this.activeSubcategory&&(this.helpShownCategory=null,setTimeout((function(){S.postEvent("loadPage",e.id,t.id)}))))},makeUrl:function(e,t){var n=Pe.parsed.value,r=n.idSite,i=n.period,a=n.date,o=n.segment,c=n.comparePeriods,l=n.compareDates,s=n.compareSegments;return Pe.stringify({idSite:r,period:i,date:a,segment:o,comparePeriods:c,compareDates:l,compareSegments:s,category:e.id,subcategory:t.id})},htmlEntities:function(e){return S.helper.htmlEntities(e)},showHelp:function(e,t,n){var r=Pe.parsed.value,i=r.category,a=r.subcategory;if((i!==e.id||a!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void Pe.updateHash(Dc(Dc({},Pe.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return qo.remove(Ec),void(this.helpShownCategory=null);var o=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),c="<strong>".concat(o,"</strong><br/>");qo.show({context:"info",id:Ec,type:"help",noclear:!0,class:"help-notification",message:c+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Vc.render=So;var Tc=Vc;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */Bt({component:Vc,directiveName:"piwikReportingMenu"});
+ */Bt({component:Tc,directiveName:"piwikReportingMenu"});
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Tc(e){return e.forEach((function(e){e.id===gc.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===gc.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===gc.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function Nc(){return{get menu(){return gc.menu.value},findSubcategory:gc.findSubcategory.bind(gc),reloadMenuItems:function(){return gc.reloadMenuItems().then((function(e){return Tc(Lt(e))}))},fetchMenuItems:function(){return gc.fetchMenuItems().then((function(e){return Tc(Lt(e))}))}}}
+function Nc(e){return e.forEach((function(e){e.id===vc.activeCategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===vc.activeSubcategory.value&&(e.active=!0,(e.subcategories||[]).forEach((function(e){e.id===vc.activeSubsubcategory.value&&(e.active=!0)})))})))})),e}function Ic(){return{get menu(){return vc.menu.value},findSubcategory:vc.findSubcategory.bind(vc),reloadMenuItems:function(){return vc.reloadMenuItems().then((function(e){return Nc(Lt(e))}))},fetchMenuItems:function(){return vc.fetchMenuItems().then((function(e){return Nc(Lt(e))}))}}}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-function Ic(){return{get pages(){return ec.pages.value},findPageInCategory:function(){return Mt(ec.findPageInCategory.apply(ec,arguments))},findPage:function(){return Mt(ec.findPage.apply(ec,arguments))},reloadAllPages:function(){return ec.reloadAllPages().then((function(e){return Lt(e)}))},getAllPages:function(){return ec.getAllPages().then((function(e){return Lt(e)}))}}}function Bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ac(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xc(e,t,n){return t&&Ac(e.prototype,t),n&&Ac(e,n),e}function Mc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
+function Bc(){return{get pages(){return tc.pages.value},findPageInCategory:function(){return Mt(tc.findPageInCategory.apply(tc,arguments))},findPage:function(){return Mt(tc.findPage.apply(tc,arguments))},reloadAllPages:function(){return tc.reloadAllPages().then((function(e){return Lt(e)}))},getAllPages:function(){return tc.getAllPages().then((function(e){return Lt(e)}))}}}function Ac(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mc(e,t,n){return t&&xc(e.prototype,t),n&&xc(e,n),e}function Lc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */angular.module("piwikApp.service").factory("reportingMenuModel",Nc),angular.module("piwikApp.service").factory("reportingPagesModel",Ic);var Lc=function(){function e(){var t=this;Bc(this,e),Mc(this,"privateState",Object(a["reactive"])({reports:[]})),Mc(this,"state",Object(a["readonly"])(this.privateState)),Mc(this,"reports",Object(a["computed"])((function(){return t.state.reports}))),Mc(this,"reportsPromise",void 0)}return xc(e,[{key:"findReport",value:function(e,t){return this.reports.value.find((function(n){return n.module===e&&n.action===t}))}},{key:"fetchReportMetadata",value:function(){var e=this;return this.reportsPromise||(this.reportsPromise=$e.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:S.idSite||Pe.parsed.value.idSite}).then((function(t){return e.privateState.reports=t,t}))),this.reportsPromise.then((function(){return e.reports.value}))}}]),e}(),$c=new Lc;
+ */angular.module("piwikApp.service").factory("reportingMenuModel",Ic),angular.module("piwikApp.service").factory("reportingPagesModel",Bc);var $c=function(){function e(){var t=this;Ac(this,e),Lc(this,"privateState",Object(a["reactive"])({reports:[]})),Lc(this,"state",Object(a["readonly"])(this.privateState)),Lc(this,"reports",Object(a["computed"])((function(){return t.state.reports}))),Lc(this,"reportsPromise",void 0)}return Mc(e,[{key:"findReport",value:function(e,t){return this.reports.value.find((function(n){return n.module===e&&n.action===t}))}},{key:"fetchReportMetadata",value:function(){var e=this;return this.reportsPromise||(this.reportsPromise=$e.fetch({method:"API.getReportMetadata",filter_limit:"-1",idSite:S.idSite||Pe.parsed.value.idSite}).then((function(t){return e.privateState.reports=t,t}))),this.reportsPromise.then((function(){return e.reports.value}))}}]),e}(),Rc=new $c;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-angular.module("piwikApp.service").factory("reportMetadataModel",(function(){return{get reports(){return $c.reports.value},findReport:$c.findReport.bind($c),fetchReportMetadata:function(){return $c.fetchReportMetadata().then((function(e){return Lt(e)}))}}}));var Rc={key:0},Hc={class:"notification system notification-error"},Fc={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},_c={class:"theWidgetContent",ref:"widgetContent"};function Uc(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("ActivityIndicator");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[e.widgetName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Rc,Object(a["toDisplayString"])(e.widgetName),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Hc,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",Fc,Object(a["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(a["createCommentVNode"])("",!0)])],512),[[a["vShow"],e.loadingFailed]]),Object(a["createElementVNode"])("div",_c,null,512)])}function qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(n),!0).forEach((function(t){Jc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gc=Object(a["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:Ha},data:function(){return{loading:!1,loadingFailed:"",changeCounter:0,lastWidgetRequest:null,currentScope:null}},watch:{widgetParams:function(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{loadingMessage:function(){return this.widgetName?C("General_LoadingPopover",this.widgetName):C("General_LoadingData")},hasErrorFaqLink:function(){var e=S.config.enable_general_settings_admin,t=S.config.enable_plugins_admin;return S.hasSuperUserAccess&&(e||t)}},mounted:function(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},unmounted:function(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded:function(){this.lastWidgetRequest&&(this.lastWidgetRequest.abort(),this.lastWidgetRequest=null)},cleanupLastWidgetContent:function(){var e=this.$refs.widgetContent;e&&(e.innerHTML=""),this.currentScope&&this.currentScope.$destroy()},getWidgetUrl:function(e){var t=Pe.parsed.value,n=Wc({},e||{}),r=Object.keys(Wc(Wc({},Pe.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),xn.isComparisonEnabled()&&(n=Wc(Wc({},n),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(n.showtitle="1"),S.shouldPropagateTokenAuth&&t.token_auth&&(S.broadcast.isWidgetizeRequestWithoutSession()||(n.force_api_session="1"),n.token_auth=t.token_auth),n.random=Math.floor(1e4*Math.random()),n},loadWidgetUrl:function(e,t){var n=this;this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetRequest=$e.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"}}),this.lastWidgetRequest.then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetRequest=null,n.loading=!1,n.loadingFailed=!1;var i=n.$refs.widgetContent;window.$(i).html(r);var a=window.$(i).children();if(n.widgetName){var o=a.find("> .card-content .card-title");o.length||(o=a.find("> h2")),o.length&&o.html(S.helper.htmlEntities(n.widgetName))}var c=S.helper.getAngularDependency("$rootScope"),l=c.$new();n.currentScope=l,S.helper.compileAngularComponents(a,{scope:l}),Uo.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:a})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetRequest=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});Gc.render=Uc;var zc=Gc;
+angular.module("piwikApp.service").factory("reportMetadataModel",(function(){return{get reports(){return Rc.reports.value},findReport:Rc.findReport.bind(Rc),fetchReportMetadata:function(){return Rc.fetchReportMetadata().then((function(e){return Lt(e)}))}}}));var Hc={key:0},Fc={class:"notification system notification-error"},_c={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},Uc={class:"theWidgetContent",ref:"widgetContent"};function qc(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("ActivityIndicator");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[e.widgetName?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",Hc,Object(a["toDisplayString"])(e.widgetName),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Fc,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",_c,Object(a["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(a["createCommentVNode"])("",!0)])],512),[[a["vShow"],e.loadingFailed]]),Object(a["createElementVNode"])("div",Uc,null,512)])}function Wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(n),!0).forEach((function(t){Gc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Gc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zc=Object(a["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:Fa},data:function(){return{loading:!1,loadingFailed:"",changeCounter:0,lastWidgetRequest:null,currentScope:null}},watch:{widgetParams:function(e){e&&this.loadWidgetUrl(e,this.changeCounter+=1)}},computed:{loadingMessage:function(){return this.widgetName?C("General_LoadingPopover",this.widgetName):C("General_LoadingData")},hasErrorFaqLink:function(){var e=S.config.enable_general_settings_admin,t=S.config.enable_plugins_admin;return S.hasSuperUserAccess&&(e||t)}},mounted:function(){this.widgetParams&&this.loadWidgetUrl(this.widgetParams,this.changeCounter+=1)},unmounted:function(){this.cleanupLastWidgetContent()},methods:{abortHttpRequestIfNeeded:function(){this.lastWidgetRequest&&(this.lastWidgetRequest.abort(),this.lastWidgetRequest=null)},cleanupLastWidgetContent:function(){var e=this.$refs.widgetContent;e&&(e.innerHTML=""),this.currentScope&&this.currentScope.$destroy()},getWidgetUrl:function(e){var t=Pe.parsed.value,n=Jc({},e||{}),r=Object.keys(Jc(Jc({},Pe.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),xn.isComparisonEnabled()&&(n=Jc(Jc({},n),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(n.showtitle="1"),S.shouldPropagateTokenAuth&&t.token_auth&&(S.broadcast.isWidgetizeRequestWithoutSession()||(n.force_api_session="1"),n.token_auth=t.token_auth),n.random=Math.floor(1e4*Math.random()),n},loadWidgetUrl:function(e,t){var n=this;this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetRequest=$e.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"}}),this.lastWidgetRequest.then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetRequest=null,n.loading=!1,n.loadingFailed=!1;var i=n.$refs.widgetContent;window.$(i).html(r);var a=window.$(i).children();if(n.widgetName){var o=a.find("> .card-content .card-title");o.length||(o=a.find("> h2")),o.length&&o.html(S.helper.htmlEntities(n.widgetName))}var c=S.helper.getAngularDependency("$rootScope"),l=c.$new();n.currentScope=l,S.helper.compileAngularComponents(a,{scope:l}),qo.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:a})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetRequest=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});zc.render=qc;var Yc=zc;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */Bt({component:zc,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function Yc(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.actualContainer,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function Qc(e){return Zc(e)||Xc(e)||al(e)||Kc()}function Kc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Zc(e){if(Array.isArray(e))return ol(e)}function el(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?el(Object(n),!0).forEach((function(t){nl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):el(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rl(e,t){return ll(e)||cl(e,t)||al(e,t)||il()}function il(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function al(e,t){if(e){if("string"===typeof e)return ol(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ol(e,t):void 0}}function ol(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cl(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(l){c=!0,i=l}finally{try{o||null==n["return"]||n["return"]()}finally{if(c)throw i}}return a}}function ll(e){if(Array.isArray(e))return e}var sl=Zt("CoreHome","Widget"),ul=Object(a["defineComponent"])({props:{container:Array},components:{Widget:sl},computed:{actualContainer:function(){var e,t=this.container;if(null===t||void 0===t||null===(e=t[0])||void 0===e||!e.parameters)return t;var n=rl(t,1),r=n[0],i="1"===r.parameters.widget||1===r.parameters.widget,a=i&&"graphEvolution"===r.viewDataTable,o=a?tl(tl({},r),{},{parameters:tl(tl({},r.parameters),{},{showtitle:"0"})}):r;return[o].concat(Qc(t.slice(1)))}}});ul.render=Yc;var dl=ul,pl=(Bt({component:dl,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),fl={class:"entityList"},ml={class:"listCircle"},hl=["onClick"],gl={class:"dimension"},vl={class:"reportContainer"},bl=Object(a["createElementVNode"])("div",{class:"clear"},null,-1);
+ */Bt({component:Yc,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function Qc(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.actualContainer,(function(e,t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:t},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(c,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function Kc(e){return el(e)||Zc(e)||ol(e)||Xc()}function Xc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Zc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function el(e){if(Array.isArray(e))return cl(e)}function tl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tl(Object(n),!0).forEach((function(t){rl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function il(e,t){return sl(e)||ll(e,t)||ol(e,t)||al()}function al(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ol(e,t){if(e){if("string"===typeof e)return cl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cl(e,t):void 0}}function cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ll(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(l){c=!0,i=l}finally{try{o||null==n["return"]||n["return"]()}finally{if(c)throw i}}return a}}function sl(e){if(Array.isArray(e))return e}var ul=Zt("CoreHome","Widget"),dl=Object(a["defineComponent"])({props:{container:Array},components:{Widget:ul},computed:{actualContainer:function(){var e,t=this.container;if(null===t||void 0===t||null===(e=t[0])||void 0===e||!e.parameters)return t;var n=il(t,1),r=n[0],i="1"===r.parameters.widget||1===r.parameters.widget,a=i&&"graphEvolution"===r.viewDataTable,o=a?nl(nl({},r),{},{parameters:nl(nl({},r.parameters),{},{showtitle:"0"})}):r;return[o].concat(Kc(t.slice(1)))}}});dl.render=Qc;var pl=dl,fl=(Bt({component:pl,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),ml={class:"entityList"},hl={class:"listCircle"},gl=["onClick"],vl={class:"dimension"},bl={class:"reportContainer"},yl=Object(a["createElementVNode"])("div",{class:"clear"},null,-1);
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function yl(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("WidgetLoader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",pl,[Object(a["createElementVNode"])("div",fl,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgetsByCategory,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("ul",ml,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.widgets,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(a["createElementVNode"])("span",gl,Object(a["toDisplayString"])(t.name),1)],10,hl)})),128))])])})),128))]),Object(a["createElementVNode"])("div",vl,[e.selectedWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(a["createCommentVNode"])("",!0)]),bl])}function Ol(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ol(Object(n),!0).forEach((function(t){jl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ol(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kl(e,t){return El(e)||Pl(e,t)||Cl(e,t)||Sl()}function Sl(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cl(e,t){if(e){if("string"===typeof e)return Dl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dl(e,t):void 0}}function Dl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pl(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(l){c=!0,i=l}finally{try{o||null==n["return"]||n["return"]()}finally{if(c)throw i}}return a}}function El(e){if(Array.isArray(e))return e}var Vl=Object(a["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:zc},data:function(){return{selectedWidget:null}},created:function(){var e=kl(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return cc(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n=t.subcategory.name;e[n]||(e[n]={name:n,order:t.order,widgets:[]}),e[n].widgets.push(t)})),cc(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=wl({},e)}}});Vl.render=yl;var Tl=Vl,Nl=(Bt({component:Tl,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),Il={key:1},Bl={key:2};
+ */function Ol(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("WidgetLoader");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",fl,[Object(a["createElementVNode"])("div",ml,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgetsByCategory,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(a["createTextVNode"])(Object(a["toDisplayString"])(t.name)+" ",1),Object(a["createElementVNode"])("ul",hl,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(t.widgets,(function(t){return Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{class:Object(a["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(a["createElementVNode"])("span",vl,Object(a["toDisplayString"])(t.name),1)],10,gl)})),128))])])})),128))]),Object(a["createElementVNode"])("div",bl,[e.selectedWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(a["createCommentVNode"])("",!0)]),yl])}function wl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wl(Object(n),!0).forEach((function(t){kl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sl(e,t){return Vl(e)||El(e,t)||Dl(e,t)||Cl()}function Cl(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Dl(e,t){if(e){if("string"===typeof e)return Pl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pl(e,t):void 0}}function Pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function El(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done);o=!0)if(a.push(r.value),t&&a.length===t)break}catch(l){c=!0,i=l}finally{try{o||null==n["return"]||n["return"]()}finally{if(c)throw i}}return a}}function Vl(e){if(Array.isArray(e))return e}var Tl=Object(a["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:Yc},data:function(){return{selectedWidget:null}},created:function(){var e=Sl(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return lc(this.widgets)},widgetsByCategory:function(){var e={};return this.widgetsSorted.forEach((function(t){var n=t.subcategory.name;e[n]||(e[n]={name:n,order:t.order,widgets:[]}),e[n].widgets.push(t)})),lc(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=jl({},e)}}});Tl.render=Ol;var Nl=Tl,Il=(Bt({component:Nl,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),Bl={key:1},Al={key:2};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Al(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("WidgetLoader"),l=Object(a["resolveComponent"])("WidgetContainer"),s=Object(a["resolveComponent"])("WidgetByDimensionContainer"),u=Object(a["resolveDirective"])("tooltips");return e.actualWidget?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Il,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Bl,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(a["createCommentVNode"])("",!0)],10,Nl)),[[a["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(a["createCommentVNode"])("",!0)}function xl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ml(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xl(Object(n),!0).forEach((function(t){Ll(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ll(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $l(e,t){var n;return Object.values(e||{}).some((function(e){return n=e.find((function(e){return e&&e.isContainer&&e.parameters.containerId===t})),n})),n}var Rl=Object(a["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:zc,WidgetContainer:dl,WidgetByDimensionContainer:Tl},directives:{Tooltips:zn},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title");return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;t&&t.middlewareParameters?$e.fetch(t.middlewareParameters).then((function(t){e.showWidget=!!t})):this.showWidget=!0},computed:{allWidgets:function(){return kc.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Ml({},t);if(t&&t.isReport&&!t.documentation){var r=$c.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=$l(this.allWidgets,this.containerid);if(i){var a=Ml({},i);return this.widgetized&&(a.isFirstInPage=!0,a.parameters=Ml(Ml({},a.parameters),{},{widget:"1"}),a.widgets&&(a.widgets=a.widgets.map((function(t){return Ml(Ml({},t),{},{parameters:Ml(Ml({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))),a}}return null}}});Rl.render=Al;var Hl=Rl,Fl=(Bt({component:Hl,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),_l={key:1,class:"col s12 l6 leftWidgetColumn"},Ul={key:2,class:"col s12 l6 rightWidgetColumn"};
+ */function xl(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("WidgetLoader"),l=Object(a["resolveComponent"])("WidgetContainer"),s=Object(a["resolveComponent"])("WidgetByDimensionContainer"),u=Object(a["resolveDirective"])("tooltips");return e.actualWidget?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,class:Object(a["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(a["openBlock"])(),Object(a["createBlock"])(c,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Bl,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(a["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Al,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(a["createCommentVNode"])("",!0)],10,Il)),[[a["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(a["createCommentVNode"])("",!0)}function Ml(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ll(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ml(Object(n),!0).forEach((function(t){$l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rl(e,t){var n;return Object.values(e||{}).some((function(e){return n=e.find((function(e){return e&&e.isContainer&&e.parameters.containerId===t})),n})),n}var Hl=Object(a["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:Yc,WidgetContainer:pl,WidgetByDimensionContainer:Nl},directives:{Tooltips:zn},data:function(){return{showWidget:!1}},setup:function(){function e(){var e=window.$(this);if(""===e.attr("piwik-field")||e.hasClass("matomo-form-field"))return"";var t=window.$(this).attr("title");return window.vueSanitize(t.replace(/\n/g,"<br />"))}return{tooltipContent:e}},created:function(){var e=this,t=this.actualWidget;t&&t.middlewareParameters?$e.fetch(t.middlewareParameters).then((function(t){e.showWidget=!!t})):this.showWidget=!0},computed:{allWidgets:function(){return Sc.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Ll({},t);if(t&&t.isReport&&!t.documentation){var r=Rc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Rl(this.allWidgets,this.containerid);if(i){var a=Ll({},i);return this.widgetized&&(a.isFirstInPage=!0,a.parameters=Ll(Ll({},a.parameters),{},{widget:"1"}),a.widgets&&(a.widgets=a.widgets.map((function(t){return Ll(Ll({},t),{},{parameters:Ll(Ll({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))),a}}return null}}});Hl.render=xl;var Fl=Hl,_l=(Bt({component:Fl,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),Ul={key:1,class:"col s12 l6 leftWidgetColumn"},ql={key:2,class:"col s12 l6 rightWidgetColumn"};
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function ql(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("ActivityIndicator"),l=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Fl,[Object(a["createVNode"])(c,{loading:e.loading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,Object(a["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[a["vShow"],e.hasNoPage]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgets,(function(e){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_l,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.left,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ul,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.right,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0)])})),128))])}function Wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gl(e,t,n){return t&&Jl(e.prototype,t),n&&Jl(e,n),e}function zl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(n),!0).forEach((function(t){Ql(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ql(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kl(e){return ts(e)||es(e)||Zl(e)||Xl()}function Xl(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Zl(e,t){if(e){if("string"===typeof e)return ns(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ns(e,t):void 0}}function es(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ts(e){if(Array.isArray(e))return ns(e)}function ns(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
+ */function Wl(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("ActivityIndicator"),l=Object(a["resolveComponent"])("Widget");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",_l,[Object(a["createVNode"])(c,{loading:e.loading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,Object(a["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[a["vShow"],e.hasNoPage]]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.widgets,(function(e){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ul,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.left,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0),e.group?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",ql,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.right,(function(e){return Object(a["openBlock"])(),Object(a["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(a["createCommentVNode"])("",!0)])})),128))])}function Jl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zl(e,t,n){return t&&Gl(e.prototype,t),n&&Gl(e,n),e}function Yl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ql(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yl(Object(n),!0).forEach((function(t){Kl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xl(e){return ns(e)||ts(e)||es(e)||Zl()}function Zl(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function es(e,t){if(e){if("string"===typeof e)return rs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rs(e,t):void 0}}function ts(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ns(e){if(Array.isArray(e))return rs(e)}function rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function rs(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function is(e){if(e&&e[0]){var t=Kl(e);return e[0].group?t[0]=Yl(Yl({},t[0]),{},{left:is(e[0].left),right:is(e[0].right)}):t[0]=Yl(Yl({},t[0]),{},{isFirstInPage:!0}),t}return e}var as=function(){function e(){var t=this;Wl(this,e),Ql(this,"privateState",Object(a["reactive"])({page:null})),Ql(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Ql(this,"page",Object(a["computed"])((function(){return t.state.value.page}))),Ql(this,"widgets",Object(a["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},a=function(e){if(!e.isReport)return[];var t=$c.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(a(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=cc(n),1===n.length)return is(n);for(var o=[],c=0;c<n.length;c+=1){var l=n[c];if(rs(l)||n[c+1]&&rs(n[c+1]))o.push(Yl(Yl({},l),{},{widgets:cc(l.widgets)}));else{var s=0,u=[l],d=[];while(n[c+1]&&!rs(n[c+1]))c+=1,s+=1,s%2===0?u.push(n[c]):d.push(n[c]);o.push({group:!0,left:u,right:d})}}return o=is(o),o})))}return Gl(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([ec.getAllPages(),$c.fetchReportMetadata()]).then((function(){return n.privateState.page=ec.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=null}}]),e}(),os=new as;function cs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ls(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cs(Object(n),!0).forEach((function(t){ss(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ss(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var us=window,ds=us.$;function ps(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);Uo.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function fs(){Uo.remove("onlyRawData")}var ms=Object(a["defineComponent"])({components:{ActivityIndicator:Ha,Widget:Hl},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;os.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Pe.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(fs(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return os.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return os.resetPage(),void(this.loading=!1);var r=Pe.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return Uo.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),os.resetPage(),void(this.loading=!1)}if(Uo.remove("invalidDate"),S.postEvent("piwikPageChange",{}),Uo.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired(),"Dashboard_Dashboard"===e&&ds.isNumeric(t)&&ds("[piwik-dashboard]").length){this.loading=!0;var o=ds("[piwik-dashboard]"),c=angular.element(o).scope();c.fetchDashboard(parseInt(t,10)).then((function(){n.loading=!1}),(function(){n.loading=!1}))}else os.fetchPage(e,t).then((function(){var t=!os.page.value;if(t){var r=ec.findPageInCategory(e);if(r&&r.subcategory)return void Pe.updateHash(ls(ls({},Pe.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Pe.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&ps();var t=Pe.parsed.value,n=t.segment;if(n)fs();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"];if(-1===r.indexOf(t.subcategory)&&-1===i.indexOf(t.category)&&-1===t.subcategory.toLowerCase().indexOf("manage")){var a=6e4;this.dateLastChecked&&(new Date).getTime()-this.dateLastChecked<a||$e.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=(new Date).getTime(),t.value>0?(e.hasNoVisits=!1,void fs()):(e.hasNoVisits=!0,e.hasRawData?void ps():$e.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void fs();e.hasRawData=!0,ps()}))}else fs()}}}});ms.render=ql;var hs=ms,gs=(Bt({component:hs,directiveName:"piwikReportingPage"}),Bt({component:Ha,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"}));
+ */function is(e){return!!(e.isContainer&&e.layout&&"ByDimension"===e.layout||"bydimension"===e.viewDataTable)||(!!e.isWide||e.viewDataTable&&("tableAllColumns"===e.viewDataTable||"sparklines"===e.viewDataTable||"graphEvolution"===e.viewDataTable))}function as(e){if(e&&e[0]){var t=Xl(e);return e[0].group?t[0]=Ql(Ql({},t[0]),{},{left:as(e[0].left),right:as(e[0].right)}):t[0]=Ql(Ql({},t[0]),{},{isFirstInPage:!0}),t}return e}var os=function(){function e(){var t=this;Jl(this,e),Kl(this,"privateState",Object(a["reactive"])({page:null})),Kl(this,"state",Object(a["computed"])((function(){return Object(a["readonly"])(t.privateState)}))),Kl(this,"page",Object(a["computed"])((function(){return t.state.value.page}))),Kl(this,"widgets",Object(a["computed"])((function(){var e=t.page.value;if(!e)return[];var n=[],r={},i=function(e){return e.isReport&&r["".concat(e.module,".").concat(e.action)]},a=function(e){if(!e.isReport)return[];var t=Rc.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(a(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=lc(n),1===n.length)return as(n);for(var o=[],c=0;c<n.length;c+=1){var l=n[c];if(is(l)||n[c+1]&&is(n[c+1]))o.push(Ql(Ql({},l),{},{widgets:lc(l.widgets)}));else{var s=0,u=[l],d=[];while(n[c+1]&&!is(n[c+1]))c+=1,s+=1,s%2===0?u.push(n[c]):d.push(n[c]);o.push({group:!0,left:u,right:d})}}return o=as(o),o})))}return zl(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([tc.getAllPages(),Rc.fetchReportMetadata()]).then((function(){return n.privateState.page=tc.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=null}}]),e}(),cs=new os;function ls(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ss(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ls(Object(n),!0).forEach((function(t){us(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ls(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function us(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ds=window,ps=ds.$;function fs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);qo.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function ms(){qo.remove("onlyRawData")}var hs=Object(a["defineComponent"])({components:{ActivityIndicator:Fa,Widget:Fl},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;cs.resetPage(),this.loading=!0,this.renderInitialPage(),Object(a["watch"])((function(){return Pe.parsed.value}),(function(t,n){t.category===n.category&&t.subcategory===n.subcategory&&t.period===n.period&&t.date===n.date&&t.segment===n.segment&&JSON.stringify(t.compareDates)===JSON.stringify(n.compareDates)&&JSON.stringify(t.comparePeriods)===JSON.stringify(n.comparePeriods)&&JSON.stringify(t.compareSegments)===JSON.stringify(n.compareSegments)&&JSON.stringify(t.columns||"")===JSON.stringify(n.columns||"")||(t.date===n.date&&t.period===n.period||(ms(),e.dateLastChecked=null,e.hasRawData=!1,e.hasNoVisits=!1),e.renderPage(t.category,t.subcategory))})),S.on("loadPage",(function(t,n){e.renderPage(t,n)}))},computed:{widgets:function(){return cs.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return cs.resetPage(),void(this.loading=!1);var r=Pe.parsed.value,i=r.period,a=r.date;try{p.parse(i,a)}catch(l){return qo.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),cs.resetPage(),void(this.loading=!1)}if(qo.remove("invalidDate"),S.postEvent("piwikPageChange",{}),qo.clearTransientNotifications(),p.parse(i,a).containsToday()&&this.showOnlyRawDataMessageIfRequired(),"Dashboard_Dashboard"===e&&ps.isNumeric(t)&&ps("[piwik-dashboard]").length){this.loading=!0;var o=ps("[piwik-dashboard]"),c=angular.element(o).scope();c.fetchDashboard(parseInt(t,10)).then((function(){n.loading=!1}),(function(){n.loading=!1}))}else cs.fetchPage(e,t).then((function(){var t=!cs.page.value;if(t){var r=tc.findPageInCategory(e);if(r&&r.subcategory)return void Pe.updateHash(ss(ss({},Pe.hashParsed.value),{},{subcategory:r.subcategory.id}))}n.hasNoPage=t,n.loading=!1}))},renderInitialPage:function(){var e=Pe.parsed.value;this.renderPage(e.category,e.subcategory)},showOnlyRawDataMessageIfRequired:function(){var e=this;this.hasRawData&&this.hasNoVisits&&fs();var t=Pe.parsed.value,n=t.segment;if(n)ms();else{var r=["Live_VisitorLog","General_RealTime","UserCountryMap_RealTimeMap","MediaAnalytics_TypeAudienceLog","MediaAnalytics_TypeRealTime","FormAnalytics_TypeRealTime","Goals_AddNewGoal"],i=["HeatmapSessionRecording_Heatmaps","HeatmapSessionRecording_SessionRecordings","Marketplace_Marketplace"];if(-1===r.indexOf(t.subcategory)&&-1===i.indexOf(t.category)&&-1===t.subcategory.toLowerCase().indexOf("manage")){var a=6e4;this.dateLastChecked&&(new Date).getTime()-this.dateLastChecked<a||$e.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=(new Date).getTime(),t.value>0?(e.hasNoVisits=!1,void ms()):(e.hasNoVisits=!0,e.hasRawData?void fs():$e.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void ms();e.hasRawData=!0,fs()}))}else ms()}}}});hs.render=Wl;var gs=hs,vs=(Bt({component:gs,directiveName:"piwikReportingPage"}),Bt({component:Fa,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:function(){return C("General_LoadingData")}}},$inject:[],directiveName:"piwikActivityIndicator"}));
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bs(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["alert",vs({},"alert-".concat(e.severity),!0)])},[Object(a["renderSlot"])(e.$slots,"default")],2)}var ys=Object(a["defineComponent"])({props:{severity:{type:String,required:!0}}});ys.render=bs;var Os=ys,ws=Bt({component:Os,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0});
+ */function bs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ys(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["alert",bs({},"alert-".concat(e.severity),!0)])},[Object(a["renderSlot"])(e.$slots,"default")],2)}var Os=Object(a["defineComponent"])({props:{severity:{type:String,required:!0}}});Os.render=ys;var ws=Os,js=Bt({component:ws,scope:{severity:{vue:"severity",angularJsBind:"@piwikAlert"}},directiveName:"piwikAlert",transclude:!0});
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function js(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function ks(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Ss(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")}
+ */function ks(e,t,n){var r=new Date;n||(n=432e4),r.setTime(r.getTime()+n),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/")}function Ss(e){var t="; ".concat(document.cookie),n=t.split("; ".concat(e,"="));if(2==n.length){var r=n.pop().split(";").shift();if("undefined"!==typeof r)return r}return null}function Cs(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")}
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts b/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts
new file mode 100644
index 0000000000..e2f0841766
--- /dev/null
+++ b/plugins/CoreHome/vue/src/SiteSelector/SitesStore.adapter.ts
@@ -0,0 +1,24 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+import SitesStore from './SitesStore';
+import { cloneThenApply } from '../createAngularJsAdapter';
+
+function siteSelectorModelAdapter() {
+ return {
+ get initialSites() {
+ return SitesStore.initialSites.value;
+ },
+ loadSite: SitesStore.loadSite.bind(SitesStore),
+ loadInitialSites: () => cloneThenApply(SitesStore.loadInitialSites()),
+ searchSite: (...args: Parameters<typeof SitesStore['searchSite']>) => cloneThenApply(
+ SitesStore.searchSite(...args),
+ ),
+ };
+}
+
+angular.module('piwikApp.service').factory('siteSelectorModel', siteSelectorModelAdapter);
diff --git a/plugins/CoreHome/vue/src/index.ts b/plugins/CoreHome/vue/src/index.ts
index 24c019b62e..e251167cce 100644
--- a/plugins/CoreHome/vue/src/index.ts
+++ b/plugins/CoreHome/vue/src/index.ts
@@ -30,6 +30,7 @@ import './DatePicker/DatePicker.adapter';
import './DateRangePicker/DateRangePicker.adapter';
import './PeriodDatePicker/PeriodDatePicker.adapter';
import './SiteSelector/SiteSelector.adapter';
+import './SiteSelector/SitesStore.adapter';
import './QuickAccess/QuickAccess.adapter';
import './FieldArray/FieldArray.adapter';
import './MultiPairField/MultiPairField.adapter';