diff options
Diffstat (limited to 'plugins/CoreHome/vue/dist/CoreHome.umd.min.js')
-rw-r--r-- | plugins/CoreHome/vue/dist/CoreHome.umd.min.js | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js index 5b713d3eb4..b0c4ac27ff 100644 --- a/plugins/CoreHome/vue/dist/CoreHome.umd.min.js +++ b/plugins/CoreHome/vue/dist/CoreHome.umd.min.js @@ -4,13 +4,13 @@ * * @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 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} + */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 dt})),n.d(t,"debounce",(function(){return ki})),n.d(t,"createAngularJsAdapter",(function(){return qt})),n.d(t,"transformAngularJsBoolAttr",(function(){return Jt})),n.d(t,"transformAngularJsIntAttr",(function(){return Gt})),n.d(t,"removeAngularJsSpecificProperties",(function(){return Wt})),n.d(t,"activityIndicatorAdapter",(function(){return Vs})),n.d(t,"ActivityIndicator",(function(){return ea})),n.d(t,"translate",(function(){return C})),n.d(t,"alertAdapter",(function(){return As})),n.d(t,"AjaxHelper",(function(){return Qe})),n.d(t,"setCookie",(function(){return xs})),n.d(t,"getCookie",(function(){return Ms})),n.d(t,"deleteCookie",(function(){return Ls})),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 Xe})),n.d(t,"FocusAnywhereButHere",(function(){return ot})),n.d(t,"FocusIf",(function(){return lt})),n.d(t,"MatomoDialog",(function(){return Bt})),n.d(t,"ExpandOnClick",(function(){return vt})),n.d(t,"ExpandOnHover",(function(){return Ct})),n.d(t,"SideNav",(function(){return Et})),n.d(t,"EnrichedHeadline",(function(){return hn})),n.d(t,"ContentBlock",(function(){return Sn})),n.d(t,"Comparisons",(function(){return dr})),n.d(t,"MenuDropdown",(function(){return Dr})),n.d(t,"DatePicker",(function(){return Mr})),n.d(t,"DateRangePicker",(function(){return _r})),n.d(t,"PeriodDatePicker",(function(){return Gr})),n.d(t,"Notification",(function(){return Ga})),n.d(t,"NotificationGroup",(function(){return cc})),n.d(t,"NotificationsStore",(function(){return nc})),n.d(t,"SiteSelector",(function(){return Ei})),n.d(t,"QuickAccess",(function(){return zi})),n.d(t,"FieldArray",(function(){return lo})),n.d(t,"MultiPairField",(function(){return Eo})),n.d(t,"PeriodSelector",(function(){return ba})),n.d(t,"ReportingMenu",(function(){return _c})),n.d(t,"ReportingPagesStore",(function(){return fc})),n.d(t,"ReportMetadataStore",(function(){return Kc})),n.d(t,"WidgetsStore",(function(){return Mc})),n.d(t,"WidgetLoader",(function(){return cl})),n.d(t,"WidgetContainer",(function(){return Sl})),n.d(t,"WidgetByDimensionContainer",(function(){return Ul})),n.d(t,"Widget",(function(){return Zl})),n.d(t,"ReportingPage",(function(){return Es})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("2342");var o=n("8bbf");function a(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 * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var u,d=function(){function e(){o(this,e),s(this,"periods",{}),s(this,"periodOrder",[])}return l(e,[{key:"addCustomPeriod",value:function(e,t){if(this.periods[e])throw new Error('The "'.concat(e,'" period already exists! It cannot be overridden.'));this.periods[e]=t,this.periodOrder.push(e)}},{key:"getAllLabels",value:function(){return Array().concat(this.periodOrder)}},{key:"get",value:function(e){var t=this.periods[e];if(!t)throw new Error("Invalid period label: ".concat(e));return t}},{key:"parse",value:function(e,t){return this.get(e).parse(t)}},{key:"isRecognizedPeriod",value:function(e){return!!this.periods[e]}}]),e}(),p=new d;function f(e){return v(e)||g(e)||h(e)||m()}function m(){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 h(e,t){if(e){if("string"===typeof e)return b(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)?b(e,t):void 0}}function g(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function v(e){if(Array.isArray(e))return b(e)}function b(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 u,d=function(){function e(){a(this,e),s(this,"periods",{}),s(this,"periodOrder",[])}return l(e,[{key:"addCustomPeriod",value:function(e,t){if(this.periods[e])throw new Error('The "'.concat(e,'" period already exists! It cannot be overridden.'));this.periods[e]=t,this.periodOrder.push(e)}},{key:"getAllLabels",value:function(){return Array().concat(this.periodOrder)}},{key:"get",value:function(e){var t=this.periods[e];if(!t)throw new Error("Invalid period label: ".concat(e));return t}},{key:"parse",value:function(e,t){return this.get(e).parse(t)}},{key:"isRecognizedPeriod",value:function(e){return!!this.periods[e]}}]),e}(),p=new d;function f(e){return b(e)||g(e)||h(e)||m()}function m(){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 h(e,t){if(e){if("string"===typeof e)return v(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)?v(e,t):void 0}}function g(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(e){if(Array.isArray(e))return v(e)}function v(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 * @@ -29,13 +29,13 @@ function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r- * * @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(){var 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 E(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return P();if("yesterday"===t||"yesterdaySameTime"===t){var n=P();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=P();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=P();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var a=P();return a.setFullYear(a.getFullYear()-1),a}return $.datepicker.parseDate("yy-mm-dd",t)}function V(e){return 2===e.length&&(P()>=e[0]&&P()<=e[1])}function T(e,t){return x(e)||A(e,t)||I(e,t)||N()}function N(){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 I(e,t){if(e){if("string"===typeof e)return B(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)?B(e,t):void 0}}function B(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 A(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 x(e){if(Array.isArray(e))return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(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 R(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function D(e){return $.datepicker.formatDate("yy-mm-dd",e)}function P(){var 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 E(e){if(e instanceof Date)return e;var t=decodeURIComponent(e).trim();if(""===t)throw new Error("Invalid date, empty string.");if("today"===t||"now"===t)return P();if("yesterday"===t||"yesterdaySameTime"===t){var n=P();return n.setDate(n.getDate()-1),n}if(t.match(/last[ -]?week/i)){var r=P();return r.setDate(r.getDate()-7),r}if(t.match(/last[ -]?month/i)){var i=P();return i.setDate(1),i.setMonth(i.getMonth()-1),i}if(t.match(/last[ -]?year/i)){var o=P();return o.setFullYear(o.getFullYear()-1),o}return $.datepicker.parseDate("yy-mm-dd",t)}function V(e){return 2===e.length&&(P()>=e[0]&&P()<=e[1])}function T(e,t){return x(e)||A(e,t)||I(e,t)||N()}function N(){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 I(e,t){if(e){if("string"===typeof e)return B(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)?B(e,t):void 0}}function B(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 A(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function x(e){if(Array.isArray(e))return e}function M(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(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 R(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function H(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 F=function(){function e(t,n,r){M(this,e),H(this,"startDate",void 0),H(this,"endDate",void 0),H(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return R(e,[{key:"getPrettyString",value:function(){var e=D(this.startDate),t=D(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return V(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var a=r?E(r):P(),o=new Date(a.getTime());if("day"===t)o.setDate(o.getDate()-i);else if("week"===t)o.setDate(o.getDate()-7*i);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-i)}if("day"!==t){var c=p.periods[t].parse(o),l=p.periods[t].parse(a),s=c.getDateRange(),u=T(s,1);o=u[0];var d=l.getDateRange(),f=T(d,2);a=f[1]}var m=new Date(1991,7,6);if(o.getTime()-m.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=m;break}return new e(o,a,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?E(n):P(),a=new Date(i.getTime()),o=new Date(i.getTime());if("day"===t)a.setDate(a.getDate()-r),o.setDate(o.getDate()-r);else if("week"===t)a.setDate(a.getDate()-7*r),o.setDate(o.getDate()-7*r);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-r),o.setDate(1),o.setMonth(o.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-r),o.setFullYear(o.getFullYear()-r)}if("day"!==t){var c=p.periods[t].parse(a),l=p.periods[t].parse(o),s=c.getDateRange(),u=T(s,1);a=u[0];var d=l.getDateRange(),f=T(d,2);o=f[1]}var m=new Date(1991,7,6);if(a.getTime()-m.getTime()<0)switch(t){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=m;break}return new e(a,o,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(E(i[0]),E(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function _(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:E,format:D,RangePeriod:F,todayIsInRange:V}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(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 W(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var F=function(){function e(t,n,r){M(this,e),H(this,"startDate",void 0),H(this,"endDate",void 0),H(this,"childPeriodType",void 0),this.startDate=t,this.endDate=n,this.childPeriodType=r}return R(e,[{key:"getPrettyString",value:function(){var e=D(this.startDate),t=D(this.endDate);return C("General_DateRangeFromTo",[e,t])}},{key:"getDateRange",value:function(){return[this.startDate,this.endDate]}},{key:"containsToday",value:function(){return V(this.getDateRange())}},{key:"getDayCount",value:function(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}],[{key:"getLastNRange",value:function(t,n,r){var i=Math.max(parseInt(n.toString(),10)-1,0);if(Number.isNaN(i))throw new Error("Invalid range strAmount");var o=r?E(r):P(),a=new Date(o.getTime());if("day"===t)a.setDate(a.getDate()-i);else if("week"===t)a.setDate(a.getDate()-7*i);else if("month"===t)a.setDate(1),a.setMonth(a.getMonth()-i);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));a.setFullYear(a.getFullYear()-i)}if("day"!==t){var c=p.periods[t].parse(a),l=p.periods[t].parse(o),s=c.getDateRange(),u=T(s,1);a=u[0];var d=l.getDateRange(),f=T(d,2);o=f[1]}var m=new Date(1991,7,6);if(a.getTime()-m.getTime()<0)switch(t){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=m;break}return new e(a,o,t)}},{key:"getLastNRangeChild",value:function(t,n,r){var i=n?E(n):P(),o=new Date(i.getTime()),a=new Date(i.getTime());if("day"===t)o.setDate(o.getDate()-r),a.setDate(a.getDate()-r);else if("week"===t)o.setDate(o.getDate()-7*r),a.setDate(a.getDate()-7*r);else if("month"===t)o.setDate(1),o.setMonth(o.getMonth()-r),a.setDate(1),a.setMonth(a.getMonth()-r);else{if("year"!==t)throw new Error("Unknown period type '".concat(t,"'."));o.setFullYear(o.getFullYear()-r),a.setFullYear(a.getFullYear()-r)}if("day"!==t){var c=p.periods[t].parse(o),l=p.periods[t].parse(a),s=c.getDateRange(),u=T(s,1);o=u[0];var d=l.getDateRange(),f=T(d,2);a=f[1]}var m=new Date(1991,7,6);if(o.getTime()-m.getTime()<0)switch(t){case"year":o=new Date(1992,0,1);break;case"month":o=new Date(1991,8,1);break;case"week":o=new Date(1991,8,12);break;case"day":default:o=m;break}return new e(o,a,t)}},{key:"parse",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day";if(/^previous/.test(t)){var r=e.getLastNRange(n,"2").startDate;return e.getLastNRange(n,t.substring(8),r)}if(/^last/.test(t))return e.getLastNRange(n,t.substring(4));var i=decodeURIComponent(t).split(",");return new e(E(i[0]),E(i[1]),n)}},{key:"getDisplayText",value:function(){return C("General_DateRangeInPeriodList")}}]),e}();function _(){return{getAllLabels:p.getAllLabels.bind(p),isRecognizedPeriod:p.isRecognizedPeriod.bind(p),get:p.get.bind(p),parse:p.parse.bind(p),parseDate:E,format:D,RangePeriod:F,todayIsInRange:V}}function U(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(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 q(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),e}function J(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 * @@ -48,7 +48,7 @@ function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r- * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("piwikApp.service").factory("piwikPeriods",_);var G=function(){function e(t){U(this,e),J(this,"dateInPeriod",void 0),this.dateInPeriod=t}return W(e,[{key:"getPrettyString",value:function(){return D(this.dateInPeriod)}},{key:"getDateRange",value:function(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodDay")}}]),e}();function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(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 Q(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("piwikApp.service").factory("piwikPeriods",_);var G=function(){function e(t){U(this,e),J(this,"dateInPeriod",void 0),this.dateInPeriod=t}return q(e,[{key:"getPrettyString",value:function(){return D(this.dateInPeriod)}},{key:"getDateRange",value:function(){return[new Date(this.dateInPeriod.getTime()),new Date(this.dateInPeriod.getTime())]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodDay")}}]),e}();function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(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 Q(e,t,n){return t&&Y(e.prototype,t),n&&Y(e,n),e}function K(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 * @@ -60,26 +60,26 @@ window.piwik.addCustomPeriod=p.addCustomPeriod.bind(p),window.angular.module("pi * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */p.addCustomPeriod("week",X);var re=function(){function e(t){Z(this,e),ne(this,"dateInPeriod",void 0),this.dateInPeriod=t}return te(e,[{key:"getPrettyString",value:function(){var e=C("Intl_Month_Long_StandAlone_".concat(this.dateInPeriod.getMonth()+1));return"".concat(e," ").concat(this.dateInPeriod.getFullYear())}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(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 oe(e,t,n){return t&&ae(e.prototype,t),n&&ae(e,n),e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */p.addCustomPeriod("week",X);var re=function(){function e(t){Z(this,e),ne(this,"dateInPeriod",void 0),this.dateInPeriod=t}return te(e,[{key:"getPrettyString",value:function(){var e=C("Intl_Month_Long_StandAlone_".concat(this.dateInPeriod.getMonth()+1));return"".concat(e," ").concat(this.dateInPeriod.getFullYear())}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setDate(1),t.setMonth(t.getMonth()+1),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodMonth")}}]),e}();function ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(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 ae(e,t,n){return t&&oe(e.prototype,t),n&&oe(e,n),e}function ce(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 - */p.addCustomPeriod("month",re);var le=function(){function e(t){ie(this,e),ce(this,"dateInPeriod",void 0),this.dateInPeriod=t}return oe(e,[{key:"getPrettyString",value:function(){return this.dateInPeriod.getFullYear().toString()}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodYear")}}]),e}(); + */p.addCustomPeriod("month",re);var le=function(){function e(t){ie(this,e),ce(this,"dateInPeriod",void 0),this.dateInPeriod=t}return ae(e,[{key:"getPrettyString",value:function(){return this.dateInPeriod.getFullYear().toString()}},{key:"getDateRange",value:function(){var e=new Date(this.dateInPeriod.getTime());e.setMonth(0),e.setDate(1);var t=new Date(this.dateInPeriod.getTime());return t.setMonth(12),t.setDate(0),[e,t]}},{key:"containsToday",value:function(){return V(this.getDateRange())}}],[{key:"parse",value:function(t){return new e(E(t))}},{key:"getDisplayText",value:function(){return C("Intl_PeriodYear")}}]),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 se(e,t){return me(e)||fe(e,t)||de(e,t)||ue()}function ue(){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 de(e,t){if(e){if("string"===typeof e)return pe(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)?pe(e,t):void 0}}function pe(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 fe(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 me(e){if(Array.isArray(e))return e}function he(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function be(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 ye(e,t,n){return t&&be(e.prototype,t),n&&be(e,n),e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +function se(e,t){return me(e)||fe(e,t)||de(e,t)||ue()}function ue(){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 de(e,t){if(e){if("string"===typeof e)return pe(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)?pe(e,t):void 0}}function pe(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 fe(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function me(e){if(Array.isArray(e))return e}function he(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(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 ye(e,t,n){return t&&ve(e.prototype,t),n&&ve(e,n),e}function Oe(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 - */p.addCustomPeriod("year",le);var we=window,je=we.piwik,ke=we.broadcast;function Se(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Ce=function(){function e(){var t=this;ve(this,e),Oe(this,"urlQuery",Object(a["ref"])("")),Oe(this,"hashQuery",Object(a["ref"])("")),Oe(this,"urlParsed",Object(a["computed"])((function(){return Object(a["readonly"])(ke.getValuesFromUrl("?".concat(t.urlQuery.value),!0))}))),Oe(this,"hashParsed",Object(a["computed"])((function(){return Object(a["readonly"])(ke.getValuesFromUrl("?".concat(t.hashQuery.value),!0))}))),Oe(this,"parsed",Object(a["computed"])((function(){return Object(a["readonly"])(ge(ge({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return ye(e,[{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=this.getFinalHashParams(t),i=this.stringify(r),a="?".concat(n);i.length&&(a="".concat(a,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}},{key:"getFinalHashParams",value:function(e){return ge({period:this.parsed.value.period,date:this.parsed.value.date,segment:this.parsed.value.segment},"string"!==typeof e?e:ke.getValuesFromUrl("?".concat(e),!0))}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=se(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(Se(t,e)&&(je.period!==t||je.currentDateString!==e)){je.period=t;var n=p.parse(t,e).getDateRange();je.startDateString=D(n[0]),je.endDateString=D(n[1]),je.updateDateInTitle(e,t),"range"===je.period&&(e="".concat(je.startDateString,",").concat(je.endDateString)),je.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),De=new Ce,Pe=De; + */p.addCustomPeriod("year",le);var we=window,je=we.piwik,ke=we.broadcast;function Se(e,t){try{return p.parse(e,t),!0}catch(n){return!1}}var Ce=function(){function e(){var t=this;be(this,e),Oe(this,"urlQuery",Object(o["ref"])("")),Oe(this,"hashQuery",Object(o["ref"])("")),Oe(this,"urlParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ke.getValuesFromUrl("?".concat(t.urlQuery.value),!0))}))),Oe(this,"hashParsed",Object(o["computed"])((function(){return Object(o["readonly"])(ke.getValuesFromUrl("?".concat(t.hashQuery.value),!0))}))),Oe(this,"parsed",Object(o["computed"])((function(){return Object(o["readonly"])(ge(ge({},t.urlParsed.value),t.hashParsed.value))}))),this.setUrlQuery(window.location.search),this.setHashQuery(window.location.hash),S.on("$locationChangeSuccess",(function(e){var n=new URL(e);t.setUrlQuery(n.search.replace(/^\?/,"")),t.setHashQuery(n.hash.replace(/^#/,""))})),this.updatePeriodParamsFromUrl()}return ye(e,[{key:"updateHash",value:function(e){var t=this.getFinalHashParams(e),n=this.stringify(t),r=S.helper.getAngularDependency("$location");r.search(n);var i=S.helper.getAngularDependency("$timeout");i()}},{key:"updateUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"!==typeof e?this.stringify(e):e,r=this.getFinalHashParams(t),i=this.stringify(r),o="?".concat(n);i.length&&(o="".concat(o,"#?").concat(i)),window.broadcast.propagateNewPage("",void 0,void 0,void 0,o)}},{key:"getFinalHashParams",value:function(e){return ge({period:this.parsed.value.period,date:this.parsed.value.date,segment:this.parsed.value.segment},"string"!==typeof e?e:ke.getValuesFromUrl("?".concat(e),!0))}},{key:"updateLocation",value:function(e){S.helper.isAngularRenderingThePage()?this.updateHash(e):this.updateUrl(e)}},{key:"getSearchParam",value:function(e){var t=window.location.href.split("#"),n=new RegExp("".concat(e,"(\\[]|=)"));if(t&&t[1]&&n.test(decodeURIComponent(t[1]))){var r=window.broadcast.getValueFromHash(e,window.location.href);if(r||"date"!==e&&"period"!==e&&"idSite"!==e)return r}return window.broadcast.getValueFromUrl(e,window.location.search)}},{key:"stringify",value:function(e){var t=Object.fromEntries(Object.entries(e).filter((function(e){var t=se(e,2),n=t[1];return""!==n&&null!==n&&void 0!==n})));return $.param(t).replace(/%5B%5D/g,"[]").replace(/%2C/g,",")}},{key:"updatePeriodParamsFromUrl",value:function(){var e=this.getSearchParam("date"),t=this.getSearchParam("period");if(Se(t,e)&&(je.period!==t||je.currentDateString!==e)){je.period=t;var n=p.parse(t,e).getDateRange();je.startDateString=D(n[0]),je.endDateString=D(n[1]),je.updateDateInTitle(e,t),"range"===je.period&&(e="".concat(je.startDateString,",").concat(je.endDateString)),je.currentDateString=e}}},{key:"setUrlQuery",value:function(e){this.urlQuery.value=e.replace(/^\?/,"")}},{key:"setHashQuery",value:function(e){this.hashQuery.value=e.replace(/^[#/?]+/,"")}}]),e}(),De=new Ce,Pe=De; /*! * Matomo - free/libre analytics platform * @@ -93,345 +93,345 @@ function Ee(){var e={getSearchParam:Pe.getSearchParam.bind(Pe)};return e} * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function Ve(){return S}function Te(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ne(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 Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ae(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 xe(e,t,n){return t&&Ae(e.prototype,t),n&&Ae(e,n),e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +function Ve(){return S}function Te(e,t){t.$oldEmit=t.$emit,t.$emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldEmit.apply(this,[e].concat(n))},t.$oldBroadcast=t.$broadcast,t.$broadcast=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return S.postEventNoEmit.apply(S,[e].concat(n)),this.$oldBroadcast.apply(this,[e].concat(n))},t.$on("$locationChangeSuccess",e.updatePeriodParamsFromUrl)}function Ne(e){return Ne="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},Ne(e)}function Ie(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 Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ae(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 xe(e,t,n){return t&&Ae(e.prototype,t),n&&Ae(e,n),e}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $e(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Je(e,t)}function Re(e){var t=We();return function(){var n,r=Ge(e);if(t){var i=Ge(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return He(this,n)}}function He(e,t){if(t&&("object"===Ne(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Fe(e)}function Fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _e(e){var t="function"===typeof Map?new Map:void 0;return _e=function(e){if(null===e||!qe(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Ue(e,arguments,Ge(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Je(n,e)},_e(e)}function Ue(e,t,n){return Ue=We()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=Function.bind.apply(e,r),o=new i;return n&&Je(o,n.prototype),o},Ue.apply(null,arguments)}function We(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function qe(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function Je(e,t){return Je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Je(e,t)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ge(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 Le(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}je.updatePeriodParamsFromUrl=De.updatePeriodParamsFromUrl.bind(De),Ee.$inject=[],angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").service("piwik",Ve),Te.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Te),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var $e=function(){function e(){Be(this,e),Me(this,"format","json"),Me(this,"timeout",null),Me(this,"callback",null),Me(this,"useRegularCallbackInCaseOfError",!1),Me(this,"errorCallback",void 0),Me(this,"withToken",!1),Me(this,"completeCallback",void 0),Me(this,"getParams",{}),Me(this,"getUrl","?"),Me(this,"postParams",{}),Me(this,"loadingElement",null),Me(this,"errorElement","#ajaxError"),Me(this,"headers",void 0),Me(this,"requestHandle",null),Me(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=Le}return xe(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var a=r[e];(-1===i.indexOf(e)||a)&&("get"===t.toLowerCase()?n.getParams[e]=a:"post"===t.toLowerCase()&&(n.postParams[e]=a))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}var n=new Promise((function(n,r){e.requestHandle.then((function(e){n(e)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n.abort=function(){e.requestHandle&&e.requestHandle.abort()},n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,a="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,a=null);var o=!document.querySelector("#login_form");if(t.message&&o){var c=window["require"]("piwik/UI"),l=new c.Notification;l.show(t.message,{placeat:i,context:"error",type:a,id:"ajaxHelper"}),l.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Ie(Ie({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Pe.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),r.setFormat(n.format||"json"),r.addParams(Ie({module:"API",format:n.format||"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),r.send()}}]),e}();function Re(){return globalAjaxQueue}window.ajaxHelper=$e,angular.module("piwikApp.service").service("globalAjaxQueue",Re); + */function ze(e,t){if("abort"!==t)if("undefined"!==typeof Piwik_Popover){var n=$("#loadingError");Piwik_Popover.isOpen()&&e&&500===e.status?e&&500===e.status&&$(document.body).html(piwikHelper.escape(e.responseText)):n.show()}else console.log("Request failed: ".concat(e.responseText))}je.updatePeriodParamsFromUrl=De.updatePeriodParamsFromUrl.bind(De),Ee.$inject=[],angular.module("piwikApp.service").service("piwikUrl",Ee),window.angular.module("piwikApp.service").service("piwik",Ve),Te.$inject=["piwik","$rootScope"],window.angular.module("piwikApp.service").run(Te),window.globalAjaxQueue=[],window.globalAjaxQueue.active=0,window.globalAjaxQueue.clean=function(){for(var e=this.length;e>=0;e-=1)this[e]&&4!==this[e].readyState||this.splice(e,1)},window.globalAjaxQueue.push=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.active+=n.length,this.clean(),(e=Array.prototype.push).call.apply(e,[this].concat(n))},window.globalAjaxQueue.abort=function(){this.forEach((function(e){return e&&e.abort&&e.abort()})),this.splice(0,this.length),this.active=0};var Ye=function(e){$e(n,e);var t=Re(n);function n(){return Le(this,n),t.apply(this,arguments)}return n}(_e(Error)),Qe=function(){function e(){Le(this,e),Me(this,"format","json"),Me(this,"timeout",null),Me(this,"callback",null),Me(this,"useRegularCallbackInCaseOfError",!1),Me(this,"errorCallback",void 0),Me(this,"withToken",!1),Me(this,"completeCallback",void 0),Me(this,"getParams",{}),Me(this,"getUrl","?"),Me(this,"postParams",{}),Me(this,"loadingElement",null),Me(this,"errorElement","#ajaxError"),Me(this,"headers",void 0),Me(this,"requestHandle",null),Me(this,"abortController",null),Me(this,"defaultParams",["idSite","period","date","segment"]),this.errorCallback=ze}return xe(e,[{key:"addParams",value:function(e,t){var n=this,r="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,i=["compareSegments","comparePeriods","compareDates"];Object.keys(r).forEach((function(e){var o=r[e];(-1===i.indexOf(e)||o)&&("get"===t.toLowerCase()?n.getParams[e]=o:"post"===t.toLowerCase()&&(n.postParams[e]=o))}))}},{key:"withTokenInUrl",value:function(){this.withToken=!0}},{key:"setUrl",value:function(e){this.addParams(broadcast.getValuesFromUrl(e),"GET")}},{key:"setBulkRequests",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map((function(e){return"string"===typeof e?e:$.param(e)}));this.addParams({module:"API",method:"API.getBulkRequest",urls:r,format:"json"},"post")}},{key:"setTimeout",value:function(e){this.timeout=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"useCallbackInCaseOfError",value:function(){this.useRegularCallbackInCaseOfError=!0}},{key:"redirectOnSuccess",value:function(e){this.setCallback((function(){piwikHelper.redirect(e)}))}},{key:"setErrorCallback",value:function(e){this.errorCallback=e}},{key:"setCompleteCallback",value:function(e){this.completeCallback=e}},{key:"setFormat",value:function(e){this.format=e}},{key:"setLoadingElement",value:function(e){this.loadingElement=e||"#ajaxLoadingDiv"}},{key:"setErrorElement",value:function(e){e&&(this.errorElement=e)}},{key:"useGETDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)if(this.defaultParams[t]===e)return!0;return!1}},{key:"removeDefaultParameter",value:function(e){if(e&&this.defaultParams)for(var t=0;t<this.defaultParams.length;t+=1)this.defaultParams[t]===e&&this.defaultParams.splice(t,1)}},{key:"send",value:function(){var e=this;$(this.errorElement).length&&$(this.errorElement).hide(),this.loadingElement&&$(this.loadingElement).fadeIn(),this.requestHandle=this.buildAjaxCall(),window.globalAjaxQueue.push(this.requestHandle);var t=null;try{t=S.helper.getAngularDependency("$timeout")}catch(r){}this.abortController&&this.abortController.signal.addEventListener("abort",(function(){return e.requestHandle.abort()}));var n=new Promise((function(n,r){e.requestHandle.then((function(e){n(e)})).fail((function(t){"abort"!==t.statusText&&(console.log("Warning: the ".concat($.param(e.getParams)," request failed!")),r(t))})).done((function(){t&&t()}))}));return n}},{key:"abort",value:function(){this.requestHandle&&"function"===typeof this.requestHandle.abort&&(this.requestHandle.abort(),this.requestHandle=null)}},{key:"buildAjaxCall",value:function(){var e=this,t=this,n=this.mixinDefaultGetParams(this.getParams),r=this.getUrl;"?"!==r[r.length-1]&&(r+="&"),n.segment&&(r="".concat(r,"segment=").concat(n.segment,"&"),delete n.segment),n.date&&(r="".concat(r,"date=").concat(decodeURIComponent(n.date.toString()),"&"),delete n.date),r+=$.param(n);var i={type:"POST",async:!0,url:r,dataType:this.format||"json",complete:this.completeCallback,headers:this.headers?this.headers:void 0,error:function(){if(window.globalAjaxQueue.active-=1,t.errorCallback){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.errorCallback.apply(this,n)}},success:function(t,n,r){if(e.loadingElement&&$(e.loadingElement).hide(),t&&"error"===t.result&&!e.useRegularCallbackInCaseOfError){var i=null,o="toast";$(e.errorElement).length&&t.message&&($(e.errorElement).show(),i=e.errorElement,o=null);var a=!document.querySelector("#login_form");if(t.message&&a){var c=window["require"]("piwik/UI"),l=new c.Notification;l.show(t.message,{placeat:i,context:"error",type:o,id:"ajaxHelper"}),l.scrollToNotification()}}else e.callback&&e.callback(t,n,r);window.globalAjaxQueue.active-=1,S.ajaxRequestFinished&&S.ajaxRequestFinished()},data:this.mixinDefaultPostParams(this.postParams),timeout:null!==this.timeout?this.timeout:void 0};return $.ajax(i)}},{key:"isRequestToApiMethod",value:function(){return this.getParams&&"API"===this.getParams.module&&this.getParams.method||this.postParams&&"API"===this.postParams.module&&this.postParams.method}},{key:"isWidgetizedRequest",value:function(){return"Widgetize"===broadcast.getValueFromUrl("module")}},{key:"getDefaultPostParams",value:function(){return this.withToken||this.isRequestToApiMethod()||S.shouldPropagateTokenAuth?{token_auth:S.token_auth,force_api_session:broadcast.isWidgetizeRequestWithoutSession()?0:1}:{}}},{key:"mixinDefaultPostParams",value:function(e){var t=this.getDefaultPostParams(),n=Be(Be({},t),e);return n}},{key:"mixinDefaultGetParams",value:function(e){var t=this,n=Pe.getSearchParam("segment"),r={idSite:S.idSite?S.idSite.toString():broadcast.getValueFromUrl("idSite"),period:S.period||broadcast.getValueFromUrl("period"),segment:n},i=e;return i.token_auth&&(i.token_auth=null,delete i.token_auth),Object.keys(r).forEach((function(e){t.useGETDefaultParameter(e)&&!i[e]&&!t.postParams[e]&&r[e]&&(i[e]=r[e])})),!this.useGETDefaultParameter("date")||i.date||this.postParams.date||(i.date=S.currentDateString),i}}],[{key:"fetch",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new e;return n.withTokenInUrl&&r.withTokenInUrl(),r.setFormat(n.format||"json"),r.addParams(Be({module:"API",format:n.format||"json"},t),"get"),n.postParams&&r.addParams(n.postParams,"post"),n.headers&&(r.headers=n.headers),"undefined"===typeof n.createErrorNotification||n.createErrorNotification||r.useCallbackInCaseOfError(),n.abortController&&(r.abortController=n.abortController),r.send().then((function(e){if("error"===e.result)throw new Ye(e.message);return e}))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,Be(Be({},n),{},{postParams:t}))}}]),e}();function Ke(){return globalAjaxQueue}window.ajaxHelper=Qe,angular.module("piwikApp.service").service("globalAjaxQueue",Ke); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var He={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r=!!$(e).parent().closest(".dropdown-content").length;r&&(n={hover:!0},$(e).addClass("submenu"),$(t.value.activates).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container")),$(e).dropdown(n)}}; + */var Xe={mounted:function(e,t){var n={};$(e).addClass("matomo-dropdown-menu");var r=!!$(e).parent().closest(".dropdown-content").length;r&&(n={hover:!0},$(e).addClass("submenu"),$(t.value.activates).addClass("submenu-dropdown-content"),$(e).parents(".dropdown-content").addClass("submenu-container")),$(e).dropdown(n)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Fe(e){return{restrict:"A",link:function(t,n,r){var i={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){He.mounted(n[0],i)}))}}} + */function Ze(e){return{restrict:"A",link:function(t,n,r){var i={instance:null,value:{activates:$("#".concat(r.activates))[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Xe.mounted(n[0],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 _e(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function Ue(e,t){t.value.hasScrolled=!0}function qe(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function We(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}Fe.$inject=["$timeout"],angular.module("piwikApp").directive("piwikDropdownMenu",Fe);var Je=document.documentElement,Ge={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=We.bind(null,e,t),t.value.onMouseDown=qe.bind(null,e,t),t.value.onClickOutsideElement=_e.bind(null,e,t),t.value.onScroll=Ue.bind(null,e,t),Je.addEventListener("keyup",t.value.onEscapeHandler),Je.addEventListener("mousedown",t.value.onMouseDown),Je.addEventListener("mouseup",t.value.onClickOutsideElement),Je.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){Je.removeEventListener("keyup",t.value.onEscapeHandler),Je.removeEventListener("mousedown",t.value.onMouseDown),Je.removeEventListener("mouseup",t.value.onClickOutsideElement),Je.removeEventListener("scroll",t.value.onScroll)}}; +function et(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||t.value&&t.value.blur()}function tt(e,t){t.value.hasScrolled=!0}function nt(e,t){t.value.isMouseDown=!0,t.value.hasScrolled=!1}function rt(e,t,n){27===n.which&&setTimeout((function(){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.blur&&t.value.blur()}),0)}Ze.$inject=["$timeout"],angular.module("piwikApp").directive("piwikDropdownMenu",Ze);var it=document.documentElement,ot={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onEscapeHandler=rt.bind(null,e,t),t.value.onMouseDown=nt.bind(null,e,t),t.value.onClickOutsideElement=et.bind(null,e,t),t.value.onScroll=tt.bind(null,e,t),it.addEventListener("keyup",t.value.onEscapeHandler),it.addEventListener("mousedown",t.value.onMouseDown),it.addEventListener("mouseup",t.value.onClickOutsideElement),it.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){it.removeEventListener("keyup",t.value.onEscapeHandler),it.removeEventListener("mousedown",t.value.onMouseDown),it.removeEventListener("mouseup",t.value.onClickOutsideElement),it.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function ze(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};Ge.mounted(t[0],r),t.on("$destroy",(function(){return Ge.unmounted(t[0],r)}))}}} +function at(){return{restrict:"A",link:function(e,t,n){var r={instance:null,value:{blur:function(){setTimeout((function(){e.$apply(n.piwikFocusAnywhereButHere)}),0)}},oldValue:null,modifiers:{},dir:{}};ot.mounted(t[0],r),t.on("$destroy",(function(){return ot.unmounted(t[0],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 Ye(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}ze.$inject=[],angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",ze);var Qe={mounted:function(e,t){Ye(e,t)},updated:function(e,t){Ye(e,t)}}; +function ct(e,t){t.arg&&setTimeout((function(){e.focus(),t.value.afterFocus&&t.value.afterFocus()}),5)}at.$inject=[],angular.module("piwikApp.directive").directive("piwikFocusAnywhereButHere",at);var lt={mounted:function(e,t){ct(e,t)},updated:function(e,t){ct(e,t)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Ke(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};Qe.updated(t[0],r)}))}}} + */function st(){return{restrict:"A",link:function(e,t,n){e.$watch(n.piwikFocusIf,(function(n){var r={instance:null,arg:n?"1":void 0,value:{afterFocus:function(){return e.$apply()}},oldValue:null,modifiers:{},dir:{}};lt.updated(t[0],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 Xe(e,t){return e instanceof HTMLElement?e:t.instance.$refs[e]}angular.module("piwikApp.directive").directive("piwikFocusIf",Ke);var Ze={getRef:Xe}; +function ut(e,t){return e instanceof HTMLElement?e:t.instance.$refs[e]}angular.module("piwikApp.directive").directive("piwikFocusIf",st);var dt={getRef:ut}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function et(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function tt(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function nt(e){e.value.hasScrolled=!0}function rt(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function it(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var at=document.documentElement,ot={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=et.bind(null,e),t.value.onEscapeHandler=it.bind(null,e,t),t.value.onMouseDown=rt.bind(null,t),t.value.onClickOutsideElement=tt.bind(null,e,t),t.value.onScroll=nt.bind(null,t),setTimeout((function(){var e=Ze.getRef(t.value.expander,t);e.addEventListener("click",t.value.onExpand)})),at.addEventListener("keyup",t.value.onEscapeHandler),at.addEventListener("mousedown",t.value.onMouseDown),at.addEventListener("mouseup",t.value.onClickOutsideElement),at.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=Ze.getRef(t.value.expander,t);n.removeEventListener("click",t.value.onExpand),at.removeEventListener("keyup",t.value.onEscapeHandler),at.removeEventListener("mousedown",t.value.onMouseDown),at.removeEventListener("mouseup",t.value.onClickOutsideElement),at.removeEventListener("scroll",t.value.onScroll)}}; + */function pt(e){e.classList.toggle("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function ft(e,t,n){var r=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,r||e.contains(n.target)||e.classList.remove("expanded")}function mt(e){e.value.hasScrolled=!0}function ht(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function gt(e,t,n){27===n.which&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,e.classList.remove("expanded"))}var bt=document.documentElement,vt={mounted:function(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onExpand=pt.bind(null,e),t.value.onEscapeHandler=gt.bind(null,e,t),t.value.onMouseDown=ht.bind(null,t),t.value.onClickOutsideElement=ft.bind(null,e,t),t.value.onScroll=mt.bind(null,t),setTimeout((function(){var e=dt.getRef(t.value.expander,t);e.addEventListener("click",t.value.onExpand)})),bt.addEventListener("keyup",t.value.onEscapeHandler),bt.addEventListener("mousedown",t.value.onMouseDown),bt.addEventListener("mouseup",t.value.onClickOutsideElement),bt.addEventListener("scroll",t.value.onScroll)},unmounted:function(e,t){var n=dt.getRef(t.value.expander,t);n.removeEventListener("click",t.value.onExpand),bt.removeEventListener("keyup",t.value.onEscapeHandler),bt.removeEventListener("mousedown",t.value.onMouseDown),bt.removeEventListener("mouseup",t.value.onClickOutsideElement),bt.removeEventListener("scroll",t.value.onScroll)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function ct(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};ot.mounted(t[0],n),t.on("$destroy",(function(){return ot.unmounted(t[0],n)}))}}} +function yt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};vt.mounted(t[0],n),t.on("$destroy",(function(){return vt.unmounted(t[0],n)}))}}} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function lt(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function st(e){e.classList.remove("expanded")}function ut(e,t){e.contains(t.target)||e.classList.remove("expanded")}function dt(e,t){27===t.which&&e.classList.remove("expanded")}ct.$inject=[],angular.module("piwikApp").directive("piwikExpandOnClick",ct);var pt=document.documentElement,ft={mounted:function(e,t){t.value.onMouseEnter=lt.bind(null,e),t.value.onMouseLeave=st.bind(null,e),t.value.onClickOutsideElement=ut.bind(null,e),t.value.onEscapeHandler=dt.bind(null,e),setTimeout((function(){var e=Ze.getRef(t.value.expander,t);e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),pt.addEventListener("keyup",t.value.onEscapeHandler),pt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=Ze.getRef(t.value.expander,t);n.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; +function Ot(e){e.classList.add("expanded");var t=e.querySelector(".dropdown.positionInViewport");t&&S.helper.setMarginLeftToBeInViewport(t)}function wt(e){e.classList.remove("expanded")}function jt(e,t){e.contains(t.target)||e.classList.remove("expanded")}function kt(e,t){27===t.which&&e.classList.remove("expanded")}yt.$inject=[],angular.module("piwikApp").directive("piwikExpandOnClick",yt);var St=document.documentElement,Ct={mounted:function(e,t){t.value.onMouseEnter=Ot.bind(null,e),t.value.onMouseLeave=wt.bind(null,e),t.value.onClickOutsideElement=jt.bind(null,e),t.value.onEscapeHandler=kt.bind(null,e),setTimeout((function(){var e=dt.getRef(t.value.expander,t);e.addEventListener("mouseenter",t.value.onMouseEnter)})),e.addEventListener("mouseleave",t.value.onMouseLeave),St.addEventListener("keyup",t.value.onEscapeHandler),St.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted:function(e,t){var n=dt.getRef(t.value.expander,t);n.removeEventListener("mouseenter",t.value.onMouseEnter),e.removeEventListener("mouseleave",t.value.onMouseLeave),document.removeEventListener("keyup",t.value.onEscapeHandler),document.removeEventListener("mouseup",t.value.onClickOutsideElement)}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function mt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};ft.mounted(t[0],n),t.on("$destroy",(function(){return ft.unmounted(t[0],n)}))}}}mt.$inject=[],angular.module("piwikApp").directive("piwikExpandOnHover",mt); +function Dt(){return{restrict:"A",link:function(e,t){var n={instance:null,value:{expander:t.find(".title").first()[0]},oldValue:null,modifiers:{},dir:{}};Ct.mounted(t[0],n),t.on("$destroy",(function(){return Ct.unmounted(t[0],n)}))}}}Dt.$inject=[],angular.module("piwikApp").directive("piwikExpandOnHover",Dt); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -var ht=!1,gt={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!ht){ht=!0;var n=Ze.getRef(t.value.activator,t);n&&window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; +var Pt=!1,Et={mounted:function(e,t){t.value.activator&&setTimeout((function(){if(!Pt){Pt=!0;var n=dt.getRef(t.value.activator,t);n&&window.$(n).show();var r=n.getAttribute("data-target");window.$("#".concat(r)).sidenav({closeOnClick:!0})}e.classList.contains("collapsible")&&window.$(e).collapsible()}))}}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -function vt(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){gt.mounted(n[0],i)}))}}}vt.$inject=["$timeout"],angular.module("piwikApp.directive").directive("piwikSideNav",vt);var bt={ref:"root"};function yt(e,t,n,r,i,o){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",bt,[Object(a["renderSlot"])(e.$slots,"default")],512)),[[a["vShow"],e.modelValue]])}var Ot=Object(a["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});Ot.render=yt;var wt=Ot;function jt(e,t){return Pt(e)||Dt(e,t)||St(e,t)||kt()}function kt(){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 St(e,t){if(e){if("string"===typeof e)return Ct(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)?Ct(e,t):void 0}}function Ct(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 Dt(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 Pt(e){if(Array.isArray(e))return e}function Et(e){return Et="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},Et(e)} +function Vt(e){return{restrict:"A",priority:10,link:function(t,n,r){var i={instance:null,value:{activator:$(r.piwikSideNav)[0]},oldValue:null,modifiers:{},dir:{}};e((function(){Et.mounted(n[0],i)}))}}}Vt.$inject=["$timeout"],angular.module("piwikApp.directive").directive("piwikSideNav",Vt);var Tt={ref:"root"};function Nt(e,t,n,r,i,a){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Tt,[Object(o["renderSlot"])(e.$slots,"default")],512)),[[o["vShow"],e.modelValue]])}var It=Object(o["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},element:{type:HTMLElement,required:!1}},emits:["yes","no","closeEnd","close","validation","update:modelValue"],activated:function(){this.$emit("update:modelValue",!1)},watch:{modelValue:function(e,t){var n=this;if(e){var r=this.element||this.$refs.root.firstElementChild;S.helper.modalConfirm(r,{yes:function(){n.$emit("yes")},no:function(){n.$emit("no")},validation:function(){n.$emit("validation")}},{onCloseEnd:function(){n.element||n.$refs.root.appendChild(r),n.$emit("update:modelValue",!1),n.$emit("closeEnd")}})}else!1===e&&!0===t&&this.$emit("close")}}});It.render=Nt;var Bt=It;function At(e,t){return Rt(e)||$t(e,t)||Mt(e,t)||xt()}function xt(){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 Mt(e,t){if(e){if("string"===typeof e)return Lt(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)?Lt(e,t):void 0}}function Lt(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 $t(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function Rt(e){if(Array.isArray(e))return e}function Ht(e){return Ht="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},Ht(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 Vt=0;function Tt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function Nt(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function It(e){return"object"===Et(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).filter((function(e){return!/^\$/.test(e[0])}))):e}function Bt(e){var t=e.component,n=e.require,r=e.scope,i=void 0===r?{}:r,o=e.events,c=void 0===o?{}:o,l=e.$inject,s=e.directiveName,u=e.transclude,d=e.mountPointFactory,p=e.postCreate,f=e.noScope,m=e.restrict,h=void 0===m?"A":m,g=e.priority,v=Vt;u&&(Vt+=1);var b={};function y(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];var l={restrict:h,require:n,priority:g,scope:f?void 0:b,compile:function(){return{post:function(e,n,o,l){var s=u?n.find("[ng-transclude][counter=".concat(v,"]")):null,f="<root-component";Object.entries(c).forEach((function(e){var t=jt(e,1),n=t[0];f+=" @".concat(Tt(n),"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(i).forEach((function(e){var t=jt(e,2),n=t[0],r=t[1];if("&"===r.angularJsBind){var i=Tt(n);c[i]||(f+=" @".concat(i,"=\"onEventHandler('").concat(i,"', $event)\""))}else f+=" :".concat(Tt(r.vue),'="').concat(r.vue,'"')})),f+=">",u&&(f+='<div ref="transcludeTarget"/>'),f+="</root-component>";var m=Object(a["createApp"])({template:f,data:function(){var t=this,a={};return Object.entries(i).forEach((function(i){var c=jt(i,2),s=c[0],u=c[1],d=It(e[s]);"undefined"===typeof d&&"undefined"!==typeof u.default&&(d=u.default instanceof Function?u.default.apply(u,[e,n,o].concat(r)):u.default),u.transform&&(d=u.transform.apply(u,[d,t,e,n,o,l].concat(r))),a[u.vue]=d})),a},setup:function(){if(u){var e=Object(a["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,i){var a=Nt(t);e[a]&&e[a](i),c[t]&&c[t].apply(c,[i,this,e,n,o,l].concat(r))}}});m.config.globalProperties.$sanitize=window.vueSanitize,m.config.globalProperties.translate=C,m.component("root-component",t);var h=d?d.apply(void 0,[e,n,o].concat(r)):n[0],g=m.mount(h);Object.entries(i).forEach((function(t){var i=jt(t,2),a=i[0],c=i[1];c.angularJsBind&&"&"!==c.angularJsBind&&e.$watch(a,(function(t){var i=It(t);"undefined"!==typeof c.default&&"undefined"===typeof t&&(i=c.default instanceof Function?c.default.apply(c,[e,n,o].concat(r)):c.default),c.transform&&(i=c.transform.apply(c,[i,g,e,n,o,l].concat(r))),g[c.vue]=i}))})),u&&$(g.transcludeTarget).append(s),p&&p.apply(void 0,[g,e,n,o,l].concat(r)),n.on("$destroy",(function(){m.unmount()}))}}}};return u&&(l.transclude=!0,l.template='<div ng-transclude counter="'.concat(v,'"/>')),l}return Object.entries(i).forEach((function(e){var t=jt(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(b[n]=r.angularJsBind)})),y.$inject=l||[],angular.module("piwikApp").directive(s,y),y}function At(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function xt(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function Mt(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function Lt(e){var t=Mt(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} + */var Ft=0;function _t(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())}))}function Ut(e){return e.substring(0,1).toLowerCase()+e.substring(1).replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function Wt(e){return"object"===Ht(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).filter((function(e){return!/^\$/.test(e[0])}))):e}function qt(e){var t=e.component,n=e.require,r=e.scope,i=void 0===r?{}:r,a=e.events,c=void 0===a?{}:a,l=e.$inject,s=e.directiveName,u=e.transclude,d=e.mountPointFactory,p=e.postCreate,f=e.noScope,m=e.restrict,h=void 0===m?"A":m,g=e.priority,b=Ft;u&&(Ft+=1);var v={};function y(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];var l={restrict:h,require:n,priority:g,scope:f?void 0:v,compile:function(){return{post:function(e,n,a,l){var s=u?n.find("[ng-transclude][counter=".concat(b,"]")):null,f="<root-component";Object.entries(c).forEach((function(e){var t=At(e,1),n=t[0];f+=" @".concat(_t(n),"=\"onEventHandler('").concat(n,"', $event)\"")})),Object.entries(i).forEach((function(e){var t=At(e,2),n=t[0],r=t[1];if("&"===r.angularJsBind){var i=_t(n);c[i]||(f+=" @".concat(i,"=\"onEventHandler('").concat(i,"', $event)\""))}else f+=" :".concat(_t(r.vue),'="').concat(r.vue,'"')})),f+=">",u&&(f+='<div ref="transcludeTarget"/>'),f+="</root-component>";var m=Object(o["createApp"])({template:f,data:function(){var t=this,o={};return Object.entries(i).forEach((function(i){var c=At(i,2),s=c[0],u=c[1],d=Wt(e[s]);"undefined"===typeof d&&"undefined"!==typeof u.default&&(d=u.default instanceof Function?u.default.apply(u,[e,n,a].concat(r)):u.default),u.transform&&(d=u.transform.apply(u,[d,t,e,n,a,l].concat(r))),o[u.vue]=d})),o},setup:function(){if(u){var e=Object(o["ref"])(null);return{transcludeTarget:e}}},methods:{onEventHandler:function(t,i){var o=Ut(t);e[o]&&e[o](i),c[t]&&c[t].apply(c,[i,this,e,n,a,l].concat(r))}}});m.config.globalProperties.$sanitize=window.vueSanitize,m.config.globalProperties.translate=C,m.component("root-component",t);var h=d?d.apply(void 0,[e,n,a].concat(r)):n[0],g=m.mount(h);Object.entries(i).forEach((function(t){var i=At(t,2),o=i[0],c=i[1];c.angularJsBind&&"&"!==c.angularJsBind&&e.$watch(o,(function(t){var i=Wt(t);"undefined"!==typeof c.default&&"undefined"===typeof t&&(i=c.default instanceof Function?c.default.apply(c,[e,n,a].concat(r)):c.default),c.transform&&(i=c.transform.apply(c,[i,g,e,n,a,l].concat(r))),g[c.vue]=i}))})),u&&$(g.transcludeTarget).append(s),p&&p.apply(void 0,[g,e,n,a,l].concat(r)),n.on("$destroy",(function(){m.unmount()}))}}}};return u&&(l.transclude=!0,l.template='<div ng-transclude counter="'.concat(b,'"/>')),l}return Object.entries(i).forEach((function(e){var t=At(e,2),n=t[0],r=t[1];r.vue||(r.vue=n),r.angularJsBind&&(v[n]=r.angularJsBind)})),y.$inject=l||[],angular.module("piwikApp").directive(s,y),y}function Jt(e){if("undefined"!==typeof e)return"true"===e||!!e&&e>0&&"0"!==e}function Gt(e){if("undefined"!==typeof e)return null===e?null:parseInt(e,10)}function zt(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}function Yt(e){var t=zt(e);return S.helper.getAngularDependency("$rootScope").$applyAsync(),t} /*! * 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:wt,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,a,o){setTimeout((function(){n.$apply(o(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0});var $t={key:0,class:"title",tabindex:"6"},Rt=["href","title"],Ht={class:"iconsBar"},Ft=["href","title"],_t=Object(a["createElementVNode"])("span",{class:"icon-help"},null,-1),Ut=[_t],qt=["title"],Wt=Object(a["createElementVNode"])("span",{class:"icon-info"},null,-1),Jt=[Wt],Gt={class:"ratingIcons"},zt={class:"inlineHelp"},Yt=["innerHTML"],Qt=["innerHTML"],Kt=["href"];function Xt(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("RateFeature");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",$t,[Object(a["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(a["renderSlot"])(e.$slots,"default")],8,Rt)):Object(a["createCommentVNode"])("",!0),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",Ht,[e.helpUrl&&!e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},Ut,8,Ft)):Object(a["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(a["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},Jt,10,qt)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",Gt,[Object(a["createVNode"])(c,{title:e.actualFeatureName},null,8,["title"])])],512),[[a["vShow"],e.showIcons||e.showInlineHelp]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",zt,[Object(a["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Yt),Object(a["createElementVNode"])("span",{class:"helpDate",innerHTML:e.reportGenerated},null,8,Qt),e.helpUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(a["toDisplayString"])(e.translate("General_MoreDetails")),9,Kt)):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showInlineHelp]])],544)} + */qt({component:Bt,scope:{show:{vue:"modelValue",default:!1},element:{default:function(e,t){return t[0]}}},events:{yes:function(e,t,n,r,i){i.yes&&(n.$eval(i.yes),setTimeout((function(){n.$apply()}),0))},no:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},validation:function(e,t,n,r,i){i.no&&(n.$eval(i.no),setTimeout((function(){n.$apply()}),0))},close:function(e,t,n,r,i){i.close&&(n.$eval(i.close),setTimeout((function(){n.$apply()}),0))},"update:modelValue":function(e,t,n,r,i,o,a){setTimeout((function(){n.$apply(a(i.piwikDialog).assign(n,e))}),0)}},$inject:["$parse"],directiveName:"piwikDialog",transclude:!0,mountPointFactory:function(e,t){var n=$('<div class="vue-placeholder"/>');return n.appendTo(t),n[0]},postCreate:function(e,t,n,r){t.$watch(r.piwikDialog,(function(t,n){n!==t&&(e.modelValue=t||!1)}))},noScope:!0});var Qt={key:0,class:"title",tabindex:"6"},Kt=["href","title"],Xt={class:"iconsBar"},Zt=["href","title"],en=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),tn=[en],nn=["title"],rn=Object(o["createElementVNode"])("span",{class:"icon-info"},null,-1),on=[rn],an={class:"ratingIcons"},cn={class:"inlineHelp"},ln=["innerHTML"],sn=["innerHTML"],un=["href"];function dn(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("RateFeature");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"enrichedHeadline",onMouseenter:t[1]||(t[1]=function(t){return e.showIcons=!0}),onMouseleave:t[2]||(t[2]=function(t){return e.showIcons=!1}),ref:"root"},[e.editUrl?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qt,[Object(o["renderSlot"])(e.$slots,"default")])),e.editUrl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,class:"title",href:e.editUrl,title:e.translate("CoreHome_ClickToEditX",e.$sanitize(e.actualFeatureName))},[Object(o["renderSlot"])(e.$slots,"default")],8,Kt)):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",Xt,[e.helpUrl&&!e.actualInlineHelp?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"helpIcon",href:e.helpUrl,title:e.translate("CoreHome_ExternalHelp")},tn,8,Zt)):Object(o["createCommentVNode"])("",!0),e.actualInlineHelp?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,onClick:t[0]||(t[0]=function(t){return e.showInlineHelp=!e.showInlineHelp}),class:Object(o["normalizeClass"])(["helpIcon",{active:e.showInlineHelp}]),title:e.translate(e.reportGenerated?"General_HelpReport":"General_Help")},on,10,nn)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",an,[Object(o["createVNode"])(c,{title:e.actualFeatureName},null,8,["title"])])],512),[[o["vShow"],e.showIcons||e.showInlineHelp]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",cn,[Object(o["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,ln),Object(o["createElementVNode"])("span",{class:"helpDate",innerHTML:e.reportGenerated},null,8,sn),e.helpUrl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",class:"readMore",href:e.helpUrl},Object(o["toDisplayString"])(e.translate("General_MoreDetails")),9,un)):Object(o["createCommentVNode"])("",!0)],512),[[o["vShow"],e.showInlineHelp]])],544)} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Zt(e,t){return Object(a["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var en=Zt("Feedback","RateFeature"),tn=Object(a["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:en},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i=r.getAttribute("data-content").trim();i.length&&(e.actualInlineHelp="<p>".concat(i,"</p>"),setTimeout((function(){return r.remove()}),0))}}e.actualFeatureName||(e.actualFeatureName=t.querySelector(".title").textContent),e.reportGenerated&&p.parse(S.period,S.currentDateString).containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}))}});tn.render=Xt;var nn=tn,rn=(Bt({component:nn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),an={class:"card-content"},on={key:0,class:"card-title"},cn={key:1,class:"card-title"},ln={ref:"content"}; + */function pn(e,t){return Object(o["defineAsyncComponent"])((function(){return new Promise((function(n){window.$(document).ready((function(){window[e]?n(window[e][t]):n(null)}))}))}))}var fn=pn("Feedback","RateFeature"),mn=Object(o["defineComponent"])({props:{helpUrl:{type:String,default:""},editUrl:{type:String,default:""},reportGenerated:String,featureName:String,inlineHelp:String},components:{RateFeature:fn},data:function(){return{showIcons:!1,showInlineHelp:!1,actualFeatureName:this.featureName,actualInlineHelp:this.inlineHelp}},watch:{inlineHelp:function(e){this.actualInlineHelp=e},featureName:function(e){this.actualFeatureName=e}},mounted:function(){var e=this,t=this.$refs.root;setTimeout((function(){if(!e.actualInlineHelp){var n,r=t.querySelector(".title .inlineHelp");if(!r&&null!==(n=t.parentElement)&&void 0!==n&&n.nextElementSibling&&(r=t.parentElement.nextElementSibling.querySelector(".reportDocumentation")),r){var i=r.getAttribute("data-content").trim();i.length&&(e.actualInlineHelp="<p>".concat(i,"</p>"),setTimeout((function(){return r.remove()}),0))}}e.actualFeatureName||(e.actualFeatureName=t.querySelector(".title").textContent),e.reportGenerated&&p.parse(S.period,S.currentDateString).containsToday()&&window.$(t.querySelector(".report-generated")).tooltip({track:!0,content:e.reportGenerated,items:"div",show:!1,hide:!1})}))}});mn.render=dn;var hn=mn,gn=(qt({component:hn,scope:{helpUrl:{angularJsBind:"@"},editUrl:{angularJsBind:"@"},reportGenerated:{angularJsBind:"@?"},featureName:{angularJsBind:"@"},inlineHelp:{angularJsBind:"@?"}},directiveName:"piwikEnrichedHeadline",transclude:!0}),{class:"card",ref:"root"}),bn={class:"card-content"},vn={key:0,class:"card-title"},yn={key:1,class:"card-title"},On={ref:"content"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function sn(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("EnrichedHeadline");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",rn,[Object(a["createElementVNode"])("div",an,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",on,Object(a["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(a["openBlock"])(),Object(a["createElementBlock"])("h2",cn,[Object(a["createVNode"])(c,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(a["withCtx"])((function(){return[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",ln,[Object(a["renderSlot"])(e.$slots,"default")],512)])],512)}var un=null,dn=Object(a["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:nn},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e,t=this,n=this.$refs,r=n.root,i=n.content;if(this.anchor){var a=document.createElement("a");a.id=this.anchor,r.parentElement.prepend(a)}if(setTimeout((function(){var e=i.querySelector(".contentHelp");e&&(t.actualHelpText=e.innerHTML,e.remove())}),0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===un&&(un=document.querySelector("#content.admin")),un&&(e=un.offsetTop),e||0===e){var o=r.closest("[piwik-widget-loader]"),c=o?o.offsetTop:r.offsetTop;c-e<17&&(r.style.marginTop=0)}}});dn.render=sn;var pn=dn; + */function wn(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("EnrichedHeadline");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",gn,[Object(o["createElementVNode"])("div",bn,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",vn,Object(o["toDisplayString"])(e.contentTitle),1)),e.contentTitle&&(e.actualFeature||e.helpUrl||e.actualHelpText)?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",yn,[Object(o["createVNode"])(c,{"feature-name":e.actualFeature,"help-url":e.helpUrl,"inline-help":e.actualHelpText},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.contentTitle),1)]})),_:1},8,["feature-name","help-url","inline-help"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",On,[Object(o["renderSlot"])(e.$slots,"default")],512)])],512)}var jn=null,kn=Object(o["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,helpText:String,anchor:String},components:{EnrichedHeadline:hn},data:function(){return{actualFeature:this.feature,actualHelpText:this.helpText}},watch:{feature:function(e){this.actualFeature=e},helpText:function(e){this.actualHelpText=e}},mounted:function(){var e,t=this,n=this.$refs,r=n.root,i=n.content;if(this.anchor){var o=document.createElement("a");o.id=this.anchor,r.parentElement.prepend(o)}if(setTimeout((function(){var e=i.querySelector(".contentHelp");e&&(t.actualHelpText=e.innerHTML,e.remove())}),0),!this.actualFeature||!0!==this.actualFeature&&"true"!==this.actualFeature||(this.actualFeature=this.contentTitle),null===jn&&(jn=document.querySelector("#content.admin")),jn&&(e=jn.offsetTop),e||0===e){var a=r.closest("[piwik-widget-loader]"),c=a?a.offsetTop:r.offsetTop;c-e<17&&(r.style.marginTop=0)}}});kn.render=wn;var Sn=kn; /*! * 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:pn,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function fn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mn(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 hn(e,t,n){return t&&mn(e.prototype,t),n&&mn(e,n),e}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */qt({component:Sn,scope:{contentTitle:{angularJsBind:"@"},feature:{angularJsBind:"@"},helpUrl:{angularJsBind:"@"},helpText:{angularJsBind:"@"},anchor:{angularJsBind:"@?"}},directiveName:"piwikContentBlock",transclude:!0});function Cn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(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 Pn(e,t,n){return t&&Dn(e.prototype,t),n&&Dn(e,n),e}function En(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 vn=function(){function e(){var t=this;fn(this,e),gn(this,"segmentState",Object(a["reactive"])({availableSegments:[]})),S.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return hn(e,[{key:"state",get:function(){return Object(a["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),bn=new vn;function yn(e){return kn(e)||jn(e)||wn(e)||On()}function On(){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 wn(e,t){if(e){if("string"===typeof e)return Sn(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)?Sn(e,t):void 0}}function jn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function kn(e){if(Array.isArray(e))return Sn(e)}function Sn(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 Cn(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 Dn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){Tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function En(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 Vn(e,t,n){return t&&En(e.prototype,t),n&&En(e,n),e}function Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */var Vn=function(){function e(){var t=this;Cn(this,e),En(this,"segmentState",Object(o["reactive"])({availableSegments:[]})),S.on("piwikSegmentationInited",(function(){return t.setSegmentState()}))}return Pn(e,[{key:"state",get:function(){return Object(o["readonly"])(this.segmentState)}},{key:"setSegmentState",value:function(){try{var e=$(".segmentEditorPanel").data("uiControlObject");this.segmentState.availableSegments=e.impl.availableSegments||[]}catch(t){}}}]),e}(),Tn=new Vn;function Nn(e){return xn(e)||An(e)||Bn(e)||In()}function In(){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 Bn(e,t){if(e){if("string"===typeof e)return Mn(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)?Mn(e,t):void 0}}function An(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function xn(e){if(Array.isArray(e))return Mn(e)}function Mn(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 Ln(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 $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(n),!0).forEach((function(t){_n(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hn(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 Fn(e,t,n){return t&&Hn(e.prototype,t),n&&Hn(e,n),e}function _n(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 Nn=8,In=3;function Bn(e){return e?Array.isArray(e)?e:[e]:[]}var An=function(){function e(){var t=this;Pn(this,e),Tn(this,"privateState",Object(a["reactive"])({comparisonsDisabledFor:[]})),Tn(this,"state",Object(a["readonly"])(this.privateState)),Tn(this,"colors",{}),Tn(this,"segmentComparisons",Object(a["computed"])((function(){return t.parseSegmentComparisons()}))),Tn(this,"periodComparisons",Object(a["computed"])((function(){return t.parsePeriodComparisons()}))),Tn(this,"isEnabled",Object(a["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(a["watch"])((function(){return t.getComparisons()}),(function(){return S.postEvent("piwikComparisonsChanged")}),{deep:!0})}return Vn(e,[{key:"getComparisons",value:function(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}},{key:"isComparing",value:function(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%Nn;if(0===n)return this.colors["series".concat(r)];var i=n%In;return this.colors["series".concat(r,"-shade").concat(i)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%Nn);return t>0&&(n+="-shade".concat(t%In)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(i){t.push({index:n,params:Dn(Dn({},i.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=yn(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},a=!1,o=!1;e.forEach((function(e){a?r[e.params.segment]=!0:a=!0})),t.forEach((function(e){o?i["".concat(e.params.period,"|").concat(e.params.date)]=!0:o=!0}));var c=[],l=[];Object.keys(i).forEach((function(e){var t=e.split("|");c.push(t[0]),l.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:c,compareDates:l},u=S.helper.isAngularRenderingThePage()?Pe.hashParsed.value:Pe.urlParsed.value;Pe.updateLocation(Dn(Dn(Dn({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n<Nn;n+=1){t.push("series".concat(n));for(var r=0;r<In;r+=1)t.push("series".concat(n,"-shade").concat(r))}return e.getColors("comparison-series-color",t)}},{key:"loadComparisonsDisabledFor",value:function(){var e=this,t=Pe.parsed.value.module;"CoreUpdater"!==t&&"Installation"!==t?$e.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=bn.state.availableSegments,t=yn(Bn(Pe.parsed.value.compareSegments));t.unshift(Pe.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var i;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(i=e)}));var a=i?i.name:C("General_Unknown");""===t.trim()&&(a=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:S.helper.htmlDecode(a),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=yn(Bn(Pe.parsed.value.comparePeriods)),t=yn(Bn(Pe.parsed.value.compareDates));e.unshift(Pe.parsed.value.period),t.unshift(Pe.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var i=void 0;try{i=p.parse(e[r],t[r]).getPrettyString()}catch(a){i=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:i,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=Pe.parsed.value.category||Pe.parsed.value.module,t=Pe.parsed.value.subcategory||Pe.parsed.value.action,n="".concat(e,".").concat(t),r=-1===this.privateState.comparisonsDisabledFor.indexOf(n)&&-1===this.privateState.comparisonsDisabledFor.indexOf("".concat(e,".*"));return document.documentElement.classList.toggle("comparisonsDisabled",!r),r}}]),e}(),xn=new An,Mn={key:0,ref:"root",class:"matomo-comparisons"},Ln={class:"comparison-type"},$n=["title"],Rn=["href"],Hn=["title"],Fn={class:"comparison-period-label"},_n=["onClick"],Un=["title"],qn={class:"loadingPiwik",style:{display:"none"}},Wn=["alt"];function Jn(e,t,n,r,i,o){var c=Object(a["resolveDirective"])("tooltips");return e.isComparing?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Mn,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.segmentComparisons,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(a["createElementVNode"])("div",Ln,Object(a["toDisplayString"])(e.translate("General_Segment")),1),Object(a["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(a["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(a["toDisplayString"])(t.title),9,Rn)],8,$n),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.periodComparisons,(function(n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(a["createElementVNode"])("span",{class:"comparison-dot",style:Object(a["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(a["createElementVNode"])("span",Fn,Object(a["toDisplayString"])(n.title)+" ("+Object(a["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,Hn)})),128)),e.segmentComparisons.length>1?(Object(a["openBlock"])(),Object(a["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(a["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Un)],8,_n)):Object(a["createCommentVNode"])("",!0)])})),128)),Object(a["createElementVNode"])("div",qn,[Object(a["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,Wn),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[c,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(a["createCommentVNode"])("",!0)} + */var Un=8,Wn=3;function qn(e){return e?Array.isArray(e)?e:[e]:[]}var Jn=function(){function e(){var t=this;Rn(this,e),_n(this,"privateState",Object(o["reactive"])({comparisonsDisabledFor:[]})),_n(this,"state",Object(o["readonly"])(this.privateState)),_n(this,"colors",{}),_n(this,"segmentComparisons",Object(o["computed"])((function(){return t.parseSegmentComparisons()}))),_n(this,"periodComparisons",Object(o["computed"])((function(){return t.parsePeriodComparisons()}))),_n(this,"isEnabled",Object(o["computed"])((function(){return t.checkEnabledForCurrentPage()}))),this.loadComparisonsDisabledFor(),$((function(){t.colors=t.getAllSeriesColors()})),Object(o["watch"])((function(){return t.getComparisons()}),(function(){return S.postEvent("piwikComparisonsChanged")}),{deep:!0})}return Fn(e,[{key:"getComparisons",value:function(){return this.getSegmentComparisons().concat(this.getPeriodComparisons())}},{key:"isComparing",value:function(){return this.isComparisonEnabled()&&(this.segmentComparisons.value.length>1||this.periodComparisons.value.length>1)}},{key:"isComparingPeriods",value:function(){return this.getPeriodComparisons().length>1}},{key:"getSegmentComparisons",value:function(){return this.isComparisonEnabled()?this.segmentComparisons.value:[]}},{key:"getPeriodComparisons",value:function(){return this.isComparisonEnabled()?this.periodComparisons.value:[]}},{key:"getSeriesColor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getComparisonSeriesIndex(t.index,e.index)%Un;if(0===n)return this.colors["series".concat(r)];var i=n%Wn;return this.colors["series".concat(r,"-shade").concat(i)]}},{key:"getSeriesColorName",value:function(e,t){var n="series".concat(e%Un);return t>0&&(n+="-shade".concat(t%Wn)),n}},{key:"isComparisonEnabled",value:function(){return this.isEnabled.value}},{key:"getIndividualComparisonRowIndices",value:function(e){var t=this.getSegmentComparisons().length,n=e%t,r=Math.floor(e/t);return{segmentIndex:n,periodIndex:r}}},{key:"getComparisonSeriesIndex",value:function(e,t){var n=this.getSegmentComparisons().length;return e*n+t}},{key:"getAllComparisonSeries",value:function(){var e=this,t=[],n=0;return this.getPeriodComparisons().forEach((function(r){e.getSegmentComparisons().forEach((function(i){t.push({index:n,params:$n($n({},i.params),r.params),color:e.colors["series".concat(n)]}),n+=1}))})),t}},{key:"removeSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=Nn(this.segmentComparisons.value);t.splice(e,1);var n={};0===e&&(n.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,n)}},{key:"addSegmentComparison",value:function(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");var t=this.segmentComparisons.value.concat([{params:e,index:-1,title:""}]);this.updateQueryParamsFromComparisons(t,this.periodComparisons.value)}},{key:"updateQueryParamsFromComparisons",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i={},o=!1,a=!1;e.forEach((function(e){o?r[e.params.segment]=!0:o=!0})),t.forEach((function(e){a?i["".concat(e.params.period,"|").concat(e.params.date)]=!0:a=!0}));var c=[],l=[];Object.keys(i).forEach((function(e){var t=e.split("|");c.push(t[0]),l.push(t[1])}));var s={compareSegments:Object.keys(r),comparePeriods:c,compareDates:l},u=S.helper.isAngularRenderingThePage()?Pe.hashParsed.value:Pe.urlParsed.value;Pe.updateLocation($n($n($n({},u),s),n))}},{key:"getAllSeriesColors",value:function(){var e=S.ColorManager;if(!e)return[];for(var t=[],n=0;n<Un;n+=1){t.push("series".concat(n));for(var r=0;r<Wn;r+=1)t.push("series".concat(n,"-shade").concat(r))}return e.getColors("comparison-series-color",t)}},{key:"loadComparisonsDisabledFor",value:function(){var e=this,t=Pe.parsed.value.module;"CoreUpdater"!==t&&"Installation"!==t?Qe.fetch({module:"API",method:"API.getPagesComparisonsDisabledFor"}).then((function(t){e.privateState.comparisonsDisabledFor=t})):this.privateState.comparisonsDisabledFor=[]}},{key:"parseSegmentComparisons",value:function(){var e=Tn.state.availableSegments,t=Nn(qn(Pe.parsed.value.compareSegments));t.unshift(Pe.parsed.value.segment||"");var n=[];return t.forEach((function(t,r){var i;e.forEach((function(e){e.definition!==t&&e.definition!==decodeURIComponent(t)&&decodeURIComponent(e.definition)!==t||(i=e)}));var o=i?i.name:C("General_Unknown");""===t.trim()&&(o=C("SegmentEditor_DefaultAllVisits")),n.push({params:{segment:t},title:S.helper.htmlDecode(o),index:r})})),n}},{key:"parsePeriodComparisons",value:function(){var e=Nn(qn(Pe.parsed.value.comparePeriods)),t=Nn(qn(Pe.parsed.value.compareDates));e.unshift(Pe.parsed.value.period),t.unshift(Pe.parsed.value.date);for(var n=[],r=0;r<Math.min(t.length,e.length);r+=1){var i=void 0;try{i=p.parse(e[r],t[r]).getPrettyString()}catch(o){i=C("General_Error")}n.push({params:{date:t[r],period:e[r]},title:i,index:r})}return n}},{key:"checkEnabledForCurrentPage",value:function(){var e=Pe.parsed.value.category||Pe.parsed.value.module,t=Pe.parsed.value.subcategory||Pe.parsed.value.action,n="".concat(e,".").concat(t),r=-1===this.privateState.comparisonsDisabledFor.indexOf(n)&&-1===this.privateState.comparisonsDisabledFor.indexOf("".concat(e,".*"));return document.documentElement.classList.toggle("comparisonsDisabled",!r),r}}]),e}(),Gn=new Jn,zn={key:0,ref:"root",class:"matomo-comparisons"},Yn={class:"comparison-type"},Qn=["title"],Kn=["href"],Xn=["title"],Zn={class:"comparison-period-label"},er=["onClick"],tr=["title"],nr={class:"loadingPiwik",style:{display:"none"}},rr=["alt"];function ir(e,t,n,r,i,a){var c=Object(o["resolveDirective"])("tooltips");return e.isComparing?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",zn,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("General_Comparisons")),1),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.segmentComparisons,(function(t,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(o["createElementVNode"])("div",Yn,Object(o["toDisplayString"])(e.translate("General_Segment")),1),Object(o["createElementVNode"])("div",{class:"title",title:t.title+"<br/>"+decodeURIComponent(t.params.segment)},[Object(o["createElementVNode"])("a",{target:"_blank",href:e.getUrlToSegment(t.params.segment)},Object(o["toDisplayString"])(t.title),9,Kn)],8,Qn),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.periodComparisons,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"comparison-period",key:n.index,title:e.getComparisonTooltip(t,n)},[Object(o["createElementVNode"])("span",{class:"comparison-dot",style:Object(o["normalizeStyle"])({"background-color":e.getSeriesColor(t,n)})},null,4),Object(o["createElementVNode"])("span",Zn,Object(o["toDisplayString"])(n.title)+" ("+Object(o["toDisplayString"])(e.getComparisonPeriodType(n))+") ",1)],8,Xn)})),128)),e.segmentComparisons.length>1?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,class:"remove-button",onClick:function(t){return e.removeSegmentComparison(n)}},[Object(o["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,tr)],8,er)):Object(o["createCommentVNode"])("",!0)])})),128)),Object(o["createElementVNode"])("div",nr,[Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,rr),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("General_LoadingData")),1)])],512)),[[c,{duration:200,delay:200,content:e.transformTooltipContent}]]):Object(o["createCommentVNode"])("",!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 Gn(e,t){window.$(e).tooltip({track:!0,content:t.value.content,show:{delay:t.value.delay||700,duration:t.value.duration||200},hide:!1})}var zn={mounted:function(e,t){setTimeout((function(){return Gn(e,t)}))},updated:function(e,t){setTimeout((function(){return Gn(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}};function Yn(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 Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xn=Object(a["defineComponent"])({props:{},directives:{Tooltips:zn},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(a["computed"])((function(){return xn.isComparing()})),t=Object(a["computed"])((function(){return xn.getSegmentComparisons()})),n=Object(a["computed"])((function(){return xn.getPeriodComparisons()})),r=xn.getSeriesColor.bind(xn);function i(){var e=window.$(this).attr("title");return window.vueSanitize(e.replace(/\n/g,"<br />"))}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),xn.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=Qn({},Pe.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Pe.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,xn.isComparing()){var t=xn.getPeriodComparisons(),n=xn.getSegmentComparisons();$e.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Pe.getSearchParam("compareSegments"),comparePeriods:Pe.getSearchParam("comparePeriods"),compareDates:Pe.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=xn.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],a=xn.getComparisonSeriesIndex(t.index,n.index),o=e.reportData.comparisons[a],c=e.reportData.comparisons[n.index],l='<div class="comparison-card-tooltip">',s=(o.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),l+=C("General_ComparisonCardTooltip1",["'".concat(o.compareSegmentPretty,"'"),o.comparePeriodPretty,s,o.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(l+="<br/><br/>",l+=C("General_ComparisonCardTooltip2",[o.nb_visits_change.toString(),c.compareSegmentPretty,c.comparePeriodPretty])),l+="</div>",l}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});Xn.render=Jn;var Zn=Xn; + */function or(e,t){window.$(e).tooltip({track:!0,content:t.value.content,show:{delay:t.value.delay||700,duration:t.value.duration||200},hide:!1})}var ar={mounted:function(e,t){setTimeout((function(){return or(e,t)}))},updated:function(e,t){setTimeout((function(){return or(e,t)}))},beforeUnmount:function(e){try{window.$(e).tooltip("destroy")}catch(t){}}};function cr(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 lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(n),!0).forEach((function(t){sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ur=Object(o["defineComponent"])({props:{},directives:{Tooltips:ar},data:function(){return{comparisonTooltips:null}},setup:function(){var e=Object(o["computed"])((function(){return Gn.isComparing()})),t=Object(o["computed"])((function(){return Gn.getSegmentComparisons()})),n=Object(o["computed"])((function(){return Gn.getPeriodComparisons()})),r=Gn.getSeriesColor.bind(Gn);function i(){var e=window.$(this).attr("title");return window.vueSanitize(e.replace(/\n/g,"<br />"))}return{isComparing:e,segmentComparisons:t,periodComparisons:n,getSeriesColor:r,transformTooltipContent:i}},methods:{comparisonHasSegment:function(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison:function(e){window.$(this.$refs.root).tooltip("destroy"),Gn.removeSegmentComparison(e)},getComparisonPeriodType:function(e){var t=e.params.period;if("range"===t)return C("CoreHome_PeriodRange");var n=C("Intl_Period".concat(t.substring(0,1).toUpperCase()).concat(t.substring(1)));return n.substring(0,1).toUpperCase()+n.substring(1)},getComparisonTooltip:function(e,t){if(this.comparisonTooltips&&Object.keys(this.comparisonTooltips).length)return(this.comparisonTooltips[t.index]||{})[e.index]},getUrlToSegment:function(e){var t=lr({},Pe.hashParsed.value);return delete t.comparePeriods,delete t.compareDates,delete t.compareSegments,t.segment=e,"".concat(window.location.search,"#?").concat(Pe.stringify(t))},onComparisonsChanged:function(){var e=this;if(this.comparisonTooltips=null,Gn.isComparing()){var t=Gn.getPeriodComparisons(),n=Gn.getSegmentComparisons();Qe.fetch({method:"API.getProcessedReport",apiModule:"VisitsSummary",apiAction:"get",compare:"1",compareSegments:Pe.getSearchParam("compareSegments"),comparePeriods:Pe.getSearchParam("comparePeriods"),compareDates:Pe.getSearchParam("compareDates"),format_metrics:"1"}).then((function(r){e.comparisonTooltips={},t.forEach((function(t){e.comparisonTooltips[t.index]={},n.forEach((function(n){var i=e.generateComparisonTooltip(r,t,n);e.comparisonTooltips[t.index][n.index]=i}))}))}))}},generateComparisonTooltip:function(e,t,n){if(!e.reportData.comparisons)return"";var r=Gn.getComparisonSeriesIndex(t.index,0),i=e.reportData.comparisons[r],o=Gn.getComparisonSeriesIndex(t.index,n.index),a=e.reportData.comparisons[o],c=e.reportData.comparisons[n.index],l='<div class="comparison-card-tooltip">',s=(a.nb_visits/i.nb_visits*100).toFixed(2);return s="".concat(s,"%"),l+=C("General_ComparisonCardTooltip1",["'".concat(a.compareSegmentPretty,"'"),a.comparePeriodPretty,s,a.nb_visits.toString(),i.nb_visits.toString()]),t.index>0&&(l+="<br/><br/>",l+=C("General_ComparisonCardTooltip2",[a.nb_visits_change.toString(),c.compareSegmentPretty,c.comparePeriodPretty])),l+="</div>",l}},mounted:function(){var e=this;S.on("piwikComparisonsChanged",(function(){e.onComparisonsChanged()})),this.onComparisonsChanged()}});ur.render=ir;var dr=ur; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function er(){return xn}er.$inject=[],angular.module("piwikApp.service").factory("piwikComparisonsService",er);Bt({component:Zn,directiveName:"piwikComparisons",restrict:"E"});var tr={ref:"root",class:"menuDropdown"},nr=["title"],rr=["innerHTML"],ir=Object(a["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),ar={class:"items"},or={key:0,class:"search"},cr=["placeholder"],lr=["title"],sr=["title"];function ur(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",tr,[Object(a["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,rr),ir],8,nr),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",ar,[e.showSearch&&e.showItems?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",or,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,cr),[[a["vModelText"],e.searchTerm],[c,{},e.showItems]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,lr),[[a["vShow"],!e.searchTerm]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,sr),[[a["vShow"],e.searchTerm]])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(a["renderSlot"])(e.$slots,"default")])],512),[[a["vShow"],e.showItems]])],512)),[[l,{blur:e.lostFocus}]])}var dr=window,pr=dr.$,fr=Object(a["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:String},directives:{FocusAnywhereButHere:Ge,FocusIf:Qe},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(!1!==this.menuTitleChangeOnClick&&(this.actualMenuTitle=e.target.textContent.replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,pr(this.$slots.default()).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();pr(this.$refs.root).find(".item").each((function(e,n){var r=pr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});fr.render=ur;var mr=fr,hr=(Bt({component:mr,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); + */function pr(){return Gn}pr.$inject=[],angular.module("piwikApp.service").factory("piwikComparisonsService",pr);qt({component:dr,directiveName:"piwikComparisons",restrict:"E"});var fr={ref:"root",class:"menuDropdown"},mr=["title"],hr=["innerHTML"],gr=Object(o["createElementVNode"])("span",{class:"icon-arrow-bottom"},null,-1),br={class:"items"},vr={key:0,class:"search"},yr=["placeholder"],Or=["title"],wr=["title"];function jr(e,t,n,r,i,a){var c=Object(o["resolveDirective"])("focus-if"),l=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",fr,[Object(o["createElementVNode"])("span",{class:"title",onClick:t[0]||(t[0]=function(t){return e.showItems=!e.showItems}),title:e.tooltip},[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(this.actualMenuTitle)},null,8,hr),gr],8,mr),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",br,[e.showSearch&&e.showItems?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",vr,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),onKeydown:t[2]||(t[2]=function(t){return e.onSearchTermKeydown(t)}),placeholder:e.translate("General_Search")},null,40,yr),[[o["vModelText"],e.searchTerm],[c,{},e.showItems]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{class:"search_ico",src:"plugins/Morpheus/images/search_ico.png",title:e.translate("General_Search")},null,8,Or),[[o["vShow"],!e.searchTerm]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{onClick:t[3]||(t[3]=function(t){e.searchTerm="",e.searchItems("")}),class:"reset",src:"plugins/CoreHome/images/reset_search.png",title:e.translate("General_Clear")},null,8,wr),[[o["vShow"],e.searchTerm]])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",{onClick:t[4]||(t[4]=function(t){return e.selectItem(t)})},[Object(o["renderSlot"])(e.$slots,"default")])],512),[[o["vShow"],e.showItems]])],512)),[[l,{blur:e.lostFocus}]])}var kr=window,Sr=kr.$,Cr=Object(o["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:String},directives:{FocusAnywhereButHere:ot,FocusIf:lt},emits:["afterSelect"],watch:{menuTitle:function(){this.actualMenuTitle=this.menuTitle}},data:function(){return{showItems:!1,searchTerm:"",actualMenuTitle:this.menuTitle}},methods:{lostFocus:function(){this.showItems=!1},selectItem:function(e){var t=e.target.classList;!t.contains("item")||t.contains("disabled")||t.contains("separator")||(!1!==this.menuTitleChangeOnClick&&(this.actualMenuTitle=e.target.textContent.replace(/[\u0000-\u2666]/g,(function(e){return"&#".concat(e.charCodeAt(0),";")}))),this.showItems=!1,Sr(this.$slots.default()).find(".item").removeClass("active"),t.add("active"),this.$emit("afterSelect"))},onSearchTermKeydown:function(){var e=this;setTimeout((function(){e.searchItems(e.searchTerm)}))},searchItems:function(e){var t=e.toLowerCase();Sr(this.$refs.root).find(".item").each((function(e,n){var r=Sr(n);-1===r.text().toLowerCase().indexOf(t)?r.hide():r.show()}))}}});Cr.render=jr;var Dr=Cr,Pr=(qt({component:Dr,scope:{menuTitle:{angularJsBind:"@"},tooltip:{angularJsBind:"@"},showSearch:{angularJsBind:"="},menuTitleChangeOnClick:{angularJsBind:"="}},directiveName:"piwikMenudropdown",transclude:!0,events:{"after-select":function(e,t,n){setTimeout((function(){n.$apply()}),0)}}}),{ref:"root"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function gr(e,t,n,r,i,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",hr,null,512)}function vr(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 br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){yr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Or=1,wr=window,jr=wr.$,kr=Object(a["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(a["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var i=r.length?r:t;i.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function i(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return o(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function o(e,t,n){var r,a=e.parent(),o=a.children("td");if(a.is(":first-child")){var c=a.children("td:not(.ui-datepicker-other-month)").first();return r=i(c,t,n),r.setDate(o.index(e)-o.index(c)+1),r}var l=a.children("td:not(.ui-datepicker-other-month)").last();return r=i(l,t,n),r.setDate(r.getDate()+o.index(e)-o.index(l)),r}function c(){var e=jr(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),i=parseInt(t.attr("data-year"),10);return[r,i]}function l(){var e=jr(n.value),t=e.find(".ui-datepicker-calendar"),a=c(),o=t.find("td"),l=o.first(),s=i(l,a[0],a[1]);o.each((function(){r(jr(this),s),s.setDate(s.getDate()+1)}))}function s(){var t=e.viewDate;if(!t)return!1;if(!(t instanceof Date))try{t=E(t)}catch(a){return!1}var r=jr(n.value),i=c();return(i[0]!==t.getMonth()||i[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=jr(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=jr(n.value),r=e.stepMonths||Or;if(t.datepicker("option","stepMonths")===r)return!1;var i=jr(".ui-datepicker-month",t).val(),a=jr(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(a,i)),u(),!0}function p(){var t=jr(n.value);t.find(".ui-datepicker-month").attr("disabled",e.disableMonthDropdown)}function f(){if(jr(this).hasClass("ui-state-hover")){var e=jr(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function m(){p(),l()}return Object(a["watch"])((function(){return br({},e)}),(function(e,t){var n=!1;["selectedDateStart","selectedDateEnd","highlightedDateStart","highlightedDateEnd"].forEach((function(r){n||(!e[r]&&t[r]&&(n=!0),e[r]&&!t[r]&&(n=!0),e[r]&&t[r]&&e[r].getTime()!==t[r].getTime()&&(n=!0))})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.enableDisableMonthDropdown!==t.enableDisableMonthDropdown&&p(),n&&l()})),Object(a["onMounted"])((function(){var r=jr(n.value),a=e.options||{},o=br(br(br({},S.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(o),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&l()})),r.on("mouseenter","tbody td",(function(){var e=c(),n=jr(this),r=i(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){l()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",(function(){return f()})),r.on("click",(function(e){e.preventDefault();var t=jr(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&m()})),r.on("click","td[data-month]",(function(e){var n=jr(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),i=parseInt(n.attr("data-year"),10),a=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(i,r,a)})}));var h=d();s(),p(),h||u(),l()})),{root:n}}});kr.render=gr;var Sr=kr,Cr=(Bt({component:Sr,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,i){i()},"cell-hover-leave":function(e,t,n,r,i){i()},"date-select":function(e,t,n,r,i){i()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),Dr={id:"calendarRangeTo"}; + */function Er(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Pr,null,512)}function Vr(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 Tr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(n),!0).forEach((function(t){Nr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ir=1,Br=window,Ar=Br.$,xr=Object(o["defineComponent"])({props:{selectedDateStart:Date,selectedDateEnd:Date,highlightedDateStart:Date,highlightedDateEnd:Date,viewDate:[String,Date],stepMonths:Number,disableMonthDropdown:Boolean,options:Object},emits:["cellHover","cellHoverLeave","dateSelect"],setup:function(e,t){var n=Object(o["ref"])(null);function r(t,n){var r=t.children("a");if(e.selectedDateStart&&e.selectedDateEnd&&n>=e.selectedDateStart&&n<=e.selectedDateEnd?t.addClass("ui-datepicker-current-period"):t.removeClass("ui-datepicker-current-period"),e.highlightedDateStart&&e.highlightedDateEnd&&n>=e.highlightedDateStart&&n<=e.highlightedDateEnd){var i=r.length?r:t;i.addClass("ui-state-hover")}else t.removeClass("ui-state-hover"),r.removeClass("ui-state-hover")}function i(e,t,n){if(e.hasClass("ui-datepicker-other-month"))return a(e,t,n);var r=parseInt(e.children("a,span").text(),10);return new Date(n,t,r)}function a(e,t,n){var r,o=e.parent(),a=o.children("td");if(o.is(":first-child")){var c=o.children("td:not(.ui-datepicker-other-month)").first();return r=i(c,t,n),r.setDate(a.index(e)-a.index(c)+1),r}var l=o.children("td:not(.ui-datepicker-other-month)").last();return r=i(l,t,n),r.setDate(r.getDate()+a.index(e)-a.index(l)),r}function c(){var e=Ar(n.value),t=e.find("td[data-month]"),r=parseInt(t.attr("data-month"),10),i=parseInt(t.attr("data-year"),10);return[r,i]}function l(){var e=Ar(n.value),t=e.find(".ui-datepicker-calendar"),o=c(),a=t.find("td"),l=a.first(),s=i(l,o[0],o[1]);a.each((function(){r(Ar(this),s),s.setDate(s.getDate()+1)}))}function s(){var t=e.viewDate;if(!t)return!1;if(!(t instanceof Date))try{t=E(t)}catch(o){return!1}var r=Ar(n.value),i=c();return(i[0]!==t.getMonth()||i[1]!==t.getFullYear())&&(r.datepicker("setDate",t),!0)}function u(){var e=Ar(n.value);e.find("td[data-event]").off("click"),e.find(".ui-state-active").removeClass("ui-state-active"),e.find(".ui-datepicker-current-day").removeClass("ui-datepicker-current-day"),e.find(".ui-datepicker-prev,.ui-datepicker-next").attr("href","")}function d(){var t=Ar(n.value),r=e.stepMonths||Ir;if(t.datepicker("option","stepMonths")===r)return!1;var i=Ar(".ui-datepicker-month",t).val(),o=Ar(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",r).datepicker("setDate",new Date(o,i)),u(),!0}function p(){var t=Ar(n.value);t.find(".ui-datepicker-month").attr("disabled",e.disableMonthDropdown)}function f(){if(Ar(this).hasClass("ui-state-hover")){var e=Ar(this).parent(),t=e.parent();e.is(":first-child")?t.find("a").first().click():t.find("a").last().click()}}function m(){p(),l()}return Object(o["watch"])((function(){return Tr({},e)}),(function(e,t){var n=!1;["selectedDateStart","selectedDateEnd","highlightedDateStart","highlightedDateEnd"].forEach((function(r){n||(!e[r]&&t[r]&&(n=!0),e[r]&&!t[r]&&(n=!0),e[r]&&t[r]&&e[r].getTime()!==t[r].getTime()&&(n=!0))})),e.viewDate!==t.viewDate&&s()&&(n=!0),e.stepMonths!==t.stepMonths&&d(),e.enableDisableMonthDropdown!==t.enableDisableMonthDropdown&&p(),n&&l()})),Object(o["onMounted"])((function(){var r=Ar(n.value),o=e.options||{},a=Tr(Tr(Tr({},S.getBaseDatePickerOptions()),o),{},{onChangeMonthYear:function(){setTimeout((function(){u()}))}});r.datepicker(a),r.on("mouseover","tbody td a",(function(e){e.originalEvent&&l()})),r.on("mouseenter","tbody td",(function(){var e=c(),n=Ar(this),r=i(n,e[0],e[1]);t.emit("cellHover",{date:r,$cell:n})})),r.on("mouseout","tbody td a",(function(){l()})),r.on("mouseleave","table",(function(){return t.emit("cellHoverLeave")})).on("mouseenter","thead",(function(){return t.emit("cellHoverLeave")})),r.on("click","tbody td.ui-datepicker-other-month",(function(){return f()})),r.on("click",(function(e){e.preventDefault();var t=Ar(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&m()})),r.on("click","td[data-month]",(function(e){var n=Ar(e.target).closest("td"),r=parseInt(n.attr("data-month"),10),i=parseInt(n.attr("data-year"),10),o=parseInt(n.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(i,r,o)})}));var h=d();s(),p(),h||u(),l()})),{root:n}}});xr.render=Er;var Mr=xr,Lr=(qt({component:Mr,scope:{selectedDateStart:{angularJsBind:"<"},selectedDateEnd:{angularJsBind:"<"},highlightedDateStart:{angularJsBind:"<"},highlightedDateEnd:{angularJsBind:"<"},viewDate:{angularJsBind:"<"},stepMonths:{angularJsBind:"<"},disableMonthDropdown:{angularJsBind:"<"},options:{angularJsBind:"<"},cellHover:{angularJsBind:"&"},cellHoverLeave:{angularJsBind:"&"},dateSelect:{angularJsBind:"&"}},directiveName:"piwikDatePicker",events:{"cell-hover":function(e,t,n,r,i){i()},"cell-hover-leave":function(e,t,n,r,i){i()},"date-select":function(e,t,n,r,i){i()}},$inject:["$timeout"]}),{id:"calendarRangeFrom"}),$r={id:"calendarRangeTo"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Pr(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createElementVNode"])("div",Cr,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onKeydown:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.startDateText]])]),Object(a["createVNode"])(c,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(a["createElementVNode"])("div",Dr,[Object(a["createElementVNode"])("h6",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onKeydown:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[a["vModelText"],e.endDateText]])]),Object(a["createVNode"])(c,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])])}var Er="YYYY-MM-DD",Vr=Object(a["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:Sr},data:function(){var e=null;try{e=E(this.startDate)}catch(n){}var t=null;try{t=E(this.endDate)}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.setEndRangeDateFromStr(t.target.value)}))},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){var t;this.startDateInvalid=!0;try{e.length===Er.length&&(t=E(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){var t;this.endDateInvalid=!0;try{e.length===Er.length&&(t=E(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:D(this.fromPickerSelectedDates[0]),end:D(this.toPickerSelectedDates[0])})}}});Vr.render=Pr;var Tr=Vr; + */function Rr(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createElementVNode"])("div",Lr,[Object(o["createElementVNode"])("h6",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_DateRangeFrom"))+" ",1),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",id:"inputCalendarFrom",name:"inputCalendarFrom",class:"browser-default","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.startDateText=t}),onKeydown:t[1]||(t[1]=function(t){return e.onRangeInputChanged("from",t)}),onKeyup:t[2]||(t[2]=function(t){return e.handleEnterPress(t)})},null,544),[[o["vModelText"],e.startDateText]])]),Object(o["createVNode"])(c,{id:"calendarFrom","view-date":e.startDate,"selected-date-start":e.fromPickerSelectedDates[0],"selected-date-end":e.fromPickerSelectedDates[1],"highlighted-date-start":e.fromPickerHighlightedDates[0],"highlighted-date-end":e.fromPickerHighlightedDates[1],onDateSelect:t[3]||(t[3]=function(t){return e.setStartRangeDate(t.date)}),onCellHover:t[4]||(t[4]=function(t){return e.fromPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[5]||(t[5]=function(t){return e.fromPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])]),Object(o["createElementVNode"])("div",$r,[Object(o["createElementVNode"])("h6",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_DateRangeTo"))+" ",1),Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",id:"inputCalendarTo",name:"inputCalendarTo",class:"browser-default","onUpdate:modelValue":t[6]||(t[6]=function(t){return e.endDateText=t}),onKeydown:t[7]||(t[7]=function(t){return e.onRangeInputChanged("to",t)}),onKeyup:t[8]||(t[8]=function(t){return e.handleEnterPress(t)})},null,544),[[o["vModelText"],e.endDateText]])]),Object(o["createVNode"])(c,{id:"calendarTo","view-date":e.endDate,"selected-date-start":e.toPickerSelectedDates[0],"selected-date-end":e.toPickerSelectedDates[1],"highlighted-date-start":e.toPickerHighlightedDates[0],"highlighted-date-end":e.toPickerHighlightedDates[1],onDateSelect:t[9]||(t[9]=function(t){return e.setEndRangeDate(t.date)}),onCellHover:t[10]||(t[10]=function(t){return e.toPickerHighlightedDates=e.getNewHighlightedDates(t.date,t.$cell)}),onCellHoverLeave:t[11]||(t[11]=function(t){return e.toPickerHighlightedDates=[null,null]})},null,8,["view-date","selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end"])])])}var Hr="YYYY-MM-DD",Fr=Object(o["defineComponent"])({props:{startDate:String,endDate:String},components:{DatePicker:Mr},data:function(){var e=null;try{e=E(this.startDate)}catch(n){}var t=null;try{t=E(this.endDate)}catch(n){}return{fromPickerSelectedDates:[e,e],toPickerSelectedDates:[t,t],fromPickerHighlightedDates:[null,null],toPickerHighlightedDates:[null,null],startDateText:this.startDate,endDateText:this.endDate,startDateInvalid:!1,endDateInvalid:!1}},emits:["rangeChange","submit"],watch:{startDate:function(){this.startDateText=this.startDate,this.setStartRangeDateFromStr(this.startDate)},endDate:function(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted:function(){this.rangeChanged()},methods:{setStartRangeDate:function(e){this.fromPickerSelectedDates=[e,e],this.rangeChanged()},setEndRangeDate:function(e){this.toPickerSelectedDates=[e,e],this.rangeChanged()},onRangeInputChanged:function(e,t){var n=this;setTimeout((function(){"from"===e?n.setStartRangeDateFromStr(t.target.value):n.setEndRangeDateFromStr(t.target.value)}))},getNewHighlightedDates:function(e,t){return t.hasClass("ui-datepicker-unselectable")?null:[e,e]},handleEnterPress:function(e){13===e.keyCode&&this.$emit("submit",{start:this.startDate,end:this.endDate})},setStartRangeDateFromStr:function(e){var t;this.startDateInvalid=!0;try{e.length===Hr.length&&(t=E(e))}catch(n){}t&&(this.fromPickerSelectedDates=[t,t],this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr:function(e){var t;this.endDateInvalid=!0;try{e.length===Hr.length&&(t=E(e))}catch(n){}t&&(this.toPickerSelectedDates=[t,t],this.endDateInvalid=!1,this.rangeChanged())},rangeChanged:function(){this.$emit("rangeChange",{start:D(this.fromPickerSelectedDates[0]),end:D(this.toPickerSelectedDates[0])})}}});Fr.render=Rr;var _r=Fr; /*! * 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:Tr,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function Nr(e,t,n,r,i,o){var c=Object(a["resolveComponent"])("DatePicker");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var Ir=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),Br=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),Ar=Object(a["defineComponent"])({props:{period:String,date:[String,Date]},components:{DatePicker:Sr},emits:["select"],setup:function(e,t){var n=Object(a["ref"])(e.date),r=Object(a["ref"])([null,null]),i=Object(a["ref"])([null,null]);function o(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=Ir<n[0]?n[0]:Ir,n[1]=Br>n[1]?n[1]:Br,n}function c(t,n){var r=t<Ir||t>Br,a=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);i.value=r||a?[null,null]:o(t)}function l(){i.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=o(e.date),n.value=E(e.date)}return Object(a["watch"])(e,u),u(),{selectedDates:r,highlightedDates:i,viewDate:n,onHoverNormalCell:c,onHoverLeaveNormalCells:l,onDateSelected:s}}});Ar.render=Nr;var xr=Ar,Mr=(Bt({component:xr,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),Lr=["title"],$r=["textContent"],Rr={key:1,class:"placeholder"},Hr={class:"dropdown"},Fr={class:"custom_select_search"},_r=["placeholder"],Ur={key:0},qr={class:"custom_select_container"},Wr=["onClick"],Jr=["innerHTML","href","title"],Gr={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},zr={class:"ui-menu-item"},Yr={class:"ui-corner-all",tabindex:"-1"},Qr={key:1}; + */qt({component:_r,scope:{startDate:{angularJsBind:"<"},endDate:{angularJsBind:"<"},rangeChange:{angularJsBind:"&"},submit:{angularJsBind:"&"}},directiveName:"piwikDateRangePicker",restrict:"E"});function Ur(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("DatePicker");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"selected-date-start":e.selectedDates[0],"selected-date-end":e.selectedDates[1],"highlighted-date-start":e.highlightedDates[0],"highlighted-date-end":e.highlightedDates[1],"view-date":e.viewDate,"step-months":"year"===e.period?12:1,"disable-month-dropdown":"year"===e.period,onCellHover:t[0]||(t[0]=function(t){return e.onHoverNormalCell(t.date,t.$cell)}),onCellHoverLeave:t[1]||(t[1]=function(t){return e.onHoverLeaveNormalCells()}),onDateSelect:t[2]||(t[2]=function(t){return e.onDateSelected(t.date)})},null,8,["selected-date-start","selected-date-end","highlighted-date-start","highlighted-date-end","view-date","step-months","disable-month-dropdown"])}var Wr=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),qr=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay),Jr=Object(o["defineComponent"])({props:{period:String,date:[String,Date]},components:{DatePicker:Mr},emits:["select"],setup:function(e,t){var n=Object(o["ref"])(e.date),r=Object(o["ref"])([null,null]),i=Object(o["ref"])([null,null]);function a(t){var n=p.get(e.period).parse(t).getDateRange();return n[0]=Wr<n[0]?n[0]:Wr,n[1]=qr>n[1]?n[1]:qr,n}function c(t,n){var r=t<Wr||t>qr,o=n.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);i.value=r||o?[null,null]:a(t)}function l(){i.value=[null,null]}function s(e){t.emit("select",{date:e})}function u(){if(!e.period||!e.date)return r.value=[null,null],void(n.value=null);r.value=a(e.date),n.value=E(e.date)}return Object(o["watch"])(e,u),u(),{selectedDates:r,highlightedDates:i,viewDate:n,onHoverNormalCell:c,onHoverLeaveNormalCells:l,onDateSelected:s}}});Jr.render=Ur;var Gr=Jr,zr=(qt({component:Gr,scope:{period:{angularJsBind:"<"},date:{angularJsBind:"<"},select:{angularJsBind:"&"}},directiveName:"piwikPeriodDatePicker",restrict:"E"}),["value","name"]),Yr=["title"],Qr=["textContent"],Kr={key:1,class:"placeholder"},Xr={class:"dropdown"},Zr={class:"custom_select_search"},ei=["placeholder"],ti={key:0},ni={class:"custom_select_container"},ri=["onClick"],ii=["innerHTML","href","title"],oi={class:"ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all\n siteSelect"},ai={class:"ui-menu-item"},ci={class:"ui-corner-all",tabindex:"-1"},li={key: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 Kr(e,t,n,r,i,o){var c,l,s,u,d=Object(a["resolveComponent"])("AllSitesLink"),p=Object(a["resolveDirective"])("focus-if"),f=Object(a["resolveDirective"])("focus-anywhere-but-here");return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:Object(a["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(a["openBlock"])(),Object(a["createElementBlock"])("input",{key:0,type:"hidden",value:null===(c=e.modelValue)||void 0===c?void 0:c.id,name:e.name},null,8,Mr)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(a["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(a["createElementVNode"])("span",{class:Object(a["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(a["createElementVNode"])("span",null,[null!==(l=e.modelValue)&&void 0!==l&&l.name||!e.placeholder?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,textContent:Object(a["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,$r)):Object(a["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Rr,Object(a["toDisplayString"])(e.placeholder),1))])],42,Lr),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Hr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Fr,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,_r),[[a["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[a["vShow"],e.searchTerm]])],512),[[a["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Ur,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("div",qr,[Object(a["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sites,(function(n,r){return Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{onClick:function(t){return e.switchSite(n,t)},key:r},[Object(a["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,Jr)],8,Wr)),[[a["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(a["withDirectives"])(Object(a["createElementVNode"])("ul",Gr,[Object(a["createElementVNode"])("li",zr,[Object(a["createElementVNode"])("a",Yr,Object(a["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[a["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",Qr,[Object(a["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(a["createCommentVNode"])("",!0)],512),[[a["vShow"],e.showSitesList]])],2)),[[f,{blur:e.onBlur}]])}var Xr=["innerHTML","href"];function Zr(e,t,n,r,i,o){var c=this;return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return c.onClick(e)}),class:"custom_select_all"},[Object(a["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,Xr)])}var ei=Object(a["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});ei.render=Zr;var ti=ei;function ni(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 ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ni(Object(n),!0).forEach((function(t){ci(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ii(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ai(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 oi(e,t,n){return t&&ai(e.prototype,t),n&&ai(e,n),e}function ci(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} + */function si(e,t,n,r,i,a){var c,l,s,u,d=Object(o["resolveComponent"])("AllSitesLink"),p=Object(o["resolveDirective"])("focus-if"),f=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["siteSelector piwikSelector borderedControl",{expanded:e.showSitesList,disabled:!e.hasMultipleSites}])},[e.name?(Object(o["openBlock"])(),Object(o["createElementBlock"])("input",{key:0,type:"hidden",value:null===(c=e.modelValue)||void 0===c?void 0:c.id,name:e.name},null,8,zr)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("a",{ref:"selectorLink",onClick:t[0]||(t[0]=function(){return e.onClickSelector&&e.onClickSelector.apply(e,arguments)}),onKeydown:t[1]||(t[1]=function(t){return e.onPressEnter(t)}),href:"javascript:void(0)",class:Object(o["normalizeClass"])([{loading:e.isLoading},"title"]),tabindex:"4",title:e.selectorLinkTitle},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(["icon icon-arrow-bottom",{iconHidden:e.isLoading,collapsed:!e.showSitesList}])},null,2),Object(o["createElementVNode"])("span",null,[null!==(l=e.modelValue)&&void 0!==l&&l.name||!e.placeholder?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,textContent:Object(o["toDisplayString"])((null===(s=e.modelValue)||void 0===s?void 0:s.name)||e.firstSiteName)},null,8,Qr)):Object(o["createCommentVNode"])("",!0),null!==(u=e.modelValue)&&void 0!==u&&u.name||!e.placeholder?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",Kr,Object(o["toDisplayString"])(e.placeholder),1))])],42,Yr),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Xr,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Zr,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"text",onClick:t[2]||(t[2]=function(t){e.searchTerm="",e.loadInitialSites()}),"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.searchTerm=t}),tabindex:"4",class:"websiteSearch inp browser-default",placeholder:e.translate("General_Search")},null,8,ei),[[o["vModelText"],e.searchTerm],[p,{},e.shouldFocusOnSearch]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("img",{title:"Clear",onClick:t[4]||(t[4]=function(t){e.searchTerm="",e.loadInitialSites()}),class:"reset",src:"plugins/CoreHome/images/reset_search.png"},null,512),[[o["vShow"],e.searchTerm]])],512),[[o["vShow"],e.autocompleteMinSites<=e.sites.length||e.searchTerm]]),"top"===e.allSitesLocation&&e.showAllSitesItem?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ti,[Object(o["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[5]||(t[5]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",ni,[Object(o["createElementVNode"])("ul",{class:"custom_select_ul_list",onClick:t[7]||(t[7]=function(t){return e.showSitesList=!1})},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sites,(function(n,r){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{onClick:function(t){return e.switchSite(n,t)},key:r},[Object(o["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.getMatchedSiteName(n.name)),tabindex:"4",href:e.getUrlForSiteId(n.idsite),title:n.name},null,8,ii)],8,ri)),[[o["vShow"],!(!e.showSelectedSite&&e.activeSiteId===n.idsite)]])})),128))]),Object(o["withDirectives"])(Object(o["createElementVNode"])("ul",oi,[Object(o["createElementVNode"])("li",ai,[Object(o["createElementVNode"])("a",ci,Object(o["toDisplayString"])(e.translate("SitesManager_NotFound")+" "+e.searchTerm),1)])],512),[[o["vShow"],!e.sites.length&&e.searchTerm]])]),"bottom"===e.allSitesLocation&&e.showAllSitesItem?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",li,[Object(o["createVNode"])(d,{href:e.urlAllSites,"all-sites-text":e.allSitesText,onClick:t[8]||(t[8]=function(t){return e.onAllSitesClick(t)})},null,8,["href","all-sites-text"])])):Object(o["createCommentVNode"])("",!0)],512),[[o["vShow"],e.showSitesList]])],2)),[[f,{blur:e.onBlur}]])}var ui=["innerHTML","href"];function di(e,t,n,r,i,a){var c=this;return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{onClick:t[1]||(t[1]=function(e){return c.onClick(e)}),class:"custom_select_all"},[Object(o["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(e){return e.preventDefault()}),innerHTML:e.$sanitize(e.allSitesText),tabindex:"4",href:e.href},null,8,ui)])}var pi=Object(o["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick:function(e){this.$emit("click",e)}}});pi.render=di;var fi=pi;function mi(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 hi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mi(Object(n),!0).forEach((function(t){yi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(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 vi(e,t,n){return t&&bi(e.prototype,t),n&&bi(e,n),e}function yi(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 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; + */var Oi=function(){function e(){var t=this;gi(this,e),yi(this,"state",Object(o["reactive"])({initialSites:[],isInitialized:!1})),yi(this,"currentRequestAbort",void 0),yi(this,"limitRequest",void 0),yi(this,"initialSites",Object(o["computed"])((function(){return Object(o["readonly"])(t.state.initialSites)})))}return vi(e,[{key:"loadInitialSites",value:function(){var e=this;return this.state.isInitialized?Promise.resolve(Object(o["readonly"])(this.state.initialSites)):this.searchSite("%").then((function(t){return e.state.isInitialized=!0,e.state.initialSites=t,Object(o["readonly"])(t)}))}},{key:"loadSite",value:function(e){"all"===e?Pe.updateUrl(hi(hi({},Pe.urlParsed.value),{},{module:"MultiSites",action:"index",date:Pe.parsed.value.date,period:Pe.parsed.value.period})):Pe.updateUrl(hi(hi({},Pe.urlParsed.value),{},{segment:"",idSite:e}),hi(hi({},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.currentRequestAbort&&this.currentRequestAbort.abort(),this.limitRequest||(this.limitRequest=Qe.fetch({method:"SitesManager.getNumWebsitesToDisplayPerPage"})),this.limitRequest.then((function(r){var i=r.value,o="SitesManager.getPatternMatchSites";return n&&(o="SitesManager.getSitesWithAdminAccess"),t.currentRequestAbort=new AbortController,Qe.fetch({method:o,limit:i,pattern:e},{abortController:t.currentRequestAbort})})).then((function(e){return e?t.processWebsitesList(e):null})).finally((function(){t.currentRequestAbort=null}))):this.loadInitialSites()}},{key:"processWebsitesList",value:function(e){var t=e;return t&&t.length?(t=t.map((function(e){return hi(hi({},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}(),wi=new Oi,ji=300;function ki(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ji;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];t&&clearTimeout(t),t=setTimeout((function(){e.apply(void 0,i)}),n)}}function Si(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 Ci(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(n),!0).forEach((function(t){Di(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Si(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pi=Object(o["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:fi},directives:{FocusAnywhereButHere:ot,FocusIf:lt},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 wi.initialSites.value&&wi.initialSites.value.length>1},firstSiteName:function(){var e=wi.initialSites.value;return e&&e.length>0?e[0].name:""},urlAllSites:function(){var e=Pe.stringify(Ci(Ci({},Pe.urlParsed.value),{},{module:"MultiSites",action:"index",date:Pe.parsed.value.date,period:Pe.parsed.value.period}));return"?".concat(e)}},created:function(){this.searchSite=ki(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&&wi.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 wi.loadInitialSites().then((function(t){e.sites=t||[]}))},searchSite:function(e){var t=this;this.isLoading=!0,wi.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(Ci(Ci({},Pe.urlParsed.value),{},{segment:"",idSite:e})),n=Pe.stringify(Ci(Ci({},Pe.hashParsed.value),{},{segment:"",idSite:e}));return"?".concat(t,"#?").concat(n)}}});Pi.render=si;var Ei=Pi; /*! * 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: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}))}))})}}); + */qt({component:Ei,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,o,a){(e&&!t.modelValue||!e&&t.modelValue||e.id!==t.modelValue.id)&&a((function(){n.value=e,r.attr("siteid",e.id),r.trigger("change",e),o&&(o.$setViewValue(e),o.$render())}))},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}},postCreate:function(e,t,n,r,i){var a=i;t.$watch("value",(function(t){Object(o["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)}),a&&(a.$setViewValue(e.modelValue),a.$render=function(){Object(o["nextTick"])((function(){Object(o["nextTick"])((function(){angular.isString(a.$viewValue)?e.modelValue=JSON.parse(a.$viewValue):e.modelValue=a.$viewValue}))}))})}}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -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; +function Vi(){return{get initialSites(){return wi.initialSites.value},loadSite:wi.loadSite.bind(wi),loadInitialSites:function(){return Yt(wi.loadInitialSites())},searchSite:function(){return Yt(wi.searchSite.apply(wi,arguments))}}}angular.module("piwikApp.service").factory("siteSelectorModel",Vi);var Ti={ref:"root",class:"quickAccessInside"},Ni=["title"],Ii={class:"dropdown"},Bi={class:"no-result"},Ai=["onClick"],xi=["onMouseenter","onClick"],Mi={class:"quickAccessMatomoSearch"},Li=["onMouseenter","onClick"],$i=["textContent"],Ri={class:"quick-access-category helpCategory"},Hi=["href"];function Fi(e,t,n,r,i,a){var c=Object(o["resolveDirective"])("focus-if"),l=Object(o["resolveDirective"])("focus-anywhere-but-here");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ti,[Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{class:"icon-search",onMouseenter:t[0]||(t[0]=function(t){return e.searchActive=!0})},null,544),[[o["vShow"],!(e.searchTerm||e.searchActive)]]),Object(o["withDirectives"])(Object(o["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,Ni),[[o["vModelText"],e.searchTerm],[c,{},e.searchActive]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",Ii,[Object(o["withDirectives"])(Object(o["createElementVNode"])("ul",null,[Object(o["createElementVNode"])("li",Bi,Object(o["toDisplayString"])(e.translate("General_SearchNoResults")),1)],512),[[o["vShow"],!(e.numMenuItems>0||e.sites.length)]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.menuItems,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("ul",{key:t.title},[Object(o["createElementVNode"])("li",{class:"quick-access-category",onClick:function(n){e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(o["toDisplayString"])(t.title),9,Ai),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.items,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["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(o["createElementVNode"])("a",null,Object(o["toDisplayString"])(t.name.trim()),1)],42,xi)})),128))])})),128)),Object(o["createElementVNode"])("ul",Mi,[Object(o["withDirectives"])(Object(o["createElementVNode"])("li",{class:"quick-access-category websiteCategory"},Object(o["toDisplayString"])(e.translate("SitesManager_Sites")),513),[[o["vShow"],e.hasSitesSelector&&e.sites.length||e.isLoading]]),Object(o["withDirectives"])(Object(o["createElementVNode"])("li",{class:"no-result"},Object(o["toDisplayString"])(e.translate("MultiSites_LoadingWebsites")),513),[[o["vShow"],e.hasSitesSelector&&e.isLoading]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.sites,(function(t,n){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["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(o["createElementVNode"])("a",{textContent:Object(o["toDisplayString"])(t.name)},null,8,$i)],42,Li)),[[o["vShow"],e.hasSitesSelector&&!e.isLoading]])})),128))]),Object(o["createElementVNode"])("ul",null,[Object(o["createElementVNode"])("li",Ri,Object(o["toDisplayString"])(e.translate("General_HelpResources")),1),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{selected:"help"===e.searchIndex},"quick-access-help"]),onMouseenter:t[4]||(t[4]=function(t){return e.searchIndex="help"})},[Object(o["createElementVNode"])("a",{href:"https://matomo.org?s=".concat(encodeURIComponent(e.searchTerm)),target:"_blank"},Object(o["toDisplayString"])(e.translate("CoreHome_SearchOnMatomo",e.searchTerm)),9,Hi)],34)])],512),[[o["vShow"],e.searchTerm&&e.searchActive]])],512)),[[l,{blur:e.onBlur}]])}function _i(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 Ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_i(Object(n),!0).forEach((function(t){Wi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qi(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.$(window).height()&&t.right<=window.$(window).width()}function Ji(e){e&&e.scrollIntoView&&e.scrollIntoView()}var Gi=Object(o["defineComponent"])({props:{},directives:{FocusAnywhereButHere:ot,FocusIf:lt},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(),Ji(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=ki(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&&!qi(e)&&Ji(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={},o=[],a=function(e){var t=Ui({},e);r+=1,t.menuIndex=r;var n=t.category;n in i||(o.push({title:n,items:[]}),i[n]=o.length-1);var a=i[n];o[a].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,wi.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(a),s.forEach(a),u.forEach(a),this.numMenuItems=l.length+s.length+u.length,this.menuItems=o},resetSearchIndex:function(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite:function(e){wi.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 o=i.textContent.trim();o&&(t.push({name:o,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}}});Gi.render=Fi;var zi=Gi; /*! * 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; + */qt({component:zi,directiveName:"piwikQuickAccess",events:{itemSelected:function(e,t,n,r,i,o,a){a()},blur:function(e,t,n){setTimeout((function(){return n.$apply()}))}}});function Yi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qi={class:"fieldArray form-group"},Ki={key:0,class:"fieldUiControl"},Xi=["onClick","title"];function Zi(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qi,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.modelValue,(function(t,n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",Yi({},"fieldArrayTable".concat(n),!0)]),key:n},[e.field.uiControl?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ki,[Object(o["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(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Xi),[[o["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function eo(e){return io(e)||ro(e)||no(e)||to()}function to(){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 no(e,t){if(e){if("string"===typeof e)return oo(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)?oo(e,t):void 0}}function ro(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function io(e){if(Array.isArray(e))return oo(e)}function oo(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 ao=pn("CorePluginsAdmin","Field"),co=Object(o["defineComponent"])({props:{modelValue:Array,name:String,field:Object},components:{Field:ao},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(eo(e||[]),[""]))},onEntryChange:function(e,t){var n=eo(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)}}}});co.render=Zi;var lo=co; /*! * 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: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"}; + */qt({component:lo,require:"?ngModel",scope:{name:{angularJsBind:"="},field:{angularJsBind:"="}},directiveName:"matomoFieldArray",events:{"update:modelValue":function(e,t,n,r,i,o){e!==t.modelValue&&(r.trigger("change",e),o&&o.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var o=i;o&&(o.$setViewValue(e.modelValue),o.$render=function(){angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue})}});function so(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uo={class:"multiPairField form-group"},po={key:1,class:"fieldUiControl fieldUiControl2"},fo={key:2,class:"fieldUiControl fieldUiControl3"},mo={key:3,class:"fieldUiControl fieldUiControl4"},ho=["onClick","title"];function go(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",uo,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.modelValue,(function(t,n){var r;return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",(r={},so(r,"multiPairFieldTable".concat(n),!0),so(r,"has".concat(e.fieldCount,"Fields"),!0),r)]),key:n},[e.field1?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])(["fieldUiControl fieldUiControl1",{hasMultiFields:e.field1.type&&e.field2.type}])},[Object(o["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(o["createCommentVNode"])("",!0),e.field2?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",po,[Object(o["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(o["createCommentVNode"])("",!0),e.field3?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",fo,[Object(o["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(o["createCommentVNode"])("",!0),e.field4?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",mo,[Object(o["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(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{onClick:function(t){return e.removeEntry(n)},class:"icon-minus valign",title:e.translate("General_Remove")},null,8,ho),[[o["vShow"],n+1!==e.modelValue.length]])],2)})),128))])}function bo(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 vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bo(Object(n),!0).forEach((function(t){yo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oo(e){return So(e)||ko(e)||jo(e)||wo()}function wo(){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 jo(e,t){if(e){if("string"===typeof e)return Co(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)?Co(e,t):void 0}}function ko(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function So(e){if(Array.isArray(e))return Co(e)}function Co(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 Do=pn("CorePluginsAdmin","Field"),Po=Object(o["defineComponent"])({props:{modelValue:Array,name:String,field1:Object,field2:Object,field3:Object,field4:Object},components:{Field:Do},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(Oo(e||[]),[this.makeEmptyValue()]))},onEntryChange:function(e,t,n){var r=Oo(this.modelValue);r[e]=vo(vo({},r[e]),{},yo({},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}}});Po.render=go;var Eo=Po,Vo=(qt({component:Eo,require:"?ngModel",scope:{name:{angularJsBind:"="},field1:{angularJsBind:"="},field2:{angularJsBind:"="},field3:{angularJsBind:"="},field4:{angularJsBind:"="}},directiveName:"matomoMultiPairField",events:{"update:modelValue":function(e,t,n,r,i,o){e!==t.modelValue&&(r.trigger("change",e),o&&o.$setViewValue(e))}},postCreate:function(e,t,n,r,i){var o=i;o&&(o.$setViewValue(e.modelValue),o.$render=function(){angular.isString(o.$viewValue)?e.modelValue=JSON.parse(o.$viewValue):e.modelValue=o.$viewValue})}}),{ref:"root",class:"periodSelector piwikSelector"}),To=["title"],No=Object(o["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),Io={id:"periodMore",class:"dropdown"},Bo={class:"flex"},Ao={key:0,class:"period-date"},xo={class:"period-type"},Mo={id:"otherPeriods"},Lo=["onDblclick","title"],$o=["id","checked","onChange","onDblclick"],Ro={key:0,class:"compare-checkbox"},Ho={id:"comparePeriodToDropdown"},Fo={key:1,class:"compare-date-range"},_o={id:"comparePeriodStartDate"},Uo=Object(o["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),Wo={id:"comparePeriodEndDate"},qo={class:"apply-button-container"},Jo=["disabled","value"],Go={key:2,id:"ajaxLoadingCalendar"},zo={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 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(" "),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"]; + */function Yo(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("DateRangePicker"),l=Object(o["resolveComponent"])("PeriodDatePicker"),s=Object(o["resolveComponent"])("Field"),u=Object(o["resolveComponent"])("ActivityIndicator"),d=Object(o["resolveDirective"])("expand-on-click");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Vo,[Object(o["createElementVNode"])("a",{ref:"title",id:"date",class:"title",tabindex:"-1",title:e.translate("General_ChooseDate",e.currentlyViewingText)},[No,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.currentlyViewingText),1)],8,To),Object(o["createElementVNode"])("div",Io,[Object(o["createElementVNode"])("div",Bo,[Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["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"]),[[o["vShow"],"range"===e.selectedPeriod]]),"range"!==e.selectedPeriod?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ao,[Object(o["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(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",xo,[Object(o["createElementVNode"])("h6",null,Object(o["toDisplayString"])(e.translate("General_Period")),1),Object(o["createElementVNode"])("div",Mo,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.periodsFiltered,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:n},[Object(o["createElementVNode"])("label",{class:Object(o["normalizeClass"])({"selected-period-label":n===e.selectedPeriod}),onDblclick:function(t){return e.changeViewedPeriod(n)},title:n===e.periodValue?"":e.translate("General_DoubleClickToChangePeriod")},[Object(o["withDirectives"])(Object(o["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,$o),[[o["vModelRadio"],e.selectedPeriod]]),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.getPeriodDisplayText(n)),1)],42,Lo)])})),128))])])]),e.isComparisonEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ro,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{id:"comparePeriodTo",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=function(t){return e.isComparing=t})},null,512),[[o["vModelCheckbox"],e.isComparing]]),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(o["createElementVNode"])("div",Ho,[Object(o["createVNode"])(s,{modelValue:e.comparePeriodType,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.comparePeriodType=t}),style:Object(o["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(o["createCommentVNode"])("",!0),e.isComparing&&"custom"===e.comparePeriodType?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Fo,[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",_o,[Object(o["createElementVNode"])("div",null,[Object(o["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"])])]),Uo,Object(o["createElementVNode"])("div",Wo,[Object(o["createElementVNode"])("div",null,[Object(o["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(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",qo,[Object(o["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,Jo)]),e.isLoadingNewPage?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Go,[Object(o["createVNode"])(u,{loading:!0}),Object(o["createElementVNode"])("div",zo,Object(o["toDisplayString"])(e.translate("SegmentEditor_LoadingSegmentedDataMayTakeSomeTime")),1)])):Object(o["createCommentVNode"])("",!0)])],512)),[[d,{expander:"title"}]])}var Qo={class:"loadingPiwik"},Ko=Object(o["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:""},null,-1);function Xo(e,t,n,r,i,a){return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qo,[Ko,Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.loadingMessage),1)],512)),[[o["vShow"],e.loading]])}var Zo=Object(o["defineComponent"])({props:{loading:{type:Boolean,required:!0,default:!1},loadingMessage:{type:String,required:!1,default:C("General_LoadingData")}}});Zo.render=Xo;var ea=Zo;function ta(e,t){return aa(e)||oa(e,t)||ra(e,t)||na()}function na(){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 ra(e,t){if(e){if("string"===typeof e)return ia(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)?ia(e,t):void 0}}function ia(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 oa(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function aa(e){if(Array.isArray(e))return e}function ca(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 la(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(n),!0).forEach((function(t){sa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ca(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ua=pn("CorePluginsAdmin","Field"),da=S.helper.htmlDecode(" "),pa=[{key:"custom",value:C("General_Custom")},{key:"previousPeriod",value:C("General_PreviousPeriod").replace(/\s+/,da)},{key:"previousYear",value:C("General_PreviousYear").replace(/\s+/,da)}],fa=new Date(S.minDateYear,S.minDateMonth-1,S.minDateDay),ma=new Date(S.maxDateYear,S.maxDateMonth-1,S.maxDateDay);function ha(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}var ga=Object(o["defineComponent"])({props:{periods:Array},components:{DateRangePicker:_r,PeriodDatePicker:Gr,Field:ua,ActivityIndicator:ea},directives:{ExpandOnClick:vt},data:function(){return{comparePeriodDropdownOptions:pa,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(o["watch"])((function(){return Pe.parsed.value}),this.updateSelectedValuesFromHash),this.isComparing=Gn.isComparingPeriods(),Object(o["watch"])((function(){return Gn.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 Gn.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 o=F.getLastNRange(this.selectedPeriod,2,this.dateValue).startDate;return D(o)},selectedDateString:function(){if("range"===this.selectedPeriod){var e=this.startRangeDate,t=this.endRangeDate,n=E(e),r=E(t);return!ha(n)||!ha(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=la({},n);delete i.comparePeriods,delete i.compareDates,Pe.updateLocation(la(la({},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(),o=ta(i,2),a=o[0],c=o[1];this.dateValue=a,this.startRangeDate=D(a),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]<fa?fa:n[0]),this.endRangeDate=D(n[1]>ma?ma: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}}});ga.render=Yo;var ba=ga,va=(qt({component:ba,scope:{periods:{angularJsBind:"<"}},directiveName:"piwikPeriodSelector"}),{class:"reportingMenu"}),ya=["aria-label"],Oa=["onClick"],wa={class:"hidden"},ja={role:"menu"},ka=["href","onClick","title"],Sa=["href","onClick"],Ca=["onClick"],Da=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),Pa=[Da],Ea={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Va={class:"collapsible collapsible-accordion"},Ta={class:"collapsible-header"},Na={class:"collapsible-body"},Ia={key:0},Ba=["onClick","href"],Aa={key:1},xa=["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 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; + */function Ma(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("MenuDropdown"),l=Object(o["resolveDirective"])("side-nav");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",va,[Object(o["createElementVNode"])("ul",{class:"navbar hide-on-med-and-down",role:"menu","aria-label":e.translate("CoreHome_MainNavigation")},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.menu,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["normalizeClass"])(["menuTab",{active:t.id===e.activeCategory}]),role:"menuitem",key:t.id},[Object(o["createElementVNode"])("a",{class:"item",tabindex:"5",href:"",onClick:Object(o["withModifiers"])((function(n){return e.loadCategory(t)}),["prevent"])},[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])("menu-icon ".concat(t.icon?t.icon:"icon-arrow-right"))},null,2),Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.name)+" ",1),Object(o["createElementVNode"])("span",wa,Object(o["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,Oa),Object(o["createElementVNode"])("ul",ja,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.subcategories,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{role:"menuitem",class:Object(o["normalizeClass"])({active:(n.id===e.displayedSubcategory||n.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:n.id},[n.isGroup?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,"show-search":!0,"menu-title":e.htmlEntities(n.name)},{default:Object(o["withCtx"])((function(){return[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(n.subcategories,(function(r){return Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{class:Object(o["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(o["toDisplayString"])(r.name),11,ka)})),128))]})),_:2},1032,["menu-title"])):Object(o["createCommentVNode"])("",!0),n.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:1,href:"#?".concat(e.makeUrl(t,n)),class:"item",onClick:function(r){return e.loadSubcategory(t,n,r)}},Object(o["toDisplayString"])(n.name),9,Sa)),n.help?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:2,class:Object(o["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)}},Pa,10,Ca)):Object(o["createCommentVNode"])("",!0)],2)})),128))])],2)})),128))],8,ya),Object(o["createElementVNode"])("ul",Ea,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.menu,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:"no-padding",key:t.id},[Object(o["withDirectives"])(Object(o["createElementVNode"])("ul",Va,[Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",Ta,[Object(o["createElementVNode"])("i",{class:Object(o["normalizeClass"])(t.icon?t.icon:"icon-arrow-bottom")},null,2),Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.name),1)]),Object(o["createElementVNode"])("div",Na,[Object(o["createElementVNode"])("ul",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.subcategories,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:n.id},[n.isGroup?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",Ia,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(n.subcategories,(function(n){return Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n)),key:n.id},Object(o["toDisplayString"])(n.name),9,Ba)})),128))])):Object(o["createCommentVNode"])("",!0),n.isGroup?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",Aa,[Object(o["createElementVNode"])("a",{onClick:function(r){return e.loadSubcategory(t,n)},href:"#?".concat(e.makeUrl(t,n))},Object(o["toDisplayString"])(n.name),9,xa)]))])})),128))])])])],512),[[l,{activator:e.sideNavActivator}]])])})),128))])])}var La={key:0},$a=["data-notification-instance-id"],Ra={key:1},Ha={class:"notification-body"},Fa=["innerHTML"],_a={key:1};function Ua(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createBlock"])(o["Transition"],{name:"toast"===e.type?"slow-fade-out":void 0,onAfterLeave:t[1]||(t[1]=function(t){return e.toastClosed()})},{default:Object(o["withCtx"])((function(){return[e.deleted?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",La,[Object(o["createVNode"])(o["Transition"],{name:"toast"===e.type?"toast-slide-up":void 0,appear:""},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(o["Transition"],{name:e.animate?"fade-in":void 0,appear:""},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",{class:Object(o["normalizeClass"])(["notification system",e.cssClasses]),style:Object(o["normalizeStyle"])(e.style),ref:"root","data-notification-instance-id":e.notificationInstanceId},[e.canClose?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,type:"button",class:"close","data-dismiss":"alert",onClick:t[0]||(t[0]=function(t){return e.closeNotification(t)})}," × ")):Object(o["createCommentVNode"])("",!0),e.title?(Object(o["openBlock"])(),Object(o["createElementBlock"])("strong",Ra,Object(o["toDisplayString"])(e.title),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Ha,[e.message?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,Fa)):Object(o["createCommentVNode"])("",!0),e.message?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",_a,[Object(o["renderSlot"])(e.$slots,"default")]))])],14,$a)]})),_:3},8,["name"])])]})),_:3},8,["name"])]))]})),_:3},8,["name"])}var Wa=window,qa=Wa.$,Ja=Object(o["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&&qa(this.$refs.root).css(this.style)},methods:{toastClosed:function(){var e=this;Object(o["nextTick"])((function(){e.$emit("closed")}))},closeNotification:function(e){var t=this;this.canClose&&e&&e.target&&(this.deleted=!0,Object(o["nextTick"])((function(){t.$emit("closed")}))),this.markNotificationAsRead()},markNotificationAsRead:function(){this.notificationId&&Qe.fetch({module:"CoreHome",action:"markNotificationAsRead"},{postParams:{notificationId:this.notificationId}})}}});Ja.render=Ua;var Ga=Ja; /*! * 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: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} + */qt({component:Ga,scope:{notificationId:{angularJsBind:"@?"},title:{angularJsBind:"@?notificationTitle"},context:{angularJsBind:"@?"},type:{angularJsBind:"@?"},noclear:{angularJsBind:"@?",transform:Jt},toastLength:{angularJsBind:"@?"}},directiveName:"piwikNotification",transclude:!0});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){Za(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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ka(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 Xa(e,t,n){return t&&Ka(e.prototype,t),n&&Ka(e,n),e}function Za(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 _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()})), + */var ec=function(){function e(){Qa(this,e),Za(this,"privateState",Object(o["reactive"])({notifications:[]})),Za(this,"nextNotificationId",0)}return Xa(e,[{key:"state",get:function(){return Object(o["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),o=i.data(),a=i.html();a&&n.push(Ya(Ya({},o),{},{message:a,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 o=e.group||(n?n.toString():"");this.initializeNotificationContainer(n,o);var a=(this.nextNotificationId+=1).toString();return t.call(this,Ya(Ya({},e),{},{noclear:!!e.noclear,group:o,notificationId:e.id,notificationInstanceId:a,type:e.type||"transient"})),a}},{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(o["createApp"])({render:function(){return Object(o["createVNode"])(Ga,Ya(Ya({},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(o["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}(),tc=new ec,nc=tc;$((function(){return tc.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 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; +angular.module("piwikApp").factory("notifications",(function(){return nc}));var rc={class:"notification-group"},ic=["innerHTML"];function oc(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Notification");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",rc,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.notifications,(function(t,n){return Object(o["openBlock"])(),Object(o["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(o["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(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,ic)]})),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"])})),128))])}var ac=Object(o["defineComponent"])({props:{group:String},components:{Notification:Ga},computed:{notifications:function(){var e=this;return nc.state.notifications.filter((function(t){return e.group?e.group===t.group:!t.group}))}},methods:{removeNotification:function(e){nc.remove(e)}}});ac.render=oc;var cc=ac; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */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} + */function lc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sc(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 uc(e,t,n){return t&&sc(e.prototype,t),n&&sc(e,n),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} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */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} + */var pc=function(){function e(){var t=this;lc(this,e),dc(this,"privateState",Object(o["reactive"])({pages:[]})),dc(this,"state",Object(o["readonly"])(this.privateState)),dc(this,"fetchAllPagesPromise",void 0),dc(this,"pages",Object(o["computed"])((function(){return t.state.pages})))}return uc(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=Qe.fetch({method:"API.getReportPagesMetadata",filter_limit:"-1"}).then((function(t){e.privateState.pages=t}))),this.fetchAllPagesPromise.then((function(){return e.pages.value}))}}]),e}(),fc=new pc;function mc(e){return vc(e)||bc(e)||gc(e)||hc()}function hc(){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 gc(e,t){if(e){if("string"===typeof e)return yc(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)?yc(e,t):void 0}}function bc(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function vc(e){if(Array.isArray(e))return yc(e)}function yc(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 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} + */function Oc(e){var t=mc(e||[]);return t.sort((function(e,t){return e.order<t.order?-1:e.order>t.order?1:0})),t}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){Dc(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 kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sc(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 Cc(e,t,n){return t&&Sc(e.prototype,t),n&&Sc(e,n),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} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */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} + */function Pc(e){var t=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}var Ec=function(){function e(){var t=this;kc(this,e),Dc(this,"privateState",Object(o["reactive"])({activeCategoryId:null,activeSubcategoryId:null,activeSubsubcategoryId:null})),Dc(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),Dc(this,"activeCategory",Object(o["computed"])((function(){return t.state.value.activeCategoryId||Pe.parsed.value.category}))),Dc(this,"activeSubcategory",Object(o["computed"])((function(){return t.state.value.activeSubcategoryId||Pe.parsed.value.subcategory}))),Dc(this,"activeSubsubcategory",Object(o["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}))),Dc(this,"menu",Object(o["computed"])((function(){return t.buildMenuFromPages()})))}return Cc(e,[{key:"fetchMenuItems",value:function(){var e=this;return fc.getAllPages().then((function(){return e.menu.value}))}},{key:"reloadMenuItems",value:function(){var e=this;return fc.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(o){o.id===e&&(o.subcategories||[]).forEach((function(e){e.id===t&&(n=o,r=e),e.isGroup&&(e.subcategories||[]).forEach((function(a){a.id===t&&(n=o,r=e,i=a)}))}))})),{category:n,subcategory:r,subsubcategory:i}}},{key:"buildMenuFromPages",value:function(){var e=[],t=Pe.parsed.value.category,n=Pe.parsed.value.subcategory,r=fc.pages.value,i={};return r.forEach((function(o){var a=jc({},o.category),c=a.id,l=c===t;if(!i[c]){var s;i[c]=!0,a.subcategories=[];var u=r.filter((function(e){return e.category.id===c}));u.forEach((function(e){var t=jc({},e.subcategory),r=t.id===n&&l;if(e.widgets&&e.widgets[0]&&Pc(e.subcategory.id)){s||(s=jc({},t),s.name=C("CoreHome_ChooseX",[a.name]),s.isGroup=!0,s.subcategories=[],s.order=10),r&&(s.name=t.name);var i=o.subcategory.id;return t.tooltip="".concat(t.name," (id = ").concat(i,")"),void s.subcategories.push(t)}a.subcategories.push(t)})),s&&s.subcategories&&s.subcategories.length<=5?s.subcategories.forEach((function(e){return a.subcategories.push(e)})):s&&a.subcategories.push(s),a.subcategories=Oc(a.subcategories),e.push(a)}})),Oc(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 Ec;function Tc(e){return Tc="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},Tc(e)}function Nc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ic(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 Bc(e,t,n){return t&&Ic(e.prototype,t),n&&Ic(e,n),e}function Ac(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 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; + */var xc=function(){function e(){var t=this;Nc(this,e),Ac(this,"privateState",Object(o["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),Ac(this,"state",Object(o["computed"])((function(){return t.privateState.isFetchedFirstTime||t.fetchAvailableWidgets(),Object(o["readonly"])(t.privateState)}))),Ac(this,"widgets",Object(o["computed"])((function(){return t.state.value.categorizedWidgets})))}return Bc(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"===Tc(window.widgetsHelper)&&window.widgetsHelper.availableWidgets&&delete window.widgetsHelper.availableWidgets,this.fetchAvailableWidgets()}}]),e}(),Mc=new xc;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 $c(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){Rc(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 Rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hc="reportingmenu-help",Fc=Object(o["defineComponent"])({components:{MenuDropdown:Dr},directives:{SideNav:Et},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(o["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)}})),Mc.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($c($c({},Pe.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory:function(e){nc.remove(Hc);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)||(nc.remove(Hc),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,o=n.date,a=n.segment,c=n.comparePeriods,l=n.compareDates,s=n.compareSegments;return Pe.stringify({idSite:r,period:i,date:o,segment:a,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,o=r.subcategory;if((i!==e.id||o!==t.id)&&n)return this.showSubcategoryHelpOnLoad={category:e,subcategory:t},void Pe.updateHash($c($c({},Pe.hashParsed.value),{},{category:e.id,subcategory:t.id}));if(this.helpShownCategory&&e.id===this.helpShownCategory.category&&t.id===this.helpShownCategory.subcategory)return nc.remove(Hc),void(this.helpShownCategory=null);var a=C("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),c="<strong>".concat(a,"</strong><br/>");nc.show({context:"info",id:Hc,type:"help",noclear:!0,class:"help-notification",message:c+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});Fc.render=Ma;var _c=Fc; /*! * 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:Tc,directiveName:"piwikReportingMenu"}); + */qt({component:_c,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 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))}))}}} +function Uc(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 Wc(){return{get menu(){return Vc.menu.value},findSubcategory:Vc.findSubcategory.bind(Vc),reloadMenuItems:function(){return Vc.reloadMenuItems().then((function(e){return Uc(Yt(e))}))},fetchMenuItems:function(){return Vc.fetchMenuItems().then((function(e){return Uc(Yt(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 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} +function qc(){return{get pages(){return fc.pages.value},findPageInCategory:function(){return zt(fc.findPageInCategory.apply(fc,arguments))},findPage:function(){return zt(fc.findPage.apply(fc,arguments))},reloadAllPages:function(){return fc.reloadAllPages().then((function(e){return Yt(e)}))},getAllPages:function(){return fc.getAllPages().then((function(e){return Yt(e)}))}}}function Jc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gc(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 zc(e,t,n){return t&&Gc(e.prototype,t),n&&Gc(e,n),e}function Yc(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",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; + */angular.module("piwikApp.service").factory("reportingMenuModel",Wc),angular.module("piwikApp.service").factory("reportingPagesModel",qc);var Qc=function(){function e(){var t=this;Jc(this,e),Yc(this,"privateState",Object(o["reactive"])({reports:[]})),Yc(this,"state",Object(o["readonly"])(this.privateState)),Yc(this,"reports",Object(o["computed"])((function(){return t.state.reports}))),Yc(this,"reportsPromise",void 0)}return zc(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=Qe.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}(),Kc=new Qc; /*! * 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 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; +angular.module("piwikApp.service").factory("reportMetadataModel",(function(){return{get reports(){return Kc.reports.value},findReport:Kc.findReport.bind(Kc),fetchReportMetadata:function(){return Kc.fetchReportMetadata().then((function(e){return Yt(e)}))}}}));var Xc={key:0},Zc={class:"notification system notification-error"},el={key:0,rel:"noreferrer noopener",target:"_blank",href:"https://matomo.org/faq/troubleshooting/faq_19489/"},tl={class:"theWidgetContent",ref:"widgetContent"};function nl(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("ActivityIndicator");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createVNode"])(c,{"loading-message":e.loadingMessage,loading:e.loading},null,8,["loading-message","loading"]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[e.widgetName?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",Xc,Object(o["toDisplayString"])(e.widgetName),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Zc,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_ErrorRequest","",""))+" ",1),e.hasErrorFaqLink?(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",el,Object(o["toDisplayString"])(e.translate("General_ErrorRequestFaqLink")),1)):Object(o["createCommentVNode"])("",!0)])],512),[[o["vShow"],e.loadingFailed]]),Object(o["createElementVNode"])("div",tl,null,512)])}function rl(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 il(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rl(Object(n),!0).forEach((function(t){ol(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ol(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var al=Object(o["defineComponent"])({props:{widgetParams:Object,widgetName:String},components:{ActivityIndicator:ea},data:function(){return{loading:!1,loadingFailed:"",changeCounter:0,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.lastWidgetAbortController&&(this.lastWidgetAbortController.abort(),this.lastWidgetAbortController=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=il({},e||{}),r=Object.keys(il(il({},Pe.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return r.forEach((function(e){"category"!==e&&"subcategory"!==e&&(e in n||(n[e]=t[e]))})),Gn.isComparisonEnabled()&&(n=il(il({},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.lastWidgetAbortController=new AbortController,Qe.fetch(this.getWidgetUrl(e),{format:"html",headers:{"X-Requested-With":"XMLHttpRequest"},abortController:this.lastWidgetAbortController}).then((function(r){if(t===n.changeCounter&&r&&"string"===typeof r){n.lastWidgetAbortController=null,n.loading=!1,n.loadingFailed=!1;var i=n.$refs.widgetContent;window.$(i).html(r);var o=window.$(i).children();if(n.widgetName){var a=o.find("> .card-content .card-title");a.length||(a=o.find("> h2")),a.length&&a.html(S.helper.htmlEntities(n.widgetName))}var c=S.helper.getAngularDependency("$rootScope"),l=c.$new();n.currentScope=l,S.helper.compileAngularComponents(o,{scope:l}),nc.parseNotificationDivs(),setTimeout((function(){S.postEvent("widget:loaded",{parameters:e,element:o})}))}})).catch((function(e){t===n.changeCounter&&(n.lastWidgetAbortController=null,n.cleanupLastWidgetContent(),n.loading=!1,"abort"!==e.xhrStatus&&(n.loadingFailed=!0))}))}}});al.render=nl;var cl=al; /*! * 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: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); + */qt({component:cl,scope:{piwikWidgetLoader:{vue:"widgetParams",angularJsBind:"="},widgetName:{angularJsBind:"@"}},directiveName:"piwikWidgetLoader"});function ll(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("Widget");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.actualContainer,(function(e,t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t},[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(c,{widget:e,"prevent-recursion":!0},null,8,["widget"])])])})),128))])}function sl(e){return pl(e)||dl(e)||vl(e)||ul()}function ul(){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 dl(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function pl(e){if(Array.isArray(e))return yl(e)}function fl(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?fl(Object(n),!0).forEach((function(t){hl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(e,t){return wl(e)||Ol(e,t)||vl(e,t)||bl()}function bl(){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 vl(e,t){if(e){if("string"===typeof e)return yl(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)?yl(e,t):void 0}}function yl(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 Ol(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function wl(e){if(Array.isArray(e))return e}var jl=pn("CoreHome","Widget"),kl=Object(o["defineComponent"])({props:{container:Array},components:{Widget:jl},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=gl(t,1),r=n[0],i="1"===r.parameters.widget||1===r.parameters.widget,o=i&&"graphEvolution"===r.viewDataTable,a=o?ml(ml({},r),{},{parameters:ml(ml({},r.parameters),{},{showtitle:"0"})}):r;return[a].concat(sl(t.slice(1)))}}});kl.render=ll;var Sl=kl,Cl=(qt({component:Sl,scope:{container:{angularJsBind:"=piwikWidgetContainer"}},directiveName:"piwikWidgetContainer"}),{class:"reportsByDimensionView"}),Dl={class:"entityList"},Pl={class:"listCircle"},El=["onClick"],Vl={class:"dimension"},Tl={class:"reportContainer"},Nl=Object(o["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 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}; + */function Il(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("WidgetLoader");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Cl,[Object(o["createElementVNode"])("div",Dl,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.widgetsByCategory,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"dimensionCategory",key:t.name},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.name)+" ",1),Object(o["createElementVNode"])("ul",Pl,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(t.widgets,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{class:Object(o["normalizeClass"])(["reportDimension",{activeDimension:e.selectedWidget.uniqueId===t.uniqueId}]),key:t.uniqueId,onClick:function(n){return e.selectWidget(t)}},[Object(o["createElementVNode"])("span",Vl,Object(o["toDisplayString"])(t.name),1)],10,El)})),128))])])})),128))]),Object(o["createElementVNode"])("div",Tl,[e.selectedWidget.parameters?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,"widget-params":e.selectedWidget.parameters,class:"dimensionReport"},null,8,["widget-params"])):Object(o["createCommentVNode"])("",!0)]),Nl])}function Bl(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 Al(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bl(Object(n),!0).forEach((function(t){xl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ml(e,t){return Fl(e)||Hl(e,t)||$l(e,t)||Ll()}function Ll(){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 $l(e,t){if(e){if("string"===typeof e)return Rl(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)?Rl(e,t):void 0}}function Rl(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 Hl(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(o.push(r.value),t&&o.length===t)break}catch(l){c=!0,i=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(c)throw i}}return o}}function Fl(e){if(Array.isArray(e))return e}var _l=Object(o["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:cl},data:function(){return{selectedWidget:null}},created:function(){var e=Ml(this.widgetsSorted,1);this.selectedWidget=e[0]},computed:{widgetsSorted:function(){return Oc(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)})),Oc(Object.values(e))}},methods:{selectWidget:function(e){this.selectedWidget=Al({},e)}}});_l.render=Il;var Ul=_l,Wl=(qt({component:Ul,scope:{widgets:{angularJsBind:"=piwikWidgetByDimensionContainer",transform:function(e){return e.widgets}}},directiveName:"piwikWidgetByDimensionContainer"}),["id"]),ql={key:1},Jl={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 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"}; + */function Gl(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("WidgetLoader"),l=Object(o["resolveComponent"])("WidgetContainer"),s=Object(o["resolveComponent"])("WidgetByDimensionContainer"),u=Object(o["resolveDirective"])("tooltips");return e.actualWidget?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:0,class:Object(o["normalizeClass"])(["matomo-widget",{isFirstWidgetInPage:e.actualWidget.isFirstInPage}]),id:e.actualWidget.uniqueId},[!e.actualWidget.isContainer&&e.actualWidget.parameters?(Object(o["openBlock"])(),Object(o["createBlock"])(c,{key:0,"widget-params":e.actualWidget.parameters,"widget-name":e.actualWidget.name},null,8,["widget-params","widget-name"])):Object(o["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"!==e.actualWidget.layout&&!this.preventRecursion?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ql,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(l,{container:e.actualWidget.widgets},null,8,["container"])])])):Object(o["createCommentVNode"])("",!0),e.actualWidget.isContainer&&"ByDimension"===e.actualWidget.layout?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Jl,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(s,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(o["createCommentVNode"])("",!0)],10,Wl)),[[o["vShow"],e.showWidget],[u,{content:e.tooltipContent}]]):Object(o["createCommentVNode"])("",!0)}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,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 Xl=Object(o["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:cl,WidgetContainer:Sl,WidgetByDimensionContainer:Ul},directives:{Tooltips:ar},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?Qe.fetch(t.middlewareParameters).then((function(t){e.showWidget=!!t})):this.showWidget=!0},computed:{allWidgets:function(){return Mc.widgets.value},actualWidget:function(){var e=this,t=this.widget;if(t){var n=Yl({},t);if(t&&t.isReport&&!t.documentation){var r=Kc.findReport(t.module,t.action);r&&r.documentation&&(n.documentation=r.documentation)}return t}if(this.containerid){var i=Kl(this.allWidgets,this.containerid);if(i){var o=Yl({},i);return this.widgetized&&(o.isFirstInPage=!0,o.parameters=Yl(Yl({},o.parameters),{},{widget:"1"}),o.widgets&&(o.widgets=o.widgets.map((function(t){return Yl(Yl({},t),{},{parameters:Yl(Yl({},t.parameters),{},{widget:"1",containerId:e.containerid})})})))),o}}return null}}});Xl.render=Gl;var Zl=Xl,es=(qt({component:Zl,scope:{widget:{angularJsBind:"=?piwikWidget"},widgetized:{angularJsBind:"=?"},containerid:{angularJsBind:"@"}},directiveName:"piwikWidget"}),{class:"reporting-page"}),ts={key:1,class:"col s12 l6 leftWidgetColumn"},ns={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 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} + */function rs(e,t,n,r,i,a){var c=Object(o["resolveComponent"])("ActivityIndicator"),l=Object(o["resolveComponent"])("Widget");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",es,[Object(o["createVNode"])(c,{loading:e.loading},null,8,["loading"]),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("CoreHome_NoSuchPage")),513),[[o["vShow"],e.hasNoPage]]),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.widgets,(function(e){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:"row",key:e.uniqueId},[e.group?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ts,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.left,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(o["createCommentVNode"])("",!0),e.group?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ns,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.right,(function(e){return Object(o["openBlock"])(),Object(o["createBlock"])(l,{widget:e,key:e.uniqueId},null,8,["widget"])})),128))])):Object(o["createCommentVNode"])("",!0)])})),128))])}function is(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function os(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 as(e,t,n){return t&&os(e.prototype,t),n&&os(e,n),e}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}function us(e){return ms(e)||fs(e)||ps(e)||ds()}function ds(){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 ps(e,t){if(e){if("string"===typeof e)return hs(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)?hs(e,t):void 0}}function fs(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ms(e){if(Array.isArray(e))return hs(e)}function hs(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 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"})); + */function gs(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 bs(e){if(e&&e[0]){var t=us(e);return e[0].group?t[0]=ls(ls({},t[0]),{},{left:bs(e[0].left),right:bs(e[0].right)}):t[0]=ls(ls({},t[0]),{},{isFirstInPage:!0}),t}return e}var vs=function(){function e(){var t=this;is(this,e),ss(this,"privateState",Object(o["reactive"])({page:null})),ss(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),ss(this,"page",Object(o["computed"])((function(){return t.state.value.page}))),ss(this,"widgets",Object(o["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)]},o=function(e){if(!e.isReport)return[];var t=Kc.findReport(e.module,e.action);return t&&t.relatedReports?t.relatedReports:[]};if((e.widgets||[]).forEach((function(e){i(e)||(o(e).forEach((function(e){r["".concat(e.module,".").concat(e.action)]=!0})),n.push(e))})),n=Oc(n),1===n.length)return bs(n);for(var a=[],c=0;c<n.length;c+=1){var l=n[c];if(gs(l)||n[c+1]&&gs(n[c+1]))a.push(ls(ls({},l),{},{widgets:Oc(l.widgets)}));else{var s=0,u=[l],d=[];while(n[c+1]&&!gs(n[c+1]))c+=1,s+=1,s%2===0?u.push(n[c]):d.push(n[c]);a.push({group:!0,left:u,right:d})}}return a=bs(a),a})))}return as(e,[{key:"fetchPage",value:function(e,t){var n=this;return this.resetPage(),Promise.all([fc.getAllPages(),Kc.fetchReportMetadata()]).then((function(){return n.privateState.page=fc.findPage(e,t),n.page.value}))}},{key:"resetPage",value:function(){this.privateState.page=null}}]),e}(),ys=new vs;function Os(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 ws(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Os(Object(n),!0).forEach((function(t){js(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Os(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function js(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ks=window,Ss=ks.$;function Cs(){var e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);nc.show({id:"onlyRawData",animate:!1,context:"info",message:C("CoreHome_PeriodHasOnlyRawData",'<a href="'.concat(t,'">'),"</a>"),type:"transient"})}function Ds(){nc.remove("onlyRawData")}var Ps=Object(o["defineComponent"])({components:{ActivityIndicator:ea,Widget:Zl},data:function(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created:function(){var e=this;ys.resetPage(),this.loading=!0,this.renderInitialPage(),Object(o["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||(Ds(),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 ys.widgets.value}},methods:{renderPage:function(e,t){var n=this;if(!e||!t)return ys.resetPage(),void(this.loading=!1);var r=Pe.parsed.value,i=r.period,o=r.date;try{p.parse(i,o)}catch(l){return nc.show({id:"invalidDate",animate:!1,context:"error",message:C("CoreHome_DateInvalid"),type:"transient"}),ys.resetPage(),void(this.loading=!1)}if(nc.remove("invalidDate"),S.postEvent("piwikPageChange",{}),nc.clearTransientNotifications(),p.parse(i,o).containsToday()&&this.showOnlyRawDataMessageIfRequired(),"Dashboard_Dashboard"===e&&Ss.isNumeric(t)&&Ss("[piwik-dashboard]").length){this.loading=!0;var a=Ss("[piwik-dashboard]"),c=angular.element(a).scope();c.fetchDashboard(parseInt(t,10)).then((function(){n.loading=!1}),(function(){n.loading=!1}))}else ys.fetchPage(e,t).then((function(){var t=!ys.page.value;if(t){var r=fc.findPageInCategory(e);if(r&&r.subcategory)return void Pe.updateHash(ws(ws({},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&&Cs();var t=Pe.parsed.value,n=t.segment;if(n)Ds();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 o=6e4;this.dateLastChecked&&(new Date).getTime()-this.dateLastChecked<o||Qe.fetch({method:"VisitsSummary.getVisits"}).then((function(t){return e.dateLastChecked=(new Date).getTime(),t.value>0?(e.hasNoVisits=!1,void Ds()):(e.hasNoVisits=!0,e.hasRawData?void Cs():Qe.fetch({method:"Live.getLastVisitsDetails",filter_limit:1,doNotFetchActions:1}))})).then((function(t){if(!t||0===t.length)return e.hasRawData=!1,void Ds();e.hasRawData=!0,Cs()}))}else Ds()}}}});Ps.render=rs;var Es=Ps,Vs=(qt({component:Es,directiveName:"piwikReportingPage"}),qt({component:ea,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 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}); + */function Ts(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["alert",Ts({},"alert-".concat(e.severity),!0)])},[Object(o["renderSlot"])(e.$slots,"default")],2)}var Is=Object(o["defineComponent"])({props:{severity:{type:String,required:!0}}});Is.render=Ns;var Bs=Is,As=qt({component:Bs,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 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=/")} + */function xs(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 Ms(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 Ls(e){var t=new Date;t.setTime(t.getTime()+-864e5),document.cookie="".concat(e,"=; expires=").concat(t.toUTCString(),"; path=/")} /*! * Matomo - free/libre analytics platform * |