@mx-cartographer/experiences 8.0.24 → 8.1.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.
Files changed (148) hide show
  1. package/CHANGELOG.md +8 -9
  2. package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
  3. package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
  4. package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
  5. package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
  6. package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
  7. package/dist/Analytics-CjZ0emfs.mjs +53 -0
  8. package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
  9. package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
  10. package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
  11. package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
  12. package/dist/CategoryApi-CogDFScz.mjs +29 -0
  13. package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
  14. package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
  15. package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
  16. package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
  17. package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
  18. package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
  19. package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
  20. package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
  21. package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
  22. package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
  23. package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
  24. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
  25. package/dist/Goal-MFBpoOIC.mjs +29 -0
  26. package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
  27. package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
  28. package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
  29. package/dist/Localization-C_HZg9tJ.mjs +15 -0
  30. package/dist/Localization-CkQ49EKr.mjs +26 -0
  31. package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
  32. package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
  33. package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
  34. package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
  35. package/dist/NotificationApi-DF0obHoR.mjs +20 -0
  36. package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
  37. package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
  38. package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
  39. package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
  40. package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
  41. package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
  42. package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
  43. package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
  44. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
  45. package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
  46. package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
  47. package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
  48. package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
  49. package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
  50. package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
  51. package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
  52. package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
  53. package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
  54. package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
  55. package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
  56. package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
  57. package/dist/accounts/index.d.ts +0 -1
  58. package/dist/accounts/index.es.js +63 -65
  59. package/dist/accounts/stores/AccountStore.d.ts +1 -1
  60. package/dist/budgets/index.es.js +11 -11
  61. package/dist/budgets/store/BudgetsStore.d.ts +1 -1
  62. package/dist/cashflow/index.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +428 -449
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  66. package/dist/common/components/Error.d.ts +11 -0
  67. package/dist/common/components/index.d.ts +1 -0
  68. package/dist/common/constants/index.d.ts +0 -1
  69. package/dist/common/index.d.ts +0 -1
  70. package/dist/common/index.es.js +391 -492
  71. package/dist/common/stores/AppDataStore.d.ts +2 -2
  72. package/dist/common/stores/ConnectStore.d.ts +1 -1
  73. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  74. package/dist/common/stores/UserStore.d.ts +1 -1
  75. package/dist/common/utils/Localization.d.ts +0 -9
  76. package/dist/common/utils/index.d.ts +1 -2
  77. package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
  78. package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
  79. package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
  80. package/dist/{common → core}/api/BannerApi.d.ts +1 -1
  81. package/dist/{common → core}/api/BeatApi.d.ts +2 -2
  82. package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
  83. package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
  84. package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
  85. package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
  86. package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
  87. package/dist/{help → core}/api/HelpApi.d.ts +2 -2
  88. package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
  89. package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
  90. package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
  91. package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
  92. package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
  93. package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
  94. package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
  95. package/dist/{common → core}/api/UserApi.d.ts +2 -2
  96. package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
  97. package/dist/core/api/index.d.ts +20 -0
  98. package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
  99. package/dist/core/constants/index.d.ts +1 -0
  100. package/dist/core/index.d.ts +2 -0
  101. package/dist/core/index.es.js +90 -38
  102. package/dist/{common → core}/utils/Fetch.d.ts +1 -1
  103. package/dist/core/utils/Localization.d.ts +9 -0
  104. package/dist/core/utils/index.d.ts +2 -0
  105. package/dist/debts/index.es.js +7 -7
  106. package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
  107. package/dist/finstrong/index.d.ts +0 -1
  108. package/dist/finstrong/index.es.js +16 -17
  109. package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
  110. package/dist/goals/index.d.ts +0 -1
  111. package/dist/goals/index.es.js +50 -51
  112. package/dist/goals/stores/GoalStore.d.ts +1 -1
  113. package/dist/help/index.es.js +2 -2
  114. package/dist/help/store/HelpStore.d.ts +1 -1
  115. package/dist/insights/index.es.js +6 -6
  116. package/dist/insights/store/BeatStore.d.ts +1 -1
  117. package/dist/investments/index.es.js +2 -2
  118. package/dist/investments/stores/HoldingStore.d.ts +1 -1
  119. package/dist/merchants/index.es.js +1 -1
  120. package/dist/merchants/stores/MerchantStore.d.ts +1 -1
  121. package/dist/microinsights/index.es.js +1 -1
  122. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  123. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  124. package/dist/networth/index.es.js +8 -8
  125. package/dist/networth/stores/NetWorthStore.d.ts +1 -1
  126. package/dist/notifications/index.es.js +5 -5
  127. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  128. package/dist/recurringtransactions/index.es.js +26 -25
  129. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
  130. package/dist/settings/index.d.ts +0 -1
  131. package/dist/settings/index.es.js +65 -66
  132. package/dist/settings/stores/SettingsStore.d.ts +2 -2
  133. package/dist/spending/index.es.js +6 -6
  134. package/dist/transactions/index.d.ts +0 -1
  135. package/dist/transactions/index.es.js +22 -24
  136. package/dist/transactions/stores/TransactionStore.d.ts +3 -2
  137. package/dist/trends/index.es.js +14 -14
  138. package/package.json +1 -1
  139. package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
  140. package/dist/Goal-0loDagc5.mjs +0 -6
  141. package/dist/Localization-CPkpIwIx.mjs +0 -37
  142. package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
  143. package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
  144. package/dist/cashflow/api/CashflowApi.d.ts +0 -13
  145. package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
  146. package/dist/common/api/index.d.ts +0 -10
  147. package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
  148. package/dist/useCombineEvents-Bqojlv8q.mjs +0 -92
@@ -1,32 +1,32 @@
1
- import { makeAutoObservable as E, runInAction as d } from "mobx";
2
- import { format as R } from "date-fns/format";
1
+ import { makeAutoObservable as D, runInAction as d } from "mobx";
2
+ import { format as A } from "date-fns/format";
3
3
  import { fromUnixTime as b } from "date-fns/fromUnixTime";
4
- import { getUnixTime as T } from "date-fns/getUnixTime";
5
- import { subMonths as v } from "date-fns/subMonths";
6
- import { F as H, A as h } from "./Fetch-B6tMJC1r.mjs";
4
+ import { getUnixTime as O } from "date-fns/getUnixTime";
5
+ import { subMonths as x } from "date-fns/subMonths";
6
+ import { F as T } from "./FinstrongApi-FpmsS_sy.mjs";
7
7
  import { jsx as c, jsxs as C } from "react/jsx-runtime";
8
- import { addDays as x } from "date-fns/addDays";
9
- import { addMonths as M } from "date-fns/addMonths";
10
- import { addYears as G } from "date-fns/addYears";
11
- import { differenceInDays as L } from "date-fns/differenceInDays";
12
- import { differenceInMonths as w } from "date-fns/differenceInMonths";
13
- import { differenceInWeeks as y } from "date-fns/differenceInWeeks";
14
- import { startOfToday as N } from "date-fns/startOfToday";
15
- import { ChevronRight as P, Check as k } from "@mxenabled/mx-icons";
16
- import $ from "react";
17
- import z from "@mui/material/Avatar";
18
- import K from "@mui/material/Box";
19
- import B from "@mui/material/Divider";
20
- import Y from "@mui/material/List";
21
- import U from "@mui/material/ListItem";
22
- import X from "@mui/material/ListItemAvatar";
23
- import V from "@mui/material/ListItemButton";
24
- import W from "@mui/material/ListItemText";
25
- import { Text as A } from "@mxenabled/mxui";
26
- import { f as I, D as O } from "./DateFormats-BMpMrZpW.mjs";
27
- import { b as j } from "./Localization-CPkpIwIx.mjs";
28
- import { f as q } from "./NumberFormatting-QCaNwbjv.mjs";
29
- const m = {
8
+ import { addDays as v } from "date-fns/addDays";
9
+ import { addMonths as E } from "date-fns/addMonths";
10
+ import { addYears as M } from "date-fns/addYears";
11
+ import { differenceInDays as G } from "date-fns/differenceInDays";
12
+ import { differenceInMonths as N } from "date-fns/differenceInMonths";
13
+ import { differenceInWeeks as F } from "date-fns/differenceInWeeks";
14
+ import { startOfToday as w } from "date-fns/startOfToday";
15
+ import { ChevronRight as P, Check as H } from "@mxenabled/mx-icons";
16
+ import L from "react";
17
+ import k from "@mui/material/Avatar";
18
+ import z from "@mui/material/Box";
19
+ import K from "@mui/material/Divider";
20
+ import B from "@mui/material/List";
21
+ import Y from "@mui/material/ListItem";
22
+ import U from "@mui/material/ListItemAvatar";
23
+ import X from "@mui/material/ListItemButton";
24
+ import V from "@mui/material/ListItemText";
25
+ import { Text as y } from "@mxenabled/mxui";
26
+ import { f as I, D as _ } from "./DateFormats-CaOj_4eI.mjs";
27
+ import { b as W } from "./Localization-CkQ49EKr.mjs";
28
+ import { f as $ } from "./NumberFormatting-CyrvFgfd.mjs";
29
+ const h = {
30
30
  creditScore: {
31
31
  poor: 600,
32
32
  good: 720
@@ -47,15 +47,15 @@ const m = {
47
47
  poor: 110,
48
48
  good: 100
49
49
  }
50
- }, S = {
50
+ }, p = {
51
51
  GOOD: "GOOD",
52
52
  FAIR: "FAIR",
53
53
  OFF_TRACK: "OFF TRACK",
54
54
  MISSING: "MISSING DATA"
55
55
  };
56
- var _ = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(_ || {});
57
- const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
58
- Y,
56
+ var f = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(f || {});
57
+ const j = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(z, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
58
+ B,
59
59
  {
60
60
  sx: {
61
61
  "& .MuiListItemSecondaryAction-root": {
@@ -63,10 +63,10 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
63
63
  pr: 24
64
64
  }
65
65
  },
66
- children: e.map((r, n) => /* @__PURE__ */ C($.Fragment, { children: [
67
- /* @__PURE__ */ c(U, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(V, { onClick: () => t(r.key), children: [
68
- /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
69
- z,
66
+ children: e.map((r, n) => /* @__PURE__ */ C(L.Fragment, { children: [
67
+ /* @__PURE__ */ c(Y, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(X, { onClick: () => t(r.key), children: [
68
+ /* @__PURE__ */ c(U, { children: /* @__PURE__ */ c(
69
+ k,
70
70
  {
71
71
  sx: {
72
72
  bgcolor: "primary.main",
@@ -82,17 +82,17 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
82
82
  }
83
83
  ) }),
84
84
  /* @__PURE__ */ c(
85
- W,
85
+ V,
86
86
  {
87
- primary: /* @__PURE__ */ c(A, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
88
- secondary: /* @__PURE__ */ c(A, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
87
+ primary: /* @__PURE__ */ c(y, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
88
+ secondary: /* @__PURE__ */ c(y, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
89
89
  }
90
90
  )
91
91
  ] }) }),
92
- /* @__PURE__ */ c(B, { sx: { color: "divider", ml: n === e.length - 1 ? 0 : 68 } })
92
+ /* @__PURE__ */ c(K, { sx: { color: "divider", ml: n === e.length - 1 ? 0 : 68 } })
93
93
  ] }, r.key))
94
94
  }
95
- ) }), Gt = J, Lt = (e) => e * (180 / Math.PI), wt = (e, t) => [
95
+ ) }), Mt = j, Gt = (e) => e * (180 / Math.PI), Nt = (e, t) => [
96
96
  {
97
97
  description: t.vulnerable_description,
98
98
  max: 25,
@@ -129,7 +129,7 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
129
129
  GOOD: "#FFC02C",
130
130
  VERY_GOOD: "#29C76B",
131
131
  EXCEPTIONAL: "#008A5A"
132
- }, Nt = (e, t, r) => e >= 300 && e < 580 ? {
132
+ }, wt = (e, t, r) => e >= 300 && e < 580 ? {
133
133
  status: r.poor,
134
134
  color: t ? u.POOR : g.POOR
135
135
  } : e >= 580 && e < 670 ? {
@@ -148,22 +148,22 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
148
148
  const o = e.reduce((i, l) => i + l.value, 0);
149
149
  let a = 0;
150
150
  const s = e.map((i) => {
151
- const l = i.value / o * t, p = r + a, f = p + l;
151
+ const l = i.value / o * t, m = r + a, S = m + l;
152
152
  return a += l, {
153
153
  ...i,
154
- startAngle: p,
155
- endAngle: f
154
+ startAngle: m,
155
+ endAngle: S
156
156
  };
157
157
  });
158
158
  return [s[n].startAngle, s[n].endAngle];
159
- }, kt = (e, t, r, n, o) => {
159
+ }, Ht = (e, t, r, n, o) => {
160
160
  let a = 0, s = 0;
161
161
  const i = Math.floor(n), l = n - i;
162
162
  return i > r ? (a = e, s = t) : i === r && l > 0 && (a = e, s = o), [a, s];
163
- }, $t = (e, t, r = 0) => {
163
+ }, Lt = (e, t, r = 0) => {
164
164
  const n = e * Math.sin(t - r), o = -e * Math.cos(t - r);
165
165
  return [n, o];
166
- }, zt = ({
166
+ }, kt = ({
167
167
  dynamicCopy: e,
168
168
  fallbackLabel: t,
169
169
  icon: r,
@@ -171,37 +171,37 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
171
171
  label: o,
172
172
  value: a
173
173
  }) => {
174
- const s = !!a, i = s ? Q(n, a) : e && j(e, t) || t;
174
+ const s = !!a, i = s ? q(n, a) : e && W(e, t) || t;
175
175
  return {
176
- icon: s ? /* @__PURE__ */ c(k, {}) : r,
176
+ icon: s ? /* @__PURE__ */ c(H, {}) : r,
177
177
  isComplete: s,
178
178
  key: n,
179
179
  primaryText: o,
180
180
  secondaryText: i
181
181
  };
182
- }, Q = (e, t) => ({
183
- [_.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
184
- [_.MonthlyIncome]: (n) => q(Number(n), "0.00")
185
- })[e]?.(t) ?? String(t), Kt = (e) => e !== null ? Math.round(e * 100) : null, Bt = (e) => {
182
+ }, q = (e, t) => ({
183
+ [f.DateOfBirth]: (n) => A(new Date(Number(n) * 1e3), "MMM d, yyyy"),
184
+ [f.MonthlyIncome]: (n) => $(Number(n), "0.00")
185
+ })[e]?.(t) ?? String(t), zt = (e) => e !== null ? Math.round(e * 100) : null, Kt = (e) => {
186
186
  const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
187
- return I(t, O.MONTH_SHORT);
187
+ return I(t, _.MONTH_SHORT);
188
+ }, Bt = (e) => {
189
+ const { good: t, poor: r } = h.daysOfCashOnHand;
190
+ return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
188
191
  }, Yt = (e) => {
189
- const { good: t, poor: r } = m.daysOfCashOnHand;
192
+ const { good: t, poor: r } = h.emergencySavings;
190
193
  return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
191
194
  }, Ut = (e) => {
192
- const { good: t, poor: r } = m.emergencySavings;
193
- return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
194
- }, Xt = (e) => {
195
- const { good: t, poor: r } = m.spendToIncomeRatio;
195
+ const { good: t, poor: r } = h.spendToIncomeRatio;
196
196
  return e === null ? "MISSING" : e < t ? "GOOD" : e < r ? "FAIR" : "OFF_TRACK";
197
- }, Vt = (e) => {
198
- const { good: t, poor: r } = m.debtToIncomeRatio;
197
+ }, Xt = (e) => {
198
+ const { good: t, poor: r } = h.debtToIncomeRatio;
199
199
  return e === null ? "MISSING" : e <= t ? "GOOD" : e <= r ? "FAIR" : "OFF_TRACK";
200
- }, Wt = (e) => {
201
- const { good: t, poor: r } = m.creditScore;
200
+ }, Vt = (e) => {
201
+ const { good: t, poor: r } = h.creditScore;
202
202
  return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
203
- }, Z = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", jt = (e, t) => {
204
- const r = Z(e), n = {
203
+ }, J = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", Wt = (e, t) => {
204
+ const r = J(e), n = {
205
205
  GOOD: t.count_good_description,
206
206
  OFF_TRACK: t.count_off_track_description,
207
207
  MISSING: t.count_missing_description
@@ -211,25 +211,25 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
211
211
  description: n[r],
212
212
  title: t.count_card_title
213
213
  };
214
- }, qt = (e) => ({
215
- [S.GOOD]: { backgroundColor: "success.lighter", color: "success.dark" },
216
- [S.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
217
- [S.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
218
- [S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
219
- })[e], tt = 1, et = 1, rt = {
220
- 1: M,
221
- 2: G,
222
- 3: x
223
- }, nt = {
224
- 1: w,
225
- 2: (e, t) => y(e, t) / 2,
226
- 3: y,
227
- 4: L
228
- }, D = [
214
+ }, $t = (e) => ({
215
+ [p.GOOD]: { backgroundColor: "success.lighter", color: "success.dark" },
216
+ [p.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
217
+ [p.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
218
+ [p.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
219
+ })[e], Q = 1, Z = 1, tt = {
220
+ 1: E,
221
+ 2: M,
222
+ 3: v
223
+ }, et = {
224
+ 1: N,
225
+ 2: (e, t) => F(e, t) / 2,
226
+ 3: F,
227
+ 4: G
228
+ }, R = [
229
229
  { contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
230
230
  { contributionPeriodIndex: 3, targetAmount: 3, upperLimit: 900 },
231
231
  { contributionPeriodIndex: 2, targetAmount: 1, upperLimit: 1e3 }
232
- ], Jt = ({
232
+ ], jt = ({
233
233
  contribution: e,
234
234
  goalAmount: t,
235
235
  goalPeriod: r,
@@ -238,39 +238,24 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
238
238
  }) => {
239
239
  const a = t - o;
240
240
  if (a <= 0) return 0;
241
- const s = N(), i = rt[n], l = nt[e];
241
+ const s = w(), i = tt[n], l = et[e];
242
242
  if (!i || !l) return a;
243
- const p = i(s, r), f = l(p, s);
244
- return Math.max(a / (f || 1), 1);
245
- }, Qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Zt = (e) => D.find((r) => e < r.upperLimit)?.targetAmount ?? et, te = (e) => D.find((n) => e < n.upperLimit)?.contributionPeriodIndex ?? tt, ee = (e, t) => [...e].sort((n, o) => n.year === o.year ? n.month - o.month : n.year - o.year).map((n) => ({
246
- x: I(new Date(0, n.month - 1, 1), O.MONTH_SHORT),
243
+ const m = i(s, r), S = l(m, s);
244
+ return Math.max(a / (S || 1), 1);
245
+ }, qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Jt = (e) => R.find((r) => e < r.upperLimit)?.targetAmount ?? Z, Qt = (e) => R.find((n) => e < n.upperLimit)?.contributionPeriodIndex ?? Q, Zt = (e, t) => [...e].sort((n, o) => n.year === o.year ? n.month - o.month : n.year - o.year).map((n) => ({
246
+ x: I(new Date(0, n.month - 1, 1), _.MONTH_SHORT),
247
247
  y: n[t]
248
- })), ot = (e) => e.sort((t, r) => t.monthly_health_score_average.year !== r.monthly_health_score_average.year ? t.monthly_health_score_average.year - r.monthly_health_score_average.year : t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
248
+ })), rt = (e) => e.sort((t, r) => t.monthly_health_score_average.year !== r.monthly_health_score_average.year ? t.monthly_health_score_average.year - r.monthly_health_score_average.year : t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
249
249
  x: I(
250
250
  new Date(0, t.monthly_health_score_average.month - 1, 1),
251
- O.MONTH_SHORT
251
+ _.MONTH_SHORT
252
252
  ),
253
253
  y: Math.round(t.monthly_health_score_average.average_health_score)
254
- })), at = (e) => e.map(({ transaction: r }) => ({
254
+ })), nt = (e) => e.map(({ transaction: r }) => ({
255
255
  ...r
256
256
  })).sort((r, n) => n.date - r.date);
257
- class F {
258
- fetchInstance;
259
- constructor(t, r, n) {
260
- this.fetchInstance = new H(t, r, void 0, n);
261
- }
262
- calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
263
- getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
264
- getDebtSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
265
- getIncome = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/income`).then((t) => t);
266
- getMonthlySummaries = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
267
- getHealthScoreChangeReports = async (t, r) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${r}`).then((n) => n);
268
- getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((r) => r);
269
- getSpendingFeeTransactions = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
270
- getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
271
- }
272
- class re {
273
- api = new F("/", "");
257
+ class te {
258
+ api = new T("/", "");
274
259
  augmentedChartData = [];
275
260
  averageHealthScores = [];
276
261
  monthlySummaries = [];
@@ -286,7 +271,7 @@ class re {
286
271
  isSpendingInitialized = !1;
287
272
  isIncomeInitialized = !1;
288
273
  constructor(t) {
289
- this.globalStore = t, this.api = new F(t.endpoint, t.sessionToken, t.onError), E(this);
274
+ this.globalStore = t, this.api = new T(t.endpoint, t.sessionToken, t.onError), D(this);
290
275
  }
291
276
  setSpendingInitialized = (t) => {
292
277
  this.isSpendingInitialized = t;
@@ -349,7 +334,7 @@ class re {
349
334
  }
350
335
  };
351
336
  loadHealthScoreChangeReports = async () => {
352
- const t = T(v(/* @__PURE__ */ new Date(), 2)), r = T(/* @__PURE__ */ new Date());
337
+ const t = O(x(/* @__PURE__ */ new Date(), 2)), r = O(/* @__PURE__ */ new Date());
353
338
  try {
354
339
  const n = await this.api.getHealthScoreChangeReports(
355
340
  t,
@@ -363,7 +348,7 @@ class re {
363
348
  }
364
349
  };
365
350
  loadPeerScore = async () => {
366
- const t = R(b(this.globalStore.appDataStore.user.birthday), "yyyy");
351
+ const t = A(b(this.globalStore.appDataStore.user.birthday), "yyyy");
367
352
  try {
368
353
  const r = await this.api.getPeerScore(t);
369
354
  d(() => {
@@ -377,7 +362,7 @@ class re {
377
362
  try {
378
363
  const t = await this.api.getAverageHealthScores();
379
364
  d(() => {
380
- this.augmentedChartData = ot(t);
365
+ this.augmentedChartData = rt(t);
381
366
  });
382
367
  } catch (t) {
383
368
  console.error(`Error occurred while getting augmented chart data: ${t}`);
@@ -385,7 +370,7 @@ class re {
385
370
  };
386
371
  getSpendingFeeTransactions = async () => {
387
372
  try {
388
- const t = await this.api.getSpendingFeeTransactions(), r = at(t);
373
+ const t = await this.api.getSpendingFeeTransactions(), r = nt(t);
389
374
  d(() => {
390
375
  this.spendingFeeTransactions = r;
391
376
  });
@@ -419,33 +404,32 @@ class re {
419
404
  };
420
405
  }
421
406
  export {
422
- _ as A,
407
+ f as A,
423
408
  u as C,
424
- re as F,
425
- Gt as P,
426
- kt as a,
427
- $t as b,
428
- wt as c,
429
- Nt as d,
409
+ te as F,
410
+ Mt as P,
411
+ Ht as a,
412
+ Lt as b,
413
+ Nt as c,
414
+ wt as d,
430
415
  g as e,
431
- ee as f,
416
+ Zt as f,
432
417
  Pt as g,
433
- qt as h,
434
- S as i,
435
- Wt as j,
436
- te as k,
437
- Zt as l,
438
- Jt as m,
439
- Qt as n,
440
- Ut as o,
441
- Z as p,
442
- Yt as q,
443
- Lt as r,
444
- Kt as s,
445
- Vt as t,
446
- Bt as u,
447
- Xt as v,
448
- jt as w,
449
- zt as x,
450
- F as y
418
+ $t as h,
419
+ p as i,
420
+ Vt as j,
421
+ Qt as k,
422
+ Jt as l,
423
+ jt as m,
424
+ qt as n,
425
+ Yt as o,
426
+ J as p,
427
+ Bt as q,
428
+ Gt as r,
429
+ zt as s,
430
+ Xt as t,
431
+ Kt as u,
432
+ Ut as v,
433
+ Wt as w,
434
+ kt as x
451
435
  };
@@ -0,0 +1,41 @@
1
+ import c from "bowser";
2
+ import { F as a, A as e } from "./ApiEndpoints-C5IA97i7.mjs";
3
+ class h {
4
+ fetchInstance;
5
+ constructor(t, s, n) {
6
+ this.fetchInstance = new a(t, s, void 0, n);
7
+ }
8
+ initializeAnalyticsSession = async (t, s) => {
9
+ const n = c.getParser(window.navigator.userAgent), { analytics_session: i } = await this.fetchInstance.post(e.ANALYTICS_SESSION, {
10
+ browser_name: n.getBrowserName() || "Unknown",
11
+ browser_version: n.getBrowserVersion() || "0.0.0",
12
+ is_first_visit: !1,
13
+ product_name: "Individual Widget",
14
+ product_version: t
15
+ });
16
+ return i ? (this.fetchInstance.post(e.ANALYTICS_FEATURE_VISITS, {
17
+ feature_visit: {
18
+ analytics_session_guid: i.guid,
19
+ feature_name: s || "Experiences",
20
+ is_first_visit: i.is_first_visit
21
+ }
22
+ }), { analytics_session: i }) : { analytics_session: null };
23
+ };
24
+ sendAnalyticEvent = async (t) => this.fetchInstance.post(e.ANALYTICS_EVENTS, t).catch((s) => {
25
+ throw s;
26
+ });
27
+ sendAnalyticsPageview = async (t) => this.fetchInstance.post(e.ANALYTICS_PAGEVIEWS, t).catch((s) => {
28
+ throw s;
29
+ });
30
+ }
31
+ class A {
32
+ fetchInstance;
33
+ constructor(t, s, n) {
34
+ this.fetchInstance = new a(t, s, void 0, n);
35
+ }
36
+ getGlobalCopy = async (t, s) => this.fetchInstance.post(`${e.LOCALIZED_CONTENT}/${t}`, { translation_key: s }).then((n) => n);
37
+ }
38
+ export {
39
+ h as A,
40
+ A as G
41
+ };
@@ -0,0 +1,29 @@
1
+ import { F as A, A as s } from "./ApiEndpoints-C5IA97i7.mjs";
2
+ class h {
3
+ fetchInstance;
4
+ constructor(n, E, e) {
5
+ this.fetchInstance = new A(n, E, void 0, e);
6
+ }
7
+ addGoal = async (n) => this.fetchInstance.post(s.GOALS, n).then((E) => E.goal);
8
+ addRetirementGoal = async (n) => this.fetchInstance.post(s.RETIREMENT_GOALS, n).then((E) => E.retirement_goal);
9
+ addRetirementGoalAccount = async (n) => this.fetchInstance.post(s.RETIREMENT_GOAL_ACCOUNTS, n).then((E) => E.retirement_goal_account);
10
+ getGoalByGuid = async (n) => this.fetchInstance.get(`${s.GOALS}/${n}`).then((E) => E.goal);
11
+ getGoals = async () => this.fetchInstance.get(s.GOALS).then((n) => n.goals);
12
+ getMonthlyCashFlowProfile = async () => this.fetchInstance.get(s.MONTHLY_CASH_FLOW_PROFILE).then((n) => n.monthly_cash_flow_profile);
13
+ getRetirementGoals = async () => this.fetchInstance.get(s.RETIREMENT_GOALS).then((n) => n.retirement_goals);
14
+ getRetirementGoalAccounts = async () => this.fetchInstance.get(s.RETIREMENT_GOAL_ACCOUNTS).then((n) => n.retirement_goal_accounts);
15
+ removeGoal = async (n) => this.fetchInstance.delete(`${s.GOALS}/${n}`).then((E) => E);
16
+ removeRetirementGoal = async (n) => this.fetchInstance.delete(`${s.RETIREMENT_GOALS}/${n}`).then((E) => E);
17
+ removeRetirementGoalAccount = async (n) => this.fetchInstance.delete(`${s.RETIREMENT_GOAL_ACCOUNTS}/${n}`).then((E) => E);
18
+ reorderGoals = async (n) => this.fetchInstance.post(`${s.GOALS}/reposition`, { goals: n }).then((E) => E.goals);
19
+ updateGoal = async (n) => this.fetchInstance.put(`${s.GOALS}/${n.guid}`, n).then((E) => E.goal);
20
+ updateMonthlyCashFlowProfile = async (n) => this.fetchInstance.put(`${s.MONTHLY_CASH_FLOW_PROFILE}`, n).then((E) => E.monthly_cash_flow_profile);
21
+ updateRetirementGoal = async (n) => this.fetchInstance.put(`${s.RETIREMENT_GOALS}/${n.guid}`, n).then((E) => E.retirement_goal);
22
+ }
23
+ var r = /* @__PURE__ */ ((t) => (t[t.DEBT_TRACK = 1] = "DEBT_TRACK", t[t.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", t[t.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", t[t.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", t))(r || {}), _ = /* @__PURE__ */ ((t) => (t[t.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", t[t.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", t[t.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", t[t.ACTION = 4] = "ACTION", t))(_ || {}), R = /* @__PURE__ */ ((t) => (t[t.AUTOMOBILE = 1] = "AUTOMOBILE", t[t.COLLEGE = 2] = "COLLEGE", t[t.HOUSE = 3] = "HOUSE", t[t.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", t[t.VACATION = 5] = "VACATION", t[t.ELECTRONIC = 6] = "ELECTRONIC", t[t.OTHER = 7] = "OTHER", t[t.RETIREMENT = 8] = "RETIREMENT", t[t.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", t[t.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", t[t.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", t[t.CREDIT_CARD = 12] = "CREDIT_CARD", t[t.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", t[t.LOANS = 14] = "LOANS", t))(R || {});
24
+ export {
25
+ h as G,
26
+ R as M,
27
+ r as T,
28
+ _ as a
29
+ };