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

CoreHome.umd.min.js « dist « vue « CoreHome « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 80c2b28caf19e2abb78fb7c260a58a6ac978c5b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["CoreHome"]=t(require("vue")):e["CoreHome"]=t(e["Vue"])})("undefined"!==typeof self?self:this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CoreHome/vue/dist/",n(n.s="fae3")}({2342:function(e,t,n){"use strict";
/*!
 * Matomo - free/libre analytics platform
 *
 * @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,"createAngularJsAdapter",(function(){return ie})),n.d(t,"activityIndicatorAdapter",(function(){return Ae})),n.d(t,"ActivityIndicator",(function(){return Ne})),n.d(t,"translate",(function(){return k})),n.d(t,"alertAdapter",(function(){return Ve})),n.d(t,"AjaxHelper",(function(){return U})),n.d(t,"MatomoUrl",(function(){return o})),n.d(t,"Matomo",(function(){return P})),n.d(t,"Periods",(function(){return u})),n.d(t,"Day",(function(){return S})),n.d(t,"Week",(function(){return E})),n.d(t,"Month",(function(){return I})),n.d(t,"Year",(function(){return H})),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 h})),n.d(t,"todayIsInRange",(function(){return m})),n.d(t,"MatomoDialog",(function(){return re})),n.d(t,"EnrichedHeadline",(function(){return ve})),n.d(t,"ContentBlock",(function(){return Ie})),"undefined"!==typeof window){var r=window.document.currentScript,a=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
const i={getSearchParam(e){const t=window.location.href.split("#"),n=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}};var o=i;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function s(){const e={getSearchParam:o.getSearchParam.bind(o)};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}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */s.$inject=[],angular.module("piwikApp.service").service("piwikUrl",s);class c{constructor(){l(this,"periods",{}),l(this,"periodOrder",[])}addCustomPeriod(e,t){if(this.periods[e])throw new Error(`The "${e}" period already exists! It cannot be overridden.`);this.periods[e]=t,this.periodOrder.push(e)}getAllLabels(){return Array().concat(this.periodOrder)}get(e){const t=this.periods[e];if(!t)throw new Error("Invalid period label: "+e);return t}parse(e,t){return this.get(e).parse(t)}isRecognizedPeriod(e){return!!this.periods[e]}}var u=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
 */function d(e){return $.datepicker.formatDate("yy-mm-dd",e)}function p(){const e=new Date(Date.now());return e.setTime(e.getTime()+60*e.getTimezoneOffset()*1e3),e.setHours(e.getHours()+(window.piwik.timezoneOffset||0)/3600),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}function h(e){if(e instanceof Date)return e;const t=decodeURIComponent(e);if("today"===t||"now"===t)return p();if("yesterday"===t||"yesterdaySameTime"===t){const e=p();return e.setDate(e.getDate()-1),e}if(t.match(/last[ -]?week/i)){const e=p();return e.setDate(e.getDate()-7),e}if(t.match(/last[ -]?month/i)){const e=p();return e.setDate(1),e.setMonth(e.getMonth()-1),e}if(t.match(/last[ -]?year/i)){const e=p();return e.setFullYear(e.getFullYear()-1),e}try{return $.datepicker.parseDate("yy-mm-dd",t)}catch(n){throw console.error(n.message||n),n}}function m(e){return 2===e.length&&(p()>=e[0]&&p()<=e[1])}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */let g;const{piwik:f,broadcast:b,piwikHelper:w}=window;function y(e,t){try{return u.parse(e,t),!0}catch(n){return!1}}f.helper=w,f.broadcast=b,f.updatePeriodParamsFromUrl=function(){let e=o.getSearchParam("date");const t=o.getSearchParam("period");if(!y(t,e))return;if(f.period===t&&f.currentDateString===e)return;f.period=t;const n=u.parse(t,e).getDateRange();f.startDateString=d(n[0]),f.endDateString=d(n[1]),f.updateDateInTitle(e,t),"range"===f.period&&(e=`${f.startDateString},${f.endDateString}`),f.currentDateString=e},f.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(g=g||document.title,0===g.indexOf(f.siteName))){const n=` - ${u.parse(t,e).getPrettyString()} `;document.title=`${f.siteName}${n}${g.substr(f.siteName.length)}`}},f.hasUserCapability=function(e){return window.angular.isArray(f.userCapabilities)&&-1!==f.userCapabilities.indexOf(e)};const D=f;var P=D;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function v(){return P}function j(e,t){t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}angular.module("piwikApp.service").service("piwik",v),j.$inject=["piwik","$rootScope"],angular.module("piwikApp.service").run(j);n("2342");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function k(e,...t){let n=t;return 1===t.length&&t[0]&&t[0]instanceof Array&&([n]=t),window._pk_translate(e,n)}function O(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
 */class S{constructor(e){O(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new S(h(e))}static getDisplayText(){return k("Intl_PeriodDay")}getPrettyString(){return d(this.dateInPeriod)}getDateRange(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}containsToday(){return m(this.getDateRange())}}function T(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
 */u.addCustomPeriod("day",S);class E{constructor(e){T(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new E(h(e))}static getDisplayText(){return k("Intl_PeriodWeek")}getPrettyString(){const e=this.getDateRange(),t=d(e[0]),n=d(e[1]);return k("General_DateRangeFromTo",[t,n])}getDateRange(){const e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);const n=new Date(t.getTime());return n.setDate(t.getDate()+6),[t,n]}containsToday(){return m(this.getDateRange())}}function C(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
 */u.addCustomPeriod("week",E);class I{constructor(e){C(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new I(h(e))}static getDisplayText(){return k("Intl_PeriodMonth")}getPrettyString(){const e=k("Intl_Month_Long_StandAlone_"+(this.dateInPeriod.getMonth()+1));return`${e} ${this.dateInPeriod.getFullYear()}`}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}function x(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
 */u.addCustomPeriod("month",I);class H{constructor(e){x(this,"dateInPeriod",void 0),this.dateInPeriod=e}static parse(e){return new H(h(e))}static getDisplayText(){return k("Intl_PeriodYear")}getPrettyString(){return this.dateInPeriod.getFullYear().toString()}getDateRange(){const e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);const t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}containsToday(){return m(this.getDateRange())}}function R(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
 */u.addCustomPeriod("year",H);class F{constructor(e,t,n){R(this,"startDate",void 0),R(this,"endDate",void 0),R(this,"childPeriodType",void 0),this.startDate=e,this.endDate=t,this.childPeriodType=n}static getLastNRange(e,t,n){const r=Math.max(parseInt(t.toString(),10)-1,0);if(Number.isNaN(r))throw new Error("Invalid range strAmount");let a=n?h(n):p(),i=new Date(a.getTime());if("day"===e)i.setDate(i.getDate()-r);else if("week"===e)i.setDate(i.getDate()-7*r);else if("month"===e)i.setDate(1),i.setMonth(i.getMonth()-r);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);i.setFullYear(i.getFullYear()-r)}if("day"!==e){const t=u.periods[e].parse(i),n=u.periods[e].parse(a);[i]=t.getDateRange(),[,a]=n.getDateRange()}const o=new Date(1991,7,6);if(i.getTime()-o.getTime()<0)switch(e){case"year":i=new Date(1992,0,1);break;case"month":i=new Date(1991,8,1);break;case"week":i=new Date(1991,8,12);break;case"day":default:i=o;break}return new F(i,a,e)}static getLastNRangeChild(e,t,n){const r=t?h(t):p();let a=new Date(r.getTime()),i=new Date(r.getTime());if("day"===e)a.setDate(a.getDate()-n),i.setDate(i.getDate()-n);else if("week"===e)a.setDate(a.getDate()-7*n),i.setDate(i.getDate()-7*n);else if("month"===e)a.setDate(1),a.setMonth(a.getMonth()-n),i.setDate(1),i.setMonth(i.getMonth()-n);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);a.setFullYear(a.getFullYear()-n),i.setFullYear(i.getFullYear()-n)}if("day"!==e){const t=u.periods[e].parse(a),n=u.periods[e].parse(i);[a]=t.getDateRange(),[,i]=n.getDateRange()}const o=new Date(1991,7,6);if(a.getTime()-o.getTime()<0)switch(e){case"year":a=new Date(1992,0,1);break;case"month":a=new Date(1991,8,1);break;case"week":a=new Date(1991,8,12);break;case"day":default:a=o;break}return new F(a,i,e)}static parse(e,t="day"){if(/^previous/.test(e)){const n=F.getLastNRange(t,"2").startDate;return F.getLastNRange(t,e.substring(8),n)}if(/^last/.test(e))return F.getLastNRange(t,e.substring(4));const n=decodeURIComponent(e).split(",");return new F(h(n[0]),h(n[1]),t)}static getDisplayText(){return k("General_DateRangeInPeriodList")}getPrettyString(){const e=d(this.startDate),t=d(this.endDate);return k("General_DateRangeFromTo",[e,t])}getDateRange(){return[this.startDate,this.endDate]}containsToday(){return m(this.getDateRange())}}function N(){return{getAllLabels:u.getAllLabels.bind(u),isRecognizedPeriod:u.isRecognizedPeriod.bind(u),get:u.get.bind(u),parse:u.parse.bind(u),parseDate:h,format:d,RangePeriod:F,todayIsInRange:m}}function A(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 B(e,t){if("abort"===t)return;const n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}u.addCustomPeriod("range",F),
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
window.piwik.addCustomPeriod=u.addCustomPeriod.bind(u),angular.module("piwikApp.service").factory("piwikPeriods",N),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(let e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(...e){return this.active+=e.length,this.clean(),Array.prototype.push.call(this,...e)},window.globalAjaxQueue.abort=function(){this.forEach(e=>e&&e.abort&&e.abort()),this.splice(0,this.length),this.active=0};class U{static fetch(e){const t=new U;return t.setFormat("json"),t.addParams(e,"get"),t.send()}constructor(){A(this,"format","json"),A(this,"timeout",null),A(this,"callback",null),A(this,"useRegularCallbackInCaseOfError",!1),A(this,"errorCallback",void 0),A(this,"withToken",!1),A(this,"completeCallback",void 0),A(this,"getParams",{}),A(this,"getUrl","?"),A(this,"postParams",{}),A(this,"loadingElement",null),A(this,"errorElement","#ajaxError"),A(this,"requestHandle",null),A(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=B}addParams(e,t){"string"===typeof e&&(e=window["broadcast"].getValuesFromUrl(e));const n=["compareSegments","comparePeriods","compareDates"];Object.keys(e).forEach(r=>{const a=e[r];(-1===n.indexOf(r)||a)&&("get"===t.toLowerCase()?this.getParams[r]=a:"post"===t.toLowerCase()&&(this.postParams[r]=a))})}withTokenInUrl(){this.withToken=!0}setUrl(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}setBulkRequests(...e){const t=e.map(e=>$.param(e));this.addParams({module:"API",method:"API.getBulkRequest",urls:t,format:"json"},"post")}setTimeout(e){this.timeout=e}setCallback(e){this.callback=e}useCallbackInCaseOfError(){this.useRegularCallbackInCaseOfError=!0}redirectOnSuccess(e){this.setCallback(()=>{piwikHelper.redirect(e)})}setErrorCallback(e){this.errorCallback=e}setCompleteCallback(e){this.completeCallback=e}setFormat(e){this.format=e}setLoadingElement(e){this.loadingElement=e||"#ajaxLoadingDiv"}setErrorElement(e){e&&(this.errorElement=e)}useGETDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}removeDefaultParameter(e){if(e&&this.defaultParams)for(let t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}send(){return $(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),globalAjaxQueue.push(this.requestHandle),this.requestHandle}abort(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}buildAjaxCall(){const e=this,t=this.mixinDefaultGetParams(this.getParams);let n=this.getUrl;"?"!==n[n.length-1]&&(n+="&"),t.segment&&(n=`${n}segment=${t.segment}&`,delete t.segment),t.date&&(n=`${n}date=${decodeURIComponent(t.date.toString())}&`,delete t.date),n+=$.param(t);const r={type:"POST",async:!0,url:n,dataType:this.format||"json",complete:this.completeCallback,error:function(){globalAjaxQueue.active-=1,e.errorCallback&&e.errorCallback.apply(this,arguments)},success:(e,t,n)=>{if(this.loadingElement&&$(this.loadingElement).hide(),e&&"error"===e.result&&!this.useRegularCallbackInCaseOfError){let t=null,n="toast";if($(this.errorElement).length&&e.message&&($(this.errorElement).show(),t=this.errorElement,n=null),e.message){const r=window["require"]("piwik/UI"),a=new r.Notification;a.show(e.message,{placeat:t,context:"error",type:n,id:"ajaxHelper"}),a.scrollToNotification()}}else this.callback&&this.callback(e,t,n);globalAjaxQueue.active-=1,P.ajaxRequestFinished&&P.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(r)}isRequestToApiMethod(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}isWidgetizedRequest(){return"Widgetize"===broadcast.getValueFromUrl("module")}getDefaultPostParams(){return this.withToken||this.isRequestToApiMethod()||P.shouldPropagateTokenAuth?{token_auth:P.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}mixinDefaultPostParams(e){const t=this.getDefaultPostParams(),n={...t,...e};return n}mixinDefaultGetParams(e){const t=o.getSearchParam("segment"),n={idSite:P.idSite||broadcast.getValueFromUrl("idSite"),period:P.period||broadcast.getValueFromUrl("period"),segment:t},r=e;return r.token_auth&&(r.token_auth=null,delete r.token_auth),Object.keys(n).forEach(e=>{this.useGETDefaultParameter(e)&&!r[e]&&!this.postParams[e]&&n[e]&&(r[e]=n[e])}),!this.useGETDefaultParameter("date")||r.date||this.postParams.date||(r.date=P.currentDateString),r}}function M(){return globalAjaxQueue}window.ajaxHelper=U,angular.module("piwikApp.service").service("globalAjaxQueue",M);
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
const V={getSearchParam(e){const t=window.location.href.split("#"),n=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){const t=window.broadcast.getValueFromHash(e,window.location.href);if(t||"date"!==e&&"period"!==e&&"idSite"!==e)return t}return window.broadcast.getValueFromUrl(e,window.location.search)}};var _=V;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function q(){const e={getSearchParam:_.getSearchParam.bind(_)};return e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
let L;q.$inject=[],angular.module("piwikApp.service").service("piwikUrl",q);const{piwik:G,broadcast:J,piwikHelper:z}=window;function Y(e,t){try{return u.parse(e,t),!0}catch(n){return!1}}G.helper=z,G.broadcast=J,G.updatePeriodParamsFromUrl=function(){let e=_.getSearchParam("date");const t=_.getSearchParam("period");if(!Y(t,e))return;if(G.period===t&&G.currentDateString===e)return;G.period=t;const n=u.parse(t,e).getDateRange();G.startDateString=d(n[0]),G.endDateString=d(n[1]),G.updateDateInTitle(e,t),"range"===G.period&&(e=`${G.startDateString},${G.endDateString}`),G.currentDateString=e},G.updateDateInTitle=function(e,t){if($(".top_controls #periodString").length&&(L=L||document.title,0===L.indexOf(G.siteName))){const n=` - ${u.parse(t,e).getPrettyString()} `;document.title=`${G.siteName}${n}${L.substr(G.siteName.length)}`}},G.hasUserCapability=function(e){return window.angular.isArray(G.userCapabilities)&&-1!==G.userCapabilities.indexOf(e)};const Q=G;var W=Q;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function X(){return W}function K(e,t){t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}angular.module("piwikApp.service").service("piwik",X),K.$inject=["piwik","$rootScope"],angular.module("piwikApp.service").run(K);var Z=n("8bbf");const ee={ref:"root"};function te(e,t,n,r,a,i){return Object(Z["withDirectives"])((Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",ee,[Object(Z["renderSlot"])(e.$slots,"default")],512)),[[Z["vShow"],e.modelValue]])}var ne=Object(Z["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","update:modelValue"],setup(){const e=Object(Z["ref"])(null);return{root:e}},activated(){this.$emit("update:modelValue",!1)},watch:{modelValue(e,t){if(e){const e=this.element||this.$refs.root.firstElementChild;P.helper.modalConfirm(e,{yes:()=>{this.$emit("yes")},no:()=>{this.$emit("no")}},{onCloseEnd:()=>{this.element||this.$refs.root.appendChild(e),this.$emit("update:modelValue",!1),this.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});ne.render=te;var re=ne;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */let ae=0;function ie(e){const{component:t,scope:n={},events:r={},$inject:a,directiveName:i,transclude:o,mountPointFactory:s,postCreate:l,noScope:c}=e,u=ae;o&&(ae+=1);const d={};function p(...e){const a={restrict:"A",scope:c?void 0:d,compile:function(){return{post:function(a,i,c){const d=o?i.find(`[ng-transclude][counter=${u}]`):null;let p="<root-component";Object.entries(n).forEach(([,e])=>{p+=` :${e.vue}="${e.vue}"`}),Object.entries(r).forEach(e=>{const[t]=e;p+=` @${t}="onEventHandler('${t}', $event)"`}),p+=">",o&&(p+='<div ref="transcludeTarget"/>'),p+="</root-component>";const h=Object(Z["createApp"])({template:p,data(){const t={};return Object.entries(n).forEach(([n,r])=>{let o=a[n];"undefined"===typeof o&&"undefined"!==typeof r.default&&(o=r.default instanceof Function?r.default(a,i,c,...e):r.default),t[r.vue]=o}),t},setup(){if(o){const e=Object(Z["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler(t,n){r[t]&&r[t](n,a,i,c,...e)}}});h.config.globalProperties.$sanitize=window.vueSanitize,h.config.globalProperties.translate=k,h.component("root-component",t);const m=s?s(a,i,c,...e):i[0],g=h.mount(m);Object.entries(n).forEach(([t,n])=>{n.angularJsBind&&a.$watch(t,r=>{"undefined"!==typeof n.default&&"undefined"===typeof r?g[t]=n.default instanceof Function?n.default(a,i,c,...e):n.default:g[t]=r})}),o&&$(g.transcludeTarget).append(d),l&&l(g,a,i,c,...e),a.$on("$destroy",()=>{h.unmount()})}}}};return o&&(a.transclude=!0,a.template=`<div ng-transclude counter="${u}"/>`),a}return Object.entries(n).forEach(([e,t])=>{t.vue||(t.vue=e),t.angularJsBind&&(d[e]=t.angularJsBind)}),p.$inject=a||[],angular.module("piwikApp").directive(i,p),p}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */ie({component:re,scope:{show:{vue:"modelValue",default:!1},element:{default:(e,t)=>t[0]}},events:{yes:(e,t,n,r)=>{r.yes&&(t.$eval(r.yes),setTimeout(()=>{t.$apply()},0))},no:(e,t,n,r)=>{r.no&&(t.$eval(r.no),setTimeout(()=>{t.$apply()},0))},close:(e,t,n,r)=>{r.close&&(t.$eval(r.close),setTimeout(()=>{t.$apply()},0))},"update:modelValue":(e,t,n,r,a)=>{setTimeout(()=>{t.$apply(a(r.piwikDialog).assign(t,e))},0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:(e,t)=>{const n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:(e,t,n,r)=>{t.$watch(r.piwikDialog,(t,n)=>{n!==t&&(e.modelValue=t||!1)})},noScope:!0});const oe={key:0,class:"title",tabindex:"6"},se=["href","title"],le={class:"iconsBar"},ce=["href","title"],ue=Object(Z["createElementVNode"])("span",{class:"icon-help"},null,-1),de=[ue],pe=["title"],he=Object(Z["createElementVNode"])("span",{class:"icon-info"},null,-1),me=[he],ge={class:"ratingIcons"},fe={class:"inlineHelp"},be=["innerHTML"],we=["href"];function ye(e,t,n,r,a,i){const o=Object(Z["resolveComponent"])("RateFeature");return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=t=>e.showIcons=!0),onMouseleave:t[2]||(t[2]=t=>e.showIcons=!1),ref:"root"},[e.editUrl?Object(Z["createCommentVNode"])("",!0):(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",oe,[Object(Z["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(Z["renderSlot"])(e.$slots,"default")],8,se)):Object(Z["createCommentVNode"])("",!0),Object(Z["withDirectives"])(Object(Z["createElementVNode"])("span",le,[e.helpUrl&&!e.actualInlineHelp?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},de,8,ce)):Object(Z["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=t=>e.showInlineHelp=!e.showInlineHelp),class:Object(Z["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},me,10,pe)):Object(Z["createCommentVNode"])("",!0),Object(Z["createElementVNode"])("div",ge,[Object(Z["createVNode"])(o,{title:e.actualFeatureName},null,8,["title"])])],512),[[Z["vShow"],e.showIcons||e.showInlineHelp]]),Object(Z["withDirectives"])(Object(Z["createElementVNode"])("div",fe,[Object(Z["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,be),e.helpUrl?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(Z["toDisplayString"])(e.translate("General_MoreDetails")),9,we)):Object(Z["createCommentVNode"])("",!0)],512),[[Z["vShow"],e.showInlineHelp]])],544)}const De=Object(Z["defineAsyncComponent"])(()=>new Promise(e=>{window.$(document).ready(()=>{e(window.Feedback.RateFeature)})}));var Pe=Object(Z["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:De},data(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},setup(){const e=Object(Z["ref"])(null);return{root:e}},watch:{inlineHelp(e){this.actualInlineHelp=e},featureName(e){this.actualFeatureName=e}},mounted(){const{root:e}=this.$refs;if(!this.actualInlineHelp){let t=e.querySelector(".title .inlineHelp");if(!t&&e.parentElement.nextElementSibling&&(t=e.parentElement.nextElementSibling.querySelector(".reportDocumentation")),t){const e=t.getAttribute("data-content").trim();e.length&&(this.actualInlineHelp=`<p>${e}</p>`,setTimeout(()=>t.remove(),0))}}this.actualFeatureName||(this.actualFeatureName=e.querySelector(".title").textContent),this.reportGenerated&&u.parse(P.period,P.currentDateString).containsToday()&&window.$(e.querySelector(".report-generated")).tooltip({track:!0,content:this.reportGenerated,items:"div",show:!1,hide:!1})}});Pe.render=ye;var ve=Pe;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */ie({component:ve,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0});const je={class:"card",ref:"root"},ke={class:"card-content"},Oe={key:0,class:"card-title"},Se={key:1,class:"card-title"},Te={ref:"content"};function $e(e,t,n,r,a,i){const o=Object(Z["resolveComponent"])("EnrichedHeadline");return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",je,[Object(Z["createElementVNode"])("div",ke,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(Z["createCommentVNode"])("",!0):(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("h2",Oe,Object(Z["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(Z["openBlock"])(),Object(Z["createElementBlock"])("h2",Se,[Object(Z["createVNode"])(o,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(Z["withCtx"])(()=>[Object(Z["createTextVNode"])(Object(Z["toDisplayString"])(e.contentTitle),1)]),_:1},8,["feature-name","help-url","inline-help"])])):Object(Z["createCommentVNode"])("",!0),Object(Z["createElementVNode"])("div",Te,[Object(Z["renderSlot"])(e.$slots,"default")],512)])],512)}let Ee=null;var Ce=Object(Z["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:ve},data(){return{actualFeature:this.feature,actualHelpText:this.helpText}},setup(){const e=Object(Z["ref"])(null),t=Object(Z["ref"])(null);return{root:e,content:t}},watch:{feature(e){this.actualFeature=e},helpText(e){this.actualHelpText=e}},mounted(){const{root:e,content:t}=this.$refs;if(this.anchor){const t=document.createElement("a");t.id=this.anchor,e.parentElement.prepend(t)}let n;if(setTimeout(()=>{const e=t.querySelector(".contentHelp");e&&(this.actualHelpText=e.innerHTML,e.remove())},0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===Ee&&(Ee=document.querySelector("#content.admin")),Ee&&(n=Ee.offsetTop),n||0===n){const t=e.closest("[piwik-widget-loader]"),r=t?t.offsetTop:e.offsetTop;r-n<17&&(e.style.marginTop=0)}}});Ce.render=$e;var Ie=Ce;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */ie({component:Ie,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});const xe={class:"loadingPiwik"},He=Object(Z["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function Re(e,t,n,r,a,i){return Object(Z["withDirectives"])((Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",xe,[He,Object(Z["createElementVNode"])("span",null,Object(Z["toDisplayString"])(e.loadingMessage),1)],512)),[[Z["vShow"],e.loading]])}var Fe=Object(Z["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:k("General_LoadingData")}}});Fe.render=Re;var Ne=Fe,Ae=ie({component:Ne,scope:{loading:{vue:"loading",angularJsBind:"<"},loadingMessage:{vue:"loadingMessage",angularJsBind:"<",default:()=>k("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 Be(e,t,n,r,a,i){return Object(Z["openBlock"])(),Object(Z["createElementBlock"])("div",{class:Object(Z["normalizeClass"])(["alert",{["alert-"+e.severity]:!0}])},[Object(Z["renderSlot"])(e.$slots,"default")],2)}var Ue=Object(Z["defineComponent"])({props:{severity:{type:String,required:!0}}});Ue.render=Be;var Me=Ue,Ve=ie({component:Me,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
 */}})}));
//# sourceMappingURL=CoreHome.umd.min.js.map