@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega1

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.
Files changed (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-KpPw1phO.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,55 +1,57 @@
1
- import { jsx as t, jsxs as r, Fragment as v } from "react/jsx-runtime";
2
- import { fromUnixTime as bt } from "date-fns/fromUnixTime";
3
- import { observer as w } from "mobx-react-lite";
4
- import { useTheme as A } from "@mui/material/styles";
5
- import { L as _t } from "../LineChart-C1PxNf7P.mjs";
6
- import { u as Z } from "../useScreenSize-B5afALev.mjs";
7
- import { q as wt, u as T, d as J, g as Q, b as P, r as tt, n as St } from "../hooks-C41HAxM5.mjs";
8
- import { f as Wt, a as vt } from "../Dialog-CDV0kKxj.mjs";
1
+ import { jsx as e, jsxs as r, Fragment as v } from "react/jsx-runtime";
2
+ import { fromUnixTime as we } from "date-fns/fromUnixTime";
3
+ import { observer as _ } from "mobx-react-lite";
4
+ import { useTheme as z } from "@mui/material/styles";
5
+ import { L as _e } from "../LineChart-KpPw1phO.mjs";
6
+ import { u as J } from "../useScreenSize-B6JyS_Lj.mjs";
7
+ import { p as be, u as I, d as Q, g as P, b as ee, q as te } from "../hooks-ZMp65DFz.mjs";
8
+ import { f as We, a as ve } from "../Dialog-BPTr3qHE.mjs";
9
9
  import W from "@mui/material/Divider";
10
- import z from "@mui/material/List";
10
+ import B from "@mui/material/List";
11
11
  import k from "@mui/material/ListSubheader";
12
12
  import h from "@mui/material/Stack";
13
- import { Text as d, Icon as H, H1 as It, P as Tt } from "@mxenabled/mxui";
14
- import m from "react";
13
+ import { Text as m, Icon as H, H1 as Te, P as Ie } from "@mxenabled/mxui";
14
+ import d from "react";
15
15
  import D from "@mui/material/ListItem";
16
- import et from "@mui/material/ListItemButton";
17
- import _ from "@mui/material/ListItemText";
18
- import { i as nt } from "../DateUtil-CDPZw_-m.mjs";
16
+ import ne from "@mui/material/ListItemButton";
17
+ import w from "@mui/material/ListItemText";
18
+ import { i as oe } from "../DateUtil-CBdcsyuk.mjs";
19
19
  import { C as y } from "../CurrencyText-Dr0EZ7bp.mjs";
20
- import { Button as Lt, Stack as Nt } from "@mui/material";
21
- import { format as Et, fromUnixTime as kt, differenceInMonths as Dt } from "date-fns";
22
- import { g as U } from "../NetWorthStore-Bti6u-d9.mjs";
23
- import { N as ze } from "../NetWorthStore-Bti6u-d9.mjs";
24
- import { Icon as ot } from "@mxenabled/mx-icons";
20
+ import { Button as Le, Stack as Ne } from "@mui/material";
21
+ import { format as Ee, fromUnixTime as ke, differenceInMonths as De } from "date-fns";
22
+ import { g as U } from "../NetWorthStore-rC0q7P7t.mjs";
23
+ import { N as Rt } from "../NetWorthStore-rC0q7P7t.mjs";
24
+ import { Icon as re } from "@mxenabled/mx-icons";
25
25
  import { f as V } from "../NumberFormatting-DjTD0t3W.mjs";
26
- import { L as R } from "../Loader-Ckqi9Rx6.mjs";
27
- import { M as At } from "../MicroWidgetContainer-BGpNl5ZS.mjs";
28
- import { A as S, W as Mt } from "../WidgetContainer-CDh9fjpR.mjs";
29
- import rt from "@mui/material/Box";
30
- import { C as Ot } from "../ConnectionsDrawer-Dsc04-4Z.mjs";
31
- import Ht from "@mui/material/Collapse";
32
- import X from "@mui/material/ListItemIcon";
33
- import { D as Y } from "../Drawer-BF40nbsH.mjs";
34
- import { E as zt } from "../EmptyState-DoxNUae-.mjs";
35
- const Rt = ({
36
- chartData: e,
37
- hoveredData: l,
26
+ import { u as ie } from "../useWidgetLoadTimer-hIOioiKx.mjs";
27
+ import { A as b, W as Me } from "../WidgetContainer-CoFDmQRE.mjs";
28
+ import { L as O } from "../Loader-DUaFpDGv.mjs";
29
+ import { M as Ae } from "../MicroWidgetContainer-r6mtxRer.mjs";
30
+ import ae from "@mui/material/Box";
31
+ import { C as He } from "../ConnectionsDrawer-VmuVFHbL.mjs";
32
+ import Be from "@mui/material/Collapse";
33
+ import Y from "@mui/material/ListItemIcon";
34
+ import se from "@mui/material/styles/useTheme";
35
+ import { E as Oe } from "../EmptyState-DoxNUae-.mjs";
36
+ import { D as q } from "../Drawer-By9V-B5L.mjs";
37
+ const ze = ({
38
+ chartData: t,
39
+ hoveredData: s,
38
40
  onDataClick: i,
39
41
  onMouseEnter: n,
40
- onMouseLeave: a,
42
+ onMouseLeave: c,
41
43
  selectedData: o
42
44
  }) => {
43
- const { isMobile: s } = Z(), { availableWidth: c } = wt(), u = A(), C = c - 320, x = e.map((f) => ({
44
- x: Wt(bt(f.x), vt.MONTH_SHORT),
45
+ const { isMobile: a } = J(), { availableWidth: l } = be(), u = z(), C = l - 320, x = t.map((f) => ({
46
+ x: We(we(f.x), ve.MONTH_SHORT),
45
47
  y: f.y
46
- })), g = o ? { index: e.findIndex((f) => f.x === o.x) } : void 0, b = l ? { index: e.findIndex((f) => f.x === l.x) } : void 0, p = (f) => ({
48
+ })), g = o ? { index: t.findIndex((f) => f.x === o.x) } : void 0, S = s ? { index: t.findIndex((f) => f.x === s.x) } : void 0, p = (f) => ({
47
49
  fill: f === g?.index ? u.palette.success.main : "",
48
- filter: f === b?.index ? `drop-shadow(0px 0px 10px ${u.palette.success.main})` : "none",
50
+ filter: f === S?.index ? `drop-shadow(0px 0px 10px ${u.palette.success.main})` : "none",
49
51
  stroke: u.palette.success.main
50
52
  });
51
- return /* @__PURE__ */ t(
52
- _t,
53
+ return /* @__PURE__ */ e(
54
+ _e,
53
55
  {
54
56
  baseline: "min",
55
57
  chartFor: "networthChart",
@@ -59,51 +61,51 @@ const Rt = ({
59
61
  datasets: [x],
60
62
  height: 350,
61
63
  labels: [],
62
- margin: { right: 20, left: 100 },
63
- markHandlers: { onMarkClick: i, onMouseEnter: n, onMouseLeave: a },
64
+ margin: { right: 20, left: 40 },
65
+ markHandlers: { onMarkClick: i, onMouseEnter: n, onMouseLeave: c },
64
66
  markStyles: p,
65
67
  showArea: !0,
66
68
  useCustomMark: !0,
67
69
  valueFormatterString: "0.0[0]a",
68
- width: s ? 320 : C
70
+ width: a ? 320 : C
69
71
  }
70
72
  );
71
- }, jt = w(Rt), Gt = ({
72
- item: e,
73
- getStyles: l,
73
+ }, Re = _(ze), je = ({
74
+ item: t,
75
+ getStyles: s,
74
76
  isHovered: i = !1,
75
77
  isSelected: n = !1,
76
- onItemClick: a,
78
+ onItemClick: c,
77
79
  onMouseEnter: o,
78
- onMouseLeave: s
80
+ onMouseLeave: a
79
81
  }) => {
80
- const [c, u] = m.useState({
82
+ const [l, u] = d.useState({
81
83
  color: ""
82
84
  });
83
- return m.useEffect(() => {
84
- u(l(e));
85
- }, [i, n]), /* @__PURE__ */ r(m.Fragment, { children: [
86
- /* @__PURE__ */ t(
85
+ return d.useEffect(() => {
86
+ u(s(t));
87
+ }, [i, n]), /* @__PURE__ */ r(d.Fragment, { children: [
88
+ /* @__PURE__ */ e(
87
89
  D,
88
90
  {
89
91
  sx: {
90
- ...c,
92
+ ...l,
91
93
  minHeight: 44,
92
- "&:hover": { color: n ? "inherit" : c.color }
94
+ "&:hover": { color: n ? "inherit" : l.color }
93
95
  },
94
- children: /* @__PURE__ */ t(
95
- et,
96
+ children: /* @__PURE__ */ e(
97
+ ne,
96
98
  {
97
- onClick: (C) => a?.(C, e.x),
98
- onMouseEnter: () => o(e.x),
99
- onMouseLeave: () => s(),
99
+ onClick: (C) => c?.(C, t.x),
100
+ onMouseEnter: () => o(t.x),
101
+ onMouseLeave: () => a(),
100
102
  sx: { minHeight: 20, padding: 12 },
101
- children: /* @__PURE__ */ t(
102
- _,
103
+ children: /* @__PURE__ */ e(
104
+ w,
103
105
  {
104
106
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
105
- /* @__PURE__ */ t(d, { variant: "body1", children: nt(e.x) }),
106
- /* @__PURE__ */ t(y, { amount: e.y, sx: { color: "inherit" }, variant: "body1" })
107
+ /* @__PURE__ */ e(m, { variant: "Body", children: oe(t.x) }),
108
+ /* @__PURE__ */ e(y, { amount: t.y, sx: { color: "inherit" }, variant: "Body" })
107
109
  ] })
108
110
  }
109
111
  )
@@ -111,188 +113,191 @@ const Rt = ({
111
113
  )
112
114
  }
113
115
  ),
114
- /* @__PURE__ */ t(W, {})
115
- ] }, e.x);
116
- }, $t = w(Gt), Bt = ({
117
- chartData: e,
118
- hoveredData: l,
116
+ /* @__PURE__ */ e(W, {})
117
+ ] }, t.x);
118
+ }, $e = _(je), Ge = ({
119
+ chartData: t,
120
+ hoveredData: s,
119
121
  onDataClick: i,
120
122
  onButtonClick: n,
121
- onMouseEnter: a,
123
+ onMouseEnter: c,
122
124
  onMouseLeave: o,
123
- selectedData: s
125
+ selectedData: a
124
126
  }) => {
125
- const { net_worth: c } = T(), u = A(), C = (x) => {
126
- const g = x.x === l?.x, b = x.x === s?.x, p = {
127
+ const { net_worth: l } = I(), u = z(), C = (x) => {
128
+ const g = x.x === s?.x, S = x.x === a?.x, p = {
127
129
  backgroundColor: "inherit",
128
130
  borderBottom: "inherit",
129
131
  color: "inherit"
130
132
  };
131
- return g && (p.color = b ? "inherit" : p.color, p.backgroundColor = u.palette.action.hover), b && (p.backgroundColor = u.palette.primary.main, p.borderBottom = u.palette.neutral.light, p.color = u.palette.common.white), p;
133
+ return g && (p.color = S ? "inherit" : p.color, p.backgroundColor = u.palette.action.hover), S && (p.backgroundColor = u.palette.primary.main, p.borderBottom = u.palette.border.light, p.color = u.palette.common.white), p;
132
134
  };
133
135
  return /* @__PURE__ */ r(h, { direction: "column", sx: { width: 320 }, children: [
134
- /* @__PURE__ */ r(z, { children: [
135
- /* @__PURE__ */ t(k, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ t(d, { bold: !0, component: "h2", variant: "body1", children: c.monthly_totals }) }),
136
- /* @__PURE__ */ t(W, {}),
137
- e.map((x, g) => /* @__PURE__ */ t(
138
- $t,
136
+ /* @__PURE__ */ r(B, { children: [
137
+ /* @__PURE__ */ e(k, { sx: { backgroundColor: "transparent", mb: 8, mt: 12, px: 12 }, children: /* @__PURE__ */ e(m, { bold: !0, component: "h2", variant: "Body", children: l.monthly_totals }) }),
138
+ /* @__PURE__ */ e(W, {}),
139
+ t.map((x, g) => /* @__PURE__ */ e(
140
+ $e,
139
141
  {
140
142
  getStyles: C,
141
- isHovered: x.x === l?.x,
142
- isSelected: x.x === s?.x,
143
+ isHovered: x.x === s?.x,
144
+ isSelected: x.x === a?.x,
143
145
  item: x,
144
- onItemClick: (b) => i(b, g),
145
- onMouseEnter: () => a(g),
146
+ onItemClick: (S) => i(S, g),
147
+ onMouseEnter: () => c(g),
146
148
  onMouseLeave: () => o()
147
149
  },
148
150
  x.x
149
151
  ))
150
152
  ] }),
151
- /* @__PURE__ */ t(
152
- Lt,
153
+ /* @__PURE__ */ e(
154
+ Le,
153
155
  {
154
156
  onClick: () => n(),
155
157
  sx: { alignSelf: "center", marginTop: 16, width: "fit-content" },
156
158
  variant: "outlined",
157
- children: c.view_assets_and_liabilities
159
+ children: l.view_assets_and_liabilities
158
160
  }
159
161
  )
160
162
  ] });
161
- }, Ft = w(Bt), Kt = ({
162
- currencyLabel: e,
163
- currencyVariant: l = "body2",
163
+ }, Xe = _(Ge), Fe = ({
164
+ currencyLabel: t,
165
+ currencyVariant: s = "Small",
164
166
  iconSize: i,
165
167
  netWorth: n,
166
- theme: a
168
+ theme: c
167
169
  }) => {
168
- let o = a.palette.secondary.main, s = a.palette.secondary.main, c = "trending_flat";
169
- return n.change < 0 ? c = "trending_down" : n.change > 0 && (o = a.palette.success.main, s = a.palette.success.main, c = "trending_up"), /* @__PURE__ */ r(Nt, { alignItems: "center", direction: "row", spacing: 4, children: [
170
- /* @__PURE__ */ t(
170
+ let o = c.palette.secondary.main, a = c.palette.secondary.main, l = "trending_flat";
171
+ return n.change < 0 ? l = "trending_down" : n.change > 0 && (o = c.palette.success.main, a = c.palette.success.main, l = "trending_up"), /* @__PURE__ */ r(Ne, { alignItems: "center", direction: "row", spacing: 4, children: [
172
+ /* @__PURE__ */ e(
171
173
  H,
172
174
  {
173
- name: c,
175
+ name: l,
174
176
  size: i,
175
177
  sx: {
176
178
  color: o
177
179
  }
178
180
  }
179
181
  ),
180
- /* @__PURE__ */ t(y, { amount: n.change, color: s, variant: l }),
181
- /* @__PURE__ */ t(d, { variant: "body2", children: e })
182
+ /* @__PURE__ */ e(y, { amount: n.change, color: a, variant: s }),
183
+ /* @__PURE__ */ e(m, { variant: "Small", children: t })
182
184
  ] });
183
- }, j = w(Kt), Ut = ({ hoveredData: e, selectedData: l }) => {
184
- const { net_worth: i } = T(), n = A(), a = e || l, o = Et(kt(a.x), "MMMM");
185
+ }, R = _(Fe), Ke = ({ hoveredData: t, selectedData: s }) => {
186
+ const { net_worth: i } = I(), n = z(), c = t || s, o = Ee(ke(c.x), "MMMM");
185
187
  return /* @__PURE__ */ r(h, { alignItems: "center", direction: "column", m: 24, children: [
186
- /* @__PURE__ */ t(d, { color: n.palette.secondary.main, variant: "body2", children: `${o} ${i.net_worth}` }),
187
- /* @__PURE__ */ t(y, { amount: a.y, variant: "h2" }),
188
- /* @__PURE__ */ t(j, { currencyLabel: i.this_month, netWorth: a, theme: n })
188
+ /* @__PURE__ */ e(m, { color: n.palette.secondary.main, variant: "Small", children: `${o} ${i.net_worth}` }),
189
+ /* @__PURE__ */ e(y, { amount: c.y, variant: "H2" }),
190
+ /* @__PURE__ */ e(R, { currencyLabel: i.this_month, netWorth: c, theme: n })
189
191
  ] });
190
- }, Vt = w(Ut), Xt = ({ amount: e, copy: l, trendValue: i }) => {
192
+ }, Ue = _(Ke), Ve = ({ amount: t, copy: s, trendValue: i }) => {
191
193
  const n = i > 0, o = i === 0 ? "trending_flat" : n ? "trending_up" : "trending_down";
192
194
  return /* @__PURE__ */ r(h, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
193
- /* @__PURE__ */ t(It, { children: V(e, "0,0") }),
194
- e !== 0 && /* @__PURE__ */ r(h, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
195
+ /* @__PURE__ */ e(Te, { children: V(t, "0,0") }),
196
+ t !== 0 && /* @__PURE__ */ r(h, { sx: { color: n ? "success.main" : "text.secondary" }, children: [
195
197
  /* @__PURE__ */ r(h, { sx: { flexDirection: "row", gap: 8 }, children: [
196
- /* @__PURE__ */ t(ot, { name: o, size: 20 }),
197
- /* @__PURE__ */ t(d, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: V(i, "0,0.00") })
198
+ /* @__PURE__ */ e(re, { name: o, size: 20 }),
199
+ /* @__PURE__ */ e(m, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: V(i, "0,0.00") })
198
200
  ] }),
199
- /* @__PURE__ */ t(d, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: l.this_month })
201
+ /* @__PURE__ */ e(m, { sx: { display: "block", textAlign: "right" }, variant: "caption", children: s.this_month })
200
202
  ] })
201
203
  ] });
202
- }, Yt = ({ copy: e }) => /* @__PURE__ */ r(h, { sx: { flexDirection: "row", gap: 12 }, children: [
203
- /* @__PURE__ */ t(ot, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
204
+ }, Ye = ({ copy: t }) => /* @__PURE__ */ r(h, { sx: { flexDirection: "row", gap: 12 }, children: [
205
+ /* @__PURE__ */ e(re, { name: "elevation", size: 32, sx: { color: "text.primary" } }),
204
206
  /* @__PURE__ */ r(h, { children: [
205
- /* @__PURE__ */ t(d, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: e.empty_widget_header }),
206
- /* @__PURE__ */ t(Tt, { sx: { color: "text.secondary" }, variant: "body2", children: e.zero_state_description })
207
+ /* @__PURE__ */ e(m, { sx: { display: "block", fontWeight: 600 }, variant: "body1", children: t.empty_widget_header }),
208
+ /* @__PURE__ */ e(Ie, { sx: { color: "text.secondary" }, variant: "body2", children: t.zero_state_description })
207
209
  ] })
208
- ] }), Ae = w(({ onCTAClick: e }) => {
209
- const [l, i] = m.useState(!1), { visibleAccounts: n } = J(), { onEvent: a } = Q(), { net_worth: o, common: s } = T(), { isInitialized: c, selectedAccounts: u, setSelectedAccounts: C } = P(), { loadChartData: x, loadNetWorthData: g, netWorthData: b, selectedData: p } = tt(), f = async () => {
210
+ ] }), Ht = _(({ onCTAClick: t }) => {
211
+ const [s, i] = d.useState(!1), { visibleAccounts: n } = Q(), { onEvent: c } = P(), { net_worth: o, common: a } = I(), { isInitialized: l, selectedAccounts: u, setSelectedAccounts: C } = ee(), { loadChartData: x, loadNetWorthData: g, netWorthData: S, selectedData: p } = te(), f = async () => {
210
212
  await g(u), await x(1), i(!0);
211
213
  };
212
- if (m.useEffect(() => C(n), [n]), m.useEffect(() => {
213
- c && f().finally(), a(S.NET_WORTH_LOAD_WIDGET, {
214
+ if (ie({
215
+ widgetName: "NetWorthMicroWidget",
216
+ isLoaded: s
217
+ }), d.useEffect(() => C(n), [n]), d.useEffect(() => {
218
+ l && f().finally(), c(b.NET_WORTH_LOAD_WIDGET, {
214
219
  state: n?.length ? "default" : "zeroState"
215
220
  });
216
- }, [c]), !l) return /* @__PURE__ */ t(R, { height: 100 });
221
+ }, [l]), !s) return /* @__PURE__ */ e(O, { height: 100 });
217
222
  const L = () => {
218
- a(
219
- n.length ? S.NET_WORTH_CLICK_VIEW_DETAILS : S.NET_WORTH_CLICK_GET_STARTED
220
- ), e();
223
+ c(
224
+ n.length ? b.NET_WORTH_CLICK_VIEW_DETAILS : b.NET_WORTH_CLICK_GET_STARTED
225
+ ), t();
221
226
  };
222
- return /* @__PURE__ */ t(
223
- At,
227
+ return /* @__PURE__ */ e(
228
+ Ae,
224
229
  {
225
230
  className: "mx-networth-microwidget",
226
- ctaLabel: s.see_details,
231
+ ctaLabel: a.see_details,
227
232
  onCTAClick: L,
228
233
  title: o.net_worth,
229
- children: b.accounts.length ? /* @__PURE__ */ t(
230
- Xt,
234
+ children: S.accounts.length ? /* @__PURE__ */ e(
235
+ Ve,
231
236
  {
232
237
  amount: p?.y,
233
238
  copy: o,
234
239
  trendValue: p?.change
235
240
  }
236
- ) : /* @__PURE__ */ t(Yt, { copy: o })
241
+ ) : /* @__PURE__ */ e(Ye, { copy: o })
237
242
  }
238
243
  );
239
- }), qt = ({ accounts: e, name: l, icon: i }) => {
240
- const [n, a] = m.useState(!1);
244
+ }), qe = ({ accounts: t, name: s, icon: i }) => {
245
+ const [n, c] = d.useState(!1);
241
246
  return /* @__PURE__ */ r(v, { children: [
242
- /* @__PURE__ */ t(D, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(et, { onClick: () => a(!n), children: [
243
- i && /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t(H, { name: i, size: 24, sx: { mr: 12 } }) }),
244
- /* @__PURE__ */ t(
245
- _,
247
+ /* @__PURE__ */ e(D, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ r(ne, { onClick: () => c(!n), children: [
248
+ i && /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(H, { name: i, size: 24, sx: { mr: 12 } }) }),
249
+ /* @__PURE__ */ e(
250
+ w,
246
251
  {
247
- primary: /* @__PURE__ */ t(d, { sx: { fontWeight: 700 }, variant: "body1", children: l })
252
+ primary: /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "Body", children: s })
248
253
  }
249
254
  ),
250
- /* @__PURE__ */ t(X, { children: n ? /* @__PURE__ */ t(H, { name: "expand_less", size: 24 }) : /* @__PURE__ */ t(H, { name: "expand_more", size: 24 }) })
255
+ /* @__PURE__ */ e(Y, { children: n ? /* @__PURE__ */ e(H, { name: "expand_less", size: 24 }) : /* @__PURE__ */ e(H, { name: "expand_more", size: 24 }) })
251
256
  ] }) }),
252
- /* @__PURE__ */ t(W, {}),
253
- /* @__PURE__ */ t(Ht, { in: n, timeout: "auto", unmountOnExit: !0, children: e.map((o, s) => /* @__PURE__ */ r(z, { children: [
254
- /* @__PURE__ */ t(D, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ t(
255
- _,
257
+ /* @__PURE__ */ e(W, {}),
258
+ /* @__PURE__ */ e(Be, { in: n, timeout: "auto", unmountOnExit: !0, children: t.map((o, a) => /* @__PURE__ */ r(B, { children: [
259
+ /* @__PURE__ */ e(D, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
260
+ w,
256
261
  {
257
262
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
258
- /* @__PURE__ */ t(
259
- d,
263
+ /* @__PURE__ */ e(
264
+ m,
260
265
  {
261
266
  sx: {
262
267
  marginRight: 10
263
268
  },
264
- variant: "body1",
269
+ variant: "Body",
265
270
  children: o.accountName
266
271
  }
267
272
  ),
268
- /* @__PURE__ */ t(
273
+ /* @__PURE__ */ e(
269
274
  y,
270
275
  {
271
276
  amount: o.balance,
272
277
  sx: {
273
278
  flexShrink: 0
274
279
  },
275
- variant: "body2"
280
+ variant: "Small"
276
281
  }
277
282
  )
278
283
  ] }),
279
284
  sx: { pl: 72, pr: 16 }
280
285
  }
281
286
  ) }),
282
- s < e.length - 1 ? /* @__PURE__ */ t(W, { variant: "inset" }) : /* @__PURE__ */ t(W, {})
287
+ a < t.length - 1 ? /* @__PURE__ */ e(W, { variant: "inset" }) : /* @__PURE__ */ e(W, {})
283
288
  ] }, o.accountName)) })
284
289
  ] });
285
- }, q = ({ groupedAccounts: e }) => /* @__PURE__ */ t(v, { children: e.map(({ accounts: l, icon: i, name: n }) => /* @__PURE__ */ t(qt, { accounts: l, icon: i, name: n }, n)) }), Zt = ({
286
- netWorth: e,
287
- assets: l,
290
+ }, Z = ({ groupedAccounts: t }) => /* @__PURE__ */ e(v, { children: t.map(({ accounts: s, icon: i, name: n }) => /* @__PURE__ */ e(qe, { accounts: s, icon: i, name: n }, n)) }), Ze = ({
291
+ netWorth: t,
292
+ assets: s,
288
293
  liabilities: i,
289
294
  totalAssets: n,
290
- totalLiabilities: a
295
+ totalLiabilities: c
291
296
  }) => {
292
- const { net_worth: o } = T(), s = A();
297
+ const { net_worth: o } = I(), a = se();
293
298
  return /* @__PURE__ */ r(v, { children: [
294
299
  /* @__PURE__ */ r(
295
- rt,
300
+ ae,
296
301
  {
297
302
  sx: {
298
303
  alignItems: "center",
@@ -303,128 +308,121 @@ const Rt = ({
303
308
  marginBottom: 8
304
309
  },
305
310
  children: [
306
- /* @__PURE__ */ t(d, { variant: "body1", children: o.current_net_worth }),
307
- /* @__PURE__ */ t(y, { amount: e?.y ?? 0, variant: "h1" }),
308
- e && /* @__PURE__ */ t(
309
- j,
311
+ /* @__PURE__ */ e(m, { variant: "Body", children: o.current_net_worth }),
312
+ /* @__PURE__ */ e(y, { amount: t?.y ?? 0, variant: "H1" }),
313
+ t && /* @__PURE__ */ e(
314
+ R,
310
315
  {
311
316
  currencyLabel: o.this_month,
312
317
  iconSize: 20,
313
- netWorth: e,
314
- theme: s
318
+ netWorth: t,
319
+ theme: a
315
320
  }
316
321
  )
317
322
  ]
318
323
  }
319
324
  ),
320
- /* @__PURE__ */ r(z, { children: [
321
- /* @__PURE__ */ t(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
322
- _,
325
+ /* @__PURE__ */ r(B, { children: [
326
+ /* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
327
+ w,
323
328
  {
324
329
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
325
- /* @__PURE__ */ t(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.assets }),
326
- /* @__PURE__ */ t(y, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
330
+ /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.assets }),
331
+ /* @__PURE__ */ e(y, { amount: n, sx: { fontWeight: 400 }, variant: "XSmall" })
327
332
  ] })
328
333
  }
329
334
  ) }),
330
- /* @__PURE__ */ t(q, { groupedAccounts: U(l) }),
331
- /* @__PURE__ */ t(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
332
- _,
335
+ /* @__PURE__ */ e(Z, { groupedAccounts: U(s) }),
336
+ /* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
337
+ w,
333
338
  {
334
339
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
335
- /* @__PURE__ */ t(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.liabilities }),
336
- /* @__PURE__ */ t(
337
- y,
338
- {
339
- amount: a,
340
- sx: { fontWeight: 400 },
341
- variant: "caption"
342
- }
343
- )
340
+ /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.liabilities }),
341
+ /* @__PURE__ */ e(y, { amount: c, sx: { fontWeight: 400 }, variant: "XSmall" })
344
342
  ] })
345
343
  }
346
344
  ) }),
347
- /* @__PURE__ */ t(q, { groupedAccounts: U(i) })
345
+ /* @__PURE__ */ e(Z, { groupedAccounts: U(i) })
348
346
  ] })
349
347
  ] });
350
- }, Jt = w(Zt), Qt = ({
351
- netWorth: e,
352
- gains: l,
348
+ }, Je = _(Ze), Qe = ({
349
+ netWorth: t,
350
+ gains: s,
353
351
  losses: i,
354
352
  totalGains: n,
355
- totalLosses: a
353
+ totalLosses: c
356
354
  }) => {
357
- const { net_worth: o } = T(), s = A();
355
+ const { net_worth: o } = I(), a = se();
358
356
  return /* @__PURE__ */ r(v, { children: [
359
357
  /* @__PURE__ */ r(h, { alignItems: "center", justifyContent: "space-between", mb: 8, pt: 24, children: [
360
- /* @__PURE__ */ t(d, { variant: "body2", children: nt(e?.x) }),
361
- /* @__PURE__ */ t(d, { variant: "body1", children: o.total_change }),
362
- e && /* @__PURE__ */ t(j, { currencyVariant: "h1", iconSize: 32, netWorth: e, theme: s })
358
+ /* @__PURE__ */ e(m, { variant: "Small", children: oe(t?.x) }),
359
+ /* @__PURE__ */ e(m, { variant: "Body", children: o.total_change }),
360
+ t && /* @__PURE__ */ e(R, { currencyVariant: "H1", iconSize: 32, netWorth: t, theme: a })
363
361
  ] }),
364
- /* @__PURE__ */ r(z, { children: [
365
- /* @__PURE__ */ t(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
366
- _,
362
+ /* @__PURE__ */ r(B, { children: [
363
+ /* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
364
+ w,
367
365
  {
368
366
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
369
- /* @__PURE__ */ t(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.gains }),
370
- /* @__PURE__ */ t(y, { amount: n, sx: { fontWeight: 400 }, variant: "caption" })
367
+ /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.gains }),
368
+ /* @__PURE__ */ e(y, { amount: n, sx: { fontWeight: 400 }, variant: "XSmall" })
371
369
  ] })
372
370
  }
373
371
  ) }),
374
- l?.map((c) => /* @__PURE__ */ r(m.Fragment, { children: [
375
- /* @__PURE__ */ t(D, { sx: { backgroundColor: s.palette.background.paper, py: 14 }, children: /* @__PURE__ */ t(
376
- _,
372
+ s?.map((l) => /* @__PURE__ */ r(d.Fragment, { children: [
373
+ /* @__PURE__ */ e(D, { sx: { backgroundColor: a.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
374
+ w,
377
375
  {
378
376
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
379
- /* @__PURE__ */ t(d, { sx: { mr: 10 }, variant: "body1", children: c.accountName }),
380
- /* @__PURE__ */ t(
377
+ /* @__PURE__ */ e(m, { sx: { mr: 10 }, variant: "Body", children: l.accountName }),
378
+ /* @__PURE__ */ e(
381
379
  y,
382
380
  {
383
- amount: c.gain,
384
- sx: { color: s.palette.success.main, flexShrink: 0, fontWeight: 700 },
385
- variant: "body1"
381
+ amount: l.gain,
382
+ sx: { color: a.palette.success.main, flexShrink: 0, fontWeight: 700 },
383
+ variant: "Body"
386
384
  }
387
385
  )
388
386
  ] }),
389
387
  sx: { px: 16 }
390
388
  }
391
389
  ) }),
392
- /* @__PURE__ */ t(W, {})
393
- ] }, c.accountName)),
394
- /* @__PURE__ */ t(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(
395
- _,
390
+ /* @__PURE__ */ e(W, {})
391
+ ] }, l.accountName)),
392
+ /* @__PURE__ */ e(k, { sx: { mb: 8, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(
393
+ w,
396
394
  {
397
395
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
398
- /* @__PURE__ */ t(d, { sx: { fontWeight: 700 }, variant: "caption", children: o.losses }),
399
- /* @__PURE__ */ t(y, { amount: a, sx: { fontWeight: 400 }, variant: "caption" })
396
+ /* @__PURE__ */ e(m, { sx: { fontWeight: 700 }, variant: "XSmall", children: o.losses }),
397
+ /* @__PURE__ */ e(y, { amount: c, sx: { fontWeight: 400 }, variant: "XSmall" })
400
398
  ] })
401
399
  }
402
400
  ) }),
403
- i?.map((c) => /* @__PURE__ */ r(v, { children: [
404
- /* @__PURE__ */ t(
401
+ i?.map((l) => /* @__PURE__ */ r(v, { children: [
402
+ /* @__PURE__ */ e(
405
403
  D,
406
404
  {
407
- sx: { backgroundColor: s.palette.background.paper, py: 14 },
408
- children: /* @__PURE__ */ t(
409
- _,
405
+ sx: { backgroundColor: a.palette.background.paper, py: 14 },
406
+ children: /* @__PURE__ */ e(
407
+ w,
410
408
  {
411
409
  primary: /* @__PURE__ */ r(h, { direction: "row", justifyContent: "space-between", children: [
412
- /* @__PURE__ */ t(
413
- d,
410
+ /* @__PURE__ */ e(
411
+ m,
414
412
  {
415
413
  sx: {
416
414
  mr: 10
417
415
  },
418
- variant: "body1",
419
- children: c.accountName
416
+ variant: "Body",
417
+ children: l.accountName
420
418
  }
421
419
  ),
422
- /* @__PURE__ */ t(
420
+ /* @__PURE__ */ e(
423
421
  y,
424
422
  {
425
- amount: c.loss,
423
+ amount: l.loss,
426
424
  sx: { flexShrink: 0, fontWeight: 700 },
427
- variant: "body1"
425
+ variant: "Body"
428
426
  }
429
427
  )
430
428
  ] }),
@@ -432,69 +430,70 @@ const Rt = ({
432
430
  }
433
431
  )
434
432
  },
435
- c.accountName
433
+ l.accountName
436
434
  ),
437
- /* @__PURE__ */ t(W, {})
435
+ /* @__PURE__ */ e(W, {})
438
436
  ] }))
439
437
  ] })
440
438
  ] });
441
- }, Pt = w(Qt), Me = w(({ onBackClick: e }) => {
442
- const { isCopyLoaded: l, isInitialized: i, selectedAccounts: n, setSelectedAccounts: a } = P(), { accounts: o, net_worth: s } = T(), { visibleAccounts: c } = J(), {
439
+ }, Pe = _(Qe), Bt = _(({ onBackClick: t }) => {
440
+ const { isCopyLoaded: s, isInitialized: i, selectedAccounts: n, setSelectedAccounts: c } = ee(), { accounts: o, net_worth: a } = I(), { visibleAccounts: l } = Q(), {
443
441
  assetsLiabilities: u,
444
442
  gainsLosses: C,
445
443
  hoveredData: x,
446
444
  loadChartData: g,
447
- loadNetWorthData: b,
445
+ loadNetWorthData: S,
448
446
  netWorthChartData: p,
449
447
  selectedData: f,
450
448
  setHoveredData: L,
451
- setSelectedData: it
452
- } = tt(), { isMobile: N } = Z(), { onEvent: E } = Q(), { onLoad: st } = St(), [at, ct] = m.useState(!1), [M, lt] = m.useState(6), [dt, G] = m.useState(!1), [mt, $] = m.useState(!1), [ht, B] = m.useState(!1), ut = async () => {
453
- await b(n), await g(M), ct(!0);
449
+ setSelectedData: ce
450
+ } = te(), { isMobile: N } = J(), { onEvent: E } = P(), [j, le] = d.useState(!1), [M, me] = d.useState(6), [de, $] = d.useState(!1), [he, G] = d.useState(!1), [ue, X] = d.useState(!1), pe = async () => {
451
+ await S(n), await g(M), le(!0);
454
452
  };
455
- m.useEffect(() => {
456
- E(S.NET_WORTH_VIEW);
457
- }, []), m.useEffect(() => {
458
- a(c);
459
- }, [c]), m.useEffect(() => {
460
- i && ut().finally(() => {
461
- st?.("NetWorthWidget");
462
- });
463
- }, [i, n]), m.useEffect(() => {
464
- E(S.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: M + "M" }), g(M).finally();
453
+ ie({
454
+ widgetName: "NetWorthWidget",
455
+ isLoaded: j
456
+ }), d.useEffect(() => {
457
+ E(b.NET_WORTH_VIEW);
458
+ }, []), d.useEffect(() => {
459
+ c(l);
460
+ }, [l]), d.useEffect(() => {
461
+ i && pe().finally();
462
+ }, [i, n]), d.useEffect(() => {
463
+ E(b.NET_WORTH_WIDGET_CLICK_TIMEFRAME, { time_period: M + "M" }), g(M).finally();
465
464
  }, [M]);
466
- const pt = (I, O) => {
467
- it(O), I.currentTarget instanceof HTMLDivElement && G(!0);
468
- }, ft = (I) => {
469
- L(I);
470
- }, xt = () => {
465
+ const fe = (T, A) => {
466
+ ce(A), T.currentTarget instanceof HTMLDivElement && $(!0);
467
+ }, xe = (T) => {
468
+ L(T);
469
+ }, ge = () => {
471
470
  L(null);
472
- }, gt = () => {
473
- E(S.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), $(!0);
474
- }, yt = async (I) => {
475
- const O = I[0], K = I[1];
476
- O && K && lt(Dt(K, O));
471
+ }, ye = () => {
472
+ E(b.NET_WORTH_WIDGET_CLICK_ASSETS_LIABILITIES), G(!0);
473
+ }, Ce = async (T) => {
474
+ const A = T[0], K = T[1];
475
+ A && K && me(De(K, A));
477
476
  }, F = {
478
477
  chartData: p,
479
478
  hoveredData: x,
480
- onButtonClick: gt,
481
- onDataClick: pt,
482
- onMouseEnter: ft,
483
- onMouseLeave: xt,
479
+ onButtonClick: ye,
480
+ onDataClick: fe,
481
+ onMouseEnter: xe,
482
+ onMouseLeave: ge,
484
483
  selectedData: f
485
- }, Ct = () => {
486
- B(!0), E(S.ACCOUNTS_CLICK_CONNECT);
484
+ }, Se = () => {
485
+ X(!0), E(b.ACCOUNTS_CLICK_CONNECT);
487
486
  };
488
- return l ? /* @__PURE__ */ t(
489
- Mt,
487
+ return s ? /* @__PURE__ */ e(
488
+ Me,
490
489
  {
491
- accountOptions: c,
490
+ accountOptions: l,
492
491
  calendarActions: {
493
- onRangeChanged: yt
492
+ onRangeChanged: Ce
494
493
  },
495
494
  dateRangeVariant: N ? "timeframetabs" : "timeframebuttons",
496
- onAccountsFilterClick: () => E(S.NET_WORTH_WIDGET_CLICK_FILTER),
497
- onBackClick: e,
495
+ onAccountsFilterClick: () => E(b.NET_WORTH_WIDGET_CLICK_FILTER),
496
+ onBackClick: t,
498
497
  showDividerAboveDateSelector: !1,
499
498
  sx: {
500
499
  p: N ? 0 : 48,
@@ -509,10 +508,10 @@ const Rt = ({
509
508
  width: "100%"
510
509
  }
511
510
  },
512
- title: s.net_worth,
513
- children: at ? /* @__PURE__ */ r(v, { children: [
511
+ title: a.net_worth,
512
+ children: j ? /* @__PURE__ */ r(v, { children: [
514
513
  p.length ? /* @__PURE__ */ r(v, { children: [
515
- f && /* @__PURE__ */ t(Vt, { hoveredData: x, selectedData: f }),
514
+ f && /* @__PURE__ */ e(Ue, { hoveredData: x, selectedData: f }),
516
515
  /* @__PURE__ */ r(
517
516
  h,
518
517
  {
@@ -520,19 +519,19 @@ const Rt = ({
520
519
  direction: N ? "column" : "row",
521
520
  spacing: N ? 0 : 48,
522
521
  children: [
523
- /* @__PURE__ */ t(jt, { ...F }),
524
- /* @__PURE__ */ t(Ft, { ...F })
522
+ /* @__PURE__ */ e(Re, { ...F }),
523
+ /* @__PURE__ */ e(Xe, { ...F })
525
524
  ]
526
525
  }
527
526
  )
528
- ] }) : /* @__PURE__ */ t(rt, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ t(
529
- zt,
527
+ ] }) : /* @__PURE__ */ e(ae, { sx: { justifyItems: "center" }, children: /* @__PURE__ */ e(
528
+ Oe,
530
529
  {
531
- header: s.empty_widget_header,
530
+ header: a.empty_widget_header,
532
531
  icon: "elevation",
533
- onClick: Ct,
534
- primaryButton: s.empty_widget_button,
535
- subText: s.empty_widget_description,
532
+ onClick: Se,
533
+ primaryButton: a.empty_widget_button,
534
+ subText: a.empty_widget_description,
536
535
  sx: {
537
536
  width: { sm: 432 },
538
537
  ".buttons-footer": {
@@ -541,47 +540,47 @@ const Rt = ({
541
540
  }
542
541
  }
543
542
  ) }),
544
- /* @__PURE__ */ t(
545
- Ot,
543
+ /* @__PURE__ */ e(
544
+ He,
546
545
  {
547
- onClose: () => B(!1),
548
- showConnectionsWidget: ht,
546
+ onClose: () => X(!1),
547
+ showConnectionsWidget: ue,
549
548
  title: o.manage_connections
550
549
  }
551
550
  ),
552
- /* @__PURE__ */ t(
553
- Y,
551
+ /* @__PURE__ */ e(
552
+ q,
554
553
  {
555
554
  ariaLabelClose: "Close",
556
- isOpen: dt,
557
- onClose: () => G(!1),
555
+ isOpen: de,
556
+ onClose: () => $(!1),
558
557
  shouldShowHeaderBorders: !1,
559
558
  shouldShowHeaderShadow: !0,
560
- title: s.gains_and_losses,
561
- children: C && /* @__PURE__ */ t(Pt, { ...C })
559
+ title: a.gains_and_losses,
560
+ children: C && /* @__PURE__ */ e(Pe, { ...C })
562
561
  }
563
562
  ),
564
- /* @__PURE__ */ t(
565
- Y,
563
+ /* @__PURE__ */ e(
564
+ q,
566
565
  {
567
566
  ariaLabelClose: "Close",
568
- isOpen: mt,
569
- onClose: () => $(!1),
567
+ isOpen: he,
568
+ onClose: () => G(!1),
570
569
  shouldShowHeaderBorders: !1,
571
570
  shouldShowHeaderShadow: !0,
572
- title: s.assets_and_liabilities,
573
- children: u && /* @__PURE__ */ t(Jt, { ...u })
571
+ title: a.assets_and_liabilities,
572
+ children: u && /* @__PURE__ */ e(Je, { ...u })
574
573
  }
575
574
  )
576
- ] }) : /* @__PURE__ */ t(R, {})
575
+ ] }) : /* @__PURE__ */ e(O, {})
577
576
  }
578
- ) : /* @__PURE__ */ t(R, {});
577
+ ) : /* @__PURE__ */ e(O, {});
579
578
  });
580
579
  export {
581
- jt as NetWorthChart,
582
- Ft as NetWorthList,
583
- Ae as NetWorthMicroWidget,
584
- ze as NetWorthStore,
585
- Vt as NetWorthSummary,
586
- Me as NetWorthWidget
580
+ Re as NetWorthChart,
581
+ Xe as NetWorthList,
582
+ Ht as NetWorthMicroWidget,
583
+ Rt as NetWorthStore,
584
+ Ue as NetWorthSummary,
585
+ Bt as NetWorthWidget
587
586
  };