@conduction/nextcloud-vue 2.140.0 → 2.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue.js +1 -1
- package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue2.js +10 -2
- package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +24 -3
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +3 -3
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +12 -0
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js +57 -40
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +1 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +26 -3
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +2 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +34 -3
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +43 -3
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +21 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js +14 -0
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +65 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js +120 -69
- package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +47 -9
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +3 -3
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +3 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js +1 -1
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js +31 -1
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js.map +1 -1
- package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +2 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue2.js +10 -0
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue3.js +34 -26
- package/dist/esm/components/CnRecordListWidget/CnRecordNoteRows.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue2.js +52 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue3.js +119 -65
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/deck/CnDeckCard.vue.js +1 -1
- package/dist/esm/integrations/builtin/deck/CnDeckCard.vue2.js +86 -4
- package/dist/esm/integrations/builtin/deck/CnDeckCard.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/deck/CnDeckCard.vue3.js +67 -5
- package/dist/esm/integrations/builtin/deck/CnDeckCard.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +11 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +12 -2
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +1116 -686
- package/dist/esm/utils/buildViewTree.js +23 -8
- package/dist/esm/utils/buildViewTree.js.map +1 -1
- package/dist/esm/utils/groupSublines.js +120 -0
- package/dist/esm/utils/groupSublines.js.map +1 -0
- package/dist/nextcloud-vue.cjs.js +2023 -1239
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1116 -686
- package/l10n/en.json +11 -1
- package/l10n/nl.json +12 -2
- package/package.json +1 -1
- package/src/components/CnAssignDialog/CnAssignDialog.vue +10 -2
- package/src/components/CnCellRenderer/CnCellRenderer.vue +26 -4
- package/src/components/CnChartWidget/CnChartWidget.md +1 -0
- package/src/components/CnChartWidget/CnChartWidget.vue +49 -4
- package/src/components/CnDashboardPage/CnDashboardPage.vue +1 -0
- package/src/components/CnDataTable/CnDataTable.md +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +28 -4
- package/src/components/CnFactsWidget/CnFactsWidget.vue +34 -3
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +44 -4
- package/src/components/CnIndexPage/CnIndexPage.vue +22 -1
- package/src/components/CnIndexPage/useSelfFetchList.js +14 -0
- package/src/components/CnIndexSidebar/CnIndexSidebar.vue +101 -3
- package/src/components/CnMapWidget/CnMapWidget.vue +47 -9
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +3 -3
- package/src/components/CnObjectSidebar/CnFilesTab.vue +4 -1
- package/src/components/CnPartyPicker/CnPartyPicker.vue +31 -1
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +20 -1
- package/src/components/CnRecordListWidget/CnRecordNoteRows.vue +33 -9
- package/src/css/dialog.css +13 -1
- package/src/css/look-board-detail.css +107 -9
- package/src/css/look-board-index.css +143 -7
- package/src/css/look-board.css +109 -0
- package/src/css/table.css +12 -0
- package/src/integrations/builtin/contacts/CnContactsTab.vue +101 -26
- package/src/integrations/builtin/contacts/__tests__/CnContactsTabBoardRows.spec.js +67 -0
- package/src/integrations/builtin/deck/CnDeckCard.vue +121 -2
- package/src/integrations/builtin/deck/__tests__/CnDeckCardHeaderActions.spec.js +68 -0
- package/src/utils/buildViewTree.js +23 -8
- package/src/utils/groupSublines.js +125 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnChartWidget.vue2.js","sources":["../../../../src/components/CnChartWidget/CnChartWidget.vue"],"sourcesContent":["<!--\n CnChartWidget — Renders charts inside dashboard widgets.\n\n A thin wrapper around ApexCharts for use in CnDashboardPage widget slots.\n Supports area, line, bar, pie, donut, and radialBar chart types.\n Automatically adapts to the widget container size.\n\n ApexCharts is loaded as a peer dependency — consuming apps must\n install `apexcharts` and `vue-apexcharts` in their own package.json.\n-->\n<template>\n\t<div class=\"cn-chart-widget\" :class=\"{ 'cn-chart-widget--fit': fitToContainer }\">\n\t\t<!-- In-widget view switcher (Wave-4 amendment folded into Wave 3,\n\t\t #91): a compact pill row that switches which named series /\n\t\t value format render. Pure display — no series arithmetic.\n\t\t Renders only when 2+ views are configured. -->\n\t\t<div\n\t\t\tv-if=\"views.length > 1\"\n\t\t\tclass=\"cn-chart-widget__views\"\n\t\t\trole=\"group\"\n\t\t\t:aria-label=\"viewsGroupLabel\"\n\t\t\tdata-testid=\"cn-chart-widget-views\">\n\t\t\t<button\n\t\t\t\tv-for=\"view in views\"\n\t\t\t\t:key=\"view.key\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-chart-widget__view-pill\"\n\t\t\t\t:class=\"{ 'cn-chart-widget__view-pill--active': activeView && activeView.key === view.key }\"\n\t\t\t\t:aria-pressed=\"String(Boolean(activeView && activeView.key === view.key))\"\n\t\t\t\t:data-testid=\"`cn-chart-widget-view-${view.key}`\"\n\t\t\t\t@click=\"activeViewKey = view.key\">\n\t\t\t\t{{ view.label ? hostTranslate(view.label) : view.key }}\n\t\t\t</button>\n\t\t</div>\n\t\t<!-- A refused or failed endpoint read shows its sentence instead of\n\t\t the chart; a short one keeps the chart and says it is short. -->\n\t\t<CnEndpointNotice\n\t\t\tv-if=\"!epError && epTruncated\"\n\t\t\t:truncated=\"true\" />\n\t\t<CnEndpointNotice\n\t\t\tv-if=\"epAwaitingRequest\"\n\t\t\t:awaitingRequest=\"true\"\n\t\t\t:requestLabel=\"endpointSource.requestLabel ? hostTranslate(endpointSource.requestLabel) : ''\"\n\t\t\t:requestHint=\"endpointSource.requestHint ? hostTranslate(endpointSource.requestHint) : ''\"\n\t\t\t:requestDisabled=\"epBlocked\"\n\t\t\t@request=\"epRequest\" />\n\t\t<CnEndpointNotice\n\t\t\tv-else-if=\"epError\"\n\t\t\t:error=\"epError\"\n\t\t\t:refused=\"epRefused\" />\n\t\t<div v-else-if=\"showEmptyState\" class=\"cn-chart-widget__empty\" data-testid=\"cn-chart-widget-empty\">\n\t\t\t{{ hostTranslate(emptyLabel) }}\n\t\t</div>\n\t\t<!-- Sizing box for the apexcharts mount. apexcharts resolves a\n\t\t percentage `height` against its element's PARENT (Core.js\n\t\t setSVGDimensions → Utils.getDimensions(el.parentNode)), so a\n\t\t container-fitting chart needs a parent whose height is the space\n\t\t left over — not one sized by the chart itself. This box is\n\t\t `flex: 1 1 0` inside the flex column, so its height is the\n\t\t leftover after the view-switcher row, independent of the chart's\n\t\t own height. Without it the percentage would resolve against the\n\t\t content-sized root and either collapse to 0 or ignore the pill\n\t\t row. -->\n\t\t<!-- `bar-list`: one row per category, a track filled to the value's\n\t\t share of `barMax` (default the largest value), the value at the\n\t\t end. Rows navigate when the source declares a drilldown. -->\n\t\t<div v-else-if=\"type === 'bar-list'\" class=\"cn-chart-widget__html\" data-testid=\"cn-chart-widget-bar-list\">\n\t\t\t<ul class=\"cn-chart-widget__bar-list\">\n\t\t\t\t<li v-for=\"row in barListRows\" :key=\"row.index\" class=\"cn-chart-widget__bar-row\">\n\t\t\t\t\t<component\n\t\t\t\t\t\t:is=\"row.drill ? 'button' : 'div'\"\n\t\t\t\t\t\t:type=\"row.drill ? 'button' : null\"\n\t\t\t\t\t\tclass=\"cn-chart-widget__bar-line\"\n\t\t\t\t\t\t:class=\"{ 'cn-chart-widget__bar-line--drill': row.drill }\"\n\t\t\t\t\t\tdata-testid=\"cn-chart-widget-bar-row\"\n\t\t\t\t\t\t@click=\"row.drill ? onDataPointSelection(null, null, { dataPointIndex: row.index }) : null\">\n\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-label\">{{ row.label }}</span>\n\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-track\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-fill\" :style=\"{ width: `${row.share}%` }\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-value\">{{ row.text }}</span>\n\t\t\t\t\t</component>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<p v-if=\"footnote\" class=\"cn-chart-widget__footnote\">\n\t\t\t\t{{ hostTranslate(footnote) }}\n\t\t\t</p>\n\t\t</div>\n\t\t<!-- `matrix`: one row per series, one column per category, each cell\n\t\t tinted by its value's share of the largest value, or by `colorMap`\n\t\t for text cells. -->\n\t\t<div v-else-if=\"type === 'matrix'\" class=\"cn-chart-widget__html\" data-testid=\"cn-chart-widget-matrix\">\n\t\t\t<div\n\t\t\t\trole=\"table\"\n\t\t\t\tclass=\"cn-chart-widget__matrix\"\n\t\t\t\t:aria-label=\"matrixLabel\"\n\t\t\t\t:style=\"{ gridTemplateColumns: `${matrixLabelColumn} repeat(${matrix.columns.length}, minmax(0, 1fr))` }\">\n\t\t\t\t<div role=\"row\" class=\"cn-chart-widget__matrix-row\">\n\t\t\t\t\t<span role=\"columnheader\" class=\"cn-chart-widget__matrix-corner\" />\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"column in matrix.columns\"\n\t\t\t\t\t\t:key=\"column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t\tclass=\"cn-chart-widget__matrix-head\">{{ column }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"row in matrix.rows\"\n\t\t\t\t\t:key=\"row.label\"\n\t\t\t\t\trole=\"row\"\n\t\t\t\t\tclass=\"cn-chart-widget__matrix-row\">\n\t\t\t\t\t<span role=\"rowheader\" class=\"cn-chart-widget__matrix-label\">{{ row.label }}</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"(cell, column) in row.cells\"\n\t\t\t\t\t\t:key=\"column\"\n\t\t\t\t\t\trole=\"cell\"\n\t\t\t\t\t\tclass=\"cn-chart-widget__matrix-cell\"\n\t\t\t\t\t\t:class=\"[`cn-chart-widget__matrix-cell--${cell.level}`, { 'cn-chart-widget__matrix-cell--current': cell.current }]\"\n\t\t\t\t\t\t:style=\"cell.color ? { background: cell.color } : null\"\n\t\t\t\t\t\t:aria-current=\"cell.current ? 'true' : null\"\n\t\t\t\t\t\tdata-testid=\"cn-chart-widget-matrix-cell\">{{ cell.text }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<p v-if=\"footnote\" class=\"cn-chart-widget__footnote\">\n\t\t\t\t{{ hostTranslate(footnote) }}\n\t\t\t</p>\n\t\t</div>\n\t\t<div v-else-if=\"chartComponent\" class=\"cn-chart-widget__canvas\">\n\t\t\t<component\n\t\t\t\t:is=\"chartComponent\"\n\t\t\t\tref=\"chart\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:height=\"computedHeight\"\n\t\t\t\t:width=\"computedWidth\"\n\t\t\t\t:options=\"mergedOptions\"\n\t\t\t\t:series=\"plottedSeries\" />\n\t\t</div>\n\t\t<div v-else class=\"cn-chart-widget__fallback\">\n\t\t\t<!-- @slot Rendered when the ApexCharts peer dependency is not available (defaults to the unavailableLabel text). -->\n\t\t\t<slot name=\"fallback\">\n\t\t\t\t<p class=\"cn-chart-widget__error\">\n\t\t\t\t\t{{ unavailableLabel }}\n\t\t\t\t</p>\n\t\t\t</slot>\n\t\t</div>\n\t\t<p\n\t\t\tv-if=\"footnote && chartComponent && !showEmptyState && type !== 'bar-list' && type !== 'matrix'\"\n\t\t\tclass=\"cn-chart-widget__footnote\"\n\t\t\tdata-testid=\"cn-chart-widget-footnote\">\n\t\t\t{{ hostTranslate(footnote) }}\n\t\t</p>\n\t\t<!-- `notice`: a toned note card under the chart whose words carry\n\t\t values from the page record (DqHandhaving \"Advies: ...\"). -->\n\t\t<NcNoteCard\n\t\t\tv-if=\"noticeParts\"\n\t\t\t:type=\"noticeParts.type\"\n\t\t\t:data-tone=\"noticeParts.type\"\n\t\t\tclass=\"cn-chart-widget__notice\"\n\t\t\tdata-testid=\"cn-chart-widget-notice\">\n\t\t\t<p class=\"cn-chart-widget__notice-text\">\n\t\t\t\t<strong v-if=\"noticeParts.lead\">{{ noticeParts.lead }}</strong>{{ noticeParts.lead && noticeParts.text ? ' ' : '' }}{{ noticeParts.text }}\n\t\t\t</p>\n\t\t</NcNoteCard>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { getLanguage, translate as t } from '@nextcloud/l10n'\nimport { NcNoteCard } from '@nextcloud/vue'\nimport { inject, markRaw, ref } from 'vue'\nimport VueApexCharts from 'vue3-apexcharts'\nimport { useDataSource } from '../../composables/useDataSource.js'\nimport { getByPath, useEndpointSource } from '../../composables/useEndpointSource.js'\nimport { useObjectStore } from '../../store/useObjectStore.js'\nimport { resolveObjectOpType } from '../../utils/actionsDispatcher.js'\nimport { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js'\nimport { resolveObjectTokenContext } from '../../utils/detailObjectContext.js'\nimport { safeCurrencyCode } from '../../utils/formatMetric.js'\nimport { cellsFromRecord, pivotCells } from '../../utils/matrixCells.js'\nimport { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\nimport { userLocale } from '../../utils/userLocale.js'\nimport { CnEndpointNotice } from '../CnEndpointNotice/index.js'\n\n/**\n * Nice-ceiling ladder. Deliberately fine-grained: a coarse one (1 / 2 / 5 / 10)\n * sends 62 all the way to 100 and wastes a third of the plot on empty space.\n */\nconst NICE_CEIL_STEPS = [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10]\n\n/**\n * Round a value up to the next \"nice\" axis ceiling — a round multiple of a\n * power of ten (7 → 8, 62 → 80, 210 → 250). Gives the top mark breathing room\n * and lands the axis on round ticks instead of ending exactly on the data's\n * maximum, where the peak sits glued to the plot's ceiling.\n *\n * @param {number} value Data maximum (must be > 0).\n * @return {number} The next nice ceiling at or above `value`.\n */\nfunction niceCeil(value) {\n\tif (!Number.isFinite(value) || value <= 0) {\n\t\treturn 1\n\t}\n\tconst magnitude = 10 ** Math.floor(Math.log10(value))\n\tfor (const step of NICE_CEIL_STEPS) {\n\t\tconst candidate = step * magnitude\n\t\tif (value <= candidate) {\n\t\t\treturn candidate\n\t\t}\n\t}\n\treturn 10 * magnitude\n}\n\n/**\n * Calendar fields of an aggregation bucket key: `2026`, `2026-08`, `2026-08-10`,\n * and any of those with a `T`/space time part, optional millis, and an optional\n * `Z`/±offset suffix. Anchored, so a shape this does not model (a quarter key\n * like `2026-Q1`) falls through to the Date constructor instead of being\n * mis-parsed as its year alone.\n */\nconst BUCKET_KEY_RE = /^(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?(?:[T ](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$/\n\n/**\n * Parse a bucket key into a Date carrying the key's OWN calendar fields, read in\n * local time so `toLocale*` renders back exactly what the key said.\n *\n * `new Date(key)` cannot be used directly: its assumed zone depends on the key's\n * FORMAT, so one axis mixed both. A date-only `2026-08-10` is UTC midnight per\n * spec, which a formatter west of UTC then renders as \"9 Aug\" — and a\n * `2026-01-01T00:00:00Z` year bucket renders as \"2025\" — while `2026-08-10\n * 14:00:00` is parsed as local and would break the other way if the whole axis\n * were simply formatted in UTC. Echoing the key's fields is right for either:\n * the backend mints these as period LABELS, not instants to be re-zoned.\n *\n * @param {string} key The bucket key from the aggregation response.\n * @return {Date|null} The parsed date, or null when the key is not a date at all.\n */\nfunction parseBucketKey(key) {\n\tconst m = BUCKET_KEY_RE.exec(String(key))\n\tif (!m) {\n\t\tconst parsed = new Date(key)\n\t\treturn Number.isNaN(parsed.getTime()) ? null : parsed\n\t}\n\treturn new Date(\n\t\tNumber(m[1]),\n\t\tNumber(m[2] || 1) - 1,\n\t\tNumber(m[3] || 1),\n\t\tNumber(m[4] || 0),\n\t\tNumber(m[5] || 0),\n\t\tNumber(m[6] || 0),\n\t)\n}\n\n/**\n * A theme colour by CSS variable name, as a literal: ApexCharts writes colours\n * into SVG attributes, where `var()` does not resolve.\n *\n * @param {string} name The variable, e.g. `--color-error`.\n * @param {string} fallback The colour when the variable is unset (or no DOM).\n * @return {string} The colour.\n */\nfunction themeColor(name, fallback) {\n\tif (typeof document === 'undefined' || typeof getComputedStyle !== 'function') {\n\t\treturn fallback\n\t}\n\tconst value = getComputedStyle(document.documentElement).getPropertyValue(name).trim()\n\treturn value || fallback\n}\n\n/** Event-bus channel CnWidgetWrapper's Refresh action broadcasts on. */\nconst REFRESH_BUS_CHANNEL = 'cn:widget:refresh'\n\n/**\n * Event-bus channel the PAGE-level Refresh action broadcasts on\n * (CnDashboardPage / CnDetailPage pass it to their CnActionsMenu).\n */\nconst PAGE_REFRESH_BUS_CHANNEL = 'cn:page:refresh'\n\n/**\n * Sentinel raw key of the folded \"Other\" bucket (Wave 3 aggregate top-N).\n * Never a real category value, so drilldown clicks on it are skipped.\n */\nconst OTHER_BUCKET_KEY = '__other__'\n\n/**\n * The raw key of an aggregate group as a string, '' for an empty one.\n *\n * @param {{key: (string|number|null|undefined)}} group The group.\n * @return {string}\n */\nfunction aggregateKeyOf(group) {\n\treturn group.key === null || group.key === undefined ? '' : String(group.key)\n}\n\n/**\n * The label a raw aggregate key shows without `labelResolve`.\n *\n * @param {string} key The raw key.\n * @return {string}\n */\nfunction aggregateLabelOf(key) {\n\treturn key === '' ? '—' : key\n}\n\n/**\n * Fold aggregate groups that carry the same label into one (`mergeByLabel`):\n * values summed, every raw key kept for the drilldown, the first colour\n * kept, sorted again by value.\n *\n * @param {Array<{key: (string|number|null), value: number}>} groups The groups.\n * @param {string[]} labels One label per group.\n * @param {Array<string|undefined>} colors One colour per group, or none.\n * @return {Array<{key: string, keys: string[], label: string, value: number, color?: string}>}\n */\nfunction mergeGroupsByLabel(groups, labels, colors) {\n\tconst byLabel = new Map()\n\tgroups.forEach((group, i) => {\n\t\tconst label = labels[i]\n\t\tconst key = aggregateKeyOf(group)\n\t\tconst entry = byLabel.get(label)\n\t\tif (entry) {\n\t\t\tentry.value += Number(group.value) || 0\n\t\t\tentry.keys.push(key)\n\t\t\tentry.color = entry.color || colors[i]\n\t\t} else {\n\t\t\tbyLabel.set(label, { key, keys: [key], label, value: Number(group.value) || 0, color: colors[i] })\n\t\t}\n\t})\n\treturn [...byLabel.values()].sort((a, b) => b.value - a.value)\n}\n\n/** Matrix text-cell tones a `colorMap` may name, as tint classes. */\nconst TONE_LEVELS = Object.freeze({ success: 'success', warning: 'warning', error: 'error', danger: 'danger' })\n\n/**\n * CnChartWidget — Chart component for dashboard widgets.\n *\n * Wraps ApexCharts with sensible defaults for Nextcloud theming.\n * Apps must install `apexcharts` and `vue-apexcharts` as dependencies.\n * Basic area chart\n * ```vue\n * <CnChartWidget\n * type=\"area\"\n * :series=\"[{ name: 'Searches', data: [10, 41, 35, 51] }]\"\n * :categories=\"['Mon', 'Tue', 'Wed', 'Thu']\"\n * :height=\"250\" />\n * Pie chart\n * <CnChartWidget\n * type=\"pie\"\n * :series=\"[44, 55, 13]\"\n * :labels=\"['Active', 'Pending', 'Closed']\" />\n * With custom options\n * <CnChartWidget\n * type=\"bar\"\n * :series=\"barSeries\"\n * :options=\"{ plotOptions: { bar: { horizontal: true } } }\" />\n * ```\n *\n * Manifest usage — when CnDashboardPage's widget dispatcher sees\n * `widgetDef.type === 'chart'` it mounts CnChartWidget automatically,\n * forwarding `widgetDef.props.chartKind` as the `type` prop and\n * `series` / `categories` / `labels` / `options` / `colors` / `toolbar` /\n * `legend` / `height` / `width` / `unavailableLabel` directly. Manifest\n * authors do NOT mount this component themselves — declare a chart\n * widget in `pages[].config.widgets[]` instead. See CnDashboardPage's\n * leading docblock for the manifest example.\n */\n/**\n * A value formatter for a `valueFormat`: 'currency' | 'currency-compact' |\n * 'percent' | 'number', or the object form `{ name, currency?,\n * decimals?, suffix? }`. Non-numeric values pass through. Null for no format.\n *\n * @param {string|object|null} vf The value format.\n * @return {((value: unknown) => unknown)|null} The formatter.\n */\nfunction formatterFor(vf) {\n\tif (!vf) {\n\t\treturn null\n\t}\n\tconst name = typeof vf === 'string' ? vf : vf.name\n\tconst currency = safeCurrencyCode(typeof vf === 'object' ? vf.currency : undefined)\n\tconst decimals = (typeof vf === 'object' && Number.isFinite(vf.decimals)) ? vf.decimals : null\n\tconst suffix = typeof vf === 'object' && typeof vf.suffix === 'string' ? vf.suffix : ''\n\tconst numeric = (v, fmt) => {\n\t\tconst num = Number(v)\n\t\treturn Number.isFinite(num) ? fmt(num) : v\n\t}\n\tif (name === 'currency') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tstyle: 'currency',\n\t\t\tcurrency,\n\t\t\tminimumFractionDigits: decimals ?? 0,\n\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t}).format(num))\n\t}\n\tif (name === 'currency-compact') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tstyle: 'currency',\n\t\t\tcurrency,\n\t\t\tnotation: 'compact',\n\t\t\tmaximumFractionDigits: decimals ?? 1,\n\t\t}).format(num))\n\t}\n\tif (name === 'number') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tminimumFractionDigits: decimals ?? 0,\n\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t}).format(num) + suffix)\n\t}\n\tif (name === 'percent') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tminimumFractionDigits: decimals ?? 0,\n\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t}).format(num) + '%')\n\t}\n\treturn null\n}\n\nexport default {\n\tname: 'CnChartWidget',\n\n\tcomponents: { CnEndpointNotice, NcNoteCard },\n\n\tinject: {\n\t\t/**\n\t\t * Reactive date-range provided by an ancestor `CnDashboardPage`.\n\t\t * When the dashboard's `dateRange.enabled` is `true`, the ref's\n\t\t * value is `{ from, to, preset }`; otherwise it stays `null`.\n\t\t * The widget passes this through to `useDataSource` so the\n\t\t * bucket shorthand's `fromVar` / `toVar` GraphQL variables\n\t\t * track the dashboard's range automatically.\n\t\t *\n\t\t * Default factory: `() => ref(null)`. This keeps isolated\n\t\t * mounts (Storybook, jest with `shallowMount`) safe — there's\n\t\t * always a ref to inject, even outside a dashboard.\n\t\t */\n\t\tcnDashboardDateRange: { default: () => ref(null) },\n\t\t/**\n\t\t * Host translate function provided by CnAppRoot: manifest-authored\n\t\t * view labels and series names are i18n keys (screens-dashboard-i18n).\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Chart type: area, line, bar, pie, donut, radialBar, or one of the\n\t\t * two drawn without ApexCharts: `bar-list` (a labelled track per\n\t\t * category, the value at the end) and `matrix` (a series per row, a\n\t\t * category per column, each cell tinted by its value).\n\t\t *\n\t\t * @type {string}\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'area',\n\t\t\tvalidator: (v) => ['area', 'line', 'bar', 'pie', 'donut', 'radialBar', 'bar-list', 'matrix'].includes(v),\n\t\t},\n\n\t\t/**\n\t\t * The value a full `bar-list` track stands for (100 for percentages).\n\t\t * Null, the default, takes the largest value.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\tbarMax: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A `matrix`'s row-label column width in px. Null, the default, sizes\n\t\t * the column to its longest label (at least 120px); a width wraps a\n\t\t * long label instead (DqProcesanalyse \"Dagen per fase\": 240).\n\t\t *\n\t\t * @spec openspec/changes/chart-matrix-label-width/specs/chart-matrix-label-width/spec.md#requirement-a-matrix-can-give-its-row-labels-a-fixed-width\n\t\t */\n\t\tmatrixLabelWidth: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A toned note card under the chart whose words carry values from the\n\t\t * page record: `{ lead?, text?, values?, labels?, tone? }`. `lead`\n\t\t * (bold) and `text` go through the host's translate, then each\n\t\t * `{name}` is filled from `values[name]`, a literal or a token such as\n\t\t * `@object.recommendedIntervention`. `labels[name]` turns a key into\n\t\t * words: `\"rows\"`, `\"columns\"` or `\"values\"` read the matrix's\n\t\t * cellSource label maps, an object is its own map. `tone` is info\n\t\t * (default), success, warning or error. Hidden while a value is\n\t\t * missing, so a half-filled sentence never shows.\n\t\t *\n\t\t * @spec openspec/changes/chart-notice/specs/chart-notice/spec.md#requirement-a-chart-can-carry-a-notice-with-record-values\n\t\t */\n\t\tnotice: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A line under the chart (\"Klik een balk om de zaken te zien\"),\n\t\t * through the host's translate: under the rows of a `bar-list` or\n\t\t * `matrix`, and under the plot of an ApexCharts type.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\tfootnote: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Horizontal reference lines on the value axis of a line, area or bar\n\t\t * chart, such as a norm: `[{ value, label?, color? }]`. Drawn dashed;\n\t\t * the label goes through the host's translate. The colour defaults to\n\t\t * the theme's error colour. `valuePath` reads the value from the\n\t\t * endpoint answer instead, `{value}` in the label writes it, and a\n\t\t * line without a value is not drawn.\n\t\t *\n\t\t * @type {Array<{value?: number, valuePath?: string, label?: string, color?: string}>}\n\t\t */\n\t\treferenceLines: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * How date categories read on the x-axis: `month` (\"jan\") or\n\t\t * `month-year` (\"jan 2026\"), in the user's language. A category that\n\t\t * is not a date is shown as is. Empty shows the categories unchanged.\n\t\t *\n\t\t * `week` writes an ISO week key (`2026-W40`) as \"w40\".\n\t\t *\n\t\t * @type {''|'month'|'month-year'|'week'}\n\t\t */\n\t\tcategoryFormat: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The `matrix` cell to outline, usually the record's on a detail page:\n\t\t * `{ row, column, columnKeys? }`, where `row` and `column` take tokens\n\t\t * such as `@object.behaviour`.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\thighlight: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * `matrix`: read the cells from records that each hold one cell, in\n\t\t * a register: `{ register, schema, filter?, rowField, columnField,\n\t\t * valueField, rowLabelField?, columnLabelField?, rowLabels?,\n\t\t * columnLabels?, valueLabels?, rowOrder?, columnOrder?, rowOrderField?,\n\t\t * columnOrderField?, limit? }`. `filter` takes tokens such as\n\t\t * `@object.matrixVersion`; the list waits while one is unresolved.\n\t\t * With `cellsPath` the matrix sits inside ONE record instead: the\n\t\t * first record `filter` finds (else `fallbackFilter`), its array at\n\t\t * `cellsPath` narrowed by `cellFilter` (tokens allowed), the axis\n\t\t * order from `rowOrderPath` / `columnOrderPath` on that record.\n\t\t * Wins over `series` / `categories`.\n\t\t *\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-records\n\t\t */\n\t\tcellSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Chart data series. Format depends on chart type.\n\t\t * For line/area/bar: [{ name: string, data: number[] }]\n\t\t * For pie/donut: number[]\n\t\t *\n\t\t * @type {Array}\n\t\t */\n\t\tseries: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * X-axis categories (for line, area, bar charts)\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tcategories: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Labels (for pie, donut charts)\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tlabels: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Chart height. A number (or `'250px'`) pins the height in pixels. A\n\t\t * percentage — `'100%'` — fits the chart to its container instead, which\n\t\t * is what a fixed-height surface such as a dashboard tile wants: a\n\t\t * pinned height taller than the tile turns the tile into a scroll\n\t\t * region. `'auto'` derives the height from the width (16:10 for axis\n\t\t * charts). Container fitting needs an ancestor with a resolved height.\n\t\t *\n\t\t * @type {number|string}\n\t\t */\n\t\theight: {\n\t\t\ttype: [Number, String],\n\t\t\tdefault: 250,\n\t\t},\n\n\t\t/**\n\t\t * Chart width. Defaults to '100%' (fills container).\n\t\t *\n\t\t * @type {number|string}\n\t\t */\n\t\twidth: {\n\t\t\ttype: [Number, String],\n\t\t\tdefault: '100%',\n\t\t},\n\n\t\t/**\n\t\t * Custom ApexCharts options (deep-merged with defaults).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\toptions: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Chart color palette. Defaults to Nextcloud theme colors.\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tcolors: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Show or hide the toolbar (zoom, download, etc.)\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\ttoolbar: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Show or hide the legend\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tlegend: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Label shown when ApexCharts is not available\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tunavailableLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Chart library not available'),\n\t\t},\n\n\t\t/**\n\t\t * Render bar charts horizontally (row bars instead of columns).\n\t\t * Only meaningful for `type: \"bar\"`; an explicit\n\t\t * `options.plotOptions.bar.horizontal` still wins (deep-merge).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\thorizontal: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * How the value axis picks its baseline — the guard against a chart\n\t\t * that turns a trivial difference into a dramatic one.\n\t\t *\n\t\t * - `\"auto\"` (default) — anchor magnitude marks (bar / area) at zero,\n\t\t * and stop line charts from zooming so far in that noise fills the\n\t\t * plot. Never clamps when the data goes negative.\n\t\t * - `\"zero\"` — always anchor at zero (ignored when data goes negative).\n\t\t * - `\"fit\"` — the old behaviour: let ApexCharts frame the data range.\n\t\t * Use for series that live far from zero (a percentage hovering\n\t\t * 95–99, a temperature) where a zero baseline flattens the signal.\n\t\t *\n\t\t * An explicit `options.yaxis.min` / `max` still wins through the\n\t\t * deep-merge.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tvalueAxisBaseline: {\n\t\t\ttype: String,\n\t\t\tdefault: 'auto',\n\t\t\tvalidator: (v) => ['auto', 'zero', 'fit'].includes(v),\n\t\t},\n\n\t\t/**\n\t\t * Legend placement override: `top | bottom | left | right`. Empty (the\n\t\t * default) keeps the pre-existing automatic placement (bottom for\n\t\t * pie-family charts, top otherwise).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tlegendPosition: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator: (v) => ['', 'top', 'bottom', 'left', 'right'].includes(v),\n\t\t},\n\n\t\t/**\n\t\t * Named value formatter applied to the VALUE axis labels and the\n\t\t * tooltip: `\"currency\"` (Intl currency, 0 decimals), `\"currency-compact\"`\n\t\t * (compact notation, e.g. `€ 1,2K`), or `\"percent\"` (appends `%`). The\n\t\t * object form `{ name, currency?, decimals? }` overrides the ISO-4217\n\t\t * currency code (EUR default, guarded) and the fraction digits.\n\t\t * `null` (the default) keeps raw values.\n\t\t *\n\t\t * @type {string|{name: string, currency?: string, decimals?: number}|null}\n\t\t */\n\t\tvalueFormat: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Per-category colour map (`{ categoryLabel: cssColor }`) applied to\n\t\t * pie / donut / radialBar slices and (distributed) bar categories.\n\t\t * Categories without an entry keep the default palette colour. `null`\n\t\t * (the default) keeps the palette-based colouring.\n\t\t *\n\t\t * @type {Record<string, string>|null}\n\t\t */\n\t\tcolorMap: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Empty-state message rendered INSTEAD of the chart when the resolved\n\t\t * series contain no data points. Empty (the default) keeps the\n\t\t * pre-existing behaviour (an empty chart canvas).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\temptyLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * `matrix`: the text of a cell without a value (\"geen\"), through the\n\t\t * host's translate. Empty (the default) leaves the cell blank.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\temptyCellLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Manifest dataSource block. When set, `series` /\n\t\t * `categories` / `labels` are resolved from the GraphQL\n\t\t * response via the dataSource selectors and override the\n\t\t * static props of the same names. Static props remain the\n\t\t * fallback while the query is loading or when no\n\t\t * dataSource is configured.\n\t\t *\n\t\t * Supported shapes (one of):\n\t\t * - Count shorthand: `{ register?, schema, filter?, aggregate: 'count' }`\n\t\t * - Bucket shorthand: `{ register?, schema, filter?,\n\t\t * bucket: { field, interval, metric?, metricField?,\n\t\t * fromVar?, toVar?, staticRange? } }` — emits OR's\n\t\t * `groupBy` argument. When mounted under a CnDashboardPage\n\t\t * with `dateRange.enabled`, `from` / `to` come from the\n\t\t * injected `cnDashboardDateRange` ref; otherwise they come\n\t\t * from `bucket.staticRange`. If neither is available no\n\t\t * query is fired and the chart shows its fallback.\n\t\t * - Raw GraphQL: `{ graphql: { query, variables?, selectors } }`.\n\t\t * - Aggregation shorthand (Wave 3, #91): `aggregate` as an OBJECT —\n\t\t * `{ groupBy, metric?: 'count'|'sum', sumField?, topN?,\n\t\t * otherBucket?, labelResolve?: { register?, schema, labelField?,\n\t\t * colorField? } }` — a categorical group-by over the schema's\n\t\t * objects. Served by OpenRegister's `/grouped` facet endpoint\n\t\t * (the server aggregates); when that endpoint is unavailable the\n\t\t * widget falls back to fetching the collection and grouping\n\t\t * client-side. `topN` keeps the N largest groups (sorted by value\n\t\t * desc) and `otherBucket: true` folds the remainder into a single\n\t\t * translated \"Other\" slice (sum of the rest). `labelResolve`\n\t\t * swaps reference (uuid) group keys for the referenced objects'\n\t\t * `labelField` labels via the shared object store (per-id cache +\n\t\t * request dedup — the fkResolve pattern), and `colorField` reads a\n\t\t * per-category colour off each referenced object (feeding the\n\t\t * same per-category colour path as the `colorMap` prop, which\n\t\t * wins on overlap). `metric: 'sum'` requires `sumField`.\n\t\t * `mergeByLabel: true` folds groups whose labels read the same\n\t\t * into one, summed, before `topN`; a merged bar drills down with\n\t\t * all its keys as a list.\n\t\t *\n\t\t * Drilldown (Wave 3, #91): a sibling `drilldown: { route,\n\t\t * filterParam }` block makes every segment / bar click navigate to\n\t\t * `route` (a route NAME, or a PATH when it starts with `/`) with\n\t\t * the clicked category's RAW key in the query —\n\t\t * `{ [filterParam]: rawKey }` — so an index page opens pre-filtered.\n\t\t * The folded \"Other\" bucket never navigates (it has no single\n\t\t * category value).\n\t\t *\n\t\t * @type {{\n\t\t * register?: string,\n\t\t * schema?: string,\n\t\t * filter?: object,\n\t\t * aggregate?: ('count'|{ groupBy: string, metric?: string, sumField?: string, topN?: number, otherBucket?: boolean, mergeByLabel?: boolean, labelResolve?: { register?: string, schema: string, labelField?: string, colorField?: string } }),\n\t\t * drilldown?: { route: string, filterParam: string },\n\t\t * bucket?: { field: string, interval: string, metric?: string, metricField?: string, fromVar?: string, toVar?: string, staticRange?: { from: string, to: string } },\n\t\t * graphql?: { query: string, variables?: object, selectors: object }\n\t\t * }|null}\n\t\t */\n\t\tdataSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Endpoint data binding (Wave 2, #91). Reads `series` / `categories` /\n\t\t * `labels` from an arbitrary app REST endpoint through the shared\n\t\t * `useEndpointSource` engine (token-resolved `params`, per-(url+params)\n\t\t * request dedup + short-TTL cache, `cn:page:refresh` subscription).\n\t\t * Exactly one of `dataSource` | `endpointSource` (validator-enforced);\n\t\t * endpoint data wins when both slip through. Static `series` /\n\t\t * `categories` / `labels` props stay the fallback while loading.\n\t\t *\n\t\t * The response mapping keys live INSIDE this block (not as sibling\n\t\t * props) because the flat `series` / `labels` prop names already carry\n\t\t * the static data:\n\t\t * - `responsePath` — dot-path pluck of the payload (default whole body).\n\t\t * - When the payload is an ARRAY of points (e.g. pipelinq\n\t\t * `/api/analytics/trends` → `series: [{ date, value }]` with\n\t\t * `responsePath: 'series'`): `labelsPath` / `series[].path` are\n\t\t * PER-ITEM field paths — `labelsPath: 'date'`,\n\t\t * `series: [{ name: 'Leads', path: 'value' }]`.\n\t\t * - When the payload is an OBJECT: `labelsPath` / `series[].path`\n\t\t * point at parallel arrays — `labelsPath: 'labels'`,\n\t\t * `series: [{ name: 'Total', path: 'totals' }]`.\n\t\t *\n\t\t * Pie-family charts (`pie` / `donut` / `radialBar`) flatten the FIRST\n\t\t * mapped series into the flat value array ApexCharts expects. `params`\n\t\t * values use the shared filter-token grammar (`@workspace.dateFrom?`,\n\t\t * `@workspace.datePreset?`, `@me`, `@today±Nd`, …) and re-resolve +\n\t\t * refetch automatically when the dashboard date range changes (the\n\t\t * page publishes `dateFrom` / `dateTo` / `datePreset` into the\n\t\t * workspace context).\n\t\t *\n\t\t * `series[].namePath` names a series from the whole response (before\n\t\t * `responsePath`), for an endpoint that says what its numbers measure.\n\t\t *\n\t\t * @type {{url: string, method?: string, params?: object, responsePath?: string, labelsPath?: string, series?: Array<{name?: string, namePath?: string, path: string}>}|null}\n\t\t */\n\t\tendpointSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * In-widget view switcher (the Wave-4 amendment folded into Wave 3,\n\t\t * #91): each entry declares a named display view —\n\t\t * `{ key, label?, series?, valueFormat? }`. When 2+ views are\n\t\t * configured a compact pill row renders above the chart; the active\n\t\t * view's `series` (an array of series NAMES) filters which of the\n\t\t * resolved cartesian series render, and its `valueFormat` overrides\n\t\t * the widget-level `valueFormat` (same named-formatter grammar).\n\t\t * This is PURE DISPLAY — no series arithmetic — covering the €/%\n\t\t * and hours/% toggles (shillinq Margin / BillableHours) with zero\n\t\t * client-side computation. Empty (the default) renders no switcher.\n\t\t *\n\t\t * @type {Array<{key: string, label?: string, series?: string[], valueFormat?: (string|object)}>}\n\t\t */\n\t\tviews: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Widget id used to match `cn:widget:refresh` event-bus events\n\t\t * (broadcast by CnWidgetWrapper's Refresh action). When the bus\n\t\t * fires with a matching `widgetId`, the chart re-queries its\n\t\t * `dataSource`. Passed by CnDashboardPage from the layout item.\n\t\t * Empty disables bus-driven refresh (the chart still refetches\n\t\t * reactively when its dataSource / range changes).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\t// useDataSource is a no-op when `dataSource` is null/undefined\n\t\t// — it never fires a request and always resolves `data.value`\n\t\t// to null, so the static `series`/`categories`/`labels` props\n\t\t// remain the source of truth in that case.\n\t\t//\n\t\t// We pipe the injected `cnDashboardDateRange` ref through as\n\t\t// the `range` source; useDataSource only reads it for the\n\t\t// bucket shorthand, so the other shorthand forms are\n\t\t// unaffected.\n\t\t//\n\t\t// Inject is also exposed via Options API (above), but reading\n\t\t// it again here in setup ensures we hand the SAME ref to\n\t\t// useDataSource — Vue treats inject() within setup and the\n\t\t// Options `inject:` declaration as the same resolution.\n\t\tconst range = inject('cnDashboardDateRange', null) || ref(null)\n\t\t// The `bucket` (time), `groupBy` (category), and OBJECT-form\n\t\t// `aggregate` (Wave 3) shorthands are fetched over REST by this\n\t\t// component (fetchTimeBucket / fetchGroupBy / fetchAggregateSource)\n\t\t// against OpenRegister's /timeseries + /grouped aggregation\n\t\t// endpoints — the GraphQL bucket path is bypassed. Hide those shapes\n\t\t// from useDataSource so it stays a no-op for them (raw `graphql` /\n\t\t// the STRING `aggregate: 'count'` still flow through it).\n\t\tconst dsForGraphql = () => {\n\t\t\tconst ds = props.dataSource\n\t\t\tif (ds && (ds.bucket || ds.groupBy)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (ds && ds.aggregate && typeof ds.aggregate === 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn ds\n\t\t}\n\t\tconst { data, refetch } = useDataSource(dsForGraphql, { range })\n\n\t\t// Endpoint binding (Wave 2, #91): the shared useEndpointSource engine\n\t\t// resolves `params` tokens against the page-level workspace context\n\t\t// (the dashboard publishes dateFrom / dateTo / datePreset into it), so\n\t\t// a date-range change re-resolves + refetches automatically. No-op\n\t\t// while `endpointSource` is null. The chart's existing\n\t\t// cn:widget:refresh handler routes through refresh() (which also\n\t\t// re-runs this source), so no widgetId is passed here — the composable\n\t\t// still covers cn:page:refresh.\n\t\tconst objectCtxRaw = inject('cnObjectContext', null)\n\t\t// v2 slot-grid detail context (CnPageRenderer holder) — backfills the\n\t\t// object token context so `@objectId` / `@object.<field>` params\n\t\t// resolve on detail surfaces where CnDetailPage is not an ancestor\n\t\t// (the ZGW sidebar-tab contract, #91 Wave 3).\n\t\tconst detailCtxRaw = inject('cnDetailObjectContext', null)\n\t\tconst workspaceRaw = inject('cnWorkspaceContext', ref({}))\n\t\tconst appConfigRaw = inject('cnAppConfig', ref({}))\n\t\tconst unwrap = (v) => ((v && typeof v === 'object' && 'value' in v) ? v.value : v)\n\t\t// One token context for EVERY declarative binding on this widget —\n\t\t// the endpoint params AND the REST-aggregation source filters, so\n\t\t// `@objectId` / `@object.<field>` / `@workspace.<key>` /\n\t\t// `@config.<key>` resolve identically in both (#91 Wave 3).\n\t\tconst chartTokenCtx = () => ({\n\t\t\t...(resolveObjectTokenContext(objectCtxRaw, detailCtxRaw) || {}),\n\t\t\tworkspace: unwrap(workspaceRaw) || {},\n\t\t\tconfig: unwrap(appConfigRaw) || {},\n\t\t})\n\t\tconst ep = useEndpointSource(\n\t\t\t() => props.endpointSource,\n\t\t\t{ ctx: chartTokenCtx },\n\t\t)\n\t\treturn { dsData: data, dsRefetch: refetch, epData: ep.data, epBody: ep.body, epError: ep.error, epRefused: ep.refused, epTruncated: ep.truncated, epBlocked: ep.blocked, epAwaitingRequest: ep.awaitingRequest, epRequest: ep.request, epRefetch: ep.refetch, chartTokenCtx }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tchartComponent: null,\n\t\t\t// Series/categories resolved from a categorical `dataSource.groupBy`\n\t\t\t// (REST /grouped) or a time `dataSource.bucket` (REST /timeseries),\n\t\t\t// kept separate from the raw-GraphQL path (`dsData`). Null until the\n\t\t\t// respective source resolves.\n\t\t\tgroupByData: null,\n\t\t\tbucketData: null,\n\t\t\t// Series/categories resolved from the OBJECT-form\n\t\t\t// `dataSource.aggregate` (Wave 3, #91): server /grouped facet with\n\t\t\t// a client-side collection fallback, top-N + Other folding, and\n\t\t\t// fkResolve-style label/colour resolution. Shape when resolved:\n\t\t\t// `{ series, categories, labels, rawKeys, colorMap? }` — `rawKeys`\n\t\t\t// carries the UNRESOLVED group keys (uuids / raw values) so a\n\t\t\t// `drilldown` click navigates with the filterable value, not the\n\t\t\t// display label.\n\t\t\taggregateData: null,\n\t\t\t// The `cellSource` matrix, laid out (`{ series, categories, columnKeys }`), or null.\n\t\t\tcellData: null,\n\t\t\t// Active `views[]` switcher key (null = the first view). Local\n\t\t\t// UI state only — never persisted.\n\t\t\tactiveViewKey: null,\n\t\t\t// Pre-translated aria-label for the views pill group, evaluated\n\t\t\t// once at creation (data, not computed — matches the dashboard\n\t\t\t// date-chip convention).\n\t\t\tviewsGroupLabel: t('nextcloud-vue', 'Chart view'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Whether `height` asks the chart to fit its container (a percentage)\n\t\t * rather than pin a pixel height. Switches the root to a flex column\n\t\t * with a leftover-sized canvas box so apexcharts' own percentage maths\n\t\t * resolves against the available space.\n\t\t *\n\t\t * @return {boolean} true for a percentage height.\n\t\t */\n\t\tfitToContainer() {\n\t\t\treturn typeof this.height === 'string' && this.height.trim().endsWith('%')\n\t\t},\n\n\t\tcomputedHeight() {\n\t\t\treturn this.height\n\t\t},\n\n\t\tcomputedWidth() {\n\t\t\treturn this.width\n\t\t},\n\n\t\t/**\n\t\t * Series/categories/labels mapped from a resolved `endpointSource`\n\t\t * payload (Wave 2), or null while the source is absent / unresolved.\n\t\t *\n\t\t * Mapping rules (see the `endpointSource` prop docblock):\n\t\t * - ARRAY payload → `labelsPath` / `series[].path` are per-item field\n\t\t * paths (one point per array item).\n\t\t * - OBJECT payload → they point at parallel arrays.\n\t\t * - Pie-family types flatten the first mapped series into the flat\n\t\t * value array ApexCharts expects.\n\t\t * - `rowsPath` names an array of rows, one series each: the series'\n\t\t * name at `rowLabelPath` (default `label`), its values at\n\t\t * `rowValuesPath` (default `values`).\n\t\t *\n\t\t * @return {{series: Array, categories: Array<string>, labels: Array<string>}|null}\n\t\t */\n\t\tendpointChartData() {\n\t\t\tconst es = this.endpointSource\n\t\t\tif (!es || !es.url) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst payload = this.epData\n\t\t\tif (payload === null || payload === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst seriesDefs = Array.isArray(es.series) ? es.series.filter((s) => s && s.path) : []\n\t\t\tlet labels = []\n\t\t\tlet mapped\n\t\t\tif (es.rowsPath) {\n\t\t\t\treturn this.endpointRows(payload, es)\n\t\t\t}\n\t\t\tif (Array.isArray(payload)) {\n\t\t\t\tif (es.labelsPath) {\n\t\t\t\t\tlabels = payload.map((pt) => {\n\t\t\t\t\t\tconst v = getByPath(pt, es.labelsPath)\n\t\t\t\t\t\treturn (v === null || v === undefined) ? '' : String(v)\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tmapped = seriesDefs.map((s) => ({\n\t\t\t\t\tname: this.endpointSeriesName(s),\n\t\t\t\t\tdata: payload.map((pt) => Number(getByPath(pt, s.path)) || 0),\n\t\t\t\t}))\n\t\t\t} else {\n\t\t\t\tconst rawLabels = es.labelsPath ? getByPath(payload, es.labelsPath) : undefined\n\t\t\t\tlabels = Array.isArray(rawLabels)\n\t\t\t\t\t? rawLabels.map((v) => ((v === null || v === undefined) ? '' : String(v)))\n\t\t\t\t\t: []\n\t\t\t\tmapped = seriesDefs.map((s) => {\n\t\t\t\t\tconst values = getByPath(payload, s.path)\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: this.endpointSeriesName(s),\n\t\t\t\t\t\tdata: Array.isArray(values) ? values.map((v) => Number(v) || 0) : [],\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn { series: (mapped[0] && mapped[0].data) || [], categories: labels, labels }\n\t\t\t}\n\t\t\treturn { series: mapped, categories: labels, labels }\n\t\t},\n\n\t\t/**\n\t\t * Series shown to ApexCharts. An `endpointSource` (Wave 2) wins,\n\t\t * then the REST aggregate/bucket/groupBy data, then `dsData.series`\n\t\t * from a GraphQL `dataSource`; otherwise falls back to the static\n\t\t * `series` prop. Same fallback rule applies to `categories`\n\t\t * and `labels`.\n\t\t */\n\t\tresolvedSeries() {\n\t\t\tif (this.cellData) {\n\t\t\t\treturn this.cellData.series\n\t\t\t}\n\t\t\tconst ep = this.endpointChartData\n\t\t\tif (ep) {\n\t\t\t\treturn ep.series\n\t\t\t}\n\t\t\tconst rest = this.aggregateData || this.bucketData || this.groupByData\n\t\t\tif (rest?.series !== undefined) {\n\t\t\t\treturn rest.series\n\t\t\t}\n\t\t\tconst fromDs = this.dsData?.series\n\t\t\treturn fromDs !== undefined ? fromDs : this.series\n\t\t},\n\n\t\tresolvedCategories() {\n\t\t\tif (this.cellData) {\n\t\t\t\treturn this.cellData.categories\n\t\t\t}\n\t\t\tconst ep = this.endpointChartData\n\t\t\tif (ep) {\n\t\t\t\treturn ep.categories\n\t\t\t}\n\t\t\tconst rest = this.aggregateData || this.bucketData || this.groupByData\n\t\t\tif (rest?.categories !== undefined) {\n\t\t\t\treturn rest.categories\n\t\t\t}\n\t\t\tconst fromDs = this.dsData?.categories\n\t\t\treturn fromDs !== undefined ? fromDs : this.categories\n\t\t},\n\n\t\tresolvedLabels() {\n\t\t\tif (this.cellData) {\n\t\t\t\treturn this.cellData.categories\n\t\t\t}\n\t\t\tconst ep = this.endpointChartData\n\t\t\tif (ep) {\n\t\t\t\treturn ep.labels\n\t\t\t}\n\t\t\tconst rest = this.aggregateData || this.bucketData || this.groupByData\n\t\t\tif (rest?.labels !== undefined) {\n\t\t\t\treturn rest.labels\n\t\t\t}\n\t\t\tconst fromDs = this.dsData?.labels\n\t\t\treturn fromDs !== undefined ? fromDs : this.labels\n\t\t},\n\n\t\t/**\n\t\t * The OBJECT-form `dataSource.aggregate` block (Wave 3), or null —\n\t\t * the STRING form (`aggregate: 'count'`) stays on the GraphQL path.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\taggregateDef() {\n\t\t\tconst agg = this.dataSource && this.dataSource.aggregate\n\t\t\treturn (agg && typeof agg === 'object' && agg.groupBy) ? agg : null\n\t\t},\n\n\t\t/**\n\t\t * The `dataSource.drilldown` block (Wave 3) when it is actionable —\n\t\t * both `route` and `filterParam` set — else null.\n\t\t *\n\t\t * @return {{route: string, filterParam: string}|null}\n\t\t */\n\t\tdrilldownDef() {\n\t\t\tconst d = this.dataSource && this.dataSource.drilldown\n\t\t\treturn (d && d.route && d.filterParam) ? d : null\n\t\t},\n\n\t\t/**\n\t\t * The RAW (unresolved) category keys backing the rendered\n\t\t * slices/bars, index-aligned with the resolved labels — what a\n\t\t * drilldown click puts in the route query. Aggregate and groupBy\n\t\t * data carry explicit `rawKeys`; other paths fall back to the\n\t\t * display labels/categories (raw == label there).\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tdrilldownKeys() {\n\t\t\tconst rest = this.aggregateData || this.groupByData\n\t\t\tif (rest && Array.isArray(rest.rawKeys)) {\n\t\t\t\treturn rest.rawKeys\n\t\t\t}\n\t\t\tconst keys = ['pie', 'donut', 'radialBar'].includes(this.type)\n\t\t\t\t? this.resolvedLabels\n\t\t\t\t: this.resolvedCategories\n\t\t\treturn Array.isArray(keys) ? keys.map((k) => String(k)) : []\n\t\t},\n\n\t\t/** Stable signature of the aggregate source (else null). */\n\t\taggregateKey() {\n\t\t\tconst agg = this.aggregateDef\n\t\t\tif (!agg || !this.dataSource.schema) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn JSON.stringify({\n\t\t\t\tregister: this.dataSource.register || '',\n\t\t\t\tschema: this.dataSource.schema,\n\t\t\t\tfilter: this.dataSource.filter || {},\n\t\t\t\taggregate: agg,\n\t\t\t})\n\t\t},\n\n\t\t/** Stable signature of a categorical groupBy source (else null). */\n\t\tgroupByKey() {\n\t\t\tconst gb = this.dataSource && this.dataSource.groupBy\n\t\t\tif (!gb || !this.dataSource.schema) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn JSON.stringify({\n\t\t\t\tregister: this.dataSource.register || '',\n\t\t\t\tschema: this.dataSource.schema,\n\t\t\t\tfilter: this.dataSource.filter || {},\n\t\t\t\tgroupBy: gb,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The injected dashboard date range as a plain `{from, to, preset}`\n\t\t * object, or null.\n\t\t *\n\t\t * Vue 3 auto-unwraps a ref reached through the Options `inject:`\n\t\t * declaration, so `this.cnDashboardDateRange` is ALREADY the value and\n\t\t * reading `.value` off it yields undefined. That deref survived the\n\t\t * Vue 2.7 → Vue 3 move and pinned every bucket chart to its fallback\n\t\t * window — while the chip label, which reads the value correctly, kept\n\t\t * updating. Still tolerates a raw ref, for a consumer that provides one\n\t\t * outside the Options inject path.\n\t\t *\n\t\t * @return {{from: string, to: string, preset?: string}|null} The active range.\n\t\t */\n\t\tactiveRange() {\n\t\t\tconst r = this.cnDashboardDateRange\n\t\t\tif (!r || typeof r !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn ('value' in r) ? (r.value || null) : r\n\t\t},\n\n\t\t/** Stable signature of a time-bucket source + the active range (else null). */\n\t\tbucketKey() {\n\t\t\tconst b = this.dataSource && this.dataSource.bucket\n\t\t\tif (!b || !this.dataSource.schema) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst r = this.activeRange\n\t\t\treturn JSON.stringify({\n\t\t\t\tregister: this.dataSource.register || '',\n\t\t\t\tschema: this.dataSource.schema,\n\t\t\t\tfilter: this.dataSource.filter || {},\n\t\t\t\tbucket: b,\n\t\t\t\trange: r ? { from: r.from, to: r.to } : null,\n\t\t\t})\n\t\t},\n\n\t\tdefaultColors() {\n\t\t\tif (this.colors.length > 0) {\n\t\t\t\treturn this.colors\n\t\t\t}\n\t\t\t// Element tokens stay bright in dark mode, where the plain status\n\t\t\t// tokens are dark background tints. Each falls back for Nextcloud < 32.\n\t\t\treturn [\n\t\t\t\t'var(--color-primary-element, #0082c9)',\n\t\t\t\t'var(--color-element-success, var(--color-success, #46ba61))',\n\t\t\t\t'var(--color-element-warning, var(--color-warning, #e9a300))',\n\t\t\t\t'var(--color-element-error, var(--color-error, #e04224))',\n\t\t\t\t'var(--color-text-maxcontrast, #767676)',\n\t\t\t\t'var(--color-element-info, #0099e0)',\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * The active `views[]` entry: the one matching `activeViewKey`,\n\t\t * else the FIRST configured view, else null (no switcher).\n\t\t *\n\t\t * @return {{key: string, label?: string, series?: string[], valueFormat?: (string|object)}|null}\n\t\t */\n\t\tactiveView() {\n\t\t\tif (!Array.isArray(this.views) || this.views.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn this.views.find((v) => v && v.key === this.activeViewKey) || this.views[0]\n\t\t},\n\n\t\t/**\n\t\t * The series actually handed to ApexCharts: the resolved series,\n\t\t * filtered to the active view's named `series` when the view\n\t\t * declares any (cartesian charts only — pie-family series are flat\n\t\t * value arrays with no names to filter on). Falls back to the full\n\t\t * resolved series when the filter matches nothing, so a typo'd view\n\t\t * never blanks the chart.\n\t\t *\n\t\t * @return {Array} The displayed series.\n\t\t */\n\t\t/**\n\t\t * The displayed series with each series name through the host\n\t\t * translate function, so a manifest series named \"Revenue\" reads in\n\t\t * the user's language in the legend and the tooltip. Views still\n\t\t * filter on the name as written (`displayedSeries`).\n\t\t *\n\t\t * @spec openspec/changes/screens-dashboard-i18n/specs/dashboard-page/spec.md#requirement-chart-view-labels-and-series-names-are-translated\n\t\t * @return {Array} The series handed to ApexCharts.\n\t\t */\n\t\tplottedSeries() {\n\t\t\tconst series = this.displayedSeries\n\t\t\tif (!Array.isArray(series)) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\treturn series.map((entry) => (entry && typeof entry === 'object' && typeof entry.name === 'string' && entry.name !== '')\n\t\t\t\t? { ...entry, name: this.hostTranslate(entry.name) }\n\t\t\t\t: entry)\n\t\t},\n\n\t\tdisplayedSeries() {\n\t\t\tconst series = this.resolvedSeries\n\t\t\tconst view = this.activeView\n\t\t\tif (!view || !Array.isArray(view.series) || view.series.length === 0) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\tif (!Array.isArray(series)) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\tconst filtered = series.filter((s) => s && view.series.includes(s.name))\n\t\t\treturn filtered.length > 0 ? filtered : series\n\t\t},\n\n\t\t/**\n\t\t * Every plotted number across the displayed series, flattened.\n\t\t * Handles both cartesian (`[{name, data: []}]`) and flat\n\t\t * (`[1, 2, 3]`) series shapes, and all three datapoint forms\n\t\t * ApexCharts accepts: a bare number, `{x, y}`, and `[x, y]`.\n\t\t * Non-numeric entries are dropped.\n\t\t *\n\t\t * @return {number[]} The plotted values.\n\t\t */\n\t\tplottedValues() {\n\t\t\tconst out = []\n\t\t\tconst push = (v) => {\n\t\t\t\t// A datapoint's VALUE is `y` — the second slot in the tuple form.\n\t\t\t\t// Without the tuple case an `[x, y]` series read as all-NaN and\n\t\t\t\t// dropped every point, which silently disabled `valueAxisBounds`.\n\t\t\t\tlet raw = v\n\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\traw = v[1]\n\t\t\t\t} else if (typeof v === 'object' && v !== null) {\n\t\t\t\t\traw = v.y\n\t\t\t\t}\n\t\t\t\tconst n = Number(raw)\n\t\t\t\tif (Number.isFinite(n)) {\n\t\t\t\t\tout.push(n)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const s of (Array.isArray(this.displayedSeries) ? this.displayedSeries : [])) {\n\t\t\t\tif (Array.isArray(s)) {\n\t\t\t\t\ts.forEach(push)\n\t\t\t\t} else if (s && Array.isArray(s.data)) {\n\t\t\t\t\ts.data.forEach(push)\n\t\t\t\t} else {\n\t\t\t\t\tpush(s)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * Value-axis bounds that keep a small difference looking small.\n\t\t *\n\t\t * ApexCharts frames the data range by default, so a series of 7 and 6\n\t\t * renders as a full-height drop — the reader sees a collapse where the\n\t\t * data says \"one fewer\". Bar and area encode magnitude by length and\n\t\t * area, so their baseline MUST be zero or the mark misstates the ratio;\n\t\t * line encodes position, so it may sit off zero but still shouldn't\n\t\t * zoom until noise fills the plot.\n\t\t *\n\t\t * Returns null to leave ApexCharts' own scaling alone — for pie-family\n\t\t * charts, `\"fit\"`, empty data, any series that goes negative (where\n\t\t * clamping to zero would crop real values), and stacked charts.\n\t\t *\n\t\t * Stacked is the subtle one: `plottedValues` flattens INDIVIDUAL\n\t\t * datapoints, but a stacked mark's height is the per-category SUM, which is\n\t\t * larger — two series of [6, 7] and [5, 4] reach 11 against a ceiling of\n\t\t * niceCeil(7) = 8, so the bars would clip. ApexCharts already baselines\n\t\t * stacked charts at zero, so deferring to it costs only the rounded\n\t\t * headroom, not the honest baseline. There is no `stacked` prop; it arrives\n\t\t * via `options.chart.stacked`, which the deep-merge honours.\n\t\t *\n\t\t * @return {{min: number, max: number}|null} Axis bounds, or null to autoscale.\n\t\t */\n\t\tvalueAxisBounds() {\n\t\t\tif (this.valueAxisBaseline === 'fit') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (this.options?.chart?.stacked) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst values = this.plottedValues\n\t\t\tif (values.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\t// A single pass, not `Math.min(...values)`: the spread passes one\n\t\t\t// ARGUMENT per datapoint, which throws RangeError once the series\n\t\t\t// outgrows the engine's argument limit (~65k). Minute buckets over\n\t\t\t// the 12-month window `fetchTimeBucket` falls back to reach that.\n\t\t\tlet dataMin = values[0]\n\t\t\tlet dataMax = values[0]\n\t\t\tfor (const v of values) {\n\t\t\t\tif (v < dataMin) {\n\t\t\t\t\tdataMin = v\n\t\t\t\t}\n\t\t\t\tif (v > dataMax) {\n\t\t\t\t\tdataMax = v\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Negative values: a zero floor would crop them. Leave the framing\n\t\t\t// to ApexCharts, which already spans zero for magnitude marks.\n\t\t\tif (dataMin < 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\t// A flat all-zero series has no scale to infer — give it a token\n\t\t\t// ceiling so the axis renders instead of collapsing.\n\t\t\tif (dataMax === 0) {\n\t\t\t\treturn { min: 0, max: 1 }\n\t\t\t}\n\t\t\tconst zeroBaseline = this.valueAxisBaseline === 'zero'\n\t\t\t\t|| ['bar', 'area'].includes(this.type)\n\t\t\tif (zeroBaseline) {\n\t\t\t\treturn { min: 0, max: niceCeil(dataMax) }\n\t\t\t}\n\t\t\t// Line/scatter: keep a non-zero baseline, but require the visible\n\t\t\t// window to cover at least a quarter of the data's magnitude so a\n\t\t\t// 1-in-1000 wiggle can't fill the plot.\n\t\t\tconst spread = dataMax - dataMin\n\t\t\tconst minSpread = dataMax * 0.25\n\t\t\tif (spread >= minSpread) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst pad = (minSpread - spread) / 2\n\t\t\treturn { min: Math.max(0, dataMin - pad), max: niceCeil(dataMax + pad) }\n\t\t},\n\n\t\t/**\n\t\t * The value-formatter function derived from `valueFormat` (the\n\t\t * active `views[]` entry's `valueFormat` wins when set), or null.\n\t\t * Applied to the value-axis labels and the tooltip so both read\n\t\t * identically. Non-numeric values pass through untouched.\n\t\t *\n\t\t * @return {((value: unknown) => string)|null}\n\t\t */\n\t\tvalueFormatterFn() {\n\t\t\treturn formatterFor((this.activeView && this.activeView.valueFormat) || this.valueFormat)\n\t\t},\n\n\t\t/**\n\t\t * The effective per-category colour map: the explicit `colorMap`\n\t\t * prop wins; otherwise the map an aggregate `labelResolve.colorField`\n\t\t * built from the referenced objects (Wave 3). Null when neither is\n\t\t * available.\n\t\t *\n\t\t * @return {Record<string, string>|null}\n\t\t */\n\t\teffectiveColorMap() {\n\t\t\tif (this.colorMap && typeof this.colorMap === 'object') {\n\t\t\t\treturn this.colorMap\n\t\t\t}\n\t\t\tconst fromAggregate = this.aggregateData && this.aggregateData.colorMap\n\t\t\treturn (fromAggregate && typeof fromAggregate === 'object') ? fromAggregate : null\n\t\t},\n\n\t\t/**\n\t\t * Palette with the effective per-category colour map applied: one\n\t\t * colour per resolved label/category (map hit, else the default\n\t\t * palette colour by position). Null when no map is set or nothing\n\t\t * resolved yet — the default palette then applies unchanged.\n\t\t *\n\t\t * @return {string[]|null}\n\t\t */\n\t\tmappedColors() {\n\t\t\tconst map = this.effectiveColorMap\n\t\t\tif (!map) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst keys = ['pie', 'donut', 'radialBar'].includes(this.type)\n\t\t\t\t? this.resolvedLabels\n\t\t\t\t: this.resolvedCategories\n\t\t\tif (!Array.isArray(keys) || keys.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst palette = this.defaultColors\n\t\t\treturn keys.map((key, i) => map[key] || palette[i % palette.length])\n\t\t},\n\n\t\t/**\n\t\t * Whether the resolved series carry any data point (pie-family charts\n\t\t * use a flat value array; cartesian charts use `[{ data: [...] }]`).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChartData() {\n\t\t\tconst series = this.resolvedSeries\n\t\t\tif (!Array.isArray(series) || series.length === 0) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn series.some((s) => Array.isArray(s && s.data) && s.data.length > 0)\n\t\t},\n\n\t\t/**\n\t\t * Whether the declarative empty state renders instead of the chart —\n\t\t * only when an `emptyLabel` is configured (default keeps the\n\t\t * pre-existing empty-canvas behaviour).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowEmptyState() {\n\t\t\treturn this.emptyLabel !== '' && !this.hasChartData\n\t\t},\n\n\t\t/**\n\t\t * The `cellSource` list as it would be asked, tokens resolved, or null\n\t\t * while there is none or a filter token is unresolved. Refetches when\n\t\t * it changes.\n\t\t *\n\t\t * @return {string|null} The key.\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-records\n\t\t */\n\t\tcellSourceKey() {\n\t\t\tconst src = this.cellSource\n\t\t\tif (!src || typeof src !== 'object' || !src.register || !src.schema || !src.rowField || !src.columnField || !src.valueField) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst ctx = this.chartTokenCtx()\n\t\t\tconst resolve = (value) => resolveFilterTokens(value && typeof value === 'object' ? value : {}, ctx)\n\t\t\tconst filter = resolve(src.filter)\n\t\t\tconst cellFilter = resolve(src.cellFilter)\n\t\t\tif (hasUnresolvedTokens(filter) || hasUnresolvedTokens(cellFilter)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst fallbackFilter = src.fallbackFilter ? resolve(src.fallbackFilter) : null\n\t\t\treturn JSON.stringify({ register: src.register, schema: src.schema, filter, fallbackFilter, cellFilter, limit: src.cellsPath ? 1 : (src.limit || 500) })\n\t\t},\n\n\t\t/** @return {string} The matrix row-label column's grid track. */\n\t\tmatrixLabelColumn() {\n\t\t\tconst width = Number(this.matrixLabelWidth)\n\t\t\treturn Number.isFinite(width) && width > 0 ? `${width}px` : 'minmax(120px, max-content)'\n\t\t},\n\n\t\t/**\n\t\t * The rows of a `bar-list`: the categories of the first displayed\n\t\t * series, each with its value's share of `barMax` (or the largest\n\t\t * value) and the formatted value.\n\t\t *\n\t\t * @return {Array<{index: number, label: string, share: number, text: string, drill: boolean}>}\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\tbarListRows() {\n\t\t\tconst series = Array.isArray(this.plottedSeries) ? this.plottedSeries[0] : null\n\t\t\tconst values = Array.isArray(series?.data) ? series.data.map((v) => Number(v) || 0) : []\n\t\t\tconst labels = Array.isArray(this.resolvedCategories) ? this.resolvedCategories : []\n\t\t\tconst max = Number.isFinite(this.barMax) && this.barMax > 0 ? this.barMax : Math.max(0, ...values)\n\t\t\tconst drill = Boolean(this.drilldownDef && this.$router)\n\t\t\treturn values.map((value, index) => ({\n\t\t\t\tindex,\n\t\t\t\tlabel: String(labels[index] ?? ''),\n\t\t\t\tshare: max > 0 ? Math.min(100, Math.max(0, (value / max) * 100)) : 0,\n\t\t\t\ttext: this.formatPlain(value),\n\t\t\t\tdrill: drill && this.drilldownKeys[index] !== undefined && this.drilldownKeys[index] !== OTHER_BUCKET_KEY,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The `matrix`: the categories as columns, each displayed series as a\n\t\t * row, and each cell's tint level (1 to 4) by its share of the\n\t\t * largest value.\n\t\t *\n\t\t * @return {{columns: string[], rows: Array<{label: string, cells: Array<{text: string, level: number}>}>}}\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\tmatrix() {\n\t\t\tconst columns = (Array.isArray(this.resolvedCategories) ? this.resolvedCategories : []).map((c) => this.hostTranslate(String(c)))\n\t\t\tconst series = Array.isArray(this.plottedSeries) ? this.plottedSeries.filter((entry) => entry && typeof entry === 'object') : []\n\t\t\tconst max = Math.max(0, ...series.flatMap((entry) => (Array.isArray(entry.data) ? entry.data.map((v) => Number(v) || 0) : [])))\n\t\t\tconst levelOf = (value) => {\n\t\t\t\tconst share = max > 0 ? value / max : 0\n\t\t\t\tif (share >= 0.9) {\n\t\t\t\t\treturn 4\n\t\t\t\t}\n\t\t\t\tif (share >= 0.6) {\n\t\t\t\t\treturn 3\n\t\t\t\t}\n\t\t\t\treturn share >= 0.25 ? 2 : 1\n\t\t\t}\n\t\t\tconst map = this.effectiveColorMap || {}\n\t\t\tconst current = this.matrixHighlight\n\t\t\treturn {\n\t\t\t\tcolumns,\n\t\t\t\trows: series.map((entry, rowIndex) => ({\n\t\t\t\t\tlabel: this.hostTranslate(String(entry.name ?? '')),\n\t\t\t\t\tcells: columns.map((column, index) => {\n\t\t\t\t\t\tconst raw = Array.isArray(entry.data) ? entry.data[index] : undefined\n\t\t\t\t\t\tconst isCurrent = current !== null && current.row === rowIndex && current.column === index\n\t\t\t\t\t\tconst valueLabels = this.cellSource && typeof this.cellSource.valueLabels === 'object' ? this.cellSource.valueLabels : null\n\t\t\t\t\t\tif (valueLabels && raw !== null && raw !== undefined && typeof valueLabels[String(raw)] === 'string') {\n\t\t\t\t\t\t\tconst label = valueLabels[String(raw)]\n\t\t\t\t\t\t\tconst tone = map[String(raw)] || map[label]\n\t\t\t\t\t\t\tconst level = TONE_LEVELS[tone] ?? 0\n\t\t\t\t\t\t\treturn { text: this.hostTranslate(label), level: level || 'tone', color: level ? '' : (tone || ''), current: isCurrent }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof raw === 'string') {\n\t\t\t\t\t\t\tconst tone = map[raw]\n\t\t\t\t\t\t\tconst level = TONE_LEVELS[tone] ?? 0\n\t\t\t\t\t\t\treturn { text: this.hostTranslate(raw), level: level || 'tone', color: level ? '' : (tone || ''), current: isCurrent }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst value = Number(raw)\n\t\t\t\t\t\treturn Number.isFinite(value) && raw !== null && raw !== undefined\n\t\t\t\t\t\t\t? { text: this.formatPlain(value), level: levelOf(value), color: '', current: isCurrent }\n\t\t\t\t\t\t\t: { text: this.emptyCellLabel ? this.hostTranslate(this.emptyCellLabel) : '', level: 0, color: '', current: isCurrent }\n\t\t\t\t\t}),\n\t\t\t\t})),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The notice's bold lead, text and note-card type, values filled in;\n\t\t * null when there is none or a value is missing.\n\t\t *\n\t\t * @return {{lead: string, text: string, type: string}|null} The notice.\n\t\t * @spec openspec/changes/chart-notice/specs/chart-notice/spec.md#requirement-a-chart-can-carry-a-notice-with-record-values\n\t\t */\n\t\tnoticeParts() {\n\t\t\tconst def = this.notice\n\t\t\tif (!def || typeof def !== 'object' || (!def.lead && !def.text)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst declared = def.values && typeof def.values === 'object' ? def.values : {}\n\t\t\tconst resolved = resolveFilterTokens(declared, this.chartTokenCtx())\n\t\t\tconst source = this.cellSource && typeof this.cellSource === 'object' ? this.cellSource : {}\n\t\t\tconst maps = { rows: source.rowLabels, columns: source.columnLabels, values: source.valueLabels }\n\t\t\tconst words = {}\n\t\t\tfor (const name of Object.keys(declared)) {\n\t\t\t\tconst raw = resolved[name]\n\t\t\t\tif (raw === null || raw === undefined || raw === '' || (typeof raw === 'string' && raw.charAt(0) === '@')) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\tconst ref = def.labels && def.labels[name]\n\t\t\t\tconst map = typeof ref === 'string' ? maps[ref] : ref\n\t\t\t\tconst label = map && typeof map === 'object' && typeof map[String(raw)] === 'string' ? map[String(raw)] : null\n\t\t\t\twords[name] = label ? this.hostTranslate(label) : String(raw)\n\t\t\t}\n\t\t\tconst fill = (key) => (key ? this.hostTranslate(key).replace(/\\{(\\w+)\\}/g, (match, name) => (name in words ? words[name] : match)) : '')\n\t\t\tconst type = ['info', 'success', 'warning', 'error'].includes(def.tone) ? def.tone : 'info'\n\t\t\treturn { lead: fill(def.lead), text: fill(def.text), type }\n\t\t},\n\n\t\t/**\n\t\t * The matrix cell of the record (`highlight: { row, column }`, tokens\n\t\t * such as `@object.behaviour` resolved), as row and column indexes. A\n\t\t * row matches its series `key`, its name or its 1-based position; a\n\t\t * column its entry in `highlight.columnKeys`, its label or its\n\t\t * 1-based position. Null when either does not match.\n\t\t *\n\t\t * @return {{row: number, column: number}|null} The cell.\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\tmatrixHighlight() {\n\t\t\tconst def = this.highlight\n\t\t\tif (!def || typeof def !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst resolved = resolveFilterTokens({ row: def.row, column: def.column }, this.chartTokenCtx())\n\t\t\tconst want = (v) => (v === null || v === undefined || v === '' ? null : String(v))\n\t\t\tconst row = want(resolved.row)\n\t\t\tconst column = want(resolved.column)\n\t\t\tif (row === null || column === null) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst series = Array.isArray(this.plottedSeries) ? this.plottedSeries : []\n\t\t\tconst rowIndex = series.findIndex((entry, i) => entry && (String(entry.key ?? '') === row || String(entry.name ?? '') === row || String(i + 1) === row))\n\t\t\tconst columns = Array.isArray(this.resolvedCategories) ? this.resolvedCategories.map((c) => String(c)) : []\n\t\t\tconst declared = Array.isArray(def.columnKeys) ? def.columnKeys : (this.cellData ? this.cellData.columnKeys : [])\n\t\t\tconst keys = declared.map((k) => String(k))\n\t\t\tlet columnIndex = keys.indexOf(column)\n\t\t\tif (columnIndex < 0) {\n\t\t\t\tcolumnIndex = columns.findIndex((c, i) => c === column || String(i + 1) === column)\n\t\t\t}\n\t\t\treturn rowIndex >= 0 && columnIndex >= 0 ? { row: rowIndex, column: columnIndex } : null\n\t\t},\n\n\t\t/** @return {string} The matrix table's accessible name. */\n\t\tmatrixLabel() {\n\t\t\treturn this.footnote ? this.hostTranslate(this.footnote) : t('nextcloud-vue', 'Chart data')\n\t\t},\n\n\t\t/**\n\t\t * The x-axis categories as shown: with `categoryFormat`, date\n\t\t * categories as short months in the user's language.\n\t\t *\n\t\t * @return {Array<string|number>} The categories.\n\t\t */\n\t\tdisplayCategories() {\n\t\t\tconst categories = Array.isArray(this.resolvedCategories) ? this.resolvedCategories : []\n\t\t\tif (this.categoryFormat === 'week') {\n\t\t\t\treturn categories.map((category) => {\n\t\t\t\t\tconst week = /^\\d{4}-W(\\d{1,2})$/.exec(String(category))\n\t\t\t\t\treturn week ? t('nextcloud-vue', 'w{week}', { week: Number(week[1]) }) : category\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (this.categoryFormat !== 'month' && this.categoryFormat !== 'month-year') {\n\t\t\t\treturn categories\n\t\t\t}\n\t\t\tconst options = this.categoryFormat === 'month' ? { month: 'short' } : { month: 'short', year: 'numeric' }\n\t\t\treturn categories.map((category) => {\n\t\t\t\t// A year bucket (\"2026\") names no month, so it stays as written.\n\t\t\t\tif (/^\\d{4}$/.test(String(category))) {\n\t\t\t\t\treturn category\n\t\t\t\t}\n\t\t\t\tconst date = typeof category === 'string' || typeof category === 'number' ? parseBucketKey(category) : null\n\t\t\t\treturn date ? date.toLocaleDateString(userLocale(), options) : category\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The `referenceLines` as ApexCharts annotations: dashed, labelled,\n\t\t * in the theme's error colour unless a line names its own.\n\t\t *\n\t\t * @return {Array<object>} The annotations, possibly empty.\n\t\t */\n\t\treferenceAnnotations() {\n\t\t\t// A line with `valuePath` reads its value from the endpoint answer\n\t\t\t// (DqDoorlooptijd's norm); one without a usable value is not drawn.\n\t\t\tconst valueOf = (line) => {\n\t\t\t\tif (typeof line.valuePath === 'string' && line.valuePath !== '') {\n\t\t\t\t\tconst raw = this.epData ? getByPath(this.epData, line.valuePath) : null\n\t\t\t\t\treturn raw === null || raw === undefined || raw === '' ? NaN : Number(raw)\n\t\t\t\t}\n\t\t\t\treturn Number(line.value)\n\t\t\t}\n\t\t\tconst lines = (Array.isArray(this.referenceLines) ? this.referenceLines : [])\n\t\t\t\t.filter((line) => line && Number.isFinite(valueOf(line)))\n\t\t\tif (lines.length === 0) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst fallback = themeColor('--color-error', '#e04224')\n\t\t\treturn lines.map((line) => {\n\t\t\t\tconst color = line.color || fallback\n\t\t\t\tconst value = valueOf(line)\n\t\t\t\treturn {\n\t\t\t\t\ty: value,\n\t\t\t\t\tx: value,\n\t\t\t\t\tborderColor: color,\n\t\t\t\t\tstrokeDashArray: 6,\n\t\t\t\t\tlabel: line.label\n\t\t\t\t\t\t? { text: this.hostTranslate(line.label).replace(/\\{value\\}/g, String(value)), borderColor: color, style: { color: '#fff', background: color } }\n\t\t\t\t\t\t: { text: '' },\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tmergedOptions() {\n\t\t\tconst isPieType = ['pie', 'donut', 'radialBar'].includes(this.type)\n\n\t\t\tconst defaults = {\n\t\t\t\tchart: {\n\t\t\t\t\ttype: this.type,\n\t\t\t\t\ttoolbar: { show: this.toolbar },\n\t\t\t\t\tzoom: { enabled: false },\n\t\t\t\t\tfontFamily: 'var(--default-font, system-ui, sans-serif)',\n\t\t\t\t\tforeColor: 'var(--color-main-text, #222)',\n\t\t\t\t\tbackground: 'transparent',\n\t\t\t\t},\n\n\t\t\t\tcolors: this.mappedColors || this.defaultColors,\n\t\t\t\tstroke: {\n\t\t\t\t\tcurve: 'smooth',\n\t\t\t\t\twidth: this.type === 'area' ? 2 : (this.type === 'bar' ? 0 : 2),\n\t\t\t\t},\n\n\t\t\t\tfill: this.type === 'area'\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttype: 'gradient',\n\t\t\t\t\t\t\tgradient: {\n\t\t\t\t\t\t\t\tshade: 'light',\n\t\t\t\t\t\t\t\ttype: 'vertical',\n\t\t\t\t\t\t\t\topacityFrom: 0.5,\n\t\t\t\t\t\t\t\topacityTo: 0.1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: { opacity: 1 },\n\n\t\t\t\tgrid: {\n\t\t\t\t\tborderColor: 'var(--color-border, #ededed)',\n\t\t\t\t\tstrokeDashArray: 4,\n\t\t\t\t},\n\n\t\t\t\tlegend: {\n\t\t\t\t\tshow: this.legend,\n\t\t\t\t\tposition: this.legendPosition || (isPieType ? 'bottom' : 'top'),\n\t\t\t\t\tlabels: {\n\t\t\t\t\t\tcolors: 'var(--color-main-text, #222)',\n\t\t\t\t\t},\n\t\t\t\t},\n\n\t\t\t\tdataLabels: {\n\t\t\t\t\tenabled: isPieType,\n\t\t\t\t},\n\n\t\t\t\ttooltip: {\n\t\t\t\t\t// Nominal: it only decides which class apexcharts stamps on\n\t\t\t\t\t// the tooltip, and BOTH of its themes are restyled with\n\t\t\t\t\t// Nextcloud tokens in this component's stylesheet. Neither\n\t\t\t\t\t// apexcharts theme is theme-responsive on its own — see the\n\t\t\t\t\t// `apexcharts-tooltip` block at the bottom of <style>.\n\t\t\t\t\ttheme: 'light',\n\t\t\t\t},\n\t\t\t}\n\n\t\t\t// Named value formatter (currency / currency-compact / percent) —\n\t\t\t// applied to the tooltip and, below, to the VALUE axis so both read\n\t\t\t// identically. An explicit `options.tooltip/xaxis/yaxis` formatter\n\t\t\t// still wins through the deep-merge.\n\t\t\tif (this.valueFormatterFn) {\n\t\t\t\tdefaults.tooltip.y = { formatter: this.valueFormatterFn }\n\t\t\t}\n\n\t\t\t// Drilldown (Wave 3, #91): a segment / bar click navigates to the\n\t\t\t// configured route with the clicked category's RAW key in the\n\t\t\t// query. Wired through ApexCharts' own selection event so it\n\t\t\t// works identically for pie slices and (distributed) bars; the\n\t\t\t// cursor hint makes the affordance visible. An explicit\n\t\t\t// `options.chart.events` still wins through the deep-merge.\n\t\t\tif (this.drilldownDef && this.$router) {\n\t\t\t\tdefaults.chart.events = {\n\t\t\t\t\tdataPointSelection: this.onDataPointSelection,\n\t\t\t\t\tdataPointMouseEnter: (event) => {\n\t\t\t\t\t\tif (event && event.target) {\n\t\t\t\t\t\t\tevent.target.style.cursor = 'pointer'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add categories for cartesian charts\n\t\t\tif (!isPieType) {\n\t\t\t\tif (this.resolvedCategories.length > 0) {\n\t\t\t\t\tdefaults.xaxis = {\n\t\t\t\t\t\tcategories: this.displayCategories,\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tcolors: 'var(--color-text-maxcontrast, #767676)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t\tdefaults.yaxis = {\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tcolors: 'var(--color-text-maxcontrast, #767676)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The value formatter and the baseline guard apply to EVERY\n\t\t\t\t// cartesian chart, not only a categorical one: a series of\n\t\t\t\t// `{x, y}` datapoints (or `[x, y]` tuples) needs no `categories`,\n\t\t\t\t// and while these lived inside the block above such a chart\n\t\t\t\t// ignored even an explicit `valueAxisBaseline=\"zero\"`. The axis\n\t\t\t\t// object is created on demand so a chart that had no `xaxis` /\n\t\t\t\t// `yaxis` default before still gets none unless it needs one.\n\t\t\t\tconst bounds = this.valueAxisBounds\n\t\t\t\tif (this.valueFormatterFn || bounds) {\n\t\t\t\t\t// The VALUE axis is the y-axis normally, the x-axis when bars\n\t\t\t\t\t// render horizontally (ApexCharts flips the axes).\n\t\t\t\t\tconst axisKey = (this.type === 'bar' && this.horizontal) ? 'xaxis' : 'yaxis'\n\t\t\t\t\tconst valueAxis = defaults[axisKey] || (defaults[axisKey] = {})\n\t\t\t\t\tif (this.valueFormatterFn) {\n\t\t\t\t\t\tvalueAxis.labels = { ...valueAxis.labels, formatter: this.valueFormatterFn }\n\t\t\t\t\t}\n\t\t\t\t\t// Baseline guard — see `valueAxisBounds`. `forceNiceScale` keeps\n\t\t\t\t\t// the ticks on round numbers rather than slicing the span into\n\t\t\t\t\t// fractions (a 0–8 count axis ticks 0/2/4/6/8, not 0/1.6/3.2/…).\n\t\t\t\t\tif (bounds) {\n\t\t\t\t\t\tvalueAxis.min = bounds.min\n\t\t\t\t\t\tvalueAxis.max = bounds.max\n\t\t\t\t\t\tvalueAxis.forceNiceScale = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Reference lines, such as a norm, on the value axis.\n\t\t\tif (!isPieType && this.referenceAnnotations.length > 0) {\n\t\t\t\tconst axisKey = (this.type === 'bar' && this.horizontal) ? 'xaxis' : 'yaxis'\n\t\t\t\tdefaults.annotations = { [axisKey]: this.referenceAnnotations }\n\t\t\t}\n\n\t\t\t// Add labels for pie/donut\n\t\t\tif (isPieType && this.resolvedLabels.length > 0) {\n\t\t\t\tdefaults.labels = this.resolvedLabels\n\t\t\t}\n\n\t\t\t// Bar-specific defaults\n\t\t\tif (this.type === 'bar') {\n\t\t\t\tdefaults.plotOptions = {\n\t\t\t\t\tbar: {\n\t\t\t\t\t\thorizontal: this.horizontal,\n\t\t\t\t\t\tcolumnWidth: '55%',\n\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t// Per-category colours need distributed bars — otherwise\n\t\t\t\t\t\t// apexcharts colours per SERIES and the map has no effect.\n\t\t\t\t\t\t...(this.mappedColors ? { distributed: true } : {}),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this.deepMerge(defaults, this.options)\n\t\t},\n\t},\n\n\twatch: {\n\t\tgroupByKey() {\n\t\t\tthis.fetchGroupBy()\n\t\t},\n\n\t\tbucketKey() {\n\t\t\tthis.fetchTimeBucket()\n\t\t},\n\n\t\taggregateKey() {\n\t\t\tthis.fetchAggregateSource()\n\t\t},\n\n\t\tcellSourceKey() {\n\t\t\tthis.fetchCells()\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// markRaw: `data()` is deeply reactive and would proxy the component.\n\t\tthis.chartComponent = markRaw(VueApexCharts)\n\t},\n\n\tmounted() {\n\t\tthis.fetchGroupBy()\n\t\tthis.fetchTimeBucket()\n\t\tthis.fetchAggregateSource()\n\t\tthis.fetchCells()\n\t\t// Subscribe to the widget Refresh bus (B3 event-bus opt-in mode)\n\t\t// FIRST, before the ResizeObserver early-return — environments\n\t\t// without ResizeObserver (jsdom) must still get the subscription.\n\t\tthis._onWidgetRefresh = (payload) => {\n\t\t\tif (!this.widgetId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (payload?.widgetId !== this.widgetId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.refresh()\n\t\t}\n\t\tsubscribe(REFRESH_BUS_CHANNEL, this._onWidgetRefresh)\n\n\t\t// Page-level Refresh means \"refresh everything on the page\", so it\n\t\t// carries no widgetId to match on. Without this the action reached ONLY\n\t\t// charts bound to an `endpointSource` — useEndpointSource subscribes to\n\t\t// this channel itself — while every chart fed by `dataSource` (the\n\t\t// bucket / group-by / aggregate REST paths) silently ignored it.\n\t\t//\n\t\t// It deliberately skips the endpoint half rather than calling refresh():\n\t\t// the composable already force-refetches on this same channel. A forced\n\t\t// fetch joins an in-flight one only when both carry the same refresh\n\t\t// payload, and refresh() carries none, so it would send a real duplicate.\n\t\tthis._onPageRefresh = (payload) => {\n\t\t\tconst done = this.refreshLocalSources()\n\t\t\tpayload?.waitUntil?.(done)\n\t\t}\n\t\tsubscribe(PAGE_REFRESH_BUS_CHANNEL, this._onPageRefresh)\n\n\t\tif (typeof ResizeObserver === 'undefined') {\n\t\t\treturn\n\t\t}\n\t\tthis._lastWidth = this.$el.offsetWidth\n\t\tthis._lastHeight = this.$el.offsetHeight\n\t\tthis._resizeTimer = null\n\t\tthis._resizeObserver = new ResizeObserver((entries) => {\n\t\t\tconst rect = entries[0]?.contentRect\n\t\t\tconst newWidth = rect?.width ?? this.$el.offsetWidth\n\t\t\tconst newHeight = rect?.height ?? this.$el.offsetHeight\n\t\t\t// A container-fitting chart must also re-render when only the\n\t\t\t// HEIGHT changes: apexcharts reads the parent's height once, at\n\t\t\t// create time, and its own re-measure hook is the window resize —\n\t\t\t// which a GridStack tile resize is not. This is also what recovers\n\t\t\t// a chart created while its tile had no height yet (percentage of\n\t\t\t// zero is zero), so it is correctness, not just resize polish.\n\t\t\t// Pinned-height charts keep the width-only behaviour: their height\n\t\t\t// never depends on the box.\n\t\t\tconst heightChanged = this.fitToContainer && newHeight !== this._lastHeight\n\t\t\tif (newWidth === this._lastWidth && !heightChanged) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis._lastWidth = newWidth\n\t\t\tthis._lastHeight = newHeight\n\t\t\tclearTimeout(this._resizeTimer)\n\t\t\tthis._resizeTimer = setTimeout(() => {\n\t\t\t\tthis.redrawForResize()\n\t\t\t}, 100)\n\t\t})\n\t\tthis._resizeObserver.observe(this.$el)\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this._resizeTimer)\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect()\n\t\t\tthis._resizeObserver = null\n\t\t}\n\t\tif (this._onWidgetRefresh) {\n\t\t\tunsubscribe(REFRESH_BUS_CHANNEL, this._onWidgetRefresh)\n\t\t\tthis._onWidgetRefresh = null\n\t\t}\n\t\tif (this._onPageRefresh) {\n\t\t\tunsubscribe(PAGE_REFRESH_BUS_CHANNEL, this._onPageRefresh)\n\t\t\tthis._onPageRefresh = null\n\t\t}\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * A manifest-authored label through the host translate function.\n\t\t *\n\t\t * @spec openspec/changes/screens-dashboard-i18n/specs/dashboard-page/spec.md#requirement-chart-view-labels-and-series-names-are-translated\n\t\t * @param {string} key The label.\n\t\t * @return {string} The translated label.\n\t\t */\n\t\t/**\n\t\t * The name of an endpoint series: the text at its `namePath` in the\n\t\t * whole response (so an endpoint can name what its numbers measure),\n\t\t * else its `name`, else its `path`.\n\t\t *\n\t\t * @param {{name?: string, namePath?: string, path: string}} def The series definition.\n\t\t * @return {string} The name.\n\t\t */\n\t\tendpointSeriesName(def) {\n\t\t\tif (def.namePath) {\n\t\t\t\tconst named = getByPath(this.epBody, def.namePath)\n\t\t\t\tif (typeof named === 'string' && named !== '') {\n\t\t\t\t\treturn named\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn def.name || def.path\n\t\t},\n\n\t\thostTranslate(key) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : null\n\t\t\tconst out = translate ? translate(key) : key\n\t\t\treturn (typeof out === 'string' && out !== '') ? out : key\n\t\t},\n\n\t\t/**\n\t\t * Re-query the chart's dataSource / endpointSource. Exposed as a\n\t\t * ref-callable method (B3 canonical refresh mode) AND invoked by the\n\t\t * `cn:widget:refresh` bus subscription. No-op when the chart has\n\t\t * neither (static series/labels mode). The endpoint refetch is\n\t\t * force-mode: it bypasses the shared useEndpointSource cache.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\trefresh() {\n\t\t\tthis.refreshLocalSources()\n\t\t\tif (typeof this.epRefetch === 'function') {\n\t\t\t\tthis.epRefetch()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Re-measure and redraw the chart after its box changed size, without\n\t\t * rebuilding it.\n\t\t *\n\t\t * `vue3-apexcharts`' `refresh()` is `destroy()` + `init()`: it throws the\n\t\t * ApexCharts instance away, builds a new one, and replays the entry\n\t\t * animation. With container-fitting charts now the dashboard default,\n\t\t * every GridStack layout settle ran that for every chart tile on the page.\n\t\t *\n\t\t * `_windowResize()` is the path ApexCharts itself uses for its own\n\t\t * parent/window resize observers: it flags the redraw as a resize (so the\n\t\t * entry animation does NOT replay) and calls `update()`, which re-runs\n\t\t * `setupElements` — the step that re-resolves a percentage height against\n\t\t * the parent — while keeping the instance and its listeners. It is\n\t\t * private, hence the capability check and the `refresh()` fallback; note\n\t\t * that the public `updateOptions()` is NOT usable here, because\n\t\t * ApexCharts skips an update whose options are identical to the last one\n\t\t * and a fitted chart's height stays the literal string `'100%'` on every\n\t\t * resize.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tredrawForResize() {\n\t\t\tconst apex = this.$refs.chart?.chart\n\t\t\tif (typeof apex?._windowResize === 'function') {\n\t\t\t\tapex._windowResize()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.$refs.chart?.refresh) {\n\t\t\t\tthis.$refs.chart.refresh()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Re-query every source this component fetches ITSELF: the `dataSource`\n\t\t * GraphQL path plus the three REST aggregations (time bucket, group-by,\n\t\t * aggregate). Excludes `endpointSource`, which useEndpointSource owns\n\t\t * and refetches on its own event-bus subscriptions — see the\n\t\t * page-refresh handler in `mounted()`.\n\t\t *\n\t\t * @return {Promise<unknown[]>} Settles when every re-query has.\n\t\t */\n\t\trefreshLocalSources() {\n\t\t\treturn Promise.all([\n\t\t\t\ttypeof this.dsRefetch === 'function' ? this.dsRefetch() : null,\n\t\t\t\tthis.fetchGroupBy(),\n\t\t\t\tthis.fetchTimeBucket(),\n\t\t\t\tthis.fetchAggregateSource(),\n\t\t\t\tthis.fetchCells(),\n\t\t\t])\n\t\t},\n\n\t\t/**\n\t\t * Fetch a time series from OpenRegister's REST `/timeseries` aggregation\n\t\t * when `dataSource.bucket` is set, mapping `{groups:[{key,value}]}` into\n\t\t * ApexCharts `series` + date `categories`. The window comes from the\n\t\t * dashboard date chip and is sent as-is; `bucket.staticRange` fills any\n\t\t * half the chip leaves empty, and a 12-month lookback covers the case\n\t\t * where neither supplies a bound. Replaces the GraphQL bucket path.\n\t\t * Lazily imports axios/router.\n\t\t *\n\t\t * @spec openspec/changes/add-dashboard-date-range-and-chart-bucket/specs/chart-bucket-data-source/spec.md\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync fetchTimeBucket() {\n\t\t\tconst ds = this.dataSource || {}\n\t\t\tconst b = ds.bucket\n\t\t\tif (!b || !b.field || !ds.schema) {\n\t\t\t\tthis.bucketData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Stale-response guard, same shape as `fetchAggregateSource`. The date\n\t\t\t// chip changes `bucketKey`, which re-enters here while the previous\n\t\t\t// request is still open; a narrower window usually answers faster, so\n\t\t\t// without this the slower WIDER series could land last and sit under\n\t\t\t// the new chip's label.\n\t\t\tconst requestKey = this.bucketKey\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\t// Resolve the [from, to] window: chip range, else staticRange,\n\t\t\t\t// else a 12-month lookback. The chip window is used VERBATIM —\n\t\t\t\t// an earlier revision widened any span under 90 days to a\n\t\t\t\t// 365-day lookback, which silently discarded the user's `from`\n\t\t\t\t// for every built-in preset (all are shorter than 90 days) and\n\t\t\t\t// left the chip label disagreeing with the plotted data.\n\t\t\t\tconst chip = this.activeRange || {}\n\t\t\t\tconst sr = b.staticRange || {}\n\t\t\t\tlet from = chip.from || sr.from || ''\n\t\t\t\tlet to = chip.to || sr.to || ''\n\t\t\t\t// A cleared (\"All\") range leaves both halves empty, but the OR\n\t\t\t\t// /timeseries endpoint 400s on a missing bound whenever\n\t\t\t\t// `interval` is set — so fall back to a 12-month lookback\n\t\t\t\t// rather than firing a request we know is rejected.\n\t\t\t\tif (!from || !to) {\n\t\t\t\t\tto = to || new Date().toISOString()\n\t\t\t\t\tfrom = from || new Date(new Date(to).getTime() - (365 * 86400000)).toISOString()\n\t\t\t\t}\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/aggregations/{register}/{schema}/timeseries',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = {\n\t\t\t\t\tfield: b.field,\n\t\t\t\t\tinterval: String(b.interval || 'month').toUpperCase(),\n\t\t\t\t\tmetric: b.metric || 'count',\n\t\t\t\t\tfrom,\n\t\t\t\t\tto,\n\t\t\t\t}\n\t\t\t\tif (b.metricField) {\n\t\t\t\t\tparams.metricField = b.metricField\n\t\t\t\t}\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object') {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`filter[${k}][${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[`filter[${k}]`] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tif (requestKey !== this.bucketKey) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst groups = (res && res.data && res.data.groups) || []\n\t\t\t\tconst categories = groups.map((g) => this.formatBucketKey(g.key, b.interval))\n\t\t\t\tconst values = groups.map((g) => Number(g.value) || 0)\n\t\t\t\tthis.bucketData = { series: [{ name: b.metricField || b.metric || 'count', data: values }], categories, labels: categories }\n\t\t\t} catch {\n\t\t\t\tif (requestKey === this.bucketKey) {\n\t\t\t\t\tthis.bucketData = null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Format a time-bucket key (ISO date) into a short axis label, at the\n\t\t * granularity of the bucket's own interval. Without the interval every\n\t\t * key rendered as month + year, so a day-bucketed week collapsed onto\n\t\t * one repeated label (\"Aug 26\" for all of August 2026).\n\t\t *\n\t\t * The year is added to day / week labels only when the bucket falls\n\t\t * outside the current year, mirroring `formatRangeLabel` on the\n\t\t * dashboard chip.\n\t\t *\n\t\t * @param {string} key The bucket key (ISO date string).\n\t\t * @param {string} [interval] Bucket interval (`minute|hour|day|week|month|quarter|year`, case-insensitive). Defaults to the month/year form.\n\t\t * @return {string} A short, locale-aware label.\n\t\t */\n\t\tformatBucketKey(key, interval) {\n\t\t\tif (!key) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst d = parseBucketKey(key)\n\t\t\tif (!d) {\n\t\t\t\treturn String(key)\n\t\t\t}\n\t\t\tconst thisYear = new Date().getFullYear()\n\t\t\tconst year = d.getFullYear() === thisYear ? {} : { year: 'numeric' }\n\t\t\tswitch (String(interval || '').toLowerCase()) {\n\t\t\t\tcase 'minute':\n\t\t\t\t\treturn d.toLocaleString(userLocale(), { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })\n\t\t\t\tcase 'hour':\n\t\t\t\t\treturn d.toLocaleString(userLocale(), { month: 'short', day: 'numeric', hour: '2-digit' })\n\t\t\t\tcase 'day':\n\t\t\t\tcase 'week':\n\t\t\t\t\treturn d.toLocaleDateString(userLocale(), { day: 'numeric', month: 'short', ...year })\n\t\t\t\tcase 'year':\n\t\t\t\t\treturn d.toLocaleDateString(userLocale(), { year: 'numeric' })\n\t\t\t\tdefault:\n\t\t\t\t\treturn d.toLocaleDateString(userLocale(), { month: 'short', year: '2-digit' })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Fetch a categorical breakdown from OpenRegister's REST `/grouped`\n\t\t * aggregation when `dataSource.groupBy` is set, mapping `{groups}` into\n\t\t * ApexCharts `series` + `categories`/`labels` (pie/donut use a flat\n\t\t * value array + labels; other types use one named series + categories).\n\t\t * No-op for the time-bucket (GraphQL) path. Lazily imports axios/router.\n\t\t *\n\t\t * @spec openspec/changes/add-dashboard-date-range-and-chart-bucket/specs/chart-bucket-data-source/spec.md\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync fetchGroupBy() {\n\t\t\tconst ds = this.dataSource || {}\n\t\t\tconst gb = ds.groupBy\n\t\t\tif (!gb || !gb.field || !ds.schema) {\n\t\t\t\tthis.groupByData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Stale-response guard — see `fetchTimeBucket`. This path has the extra\n\t\t\t// `resolveGroupByLabels` round trip after the fetch, so its window for\n\t\t\t// a filter-token change to overtake it is the wider of the two.\n\t\t\tconst requestKey = this.groupByKey\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/aggregations/{register}/{schema}/grouped',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = { groupBy: gb.field, metric: gb.metric || 'count' }\n\t\t\t\tif (gb.metricField) {\n\t\t\t\t\tparams.field = gb.metricField\n\t\t\t\t}\n\t\t\t\tif (gb.sort === 'asc' || gb.sort === 'desc') {\n\t\t\t\t\tparams.sort = gb.sort\n\t\t\t\t}\n\t\t\t\tif (gb.limit) {\n\t\t\t\t\tparams.limit = gb.limit\n\t\t\t\t}\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object') {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`filter[${k}][${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[`filter[${k}]`] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tif (requestKey !== this.groupByKey) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tlet groups = (res && res.data && res.data.groups) || []\n\t\t\t\t// Client-side sort + top-N (robust even if the backend ignored them).\n\t\t\t\tif (gb.sort === 'asc' || gb.sort === 'desc') {\n\t\t\t\t\tgroups = [...groups].sort((a, b) => (gb.sort === 'desc' ? b.value - a.value : a.value - b.value))\n\t\t\t\t}\n\t\t\t\tif (gb.limit) {\n\t\t\t\t\tgroups = groups.slice(0, gb.limit)\n\t\t\t\t}\n\t\t\t\tlet keys = groups.map((g) => (g.key === null || g.key === undefined ? '—' : String(g.key)))\n\t\t\t\t// Raw (unresolved) keys, index-aligned with the display labels —\n\t\t\t\t// a `dataSource.drilldown` click navigates with these (Wave 3).\n\t\t\t\tconst rawKeys = groups.map((g) => (g.key === null || g.key === undefined ? '' : String(g.key)))\n\t\t\t\tconst values = groups.map((g) => Number(g.value) || 0)\n\t\t\t\t// When the grouped field is a reference (uuid), swap the raw ids for\n\t\t\t\t// the referenced objects' display labels (e.g. client name).\n\t\t\t\tif (gb.reference && gb.reference.schema) {\n\t\t\t\t\tkeys = await this.resolveGroupByLabels(ds.register, gb.reference, groups)\n\t\t\t\t\tif (requestKey !== this.groupByKey) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\t\tthis.groupByData = { series: values, labels: keys, categories: keys, rawKeys }\n\t\t\t\t} else {\n\t\t\t\t\tthis.groupByData = { series: [{ name: gb.metricField || gb.metric || 'count', data: values }], categories: keys, labels: keys, rawKeys }\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tif (requestKey === this.groupByKey) {\n\t\t\t\t\tthis.groupByData = null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read the `cellSource` records and lay them out as the matrix: one\n\t\t * record per cell, or with `cellsPath` the cells inside one record. A\n\t\t * failed read leaves the matrix empty rather than showing stale\n\t\t * cells; an answer to an older request is dropped.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-records\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-one-record\n\t\t */\n\t\tasync fetchCells() {\n\t\t\tconst key = this.cellSourceKey\n\t\t\tif (key === null) {\n\t\t\t\tthis.cellData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst { register, schema, filter, fallbackFilter, cellFilter, limit } = JSON.parse(key)\n\t\t\tthis._cellRequest = key\n\t\t\tlet records = await fetchReferenceObjects({ register, schema, filter, limit }).catch(() => [])\n\t\t\tif (this.cellSource.cellsPath && records.length === 0 && fallbackFilter) {\n\t\t\t\trecords = await fetchReferenceObjects({ register, schema, filter: fallbackFilter, limit }).catch(() => [])\n\t\t\t}\n\t\t\tif (this._cellRequest !== key) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.cellSource.cellsPath) {\n\t\t\t\tconst { cells, config } = cellsFromRecord(records[0] || null, this.cellSource, cellFilter)\n\t\t\t\tthis.cellData = pivotCells(cells, config)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.cellData = pivotCells(records, this.cellSource)\n\t\t},\n\n\t\t/**\n\t\t * Resolve the OBJECT-form `dataSource.aggregate` (Wave 3, #91) into\n\t\t * chart data: a categorical group-by over the schema's objects with\n\t\t * top-N + Other folding and optional reference label/colour\n\t\t * resolution.\n\t\t *\n\t\t * Server-first: OpenRegister's `/grouped` facet endpoint does the\n\t\t * aggregation (count, or sum of `sumField`) — the same facet the\n\t\t * existing `groupBy` shorthand reaches — so the client never pulls\n\t\t * the collection just to count it. Only when that endpoint is\n\t\t * unavailable (older OR) does the widget fall back to fetching the\n\t\t * collection and grouping client-side. Any remaining failure leaves\n\t\t * `aggregateData` null (static props / fallback render).\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync fetchAggregateSource() {\n\t\t\tconst ds = this.dataSource || {}\n\t\t\tconst agg = this.aggregateDef\n\t\t\tif (!agg || !ds.schema) {\n\t\t\t\tthis.aggregateData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst metric = agg.metric === 'sum' ? 'sum' : 'count'\n\t\t\tif (metric === 'sum' && !agg.sumField) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnChartWidget] aggregate.metric \"sum\" requires aggregate.sumField — skipping.')\n\t\t\t\tthis.aggregateData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst requestKey = this.aggregateKey\n\t\t\tlet groups\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/aggregations/{register}/{schema}/grouped',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = { groupBy: agg.groupBy, metric }\n\t\t\t\tif (metric === 'sum') {\n\t\t\t\t\tparams.field = agg.sumField\n\t\t\t\t}\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object') {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`filter[${k}][${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[`filter[${k}]`] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tgroups = (res && res.data && res.data.groups) || []\n\t\t\t} catch {\n\t\t\t\t// Facet endpoint unavailable → client-side fallback aggregation.\n\t\t\t\tgroups = await this.aggregateFromCollection(ds, agg, metric)\n\t\t\t}\n\t\t\tif (!groups) {\n\t\t\t\tif (requestKey === this.aggregateKey) {\n\t\t\t\t\tthis.aggregateData = null\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst built = await this.buildAggregateData(groups, agg)\n\t\t\t// Guard against a stale (slower) response overwriting a newer\n\t\t\t// source signature — mirrors the endpoint-source seq guard.\n\t\t\tif (requestKey === this.aggregateKey) {\n\t\t\t\tthis.aggregateData = built\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Client-side fallback aggregation (Wave 3): fetch the collection and\n\t\t * group it locally — count per `aggregate.groupBy` value, or the sum\n\t\t * of `sumField`. Used only when OpenRegister's `/grouped` facet\n\t\t * endpoint is unavailable; capped at 1000 objects (the fleet's\n\t\t * established client-fetch bound). Returns the same\n\t\t * `[{ key, value }]` group shape the facet returns, or null on\n\t\t * failure.\n\t\t *\n\t\t * @param {object} ds The dataSource block.\n\t\t * @param {object} agg The aggregate block.\n\t\t * @param {string} metric Normalised metric (`count` | `sum`).\n\t\t * @return {Promise<Array<{ key: string|number|null, value: number }>|null>}\n\t\t */\n\t\tasync aggregateFromCollection(ds, agg, metric) {\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/{register}/{schema}',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = { _limit: 1000 }\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object' && !Array.isArray(v)) {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`${k}[${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[k] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tconst results = (res && res.data && res.data.results) || []\n\t\t\t\tconst totals = new Map()\n\t\t\t\tfor (const obj of results) {\n\t\t\t\t\tconst raw = obj && obj[agg.groupBy]\n\t\t\t\t\tconst key = (raw === null || raw === undefined || raw === '') ? null : raw\n\t\t\t\t\tconst increment = metric === 'sum' ? (Number(obj && obj[agg.sumField]) || 0) : 1\n\t\t\t\t\ttotals.set(key, (totals.get(key) || 0) + increment)\n\t\t\t\t}\n\t\t\t\treturn Array.from(totals.entries()).map(([key, value]) => ({ key, value }))\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Turn raw `[{ key, value }]` groups into the chart-ready\n\t\t * `aggregateData` blob: sort by value (desc), apply `topN`, fold the\n\t\t * remainder into a translated \"Other\" bucket when `otherBucket` is\n\t\t * true, resolve reference labels/colours via `labelResolve`, and\n\t\t * shape series/labels per chart family. `rawKeys` keeps the\n\t\t * UNRESOLVED keys index-aligned for drilldown.\n\t\t *\n\t\t * @param {Array<{ key: string|number|null, value: number }>} groups The raw groups.\n\t\t * @param {object} agg The aggregate block.\n\t\t * @return {Promise<{series: Array<{ name: string, data: Array<number> }>, categories: string[], labels: string[], rawKeys: string[], colorMap?: Record<string, string>}>}\n\t\t */\n\t\tasync buildAggregateData(groups, agg) {\n\t\t\tlet sorted = [...groups].sort((a, b) => (Number(b.value) || 0) - (Number(a.value) || 0))\n\t\t\tif (agg.mergeByLabel) {\n\t\t\t\t// Merging needs every group's label before the top N is cut,\n\t\t\t\t// so resolve them all and fold same-label groups first.\n\t\t\t\tconst keys = sorted.map((g) => aggregateKeyOf(g))\n\t\t\t\tconst resolved = agg.labelResolve && agg.labelResolve.schema\n\t\t\t\t\t? await this.resolveAggregateLabels(agg, keys)\n\t\t\t\t\t: { labels: keys.map(aggregateLabelOf), colors: [] }\n\t\t\t\tsorted = mergeGroupsByLabel(sorted, resolved.labels, resolved.colors)\n\t\t\t}\n\t\t\tconst topN = Number(agg.topN)\n\t\t\tlet other = null\n\t\t\tif (Number.isFinite(topN) && topN > 0 && sorted.length > topN) {\n\t\t\t\tconst rest = sorted.slice(topN)\n\t\t\t\tsorted = sorted.slice(0, topN)\n\t\t\t\tif (agg.otherBucket === true) {\n\t\t\t\t\tother = {\n\t\t\t\t\t\tkey: OTHER_BUCKET_KEY,\n\t\t\t\t\t\tlabel: t('nextcloud-vue', 'Other'),\n\t\t\t\t\t\tvalue: rest.reduce((sum, g) => sum + (Number(g.value) || 0), 0),\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst rawKeys = sorted.map((g) => (Array.isArray(g.keys) && g.keys.length > 1 ? g.keys : aggregateKeyOf(g)))\n\t\t\tlet labels = sorted.map((g) => (typeof g.label === 'string' ? g.label : aggregateLabelOf(aggregateKeyOf(g))))\n\t\t\tlet colorMap = null\n\t\t\tif (agg.mergeByLabel) {\n\t\t\t\tconst withColor = sorted.filter((g) => g.color)\n\t\t\t\tif (withColor.length > 0) {\n\t\t\t\t\tcolorMap = {}\n\t\t\t\t\twithColor.forEach((g) => {\n\t\t\t\t\t\tcolorMap[g.label] = g.color\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else if (agg.labelResolve && agg.labelResolve.schema) {\n\t\t\t\tconst resolved = await this.resolveAggregateLabels(agg, rawKeys)\n\t\t\t\tlabels = resolved.labels\n\t\t\t\tconst colors = resolved.colors\n\t\t\t\tif (colors.some(Boolean)) {\n\t\t\t\t\tcolorMap = {}\n\t\t\t\t\tcolors.forEach((color, i) => {\n\t\t\t\t\t\tif (color) {\n\t\t\t\t\t\t\tcolorMap[labels[i]] = color\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst values = sorted.map((g) => Number(g.value) || 0)\n\t\t\tif (other) {\n\t\t\t\trawKeys.push(other.key)\n\t\t\t\tlabels.push(other.label)\n\t\t\t\tvalues.push(other.value)\n\t\t\t}\n\t\t\tconst base = { rawKeys, labels, categories: labels }\n\t\t\tif (colorMap) {\n\t\t\t\tbase.colorMap = colorMap\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn { ...base, series: values }\n\t\t\t}\n\t\t\tconst name = agg.sumField || agg.metric || 'count'\n\t\t\treturn { ...base, series: [{ name, data: values }] }\n\t\t},\n\n\t\t/**\n\t\t * The display labels and colours of aggregate keys through\n\t\t * `labelResolve`. A configured `labelResolve` means a key IS an\n\t\t * opaque reference id, so a key that resolves to nothing (a deleted\n\t\t * or never-existing target) reads \"Unknown\", never the raw id; an\n\t\t * empty key keeps its '—' placeholder.\n\t\t *\n\t\t * @param {object} agg The aggregate block.\n\t\t * @param {string[]} keys The raw keys ('' for an empty one).\n\t\t * @return {Promise<{labels: string[], colors: Array<string|undefined>}>}\n\t\t */\n\t\tasync resolveAggregateLabels(agg, keys) {\n\t\t\tconst resolved = await this.resolveAggregateRefs(\n\t\t\t\t(this.dataSource && this.dataSource.register) || '',\n\t\t\t\tagg.labelResolve,\n\t\t\t\tkeys,\n\t\t\t)\n\t\t\treturn {\n\t\t\t\tlabels: resolved.map((r, i) => {\n\t\t\t\t\tif (r.label) {\n\t\t\t\t\t\treturn r.label\n\t\t\t\t\t}\n\t\t\t\t\treturn keys[i] === '' ? '—' : t('nextcloud-vue', 'Unknown')\n\t\t\t\t}),\n\n\t\t\t\tcolors: resolved.map((r) => r.color || undefined),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Resolve reference (uuid) aggregate keys to their referenced\n\t\t * objects' display labels (and optional per-category colours) —\n\t\t * the fkResolve pattern: the SHARED object store first (per-id\n\t\t * cache + in-flight dedup, so 10 slices pointing at 10 clients\n\t\t * resolve once each across the whole page), a direct per-id GET\n\t\t * when no Pinia store is active. Unresolvable ids degrade to an\n\t\t * empty label (the caller keeps the raw key) — a chart never\n\t\t * regresses to a blank slice.\n\t\t *\n\t\t * @param {string} defaultRegister Register used when `labelResolve` omits one.\n\t\t * @param {{register?: string, schema: string, labelField?: string, colorField?: string}} labelResolve The labelResolve block.\n\t\t * @param {string[]} keys The raw group keys (uuids; '' entries skip).\n\t\t * @return {Promise<Array<{label: string, color: string}>>} One entry per key, in order.\n\t\t */\n\t\tasync resolveAggregateRefs(defaultRegister, labelResolve, keys) {\n\t\t\tconst register = labelResolve.register || defaultRegister\n\t\t\tconst schema = labelResolve.schema\n\t\t\tconst labelField = labelResolve.labelField || 'name'\n\t\t\tconst colorField = labelResolve.colorField || ''\n\t\t\tlet store = null\n\t\t\ttry {\n\t\t\t\tstore = useObjectStore()\n\t\t\t} catch {\n\t\t\t\tstore = null\n\t\t\t}\n\t\t\tconst type = store ? resolveObjectOpType(store, { register, schema }) : null\n\t\t\tconst fetchViaAxios = async (id) => {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/{register}/{schema}/{id}',\n\t\t\t\t\t{ register, schema, id },\n\t\t\t\t)\n\t\t\t\tconst res = await axios.get(url)\n\t\t\t\treturn (res && res.data) || null\n\t\t\t}\n\t\t\treturn Promise.all(keys.map(async (id) => {\n\t\t\t\tif (!id) {\n\t\t\t\t\treturn { label: '', color: '' }\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst cached = store && store.objects && store.objects[type] && store.objects[type][id]\n\t\t\t\t\tconst obj = cached || (store ? await store.fetchObject(type, id) : await fetchViaAxios(id))\n\t\t\t\t\tif (!obj || typeof obj !== 'object') {\n\t\t\t\t\t\treturn { label: '', color: '' }\n\t\t\t\t\t}\n\t\t\t\t\tlet raw = obj[labelField]\n\t\t\t\t\tif (raw === undefined || raw === null || raw === '') {\n\t\t\t\t\t\traw = obj['@self'] && obj['@self'].name\n\t\t\t\t\t}\n\t\t\t\t\tconst color = colorField && typeof obj[colorField] === 'string' ? obj[colorField] : ''\n\t\t\t\t\treturn { label: this.displayString(raw), color }\n\t\t\t\t} catch {\n\t\t\t\t\treturn { label: '', color: '' }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * A value as a `bar-list` or `matrix` cell reads it: through\n\t\t * `valueFormat` when set, else as a localised number.\n\t\t *\n\t\t * @param {number} value The value.\n\t\t * @return {string} The text.\n\t\t */\n\t\tformatPlain(value) {\n\t\t\tif (this.valueFormatterFn) {\n\t\t\t\treturn String(this.valueFormatterFn(value))\n\t\t\t}\n\t\t\treturn new Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }).format(value)\n\t\t},\n\n\t\t/**\n\t\t * Map an endpoint payload whose `rowsPath` names an array of rows:\n\t\t * each row is a series (name at `rowLabelPath`, values at\n\t\t * `rowValuesPath`), the categories are at `labelsPath`.\n\t\t * A missing value stays null; a `matrix` keeps a text value (\"none\")\n\t\t * as text, other types read it as 0.\n\t\t *\n\t\t * @param {unknown} payload The plucked payload.\n\t\t * @param {object} es The `endpointSource` block.\n\t\t * @return {{series: Array, categories: Array<string>, labels: Array<string>}} The chart data.\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\tendpointRows(payload, es) {\n\t\t\tconst rows = getByPath(payload, es.rowsPath)\n\t\t\tconst rawLabels = es.labelsPath ? getByPath(payload, es.labelsPath) : undefined\n\t\t\tconst labels = Array.isArray(rawLabels) ? rawLabels.map((v) => ((v === null || v === undefined) ? '' : String(v))) : []\n\t\t\tconst keepText = this.type === 'matrix'\n\t\t\tconst cellOf = (v) => {\n\t\t\t\tif (v === null || v === undefined) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\tconst num = typeof v === 'string' && v.trim() === '' ? NaN : Number(v)\n\t\t\t\tif (Number.isFinite(num)) {\n\t\t\t\t\treturn num\n\t\t\t\t}\n\t\t\t\treturn keepText && typeof v === 'string' ? v : 0\n\t\t\t}\n\t\t\tconst series = (Array.isArray(rows) ? rows : []).map((row) => {\n\t\t\t\tconst name = getByPath(row, es.rowLabelPath || 'label')\n\t\t\t\tconst values = getByPath(row, es.rowValuesPath || 'values')\n\t\t\t\treturn {\n\t\t\t\t\tname: (name === null || name === undefined) ? '' : String(name),\n\t\t\t\t\tdata: Array.isArray(values) ? values.map(cellOf) : [],\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn { series, categories: labels, labels }\n\t\t},\n\n\t\t/**\n\t\t * ApexCharts `dataPointSelection` handler backing the declarative\n\t\t * `dataSource.drilldown` (Wave 3, #91): navigate to the configured\n\t\t * route with the clicked category's RAW key in the query\n\t\t * (`{ [filterParam]: rawKey }`). A route starting with `/` is\n\t\t * treated as a PATH, anything else as a route NAME. The folded\n\t\t * \"Other\" bucket never navigates. Navigation errors (duplicate\n\t\t * route, guards) are swallowed.\n\t\t *\n\t\t * @param {Event} _event The DOM event (unused).\n\t\t * @param {object} _chartContext The ApexCharts instance (unused).\n\t\t * @param {{dataPointIndex: number}} config The selection payload.\n\t\t * @return {void}\n\t\t */\n\t\tonDataPointSelection(_event, _chartContext, config) {\n\t\t\tconst drill = this.drilldownDef\n\t\t\tif (!drill || !this.$router) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst idx = config && config.dataPointIndex\n\t\t\tif (typeof idx !== 'number' || idx < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst key = this.drilldownKeys[idx]\n\t\t\tif (key === undefined || key === OTHER_BUCKET_KEY) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst query = { [drill.filterParam]: key }\n\t\t\tconst location = String(drill.route).startsWith('/')\n\t\t\t\t? { path: drill.route, query }\n\t\t\t\t: { name: drill.route, query }\n\t\t\tthis.$router.push(location).catch(() => {})\n\t\t},\n\n\t\t/**\n\t\t * Resolve reference (uuid) group keys to their referenced objects'\n\t\t * display labels. Fetches each referenced object once and maps its\n\t\t * `labelField` (default `name`) — falling back to the raw key when the\n\t\t * object can't be loaded, so a chart never regresses to a blank bar.\n\t\t *\n\t\t * @param {string} defaultRegister Register to use when the reference omits one.\n\t\t * @param {{ register?: string, schema: string, labelField?: string }} reference Reference descriptor from `groupBy.reference`.\n\t\t * @param {Array<{ key: string|number|null }>} groups Raw grouped rows from OpenRegister.\n\t\t * @return {Promise<string[]>} One resolved label per group, in order.\n\t\t */\n\t\tasync resolveGroupByLabels(defaultRegister, reference, groups) {\n\t\t\tconst register = reference.register || defaultRegister\n\t\t\tconst schema = reference.schema\n\t\t\tconst labelField = reference.labelField || 'name'\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\treturn await Promise.all(groups.map(async (g) => {\n\t\t\t\t\tconst key = g.key\n\t\t\t\t\tif (key === null || key === undefined || key === '') {\n\t\t\t\t\t\treturn '—'\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t\t\t'/apps/openregister/api/objects/{register}/{schema}/{id}',\n\t\t\t\t\t\t\t{ register, schema, id: key },\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst res = await axios.get(url)\n\t\t\t\t\t\tconst obj = (res && res.data) || {}\n\t\t\t\t\t\tlet raw = obj[labelField]\n\t\t\t\t\t\tif (raw === undefined || raw === null || raw === '') {\n\t\t\t\t\t\t\traw = obj['@self'] && obj['@self'].name\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn this.displayString(raw) || String(key)\n\t\t\t\t\t} catch {\n\t\t\t\t\t\treturn String(key)\n\t\t\t\t\t}\n\t\t\t\t}))\n\t\t\t} catch {\n\t\t\t\treturn groups.map((g) => (g.key === null || g.key === undefined ? '—' : String(g.key)))\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Pick a display string from a value that may be a plain string or a\n\t\t * translatable `{ <lang>: value }` map — falls back to the active\n\t\t * Nextcloud language, then its base subtag, then the first available\n\t\t * translation.\n\t\t *\n\t\t * @param {string|Record<string, string>|null} value Raw property value (string or per-language map).\n\t\t * @return {string} A display-ready string.\n\t\t */\n\t\tdisplayString(value) {\n\t\t\tif (value === null || value === undefined) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t\tconst lang = getLanguage() || ''\n\t\t\t\tconst short = lang.split('-')[0]\n\t\t\t\tif (value[lang] !== undefined) {\n\t\t\t\t\treturn String(value[lang])\n\t\t\t\t}\n\t\t\t\tif (value[short] !== undefined) {\n\t\t\t\t\treturn String(value[short])\n\t\t\t\t}\n\t\t\t\tconst vals = Object.values(value)\n\t\t\t\treturn vals.length ? String(vals[0]) : ''\n\t\t\t}\n\t\t\treturn String(value)\n\t\t},\n\n\t\t/**\n\t\t * Deep merge two objects (target wins on conflict)\n\t\t *\n\t\t * @param {object} base Base object\n\t\t * @param {object} override Override object\n\t\t * @return {object} Merged result\n\t\t */\n\t\tdeepMerge(base, override) {\n\t\t\tconst result = { ...base }\n\t\t\tfor (const key of Object.keys(override)) {\n\t\t\t\tif (\n\t\t\t\t\toverride[key]\n\t\t\t\t\t&& typeof override[key] === 'object'\n\t\t\t\t\t&& !Array.isArray(override[key])\n\t\t\t\t\t&& base[key]\n\t\t\t\t\t&& typeof base[key] === 'object'\n\t\t\t\t\t&& !Array.isArray(base[key])\n\t\t\t\t) {\n\t\t\t\t\tresult[key] = this.deepMerge(base[key], override[key])\n\t\t\t\t} else {\n\t\t\t\t\tresult[key] = override[key]\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-chart-widget {\n\twidth: 100%;\n\t/* A chart FITS its container — it is never a scroll region. apexcharts\n\t sizes its SVG from the element it is mounted in, but it also enforces\n\t its own minimum widths (axis labels, legend, a bar's minimum body), so\n\t on a narrow tile the SVG comes out wider than the box and the widget\n\t card grows a horizontal scrollbar. `max-width` + `overflow: hidden`\n\t settle it in the box's favour: the graph clips its own margins rather\n\t than handing the user a bar to drag. Applies in BOTH modes, not just\n\t the percentage-height `--fit` one — the horizontal overflow has nothing\n\t to do with how the height was configured, which is why the existing\n\t `--fit` rules never caught it. */\n\tmax-width: 100%;\n\tmin-height: 100px;\n\toverflow-x: hidden;\n}\n\n/* Container-fitting mode (`height` given as a percentage). The root claims the\n full height it is given and lays its children out as a column; the canvas box\n takes what is left, so the chart is sized by the box rather than sizing it.\n `min-height: 0` drops the 100px floor — on a fixed-height surface a floor is\n the thing that produces the overflow it was meant to prevent. */\n.cn-chart-widget--fit {\n\theight: 100%;\n\tmin-height: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.cn-chart-widget__canvas {\n\tmin-width: 0;\n\tmax-width: 100%;\n\t/* Never a scroll region (see the root). `overflow-x: hidden` alone made\n\t the other axis `auto`, and the chart's inline SVG sat on a text line:\n\t its descender gap made the box 4 to 7px taller than the chart and drew a\n\t vertical scrollbar (pipelinq Rapportage). */\n\toverflow: hidden;\n}\n\n/* apexcharts writes an inline `width` onto its own wrapper from its measured\n minimum, which beats the container when the container is narrower. Cap the\n painted box so the inline width cannot push past the widget's border. */\n.cn-chart-widget :deep(.apexcharts-canvas),\n.cn-chart-widget :deep(.apexcharts-canvas svg) {\n\tmax-width: 100%;\n}\n\n/* The SVG is a block: as an inline box it sits on a line and adds the line's\n descender space under the chart. */\n.cn-chart-widget :deep(.apexcharts-canvas svg) {\n\tdisplay: block;\n}\n\n/* `flex: 1 1 0` (not `1 1 auto`) is load-bearing: with an `auto` basis the box\n would grow to its content, i.e. to the chart, and the percentage height would\n resolve against a box the chart itself defined. `overflow: hidden` keeps a\n sub-pixel rounding difference from reintroducing a scrollbar. */\n.cn-chart-widget--fit .cn-chart-widget__canvas {\n\tflex: 1 1 0;\n\tmin-height: 0;\n\toverflow: hidden;\n}\n\n.cn-chart-widget__fallback {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmin-height: 150px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-chart-widget__html {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-chart-widget__bar-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-chart-widget__bar-line {\n\talign-items: center;\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-main-text);\n\tdisplay: grid;\n\tfont: inherit;\n\tgap: 12px;\n\tgrid-template-columns: minmax(80px, 170px) minmax(0, 1fr) minmax(36px, max-content);\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-align: start;\n\twidth: 100%;\n}\n\n.cn-chart-widget__bar-line--drill {\n\tborder-radius: var(--border-radius-small, 4px);\n\tcursor: pointer;\n}\n\n.cn-chart-widget__bar-line--drill:hover .cn-chart-widget__bar-label,\n.cn-chart-widget__bar-line--drill:focus-visible .cn-chart-widget__bar-label {\n\ttext-decoration: underline;\n}\n\n.cn-chart-widget__bar-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-chart-widget__bar-track {\n\tbackground: var(--color-background-dark);\n\tborder-radius: 4px;\n\tdisplay: block;\n\theight: 14px;\n\toverflow: hidden;\n}\n\n.cn-chart-widget__bar-fill {\n\tbackground: var(--color-primary-element);\n\tdisplay: block;\n\theight: 100%;\n}\n\n.cn-chart-widget__bar-value {\n\tfont-weight: 600;\n\ttext-align: end;\n\twhite-space: nowrap;\n}\n\n.cn-chart-widget__footnote {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 0;\n}\n\n.cn-chart-widget__notice {\n\tmargin: 12px 0 0;\n}\n\n.cn-chart-widget__notice-text {\n\tmargin: 0;\n}\n\n/* Under an ApexCharts plot the footnote is a sibling of the canvas, so it keeps\n its own line height while the canvas takes the rest of a fitted column. */\n.cn-chart-widget > .cn-chart-widget__footnote {\n\tflex: 0 0 auto;\n\tmargin-top: 8px;\n}\n\n.cn-chart-widget__matrix {\n\tdisplay: grid;\n\tgap: 4px;\n}\n\n.cn-chart-widget__matrix-row {\n\tdisplay: contents;\n}\n\n/* A column takes its share of the width (minmax(0, 1fr)), so a long phase\n name breaks inside its own column instead of running into the next. */\n.cn-chart-widget__matrix-head {\n\t--nldesign-color-on-surface: var(--color-text-maxcontrast);\n\tcolor: var(--color-text-maxcontrast);\n\tpadding: 6px;\n\thyphens: auto;\n\toverflow-wrap: anywhere;\n}\n\n.cn-chart-widget__matrix-label {\n\tpadding: 10px 6px;\n}\n\n.cn-chart-widget__matrix-cell {\n\tborder-radius: 6px;\n\tpadding: 10px;\n\ttext-align: center;\n}\n\n.cn-chart-widget__matrix-cell--success {\n\tbackground: var(--color-success-light, color-mix(in srgb, var(--color-success) 15%, var(--color-main-background)));\n}\n\n.cn-chart-widget__matrix-cell--warning {\n\tbackground: var(--color-warning-light, color-mix(in srgb, var(--color-warning) 15%, var(--color-main-background)));\n}\n\n.cn-chart-widget__matrix-cell--error {\n\tbackground: var(--color-error-light, color-mix(in srgb, var(--color-error) 12%, var(--color-main-background)));\n}\n\n.cn-chart-widget__matrix-cell--danger {\n\tbackground: color-mix(in srgb, var(--color-error) 25%, var(--color-main-background));\n}\n\n.cn-chart-widget__matrix-cell--current {\n\tfont-weight: 700;\n\toutline: 3px solid var(--color-primary-element);\n\toutline-offset: -3px;\n}\n\n/* A cell is a span: its ink also goes to --nldesign-color-on-surface, which a\n theme that forces the body ink onto every span (thematiq) reads. The four\n levels are the boards' tones (DqProcesanalyse): the light primary, the\n primary at 35% and at 70%, and level 1 inverted. Levels 1 to 3 take a dark\n ink; the board's white on level 3 is about 3.1:1, and 70% is as deep as the\n dark ink stays at 4.5:1 in Nextcloud's dark theme. */\n.cn-chart-widget__matrix-cell--1 {\n\t--nldesign-color-on-surface: var(--color-primary-element-light-text);\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-chart-widget__matrix-cell--2 {\n\tbackground: color-mix(in srgb, var(--color-primary-element) 35%, var(--color-main-background));\n\tcolor: var(--color-main-text);\n}\n\n.cn-chart-widget__matrix-cell--3 {\n\t--nldesign-color-on-surface: var(--color-main-text);\n\tbackground: color-mix(in srgb, var(--color-primary-element) 70%, var(--color-main-background));\n\tcolor: var(--color-main-text);\n}\n\n.cn-chart-widget__matrix-cell--4 {\n\t--nldesign-color-on-surface: var(--color-primary-element-light);\n\tbackground: var(--color-primary-element-light-text);\n\tcolor: var(--color-primary-element-light);\n}\n\n.cn-chart-widget__empty {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmin-height: 150px;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n\ttext-align: center;\n\tpadding: 12px;\n}\n\n/* The empty / fallback placeholders carry a 150px floor for the normal\n content-sized case; in fit mode they take the leftover space and centre in it\n instead, since the floor would overflow a short tile. Declared after the base\n rules so the cascade order matches specificity (no-descending-specificity). */\n.cn-chart-widget--fit .cn-chart-widget__empty,\n.cn-chart-widget--fit .cn-chart-widget__fallback {\n\tflex: 1 1 0;\n\tmin-height: 0;\n}\n\n.cn-chart-widget__error {\n\tfont-size: 14px;\n\tmargin: 0;\n}\n\n/* In-widget view switcher pills (views[] prop) — compact segmented row,\n mirroring the dashboard date-range pill styling. */\n.cn-chart-widget__views {\n\tdisplay: flex;\n\tgap: 4px;\n\tmargin-bottom: 6px;\n\tjustify-content: flex-end;\n}\n\n.cn-chart-widget__view-pill {\n\tpadding: 2px 10px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: 999px;\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tcursor: pointer;\n}\n\n.cn-chart-widget__view-pill--active {\n\tbackground: var(--color-primary-element-light, #aad2ed);\n\tcolor: var(--color-main-text);\n\tborder-color: var(--color-primary-element, #0082c9);\n}\n\n/* ─── ApexCharts HTML chrome ───────────────────────────────────────────────\n Everything apexcharts draws INSIDE the SVG takes its colour from\n `mergedOptions` (foreColor, grid.borderColor, legend.labels.colors, axis\n label styles), so it already follows the Nextcloud theme. Its HTML chrome —\n the hover tooltip, the crosshair axis tooltips, the toolbar menu — does not:\n apexcharts styles those from a stylesheet it injects itself at chart-create\n time (`<style id=\"apexcharts-css\">`) using hardcoded hex values. In dark mode\n the hover tooltip stayed a white box while its text inherited the near-white\n `--color-main-text` — white on white, unreadable.\n\n `tooltip.theme` is not the fix: both apexcharts themes are hardcoded\n palettes, neither of them Nextcloud's, and choosing between them would need\n JS theme detection that a themed or nldesign install would still get wrong.\n Restyling with tokens means ONE rule set that is correct in light, dark,\n high-contrast and custom themes, because the tokens flip themselves. Both\n theme classes are listed so an `options.tooltip.theme` override cannot drop\n a consumer back onto a hardcoded palette.\n\n The specificity is deliberate. apexcharts injects its stylesheet when the\n first chart is created, so it lands AFTER the app's CSS and wins every tie —\n each override below therefore carries one more class than the apexcharts rule\n it replaces, and holds even without the scope attribute this block compiles\n with. */\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-light),\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-dark) {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n\tbox-shadow: 0 1px 5px var(--color-box-shadow, rgba(0, 0, 0, 0.2));\n}\n\n/* The title row is the date/category header (\"Aug 26\"). Its own background is\n what made it unreadable rather than merely off-theme. */\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title),\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title) {\n\tbackground: var(--color-background-hover);\n\tborder-bottom: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n}\n\n/* Crosshair axis tooltips. apexcharts puts light hex values on the BASE class\n here and only overrides them for its dark theme, so the base rule has to be\n replaced too — not just the theme variants. */\n.cn-chart-widget :deep(.apexcharts-xaxistooltip),\n.cn-chart-widget :deep(.apexcharts-yaxistooltip) {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n}\n\n/* Their pointer arrows are two stacked triangles: `::before` paints the border\n edge, `::after` the fill. Both need the tokens the box above uses, or the\n arrow keeps the old palette and reads as a stray light wedge. */\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-bottom)::after,\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-top)::after {\n\tborder-bottom-color: var(--color-main-background);\n\tborder-top-color: var(--color-main-background);\n}\n\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-bottom)::before,\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-top)::before {\n\tborder-bottom-color: var(--color-border);\n\tborder-top-color: var(--color-border);\n}\n\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-left)::after,\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-right)::after {\n\tborder-left-color: var(--color-main-background);\n\tborder-right-color: var(--color-main-background);\n}\n\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-left)::before,\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-right)::before {\n\tborder-left-color: var(--color-border);\n\tborder-right-color: var(--color-border);\n}\n\n/* Toolbar menu — only reachable with `toolbar: true`, but the same defect: a\n hardcoded `#fff` panel under inherited near-white text. */\n.cn-chart-widget :deep(.apexcharts-menu) {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n}\n\n.cn-chart-widget :deep(.apexcharts-menu .apexcharts-menu-item:hover) {\n\tbackground: var(--color-background-hover);\n}\n\n/* Toolbar icons: `#6e8192` at rest and `#333` on hover, i.e. the hover state\n vanishes against a dark background. One selector per icon class, matching\n apexcharts' own list, to clear its (0,3,1) hover rules. */\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-menu-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-reset-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-selection-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoom-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomin-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomout-icon svg) {\n\tfill: var(--color-text-maxcontrast);\n}\n\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-menu-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-reset-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-selection-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoom-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomin-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-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;AACzB,GAAA,MAAM,MAAO,GAAE,EAAE,GAAG,IAAK,GAAA;AACzB,GAAA,KAAK,MAAM,GAAI,IAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;AACxC,IAAA;KACC,QAAQ,CAAC,GAAG,CAAA;AACZ,QAAG,OAAO,QAAQ,CAAC,GAAG,CAAA,KAAM,QAAO;AACnC,QAAG,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,CAAC,GAAG,CAAA;QACR,OAAO,IAAI,CAAC,GAAG,CAAE,KAAI,QAAO;QAC5B,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;MAC1B;KACD,MAAM,CAAC,GAAG,CAAE,GAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAA;KACpD,MAAK;KACN,MAAM,CAAC,GAAG,CAAE,GAAE,QAAQ,CAAC,GAAG,EAAA;AAC3B,KAAA;AACD,IAAA;GACA,OAAO,MAAK;GACZ;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnChartWidget.vue2.js","sources":["../../../../src/components/CnChartWidget/CnChartWidget.vue"],"sourcesContent":["<!--\n CnChartWidget — Renders charts inside dashboard widgets.\n\n A thin wrapper around ApexCharts for use in CnDashboardPage widget slots.\n Supports area, line, bar, pie, donut, and radialBar chart types.\n Automatically adapts to the widget container size.\n\n ApexCharts is loaded as a peer dependency — consuming apps must\n install `apexcharts` and `vue-apexcharts` in their own package.json.\n-->\n<template>\n\t<div class=\"cn-chart-widget\" :class=\"{ 'cn-chart-widget--fit': fitToContainer }\">\n\t\t<!-- In-widget view switcher (Wave-4 amendment folded into Wave 3,\n\t\t #91): a compact pill row that switches which named series /\n\t\t value format render. Pure display — no series arithmetic.\n\t\t Renders only when 2+ views are configured. -->\n\t\t<div\n\t\t\tv-if=\"views.length > 1\"\n\t\t\tclass=\"cn-chart-widget__views\"\n\t\t\trole=\"group\"\n\t\t\t:aria-label=\"viewsGroupLabel\"\n\t\t\tdata-testid=\"cn-chart-widget-views\">\n\t\t\t<button\n\t\t\t\tv-for=\"view in views\"\n\t\t\t\t:key=\"view.key\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-chart-widget__view-pill\"\n\t\t\t\t:class=\"{ 'cn-chart-widget__view-pill--active': activeView && activeView.key === view.key }\"\n\t\t\t\t:aria-pressed=\"String(Boolean(activeView && activeView.key === view.key))\"\n\t\t\t\t:data-testid=\"`cn-chart-widget-view-${view.key}`\"\n\t\t\t\t@click=\"activeViewKey = view.key\">\n\t\t\t\t{{ view.label ? hostTranslate(view.label) : view.key }}\n\t\t\t</button>\n\t\t</div>\n\t\t<!-- A refused or failed endpoint read shows its sentence instead of\n\t\t the chart; a short one keeps the chart and says it is short. -->\n\t\t<CnEndpointNotice\n\t\t\tv-if=\"!epError && epTruncated\"\n\t\t\t:truncated=\"true\" />\n\t\t<CnEndpointNotice\n\t\t\tv-if=\"epAwaitingRequest\"\n\t\t\t:awaitingRequest=\"true\"\n\t\t\t:requestLabel=\"endpointSource.requestLabel ? hostTranslate(endpointSource.requestLabel) : ''\"\n\t\t\t:requestHint=\"endpointSource.requestHint ? hostTranslate(endpointSource.requestHint) : ''\"\n\t\t\t:requestDisabled=\"epBlocked\"\n\t\t\t@request=\"epRequest\" />\n\t\t<CnEndpointNotice\n\t\t\tv-else-if=\"epError\"\n\t\t\t:error=\"epError\"\n\t\t\t:refused=\"epRefused\" />\n\t\t<div v-else-if=\"showEmptyState\" class=\"cn-chart-widget__empty\" data-testid=\"cn-chart-widget-empty\">\n\t\t\t{{ hostTranslate(emptyLabel) }}\n\t\t</div>\n\t\t<!-- Sizing box for the apexcharts mount. apexcharts resolves a\n\t\t percentage `height` against its element's PARENT (Core.js\n\t\t setSVGDimensions → Utils.getDimensions(el.parentNode)), so a\n\t\t container-fitting chart needs a parent whose height is the space\n\t\t left over — not one sized by the chart itself. This box is\n\t\t `flex: 1 1 0` inside the flex column, so its height is the\n\t\t leftover after the view-switcher row, independent of the chart's\n\t\t own height. Without it the percentage would resolve against the\n\t\t content-sized root and either collapse to 0 or ignore the pill\n\t\t row. -->\n\t\t<!-- `bar-list`: one row per category, a track filled to the value's\n\t\t share of `barMax` (default the largest value), the value at the\n\t\t end. Rows navigate when the source declares a drilldown. -->\n\t\t<div v-else-if=\"type === 'bar-list'\" class=\"cn-chart-widget__html\" data-testid=\"cn-chart-widget-bar-list\">\n\t\t\t<ul class=\"cn-chart-widget__bar-list\" :class=\"{ 'cn-chart-widget__bar-list--value-at-end': barValueAtEnd }\">\n\t\t\t\t<li v-for=\"row in barListRows\" :key=\"row.index\" class=\"cn-chart-widget__bar-row\">\n\t\t\t\t\t<component\n\t\t\t\t\t\t:is=\"row.drill ? 'button' : 'div'\"\n\t\t\t\t\t\t:type=\"row.drill ? 'button' : null\"\n\t\t\t\t\t\tclass=\"cn-chart-widget__bar-line\"\n\t\t\t\t\t\t:class=\"{ 'cn-chart-widget__bar-line--drill': row.drill }\"\n\t\t\t\t\t\tdata-testid=\"cn-chart-widget-bar-row\"\n\t\t\t\t\t\t@click=\"row.drill ? onDataPointSelection(null, null, { dataPointIndex: row.index }) : null\">\n\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-label\">{{ row.label }}</span>\n\t\t\t\t\t\t<span v-if=\"barValueAtEnd\" class=\"cn-chart-widget__bar-track\">\n\t\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-fill\" aria-hidden=\"true\" :style=\"{ flexBasis: `${row.share}%` }\" />\n\t\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-value\">{{ row.text }}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-track\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-fill\" :style=\"{ width: `${row.share}%` }\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"cn-chart-widget__bar-value\">{{ row.text }}</span>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</component>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<p v-if=\"footnote\" class=\"cn-chart-widget__footnote\">\n\t\t\t\t{{ hostTranslate(footnote) }}\n\t\t\t</p>\n\t\t</div>\n\t\t<!-- `matrix`: one row per series, one column per category, each cell\n\t\t tinted by its value's share of the largest value, or by `colorMap`\n\t\t for text cells. -->\n\t\t<div v-else-if=\"type === 'matrix'\" class=\"cn-chart-widget__html\" data-testid=\"cn-chart-widget-matrix\">\n\t\t\t<div\n\t\t\t\trole=\"table\"\n\t\t\t\tclass=\"cn-chart-widget__matrix\"\n\t\t\t\t:aria-label=\"matrixLabel\"\n\t\t\t\t:style=\"{ gridTemplateColumns: `${matrixLabelColumn} repeat(${matrix.columns.length}, minmax(0, 1fr))` }\">\n\t\t\t\t<div role=\"row\" class=\"cn-chart-widget__matrix-row\">\n\t\t\t\t\t<span role=\"columnheader\" class=\"cn-chart-widget__matrix-corner\" />\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"column in matrix.columns\"\n\t\t\t\t\t\t:key=\"column\"\n\t\t\t\t\t\trole=\"columnheader\"\n\t\t\t\t\t\tclass=\"cn-chart-widget__matrix-head\">{{ column }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"row in matrix.rows\"\n\t\t\t\t\t:key=\"row.label\"\n\t\t\t\t\trole=\"row\"\n\t\t\t\t\tclass=\"cn-chart-widget__matrix-row\">\n\t\t\t\t\t<span role=\"rowheader\" class=\"cn-chart-widget__matrix-label\">{{ row.label }}</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-for=\"(cell, column) in row.cells\"\n\t\t\t\t\t\t:key=\"column\"\n\t\t\t\t\t\trole=\"cell\"\n\t\t\t\t\t\tclass=\"cn-chart-widget__matrix-cell\"\n\t\t\t\t\t\t:class=\"[`cn-chart-widget__matrix-cell--${cell.level}`, { 'cn-chart-widget__matrix-cell--current': cell.current }]\"\n\t\t\t\t\t\t:style=\"cell.color ? { background: cell.color } : null\"\n\t\t\t\t\t\t:aria-current=\"cell.current ? 'true' : null\"\n\t\t\t\t\t\tdata-testid=\"cn-chart-widget-matrix-cell\">{{ cell.text }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<p v-if=\"footnote\" class=\"cn-chart-widget__footnote\">\n\t\t\t\t{{ hostTranslate(footnote) }}\n\t\t\t</p>\n\t\t</div>\n\t\t<div v-else-if=\"chartComponent\" class=\"cn-chart-widget__canvas\">\n\t\t\t<component\n\t\t\t\t:is=\"chartComponent\"\n\t\t\t\tref=\"chart\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:height=\"computedHeight\"\n\t\t\t\t:width=\"computedWidth\"\n\t\t\t\t:options=\"mergedOptions\"\n\t\t\t\t:series=\"plottedSeries\" />\n\t\t</div>\n\t\t<div v-else class=\"cn-chart-widget__fallback\">\n\t\t\t<!-- @slot Rendered when the ApexCharts peer dependency is not available (defaults to the unavailableLabel text). -->\n\t\t\t<slot name=\"fallback\">\n\t\t\t\t<p class=\"cn-chart-widget__error\">\n\t\t\t\t\t{{ unavailableLabel }}\n\t\t\t\t</p>\n\t\t\t</slot>\n\t\t</div>\n\t\t<p\n\t\t\tv-if=\"footnote && chartComponent && !showEmptyState && type !== 'bar-list' && type !== 'matrix'\"\n\t\t\tclass=\"cn-chart-widget__footnote\"\n\t\t\tdata-testid=\"cn-chart-widget-footnote\">\n\t\t\t{{ hostTranslate(footnote) }}\n\t\t</p>\n\t\t<!-- `notice`: a toned note card under the chart whose words carry\n\t\t values from the page record (DqHandhaving \"Advies: ...\"). -->\n\t\t<NcNoteCard\n\t\t\tv-if=\"noticeParts\"\n\t\t\t:type=\"noticeParts.type\"\n\t\t\t:data-tone=\"noticeParts.type\"\n\t\t\tclass=\"cn-chart-widget__notice\"\n\t\t\tdata-testid=\"cn-chart-widget-notice\">\n\t\t\t<p class=\"cn-chart-widget__notice-text\">\n\t\t\t\t<strong v-if=\"noticeParts.lead\">{{ noticeParts.lead }}</strong>{{ noticeParts.lead && noticeParts.text ? ' ' : '' }}{{ noticeParts.text }}\n\t\t\t</p>\n\t\t</NcNoteCard>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { getLanguage, translate as t } from '@nextcloud/l10n'\nimport { NcNoteCard } from '@nextcloud/vue'\nimport { inject, markRaw, ref } from 'vue'\nimport VueApexCharts from 'vue3-apexcharts'\nimport { useDataSource } from '../../composables/useDataSource.js'\nimport { getByPath, useEndpointSource } from '../../composables/useEndpointSource.js'\nimport { useObjectStore } from '../../store/useObjectStore.js'\nimport { resolveObjectOpType } from '../../utils/actionsDispatcher.js'\nimport { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js'\nimport { resolveObjectTokenContext } from '../../utils/detailObjectContext.js'\nimport { safeCurrencyCode } from '../../utils/formatMetric.js'\nimport { cellsFromRecord, pivotCells } from '../../utils/matrixCells.js'\nimport { hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\nimport { userLocale } from '../../utils/userLocale.js'\nimport { CnEndpointNotice } from '../CnEndpointNotice/index.js'\n\n/**\n * Nice-ceiling ladder. Deliberately fine-grained: a coarse one (1 / 2 / 5 / 10)\n * sends 62 all the way to 100 and wastes a third of the plot on empty space.\n */\nconst NICE_CEIL_STEPS = [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10]\n\n/**\n * Round a value up to the next \"nice\" axis ceiling — a round multiple of a\n * power of ten (7 → 8, 62 → 80, 210 → 250). Gives the top mark breathing room\n * and lands the axis on round ticks instead of ending exactly on the data's\n * maximum, where the peak sits glued to the plot's ceiling.\n *\n * @param {number} value Data maximum (must be > 0).\n * @return {number} The next nice ceiling at or above `value`.\n */\nfunction niceCeil(value) {\n\tif (!Number.isFinite(value) || value <= 0) {\n\t\treturn 1\n\t}\n\tconst magnitude = 10 ** Math.floor(Math.log10(value))\n\tfor (const step of NICE_CEIL_STEPS) {\n\t\tconst candidate = step * magnitude\n\t\tif (value <= candidate) {\n\t\t\treturn candidate\n\t\t}\n\t}\n\treturn 10 * magnitude\n}\n\n/**\n * Calendar fields of an aggregation bucket key: `2026`, `2026-08`, `2026-08-10`,\n * and any of those with a `T`/space time part, optional millis, and an optional\n * `Z`/±offset suffix. Anchored, so a shape this does not model (a quarter key\n * like `2026-Q1`) falls through to the Date constructor instead of being\n * mis-parsed as its year alone.\n */\nconst BUCKET_KEY_RE = /^(\\d{4})(?:-(\\d{2})(?:-(\\d{2}))?)?(?:[T ](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$/\n\n/**\n * Parse a bucket key into a Date carrying the key's OWN calendar fields, read in\n * local time so `toLocale*` renders back exactly what the key said.\n *\n * `new Date(key)` cannot be used directly: its assumed zone depends on the key's\n * FORMAT, so one axis mixed both. A date-only `2026-08-10` is UTC midnight per\n * spec, which a formatter west of UTC then renders as \"9 Aug\" — and a\n * `2026-01-01T00:00:00Z` year bucket renders as \"2025\" — while `2026-08-10\n * 14:00:00` is parsed as local and would break the other way if the whole axis\n * were simply formatted in UTC. Echoing the key's fields is right for either:\n * the backend mints these as period LABELS, not instants to be re-zoned.\n *\n * @param {string} key The bucket key from the aggregation response.\n * @return {Date|null} The parsed date, or null when the key is not a date at all.\n */\nfunction parseBucketKey(key) {\n\tconst m = BUCKET_KEY_RE.exec(String(key))\n\tif (!m) {\n\t\tconst parsed = new Date(key)\n\t\treturn Number.isNaN(parsed.getTime()) ? null : parsed\n\t}\n\treturn new Date(\n\t\tNumber(m[1]),\n\t\tNumber(m[2] || 1) - 1,\n\t\tNumber(m[3] || 1),\n\t\tNumber(m[4] || 0),\n\t\tNumber(m[5] || 0),\n\t\tNumber(m[6] || 0),\n\t)\n}\n\n/**\n * A theme colour by CSS variable name, as a literal: ApexCharts writes colours\n * into SVG attributes, where `var()` does not resolve.\n *\n * @param {string} name The variable, e.g. `--color-error`.\n * @param {string} fallback The colour when the variable is unset (or no DOM).\n * @return {string} The colour.\n */\nfunction themeColor(name, fallback) {\n\tif (typeof document === 'undefined' || typeof getComputedStyle !== 'function') {\n\t\treturn fallback\n\t}\n\tconst value = getComputedStyle(document.documentElement).getPropertyValue(name).trim()\n\treturn value || fallback\n}\n\n/** Event-bus channel CnWidgetWrapper's Refresh action broadcasts on. */\nconst REFRESH_BUS_CHANNEL = 'cn:widget:refresh'\n\n/**\n * Event-bus channel the PAGE-level Refresh action broadcasts on\n * (CnDashboardPage / CnDetailPage pass it to their CnActionsMenu).\n */\nconst PAGE_REFRESH_BUS_CHANNEL = 'cn:page:refresh'\n\n/**\n * Sentinel raw key of the folded \"Other\" bucket (Wave 3 aggregate top-N).\n * Never a real category value, so drilldown clicks on it are skipped.\n */\nconst OTHER_BUCKET_KEY = '__other__'\n\n/**\n * The raw key of an aggregate group as a string, '' for an empty one.\n *\n * @param {{key: (string|number|null|undefined)}} group The group.\n * @return {string}\n */\nfunction aggregateKeyOf(group) {\n\treturn group.key === null || group.key === undefined ? '' : String(group.key)\n}\n\n/**\n * The label a raw aggregate key shows without `labelResolve`.\n *\n * @param {string} key The raw key.\n * @return {string}\n */\nfunction aggregateLabelOf(key) {\n\treturn key === '' ? '—' : key\n}\n\n/**\n * Fold aggregate groups that carry the same label into one (`mergeByLabel`):\n * values summed, every raw key kept for the drilldown, the first colour\n * kept, sorted again by value.\n *\n * @param {Array<{key: (string|number|null), value: number}>} groups The groups.\n * @param {string[]} labels One label per group.\n * @param {Array<string|undefined>} colors One colour per group, or none.\n * @return {Array<{key: string, keys: string[], label: string, value: number, color?: string}>}\n */\nfunction mergeGroupsByLabel(groups, labels, colors) {\n\tconst byLabel = new Map()\n\tgroups.forEach((group, i) => {\n\t\tconst label = labels[i]\n\t\tconst key = aggregateKeyOf(group)\n\t\tconst entry = byLabel.get(label)\n\t\tif (entry) {\n\t\t\tentry.value += Number(group.value) || 0\n\t\t\tentry.keys.push(key)\n\t\t\tentry.color = entry.color || colors[i]\n\t\t} else {\n\t\t\tbyLabel.set(label, { key, keys: [key], label, value: Number(group.value) || 0, color: colors[i] })\n\t\t}\n\t})\n\treturn [...byLabel.values()].sort((a, b) => b.value - a.value)\n}\n\n/** Matrix text-cell tones a `colorMap` may name, as tint classes. */\nconst TONE_LEVELS = Object.freeze({ success: 'success', warning: 'warning', error: 'error', danger: 'danger' })\n\n/**\n * CnChartWidget — Chart component for dashboard widgets.\n *\n * Wraps ApexCharts with sensible defaults for Nextcloud theming.\n * Apps must install `apexcharts` and `vue-apexcharts` as dependencies.\n * Basic area chart\n * ```vue\n * <CnChartWidget\n * type=\"area\"\n * :series=\"[{ name: 'Searches', data: [10, 41, 35, 51] }]\"\n * :categories=\"['Mon', 'Tue', 'Wed', 'Thu']\"\n * :height=\"250\" />\n * Pie chart\n * <CnChartWidget\n * type=\"pie\"\n * :series=\"[44, 55, 13]\"\n * :labels=\"['Active', 'Pending', 'Closed']\" />\n * With custom options\n * <CnChartWidget\n * type=\"bar\"\n * :series=\"barSeries\"\n * :options=\"{ plotOptions: { bar: { horizontal: true } } }\" />\n * ```\n *\n * Manifest usage — when CnDashboardPage's widget dispatcher sees\n * `widgetDef.type === 'chart'` it mounts CnChartWidget automatically,\n * forwarding `widgetDef.props.chartKind` as the `type` prop and\n * `series` / `categories` / `labels` / `options` / `colors` / `toolbar` /\n * `legend` / `height` / `width` / `unavailableLabel` directly. Manifest\n * authors do NOT mount this component themselves — declare a chart\n * widget in `pages[].config.widgets[]` instead. See CnDashboardPage's\n * leading docblock for the manifest example.\n */\n/**\n * A value formatter for a `valueFormat`: 'currency' | 'currency-compact' |\n * 'percent' | 'number', or the object form `{ name, currency?,\n * decimals?, suffix? }`. Non-numeric values pass through. Null for no format.\n *\n * @param {string|object|null} vf The value format.\n * @return {((value: unknown) => unknown)|null} The formatter.\n */\nfunction formatterFor(vf) {\n\tif (!vf) {\n\t\treturn null\n\t}\n\tconst name = typeof vf === 'string' ? vf : vf.name\n\tconst currency = safeCurrencyCode(typeof vf === 'object' ? vf.currency : undefined)\n\tconst decimals = (typeof vf === 'object' && Number.isFinite(vf.decimals)) ? vf.decimals : null\n\tconst suffix = typeof vf === 'object' && typeof vf.suffix === 'string' ? vf.suffix : ''\n\tconst numeric = (v, fmt) => {\n\t\tconst num = Number(v)\n\t\treturn Number.isFinite(num) ? fmt(num) : v\n\t}\n\tif (name === 'currency') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tstyle: 'currency',\n\t\t\tcurrency,\n\t\t\tminimumFractionDigits: decimals ?? 0,\n\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t}).format(num))\n\t}\n\tif (name === 'currency-compact') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tstyle: 'currency',\n\t\t\tcurrency,\n\t\t\tnotation: 'compact',\n\t\t\tmaximumFractionDigits: decimals ?? 1,\n\t\t}).format(num))\n\t}\n\tif (name === 'number') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tminimumFractionDigits: decimals ?? 0,\n\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t}).format(num) + suffix)\n\t}\n\tif (name === 'percent') {\n\t\treturn (v) => numeric(v, (num) => new Intl.NumberFormat(undefined, {\n\t\t\tminimumFractionDigits: decimals ?? 0,\n\t\t\tmaximumFractionDigits: decimals ?? 0,\n\t\t}).format(num) + '%')\n\t}\n\treturn null\n}\n\nexport default {\n\tname: 'CnChartWidget',\n\n\tcomponents: { CnEndpointNotice, NcNoteCard },\n\n\tinject: {\n\t\t/**\n\t\t * Reactive date-range provided by an ancestor `CnDashboardPage`.\n\t\t * When the dashboard's `dateRange.enabled` is `true`, the ref's\n\t\t * value is `{ from, to, preset }`; otherwise it stays `null`.\n\t\t * The widget passes this through to `useDataSource` so the\n\t\t * bucket shorthand's `fromVar` / `toVar` GraphQL variables\n\t\t * track the dashboard's range automatically.\n\t\t *\n\t\t * Default factory: `() => ref(null)`. This keeps isolated\n\t\t * mounts (Storybook, jest with `shallowMount`) safe — there's\n\t\t * always a ref to inject, even outside a dashboard.\n\t\t */\n\t\tcnDashboardDateRange: { default: () => ref(null) },\n\t\t/**\n\t\t * Host translate function provided by CnAppRoot: manifest-authored\n\t\t * view labels and series names are i18n keys (screens-dashboard-i18n).\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Chart type: area, line, bar, pie, donut, radialBar, or one of the\n\t\t * two drawn without ApexCharts: `bar-list` (a labelled track per\n\t\t * category, the value at the end) and `matrix` (a series per row, a\n\t\t * category per column, each cell tinted by its value).\n\t\t *\n\t\t * @type {string}\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'area',\n\t\t\tvalidator: (v) => ['area', 'line', 'bar', 'pie', 'donut', 'radialBar', 'bar-list', 'matrix'].includes(v),\n\t\t},\n\n\t\t/**\n\t\t * The value a full `bar-list` track stands for (100 for percentages).\n\t\t * Null, the default, takes the largest value.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\tbarMax: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A `bar-list` without a track: each bar as long as its share and its\n\t\t * value right after the bar's end (DqProcesanalyse \"Doorlooptijd per\n\t\t * status\"). False, the default, keeps the track and the value column.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-value-at-end/specs/chart-bar-list-value-at-end/spec.md#requirement-a-bar-list-can-put-each-value-at-its-bars-end\n\t\t */\n\t\tbarValueAtEnd: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * A `matrix`'s row-label column width in px. Null, the default, sizes\n\t\t * the column to its longest label (at least 120px); a width wraps a\n\t\t * long label instead (DqProcesanalyse \"Dagen per fase\": 240).\n\t\t *\n\t\t * @spec openspec/changes/chart-matrix-label-width/specs/chart-matrix-label-width/spec.md#requirement-a-matrix-can-give-its-row-labels-a-fixed-width\n\t\t */\n\t\tmatrixLabelWidth: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A toned note card under the chart whose words carry values from the\n\t\t * page record: `{ lead?, text?, values?, labels?, tone? }`. `lead`\n\t\t * (bold) and `text` go through the host's translate, then each\n\t\t * `{name}` is filled from `values[name]`, a literal or a token such as\n\t\t * `@object.recommendedIntervention`. `labels[name]` turns a key into\n\t\t * words: `\"rows\"`, `\"columns\"` or `\"values\"` read the matrix's\n\t\t * cellSource label maps, an object is its own map. `tone` is info\n\t\t * (default), success, warning or error. Hidden while a value is\n\t\t * missing, so a half-filled sentence never shows.\n\t\t *\n\t\t * @spec openspec/changes/chart-notice/specs/chart-notice/spec.md#requirement-a-chart-can-carry-a-notice-with-record-values\n\t\t */\n\t\tnotice: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A line under the chart (\"Klik een balk om de zaken te zien\"),\n\t\t * through the host's translate: under the rows of a `bar-list` or\n\t\t * `matrix`, and under the plot of an ApexCharts type.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\tfootnote: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Horizontal reference lines on the value axis of a line, area or bar\n\t\t * chart, such as a norm: `[{ value, label?, color? }]`. Drawn dashed;\n\t\t * the label goes through the host's translate. The colour defaults to\n\t\t * the theme's error colour. `valuePath` reads the value from the\n\t\t * endpoint answer instead, `{value}` in the label writes it, and a\n\t\t * line without a value is not drawn.\n\t\t *\n\t\t * @type {Array<{value?: number, valuePath?: string, label?: string, color?: string}>}\n\t\t */\n\t\treferenceLines: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * How date categories read on the x-axis: `month` (\"jan\") or\n\t\t * `month-year` (\"jan 2026\"), in the user's language. A category that\n\t\t * is not a date is shown as is. Empty shows the categories unchanged.\n\t\t *\n\t\t * `week` writes an ISO week key (`2026-W40`) as \"w40\".\n\t\t *\n\t\t * @type {''|'month'|'month-year'|'week'}\n\t\t */\n\t\tcategoryFormat: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The `matrix` cell to outline, usually the record's on a detail page:\n\t\t * `{ row, column, columnKeys? }`, where `row` and `column` take tokens\n\t\t * such as `@object.behaviour`.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\thighlight: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * `matrix`: read the cells from records that each hold one cell, in\n\t\t * a register: `{ register, schema, filter?, rowField, columnField,\n\t\t * valueField, rowLabelField?, columnLabelField?, rowLabels?,\n\t\t * columnLabels?, valueLabels?, rowOrder?, columnOrder?, rowOrderField?,\n\t\t * columnOrderField?, limit? }`. `filter` takes tokens such as\n\t\t * `@object.matrixVersion`; the list waits while one is unresolved.\n\t\t * With `cellsPath` the matrix sits inside ONE record instead: the\n\t\t * first record `filter` finds (else `fallbackFilter`), its array at\n\t\t * `cellsPath` narrowed by `cellFilter` (tokens allowed), the axis\n\t\t * order from `rowOrderPath` / `columnOrderPath` on that record.\n\t\t * Wins over `series` / `categories`.\n\t\t *\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-records\n\t\t */\n\t\tcellSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Chart data series. Format depends on chart type.\n\t\t * For line/area/bar: [{ name: string, data: number[] }]\n\t\t * For pie/donut: number[]\n\t\t *\n\t\t * @type {Array}\n\t\t */\n\t\tseries: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * X-axis categories (for line, area, bar charts)\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tcategories: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Labels (for pie, donut charts)\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tlabels: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Chart height. A number (or `'250px'`) pins the height in pixels. A\n\t\t * percentage — `'100%'` — fits the chart to its container instead, which\n\t\t * is what a fixed-height surface such as a dashboard tile wants: a\n\t\t * pinned height taller than the tile turns the tile into a scroll\n\t\t * region. `'auto'` derives the height from the width (16:10 for axis\n\t\t * charts). Container fitting needs an ancestor with a resolved height.\n\t\t *\n\t\t * @type {number|string}\n\t\t */\n\t\theight: {\n\t\t\ttype: [Number, String],\n\t\t\tdefault: 250,\n\t\t},\n\n\t\t/**\n\t\t * Chart width. Defaults to '100%' (fills container).\n\t\t *\n\t\t * @type {number|string}\n\t\t */\n\t\twidth: {\n\t\t\ttype: [Number, String],\n\t\t\tdefault: '100%',\n\t\t},\n\n\t\t/**\n\t\t * Custom ApexCharts options (deep-merged with defaults).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\toptions: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Chart color palette. Defaults to Nextcloud theme colors.\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tcolors: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Show or hide the toolbar (zoom, download, etc.)\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\ttoolbar: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Show or hide the legend\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tlegend: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Label shown when ApexCharts is not available\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tunavailableLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Chart library not available'),\n\t\t},\n\n\t\t/**\n\t\t * Render bar charts horizontally (row bars instead of columns).\n\t\t * Only meaningful for `type: \"bar\"`; an explicit\n\t\t * `options.plotOptions.bar.horizontal` still wins (deep-merge).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\thorizontal: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * How the value axis picks its baseline — the guard against a chart\n\t\t * that turns a trivial difference into a dramatic one.\n\t\t *\n\t\t * - `\"auto\"` (default) — anchor magnitude marks (bar / area) at zero,\n\t\t * and stop line charts from zooming so far in that noise fills the\n\t\t * plot. Never clamps when the data goes negative.\n\t\t * - `\"zero\"` — always anchor at zero (ignored when data goes negative).\n\t\t * - `\"fit\"` — the old behaviour: let ApexCharts frame the data range.\n\t\t * Use for series that live far from zero (a percentage hovering\n\t\t * 95–99, a temperature) where a zero baseline flattens the signal.\n\t\t *\n\t\t * An explicit `options.yaxis.min` / `max` still wins through the\n\t\t * deep-merge.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tvalueAxisBaseline: {\n\t\t\ttype: String,\n\t\t\tdefault: 'auto',\n\t\t\tvalidator: (v) => ['auto', 'zero', 'fit'].includes(v),\n\t\t},\n\n\t\t/**\n\t\t * Legend placement override: `top | bottom | left | right`. Empty (the\n\t\t * default) keeps the pre-existing automatic placement (bottom for\n\t\t * pie-family charts, top otherwise).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tlegendPosition: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator: (v) => ['', 'top', 'bottom', 'left', 'right'].includes(v),\n\t\t},\n\n\t\t/**\n\t\t * Named value formatter applied to the VALUE axis labels and the\n\t\t * tooltip: `\"currency\"` (Intl currency, 0 decimals), `\"currency-compact\"`\n\t\t * (compact notation, e.g. `€ 1,2K`), or `\"percent\"` (appends `%`). The\n\t\t * object form `{ name, currency?, decimals? }` overrides the ISO-4217\n\t\t * currency code (EUR default, guarded) and the fraction digits.\n\t\t * `null` (the default) keeps raw values.\n\t\t *\n\t\t * @type {string|{name: string, currency?: string, decimals?: number}|null}\n\t\t */\n\t\tvalueFormat: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Per-category colour map (`{ categoryLabel: cssColor }`) applied to\n\t\t * pie / donut / radialBar slices and (distributed) bar categories.\n\t\t * Categories without an entry keep the default palette colour. `null`\n\t\t * (the default) keeps the palette-based colouring.\n\t\t *\n\t\t * @type {Record<string, string>|null}\n\t\t */\n\t\tcolorMap: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Empty-state message rendered INSTEAD of the chart when the resolved\n\t\t * series contain no data points. Empty (the default) keeps the\n\t\t * pre-existing behaviour (an empty chart canvas).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\temptyLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * `matrix`: the text of a cell without a value (\"geen\"), through the\n\t\t * host's translate. Empty (the default) leaves the cell blank.\n\t\t *\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\temptyCellLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Manifest dataSource block. When set, `series` /\n\t\t * `categories` / `labels` are resolved from the GraphQL\n\t\t * response via the dataSource selectors and override the\n\t\t * static props of the same names. Static props remain the\n\t\t * fallback while the query is loading or when no\n\t\t * dataSource is configured.\n\t\t *\n\t\t * Supported shapes (one of):\n\t\t * - Count shorthand: `{ register?, schema, filter?, aggregate: 'count' }`\n\t\t * - Bucket shorthand: `{ register?, schema, filter?,\n\t\t * bucket: { field, interval, metric?, metricField?,\n\t\t * fromVar?, toVar?, staticRange? } }` — emits OR's\n\t\t * `groupBy` argument. When mounted under a CnDashboardPage\n\t\t * with `dateRange.enabled`, `from` / `to` come from the\n\t\t * injected `cnDashboardDateRange` ref; otherwise they come\n\t\t * from `bucket.staticRange`. If neither is available no\n\t\t * query is fired and the chart shows its fallback.\n\t\t * - Raw GraphQL: `{ graphql: { query, variables?, selectors } }`.\n\t\t * - Aggregation shorthand (Wave 3, #91): `aggregate` as an OBJECT —\n\t\t * `{ groupBy, metric?: 'count'|'sum', sumField?, topN?,\n\t\t * otherBucket?, labelResolve?: { register?, schema, labelField?,\n\t\t * colorField? } }` — a categorical group-by over the schema's\n\t\t * objects. Served by OpenRegister's `/grouped` facet endpoint\n\t\t * (the server aggregates); when that endpoint is unavailable the\n\t\t * widget falls back to fetching the collection and grouping\n\t\t * client-side. `topN` keeps the N largest groups (sorted by value\n\t\t * desc) and `otherBucket: true` folds the remainder into a single\n\t\t * translated \"Other\" slice (sum of the rest). `labelResolve`\n\t\t * swaps reference (uuid) group keys for the referenced objects'\n\t\t * `labelField` labels via the shared object store (per-id cache +\n\t\t * request dedup — the fkResolve pattern), and `colorField` reads a\n\t\t * per-category colour off each referenced object (feeding the\n\t\t * same per-category colour path as the `colorMap` prop, which\n\t\t * wins on overlap). `metric: 'sum'` requires `sumField`.\n\t\t * `mergeByLabel: true` folds groups whose labels read the same\n\t\t * into one, summed, before `topN`; a merged bar drills down with\n\t\t * all its keys as a list.\n\t\t *\n\t\t * Drilldown (Wave 3, #91): a sibling `drilldown: { route,\n\t\t * filterParam }` block makes every segment / bar click navigate to\n\t\t * `route` (a route NAME, or a PATH when it starts with `/`) with\n\t\t * the clicked category's RAW key in the query —\n\t\t * `{ [filterParam]: rawKey }` — so an index page opens pre-filtered.\n\t\t * The folded \"Other\" bucket never navigates (it has no single\n\t\t * category value).\n\t\t *\n\t\t * @type {{\n\t\t * register?: string,\n\t\t * schema?: string,\n\t\t * filter?: object,\n\t\t * aggregate?: ('count'|{ groupBy: string, metric?: string, sumField?: string, topN?: number, otherBucket?: boolean, mergeByLabel?: boolean, labelResolve?: { register?: string, schema: string, labelField?: string, colorField?: string } }),\n\t\t * drilldown?: { route: string, filterParam: string },\n\t\t * bucket?: { field: string, interval: string, metric?: string, metricField?: string, fromVar?: string, toVar?: string, staticRange?: { from: string, to: string } },\n\t\t * graphql?: { query: string, variables?: object, selectors: object }\n\t\t * }|null}\n\t\t */\n\t\tdataSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Endpoint data binding (Wave 2, #91). Reads `series` / `categories` /\n\t\t * `labels` from an arbitrary app REST endpoint through the shared\n\t\t * `useEndpointSource` engine (token-resolved `params`, per-(url+params)\n\t\t * request dedup + short-TTL cache, `cn:page:refresh` subscription).\n\t\t * Exactly one of `dataSource` | `endpointSource` (validator-enforced);\n\t\t * endpoint data wins when both slip through. Static `series` /\n\t\t * `categories` / `labels` props stay the fallback while loading.\n\t\t *\n\t\t * The response mapping keys live INSIDE this block (not as sibling\n\t\t * props) because the flat `series` / `labels` prop names already carry\n\t\t * the static data:\n\t\t * - `responsePath` — dot-path pluck of the payload (default whole body).\n\t\t * - When the payload is an ARRAY of points (e.g. pipelinq\n\t\t * `/api/analytics/trends` → `series: [{ date, value }]` with\n\t\t * `responsePath: 'series'`): `labelsPath` / `series[].path` are\n\t\t * PER-ITEM field paths — `labelsPath: 'date'`,\n\t\t * `series: [{ name: 'Leads', path: 'value' }]`.\n\t\t * - When the payload is an OBJECT: `labelsPath` / `series[].path`\n\t\t * point at parallel arrays — `labelsPath: 'labels'`,\n\t\t * `series: [{ name: 'Total', path: 'totals' }]`.\n\t\t *\n\t\t * Pie-family charts (`pie` / `donut` / `radialBar`) flatten the FIRST\n\t\t * mapped series into the flat value array ApexCharts expects. `params`\n\t\t * values use the shared filter-token grammar (`@workspace.dateFrom?`,\n\t\t * `@workspace.datePreset?`, `@me`, `@today±Nd`, …) and re-resolve +\n\t\t * refetch automatically when the dashboard date range changes (the\n\t\t * page publishes `dateFrom` / `dateTo` / `datePreset` into the\n\t\t * workspace context).\n\t\t *\n\t\t * `series[].namePath` names a series from the whole response (before\n\t\t * `responsePath`), for an endpoint that says what its numbers measure.\n\t\t *\n\t\t * @type {{url: string, method?: string, params?: object, responsePath?: string, labelsPath?: string, series?: Array<{name?: string, namePath?: string, path: string}>}|null}\n\t\t */\n\t\tendpointSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * In-widget view switcher (the Wave-4 amendment folded into Wave 3,\n\t\t * #91): each entry declares a named display view —\n\t\t * `{ key, label?, series?, valueFormat? }`. When 2+ views are\n\t\t * configured a compact pill row renders above the chart; the active\n\t\t * view's `series` (an array of series NAMES) filters which of the\n\t\t * resolved cartesian series render, and its `valueFormat` overrides\n\t\t * the widget-level `valueFormat` (same named-formatter grammar).\n\t\t * This is PURE DISPLAY — no series arithmetic — covering the €/%\n\t\t * and hours/% toggles (shillinq Margin / BillableHours) with zero\n\t\t * client-side computation. Empty (the default) renders no switcher.\n\t\t *\n\t\t * @type {Array<{key: string, label?: string, series?: string[], valueFormat?: (string|object)}>}\n\t\t */\n\t\tviews: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Widget id used to match `cn:widget:refresh` event-bus events\n\t\t * (broadcast by CnWidgetWrapper's Refresh action). When the bus\n\t\t * fires with a matching `widgetId`, the chart re-queries its\n\t\t * `dataSource`. Passed by CnDashboardPage from the layout item.\n\t\t * Empty disables bus-driven refresh (the chart still refetches\n\t\t * reactively when its dataSource / range changes).\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\t// useDataSource is a no-op when `dataSource` is null/undefined\n\t\t// — it never fires a request and always resolves `data.value`\n\t\t// to null, so the static `series`/`categories`/`labels` props\n\t\t// remain the source of truth in that case.\n\t\t//\n\t\t// We pipe the injected `cnDashboardDateRange` ref through as\n\t\t// the `range` source; useDataSource only reads it for the\n\t\t// bucket shorthand, so the other shorthand forms are\n\t\t// unaffected.\n\t\t//\n\t\t// Inject is also exposed via Options API (above), but reading\n\t\t// it again here in setup ensures we hand the SAME ref to\n\t\t// useDataSource — Vue treats inject() within setup and the\n\t\t// Options `inject:` declaration as the same resolution.\n\t\tconst range = inject('cnDashboardDateRange', null) || ref(null)\n\t\t// The `bucket` (time), `groupBy` (category), and OBJECT-form\n\t\t// `aggregate` (Wave 3) shorthands are fetched over REST by this\n\t\t// component (fetchTimeBucket / fetchGroupBy / fetchAggregateSource)\n\t\t// against OpenRegister's /timeseries + /grouped aggregation\n\t\t// endpoints — the GraphQL bucket path is bypassed. Hide those shapes\n\t\t// from useDataSource so it stays a no-op for them (raw `graphql` /\n\t\t// the STRING `aggregate: 'count'` still flow through it).\n\t\tconst dsForGraphql = () => {\n\t\t\tconst ds = props.dataSource\n\t\t\tif (ds && (ds.bucket || ds.groupBy)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (ds && ds.aggregate && typeof ds.aggregate === 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn ds\n\t\t}\n\t\tconst { data, refetch } = useDataSource(dsForGraphql, { range })\n\n\t\t// Endpoint binding (Wave 2, #91): the shared useEndpointSource engine\n\t\t// resolves `params` tokens against the page-level workspace context\n\t\t// (the dashboard publishes dateFrom / dateTo / datePreset into it), so\n\t\t// a date-range change re-resolves + refetches automatically. No-op\n\t\t// while `endpointSource` is null. The chart's existing\n\t\t// cn:widget:refresh handler routes through refresh() (which also\n\t\t// re-runs this source), so no widgetId is passed here — the composable\n\t\t// still covers cn:page:refresh.\n\t\tconst objectCtxRaw = inject('cnObjectContext', null)\n\t\t// v2 slot-grid detail context (CnPageRenderer holder) — backfills the\n\t\t// object token context so `@objectId` / `@object.<field>` params\n\t\t// resolve on detail surfaces where CnDetailPage is not an ancestor\n\t\t// (the ZGW sidebar-tab contract, #91 Wave 3).\n\t\tconst detailCtxRaw = inject('cnDetailObjectContext', null)\n\t\tconst workspaceRaw = inject('cnWorkspaceContext', ref({}))\n\t\tconst appConfigRaw = inject('cnAppConfig', ref({}))\n\t\tconst unwrap = (v) => ((v && typeof v === 'object' && 'value' in v) ? v.value : v)\n\t\t// One token context for EVERY declarative binding on this widget —\n\t\t// the endpoint params AND the REST-aggregation source filters, so\n\t\t// `@objectId` / `@object.<field>` / `@workspace.<key>` /\n\t\t// `@config.<key>` resolve identically in both (#91 Wave 3).\n\t\tconst chartTokenCtx = () => ({\n\t\t\t...(resolveObjectTokenContext(objectCtxRaw, detailCtxRaw) || {}),\n\t\t\tworkspace: unwrap(workspaceRaw) || {},\n\t\t\tconfig: unwrap(appConfigRaw) || {},\n\t\t})\n\t\tconst ep = useEndpointSource(\n\t\t\t() => props.endpointSource,\n\t\t\t{ ctx: chartTokenCtx },\n\t\t)\n\t\treturn { dsData: data, dsRefetch: refetch, epData: ep.data, epBody: ep.body, epError: ep.error, epRefused: ep.refused, epTruncated: ep.truncated, epBlocked: ep.blocked, epAwaitingRequest: ep.awaitingRequest, epRequest: ep.request, epRefetch: ep.refetch, chartTokenCtx }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tchartComponent: null,\n\t\t\t// Series/categories resolved from a categorical `dataSource.groupBy`\n\t\t\t// (REST /grouped) or a time `dataSource.bucket` (REST /timeseries),\n\t\t\t// kept separate from the raw-GraphQL path (`dsData`). Null until the\n\t\t\t// respective source resolves.\n\t\t\tgroupByData: null,\n\t\t\tbucketData: null,\n\t\t\t// Series/categories resolved from the OBJECT-form\n\t\t\t// `dataSource.aggregate` (Wave 3, #91): server /grouped facet with\n\t\t\t// a client-side collection fallback, top-N + Other folding, and\n\t\t\t// fkResolve-style label/colour resolution. Shape when resolved:\n\t\t\t// `{ series, categories, labels, rawKeys, colorMap? }` — `rawKeys`\n\t\t\t// carries the UNRESOLVED group keys (uuids / raw values) so a\n\t\t\t// `drilldown` click navigates with the filterable value, not the\n\t\t\t// display label.\n\t\t\taggregateData: null,\n\t\t\t// The `cellSource` matrix, laid out (`{ series, categories, columnKeys }`), or null.\n\t\t\tcellData: null,\n\t\t\t// Active `views[]` switcher key (null = the first view). Local\n\t\t\t// UI state only — never persisted.\n\t\t\tactiveViewKey: null,\n\t\t\t// Pre-translated aria-label for the views pill group, evaluated\n\t\t\t// once at creation (data, not computed — matches the dashboard\n\t\t\t// date-chip convention).\n\t\t\tviewsGroupLabel: t('nextcloud-vue', 'Chart view'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Whether `height` asks the chart to fit its container (a percentage)\n\t\t * rather than pin a pixel height. Switches the root to a flex column\n\t\t * with a leftover-sized canvas box so apexcharts' own percentage maths\n\t\t * resolves against the available space.\n\t\t *\n\t\t * @return {boolean} true for a percentage height.\n\t\t */\n\t\tfitToContainer() {\n\t\t\treturn typeof this.height === 'string' && this.height.trim().endsWith('%')\n\t\t},\n\n\t\tcomputedHeight() {\n\t\t\treturn this.height\n\t\t},\n\n\t\tcomputedWidth() {\n\t\t\treturn this.width\n\t\t},\n\n\t\t/**\n\t\t * Series/categories/labels mapped from a resolved `endpointSource`\n\t\t * payload (Wave 2), or null while the source is absent / unresolved.\n\t\t *\n\t\t * Mapping rules (see the `endpointSource` prop docblock):\n\t\t * - ARRAY payload → `labelsPath` / `series[].path` are per-item field\n\t\t * paths (one point per array item).\n\t\t * - OBJECT payload → they point at parallel arrays.\n\t\t * - Pie-family types flatten the first mapped series into the flat\n\t\t * value array ApexCharts expects.\n\t\t * - `rowsPath` names an array of rows, one series each: the series'\n\t\t * name at `rowLabelPath` (default `label`), its values at\n\t\t * `rowValuesPath` (default `values`).\n\t\t *\n\t\t * @return {{series: Array, categories: Array<string>, labels: Array<string>}|null}\n\t\t */\n\t\tendpointChartData() {\n\t\t\tconst es = this.endpointSource\n\t\t\tif (!es || !es.url) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst payload = this.epData\n\t\t\tif (payload === null || payload === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst seriesDefs = Array.isArray(es.series) ? es.series.filter((s) => s && s.path) : []\n\t\t\tlet labels = []\n\t\t\tlet mapped\n\t\t\tif (es.rowsPath) {\n\t\t\t\treturn this.endpointRows(payload, es)\n\t\t\t}\n\t\t\tif (Array.isArray(payload)) {\n\t\t\t\tif (es.labelsPath) {\n\t\t\t\t\tlabels = payload.map((pt) => {\n\t\t\t\t\t\tconst v = getByPath(pt, es.labelsPath)\n\t\t\t\t\t\treturn (v === null || v === undefined) ? '' : String(v)\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tmapped = seriesDefs.map((s) => ({\n\t\t\t\t\tname: this.endpointSeriesName(s),\n\t\t\t\t\tdata: payload.map((pt) => Number(getByPath(pt, s.path)) || 0),\n\t\t\t\t}))\n\t\t\t} else {\n\t\t\t\tconst rawLabels = es.labelsPath ? getByPath(payload, es.labelsPath) : undefined\n\t\t\t\tlabels = Array.isArray(rawLabels)\n\t\t\t\t\t? rawLabels.map((v) => ((v === null || v === undefined) ? '' : String(v)))\n\t\t\t\t\t: []\n\t\t\t\tmapped = seriesDefs.map((s) => {\n\t\t\t\t\tconst values = getByPath(payload, s.path)\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: this.endpointSeriesName(s),\n\t\t\t\t\t\tdata: Array.isArray(values) ? values.map((v) => Number(v) || 0) : [],\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn { series: (mapped[0] && mapped[0].data) || [], categories: labels, labels }\n\t\t\t}\n\t\t\treturn { series: mapped, categories: labels, labels }\n\t\t},\n\n\t\t/**\n\t\t * Series shown to ApexCharts. An `endpointSource` (Wave 2) wins,\n\t\t * then the REST aggregate/bucket/groupBy data, then `dsData.series`\n\t\t * from a GraphQL `dataSource`; otherwise falls back to the static\n\t\t * `series` prop. Same fallback rule applies to `categories`\n\t\t * and `labels`.\n\t\t */\n\t\tresolvedSeries() {\n\t\t\tif (this.cellData) {\n\t\t\t\treturn this.cellData.series\n\t\t\t}\n\t\t\tconst ep = this.endpointChartData\n\t\t\tif (ep) {\n\t\t\t\treturn ep.series\n\t\t\t}\n\t\t\tconst rest = this.aggregateData || this.bucketData || this.groupByData\n\t\t\tif (rest?.series !== undefined) {\n\t\t\t\treturn rest.series\n\t\t\t}\n\t\t\tconst fromDs = this.dsData?.series\n\t\t\treturn fromDs !== undefined ? fromDs : this.series\n\t\t},\n\n\t\tresolvedCategories() {\n\t\t\tif (this.cellData) {\n\t\t\t\treturn this.cellData.categories\n\t\t\t}\n\t\t\tconst ep = this.endpointChartData\n\t\t\tif (ep) {\n\t\t\t\treturn ep.categories\n\t\t\t}\n\t\t\tconst rest = this.aggregateData || this.bucketData || this.groupByData\n\t\t\tif (rest?.categories !== undefined) {\n\t\t\t\treturn rest.categories\n\t\t\t}\n\t\t\tconst fromDs = this.dsData?.categories\n\t\t\treturn fromDs !== undefined ? fromDs : this.categories\n\t\t},\n\n\t\tresolvedLabels() {\n\t\t\tif (this.cellData) {\n\t\t\t\treturn this.cellData.categories\n\t\t\t}\n\t\t\tconst ep = this.endpointChartData\n\t\t\tif (ep) {\n\t\t\t\treturn ep.labels\n\t\t\t}\n\t\t\tconst rest = this.aggregateData || this.bucketData || this.groupByData\n\t\t\tif (rest?.labels !== undefined) {\n\t\t\t\treturn rest.labels\n\t\t\t}\n\t\t\tconst fromDs = this.dsData?.labels\n\t\t\treturn fromDs !== undefined ? fromDs : this.labels\n\t\t},\n\n\t\t/**\n\t\t * The OBJECT-form `dataSource.aggregate` block (Wave 3), or null —\n\t\t * the STRING form (`aggregate: 'count'`) stays on the GraphQL path.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\taggregateDef() {\n\t\t\tconst agg = this.dataSource && this.dataSource.aggregate\n\t\t\treturn (agg && typeof agg === 'object' && agg.groupBy) ? agg : null\n\t\t},\n\n\t\t/**\n\t\t * The `dataSource.drilldown` block (Wave 3) when it is actionable —\n\t\t * both `route` and `filterParam` set — else null.\n\t\t *\n\t\t * @return {{route: string, filterParam: string}|null}\n\t\t */\n\t\tdrilldownDef() {\n\t\t\tconst d = this.dataSource && this.dataSource.drilldown\n\t\t\treturn (d && d.route && d.filterParam) ? d : null\n\t\t},\n\n\t\t/**\n\t\t * The RAW (unresolved) category keys backing the rendered\n\t\t * slices/bars, index-aligned with the resolved labels — what a\n\t\t * drilldown click puts in the route query. Aggregate and groupBy\n\t\t * data carry explicit `rawKeys`; other paths fall back to the\n\t\t * display labels/categories (raw == label there).\n\t\t *\n\t\t * @return {string[]}\n\t\t */\n\t\tdrilldownKeys() {\n\t\t\tconst rest = this.aggregateData || this.groupByData\n\t\t\tif (rest && Array.isArray(rest.rawKeys)) {\n\t\t\t\treturn rest.rawKeys\n\t\t\t}\n\t\t\tconst keys = ['pie', 'donut', 'radialBar'].includes(this.type)\n\t\t\t\t? this.resolvedLabels\n\t\t\t\t: this.resolvedCategories\n\t\t\treturn Array.isArray(keys) ? keys.map((k) => String(k)) : []\n\t\t},\n\n\t\t/** Stable signature of the aggregate source (else null). */\n\t\taggregateKey() {\n\t\t\tconst agg = this.aggregateDef\n\t\t\tif (!agg || !this.dataSource.schema) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn JSON.stringify({\n\t\t\t\tregister: this.dataSource.register || '',\n\t\t\t\tschema: this.dataSource.schema,\n\t\t\t\tfilter: this.dataSource.filter || {},\n\t\t\t\taggregate: agg,\n\t\t\t})\n\t\t},\n\n\t\t/** Stable signature of a categorical groupBy source (else null). */\n\t\tgroupByKey() {\n\t\t\tconst gb = this.dataSource && this.dataSource.groupBy\n\t\t\tif (!gb || !this.dataSource.schema) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn JSON.stringify({\n\t\t\t\tregister: this.dataSource.register || '',\n\t\t\t\tschema: this.dataSource.schema,\n\t\t\t\tfilter: this.dataSource.filter || {},\n\t\t\t\tgroupBy: gb,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The injected dashboard date range as a plain `{from, to, preset}`\n\t\t * object, or null.\n\t\t *\n\t\t * Vue 3 auto-unwraps a ref reached through the Options `inject:`\n\t\t * declaration, so `this.cnDashboardDateRange` is ALREADY the value and\n\t\t * reading `.value` off it yields undefined. That deref survived the\n\t\t * Vue 2.7 → Vue 3 move and pinned every bucket chart to its fallback\n\t\t * window — while the chip label, which reads the value correctly, kept\n\t\t * updating. Still tolerates a raw ref, for a consumer that provides one\n\t\t * outside the Options inject path.\n\t\t *\n\t\t * @return {{from: string, to: string, preset?: string}|null} The active range.\n\t\t */\n\t\tactiveRange() {\n\t\t\tconst r = this.cnDashboardDateRange\n\t\t\tif (!r || typeof r !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn ('value' in r) ? (r.value || null) : r\n\t\t},\n\n\t\t/** Stable signature of a time-bucket source + the active range (else null). */\n\t\tbucketKey() {\n\t\t\tconst b = this.dataSource && this.dataSource.bucket\n\t\t\tif (!b || !this.dataSource.schema) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst r = this.activeRange\n\t\t\treturn JSON.stringify({\n\t\t\t\tregister: this.dataSource.register || '',\n\t\t\t\tschema: this.dataSource.schema,\n\t\t\t\tfilter: this.dataSource.filter || {},\n\t\t\t\tbucket: b,\n\t\t\t\trange: r ? { from: r.from, to: r.to } : null,\n\t\t\t})\n\t\t},\n\n\t\tdefaultColors() {\n\t\t\tif (this.colors.length > 0) {\n\t\t\t\treturn this.colors\n\t\t\t}\n\t\t\t// Element tokens stay bright in dark mode, where the plain status\n\t\t\t// tokens are dark background tints. Each falls back for Nextcloud < 32.\n\t\t\treturn [\n\t\t\t\t'var(--color-primary-element, #0082c9)',\n\t\t\t\t'var(--color-element-success, var(--color-success, #46ba61))',\n\t\t\t\t'var(--color-element-warning, var(--color-warning, #e9a300))',\n\t\t\t\t'var(--color-element-error, var(--color-error, #e04224))',\n\t\t\t\t'var(--color-text-maxcontrast, #767676)',\n\t\t\t\t'var(--color-element-info, #0099e0)',\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * The active `views[]` entry: the one matching `activeViewKey`,\n\t\t * else the FIRST configured view, else null (no switcher).\n\t\t *\n\t\t * @return {{key: string, label?: string, series?: string[], valueFormat?: (string|object)}|null}\n\t\t */\n\t\tactiveView() {\n\t\t\tif (!Array.isArray(this.views) || this.views.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn this.views.find((v) => v && v.key === this.activeViewKey) || this.views[0]\n\t\t},\n\n\t\t/**\n\t\t * The series actually handed to ApexCharts: the resolved series,\n\t\t * filtered to the active view's named `series` when the view\n\t\t * declares any (cartesian charts only — pie-family series are flat\n\t\t * value arrays with no names to filter on). Falls back to the full\n\t\t * resolved series when the filter matches nothing, so a typo'd view\n\t\t * never blanks the chart.\n\t\t *\n\t\t * @return {Array} The displayed series.\n\t\t */\n\t\t/**\n\t\t * The displayed series with each series name through the host\n\t\t * translate function, so a manifest series named \"Revenue\" reads in\n\t\t * the user's language in the legend and the tooltip. Views still\n\t\t * filter on the name as written (`displayedSeries`).\n\t\t *\n\t\t * @spec openspec/changes/screens-dashboard-i18n/specs/dashboard-page/spec.md#requirement-chart-view-labels-and-series-names-are-translated\n\t\t * @return {Array} The series handed to ApexCharts.\n\t\t */\n\t\tplottedSeries() {\n\t\t\tconst series = this.displayedSeries\n\t\t\tif (!Array.isArray(series)) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\treturn series.map((entry) => (entry && typeof entry === 'object' && typeof entry.name === 'string' && entry.name !== '')\n\t\t\t\t? { ...entry, name: this.hostTranslate(entry.name) }\n\t\t\t\t: entry)\n\t\t},\n\n\t\tdisplayedSeries() {\n\t\t\tconst series = this.resolvedSeries\n\t\t\tconst view = this.activeView\n\t\t\tif (!view || !Array.isArray(view.series) || view.series.length === 0) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\tif (!Array.isArray(series)) {\n\t\t\t\treturn series\n\t\t\t}\n\t\t\tconst filtered = series.filter((s) => s && view.series.includes(s.name))\n\t\t\treturn filtered.length > 0 ? filtered : series\n\t\t},\n\n\t\t/**\n\t\t * Every plotted number across the displayed series, flattened.\n\t\t * Handles both cartesian (`[{name, data: []}]`) and flat\n\t\t * (`[1, 2, 3]`) series shapes, and all three datapoint forms\n\t\t * ApexCharts accepts: a bare number, `{x, y}`, and `[x, y]`.\n\t\t * Non-numeric entries are dropped.\n\t\t *\n\t\t * @return {number[]} The plotted values.\n\t\t */\n\t\tplottedValues() {\n\t\t\tconst out = []\n\t\t\tconst push = (v) => {\n\t\t\t\t// A datapoint's VALUE is `y` — the second slot in the tuple form.\n\t\t\t\t// Without the tuple case an `[x, y]` series read as all-NaN and\n\t\t\t\t// dropped every point, which silently disabled `valueAxisBounds`.\n\t\t\t\tlet raw = v\n\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\traw = v[1]\n\t\t\t\t} else if (typeof v === 'object' && v !== null) {\n\t\t\t\t\traw = v.y\n\t\t\t\t}\n\t\t\t\tconst n = Number(raw)\n\t\t\t\tif (Number.isFinite(n)) {\n\t\t\t\t\tout.push(n)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const s of (Array.isArray(this.displayedSeries) ? this.displayedSeries : [])) {\n\t\t\t\tif (Array.isArray(s)) {\n\t\t\t\t\ts.forEach(push)\n\t\t\t\t} else if (s && Array.isArray(s.data)) {\n\t\t\t\t\ts.data.forEach(push)\n\t\t\t\t} else {\n\t\t\t\t\tpush(s)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * Value-axis bounds that keep a small difference looking small.\n\t\t *\n\t\t * ApexCharts frames the data range by default, so a series of 7 and 6\n\t\t * renders as a full-height drop — the reader sees a collapse where the\n\t\t * data says \"one fewer\". Bar and area encode magnitude by length and\n\t\t * area, so their baseline MUST be zero or the mark misstates the ratio;\n\t\t * line encodes position, so it may sit off zero but still shouldn't\n\t\t * zoom until noise fills the plot.\n\t\t *\n\t\t * Returns null to leave ApexCharts' own scaling alone — for pie-family\n\t\t * charts, `\"fit\"`, empty data, any series that goes negative (where\n\t\t * clamping to zero would crop real values), and stacked charts.\n\t\t *\n\t\t * Stacked is the subtle one: `plottedValues` flattens INDIVIDUAL\n\t\t * datapoints, but a stacked mark's height is the per-category SUM, which is\n\t\t * larger — two series of [6, 7] and [5, 4] reach 11 against a ceiling of\n\t\t * niceCeil(7) = 8, so the bars would clip. ApexCharts already baselines\n\t\t * stacked charts at zero, so deferring to it costs only the rounded\n\t\t * headroom, not the honest baseline. There is no `stacked` prop; it arrives\n\t\t * via `options.chart.stacked`, which the deep-merge honours.\n\t\t *\n\t\t * @return {{min: number, max: number}|null} Axis bounds, or null to autoscale.\n\t\t */\n\t\tvalueAxisBounds() {\n\t\t\tif (this.valueAxisBaseline === 'fit') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (this.options?.chart?.stacked) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst values = this.plottedValues\n\t\t\tif (values.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\t// A single pass, not `Math.min(...values)`: the spread passes one\n\t\t\t// ARGUMENT per datapoint, which throws RangeError once the series\n\t\t\t// outgrows the engine's argument limit (~65k). Minute buckets over\n\t\t\t// the 12-month window `fetchTimeBucket` falls back to reach that.\n\t\t\tlet dataMin = values[0]\n\t\t\tlet dataMax = values[0]\n\t\t\tfor (const v of values) {\n\t\t\t\tif (v < dataMin) {\n\t\t\t\t\tdataMin = v\n\t\t\t\t}\n\t\t\t\tif (v > dataMax) {\n\t\t\t\t\tdataMax = v\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Negative values: a zero floor would crop them. Leave the framing\n\t\t\t// to ApexCharts, which already spans zero for magnitude marks.\n\t\t\tif (dataMin < 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\t// A flat all-zero series has no scale to infer — give it a token\n\t\t\t// ceiling so the axis renders instead of collapsing.\n\t\t\tif (dataMax === 0) {\n\t\t\t\treturn { min: 0, max: 1 }\n\t\t\t}\n\t\t\tconst zeroBaseline = this.valueAxisBaseline === 'zero'\n\t\t\t\t|| ['bar', 'area'].includes(this.type)\n\t\t\tif (zeroBaseline) {\n\t\t\t\treturn { min: 0, max: niceCeil(dataMax) }\n\t\t\t}\n\t\t\t// Line/scatter: keep a non-zero baseline, but require the visible\n\t\t\t// window to cover at least a quarter of the data's magnitude so a\n\t\t\t// 1-in-1000 wiggle can't fill the plot.\n\t\t\tconst spread = dataMax - dataMin\n\t\t\tconst minSpread = dataMax * 0.25\n\t\t\tif (spread >= minSpread) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst pad = (minSpread - spread) / 2\n\t\t\treturn { min: Math.max(0, dataMin - pad), max: niceCeil(dataMax + pad) }\n\t\t},\n\n\t\t/**\n\t\t * The value-formatter function derived from `valueFormat` (the\n\t\t * active `views[]` entry's `valueFormat` wins when set), or null.\n\t\t * Applied to the value-axis labels and the tooltip so both read\n\t\t * identically. Non-numeric values pass through untouched.\n\t\t *\n\t\t * @return {((value: unknown) => string)|null}\n\t\t */\n\t\tvalueFormatterFn() {\n\t\t\treturn formatterFor((this.activeView && this.activeView.valueFormat) || this.valueFormat)\n\t\t},\n\n\t\t/**\n\t\t * The effective per-category colour map: the explicit `colorMap`\n\t\t * prop wins; otherwise the map an aggregate `labelResolve.colorField`\n\t\t * built from the referenced objects (Wave 3). Null when neither is\n\t\t * available.\n\t\t *\n\t\t * @return {Record<string, string>|null}\n\t\t */\n\t\teffectiveColorMap() {\n\t\t\tif (this.colorMap && typeof this.colorMap === 'object') {\n\t\t\t\treturn this.colorMap\n\t\t\t}\n\t\t\tconst fromAggregate = this.aggregateData && this.aggregateData.colorMap\n\t\t\treturn (fromAggregate && typeof fromAggregate === 'object') ? fromAggregate : null\n\t\t},\n\n\t\t/**\n\t\t * Palette with the effective per-category colour map applied: one\n\t\t * colour per resolved label/category (map hit, else the default\n\t\t * palette colour by position). Null when no map is set or nothing\n\t\t * resolved yet — the default palette then applies unchanged.\n\t\t *\n\t\t * @return {string[]|null}\n\t\t */\n\t\tmappedColors() {\n\t\t\tconst map = this.effectiveColorMap\n\t\t\tif (!map) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst keys = ['pie', 'donut', 'radialBar'].includes(this.type)\n\t\t\t\t? this.resolvedLabels\n\t\t\t\t: this.resolvedCategories\n\t\t\tif (!Array.isArray(keys) || keys.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst palette = this.defaultColors\n\t\t\treturn keys.map((key, i) => map[key] || palette[i % palette.length])\n\t\t},\n\n\t\t/**\n\t\t * Whether the resolved series carry any data point (pie-family charts\n\t\t * use a flat value array; cartesian charts use `[{ data: [...] }]`).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChartData() {\n\t\t\tconst series = this.resolvedSeries\n\t\t\tif (!Array.isArray(series) || series.length === 0) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn series.some((s) => Array.isArray(s && s.data) && s.data.length > 0)\n\t\t},\n\n\t\t/**\n\t\t * Whether the declarative empty state renders instead of the chart —\n\t\t * only when an `emptyLabel` is configured (default keeps the\n\t\t * pre-existing empty-canvas behaviour).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tshowEmptyState() {\n\t\t\treturn this.emptyLabel !== '' && !this.hasChartData\n\t\t},\n\n\t\t/**\n\t\t * The `cellSource` list as it would be asked, tokens resolved, or null\n\t\t * while there is none or a filter token is unresolved. Refetches when\n\t\t * it changes.\n\t\t *\n\t\t * @return {string|null} The key.\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-records\n\t\t */\n\t\tcellSourceKey() {\n\t\t\tconst src = this.cellSource\n\t\t\tif (!src || typeof src !== 'object' || !src.register || !src.schema || !src.rowField || !src.columnField || !src.valueField) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst ctx = this.chartTokenCtx()\n\t\t\tconst resolve = (value) => resolveFilterTokens(value && typeof value === 'object' ? value : {}, ctx)\n\t\t\tconst filter = resolve(src.filter)\n\t\t\tconst cellFilter = resolve(src.cellFilter)\n\t\t\tif (hasUnresolvedTokens(filter) || hasUnresolvedTokens(cellFilter)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst fallbackFilter = src.fallbackFilter ? resolve(src.fallbackFilter) : null\n\t\t\treturn JSON.stringify({ register: src.register, schema: src.schema, filter, fallbackFilter, cellFilter, limit: src.cellsPath ? 1 : (src.limit || 500) })\n\t\t},\n\n\t\t/** @return {string} The matrix row-label column's grid track. */\n\t\tmatrixLabelColumn() {\n\t\t\tconst width = Number(this.matrixLabelWidth)\n\t\t\treturn Number.isFinite(width) && width > 0 ? `${width}px` : 'minmax(120px, max-content)'\n\t\t},\n\n\t\t/**\n\t\t * The rows of a `bar-list`: the categories of the first displayed\n\t\t * series, each with its value's share of `barMax` (or the largest\n\t\t * value) and the formatted value.\n\t\t *\n\t\t * @return {Array<{index: number, label: string, share: number, text: string, drill: boolean}>}\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-bar-list\n\t\t */\n\t\tbarListRows() {\n\t\t\tconst series = Array.isArray(this.plottedSeries) ? this.plottedSeries[0] : null\n\t\t\tconst values = Array.isArray(series?.data) ? series.data.map((v) => Number(v) || 0) : []\n\t\t\tconst labels = Array.isArray(this.resolvedCategories) ? this.resolvedCategories : []\n\t\t\tconst max = Number.isFinite(this.barMax) && this.barMax > 0 ? this.barMax : Math.max(0, ...values)\n\t\t\tconst drill = Boolean(this.drilldownDef && this.$router)\n\t\t\treturn values.map((value, index) => ({\n\t\t\t\tindex,\n\t\t\t\tlabel: String(labels[index] ?? ''),\n\t\t\t\tshare: max > 0 ? Math.min(100, Math.max(0, (value / max) * 100)) : 0,\n\t\t\t\ttext: this.formatPlain(value),\n\t\t\t\tdrill: drill && this.drilldownKeys[index] !== undefined && this.drilldownKeys[index] !== OTHER_BUCKET_KEY,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The `matrix`: the categories as columns, each displayed series as a\n\t\t * row, and each cell's tint level (1 to 4) by its share of the\n\t\t * largest value.\n\t\t *\n\t\t * @return {{columns: string[], rows: Array<{label: string, cells: Array<{text: string, level: number}>}>}}\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\tmatrix() {\n\t\t\tconst columns = (Array.isArray(this.resolvedCategories) ? this.resolvedCategories : []).map((c) => this.hostTranslate(String(c)))\n\t\t\tconst series = Array.isArray(this.plottedSeries) ? this.plottedSeries.filter((entry) => entry && typeof entry === 'object') : []\n\t\t\tconst max = Math.max(0, ...series.flatMap((entry) => (Array.isArray(entry.data) ? entry.data.map((v) => Number(v) || 0) : [])))\n\t\t\tconst levelOf = (value) => {\n\t\t\t\tconst share = max > 0 ? value / max : 0\n\t\t\t\tif (share >= 0.9) {\n\t\t\t\t\treturn 4\n\t\t\t\t}\n\t\t\t\tif (share >= 0.6) {\n\t\t\t\t\treturn 3\n\t\t\t\t}\n\t\t\t\treturn share >= 0.25 ? 2 : 1\n\t\t\t}\n\t\t\tconst map = this.effectiveColorMap || {}\n\t\t\tconst current = this.matrixHighlight\n\t\t\treturn {\n\t\t\t\tcolumns,\n\t\t\t\trows: series.map((entry, rowIndex) => ({\n\t\t\t\t\tlabel: this.hostTranslate(String(entry.name ?? '')),\n\t\t\t\t\tcells: columns.map((column, index) => {\n\t\t\t\t\t\tconst raw = Array.isArray(entry.data) ? entry.data[index] : undefined\n\t\t\t\t\t\tconst isCurrent = current !== null && current.row === rowIndex && current.column === index\n\t\t\t\t\t\tconst valueLabels = this.cellSource && typeof this.cellSource.valueLabels === 'object' ? this.cellSource.valueLabels : null\n\t\t\t\t\t\tif (valueLabels && raw !== null && raw !== undefined && typeof valueLabels[String(raw)] === 'string') {\n\t\t\t\t\t\t\tconst label = valueLabels[String(raw)]\n\t\t\t\t\t\t\tconst tone = map[String(raw)] || map[label]\n\t\t\t\t\t\t\tconst level = TONE_LEVELS[tone] ?? 0\n\t\t\t\t\t\t\treturn { text: this.hostTranslate(label), level: level || 'tone', color: level ? '' : (tone || ''), current: isCurrent }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof raw === 'string') {\n\t\t\t\t\t\t\tconst tone = map[raw]\n\t\t\t\t\t\t\tconst level = TONE_LEVELS[tone] ?? 0\n\t\t\t\t\t\t\treturn { text: this.hostTranslate(raw), level: level || 'tone', color: level ? '' : (tone || ''), current: isCurrent }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst value = Number(raw)\n\t\t\t\t\t\treturn Number.isFinite(value) && raw !== null && raw !== undefined\n\t\t\t\t\t\t\t? { text: this.formatPlain(value), level: levelOf(value), color: '', current: isCurrent }\n\t\t\t\t\t\t\t: { text: this.emptyCellLabel ? this.hostTranslate(this.emptyCellLabel) : '', level: 0, color: '', current: isCurrent }\n\t\t\t\t\t}),\n\t\t\t\t})),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The notice's bold lead, text and note-card type, values filled in;\n\t\t * null when there is none or a value is missing.\n\t\t *\n\t\t * @return {{lead: string, text: string, type: string}|null} The notice.\n\t\t * @spec openspec/changes/chart-notice/specs/chart-notice/spec.md#requirement-a-chart-can-carry-a-notice-with-record-values\n\t\t */\n\t\tnoticeParts() {\n\t\t\tconst def = this.notice\n\t\t\tif (!def || typeof def !== 'object' || (!def.lead && !def.text)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst declared = def.values && typeof def.values === 'object' ? def.values : {}\n\t\t\tconst resolved = resolveFilterTokens(declared, this.chartTokenCtx())\n\t\t\tconst source = this.cellSource && typeof this.cellSource === 'object' ? this.cellSource : {}\n\t\t\tconst maps = { rows: source.rowLabels, columns: source.columnLabels, values: source.valueLabels }\n\t\t\tconst words = {}\n\t\t\tfor (const name of Object.keys(declared)) {\n\t\t\t\tconst raw = resolved[name]\n\t\t\t\tif (raw === null || raw === undefined || raw === '' || (typeof raw === 'string' && raw.charAt(0) === '@')) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\tconst ref = def.labels && def.labels[name]\n\t\t\t\tconst map = typeof ref === 'string' ? maps[ref] : ref\n\t\t\t\tconst label = map && typeof map === 'object' && typeof map[String(raw)] === 'string' ? map[String(raw)] : null\n\t\t\t\twords[name] = label ? this.hostTranslate(label) : String(raw)\n\t\t\t}\n\t\t\tconst fill = (key) => (key ? this.hostTranslate(key).replace(/\\{(\\w+)\\}/g, (match, name) => (name in words ? words[name] : match)) : '')\n\t\t\tconst type = ['info', 'success', 'warning', 'error'].includes(def.tone) ? def.tone : 'info'\n\t\t\treturn { lead: fill(def.lead), text: fill(def.text), type }\n\t\t},\n\n\t\t/**\n\t\t * The matrix cell of the record (`highlight: { row, column }`, tokens\n\t\t * such as `@object.behaviour` resolved), as row and column indexes. A\n\t\t * row matches its series `key`, its name or its 1-based position; a\n\t\t * column its entry in `highlight.columnKeys`, its label or its\n\t\t * 1-based position. Null when either does not match.\n\t\t *\n\t\t * @return {{row: number, column: number}|null} The cell.\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\tmatrixHighlight() {\n\t\t\tconst def = this.highlight\n\t\t\tif (!def || typeof def !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst resolved = resolveFilterTokens({ row: def.row, column: def.column }, this.chartTokenCtx())\n\t\t\tconst want = (v) => (v === null || v === undefined || v === '' ? null : String(v))\n\t\t\tconst row = want(resolved.row)\n\t\t\tconst column = want(resolved.column)\n\t\t\tif (row === null || column === null) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst series = Array.isArray(this.plottedSeries) ? this.plottedSeries : []\n\t\t\tconst rowIndex = series.findIndex((entry, i) => entry && (String(entry.key ?? '') === row || String(entry.name ?? '') === row || String(i + 1) === row))\n\t\t\tconst columns = Array.isArray(this.resolvedCategories) ? this.resolvedCategories.map((c) => String(c)) : []\n\t\t\tconst declared = Array.isArray(def.columnKeys) ? def.columnKeys : (this.cellData ? this.cellData.columnKeys : [])\n\t\t\tconst keys = declared.map((k) => String(k))\n\t\t\tlet columnIndex = keys.indexOf(column)\n\t\t\tif (columnIndex < 0) {\n\t\t\t\tcolumnIndex = columns.findIndex((c, i) => c === column || String(i + 1) === column)\n\t\t\t}\n\t\t\treturn rowIndex >= 0 && columnIndex >= 0 ? { row: rowIndex, column: columnIndex } : null\n\t\t},\n\n\t\t/** @return {string} The matrix table's accessible name. */\n\t\tmatrixLabel() {\n\t\t\treturn this.footnote ? this.hostTranslate(this.footnote) : t('nextcloud-vue', 'Chart data')\n\t\t},\n\n\t\t/**\n\t\t * The x-axis categories as shown: with `categoryFormat`, date\n\t\t * categories as short months in the user's language.\n\t\t *\n\t\t * @return {Array<string|number>} The categories.\n\t\t */\n\t\tdisplayCategories() {\n\t\t\tconst categories = Array.isArray(this.resolvedCategories) ? this.resolvedCategories : []\n\t\t\tif (this.categoryFormat === 'week') {\n\t\t\t\treturn categories.map((category) => {\n\t\t\t\t\tconst week = /^\\d{4}-W(\\d{1,2})$/.exec(String(category))\n\t\t\t\t\treturn week ? t('nextcloud-vue', 'w{week}', { week: Number(week[1]) }) : category\n\t\t\t\t})\n\t\t\t}\n\t\t\tif (this.categoryFormat !== 'month' && this.categoryFormat !== 'month-year') {\n\t\t\t\treturn categories\n\t\t\t}\n\t\t\tconst options = this.categoryFormat === 'month' ? { month: 'short' } : { month: 'short', year: 'numeric' }\n\t\t\treturn categories.map((category) => {\n\t\t\t\t// A year bucket (\"2026\") names no month, so it stays as written.\n\t\t\t\tif (/^\\d{4}$/.test(String(category))) {\n\t\t\t\t\treturn category\n\t\t\t\t}\n\t\t\t\tconst date = typeof category === 'string' || typeof category === 'number' ? parseBucketKey(category) : null\n\t\t\t\treturn date ? date.toLocaleDateString(userLocale(), options) : category\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The `referenceLines` as ApexCharts annotations: dashed, labelled,\n\t\t * in the theme's error colour unless a line names its own.\n\t\t *\n\t\t * @return {Array<object>} The annotations, possibly empty.\n\t\t */\n\t\treferenceAnnotations() {\n\t\t\t// A line with `valuePath` reads its value from the endpoint answer\n\t\t\t// (DqDoorlooptijd's norm); one without a usable value is not drawn.\n\t\t\tconst valueOf = (line) => {\n\t\t\t\tif (typeof line.valuePath === 'string' && line.valuePath !== '') {\n\t\t\t\t\tconst raw = this.epData ? getByPath(this.epData, line.valuePath) : null\n\t\t\t\t\treturn raw === null || raw === undefined || raw === '' ? NaN : Number(raw)\n\t\t\t\t}\n\t\t\t\treturn Number(line.value)\n\t\t\t}\n\t\t\tconst lines = (Array.isArray(this.referenceLines) ? this.referenceLines : [])\n\t\t\t\t.filter((line) => line && Number.isFinite(valueOf(line)))\n\t\t\tif (lines.length === 0) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst fallback = themeColor('--color-error', '#e04224')\n\t\t\treturn lines.map((line) => {\n\t\t\t\tconst color = line.color || fallback\n\t\t\t\tconst value = valueOf(line)\n\t\t\t\treturn {\n\t\t\t\t\ty: value,\n\t\t\t\t\tx: value,\n\t\t\t\t\tborderColor: color,\n\t\t\t\t\tstrokeDashArray: 6,\n\t\t\t\t\tlabel: line.label\n\t\t\t\t\t\t? { text: this.hostTranslate(line.label).replace(/\\{value\\}/g, String(value)), borderColor: color, style: { color: '#fff', background: color } }\n\t\t\t\t\t\t: { text: '' },\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tmergedOptions() {\n\t\t\tconst isPieType = ['pie', 'donut', 'radialBar'].includes(this.type)\n\n\t\t\tconst defaults = {\n\t\t\t\tchart: {\n\t\t\t\t\ttype: this.type,\n\t\t\t\t\ttoolbar: { show: this.toolbar },\n\t\t\t\t\tzoom: { enabled: false },\n\t\t\t\t\tfontFamily: 'var(--default-font, system-ui, sans-serif)',\n\t\t\t\t\tforeColor: 'var(--color-main-text, #222)',\n\t\t\t\t\tbackground: 'transparent',\n\t\t\t\t},\n\n\t\t\t\tcolors: this.mappedColors || this.defaultColors,\n\t\t\t\tstroke: {\n\t\t\t\t\tcurve: 'smooth',\n\t\t\t\t\twidth: this.type === 'area' ? 2 : (this.type === 'bar' ? 0 : 2),\n\t\t\t\t},\n\n\t\t\t\tfill: this.type === 'area'\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ttype: 'gradient',\n\t\t\t\t\t\t\tgradient: {\n\t\t\t\t\t\t\t\tshade: 'light',\n\t\t\t\t\t\t\t\ttype: 'vertical',\n\t\t\t\t\t\t\t\topacityFrom: 0.5,\n\t\t\t\t\t\t\t\topacityTo: 0.1,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t: { opacity: 1 },\n\n\t\t\t\tgrid: {\n\t\t\t\t\tborderColor: 'var(--color-border, #ededed)',\n\t\t\t\t\tstrokeDashArray: 4,\n\t\t\t\t},\n\n\t\t\t\tlegend: {\n\t\t\t\t\tshow: this.legend,\n\t\t\t\t\tposition: this.legendPosition || (isPieType ? 'bottom' : 'top'),\n\t\t\t\t\tlabels: {\n\t\t\t\t\t\tcolors: 'var(--color-main-text, #222)',\n\t\t\t\t\t},\n\t\t\t\t},\n\n\t\t\t\tdataLabels: {\n\t\t\t\t\tenabled: isPieType,\n\t\t\t\t},\n\n\t\t\t\ttooltip: {\n\t\t\t\t\t// Nominal: it only decides which class apexcharts stamps on\n\t\t\t\t\t// the tooltip, and BOTH of its themes are restyled with\n\t\t\t\t\t// Nextcloud tokens in this component's stylesheet. Neither\n\t\t\t\t\t// apexcharts theme is theme-responsive on its own — see the\n\t\t\t\t\t// `apexcharts-tooltip` block at the bottom of <style>.\n\t\t\t\t\ttheme: 'light',\n\t\t\t\t},\n\t\t\t}\n\n\t\t\t// Named value formatter (currency / currency-compact / percent) —\n\t\t\t// applied to the tooltip and, below, to the VALUE axis so both read\n\t\t\t// identically. An explicit `options.tooltip/xaxis/yaxis` formatter\n\t\t\t// still wins through the deep-merge.\n\t\t\tif (this.valueFormatterFn) {\n\t\t\t\tdefaults.tooltip.y = { formatter: this.valueFormatterFn }\n\t\t\t}\n\n\t\t\t// Drilldown (Wave 3, #91): a segment / bar click navigates to the\n\t\t\t// configured route with the clicked category's RAW key in the\n\t\t\t// query. Wired through ApexCharts' own selection event so it\n\t\t\t// works identically for pie slices and (distributed) bars; the\n\t\t\t// cursor hint makes the affordance visible. An explicit\n\t\t\t// `options.chart.events` still wins through the deep-merge.\n\t\t\tif (this.drilldownDef && this.$router) {\n\t\t\t\tdefaults.chart.events = {\n\t\t\t\t\tdataPointSelection: this.onDataPointSelection,\n\t\t\t\t\tdataPointMouseEnter: (event) => {\n\t\t\t\t\t\tif (event && event.target) {\n\t\t\t\t\t\t\tevent.target.style.cursor = 'pointer'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add categories for cartesian charts\n\t\t\tif (!isPieType) {\n\t\t\t\tif (this.resolvedCategories.length > 0) {\n\t\t\t\t\tdefaults.xaxis = {\n\t\t\t\t\t\tcategories: this.displayCategories,\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tcolors: 'var(--color-text-maxcontrast, #767676)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t\tdefaults.yaxis = {\n\t\t\t\t\t\tlabels: {\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tcolors: 'var(--color-text-maxcontrast, #767676)',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The value formatter and the baseline guard apply to EVERY\n\t\t\t\t// cartesian chart, not only a categorical one: a series of\n\t\t\t\t// `{x, y}` datapoints (or `[x, y]` tuples) needs no `categories`,\n\t\t\t\t// and while these lived inside the block above such a chart\n\t\t\t\t// ignored even an explicit `valueAxisBaseline=\"zero\"`. The axis\n\t\t\t\t// object is created on demand so a chart that had no `xaxis` /\n\t\t\t\t// `yaxis` default before still gets none unless it needs one.\n\t\t\t\tconst bounds = this.valueAxisBounds\n\t\t\t\tif (this.valueFormatterFn || bounds) {\n\t\t\t\t\t// The VALUE axis is the y-axis normally, the x-axis when bars\n\t\t\t\t\t// render horizontally (ApexCharts flips the axes).\n\t\t\t\t\tconst axisKey = (this.type === 'bar' && this.horizontal) ? 'xaxis' : 'yaxis'\n\t\t\t\t\tconst valueAxis = defaults[axisKey] || (defaults[axisKey] = {})\n\t\t\t\t\tif (this.valueFormatterFn) {\n\t\t\t\t\t\tvalueAxis.labels = { ...valueAxis.labels, formatter: this.valueFormatterFn }\n\t\t\t\t\t}\n\t\t\t\t\t// Baseline guard — see `valueAxisBounds`. `forceNiceScale` keeps\n\t\t\t\t\t// the ticks on round numbers rather than slicing the span into\n\t\t\t\t\t// fractions (a 0–8 count axis ticks 0/2/4/6/8, not 0/1.6/3.2/…).\n\t\t\t\t\tif (bounds) {\n\t\t\t\t\t\tvalueAxis.min = bounds.min\n\t\t\t\t\t\tvalueAxis.max = bounds.max\n\t\t\t\t\t\tvalueAxis.forceNiceScale = true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Reference lines, such as a norm, on the value axis.\n\t\t\tif (!isPieType && this.referenceAnnotations.length > 0) {\n\t\t\t\tconst axisKey = (this.type === 'bar' && this.horizontal) ? 'xaxis' : 'yaxis'\n\t\t\t\tdefaults.annotations = { [axisKey]: this.referenceAnnotations }\n\t\t\t}\n\n\t\t\t// Add labels for pie/donut\n\t\t\tif (isPieType && this.resolvedLabels.length > 0) {\n\t\t\t\tdefaults.labels = this.resolvedLabels\n\t\t\t}\n\n\t\t\t// Bar-specific defaults\n\t\t\tif (this.type === 'bar') {\n\t\t\t\tdefaults.plotOptions = {\n\t\t\t\t\tbar: {\n\t\t\t\t\t\thorizontal: this.horizontal,\n\t\t\t\t\t\tcolumnWidth: '55%',\n\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t// Per-category colours need distributed bars — otherwise\n\t\t\t\t\t\t// apexcharts colours per SERIES and the map has no effect.\n\t\t\t\t\t\t...(this.mappedColors ? { distributed: true } : {}),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this.deepMerge(defaults, this.options)\n\t\t},\n\t},\n\n\twatch: {\n\t\tgroupByKey() {\n\t\t\tthis.fetchGroupBy()\n\t\t},\n\n\t\tbucketKey() {\n\t\t\tthis.fetchTimeBucket()\n\t\t},\n\n\t\taggregateKey() {\n\t\t\tthis.fetchAggregateSource()\n\t\t},\n\n\t\tcellSourceKey() {\n\t\t\tthis.fetchCells()\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// markRaw: `data()` is deeply reactive and would proxy the component.\n\t\tthis.chartComponent = markRaw(VueApexCharts)\n\t},\n\n\tmounted() {\n\t\tthis.fetchGroupBy()\n\t\tthis.fetchTimeBucket()\n\t\tthis.fetchAggregateSource()\n\t\tthis.fetchCells()\n\t\t// Subscribe to the widget Refresh bus (B3 event-bus opt-in mode)\n\t\t// FIRST, before the ResizeObserver early-return — environments\n\t\t// without ResizeObserver (jsdom) must still get the subscription.\n\t\tthis._onWidgetRefresh = (payload) => {\n\t\t\tif (!this.widgetId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (payload?.widgetId !== this.widgetId) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.refresh()\n\t\t}\n\t\tsubscribe(REFRESH_BUS_CHANNEL, this._onWidgetRefresh)\n\n\t\t// Page-level Refresh means \"refresh everything on the page\", so it\n\t\t// carries no widgetId to match on. Without this the action reached ONLY\n\t\t// charts bound to an `endpointSource` — useEndpointSource subscribes to\n\t\t// this channel itself — while every chart fed by `dataSource` (the\n\t\t// bucket / group-by / aggregate REST paths) silently ignored it.\n\t\t//\n\t\t// It deliberately skips the endpoint half rather than calling refresh():\n\t\t// the composable already force-refetches on this same channel. A forced\n\t\t// fetch joins an in-flight one only when both carry the same refresh\n\t\t// payload, and refresh() carries none, so it would send a real duplicate.\n\t\tthis._onPageRefresh = (payload) => {\n\t\t\tconst done = this.refreshLocalSources()\n\t\t\tpayload?.waitUntil?.(done)\n\t\t}\n\t\tsubscribe(PAGE_REFRESH_BUS_CHANNEL, this._onPageRefresh)\n\n\t\tif (typeof ResizeObserver === 'undefined') {\n\t\t\treturn\n\t\t}\n\t\tthis._lastWidth = this.$el.offsetWidth\n\t\tthis._lastHeight = this.$el.offsetHeight\n\t\tthis._resizeTimer = null\n\t\tthis._resizeObserver = new ResizeObserver((entries) => {\n\t\t\tconst rect = entries[0]?.contentRect\n\t\t\tconst newWidth = rect?.width ?? this.$el.offsetWidth\n\t\t\tconst newHeight = rect?.height ?? this.$el.offsetHeight\n\t\t\t// A container-fitting chart must also re-render when only the\n\t\t\t// HEIGHT changes: apexcharts reads the parent's height once, at\n\t\t\t// create time, and its own re-measure hook is the window resize —\n\t\t\t// which a GridStack tile resize is not. This is also what recovers\n\t\t\t// a chart created while its tile had no height yet (percentage of\n\t\t\t// zero is zero), so it is correctness, not just resize polish.\n\t\t\t// Pinned-height charts keep the width-only behaviour: their height\n\t\t\t// never depends on the box.\n\t\t\tconst heightChanged = this.fitToContainer && newHeight !== this._lastHeight\n\t\t\tif (newWidth === this._lastWidth && !heightChanged) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis._lastWidth = newWidth\n\t\t\tthis._lastHeight = newHeight\n\t\t\tclearTimeout(this._resizeTimer)\n\t\t\tthis._resizeTimer = setTimeout(() => {\n\t\t\t\tthis.redrawForResize()\n\t\t\t}, 100)\n\t\t})\n\t\tthis._resizeObserver.observe(this.$el)\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this._resizeTimer)\n\t\tif (this._resizeObserver) {\n\t\t\tthis._resizeObserver.disconnect()\n\t\t\tthis._resizeObserver = null\n\t\t}\n\t\tif (this._onWidgetRefresh) {\n\t\t\tunsubscribe(REFRESH_BUS_CHANNEL, this._onWidgetRefresh)\n\t\t\tthis._onWidgetRefresh = null\n\t\t}\n\t\tif (this._onPageRefresh) {\n\t\t\tunsubscribe(PAGE_REFRESH_BUS_CHANNEL, this._onPageRefresh)\n\t\t\tthis._onPageRefresh = null\n\t\t}\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * A manifest-authored label through the host translate function.\n\t\t *\n\t\t * @spec openspec/changes/screens-dashboard-i18n/specs/dashboard-page/spec.md#requirement-chart-view-labels-and-series-names-are-translated\n\t\t * @param {string} key The label.\n\t\t * @return {string} The translated label.\n\t\t */\n\t\t/**\n\t\t * The name of an endpoint series: the text at its `namePath` in the\n\t\t * whole response (so an endpoint can name what its numbers measure),\n\t\t * else its `name`, else its `path`.\n\t\t *\n\t\t * @param {{name?: string, namePath?: string, path: string}} def The series definition.\n\t\t * @return {string} The name.\n\t\t */\n\t\tendpointSeriesName(def) {\n\t\t\tif (def.namePath) {\n\t\t\t\tconst named = getByPath(this.epBody, def.namePath)\n\t\t\t\tif (typeof named === 'string' && named !== '') {\n\t\t\t\t\treturn named\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn def.name || def.path\n\t\t},\n\n\t\thostTranslate(key) {\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : null\n\t\t\tconst out = translate ? translate(key) : key\n\t\t\treturn (typeof out === 'string' && out !== '') ? out : key\n\t\t},\n\n\t\t/**\n\t\t * Re-query the chart's dataSource / endpointSource. Exposed as a\n\t\t * ref-callable method (B3 canonical refresh mode) AND invoked by the\n\t\t * `cn:widget:refresh` bus subscription. No-op when the chart has\n\t\t * neither (static series/labels mode). The endpoint refetch is\n\t\t * force-mode: it bypasses the shared useEndpointSource cache.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\trefresh() {\n\t\t\tthis.refreshLocalSources()\n\t\t\tif (typeof this.epRefetch === 'function') {\n\t\t\t\tthis.epRefetch()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Re-measure and redraw the chart after its box changed size, without\n\t\t * rebuilding it.\n\t\t *\n\t\t * `vue3-apexcharts`' `refresh()` is `destroy()` + `init()`: it throws the\n\t\t * ApexCharts instance away, builds a new one, and replays the entry\n\t\t * animation. With container-fitting charts now the dashboard default,\n\t\t * every GridStack layout settle ran that for every chart tile on the page.\n\t\t *\n\t\t * `_windowResize()` is the path ApexCharts itself uses for its own\n\t\t * parent/window resize observers: it flags the redraw as a resize (so the\n\t\t * entry animation does NOT replay) and calls `update()`, which re-runs\n\t\t * `setupElements` — the step that re-resolves a percentage height against\n\t\t * the parent — while keeping the instance and its listeners. It is\n\t\t * private, hence the capability check and the `refresh()` fallback; note\n\t\t * that the public `updateOptions()` is NOT usable here, because\n\t\t * ApexCharts skips an update whose options are identical to the last one\n\t\t * and a fitted chart's height stays the literal string `'100%'` on every\n\t\t * resize.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tredrawForResize() {\n\t\t\tconst apex = this.$refs.chart?.chart\n\t\t\tif (typeof apex?._windowResize === 'function') {\n\t\t\t\tapex._windowResize()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.$refs.chart?.refresh) {\n\t\t\t\tthis.$refs.chart.refresh()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Re-query every source this component fetches ITSELF: the `dataSource`\n\t\t * GraphQL path plus the three REST aggregations (time bucket, group-by,\n\t\t * aggregate). Excludes `endpointSource`, which useEndpointSource owns\n\t\t * and refetches on its own event-bus subscriptions — see the\n\t\t * page-refresh handler in `mounted()`.\n\t\t *\n\t\t * @return {Promise<unknown[]>} Settles when every re-query has.\n\t\t */\n\t\trefreshLocalSources() {\n\t\t\treturn Promise.all([\n\t\t\t\ttypeof this.dsRefetch === 'function' ? this.dsRefetch() : null,\n\t\t\t\tthis.fetchGroupBy(),\n\t\t\t\tthis.fetchTimeBucket(),\n\t\t\t\tthis.fetchAggregateSource(),\n\t\t\t\tthis.fetchCells(),\n\t\t\t])\n\t\t},\n\n\t\t/**\n\t\t * Fetch a time series from OpenRegister's REST `/timeseries` aggregation\n\t\t * when `dataSource.bucket` is set, mapping `{groups:[{key,value}]}` into\n\t\t * ApexCharts `series` + date `categories`. The window comes from the\n\t\t * dashboard date chip and is sent as-is; `bucket.staticRange` fills any\n\t\t * half the chip leaves empty, and a 12-month lookback covers the case\n\t\t * where neither supplies a bound. Replaces the GraphQL bucket path.\n\t\t * Lazily imports axios/router.\n\t\t *\n\t\t * @spec openspec/changes/add-dashboard-date-range-and-chart-bucket/specs/chart-bucket-data-source/spec.md\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync fetchTimeBucket() {\n\t\t\tconst ds = this.dataSource || {}\n\t\t\tconst b = ds.bucket\n\t\t\tif (!b || !b.field || !ds.schema) {\n\t\t\t\tthis.bucketData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Stale-response guard, same shape as `fetchAggregateSource`. The date\n\t\t\t// chip changes `bucketKey`, which re-enters here while the previous\n\t\t\t// request is still open; a narrower window usually answers faster, so\n\t\t\t// without this the slower WIDER series could land last and sit under\n\t\t\t// the new chip's label.\n\t\t\tconst requestKey = this.bucketKey\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\t// Resolve the [from, to] window: chip range, else staticRange,\n\t\t\t\t// else a 12-month lookback. The chip window is used VERBATIM —\n\t\t\t\t// an earlier revision widened any span under 90 days to a\n\t\t\t\t// 365-day lookback, which silently discarded the user's `from`\n\t\t\t\t// for every built-in preset (all are shorter than 90 days) and\n\t\t\t\t// left the chip label disagreeing with the plotted data.\n\t\t\t\tconst chip = this.activeRange || {}\n\t\t\t\tconst sr = b.staticRange || {}\n\t\t\t\tlet from = chip.from || sr.from || ''\n\t\t\t\tlet to = chip.to || sr.to || ''\n\t\t\t\t// A cleared (\"All\") range leaves both halves empty, but the OR\n\t\t\t\t// /timeseries endpoint 400s on a missing bound whenever\n\t\t\t\t// `interval` is set — so fall back to a 12-month lookback\n\t\t\t\t// rather than firing a request we know is rejected.\n\t\t\t\tif (!from || !to) {\n\t\t\t\t\tto = to || new Date().toISOString()\n\t\t\t\t\tfrom = from || new Date(new Date(to).getTime() - (365 * 86400000)).toISOString()\n\t\t\t\t}\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/aggregations/{register}/{schema}/timeseries',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = {\n\t\t\t\t\tfield: b.field,\n\t\t\t\t\tinterval: String(b.interval || 'month').toUpperCase(),\n\t\t\t\t\tmetric: b.metric || 'count',\n\t\t\t\t\tfrom,\n\t\t\t\t\tto,\n\t\t\t\t}\n\t\t\t\tif (b.metricField) {\n\t\t\t\t\tparams.metricField = b.metricField\n\t\t\t\t}\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object') {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`filter[${k}][${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[`filter[${k}]`] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tif (requestKey !== this.bucketKey) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst groups = (res && res.data && res.data.groups) || []\n\t\t\t\tconst categories = groups.map((g) => this.formatBucketKey(g.key, b.interval))\n\t\t\t\tconst values = groups.map((g) => Number(g.value) || 0)\n\t\t\t\tthis.bucketData = { series: [{ name: b.metricField || b.metric || 'count', data: values }], categories, labels: categories }\n\t\t\t} catch {\n\t\t\t\tif (requestKey === this.bucketKey) {\n\t\t\t\t\tthis.bucketData = null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Format a time-bucket key (ISO date) into a short axis label, at the\n\t\t * granularity of the bucket's own interval. Without the interval every\n\t\t * key rendered as month + year, so a day-bucketed week collapsed onto\n\t\t * one repeated label (\"Aug 26\" for all of August 2026).\n\t\t *\n\t\t * The year is added to day / week labels only when the bucket falls\n\t\t * outside the current year, mirroring `formatRangeLabel` on the\n\t\t * dashboard chip.\n\t\t *\n\t\t * @param {string} key The bucket key (ISO date string).\n\t\t * @param {string} [interval] Bucket interval (`minute|hour|day|week|month|quarter|year`, case-insensitive). Defaults to the month/year form.\n\t\t * @return {string} A short, locale-aware label.\n\t\t */\n\t\tformatBucketKey(key, interval) {\n\t\t\tif (!key) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst d = parseBucketKey(key)\n\t\t\tif (!d) {\n\t\t\t\treturn String(key)\n\t\t\t}\n\t\t\tconst thisYear = new Date().getFullYear()\n\t\t\tconst year = d.getFullYear() === thisYear ? {} : { year: 'numeric' }\n\t\t\tswitch (String(interval || '').toLowerCase()) {\n\t\t\t\tcase 'minute':\n\t\t\t\t\treturn d.toLocaleString(userLocale(), { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })\n\t\t\t\tcase 'hour':\n\t\t\t\t\treturn d.toLocaleString(userLocale(), { month: 'short', day: 'numeric', hour: '2-digit' })\n\t\t\t\tcase 'day':\n\t\t\t\tcase 'week':\n\t\t\t\t\treturn d.toLocaleDateString(userLocale(), { day: 'numeric', month: 'short', ...year })\n\t\t\t\tcase 'year':\n\t\t\t\t\treturn d.toLocaleDateString(userLocale(), { year: 'numeric' })\n\t\t\t\tdefault:\n\t\t\t\t\treturn d.toLocaleDateString(userLocale(), { month: 'short', year: '2-digit' })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Fetch a categorical breakdown from OpenRegister's REST `/grouped`\n\t\t * aggregation when `dataSource.groupBy` is set, mapping `{groups}` into\n\t\t * ApexCharts `series` + `categories`/`labels` (pie/donut use a flat\n\t\t * value array + labels; other types use one named series + categories).\n\t\t * No-op for the time-bucket (GraphQL) path. Lazily imports axios/router.\n\t\t *\n\t\t * @spec openspec/changes/add-dashboard-date-range-and-chart-bucket/specs/chart-bucket-data-source/spec.md\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync fetchGroupBy() {\n\t\t\tconst ds = this.dataSource || {}\n\t\t\tconst gb = ds.groupBy\n\t\t\tif (!gb || !gb.field || !ds.schema) {\n\t\t\t\tthis.groupByData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Stale-response guard — see `fetchTimeBucket`. This path has the extra\n\t\t\t// `resolveGroupByLabels` round trip after the fetch, so its window for\n\t\t\t// a filter-token change to overtake it is the wider of the two.\n\t\t\tconst requestKey = this.groupByKey\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/aggregations/{register}/{schema}/grouped',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = { groupBy: gb.field, metric: gb.metric || 'count' }\n\t\t\t\tif (gb.metricField) {\n\t\t\t\t\tparams.field = gb.metricField\n\t\t\t\t}\n\t\t\t\tif (gb.sort === 'asc' || gb.sort === 'desc') {\n\t\t\t\t\tparams.sort = gb.sort\n\t\t\t\t}\n\t\t\t\tif (gb.limit) {\n\t\t\t\t\tparams.limit = gb.limit\n\t\t\t\t}\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object') {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`filter[${k}][${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[`filter[${k}]`] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tif (requestKey !== this.groupByKey) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tlet groups = (res && res.data && res.data.groups) || []\n\t\t\t\t// Client-side sort + top-N (robust even if the backend ignored them).\n\t\t\t\tif (gb.sort === 'asc' || gb.sort === 'desc') {\n\t\t\t\t\tgroups = [...groups].sort((a, b) => (gb.sort === 'desc' ? b.value - a.value : a.value - b.value))\n\t\t\t\t}\n\t\t\t\tif (gb.limit) {\n\t\t\t\t\tgroups = groups.slice(0, gb.limit)\n\t\t\t\t}\n\t\t\t\tlet keys = groups.map((g) => (g.key === null || g.key === undefined ? '—' : String(g.key)))\n\t\t\t\t// Raw (unresolved) keys, index-aligned with the display labels —\n\t\t\t\t// a `dataSource.drilldown` click navigates with these (Wave 3).\n\t\t\t\tconst rawKeys = groups.map((g) => (g.key === null || g.key === undefined ? '' : String(g.key)))\n\t\t\t\tconst values = groups.map((g) => Number(g.value) || 0)\n\t\t\t\t// When the grouped field is a reference (uuid), swap the raw ids for\n\t\t\t\t// the referenced objects' display labels (e.g. client name).\n\t\t\t\tif (gb.reference && gb.reference.schema) {\n\t\t\t\t\tkeys = await this.resolveGroupByLabels(ds.register, gb.reference, groups)\n\t\t\t\t\tif (requestKey !== this.groupByKey) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\t\tthis.groupByData = { series: values, labels: keys, categories: keys, rawKeys }\n\t\t\t\t} else {\n\t\t\t\t\tthis.groupByData = { series: [{ name: gb.metricField || gb.metric || 'count', data: values }], categories: keys, labels: keys, rawKeys }\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tif (requestKey === this.groupByKey) {\n\t\t\t\t\tthis.groupByData = null\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read the `cellSource` records and lay them out as the matrix: one\n\t\t * record per cell, or with `cellsPath` the cells inside one record. A\n\t\t * failed read leaves the matrix empty rather than showing stale\n\t\t * cells; an answer to an older request is dropped.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-records\n\t\t * @spec openspec/changes/matrix-cell-records/specs/matrix-cell-records/spec.md#requirement-a-matrix-can-read-its-cells-from-one-record\n\t\t */\n\t\tasync fetchCells() {\n\t\t\tconst key = this.cellSourceKey\n\t\t\tif (key === null) {\n\t\t\t\tthis.cellData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst { register, schema, filter, fallbackFilter, cellFilter, limit } = JSON.parse(key)\n\t\t\tthis._cellRequest = key\n\t\t\tlet records = await fetchReferenceObjects({ register, schema, filter, limit }).catch(() => [])\n\t\t\tif (this.cellSource.cellsPath && records.length === 0 && fallbackFilter) {\n\t\t\t\trecords = await fetchReferenceObjects({ register, schema, filter: fallbackFilter, limit }).catch(() => [])\n\t\t\t}\n\t\t\tif (this._cellRequest !== key) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.cellSource.cellsPath) {\n\t\t\t\tconst { cells, config } = cellsFromRecord(records[0] || null, this.cellSource, cellFilter)\n\t\t\t\tthis.cellData = pivotCells(cells, config)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.cellData = pivotCells(records, this.cellSource)\n\t\t},\n\n\t\t/**\n\t\t * Resolve the OBJECT-form `dataSource.aggregate` (Wave 3, #91) into\n\t\t * chart data: a categorical group-by over the schema's objects with\n\t\t * top-N + Other folding and optional reference label/colour\n\t\t * resolution.\n\t\t *\n\t\t * Server-first: OpenRegister's `/grouped` facet endpoint does the\n\t\t * aggregation (count, or sum of `sumField`) — the same facet the\n\t\t * existing `groupBy` shorthand reaches — so the client never pulls\n\t\t * the collection just to count it. Only when that endpoint is\n\t\t * unavailable (older OR) does the widget fall back to fetching the\n\t\t * collection and grouping client-side. Any remaining failure leaves\n\t\t * `aggregateData` null (static props / fallback render).\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync fetchAggregateSource() {\n\t\t\tconst ds = this.dataSource || {}\n\t\t\tconst agg = this.aggregateDef\n\t\t\tif (!agg || !ds.schema) {\n\t\t\t\tthis.aggregateData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst metric = agg.metric === 'sum' ? 'sum' : 'count'\n\t\t\tif (metric === 'sum' && !agg.sumField) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn('[CnChartWidget] aggregate.metric \"sum\" requires aggregate.sumField — skipping.')\n\t\t\t\tthis.aggregateData = null\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst requestKey = this.aggregateKey\n\t\t\tlet groups\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/aggregations/{register}/{schema}/grouped',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = { groupBy: agg.groupBy, metric }\n\t\t\t\tif (metric === 'sum') {\n\t\t\t\t\tparams.field = agg.sumField\n\t\t\t\t}\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object') {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`filter[${k}][${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[`filter[${k}]`] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tgroups = (res && res.data && res.data.groups) || []\n\t\t\t} catch {\n\t\t\t\t// Facet endpoint unavailable → client-side fallback aggregation.\n\t\t\t\tgroups = await this.aggregateFromCollection(ds, agg, metric)\n\t\t\t}\n\t\t\tif (!groups) {\n\t\t\t\tif (requestKey === this.aggregateKey) {\n\t\t\t\t\tthis.aggregateData = null\n\t\t\t\t}\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst built = await this.buildAggregateData(groups, agg)\n\t\t\t// Guard against a stale (slower) response overwriting a newer\n\t\t\t// source signature — mirrors the endpoint-source seq guard.\n\t\t\tif (requestKey === this.aggregateKey) {\n\t\t\t\tthis.aggregateData = built\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Client-side fallback aggregation (Wave 3): fetch the collection and\n\t\t * group it locally — count per `aggregate.groupBy` value, or the sum\n\t\t * of `sumField`. Used only when OpenRegister's `/grouped` facet\n\t\t * endpoint is unavailable; capped at 1000 objects (the fleet's\n\t\t * established client-fetch bound). Returns the same\n\t\t * `[{ key, value }]` group shape the facet returns, or null on\n\t\t * failure.\n\t\t *\n\t\t * @param {object} ds The dataSource block.\n\t\t * @param {object} agg The aggregate block.\n\t\t * @param {string} metric Normalised metric (`count` | `sum`).\n\t\t * @return {Promise<Array<{ key: string|number|null, value: number }>|null>}\n\t\t */\n\t\tasync aggregateFromCollection(ds, agg, metric) {\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/{register}/{schema}',\n\t\t\t\t\t{ register: ds.register, schema: ds.schema },\n\t\t\t\t)\n\t\t\t\tconst params = { _limit: 1000 }\n\t\t\t\tconst _f = resolveFilterTokens(ds.filter || {}, this.chartTokenCtx())\n\t\t\t\tif (_f && typeof _f === 'object') {\n\t\t\t\t\tfor (const [k, v] of Object.entries(_f)) {\n\t\t\t\t\t\tif (v && typeof v === 'object' && !Array.isArray(v)) {\n\t\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\t\tparams[`${k}[${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\t\tparams[k] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst res = await axios.get(url, { params })\n\t\t\t\tconst results = (res && res.data && res.data.results) || []\n\t\t\t\tconst totals = new Map()\n\t\t\t\tfor (const obj of results) {\n\t\t\t\t\tconst raw = obj && obj[agg.groupBy]\n\t\t\t\t\tconst key = (raw === null || raw === undefined || raw === '') ? null : raw\n\t\t\t\t\tconst increment = metric === 'sum' ? (Number(obj && obj[agg.sumField]) || 0) : 1\n\t\t\t\t\ttotals.set(key, (totals.get(key) || 0) + increment)\n\t\t\t\t}\n\t\t\t\treturn Array.from(totals.entries()).map(([key, value]) => ({ key, value }))\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Turn raw `[{ key, value }]` groups into the chart-ready\n\t\t * `aggregateData` blob: sort by value (desc), apply `topN`, fold the\n\t\t * remainder into a translated \"Other\" bucket when `otherBucket` is\n\t\t * true, resolve reference labels/colours via `labelResolve`, and\n\t\t * shape series/labels per chart family. `rawKeys` keeps the\n\t\t * UNRESOLVED keys index-aligned for drilldown.\n\t\t *\n\t\t * @param {Array<{ key: string|number|null, value: number }>} groups The raw groups.\n\t\t * @param {object} agg The aggregate block.\n\t\t * @return {Promise<{series: Array<{ name: string, data: Array<number> }>, categories: string[], labels: string[], rawKeys: string[], colorMap?: Record<string, string>}>}\n\t\t */\n\t\tasync buildAggregateData(groups, agg) {\n\t\t\tlet sorted = [...groups].sort((a, b) => (Number(b.value) || 0) - (Number(a.value) || 0))\n\t\t\tif (agg.mergeByLabel) {\n\t\t\t\t// Merging needs every group's label before the top N is cut,\n\t\t\t\t// so resolve them all and fold same-label groups first.\n\t\t\t\tconst keys = sorted.map((g) => aggregateKeyOf(g))\n\t\t\t\tconst resolved = agg.labelResolve && agg.labelResolve.schema\n\t\t\t\t\t? await this.resolveAggregateLabels(agg, keys)\n\t\t\t\t\t: { labels: keys.map(aggregateLabelOf), colors: [] }\n\t\t\t\tsorted = mergeGroupsByLabel(sorted, resolved.labels, resolved.colors)\n\t\t\t}\n\t\t\tconst topN = Number(agg.topN)\n\t\t\tlet other = null\n\t\t\tif (Number.isFinite(topN) && topN > 0 && sorted.length > topN) {\n\t\t\t\tconst rest = sorted.slice(topN)\n\t\t\t\tsorted = sorted.slice(0, topN)\n\t\t\t\tif (agg.otherBucket === true) {\n\t\t\t\t\tother = {\n\t\t\t\t\t\tkey: OTHER_BUCKET_KEY,\n\t\t\t\t\t\tlabel: t('nextcloud-vue', 'Other'),\n\t\t\t\t\t\tvalue: rest.reduce((sum, g) => sum + (Number(g.value) || 0), 0),\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst rawKeys = sorted.map((g) => (Array.isArray(g.keys) && g.keys.length > 1 ? g.keys : aggregateKeyOf(g)))\n\t\t\tlet labels = sorted.map((g) => (typeof g.label === 'string' ? g.label : aggregateLabelOf(aggregateKeyOf(g))))\n\t\t\tlet colorMap = null\n\t\t\tif (agg.mergeByLabel) {\n\t\t\t\tconst withColor = sorted.filter((g) => g.color)\n\t\t\t\tif (withColor.length > 0) {\n\t\t\t\t\tcolorMap = {}\n\t\t\t\t\twithColor.forEach((g) => {\n\t\t\t\t\t\tcolorMap[g.label] = g.color\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else if (agg.labelResolve && agg.labelResolve.schema) {\n\t\t\t\tconst resolved = await this.resolveAggregateLabels(agg, rawKeys)\n\t\t\t\tlabels = resolved.labels\n\t\t\t\tconst colors = resolved.colors\n\t\t\t\tif (colors.some(Boolean)) {\n\t\t\t\t\tcolorMap = {}\n\t\t\t\t\tcolors.forEach((color, i) => {\n\t\t\t\t\t\tif (color) {\n\t\t\t\t\t\t\tcolorMap[labels[i]] = color\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst values = sorted.map((g) => Number(g.value) || 0)\n\t\t\tif (other) {\n\t\t\t\trawKeys.push(other.key)\n\t\t\t\tlabels.push(other.label)\n\t\t\t\tvalues.push(other.value)\n\t\t\t}\n\t\t\tconst base = { rawKeys, labels, categories: labels }\n\t\t\tif (colorMap) {\n\t\t\t\tbase.colorMap = colorMap\n\t\t\t}\n\t\t\tif (['pie', 'donut', 'radialBar'].includes(this.type)) {\n\t\t\t\treturn { ...base, series: values }\n\t\t\t}\n\t\t\tconst name = agg.sumField || agg.metric || 'count'\n\t\t\treturn { ...base, series: [{ name, data: values }] }\n\t\t},\n\n\t\t/**\n\t\t * The display labels and colours of aggregate keys through\n\t\t * `labelResolve`. A configured `labelResolve` means a key IS an\n\t\t * opaque reference id, so a key that resolves to nothing (a deleted\n\t\t * or never-existing target) reads \"Unknown\", never the raw id; an\n\t\t * empty key keeps its '—' placeholder.\n\t\t *\n\t\t * @param {object} agg The aggregate block.\n\t\t * @param {string[]} keys The raw keys ('' for an empty one).\n\t\t * @return {Promise<{labels: string[], colors: Array<string|undefined>}>}\n\t\t */\n\t\tasync resolveAggregateLabels(agg, keys) {\n\t\t\tconst resolved = await this.resolveAggregateRefs(\n\t\t\t\t(this.dataSource && this.dataSource.register) || '',\n\t\t\t\tagg.labelResolve,\n\t\t\t\tkeys,\n\t\t\t)\n\t\t\treturn {\n\t\t\t\tlabels: resolved.map((r, i) => {\n\t\t\t\t\tif (r.label) {\n\t\t\t\t\t\treturn r.label\n\t\t\t\t\t}\n\t\t\t\t\treturn keys[i] === '' ? '—' : t('nextcloud-vue', 'Unknown')\n\t\t\t\t}),\n\n\t\t\t\tcolors: resolved.map((r) => r.color || undefined),\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Resolve reference (uuid) aggregate keys to their referenced\n\t\t * objects' display labels (and optional per-category colours) —\n\t\t * the fkResolve pattern: the SHARED object store first (per-id\n\t\t * cache + in-flight dedup, so 10 slices pointing at 10 clients\n\t\t * resolve once each across the whole page), a direct per-id GET\n\t\t * when no Pinia store is active. Unresolvable ids degrade to an\n\t\t * empty label (the caller keeps the raw key) — a chart never\n\t\t * regresses to a blank slice.\n\t\t *\n\t\t * @param {string} defaultRegister Register used when `labelResolve` omits one.\n\t\t * @param {{register?: string, schema: string, labelField?: string, colorField?: string}} labelResolve The labelResolve block.\n\t\t * @param {string[]} keys The raw group keys (uuids; '' entries skip).\n\t\t * @return {Promise<Array<{label: string, color: string}>>} One entry per key, in order.\n\t\t */\n\t\tasync resolveAggregateRefs(defaultRegister, labelResolve, keys) {\n\t\t\tconst register = labelResolve.register || defaultRegister\n\t\t\tconst schema = labelResolve.schema\n\t\t\tconst labelField = labelResolve.labelField || 'name'\n\t\t\tconst colorField = labelResolve.colorField || ''\n\t\t\tlet store = null\n\t\t\ttry {\n\t\t\t\tstore = useObjectStore()\n\t\t\t} catch {\n\t\t\t\tstore = null\n\t\t\t}\n\t\t\tconst type = store ? resolveObjectOpType(store, { register, schema }) : null\n\t\t\tconst fetchViaAxios = async (id) => {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t'/apps/openregister/api/objects/{register}/{schema}/{id}',\n\t\t\t\t\t{ register, schema, id },\n\t\t\t\t)\n\t\t\t\tconst res = await axios.get(url)\n\t\t\t\treturn (res && res.data) || null\n\t\t\t}\n\t\t\treturn Promise.all(keys.map(async (id) => {\n\t\t\t\tif (!id) {\n\t\t\t\t\treturn { label: '', color: '' }\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst cached = store && store.objects && store.objects[type] && store.objects[type][id]\n\t\t\t\t\tconst obj = cached || (store ? await store.fetchObject(type, id) : await fetchViaAxios(id))\n\t\t\t\t\tif (!obj || typeof obj !== 'object') {\n\t\t\t\t\t\treturn { label: '', color: '' }\n\t\t\t\t\t}\n\t\t\t\t\tlet raw = obj[labelField]\n\t\t\t\t\tif (raw === undefined || raw === null || raw === '') {\n\t\t\t\t\t\traw = obj['@self'] && obj['@self'].name\n\t\t\t\t\t}\n\t\t\t\t\tconst color = colorField && typeof obj[colorField] === 'string' ? obj[colorField] : ''\n\t\t\t\t\treturn { label: this.displayString(raw), color }\n\t\t\t\t} catch {\n\t\t\t\t\treturn { label: '', color: '' }\n\t\t\t\t}\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * A value as a `bar-list` or `matrix` cell reads it: through\n\t\t * `valueFormat` when set, else as a localised number.\n\t\t *\n\t\t * @param {number} value The value.\n\t\t * @return {string} The text.\n\t\t */\n\t\tformatPlain(value) {\n\t\t\tif (this.valueFormatterFn) {\n\t\t\t\treturn String(this.valueFormatterFn(value))\n\t\t\t}\n\t\t\treturn new Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }).format(value)\n\t\t},\n\n\t\t/**\n\t\t * Map an endpoint payload whose `rowsPath` names an array of rows:\n\t\t * each row is a series (name at `rowLabelPath`, values at\n\t\t * `rowValuesPath`), the categories are at `labelsPath`.\n\t\t * A missing value stays null; a `matrix` keeps a text value (\"none\")\n\t\t * as text, other types read it as 0.\n\t\t *\n\t\t * @param {unknown} payload The plucked payload.\n\t\t * @param {object} es The `endpointSource` block.\n\t\t * @return {{series: Array, categories: Array<string>, labels: Array<string>}} The chart data.\n\t\t * @spec openspec/changes/chart-bar-list-and-matrix/specs/chart-bar-list-and-matrix/spec.md#requirement-a-chart-can-draw-a-matrix\n\t\t */\n\t\tendpointRows(payload, es) {\n\t\t\tconst rows = getByPath(payload, es.rowsPath)\n\t\t\tconst rawLabels = es.labelsPath ? getByPath(payload, es.labelsPath) : undefined\n\t\t\tconst labels = Array.isArray(rawLabels) ? rawLabels.map((v) => ((v === null || v === undefined) ? '' : String(v))) : []\n\t\t\tconst keepText = this.type === 'matrix'\n\t\t\tconst cellOf = (v) => {\n\t\t\t\tif (v === null || v === undefined) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\tconst num = typeof v === 'string' && v.trim() === '' ? NaN : Number(v)\n\t\t\t\tif (Number.isFinite(num)) {\n\t\t\t\t\treturn num\n\t\t\t\t}\n\t\t\t\treturn keepText && typeof v === 'string' ? v : 0\n\t\t\t}\n\t\t\tconst series = (Array.isArray(rows) ? rows : []).map((row) => {\n\t\t\t\tconst name = getByPath(row, es.rowLabelPath || 'label')\n\t\t\t\tconst values = getByPath(row, es.rowValuesPath || 'values')\n\t\t\t\treturn {\n\t\t\t\t\tname: (name === null || name === undefined) ? '' : String(name),\n\t\t\t\t\tdata: Array.isArray(values) ? values.map(cellOf) : [],\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn { series, categories: labels, labels }\n\t\t},\n\n\t\t/**\n\t\t * ApexCharts `dataPointSelection` handler backing the declarative\n\t\t * `dataSource.drilldown` (Wave 3, #91): navigate to the configured\n\t\t * route with the clicked category's RAW key in the query\n\t\t * (`{ [filterParam]: rawKey }`). A route starting with `/` is\n\t\t * treated as a PATH, anything else as a route NAME. The folded\n\t\t * \"Other\" bucket never navigates. Navigation errors (duplicate\n\t\t * route, guards) are swallowed.\n\t\t *\n\t\t * @param {Event} _event The DOM event (unused).\n\t\t * @param {object} _chartContext The ApexCharts instance (unused).\n\t\t * @param {{dataPointIndex: number}} config The selection payload.\n\t\t * @return {void}\n\t\t */\n\t\tonDataPointSelection(_event, _chartContext, config) {\n\t\t\tconst drill = this.drilldownDef\n\t\t\tif (!drill || !this.$router) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst idx = config && config.dataPointIndex\n\t\t\tif (typeof idx !== 'number' || idx < 0) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst key = this.drilldownKeys[idx]\n\t\t\tif (key === undefined || key === OTHER_BUCKET_KEY) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst query = { [drill.filterParam]: key }\n\t\t\tconst location = String(drill.route).startsWith('/')\n\t\t\t\t? { path: drill.route, query }\n\t\t\t\t: { name: drill.route, query }\n\t\t\tthis.$router.push(location).catch(() => {})\n\t\t},\n\n\t\t/**\n\t\t * Resolve reference (uuid) group keys to their referenced objects'\n\t\t * display labels. Fetches each referenced object once and maps its\n\t\t * `labelField` (default `name`) — falling back to the raw key when the\n\t\t * object can't be loaded, so a chart never regresses to a blank bar.\n\t\t *\n\t\t * @param {string} defaultRegister Register to use when the reference omits one.\n\t\t * @param {{ register?: string, schema: string, labelField?: string }} reference Reference descriptor from `groupBy.reference`.\n\t\t * @param {Array<{ key: string|number|null }>} groups Raw grouped rows from OpenRegister.\n\t\t * @return {Promise<string[]>} One resolved label per group, in order.\n\t\t */\n\t\tasync resolveGroupByLabels(defaultRegister, reference, groups) {\n\t\t\tconst register = reference.register || defaultRegister\n\t\t\tconst schema = reference.schema\n\t\t\tconst labelField = reference.labelField || 'name'\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\treturn await Promise.all(groups.map(async (g) => {\n\t\t\t\t\tconst key = g.key\n\t\t\t\t\tif (key === null || key === undefined || key === '') {\n\t\t\t\t\t\treturn '—'\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t\t\t'/apps/openregister/api/objects/{register}/{schema}/{id}',\n\t\t\t\t\t\t\t{ register, schema, id: key },\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst res = await axios.get(url)\n\t\t\t\t\t\tconst obj = (res && res.data) || {}\n\t\t\t\t\t\tlet raw = obj[labelField]\n\t\t\t\t\t\tif (raw === undefined || raw === null || raw === '') {\n\t\t\t\t\t\t\traw = obj['@self'] && obj['@self'].name\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn this.displayString(raw) || String(key)\n\t\t\t\t\t} catch {\n\t\t\t\t\t\treturn String(key)\n\t\t\t\t\t}\n\t\t\t\t}))\n\t\t\t} catch {\n\t\t\t\treturn groups.map((g) => (g.key === null || g.key === undefined ? '—' : String(g.key)))\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Pick a display string from a value that may be a plain string or a\n\t\t * translatable `{ <lang>: value }` map — falls back to the active\n\t\t * Nextcloud language, then its base subtag, then the first available\n\t\t * translation.\n\t\t *\n\t\t * @param {string|Record<string, string>|null} value Raw property value (string or per-language map).\n\t\t * @return {string} A display-ready string.\n\t\t */\n\t\tdisplayString(value) {\n\t\t\tif (value === null || value === undefined) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t\tconst lang = getLanguage() || ''\n\t\t\t\tconst short = lang.split('-')[0]\n\t\t\t\tif (value[lang] !== undefined) {\n\t\t\t\t\treturn String(value[lang])\n\t\t\t\t}\n\t\t\t\tif (value[short] !== undefined) {\n\t\t\t\t\treturn String(value[short])\n\t\t\t\t}\n\t\t\t\tconst vals = Object.values(value)\n\t\t\t\treturn vals.length ? String(vals[0]) : ''\n\t\t\t}\n\t\t\treturn String(value)\n\t\t},\n\n\t\t/**\n\t\t * Deep merge two objects (target wins on conflict)\n\t\t *\n\t\t * @param {object} base Base object\n\t\t * @param {object} override Override object\n\t\t * @return {object} Merged result\n\t\t */\n\t\tdeepMerge(base, override) {\n\t\t\tconst result = { ...base }\n\t\t\tfor (const key of Object.keys(override)) {\n\t\t\t\tif (\n\t\t\t\t\toverride[key]\n\t\t\t\t\t&& typeof override[key] === 'object'\n\t\t\t\t\t&& !Array.isArray(override[key])\n\t\t\t\t\t&& base[key]\n\t\t\t\t\t&& typeof base[key] === 'object'\n\t\t\t\t\t&& !Array.isArray(base[key])\n\t\t\t\t) {\n\t\t\t\t\tresult[key] = this.deepMerge(base[key], override[key])\n\t\t\t\t} else {\n\t\t\t\t\tresult[key] = override[key]\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-chart-widget {\n\twidth: 100%;\n\t/* A chart FITS its container — it is never a scroll region. apexcharts\n\t sizes its SVG from the element it is mounted in, but it also enforces\n\t its own minimum widths (axis labels, legend, a bar's minimum body), so\n\t on a narrow tile the SVG comes out wider than the box and the widget\n\t card grows a horizontal scrollbar. `max-width` + `overflow: hidden`\n\t settle it in the box's favour: the graph clips its own margins rather\n\t than handing the user a bar to drag. Applies in BOTH modes, not just\n\t the percentage-height `--fit` one — the horizontal overflow has nothing\n\t to do with how the height was configured, which is why the existing\n\t `--fit` rules never caught it. */\n\tmax-width: 100%;\n\tmin-height: 100px;\n\toverflow-x: hidden;\n}\n\n/* Container-fitting mode (`height` given as a percentage). The root claims the\n full height it is given and lays its children out as a column; the canvas box\n takes what is left, so the chart is sized by the box rather than sizing it.\n `min-height: 0` drops the 100px floor — on a fixed-height surface a floor is\n the thing that produces the overflow it was meant to prevent. */\n.cn-chart-widget--fit {\n\theight: 100%;\n\tmin-height: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.cn-chart-widget__canvas {\n\tmin-width: 0;\n\tmax-width: 100%;\n\t/* Never a scroll region (see the root). `overflow-x: hidden` alone made\n\t the other axis `auto`, and the chart's inline SVG sat on a text line:\n\t its descender gap made the box 4 to 7px taller than the chart and drew a\n\t vertical scrollbar (pipelinq Rapportage). */\n\toverflow: hidden;\n}\n\n/* apexcharts writes an inline `width` onto its own wrapper from its measured\n minimum, which beats the container when the container is narrower. Cap the\n painted box so the inline width cannot push past the widget's border. */\n.cn-chart-widget :deep(.apexcharts-canvas),\n.cn-chart-widget :deep(.apexcharts-canvas svg) {\n\tmax-width: 100%;\n}\n\n/* The SVG is a block: as an inline box it sits on a line and adds the line's\n descender space under the chart. */\n.cn-chart-widget :deep(.apexcharts-canvas svg) {\n\tdisplay: block;\n}\n\n/* `flex: 1 1 0` (not `1 1 auto`) is load-bearing: with an `auto` basis the box\n would grow to its content, i.e. to the chart, and the percentage height would\n resolve against a box the chart itself defined. `overflow: hidden` keeps a\n sub-pixel rounding difference from reintroducing a scrollbar. */\n.cn-chart-widget--fit .cn-chart-widget__canvas {\n\tflex: 1 1 0;\n\tmin-height: 0;\n\toverflow: hidden;\n}\n\n.cn-chart-widget__fallback {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmin-height: 150px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-chart-widget__html {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-chart-widget__bar-list {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-chart-widget__bar-line {\n\talign-items: center;\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-main-text);\n\tdisplay: grid;\n\tfont: inherit;\n\tgap: 12px;\n\tgrid-template-columns: minmax(80px, 170px) minmax(0, 1fr) minmax(36px, max-content);\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-align: start;\n\twidth: 100%;\n}\n\n.cn-chart-widget__bar-line--drill {\n\tborder-radius: var(--border-radius-small, 4px);\n\tcursor: pointer;\n}\n\n.cn-chart-widget__bar-line--drill:hover .cn-chart-widget__bar-label,\n.cn-chart-widget__bar-line--drill:focus-visible .cn-chart-widget__bar-label {\n\ttext-decoration: underline;\n}\n\n.cn-chart-widget__bar-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-chart-widget__bar-track {\n\tbackground: var(--color-background-dark);\n\tborder-radius: 4px;\n\tdisplay: block;\n\theight: 14px;\n\toverflow: hidden;\n}\n\n.cn-chart-widget__bar-fill {\n\tbackground: var(--color-primary-element);\n\tdisplay: block;\n\theight: 100%;\n}\n\n.cn-chart-widget__bar-value {\n\tfont-weight: 600;\n\ttext-align: end;\n\twhite-space: nowrap;\n}\n\n/* `barValueAtEnd`: no track; the bar takes its share of the row and gives way\n to the value right after its end, so the longest bar still fits. */\n.cn-chart-widget__bar-list--value-at-end .cn-chart-widget__bar-line {\n\tgrid-template-columns: minmax(80px, 130px) minmax(0, 1fr);\n}\n\n.cn-chart-widget__bar-list--value-at-end .cn-chart-widget__bar-track {\n\talign-items: center;\n\tbackground: none;\n\tdisplay: flex;\n\tgap: 6px;\n\theight: auto;\n\toverflow: visible;\n}\n\n.cn-chart-widget__bar-list--value-at-end .cn-chart-widget__bar-fill {\n\tborder-radius: 4px;\n\tflex: 0 1 auto;\n\theight: 18px;\n\tmin-width: 2px;\n}\n\n.cn-chart-widget__bar-list--value-at-end .cn-chart-widget__bar-value {\n\tflex: none;\n\ttext-align: start;\n}\n\n.cn-chart-widget__footnote {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 0;\n}\n\n.cn-chart-widget__notice {\n\tmargin: 12px 0 0;\n}\n\n.cn-chart-widget__notice-text {\n\tmargin: 0;\n}\n\n/* Under an ApexCharts plot the footnote is a sibling of the canvas, so it keeps\n its own line height while the canvas takes the rest of a fitted column. */\n.cn-chart-widget > .cn-chart-widget__footnote {\n\tflex: 0 0 auto;\n\tmargin-top: 8px;\n}\n\n.cn-chart-widget__matrix {\n\tdisplay: grid;\n\tgap: 4px;\n}\n\n.cn-chart-widget__matrix-row {\n\tdisplay: contents;\n}\n\n/* A column takes its share of the width (minmax(0, 1fr)), so a long phase\n name breaks inside its own column instead of running into the next. */\n.cn-chart-widget__matrix-head {\n\t--nldesign-color-on-surface: var(--color-text-maxcontrast);\n\tcolor: var(--color-text-maxcontrast);\n\tpadding: 6px;\n\thyphens: auto;\n\toverflow-wrap: anywhere;\n}\n\n.cn-chart-widget__matrix-label {\n\tpadding: 10px 6px;\n}\n\n.cn-chart-widget__matrix-cell {\n\tborder-radius: 6px;\n\tpadding: 10px;\n\ttext-align: center;\n}\n\n.cn-chart-widget__matrix-cell--success {\n\tbackground: var(--color-success-light, color-mix(in srgb, var(--color-success) 15%, var(--color-main-background)));\n}\n\n.cn-chart-widget__matrix-cell--warning {\n\tbackground: var(--color-warning-light, color-mix(in srgb, var(--color-warning) 15%, var(--color-main-background)));\n}\n\n.cn-chart-widget__matrix-cell--error {\n\tbackground: var(--color-error-light, color-mix(in srgb, var(--color-error) 12%, var(--color-main-background)));\n}\n\n.cn-chart-widget__matrix-cell--danger {\n\tbackground: color-mix(in srgb, var(--color-error) 25%, var(--color-main-background));\n}\n\n.cn-chart-widget__matrix-cell--current {\n\tfont-weight: 700;\n\toutline: 3px solid var(--color-primary-element);\n\toutline-offset: -3px;\n}\n\n/* A cell is a span: its ink also goes to --nldesign-color-on-surface, which a\n theme that forces the body ink onto every span (thematiq) reads. The four\n levels are the boards' tones (DqProcesanalyse): the light primary, the\n primary at 35% and at 70%, and level 1 inverted. Levels 1 to 3 take a dark\n ink; the board's white on level 3 is about 3.1:1, and 70% is as deep as the\n dark ink stays at 4.5:1 in Nextcloud's dark theme. */\n.cn-chart-widget__matrix-cell--1 {\n\t--nldesign-color-on-surface: var(--color-primary-element-light-text);\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-chart-widget__matrix-cell--2 {\n\tbackground: color-mix(in srgb, var(--color-primary-element) 35%, var(--color-main-background));\n\tcolor: var(--color-main-text);\n}\n\n.cn-chart-widget__matrix-cell--3 {\n\t--nldesign-color-on-surface: var(--color-main-text);\n\tbackground: color-mix(in srgb, var(--color-primary-element) 70%, var(--color-main-background));\n\tcolor: var(--color-main-text);\n}\n\n.cn-chart-widget__matrix-cell--4 {\n\t--nldesign-color-on-surface: var(--color-primary-element-light);\n\tbackground: var(--color-primary-element-light-text);\n\tcolor: var(--color-primary-element-light);\n}\n\n.cn-chart-widget__empty {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmin-height: 150px;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n\ttext-align: center;\n\tpadding: 12px;\n}\n\n/* The empty / fallback placeholders carry a 150px floor for the normal\n content-sized case; in fit mode they take the leftover space and centre in it\n instead, since the floor would overflow a short tile. Declared after the base\n rules so the cascade order matches specificity (no-descending-specificity). */\n.cn-chart-widget--fit .cn-chart-widget__empty,\n.cn-chart-widget--fit .cn-chart-widget__fallback {\n\tflex: 1 1 0;\n\tmin-height: 0;\n}\n\n.cn-chart-widget__error {\n\tfont-size: 14px;\n\tmargin: 0;\n}\n\n/* In-widget view switcher pills (views[] prop) — compact segmented row,\n mirroring the dashboard date-range pill styling. */\n.cn-chart-widget__views {\n\tdisplay: flex;\n\tgap: 4px;\n\tmargin-bottom: 6px;\n\tjustify-content: flex-end;\n}\n\n.cn-chart-widget__view-pill {\n\tpadding: 2px 10px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: 999px;\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n\tcursor: pointer;\n}\n\n.cn-chart-widget__view-pill--active {\n\tbackground: var(--color-primary-element-light, #aad2ed);\n\tcolor: var(--color-main-text);\n\tborder-color: var(--color-primary-element, #0082c9);\n}\n\n/* ─── ApexCharts HTML chrome ───────────────────────────────────────────────\n Everything apexcharts draws INSIDE the SVG takes its colour from\n `mergedOptions` (foreColor, grid.borderColor, legend.labels.colors, axis\n label styles), so it already follows the Nextcloud theme. Its HTML chrome —\n the hover tooltip, the crosshair axis tooltips, the toolbar menu — does not:\n apexcharts styles those from a stylesheet it injects itself at chart-create\n time (`<style id=\"apexcharts-css\">`) using hardcoded hex values. In dark mode\n the hover tooltip stayed a white box while its text inherited the near-white\n `--color-main-text` — white on white, unreadable.\n\n `tooltip.theme` is not the fix: both apexcharts themes are hardcoded\n palettes, neither of them Nextcloud's, and choosing between them would need\n JS theme detection that a themed or nldesign install would still get wrong.\n Restyling with tokens means ONE rule set that is correct in light, dark,\n high-contrast and custom themes, because the tokens flip themselves. Both\n theme classes are listed so an `options.tooltip.theme` override cannot drop\n a consumer back onto a hardcoded palette.\n\n The specificity is deliberate. apexcharts injects its stylesheet when the\n first chart is created, so it lands AFTER the app's CSS and wins every tie —\n each override below therefore carries one more class than the apexcharts rule\n it replaces, and holds even without the scope attribute this block compiles\n with. */\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-light),\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-dark) {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n\tbox-shadow: 0 1px 5px var(--color-box-shadow, rgba(0, 0, 0, 0.2));\n}\n\n/* The title row is the date/category header (\"Aug 26\"). Its own background is\n what made it unreadable rather than merely off-theme. */\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title),\n.cn-chart-widget :deep(.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title) {\n\tbackground: var(--color-background-hover);\n\tborder-bottom: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n}\n\n/* Crosshair axis tooltips. apexcharts puts light hex values on the BASE class\n here and only overrides them for its dark theme, so the base rule has to be\n replaced too — not just the theme variants. */\n.cn-chart-widget :deep(.apexcharts-xaxistooltip),\n.cn-chart-widget :deep(.apexcharts-yaxistooltip) {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n}\n\n/* Their pointer arrows are two stacked triangles: `::before` paints the border\n edge, `::after` the fill. Both need the tokens the box above uses, or the\n arrow keeps the old palette and reads as a stray light wedge. */\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-bottom)::after,\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-top)::after {\n\tborder-bottom-color: var(--color-main-background);\n\tborder-top-color: var(--color-main-background);\n}\n\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-bottom)::before,\n.cn-chart-widget :deep(.apexcharts-xaxistooltip-top)::before {\n\tborder-bottom-color: var(--color-border);\n\tborder-top-color: var(--color-border);\n}\n\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-left)::after,\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-right)::after {\n\tborder-left-color: var(--color-main-background);\n\tborder-right-color: var(--color-main-background);\n}\n\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-left)::before,\n.cn-chart-widget :deep(.apexcharts-yaxistooltip-right)::before {\n\tborder-left-color: var(--color-border);\n\tborder-right-color: var(--color-border);\n}\n\n/* Toolbar menu — only reachable with `toolbar: true`, but the same defect: a\n hardcoded `#fff` panel under inherited near-white text. */\n.cn-chart-widget :deep(.apexcharts-menu) {\n\tbackground: var(--color-main-background);\n\tborder: 1px solid var(--color-border);\n\tcolor: var(--color-main-text);\n}\n\n.cn-chart-widget :deep(.apexcharts-menu .apexcharts-menu-item:hover) {\n\tbackground: var(--color-background-hover);\n}\n\n/* Toolbar icons: `#6e8192` at rest and `#333` on hover, i.e. the hover state\n vanishes against a dark background. One selector per icon class, matching\n apexcharts' own list, to clear its (0,3,1) hover rules. */\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-menu-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-reset-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-selection-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoom-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomin-icon svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomout-icon svg) {\n\tfill: var(--color-text-maxcontrast);\n}\n\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-menu-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-reset-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-selection-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoom-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomin-icon:hover svg),\n.cn-chart-widget :deep(.apexcharts-toolbar .apexcharts-zoomout-icon:hover svg) {\n\tfill: var(--color-main-text);\n}\n</style>\n"],"names":["CnEndpointNotice","t","VueApexCharts"],"mappings":";;;;;;;;;;;;;;;;;AA6LA;AACC;;;AAGD,MAAM,eAAgB,GAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAA;;AAE/D;;;;;AAKC;AACA;;;AAGD,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxB,CAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,KAAK,KAAI,IAAK,CAAC,EAAE;AAC1C,EAAA,OAAO,CAAA;AACR,EAAA;CACA,MAAM,SAAQ,GAAI,EAAC,IAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAA;AACpD,CAAA,KAAK,MAAM,IAAG,IAAK,eAAe,EAAE;EACnC,MAAM,SAAQ,GAAI,IAAG,GAAI,UAAQ;AACjC,EAAA,IAAI,SAAS,SAAS,EAAE;AACvB,GAAA,OAAO,SAAQ;AAChB,GAAA;AACD,EAAA;AACA,CAAA,OAAO,EAAC,GAAI,SAAQ;AACrB,CAAA;;AAEA;AACC;AACA;AACA;;;;AAID,MAAM,aAAY,GAAI,4GAA0G;;AAEhI;AACC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAED,SAAS,cAAc,CAAC,GAAG,EAAE;AAC5B,CAAA,MAAM,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;AACxC,CAAA,IAAI,CAAC,CAAC,EAAE;EACP,MAAM,MAAK,GAAI,IAAI,IAAI,CAAC,GAAG,EAAA;EAC3B,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,C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