@mx-cartographer/experiences 7.7.0-alpha.bb8 → 7.7.0-alpha.bb9

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.
@@ -89,7 +89,7 @@ const Tt = ({
89
89
  }
90
90
  ) })
91
91
  ] }), Rt = (t) => {
92
- const r = W(), s = t.showLabel, o = t.style, b = o?.markLabelStyles, x = Number(t.x), h = Number(t.y), u = t.handlers?.onMarkClick, m = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, i = Dt(r.breakpoints.up("sm")), f = t.valueFormatterString ? p(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), d = i ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, D = 30, T = 24, A = x - D / 2, B = h - 30;
92
+ const r = W(), s = t.showLabel, o = t.style, b = o?.markLabelStyles, x = Number(t.x), h = Number(t.y), u = t.handlers?.onMarkClick, m = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, i = Dt(r.breakpoints.up("sm")), f = t.valueFormatterString ? p(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), d = i ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, C = 30, T = 24, A = x - C / 2, B = h - 30;
93
93
  return /* @__PURE__ */ a($, { children: [
94
94
  s && /* @__PURE__ */ a($, { children: [
95
95
  t.labelBackgroundColor && /* @__PURE__ */ e(
@@ -98,7 +98,7 @@ const Tt = ({
98
98
  fill: t.labelBackgroundColor,
99
99
  height: T,
100
100
  rx: "3",
101
- width: D,
101
+ width: C,
102
102
  x: A,
103
103
  y: B
104
104
  }
@@ -306,7 +306,7 @@ const _t = ({
306
306
  customLegendBoxSx: i,
307
307
  customTooltipLabels: f,
308
308
  datasets: d,
309
- height: D,
309
+ height: C,
310
310
  isGraphClippingXAxis: T = !1,
311
311
  labels: A,
312
312
  labelBackgroundColor: B,
@@ -337,10 +337,10 @@ const _t = ({
337
337
  width: ct,
338
338
  xAxisScaleType: dt
339
339
  }) => {
340
- const y = W(), ht = d.flat().map((n) => n.x), C = d.flat().map((n) => n.y), O = E || Math.round(C.reduce((n, v) => v + n, 0) / C.length), w = Math.floor(Math.min(...C) / 100) * 100, L = Math.ceil(Math.max(...C) / 100) * 100, I = d.map((n, v) => ({
340
+ const y = W(), ht = d.flat().map((n) => n.x), w = d.flat().map((n) => n.y), O = E || Math.round(w.reduce((n, D) => D + n, 0) / w.length), L = Math.floor(Math.min(...w) / 100) * 100, S = Math.ceil(Math.max(...w) / 100) * 100, I = d.map((n, D) => ({
341
341
  type: N ? "bar" : "line",
342
342
  curve: u,
343
- color: N ? y.palette.chart?.chart6 : h[v] ?? y.palette.primary.main,
343
+ color: N ? y.palette.chart?.chart6 : h[D] ?? y.palette.primary.main,
344
344
  data: n.map((g) => g.y),
345
345
  area: H,
346
346
  baseline: s,
@@ -355,21 +355,22 @@ const _t = ({
355
355
  },
356
356
  ...Q
357
357
  };
358
- let S = J ?? w, R = K ?? L;
358
+ let v = J ?? L, R = K ?? S;
359
359
  if (o === "networthChart") {
360
- const n = L - w, v = n < L * 0.05 ? 0.25 : 0.2, g = Math.max(n * v, L * 0.015);
361
- S = w - g < 0 ? w : w - g, R = L + g;
360
+ const n = S - L, D = n < S * 0.05 ? 0.25 : 0.2, g = Math.max(n * D, S * 0.015);
361
+ v = L - g < 0 ? L : L - g, R = S + g;
362
362
  }
363
363
  const ut = () => {
364
364
  if (o === "creditOverTime")
365
- return X(S, 850, 5);
365
+ return X(v, 850, 5);
366
366
  if (o === "networthChart")
367
- return X(S, R, 5);
367
+ return X(v, R, 5);
368
368
  };
369
369
  return /* @__PURE__ */ a(
370
370
  Y,
371
371
  {
372
372
  sx: {
373
+ height: C || "100%",
373
374
  position: "relative",
374
375
  touchAction: "pan-y",
375
376
  // Allow vertical scrolling
@@ -388,7 +389,7 @@ const _t = ({
388
389
  /* @__PURE__ */ a(
389
390
  xt,
390
391
  {
391
- height: D,
392
+ height: C,
392
393
  margin: mt,
393
394
  series: I,
394
395
  sx: {
@@ -411,11 +412,11 @@ const _t = ({
411
412
  yAxis: [
412
413
  {
413
414
  tickInterval: ut(),
414
- min: T ? -22 : S,
415
+ min: T ? -22 : v,
415
416
  max: R || 100,
416
417
  colorMap: H && I.length < 2 ? {
417
418
  type: "continuous",
418
- min: S,
419
+ min: v,
419
420
  max: R,
420
421
  color: [
421
422
  y.palette.background.paper,
@@ -486,7 +487,7 @@ const _t = ({
486
487
  showMark: tt || n.dataIndex === d[0].length - 1,
487
488
  style: V?.(n.dataIndex) ?? {},
488
489
  valueFormatterString: k,
489
- yData: C,
490
+ yData: w,
490
491
  ...n
491
492
  }
492
493
  )
@@ -11,7 +11,7 @@ import B from "@mui/material/ListSubheader";
11
11
  import W from "@mui/system/Stack";
12
12
  import { useTheme as v1, alpha as A1 } from "@mui/material/styles";
13
13
  import { u as R, A as M1 } from "../AccountDetailsHeader-rT8KbT1M.mjs";
14
- import { L as w1 } from "../LineChart-BF4QA-Lx.mjs";
14
+ import { L as w1 } from "../LineChart-BoML7cMy.mjs";
15
15
  import { g as x1, a as y1, b as b1 } from "../SpendingData-BmL0bwnS.mjs";
16
16
  import { m as S1, u as w, d as k, g as Z, h as C1, b as $, a as R1 } from "../hooks-ZMp65DFz.mjs";
17
17
  import { A as c1, g as L, N as h1 } from "../Account-Cp4uT2pE.mjs";
@@ -14,7 +14,7 @@ import { L as ee } from "../Loader-DUaFpDGv.mjs";
14
14
  import u from "react";
15
15
  import B from "@mui/material/Button";
16
16
  import Y from "@mui/material/Card";
17
- import { L as Ve } from "../LineChart-BF4QA-Lx.mjs";
17
+ import { L as Ve } from "../LineChart-BoML7cMy.mjs";
18
18
  import { C as ft } from "../ConnectionsDrawer-BDpVTTSe.mjs";
19
19
  import { b as re } from "../GlobalAccountFilter-DQCPNc95.mjs";
20
20
  import le from "@mui/material/Tab";
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as r, Fragment as N } from "react/jsx-runtime";
2
2
  import { fromUnixTime as re } from "date-fns/fromUnixTime";
3
3
  import { observer as w } from "mobx-react-lite";
4
4
  import { useTheme as j } from "@mui/material/styles";
5
- import { L as ie } from "../LineChart-BF4QA-Lx.mjs";
5
+ import { L as ie } from "../LineChart-BoML7cMy.mjs";
6
6
  import { p as ae, q as B, u as E, g as $, d as Y, b as q } from "../hooks-ZMp65DFz.mjs";
7
7
  import { u as Z } from "../useScreenSize-B6JyS_Lj.mjs";
8
8
  import { f as se, D as ce } from "../Dialog-B4PI-_bL.mjs";
@@ -1,12 +1,12 @@
1
1
  import { jsxs as y, jsx as e, Fragment as yt } from "react/jsx-runtime";
2
2
  import u, { useRef as _t, useState as Tt, useEffect as bt } from "react";
3
3
  import { observer as R } from "mobx-react-lite";
4
- import { CategoryIcon as De, Text as z, Icon as Se, P as pe, H3 as je, ChevronRightIcon as St } from "@mxenabled/mxui";
4
+ import { CategoryIcon as ve, Text as z, Icon as be, P as pe, H3 as je, ChevronRightIcon as St } from "@mxenabled/mxui";
5
5
  import A from "@mui/material/Box";
6
6
  import w from "@mui/material/Stack";
7
- import we from "@mui/material/Button";
7
+ import Se from "@mui/material/Button";
8
8
  import { addSeconds as Ue } from "date-fns/addSeconds";
9
- import { differenceInCalendarMonths as xe } from "date-fns/differenceInCalendarMonths";
9
+ import { differenceInCalendarMonths as we } from "date-fns/differenceInCalendarMonths";
10
10
  import wt from "numeral";
11
11
  import { useTheme as de } from "@mui/material/styles";
12
12
  import { useItemTooltip as xt, ChartsTooltipContainer as vt } from "@mui/x-charts/ChartsTooltip";
@@ -15,17 +15,17 @@ import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
15
15
  import { u as It } from "../useDimensions-27p2evRx.mjs";
16
16
  import Xe from "@mui/material/Card";
17
17
  import Ze from "@mui/material/CardContent";
18
- import Ne from "@mui/material/Divider";
18
+ import He from "@mui/material/Divider";
19
19
  import Ge from "@mui/material/Grid";
20
- import { u as k, m as J, g as F, b as Ce, h as Ie, d as Le, v as ye, p as Qe, f as We, a as qe } from "../hooks-ZMp65DFz.mjs";
20
+ import { u as k, m as J, g as P, b as fe, h as De, d as Ie, v as Ce, p as Qe, f as We, a as qe } from "../hooks-ZMp65DFz.mjs";
21
21
  import { b as Je } from "../Localization-2MODESHW.mjs";
22
- import { C as ve } from "../CurrencyText-Dr0EZ7bp.mjs";
22
+ import { C as xe } from "../CurrencyText-Dr0EZ7bp.mjs";
23
23
  import { C as Re, b as Be, c as Lt } from "../Category-CevNQ03n.mjs";
24
24
  import { f as Q, D as V } from "../Dialog-B4PI-_bL.mjs";
25
25
  import { f as ae, a as Et } from "../NumberFormatting-DjTD0t3W.mjs";
26
26
  import { c as Mt, a as Ve, g as At, L as et } from "../TrendsStore-DXQnmdc8.mjs";
27
27
  import { T as Xn } from "../TrendsStore-DXQnmdc8.mjs";
28
- import { c as Rt, i as kt, d as Nt, e as Ht, b as tt, g as ot, f as Pe } from "../SpendingData-BmL0bwnS.mjs";
28
+ import { c as Rt, i as kt, d as Ht, e as Nt, b as tt, g as ot, f as Fe } from "../SpendingData-BmL0bwnS.mjs";
29
29
  import Wt from "@mui/material/ToggleButton";
30
30
  import Ot from "@mui/material/ToggleButtonGroup";
31
31
  import { DataGridPro as Gt } from "@mui/x-data-grid-pro";
@@ -34,13 +34,13 @@ import { parseISO as nt } from "date-fns/parseISO";
34
34
  import { H as ke } from "../HeaderCell-DjuifqHJ.mjs";
35
35
  import { A as v, W as st } from "../WidgetContainer-Dd99GYSN.mjs";
36
36
  import { a as rt, T as at } from "../TransactionDetails-D1TZl3jS.mjs";
37
- import { D as He } from "../Drawer-DV4NTsFg.mjs";
38
- import { u as Ee } from "../useWidgetLoadTimer-hIOioiKx.mjs";
39
- import { L as fe } from "../Loader-DUaFpDGv.mjs";
40
- import { L as Oe } from "../LineChart-BF4QA-Lx.mjs";
37
+ import { D as Ne } from "../Drawer-DV4NTsFg.mjs";
38
+ import { u as Le } from "../useWidgetLoadTimer-hIOioiKx.mjs";
39
+ import { L as Ee } from "../Loader-DUaFpDGv.mjs";
40
+ import { L as Oe } from "../LineChart-BoML7cMy.mjs";
41
41
  import { M as Vt } from "../MiniWidgetContainer-98-hKFqm.mjs";
42
- import { subMonths as Pt } from "date-fns";
43
- import { TrendingUp as Ft, TrendingDown as $t, MultilineChart as zt, ExpandLess as Kt, ExpandMore as Yt } from "@mxenabled/mx-icons";
42
+ import { subMonths as Ft } from "date-fns";
43
+ import { TrendingUp as Pt, TrendingDown as $t, MultilineChart as zt, ExpandLess as Kt, ExpandMore as Yt } from "@mxenabled/mx-icons";
44
44
  import { M as jt } from "../MicroWidgetContainer-B2hO9rOG.mjs";
45
45
  import Ut from "@mui/material/Collapse";
46
46
  import Xt from "@mui/material/List";
@@ -65,7 +65,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
65
65
  "aria-label": Je(n.category_icon_label_aria, r),
66
66
  mb: 4,
67
67
  role: "img",
68
- children: /* @__PURE__ */ e(De, { categoryGuid: s })
68
+ children: /* @__PURE__ */ e(ve, { categoryGuid: s })
69
69
  }
70
70
  ),
71
71
  /* @__PURE__ */ e(z, { variant: "Body", children: r })
@@ -102,15 +102,15 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
102
102
  /* @__PURE__ */ y(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
103
103
  /* @__PURE__ */ e(ct, { categoryGuid: o, topLevelCategoryGuid: s }),
104
104
  /* @__PURE__ */ e(z, { variant: "Small", children: `${n.length}-month total` }),
105
- /* @__PURE__ */ e(ve, { amount: l, bold: !0, formatString: "0,0", variant: "body2" })
105
+ /* @__PURE__ */ e(xe, { amount: l, bold: !0, formatString: "0,0", variant: "body2" })
106
106
  ] }),
107
- /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
107
+ /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
108
108
  /* @__PURE__ */ e(Ge, { container: !0, children: n.map((p, m) => /* @__PURE__ */ y(u.Fragment, { children: [
109
- m > 0 && m % 3 === 0 && /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
109
+ m > 0 && m % 3 === 0 && /* @__PURE__ */ e(He, { sx: { my: 16, width: "100%" } }),
110
110
  /* @__PURE__ */ e(Ge, { item: !0, xs: 4, children: /* @__PURE__ */ y(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
111
111
  /* @__PURE__ */ e(z, { color: i.palette.text.secondary, variant: "XSmall", children: p.x }),
112
112
  /* @__PURE__ */ e(
113
- ve,
113
+ xe,
114
114
  {
115
115
  amount: p.y,
116
116
  bold: !0,
@@ -144,7 +144,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
144
144
  children: s.map(({ guid: c, top_level_guid: l }) => {
145
145
  const p = n === c, m = Re[c], _ = Re[l], f = m ?? _ ?? Re.default, g = f + "33";
146
146
  return /* @__PURE__ */ y(
147
- we,
147
+ Se,
148
148
  {
149
149
  onClick: () => i(c),
150
150
  onMouseEnter: () => r(c),
@@ -194,7 +194,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
194
194
  return l === void 0 || !p ? null : /* @__PURE__ */ e(Xe, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(Ze, { children: /* @__PURE__ */ y(A, { alignItems: "center", display: "flex", flexDirection: "column", children: [
195
195
  /* @__PURE__ */ e(ct, { categoryGuid: o, topLevelCategoryGuid: s }),
196
196
  /* @__PURE__ */ e(z, { color: i.palette.text.secondary, variant: "Small", children: Q(p, V.MONTH_SHORT_YEAR) }),
197
- /* @__PURE__ */ e(ve, { amount: String(l), bold: !0, formatString: "0,0", variant: "Body" })
197
+ /* @__PURE__ */ e(xe, { amount: String(l), bold: !0, formatString: "0,0", variant: "Body" })
198
198
  ] }) }) });
199
199
  }, ho = ({
200
200
  onHoverArea: o,
@@ -216,11 +216,11 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
216
216
  hoveredAreaData: null,
217
217
  isAreaHovered: !1,
218
218
  cursorPos: { x: 0, y: 0 }
219
- }), { hoveredSeriesId: b, hoveredAreaData: E, isAreaHovered: W, cursorPos: M } = S, $ = W && b && E, K = !$, N = [...r, ...i], O = N[0]?.dataset.length ?? 0, ee = N.flatMap((a) => a.dataset.map((T) => T.x)), P = N.flatMap((a) => a.dataset.map((T) => T.y)), te = r[0]?.dataset?.map(
219
+ }), { hoveredSeriesId: b, hoveredAreaData: E, isAreaHovered: W, cursorPos: M } = S, $ = W && b && E, K = !$, H = [...r, ...i], O = H[0]?.dataset.length ?? 0, ee = H.flatMap((a) => a.dataset.map((T) => T.x)), F = H.flatMap((a) => a.dataset.map((T) => T.y)), te = r[0]?.dataset?.map(
220
220
  (a, T) => r.reduce((I, Z) => I + Z.dataset[T]?.y || 0, 0)
221
221
  ) ?? [0], Y = Math.max(...te), ie = Math.max(
222
222
  ...i.flatMap((a) => a.dataset.map((T) => T.y))
223
- ), _e = Math.floor(Math.min(...P) / 100) * 100, ne = Math.ceil(Math.max(Y, ie) / 100) * 100, j = r.map((a, T) => ({
223
+ ), ye = Math.floor(Math.min(...F) / 100) * 100, ne = Math.ceil(Math.max(Y, ie) / 100) * 100, j = r.map((a, T) => ({
224
224
  id: `stacked-${T}`,
225
225
  guid: a.category_guid,
226
226
  top_level_guid: a.top_level_category_guid,
@@ -265,15 +265,15 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
265
265
  const a = X(String(b)).guid;
266
266
  a && t?.(a);
267
267
  }, he = (a) => {
268
- const T = String(a?.seriesId), I = X(T).guid, Z = se.find((ge) => ge.id === T), Te = Z && a?.dataIndex !== void 0, be = Z && a?.dataIndex === void 0;
269
- if (Te)
268
+ const T = String(a?.seriesId), I = X(T).guid, Z = se.find((ge) => ge.id === T), _e = Z && a?.dataIndex !== void 0, Te = Z && a?.dataIndex === void 0;
269
+ if (_e)
270
270
  L({
271
271
  hoveredSeriesId: T,
272
272
  hoveredAreaData: null,
273
273
  isAreaHovered: !1,
274
274
  cursorPos: M
275
275
  }), s?.(I);
276
- else if (be) {
276
+ else if (Te) {
277
277
  const ge = Z?.data.map((Me, Ae) => ({
278
278
  x: ee[Ae],
279
279
  y: Me
@@ -384,7 +384,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
384
384
  ],
385
385
  yAxis: [
386
386
  {
387
- min: _e,
387
+ min: ye,
388
388
  max: ne || 100,
389
389
  valueFormatter: (a) => wt(a).format("0a")
390
390
  }
@@ -437,7 +437,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
437
437
  color: "primary",
438
438
  sx: { width: 56 },
439
439
  value: t,
440
- children: t === "Chart" ? /* @__PURE__ */ e(Se, { name: "table_chart_view" }) : /* @__PURE__ */ e(Se, { name: "format_list_bulleted" })
440
+ children: t === "Chart" ? /* @__PURE__ */ e(be, { name: "table_chart_view" }) : /* @__PURE__ */ e(be, { name: "format_list_bulleted" })
441
441
  },
442
442
  t
443
443
  ))
@@ -475,7 +475,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
475
475
  /* @__PURE__ */ e(z, { variant: r ? "subtitle1" : "body2", children: h })
476
476
  ] });
477
477
  }, go = ({ name: o, topLevelCategoryGuid: s }) => /* @__PURE__ */ y(w, { alignItems: "center", direction: "row", justifyContent: "center", children: [
478
- /* @__PURE__ */ e(A, { "aria-hidden": !0, children: /* @__PURE__ */ e(De, { categoryGuid: s, variant: "twotone" }) }),
478
+ /* @__PURE__ */ e(A, { "aria-hidden": !0, children: /* @__PURE__ */ e(ve, { categoryGuid: s, variant: "twotone" }) }),
479
479
  /* @__PURE__ */ e(z, { sx: { ml: 12 }, variant: "body2", children: o })
480
480
  ] }), mo = (o) => /* @__PURE__ */ e(w, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
481
481
  go,
@@ -483,10 +483,10 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
483
483
  name: o.row.category,
484
484
  topLevelCategoryGuid: o.row.top_level_category_guid
485
485
  }
486
- ) }), Fe = (o) => {
486
+ ) }), Pe = (o) => {
487
487
  const s = o.row.category_guid, n = o.row.top_level_category_guid, t = s === Be.INCOME || n === Be.INCOME, r = o.row[o.field];
488
488
  return /* @__PURE__ */ e(w, { alignItems: "flex-end", direction: "row", tabIndex: o.tabIndex, children: /* @__PURE__ */ e(
489
- ve,
489
+ xe,
490
490
  {
491
491
  amount: t ? Math.abs(r) : r,
492
492
  isIncome: t,
@@ -527,7 +527,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
527
527
  headerName: i,
528
528
  minWidth: 100,
529
529
  renderHeader: ke,
530
- renderCell: Fe,
530
+ renderCell: Pe,
531
531
  align: "right",
532
532
  headerAlign: "right",
533
533
  sortable: !0,
@@ -541,7 +541,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
541
541
  headerName: s.table_column_total,
542
542
  minWidth: 100,
543
543
  renderHeader: ke,
544
- renderCell: Fe,
544
+ renderCell: Pe,
545
545
  align: "right",
546
546
  headerAlign: "right",
547
547
  sortable: !0,
@@ -583,7 +583,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
583
583
  height: t = "100%",
584
584
  sx: r = {}
585
585
  }) => {
586
- const i = de(), { onEvent: h } = F(), { trends: d } = k(), { trendsCategories: c } = J(), l = u.useMemo(() => po(o.start, o.end), [o]), p = i.palette.mode === "light", m = u.useMemo(() => fo(l, d), [l, d]), _ = u.useMemo(() => {
586
+ const i = de(), { onEvent: h } = P(), { trends: d } = k(), { trendsCategories: c } = J(), l = u.useMemo(() => po(o.start, o.end), [o]), p = i.palette.mode === "light", m = u.useMemo(() => fo(l, d), [l, d]), _ = u.useMemo(() => {
587
587
  if (s)
588
588
  return c.find((g) => g.guid === s);
589
589
  }, [s, c]), f = u.useMemo(() => {
@@ -633,7 +633,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
633
633
  isOpen: n,
634
634
  onClose: t
635
635
  }) => {
636
- const { onEvent: r } = F(), { selectedAccountGuids: i } = Ce(), { common: h } = k(), { setFilter: d, sortedTransactions: c } = Ie(), [l, p] = u.useState(""), m = u.useMemo(
636
+ const { onEvent: r } = P(), { selectedAccountGuids: i } = fe(), { common: h } = k(), { setFilter: d, sortedTransactions: c } = De(), [l, p] = u.useState(""), m = u.useMemo(
637
637
  () => c.find((f) => f.guid === l),
638
638
  [l, c]
639
639
  );
@@ -649,7 +649,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
649
649
  p(""), t();
650
650
  };
651
651
  return /* @__PURE__ */ y(
652
- He,
652
+ Ne,
653
653
  {
654
654
  ariaLabelClose: h.close_aria,
655
655
  isOpen: n,
@@ -662,7 +662,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
662
662
  }
663
663
  );
664
664
  }, To = R(_o), bo = ({ onBackClick: o, sx: s }) => {
665
- const { onEvent: n } = F(), { isDesktop: t, isTablet: r, isMobile: i } = q(), { isAccountDataLoaded: h, loadAccountData: d } = Le(), {
665
+ const { onEvent: n } = P(), { isDesktop: t, isTablet: r, isMobile: i } = q(), { isAccountDataLoaded: h, loadAccountData: d } = Ie(), {
666
666
  categoriesLoaded: c,
667
667
  loadCategories: l,
668
668
  loadDateRangeCategoryTotals: p,
@@ -673,8 +673,8 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
673
673
  isTransactionDataLoaded: g,
674
674
  loadTransactionData: C,
675
675
  sortedTransactions: x
676
- } = Ie(), { selectedDateRange: S, setSelectedDateRange: L } = ye(), { isInitialized: b, selectedAccounts: E } = Ce(), { trends: W } = k(), [M, $] = u.useState(!1), [K, N] = u.useState(!1), [O, ee] = u.useState("Chart"), [P, te] = u.useState(""), [Y, ie] = u.useState(window.innerHeight), ne = Y - (i ? 315 : 345);
677
- Ee({
676
+ } = De(), { selectedDateRange: S, setSelectedDateRange: L } = Ce(), { isInitialized: b, selectedAccounts: E } = fe(), { trends: W } = k(), [M, $] = u.useState(!1), [K, H] = u.useState(!1), [O, ee] = u.useState("Chart"), [F, te] = u.useState(""), [Y, ie] = u.useState(window.innerHeight), ne = Y - (i ? 315 : 345);
677
+ Le({
678
678
  widgetName: "TrendsFullWidget",
679
679
  isLoaded: M
680
680
  }), u.useEffect(() => {
@@ -690,7 +690,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
690
690
  }).finally(() => {
691
691
  $(!0), n(v.TRENDS_LOAD_WIDGET, {
692
692
  ...G,
693
- time_period: `${xe(S.end, S.start)}M`
693
+ time_period: `${we(S.end, S.start)}M`
694
694
  });
695
695
  });
696
696
  }, [b, E, S]);
@@ -700,17 +700,17 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
700
700
  _,
701
701
  S.start,
702
702
  S.end
703
- ), B = P.length ? D.filter(
704
- (a) => a.top_level_category_guid === P || a.category_guid === P
703
+ ), B = F.length ? D.filter(
704
+ (a) => a.top_level_category_guid === F || a.category_guid === F
705
705
  ) : Rt(D);
706
706
  return {
707
707
  stackedDatasets: B.filter(kt),
708
- unstackedDatasets: B.filter(Nt)
708
+ unstackedDatasets: B.filter(Ht)
709
709
  };
710
- }, [_, P, S]), U = (D, B) => {
710
+ }, [_, F, S]), U = (D, B) => {
711
711
  ee(B ?? O), n(v.TRENDS_CLICK_TOGGLE_VIEW);
712
712
  }, se = (D) => {
713
- const B = Ue(D?.[0], 1), a = D?.[1], T = xe(a, B);
713
+ const B = Ue(D?.[0], 1), a = D?.[1], T = we(a, B);
714
714
  L({ start: B, end: a }), n(v.TRENDS_CLICK_TIME_WINDOW, {
715
715
  time_period: T + "M"
716
716
  });
@@ -727,7 +727,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
727
727
  }, he = (D) => {
728
728
  n(v.TRENDS_HOVER_POINT, { category: D });
729
729
  };
730
- return !b || !M ? /* @__PURE__ */ e(fe, {}) : /* @__PURE__ */ y(
730
+ return !b || !M ? /* @__PURE__ */ e(Ee, {}) : /* @__PURE__ */ y(
731
731
  st,
732
732
  {
733
733
  calendarActions: { onRangeChanged: se },
@@ -756,7 +756,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
756
756
  /* @__PURE__ */ e(
757
757
  dt,
758
758
  {
759
- selectedCategoryGuid: P,
759
+ selectedCategoryGuid: F,
760
760
  selectedDateRange: S
761
761
  }
762
762
  ),
@@ -765,11 +765,11 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
765
765
  }
766
766
  ),
767
767
  /* @__PURE__ */ y(w, { alignItems: "center", flexDirection: "row", width: "100%", children: [
768
- /* @__PURE__ */ e(A, { flexGrow: 1, children: P && /* @__PURE__ */ y(we, { onClick: () => te(""), sx: { p: 0, pr: 5 }, children: [
769
- /* @__PURE__ */ e(Se, { name: "arrow_back" }),
768
+ /* @__PURE__ */ e(A, { flexGrow: 1, children: F && /* @__PURE__ */ y(Se, { onClick: () => te(""), sx: { p: 0, pr: 5 }, children: [
769
+ /* @__PURE__ */ e(be, { name: "arrow_back" }),
770
770
  W.all_categories
771
771
  ] }) }),
772
- /* @__PURE__ */ e(we, { onClick: () => N(!0), sx: { px: 5 }, children: `${W.view_transactions} (${x.length})` })
772
+ /* @__PURE__ */ e(Se, { onClick: () => H(!0), sx: { px: 5 }, children: `${W.view_transactions} (${x.length})` })
773
773
  ] }),
774
774
  /* @__PURE__ */ y(A, { children: [
775
775
  O === "Chart" && /* @__PURE__ */ e(
@@ -788,7 +788,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
788
788
  ut,
789
789
  {
790
790
  onClickRow: X,
791
- selectedCategory: P,
791
+ selectedCategory: F,
792
792
  selectedDateRange: S
793
793
  }
794
794
  )
@@ -799,10 +799,10 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
799
799
  /* @__PURE__ */ e(
800
800
  To,
801
801
  {
802
- categoryGuid: P,
802
+ categoryGuid: F,
803
803
  dateRange: S,
804
804
  isOpen: K,
805
- onClose: () => N(!1)
805
+ onClose: () => H(!1)
806
806
  }
807
807
  )
808
808
  ]
@@ -810,10 +810,10 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
810
810
  );
811
811
  }, $n = R(bo), So = () => {
812
812
  const { monthlyCategoryTotals: o } = J(), { trends: s } = k(), n = de(), { availableHeight: t = 300 } = Qe(), r = u.useMemo(
813
- () => Ht(o),
813
+ () => Nt(o),
814
814
  [o]
815
815
  );
816
- return console.warn("SPENDING_MINI_CHART: Data - ", r), /* @__PURE__ */ e(
816
+ return /* @__PURE__ */ e(
817
817
  Oe,
818
818
  {
819
819
  baseline: "min",
@@ -830,26 +830,26 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
830
830
  }
831
831
  );
832
832
  }, wo = R(So), xo = ({ onPrimaryCtaClick: o, sx: s }) => {
833
- const { isAccountDataLoaded: n, loadAccountData: t } = Le(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: i } = J(), { isInitialized: h } = We(), { trends: d } = k(), { selectedAccounts: c } = Ce();
833
+ const { isAccountDataLoaded: n, loadAccountData: t } = Ie(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: i } = J(), { isInitialized: h } = We(), { trends: d } = k(), { selectedAccounts: c } = fe();
834
834
  return u.useEffect(() => {
835
835
  n || t().finally();
836
- }, []), Ee({
836
+ }, []), Le({
837
837
  widgetName: "TrendsMiniWidget",
838
838
  isLoaded: i
839
839
  }), u.useEffect(() => {
840
- h && (console.warn("TRENDS_MINI: Loading Month Totals"), r(c).finally());
841
- }, [h, c]), h ? (console.warn("TRENDS_MINI: Monthly Loaded:", i), /* @__PURE__ */ e(
840
+ h && r(c).finally();
841
+ }, [h, c]), !h && !i ? /* @__PURE__ */ e(Ee, {}) : /* @__PURE__ */ e(
842
842
  Vt,
843
843
  {
844
- contentStyles: { height: "calc(100% - 72px)", ":last-child": { pb: 0 } },
844
+ contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
845
845
  onPrimaryCtaClick: o,
846
846
  primaryCtaLabel: d.primary_cta,
847
847
  subTitle: d.sub_title,
848
848
  sx: { height: "100%", ...s },
849
849
  title: d.mini_title,
850
- children: i ? /* @__PURE__ */ e(wo, {}) : /* @__PURE__ */ e(fe, {})
850
+ children: /* @__PURE__ */ e(wo, {})
851
851
  }
852
- )) : /* @__PURE__ */ e(fe, {});
852
+ );
853
853
  }, zn = R(xo), vo = 70, Ke = ({
854
854
  title: o,
855
855
  totalAmount: s,
@@ -886,7 +886,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
886
886
  children: [
887
887
  /* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: o }),
888
888
  i && /* @__PURE__ */ y(w, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
889
- m ? /* @__PURE__ */ e(Ft, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e($t, { size: 20, sx: { color: f } }),
889
+ m ? /* @__PURE__ */ e(Pt, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e($t, { size: 20, sx: { color: f } }),
890
890
  /* @__PURE__ */ e(
891
891
  pe,
892
892
  {
@@ -944,15 +944,15 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
944
944
  ] })
945
945
  ] });
946
946
  }), Kn = R(({ onCtaClick: o }) => {
947
- const { isAccountDataLoaded: s, loadAccountData: n, visibleAccounts: t } = Le();
947
+ const { isAccountDataLoaded: s, loadAccountData: n, visibleAccounts: t } = Ie();
948
948
  u.useEffect(() => {
949
949
  s || n().finally();
950
950
  }, []);
951
- const { onEvent: r } = F(), { monthlyCategoryTotals: i, loadMonthlyCategoryTotals: h, monthlyTotalsLoaded: d } = J(), c = {
952
- start: Pt(/* @__PURE__ */ new Date(), 1),
951
+ const { onEvent: r } = P(), { monthlyCategoryTotals: i, loadMonthlyCategoryTotals: h, monthlyTotalsLoaded: d } = J(), c = {
952
+ start: Ft(/* @__PURE__ */ new Date(), 1),
953
953
  end: /* @__PURE__ */ new Date()
954
- }, { trends: l } = k(), { selectedAccounts: p, isInitialized: m } = Ce();
955
- Ee({
954
+ }, { trends: l } = k(), { selectedAccounts: p, isInitialized: m } = fe();
955
+ Le({
956
956
  widgetName: "TrendsMicroWidget",
957
957
  isLoaded: d
958
958
  }), u.useEffect(() => {
@@ -968,12 +968,12 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
968
968
  incomeData: ot(i, c)
969
969
  }),
970
970
  [i, c]
971
- ), [g, C] = _, [x, S] = f, L = Pe(C.y, g.y), b = Pe(S.y, x.y), E = m && !t?.length, W = () => {
971
+ ), [g, C] = _, [x, S] = f, L = Fe(C.y, g.y), b = Fe(S.y, x.y), E = m && !t?.length, W = () => {
972
972
  r(
973
973
  E ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
974
974
  ), o();
975
975
  };
976
- return !d || !m ? /* @__PURE__ */ e(fe, {}) : /* @__PURE__ */ e(
976
+ return !d || !m ? /* @__PURE__ */ e(Ee, {}) : /* @__PURE__ */ e(
977
977
  jt,
978
978
  {
979
979
  className: "mx-trends-microwidget",
@@ -1049,7 +1049,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1049
1049
  isLastItem: i = !1,
1050
1050
  showDivider: h = !0
1051
1051
  }) => {
1052
- const { trends: d } = k(), { onEvent: c } = F(), l = `${t.length} ${t.length === 1 ? d.transaction : d.transactions}`, p = () => {
1052
+ const { trends: d } = k(), { onEvent: c } = P(), l = `${t.length} ${t.length === 1 ? d.transaction : d.transactions}`, p = () => {
1053
1053
  r?.(), c(v.TRENDS_CLICK_LIST_ITEM, {
1054
1054
  ...G,
1055
1055
  listItem: n
@@ -1059,7 +1059,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1059
1059
  /* @__PURE__ */ e(
1060
1060
  et,
1061
1061
  {
1062
- leftIcon: s ? /* @__PURE__ */ e(De, { categoryGuid: s }) : void 0,
1062
+ leftIcon: s ? /* @__PURE__ */ e(ve, { categoryGuid: s }) : void 0,
1063
1063
  onClick: p,
1064
1064
  rightContent: ae(Math.abs(o), "0,0.00"),
1065
1065
  rightIcon: r ? /* @__PURE__ */ e(St, {}) : void 0,
@@ -1067,12 +1067,12 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1067
1067
  title: n
1068
1068
  }
1069
1069
  ),
1070
- h && /* @__PURE__ */ e(Ne, { sx: { ml: i ? 24 : 68 } })
1070
+ h && /* @__PURE__ */ e(He, { sx: { ml: i ? 24 : 68 } })
1071
1071
  ] }, s);
1072
1072
  }
1073
1073
  ), Lo = R(
1074
1074
  ({ availableHeight: o = 0, onCategoryClick: s }) => {
1075
- const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = ye(), { isLargeDesktop: i, isDesktop: h } = q(), { trends: d } = k(), { onEvent: c } = F(), [l, p] = u.useState(!1), m = h || i;
1075
+ const { collapsedCategories: n, visibleCategories: t, setVisibleListLength: r } = Ce(), { isLargeDesktop: i, isDesktop: h } = q(), { trends: d } = k(), { onEvent: c } = P(), [l, p] = u.useState(!1), m = h || i;
1076
1076
  u.useEffect(() => {
1077
1077
  const g = Math.floor(o / 64) - 1, C = t.length + n.length;
1078
1078
  g !== t.length && (r(m ? Math.max(g, 5) : 5), p(g >= C));
@@ -1118,7 +1118,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1118
1118
  ] }) });
1119
1119
  }
1120
1120
  ), Eo = ({ beats: o, onInsightCardClick: s }) => {
1121
- const { onEvent: n } = F(), { isMobile: t, isDesktop: r, isLargeDesktop: i } = q(), { beatStore: h, endpoint: d, sessionToken: c } = We(), l = r || i, p = l || t ? 1 : 2, m = () => null, _ = (L) => {
1121
+ const { onEvent: n } = P(), { isMobile: t, isDesktop: r, isLargeDesktop: i } = q(), { beatStore: h, endpoint: d, sessionToken: c } = We(), l = r || i, p = l || t ? 1 : 2, m = () => null, _ = (L) => {
1122
1122
  s?.(L), n(v.TRENDS_CLICK_INSIGHT, G);
1123
1123
  }, f = l ? 200 : 170, g = l ? 170 : 124, C = l ? 56 : 0, x = o.length > 0 ? f + C : g, S = l && o.length > 0 ? f : void 0;
1124
1124
  return /* @__PURE__ */ e(eo, { sx: { height: x }, children: /* @__PURE__ */ e(
@@ -1143,9 +1143,9 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1143
1143
  }
1144
1144
  ) });
1145
1145
  }, Mo = R(Eo), Ao = R(({ chartLabel: o, chartColor: s }) => {
1146
- const { onEvent: n } = F(), {
1146
+ const { onEvent: n } = P(), {
1147
1147
  categoryDetailsChartData: { monthlyAmounts: t, tooltipLabels: r }
1148
- } = ye();
1148
+ } = Ce();
1149
1149
  return /* @__PURE__ */ e(w, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
1150
1150
  Oe,
1151
1151
  {
@@ -1176,21 +1176,21 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1176
1176
  }
1177
1177
  ) });
1178
1178
  }), Ro = R(({ onClose: o }) => {
1179
- const s = it(), { is_mobile_webview: n } = qe(), { isDesktop: t, isSmallTablet: r, isTablet: i } = q(), { onEvent: h } = F(), { common: d, trends: c } = k(), { selectedCategoryData: l, selectedDateRangeMonthRange: p } = ye(), { sortedTransactions: m } = Ie(), [_, f] = u.useState(null);
1179
+ const s = it(), { is_mobile_webview: n } = qe(), { isDesktop: t, isSmallTablet: r, isTablet: i } = q(), { onEvent: h } = P(), { common: d, trends: c } = k(), { selectedCategoryData: l, selectedDateRangeMonthRange: p } = Ce(), { sortedTransactions: m } = De(), [_, f] = u.useState(null);
1180
1180
  if (!l)
1181
1181
  return null;
1182
1182
  const { guid: g, name: C, is_income: x, totalAmount: S } = l, L = x ? c.category_income : c.category_spending, b = oo(g, s), E = x ? c.income_label : c.spending_label, W = ` ${l.transactions.length === 1 ? c.transaction : c.transactions} (${l.transactions.length})`, M = u.useMemo(
1183
1183
  () => m.find((O) => O.guid === _),
1184
1184
  [_, m]
1185
- ), $ = m.length > 0 && !n && (t || i && !r), K = (O) => O.category_guid === g || O.top_level_category_guid === g, N = () => {
1185
+ ), $ = m.length > 0 && !n && (t || i && !r), K = (O) => O.category_guid === g || O.top_level_category_guid === g, H = () => {
1186
1186
  o?.(), h(v.TRENDS_CLICK_BACK, G);
1187
1187
  };
1188
1188
  return /* @__PURE__ */ y(
1189
- He,
1189
+ Ne,
1190
1190
  {
1191
1191
  ariaLabelClose: c.close_category_details,
1192
1192
  isOpen: !0,
1193
- onClose: N,
1193
+ onClose: H,
1194
1194
  shouldShowHeaderShadow: !0,
1195
1195
  title: L,
1196
1196
  children: [
@@ -1199,7 +1199,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1199
1199
  /* @__PURE__ */ e(
1200
1200
  et,
1201
1201
  {
1202
- leftIcon: /* @__PURE__ */ e(De, { categoryGuid: g }),
1202
+ leftIcon: /* @__PURE__ */ e(ve, { categoryGuid: g }),
1203
1203
  rightContent: ae(Math.abs(S), "0,0.00"),
1204
1204
  subtitle: p,
1205
1205
  title: C
@@ -1222,7 +1222,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1222
1222
  )
1223
1223
  ] }),
1224
1224
  /* @__PURE__ */ e(
1225
- He,
1225
+ Ne,
1226
1226
  {
1227
1227
  ariaLabelClose: d.close_aria,
1228
1228
  isOpen: !!M,
@@ -1237,7 +1237,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1237
1237
  }), ko = (o, s) => {
1238
1238
  const n = ot(o, s), t = tt(o, s);
1239
1239
  return [n, t].filter((r) => r.length > 0);
1240
- }, No = (o, s) => {
1240
+ }, Ho = (o, s) => {
1241
1241
  const [n, t] = o, r = n, i = t ?? n, h = [];
1242
1242
  if (r) {
1243
1243
  const d = r.reduce((c, l) => c + l.y, 0);
@@ -1248,13 +1248,13 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1248
1248
  h.push({ label: s.spending_label, amount: d });
1249
1249
  }
1250
1250
  return h;
1251
- }, Ho = ({
1251
+ }, No = ({
1252
1252
  availableHeight: o = 0,
1253
1253
  minHeight: s = 500,
1254
1254
  selectedDateRange: n,
1255
1255
  totals: t
1256
1256
  }) => {
1257
- const r = de(), { onEvent: i } = F(), { trends: h } = k(), { isSmallMobile: d, isMobile: c, isSmallTablet: l, isTablet: p } = q(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = ko(t, n), f = No(_, h), [g, C] = u.useState(0), x = 458, S = 195, L = 56, b = c || d ? S : l || p ? x : g;
1257
+ const r = de(), { onEvent: i } = P(), { trends: h } = k(), { isSmallMobile: d, isMobile: c, isSmallTablet: l, isTablet: p } = q(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = ko(t, n), f = Ho(_, h), [g, C] = u.useState(0), x = 458, S = 195, L = 56, b = c || d ? S : l || p ? x : g;
1258
1258
  return u.useEffect(() => {
1259
1259
  const W = Math.max(o - L, s);
1260
1260
  C(W);
@@ -1281,7 +1281,7 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1281
1281
  valueFormatterString: "0.0a"
1282
1282
  }
1283
1283
  );
1284
- }, Wo = R(Ho), Oo = [
1284
+ }, Wo = R(No), Oo = [
1285
1285
  "BillAmountNotStandard",
1286
1286
  "CategorySpendingV2",
1287
1287
  "CostOfLivingToIncome",
@@ -1316,24 +1316,24 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1316
1316
  "WeeklyNoSpendDays",
1317
1317
  "WeeklySmallPurchasesSummary"
1318
1318
  ], Go = ({ onBackClick: o, onInsightCardClick: s, sx: n }) => {
1319
- const { onEvent: t } = F(), { config: r } = qe(), { isLargeDesktop: i, isDesktop: h, isMobile: d } = q(), { isAccountDataLoaded: c, loadAccountData: l, visibleAccounts: p } = Le(), {
1319
+ const { onEvent: t } = P(), { config: r } = qe(), { isLargeDesktop: i, isDesktop: h, isMobile: d } = q(), { isAccountDataLoaded: c, loadAccountData: l, visibleAccounts: p } = Ie(), {
1320
1320
  categoriesLoaded: m,
1321
1321
  loadCategories: _,
1322
1322
  loadDateRangeCategoryTotals: f,
1323
1323
  loadMonthlyCategoryTotals: g,
1324
1324
  monthlyCategoryTotals: C
1325
- } = J(), { isTransactionDataLoaded: x, loadTransactionData: S, setFilter: L } = Ie(), { selectedDateRange: b, setSelectedCategoryData: E, setSelectedDateRange: W } = ye(), { isInitialized: M, selectedAccounts: $, selectedAccountGuids: K } = Ce(), { trends: N, connect: O } = k(), { beatStore: ee } = We(), te = so() && r.show_insights_widget_in_master, Y = h || i, [ie, _e] = u.useState(!1), [ne, j] = u.useState(!1), [U, se] = u.useState("Chart"), [re, X] = u.useState(""), [ue, ce] = u.useState(!1), [le, he] = u.useState(window.innerHeight), D = Y ? 56 : 0, B = le - 208, a = le - (te ? 550 + D : 266), [T, I] = u.useState(!1), Z = r.show_connections_widget_in_master ? "buttons" : "no-buttons", Te = u.useMemo(
1325
+ } = J(), { isTransactionDataLoaded: x, loadTransactionData: S, setFilter: L } = De(), { selectedDateRange: b, setSelectedCategoryData: E, setSelectedDateRange: W } = Ce(), { isInitialized: M, selectedAccounts: $, selectedAccountGuids: K } = fe(), { trends: H, connect: O } = k(), { beatStore: ee } = We(), te = so() && r.show_insights_widget_in_master, Y = h || i, [ie, ye] = u.useState(!1), [ne, j] = u.useState(!1), [U, se] = u.useState("Chart"), [re, X] = u.useState(""), [ue, ce] = u.useState(!1), [le, he] = u.useState(window.innerHeight), D = Y ? 56 : 0, B = le - 208, a = le - (te ? 550 + D : 266), [T, I] = u.useState(!1), Z = r.show_connections_widget_in_master ? "buttons" : "no-buttons", _e = u.useMemo(
1326
1326
  () => p && p.length === 0 || C.length === 0,
1327
1327
  [p, C]
1328
1328
  );
1329
- Ee({
1329
+ Le({
1330
1330
  widgetName: "TrendsWidget",
1331
1331
  isLoaded: ie
1332
1332
  });
1333
- const be = u.useMemo(() => ne ? ee.getFilteredBeats({ templates: Oo }) : [], [ne]);
1333
+ const Te = u.useMemo(() => ne ? ee.getFilteredBeats({ templates: Oo }) : [], [ne]);
1334
1334
  u.useEffect(() => {
1335
- const H = () => he(window.innerHeight);
1336
- return window.addEventListener("resize", H), c || l().finally(), m || _().finally(), x || S().finally(), () => window.removeEventListener("resize", H);
1335
+ const N = () => he(window.innerHeight);
1336
+ return window.addEventListener("resize", N), c || l().finally(), m || _().finally(), x || S().finally(), () => window.removeEventListener("resize", N);
1337
1337
  }, []), u.useEffect(() => {
1338
1338
  M && (ee.loadBeats().finally(() => j(!0)), f($, b.start, b.end).then(() => {
1339
1339
  g(
@@ -1342,53 +1342,53 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1342
1342
  b.end
1343
1343
  );
1344
1344
  }).finally(() => {
1345
- _e(!0), t(v.TRENDS_LOAD_WIDGET, {
1345
+ ye(!0), t(v.TRENDS_LOAD_WIDGET, {
1346
1346
  ...G,
1347
- time_period: `${xe(b.end, b.start)}M`
1347
+ time_period: `${we(b.end, b.start)}M`
1348
1348
  });
1349
1349
  }));
1350
1350
  }, [M, $, b]), u.useEffect(() => {
1351
1351
  if (C.length !== 0) {
1352
- const H = {
1352
+ const N = {
1353
1353
  accounts: K,
1354
1354
  dateRange: { start: b.start, end: b.end }
1355
1355
  };
1356
1356
  L({
1357
- ...H,
1357
+ ...N,
1358
1358
  custom: (oe) => !!C.find(
1359
1359
  (me) => me.top_level_category_guid === oe.top_level_category_guid || me.category_guid === oe.category_guid
1360
1360
  )
1361
1361
  });
1362
1362
  }
1363
1363
  }, [C]);
1364
- const ge = (H) => {
1365
- E(H), ce(!0);
1364
+ const ge = (N) => {
1365
+ E(N), ce(!0);
1366
1366
  }, Me = () => {
1367
1367
  E(null), ce(!1);
1368
1368
  }, Ae = () => {
1369
1369
  I(!0), t(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
1370
- }, ht = (H, oe) => {
1370
+ }, ht = (N, oe) => {
1371
1371
  se(oe ?? U), t(v.TRENDS_CLICK_TOGGLE_VIEW, {
1372
1372
  ...G,
1373
1373
  toggleView: oe
1374
1374
  });
1375
- }, gt = (H) => {
1376
- const oe = Ue(H?.[0], 1), me = H?.[1], Ct = xe(me, oe);
1375
+ }, gt = (N) => {
1376
+ const oe = Ue(N?.[0], 1), me = N?.[1], Ct = we(me, oe);
1377
1377
  W({ start: oe, end: me }), t(v.TRENDS_CLICK_TIME_WINDOW, {
1378
1378
  ...G,
1379
1379
  time_period: Ct + "M"
1380
1380
  });
1381
- }, mt = (H) => {
1381
+ }, mt = (N) => {
1382
1382
  t(v.TRENDS_CLICK_FILTER, {
1383
1383
  ...G,
1384
- filterValue: H
1384
+ filterValue: N
1385
1385
  });
1386
- }, pt = (H) => {
1387
- X(H);
1386
+ }, pt = (N) => {
1387
+ X(N);
1388
1388
  }, ft = () => {
1389
1389
  X(""), t(v.TRENDS_CLICK_ALL_CATEGORIES, G);
1390
1390
  };
1391
- return !M || !ie ? /* @__PURE__ */ e(fe, {}) : /* @__PURE__ */ y(
1391
+ return !M || !ie ? /* @__PURE__ */ e(Ee, {}) : /* @__PURE__ */ y(
1392
1392
  st,
1393
1393
  {
1394
1394
  calendarActions: { onRangeChanged: gt },
@@ -1397,21 +1397,21 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1397
1397
  onAccountsFilterClick: mt,
1398
1398
  onBackClick: o,
1399
1399
  sx: n,
1400
- title: N.title,
1400
+ title: H.title,
1401
1401
  children: [
1402
- Te && /* @__PURE__ */ e(
1402
+ _e && /* @__PURE__ */ e(
1403
1403
  ro,
1404
1404
  {
1405
- header: N.zero_state_content_header,
1405
+ header: H.zero_state_content_header,
1406
1406
  icon: "",
1407
1407
  onClick: Ae,
1408
- primaryButton: N.empty_state_primary,
1409
- subText: N.empty_state_sub_text,
1408
+ primaryButton: H.empty_state_primary,
1409
+ subText: H.empty_state_sub_text,
1410
1410
  sx: { height: B },
1411
1411
  variant: Z
1412
1412
  }
1413
1413
  ),
1414
- !Te && /* @__PURE__ */ y(
1414
+ !_e && /* @__PURE__ */ y(
1415
1415
  w,
1416
1416
  {
1417
1417
  sx: {
@@ -1436,9 +1436,9 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1436
1436
  ]
1437
1437
  }
1438
1438
  ),
1439
- /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(A, { flexGrow: 1, children: re && /* @__PURE__ */ y(we, { onClick: ft, sx: { p: 0, pr: 5 }, children: [
1440
- /* @__PURE__ */ e(Se, { name: "arrow_back" }),
1441
- N.all_categories
1439
+ /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(A, { flexGrow: 1, children: re && /* @__PURE__ */ y(Se, { onClick: ft, sx: { p: 0, pr: 5 }, children: [
1440
+ /* @__PURE__ */ e(be, { name: "arrow_back" }),
1441
+ H.all_categories
1442
1442
  ] }) }) }),
1443
1443
  /* @__PURE__ */ y(w, { flexDirection: Y ? "row" : "column", gap: Y ? 48 : 16, children: [
1444
1444
  U === "Chart" && /* @__PURE__ */ y(yt, { children: [
@@ -1452,10 +1452,10 @@ const ct = ({ categoryGuid: o, topLevelCategoryGuid: s }) => {
1452
1452
  }
1453
1453
  ) }),
1454
1454
  /* @__PURE__ */ y(w, { gap: 16, sx: { width: Y ? "32%" : "100%" }, children: [
1455
- te && ne && be.length > 0 && /* @__PURE__ */ e(
1455
+ te && ne && Te.length > 0 && /* @__PURE__ */ e(
1456
1456
  Mo,
1457
1457
  {
1458
- beats: be,
1458
+ beats: Te,
1459
1459
  onInsightCardClick: s
1460
1460
  }
1461
1461
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.7.0-alpha.bb8",
3
+ "version": "7.7.0-alpha.bb9",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",