@mx-cartographer/experiences 5.3.1-alpha.mega21 → 5.3.1-alpha.mega22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -38,7 +38,7 @@ import { css as He, keyframes as va } from "@mxenabled/cssinjs";
38
38
  import { addDays as We } from "date-fns/addDays";
39
39
  import { eachDayOfInterval as Ra } from "date-fns/eachDayOfInterval";
40
40
  import { eachWeekOfInterval as ua } from "date-fns/eachWeekOfInterval";
41
- import { endOfMonth as BA } from "date-fns/endOfMonth";
41
+ import { endOfMonth as SA } from "date-fns/endOfMonth";
42
42
  import { format as le } from "date-fns/format";
43
43
  import { isSameMonth as Pa } from "date-fns/isSameMonth";
44
44
  import { startOfMonth as QA } from "date-fns/startOfMonth";
@@ -1791,7 +1791,7 @@ const Cc = ({
1791
1791
  E(t), v(i), t && d(t);
1792
1792
  }, [t, i]);
1793
1793
  const u = h.useMemo(() => {
1794
- const x = ua({ start: QA(c), end: BA(c) }), w = [];
1794
+ const x = ua({ start: QA(c), end: SA(c) }), w = [];
1795
1795
  for (let D = 0; D < x.length; D++) {
1796
1796
  const m = x[D], j = Ra({ start: m, end: We(m, 6) }), O = [];
1797
1797
  for (let T = 0; T < j.length; T++)
@@ -2169,12 +2169,12 @@ const Cc = ({
2169
2169
  },
2170
2170
  children: A
2171
2171
  }
2172
- ), UA = (A = "useGlobalStore") => {
2172
+ ), FA = (A = "useGlobalStore") => {
2173
2173
  const t = h.useContext(gt);
2174
2174
  if (!t)
2175
2175
  throw new Error(`${A}() must be used within the GlobalDataContext`);
2176
2176
  return t;
2177
- }, CA = () => UA("useAccountStore").globalStore.accountStore, tI = () => UA("useAppConfig").globalStore.appDataStore.appConfig, te = () => UA("useBudgetsStore").globalStore.budgetsStore, Tn = () => UA("useCashflowStore").globalStore.cashflowStore, qA = () => UA("useCategoryStore").globalStore.categoryStore, iI = () => UA("useConnectStore").globalStore.connectStore, Ni = () => UA("useDebtsStore").globalStore.debtsStore, oi = () => UA("useGlobalStore").globalStore, pA = () => UA("useGlobalUiStore").globalStore.globalUiStore, X = () => UA("globalCopyStore").globalStore.copyStore.copy, FA = () => UA("useGoalStore").globalStore.goalStore, Yn = () => UA("useHelpStore").globalStore.helpStore, Oc = () => UA("useMerchantStore").globalStore.merchantStore, Lc = () => UA("useNetWorthStore").globalStore.netWorthStore, nI = () => UA("useNotificationStore").globalStore.notificationStore, ZA = () => UA("useRecurringActivityStore").globalStore.recurringActivityStore, ge = () => UA("useSettingsStore").globalStore.settingsStore, PA = () => UA("useTransactionStore").globalStore.transactionStore, Ue = () => UA("useUserStore").globalStore.userStore, K = () => ({ onEvent: UA().onEvent }), PP = () => ({ onPageView: UA().onPageView }), Qc = (A = "useWidgetContainerContext") => {
2177
+ }, CA = () => FA("useAccountStore").globalStore.accountStore, tI = () => FA("useAppConfig").globalStore.appDataStore.appConfig, te = () => FA("useBudgetsStore").globalStore.budgetsStore, Tn = () => FA("useCashflowStore").globalStore.cashflowStore, qA = () => FA("useCategoryStore").globalStore.categoryStore, iI = () => FA("useConnectStore").globalStore.connectStore, Ni = () => FA("useDebtsStore").globalStore.debtsStore, oi = () => FA("useGlobalStore").globalStore, pA = () => FA("useGlobalUiStore").globalStore.globalUiStore, X = () => FA("globalCopyStore").globalStore.copyStore.copy, WA = () => FA("useGoalStore").globalStore.goalStore, Yn = () => FA("useHelpStore").globalStore.helpStore, Oc = () => FA("useMerchantStore").globalStore.merchantStore, Lc = () => FA("useNetWorthStore").globalStore.netWorthStore, nI = () => FA("useNotificationStore").globalStore.notificationStore, ZA = () => FA("useRecurringActivityStore").globalStore.recurringActivityStore, ge = () => FA("useSettingsStore").globalStore.settingsStore, PA = () => FA("useTransactionStore").globalStore.transactionStore, Ue = () => FA("useUserStore").globalStore.userStore, K = () => ({ onEvent: FA().onEvent }), PP = () => ({ onPageView: FA().onPageView }), Qc = (A = "useWidgetContainerContext") => {
2178
2178
  const t = h.useContext(AI);
2179
2179
  if (!t)
2180
2180
  throw new Error(`${A}() must be used within the WidgetContainerContext`);
@@ -2367,7 +2367,7 @@ const Cc = ({
2367
2367
  guid: J,
2368
2368
  top_level_guid: wA
2369
2369
  }))
2370
- ], WA = (J) => {
2370
+ ], kA = (J) => {
2371
2371
  const VA = J.startsWith("stacked-") ? r[parseInt(J.split("-")[1])] : o[parseInt(J.split("-")[1])];
2372
2372
  return {
2373
2373
  guid: VA?.category_guid,
@@ -2378,10 +2378,10 @@ const Cc = ({
2378
2378
  }, Ie = (J) => {
2379
2379
  n?.(J ?? "");
2380
2380
  }, bA = () => {
2381
- const J = WA(String(H)).guid;
2381
+ const J = kA(String(H)).guid;
2382
2382
  J && n?.(J);
2383
2383
  }, JA = (J) => {
2384
- const wA = String(J?.seriesId), VA = WA(wA).guid, Ze = cA.find((Vt) => Vt.id === wA), Ki = Ze && J?.dataIndex !== void 0, Zi = Ze && J?.dataIndex === void 0;
2384
+ const wA = String(J?.seriesId), VA = kA(wA).guid, Ze = cA.find((Vt) => Vt.id === wA), Ki = Ze && J?.dataIndex !== void 0, Zi = Ze && J?.dataIndex === void 0;
2385
2385
  if (Ki)
2386
2386
  u({
2387
2387
  hoveredSeriesId: wA,
@@ -2464,7 +2464,7 @@ const Cc = ({
2464
2464
  itemContent: (J) => w && H ? /* @__PURE__ */ e(
2465
2465
  Mc,
2466
2466
  {
2467
- categoryGuids: WA(H),
2467
+ categoryGuids: kA(H),
2468
2468
  xData: j,
2469
2469
  ...J
2470
2470
  }
@@ -2505,7 +2505,7 @@ const Cc = ({
2505
2505
  x && /* @__PURE__ */ e(
2506
2506
  Gc,
2507
2507
  {
2508
- categoryGuids: WA(H),
2508
+ categoryGuids: kA(H),
2509
2509
  chartContainerRef: f,
2510
2510
  cursorPosition: y,
2511
2511
  hoveredAreaData: P.map((J) => ({
@@ -2707,7 +2707,7 @@ const Cc = ({
2707
2707
  calendarActions: A,
2708
2708
  color: t = "primary",
2709
2709
  copy: i,
2710
- range: n = [QA(fA()), BA(zt())],
2710
+ range: n = [QA(fA()), SA(zt())],
2711
2711
  shouldShrinkToIcon: r = !0,
2712
2712
  toolTipContent: o = "",
2713
2713
  variant: I = "outlined"
@@ -2732,12 +2732,12 @@ const Cc = ({
2732
2732
  (I === "timeframebuttons" || I === "timeframetabs") && A.onRangeChanged(j());
2733
2733
  }, [w]);
2734
2734
  const j = () => {
2735
- const Y = BA(zt());
2736
- return [BA(Ne(Y, w)), Y];
2735
+ const Y = SA(zt());
2736
+ return [SA(Ne(Y, w)), Y];
2737
2737
  }, O = (Y) => {
2738
2738
  const iA = [...f], oA = f[0], sA = f[1], uA = Y === "previous";
2739
2739
  if (l === i.dateRangePickerCopy.dateRangeThisMonth)
2740
- iA[0] = uA ? Ne(oA, 1) : Re(oA, 1), iA[1] = BA(uA ? Ne(sA, 1) : Re(sA, 1));
2740
+ iA[0] = uA ? Ne(oA, 1) : Re(oA, 1), iA[1] = SA(uA ? Ne(sA, 1) : Re(sA, 1));
2741
2741
  else if (l === i.dateRangePickerCopy.dateRangeYTD || l === i.dateRangePickerCopy.dateRangeLastYear)
2742
2742
  iA[0] = uA ? dr(fr(oA), 1) : _t(fr(oA), 1), iA[1] = uA ? dr(cr(oA), 1) : _t(cr(oA), 1);
2743
2743
  else {
@@ -3234,26 +3234,26 @@ const pt = ({
3234
3234
  ),
3235
3235
  t?.map((uA) => {
3236
3236
  if (h.isValidElement(uA)) return uA;
3237
- const { iconName: cA, onClick: jA, label: WA } = uA;
3237
+ const { iconName: cA, onClick: jA, label: kA } = uA;
3238
3238
  return sA ? y ? /* @__PURE__ */ e(
3239
3239
  $,
3240
3240
  {
3241
3241
  onClick: jA,
3242
3242
  startIcon: /* @__PURE__ */ e(q, { name: cA }),
3243
3243
  sx: { my: 4 },
3244
- children: WA
3244
+ children: kA
3245
3245
  },
3246
3246
  cA
3247
- ) : /* @__PURE__ */ e(NA, { "aria-label": WA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA) : p || w ? /* @__PURE__ */ e(
3247
+ ) : /* @__PURE__ */ e(NA, { "aria-label": kA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA) : p || w ? /* @__PURE__ */ e(
3248
3248
  $,
3249
3249
  {
3250
3250
  onClick: jA,
3251
3251
  startIcon: /* @__PURE__ */ e(q, { name: cA }),
3252
3252
  sx: { my: 4 },
3253
- children: WA
3253
+ children: kA
3254
3254
  },
3255
3255
  cA
3256
- ) : /* @__PURE__ */ e(NA, { "aria-label": WA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA);
3256
+ ) : /* @__PURE__ */ e(NA, { "aria-label": kA, onClick: jA, children: /* @__PURE__ */ e(q, { name: cA }) }, cA);
3257
3257
  })
3258
3258
  ] }),
3259
3259
  sx: {
@@ -4067,7 +4067,7 @@ class rf {
4067
4067
  categoryApi = new Pi("/", "");
4068
4068
  globalStore;
4069
4069
  alert = "";
4070
- dateRange = { start: QA(fA()), end: BA(fA()) };
4070
+ dateRange = { start: QA(fA()), end: SA(fA()) };
4071
4071
  budgets = [];
4072
4072
  selectedBudget;
4073
4073
  selectedSubBudget;
@@ -4802,7 +4802,7 @@ const cf = [
4802
4802
  const i = A.toLowerCase().split(" "), n = t?.toString().toLowerCase() ?? "";
4803
4803
  return i.every((r) => n.indexOf(r) > -1);
4804
4804
  };
4805
- var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), SA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(SA || {}), uf = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(uf || {}), Pf = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Pf || {}), bf = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(bf || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), Pn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(Pn || {}), he = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(he || {}), LA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.InternationalTransaction = 23] = "InternationalTransaction", A))(LA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), Bn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Bn || {}), Hf = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Hf || {});
4805
+ var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), UA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(UA || {}), uf = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(uf || {}), Pf = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Pf || {}), bf = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(bf || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), Pn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(Pn || {}), he = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(he || {}), LA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.InternationalTransaction = 23] = "InternationalTransaction", A))(LA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), Bn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(Bn || {}), Hf = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(Hf || {});
4806
4806
  const cI = {
4807
4807
  account_guid: "",
4808
4808
  amount: 0,
@@ -4834,7 +4834,7 @@ const cI = {
4834
4834
  };
4835
4835
  let zf = class {
4836
4836
  beginDate = QA(/* @__PURE__ */ new Date());
4837
- endDate = BA(/* @__PURE__ */ new Date());
4837
+ endDate = SA(/* @__PURE__ */ new Date());
4838
4838
  expandedSplits = [];
4839
4839
  isInitialized = !1;
4840
4840
  height = 550;
@@ -5876,7 +5876,7 @@ class cd {
5876
5876
  }
5877
5877
  };
5878
5878
  loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, i, n) => {
5879
- const r = gA(QA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = gA(BA(n ?? /* @__PURE__ */ new Date()));
5879
+ const r = gA(QA(i ?? Ne(/* @__PURE__ */ new Date(), 11))), o = gA(SA(n ?? /* @__PURE__ */ new Date()));
5880
5880
  try {
5881
5881
  const I = await this.api.getMonthlyCategoryTotals(r, o, t);
5882
5882
  F(() => {
@@ -5895,7 +5895,7 @@ class cd {
5895
5895
  t
5896
5896
  ), o = await this.api.getMonthlyCategoryTotals(
5897
5897
  gA(QA(Ne(n, 11))),
5898
- gA(BA(n)),
5898
+ gA(SA(n)),
5899
5899
  t
5900
5900
  );
5901
5901
  F(() => {
@@ -7162,13 +7162,13 @@ const hI = ({ transaction: A }) => {
7162
7162
  selectedAccounts: Y,
7163
7163
  setDisplayedDate: iA,
7164
7164
  setSelectedAccounts: oA
7165
- } = pA(), [sA, uA] = h.useState(""), [cA, jA] = h.useState(""), [WA, fe] = h.useState(!1), [Ie, bA] = h.useState(!1), [JA, Ke] = h.useState(!1);
7165
+ } = pA(), [sA, uA] = h.useState(""), [cA, jA] = h.useState(""), [kA, fe] = h.useState(!1), [Ie, bA] = h.useState(!1), [JA, Ke] = h.useState(!1);
7166
7166
  h.useEffect(() => {
7167
7167
  oA(r);
7168
7168
  }, [r]), h.useEffect(() => {
7169
- const kA = QA(fA()), rr = BA(fA());
7170
- iA(kA, rr), P({
7171
- dateRange: { start: kA, end: rr },
7169
+ const BA = QA(fA()), rr = SA(fA());
7170
+ iA(BA, rr), P({
7171
+ dateRange: { start: BA, end: rr },
7172
7172
  accounts: Y.map(($i) => $i.guid),
7173
7173
  custom: ($i) => !$i.accountIsClosed
7174
7174
  }), Ke(!0), j(V.TRANSACTIONS_VIEW);
@@ -7176,21 +7176,22 @@ const hI = ({ transaction: A }) => {
7176
7176
  JA && (P({
7177
7177
  ...u,
7178
7178
  dateRange: { start: O.start, end: O.end },
7179
- accounts: tA
7179
+ accounts: tA,
7180
+ custom: (BA) => !BA.accountIsClosed
7180
7181
  }), H(O.start));
7181
7182
  }, [O, tA]), h.useEffect(() => {
7182
7183
  E(i);
7183
7184
  }, [i]);
7184
7185
  const Yt = h.useMemo(
7185
- () => r.filter((kA) => kA.is_manual),
7186
+ () => r.filter((BA) => BA.is_manual),
7186
7187
  [r]
7187
- ), J = cA ? y.find((kA) => kA.guid === cA) : void 0, wA = c && !!a.payee && !!a.account_guid && !!a.category_guid, VA = (kA) => {
7188
- iA(kA[0], kA[1]);
7189
- }, Ze = (kA) => {
7190
- f(kA), P({
7188
+ ), J = cA ? y.find((BA) => BA.guid === cA) : void 0, wA = c && !!a.payee && !!a.account_guid && !!a.category_guid, VA = (BA) => {
7189
+ iA(BA[0], BA[1]);
7190
+ }, Ze = (BA) => {
7191
+ f(BA), P({
7191
7192
  ...u,
7192
- searchTerm: kA
7193
- }), j(V.TRANSACTIONS_CLICK_SEARCH, { search_term: kA });
7193
+ searchTerm: BA
7194
+ }), j(V.TRANSACTIONS_CLICK_SEARCH, { search_term: BA });
7194
7195
  }, Ki = () => {
7195
7196
  fI(y, p), j(V.TRANSACTIONS_CLICK_EXPORT);
7196
7197
  }, Zi = () => {
@@ -7252,17 +7253,17 @@ const hI = ({ transaction: A }) => {
7252
7253
  Vf,
7253
7254
  {
7254
7255
  height: `calc(${t} - ${Fr}px)`,
7255
- onCategoryClick: (kA) => {
7256
- jA(kA), uA(
7256
+ onCategoryClick: (BA) => {
7257
+ jA(BA), uA(
7257
7258
  "category"
7258
7259
  /* Category */
7259
7260
  );
7260
7261
  },
7261
- onRowClick: (kA) => {
7262
- jA(kA), uA(
7262
+ onRowClick: (BA) => {
7263
+ jA(BA), uA(
7263
7264
  "transaction"
7264
7265
  /* Transaction */
7265
- ), j(V.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: kA });
7266
+ ), j(V.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: BA });
7266
7267
  }
7267
7268
  }
7268
7269
  )
@@ -7279,8 +7280,8 @@ const hI = ({ transaction: A }) => {
7279
7280
  Rt,
7280
7281
  {
7281
7282
  height: `calc(${t} - ${Fr}px)`,
7282
- onClick: (kA) => {
7283
- jA(kA), uA(
7283
+ onClick: (BA) => {
7284
+ jA(BA), uA(
7284
7285
  "transaction"
7285
7286
  /* Transaction */
7286
7287
  );
@@ -7327,7 +7328,7 @@ const hI = ({ transaction: A }) => {
7327
7328
  Nd,
7328
7329
  {
7329
7330
  copy: { title: D.add_manual_account },
7330
- isOpen: WA,
7331
+ isOpen: kA,
7331
7332
  onClose: () => {
7332
7333
  fe(!1);
7333
7334
  },
@@ -7498,7 +7499,7 @@ const hI = ({ transaction: A }) => {
7498
7499
  h.useEffect(() => {
7499
7500
  c({
7500
7501
  accounts: f,
7501
- dateRange: { start: Ve(fA(), 90), end: BA(fA()) }
7502
+ dateRange: { start: Ve(fA(), 90), end: SA(fA()) }
7502
7503
  });
7503
7504
  }, []), h.useEffect(() => {
7504
7505
  if (p && A.sequenceGuid) {
@@ -7632,17 +7633,17 @@ const hI = ({ transaction: A }) => {
7632
7633
  return n;
7633
7634
  }, Jd = (A, t) => {
7634
7635
  switch (A.activityStatus) {
7635
- case SA.Paid:
7636
+ case UA.Paid:
7636
7637
  return A.occurredOnDate ? z(
7637
7638
  t.paid_on,
7638
7639
  nA(A.occurredOnDate, AA.MONTH_DAY)
7639
7640
  ) : t.paid;
7640
- case SA.Missed:
7641
+ case UA.Missed:
7641
7642
  return z(
7642
7643
  t.missed_on,
7643
7644
  nA(A.expectedDate, AA.MONTH_DAY)
7644
7645
  );
7645
- case SA.Upcoming:
7646
+ case UA.Upcoming:
7646
7647
  return z(
7647
7648
  t.upcoming_on,
7648
7649
  nA(A.expectedDate, AA.MONTH_DAY)
@@ -7654,9 +7655,9 @@ const hI = ({ transaction: A }) => {
7654
7655
  if (A.activityType === TA.Income)
7655
7656
  return /* @__PURE__ */ e(kn, {});
7656
7657
  switch (A.activityStatus) {
7657
- case SA.Missed:
7658
+ case UA.Missed:
7658
7659
  return /* @__PURE__ */ e(Kn, {});
7659
- case SA.Paid:
7660
+ case UA.Paid:
7660
7661
  return /* @__PURE__ */ e(Zn, {});
7661
7662
  default:
7662
7663
  return /* @__PURE__ */ e(Wn, {});
@@ -7668,7 +7669,7 @@ const hI = ({ transaction: A }) => {
7668
7669
  },
7669
7670
  showOrdinal: n = !1
7670
7671
  }) => {
7671
- const { recurring: r } = X(), [o, I] = h.useState(""), a = A.activityType === TA.Income, c = A.activityStatus === SA.Paid, d = A.activityStatus === SA.Missed, f = A.activityStatus === SA.Upcoming;
7672
+ const { recurring: r } = X(), [o, I] = h.useState(""), a = A.activityType === TA.Income, c = A.activityStatus === UA.Paid, d = A.activityStatus === UA.Missed, f = A.activityStatus === UA.Upcoming;
7672
7673
  let E = r.paid?.toLowerCase();
7673
7674
  return d ? E = r.missed?.toLowerCase() : f && (E = Wr(n ? {
7674
7675
  copy: r,
@@ -8020,7 +8021,7 @@ const hI = ({ transaction: A }) => {
8020
8021
  }, pI = C(nE), rE = (A, t, i) => t.map((n) => {
8021
8022
  const r = i.find((I) => I.scheduled_payment_guid === n.guid), o = A.find((I) => I.guid === r?.account_guid);
8022
8023
  return {
8023
- activityStatus: SA.Upcoming,
8024
+ activityStatus: UA.Upcoming,
8024
8025
  activityType: TA.Expense,
8025
8026
  amount: n.amount,
8026
8027
  categoryGuid: r?.category_guid,
@@ -8059,7 +8060,7 @@ const hI = ({ transaction: A }) => {
8059
8060
  const E = r.find((u) => u.guid === f.cashflow_sequence_guid), l = o.find((u) => u.guid === f.transaction_guid), v = A.find((u) => u.guid === l?.account_guid);
8060
8061
  return {
8061
8062
  accountGuid: E?.account_guid || v?.guid,
8062
- activityStatus: SA.Paid,
8063
+ activityStatus: UA.Paid,
8063
8064
  activityType: TA.Income,
8064
8065
  amount: f.amount,
8065
8066
  categoryGuid: f.category_guid,
@@ -8090,7 +8091,7 @@ const hI = ({ transaction: A }) => {
8090
8091
  ), v = o.find((H) => H.guid === l?.transaction_guid), u = A.find((H) => H.guid === v?.account_guid);
8091
8092
  return {
8092
8093
  accountGuid: E?.account_guid || u?.guid,
8093
- activityStatus: SA.Upcoming,
8094
+ activityStatus: UA.Upcoming,
8094
8095
  activityType: TA.Income,
8095
8096
  amount: f.amount,
8096
8097
  categoryGuid: f.category_guid,
@@ -8113,7 +8114,7 @@ const hI = ({ transaction: A }) => {
8113
8114
  if (!r) return [];
8114
8115
  const o = A.find((v) => v.guid === r?.account_guid), I = Lo(t.occurs_on), a = {
8115
8116
  accountGuid: o?.guid,
8116
- activityStatus: SA.Upcoming,
8117
+ activityStatus: UA.Upcoming,
8117
8118
  activityType: TA.Expense,
8118
8119
  amount: t.amount,
8119
8120
  categoryGuid: r?.category_guid,
@@ -8209,13 +8210,13 @@ const hI = ({ transaction: A }) => {
8209
8210
  const u = i.find(
8210
8211
  (H) => H.scheduled_payment_guid === v.scheduledPaymentGuid && H.date > gA(Ve(v.expectedDate, 3)) && H.date < gA(We(v.expectedDate, 3))
8211
8212
  );
8212
- u ? (v.transactionGuid = u.guid, v.occurredOnDate = yA(u.date), v.activityStatus = SA.Paid) : mA(v.expectedDate, Ve(d, 3)) && (v.activityStatus = SA.Missed);
8213
+ u ? (v.transactionGuid = u.guid, v.occurredOnDate = yA(u.date), v.activityStatus = UA.Paid) : mA(v.expectedDate, Ve(d, 3)) && (v.activityStatus = UA.Missed);
8213
8214
  }), n;
8214
8215
  }, cE = (A, t, i, n, r) => n.map((o) => {
8215
8216
  const I = t.find((E) => E.cashflow_sequence_guid === o.guid), a = i.find((E) => E.cashflow_sequence_guid === o.guid), c = r.find((E) => E.guid === I?.transaction_guid), d = A.find((E) => E.guid === c?.account_guid);
8216
8217
  let f = /* @__PURE__ */ new Date();
8217
8218
  return I ? f = Zt(I.expected_date) : a && (f = Zt(a.expected_date)), {
8218
- activityStatus: SA.Upcoming,
8219
+ activityStatus: UA.Upcoming,
8219
8220
  activityType: TA.Income,
8220
8221
  amount: o.amount,
8221
8222
  categoryGuid: I?.category_guid,
@@ -8274,10 +8275,10 @@ const hI = ({ transaction: A }) => {
8274
8275
  ] });
8275
8276
  }, wI = C(dE), Ut = (A, t) => A + t.amount, en = (A) => A.activityType === TA.Income && mt(A.expectedDate, {
8276
8277
  start: QA(fA()),
8277
- end: BA(fA())
8278
+ end: SA(fA())
8278
8279
  }), di = (A) => A.activityType === TA.Expense && mt(A.expectedDate, {
8279
8280
  start: QA(fA()),
8280
- end: BA(fA())
8281
+ end: SA(fA())
8281
8282
  }), tn = (A) => A.occurredOnDate && mt(A.occurredOnDate, {
8282
8283
  start: QA(/* @__PURE__ */ new Date()),
8283
8284
  end: We(fA(), 30)
@@ -8291,11 +8292,11 @@ const hI = ({ transaction: A }) => {
8291
8292
  ).filter(
8292
8293
  (u) => Ee(u.occurredOnDate || u.expectedDate, A)
8293
8294
  ), d = c.some(
8294
- (u) => u.activityType === TA.Expense && u.activityStatus === SA.Upcoming
8295
+ (u) => u.activityType === TA.Expense && u.activityStatus === UA.Upcoming
8295
8296
  ), f = c.some(
8296
- (u) => u.activityType === TA.Expense && u.activityStatus === SA.Missed
8297
+ (u) => u.activityType === TA.Expense && u.activityStatus === UA.Missed
8297
8298
  ), E = c.some(
8298
- (u) => u.activityType === TA.Expense && u.activityStatus === SA.Paid
8299
+ (u) => u.activityType === TA.Expense && u.activityStatus === UA.Paid
8299
8300
  ), l = c.some((u) => u.activityType === TA.Income), v = (d ? 1 : 0) + (f ? 1 : 0) + (E ? 1 : 0) + (l ? 1 : 0);
8300
8301
  return /* @__PURE__ */ e(
8301
8302
  qo,
@@ -8367,7 +8368,7 @@ const hI = ({ transaction: A }) => {
8367
8368
  }, I = /* @__PURE__ */ e(
8368
8369
  mi,
8369
8370
  {
8370
- maxDate: BA(Re(/* @__PURE__ */ new Date(), 1)),
8371
+ maxDate: SA(Re(/* @__PURE__ */ new Date(), 1)),
8371
8372
  minDate: QA(/* @__PURE__ */ new Date()),
8372
8373
  onMonthChange: o,
8373
8374
  showDaysOutsideCurrentMonth: !0,
@@ -8718,13 +8719,13 @@ class wE {
8718
8719
  );
8719
8720
  }
8720
8721
  get paidActivities() {
8721
- return this.activities.filter((t) => t.activityStatus === SA.Paid);
8722
+ return this.activities.filter((t) => t.activityStatus === UA.Paid);
8722
8723
  }
8723
8724
  get upcomingActivities() {
8724
- return this.activities.filter((t) => t.activityStatus === SA.Upcoming);
8725
+ return this.activities.filter((t) => t.activityStatus === UA.Upcoming);
8725
8726
  }
8726
8727
  get missedActivities() {
8727
- return this.activities.filter((t) => t.activityStatus === SA.Missed);
8728
+ return this.activities.filter((t) => t.activityStatus === UA.Missed);
8728
8729
  }
8729
8730
  get upcomingExpenses() {
8730
8731
  return this.upcomingActivities.filter((t) => t.activityType === TA.Expense);
@@ -8831,7 +8832,7 @@ class wE {
8831
8832
  try {
8832
8833
  const t = await this.cashflowApi.getCashflowEventsByDateRange(
8833
8834
  Ve(fA(), 90),
8834
- BA(fA())
8835
+ SA(fA())
8835
8836
  );
8836
8837
  F(() => {
8837
8838
  this.cashflowEvents = t.filter(
@@ -9698,11 +9699,11 @@ const GE = ({ activity: A }) => /* @__PURE__ */ s(Z, { children: [
9698
9699
  if (!(j.length < 1)) {
9699
9700
  y(!0);
9700
9701
  for (let cA = 0; cA < j.length; cA++) {
9701
- const jA = j[cA], WA = HI(
9702
+ const jA = j[cA], kA = HI(
9702
9703
  jA,
9703
9704
  jA.frequency,
9704
9705
  jA.nextDate
9705
- ), fe = await t(WA);
9706
+ ), fe = await t(kA);
9706
9707
  if (fe) {
9707
9708
  const Ie = zI(fe, jA);
9708
9709
  await A(Ie);
@@ -9955,7 +9956,7 @@ let ih = class {
9955
9956
  // if there is no income activity
9956
9957
  get expensesTilNextIncome() {
9957
9958
  return this.upcomingExpenses.filter(
9958
- (t) => mA(t.expectedDate, this.nextIncome?.expectedDate || BA(/* @__PURE__ */ new Date()))
9959
+ (t) => mA(t.expectedDate, this.nextIncome?.expectedDate || SA(/* @__PURE__ */ new Date()))
9959
9960
  );
9960
9961
  }
9961
9962
  setNextIncome = (t) => {
@@ -10046,7 +10047,7 @@ const ke = () => {
10046
10047
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
10047
10048
  return Ni().uiStore;
10048
10049
  }, Ih = ({ debts: A, onClickCta: t, sx: i }) => {
10049
- const n = nt(), { isMobile: r } = zA(), { debts: o } = X(), { selectedDebtPriority: I } = ke(), { monthlyCashFlowProfile: a } = FA(), { payoffDate: c, payoffSavings: d, payoffDuration: f } = h.useMemo(() => {
10050
+ const n = nt(), { isMobile: r } = zA(), { debts: o } = X(), { selectedDebtPriority: I } = ke(), { monthlyCashFlowProfile: a } = WA(), { payoffDate: c, payoffSavings: d, payoffDuration: f } = h.useMemo(() => {
10050
10051
  const E = a?.extra_payment ?? 0;
10051
10052
  return oh(A, I, E);
10052
10053
  }, [A, I, a]);
@@ -10487,7 +10488,7 @@ const ke = () => {
10487
10488
  (o) => o.top_level_category_guid !== g.INCOME && o.top_level_category_guid !== g.TRANSFER && o.total > 0
10488
10489
  );
10489
10490
  let n = QA(Ne(/* @__PURE__ */ new Date(), 5));
10490
- const r = BA(/* @__PURE__ */ new Date());
10491
+ const r = SA(/* @__PURE__ */ new Date());
10491
10492
  for (; mA(n, r); )
10492
10493
  t.push({
10493
10494
  x: nA(n, AA.MONTH_SHORT),
@@ -10809,7 +10810,7 @@ const OI = ({
10809
10810
  ) })
10810
10811
  ] }) });
10811
10812
  }, Dh = C(xh), LI = C(({ goal: A }) => {
10812
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.interest_rate ?? 0), a = !A.guid, c = o < 0, d = async () => {
10813
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.interest_rate ?? 0), a = !A.guid, c = o < 0, d = async () => {
10813
10814
  const E = { ...A, interest_rate: o };
10814
10815
  A.interest_rate = o, a ? n(E) : (await r(E), i(t.alert_goal_updated_interest_rate));
10815
10816
  }, f = () => {
@@ -10842,7 +10843,7 @@ const OI = ({
10842
10843
  }
10843
10844
  );
10844
10845
  }), QI = C(({ goal: A }) => {
10845
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.monthly_payment ?? 0), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10846
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.monthly_payment ?? 0), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10846
10847
  const E = { ...A, monthly_payment: o };
10847
10848
  A.monthly_payment = o, a ? n(E) : (await r({ ...A, monthly_payment: o }), i(t.alert_goal_updated_payment));
10848
10849
  }, f = () => {
@@ -10876,7 +10877,7 @@ const OI = ({
10876
10877
  }
10877
10878
  );
10878
10879
  }), qI = C(({ goal: A }) => {
10879
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.initial_amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10880
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.initial_amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = async () => {
10880
10881
  const E = { ...A, initial_amount: o };
10881
10882
  A.initial_amount = o, a ? n(E) : (await r({ ...A, initial_amount: o }), i(t.alert_goal_updated_balance));
10882
10883
  }, f = () => {
@@ -11120,7 +11121,7 @@ const OI = ({
11120
11121
  }
11121
11122
  );
11122
11123
  }, Yh = C(() => {
11123
- const { debts: A } = X(), { monthlyCashFlowProfile: t, updateMonthlyCashFlowProfile: i } = FA(), { onEvent: n } = K(), [r, o] = h.useState(t?.extra_payment ?? 0), I = r < 0 || r > 9999999999e-2, a = async () => {
11124
+ const { debts: A } = X(), { monthlyCashFlowProfile: t, updateMonthlyCashFlowProfile: i } = WA(), { onEvent: n } = K(), [r, o] = h.useState(t?.extra_payment ?? 0), I = r < 0 || r > 9999999999e-2, a = async () => {
11124
11125
  t && (await i({ ...t, extra_payment: r }), t.extra_payment = r, n(V.DEBTS_SAVE_PAYDOWN_ACTION, {
11125
11126
  user_guid: t?.user_guid
11126
11127
  }));
@@ -11154,7 +11155,7 @@ const OI = ({
11154
11155
  }
11155
11156
  );
11156
11157
  }), Vh = () => {
11157
- const { debts: A } = X(), { totalMonthlyPayments: t } = Ni(), { monthlyCashFlowProfile: i } = FA(), n = t + Number(i?.extra_payment);
11158
+ const { debts: A } = X(), { totalMonthlyPayments: t } = Ni(), { monthlyCashFlowProfile: i } = WA(), n = t + Number(i?.extra_payment);
11158
11159
  return /* @__PURE__ */ s(b, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
11159
11160
  /* @__PURE__ */ s(b, { p: 24, children: [
11160
11161
  /* @__PURE__ */ s(b, { alignItems: "center", gap: 4, mb: 24, children: [
@@ -11529,7 +11530,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11529
11530
  c.priority = !c.is_paid_off && !c.is_impossible ? a++ : void 0;
11530
11531
  }), o;
11531
11532
  }, el = C(({ onClick: A }) => {
11532
- const { debts: t } = X(), { isDesktop: i } = zA(), { totalMonthlyPayments: n } = Ni(), { monthlyCashFlowProfile: r } = FA(), o = n + Number(r?.extra_payment), I = i ? t.paydown_button_long : t.paydown_button_short;
11533
+ const { debts: t } = X(), { isDesktop: i } = zA(), { totalMonthlyPayments: n } = Ni(), { monthlyCashFlowProfile: r } = WA(), o = n + Number(r?.extra_payment), I = i ? t.paydown_button_long : t.paydown_button_short;
11533
11534
  return /* @__PURE__ */ e(
11534
11535
  $,
11535
11536
  {
@@ -11543,7 +11544,7 @@ const we = (A) => /* @__PURE__ */ e(R, { fontWeight: 600, variant: "Small", chil
11543
11544
  }
11544
11545
  );
11545
11546
  }), tl = ({ onBackClick: A, sx: t }) => {
11546
- const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState(!1), [c, d] = h.useState(""), { isDesktop: f, isMobile: E } = zA(), { debts: l } = X(), { onEvent: v } = K(), { isInitialized: u, setSelectedAccounts: H } = pA(), { setSelectedAccount: P } = Xe(), { selectedDebtPriority: p, setSelectedDebtChartData: y } = ke(), { accounts: x } = CA(), { loadGoals: w, monthlyCashFlowProfile: D } = FA(), { debts: m } = Ni(), j = h.useMemo(() => {
11547
+ const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState(!1), [c, d] = h.useState(""), { isDesktop: f, isMobile: E } = zA(), { debts: l } = X(), { onEvent: v } = K(), { isInitialized: u, setSelectedAccounts: H } = pA(), { setSelectedAccount: P } = Xe(), { selectedDebtPriority: p, setSelectedDebtChartData: y } = ke(), { accounts: x } = CA(), { loadGoals: w, monthlyCashFlowProfile: D } = WA(), { debts: m } = Ni(), j = h.useMemo(() => {
11547
11548
  const oA = D?.extra_payment ?? 0;
11548
11549
  return Al(m, p, oA);
11549
11550
  }, [m, p, D]);
@@ -11689,7 +11690,7 @@ class Il {
11689
11690
  displayedDate = /* @__PURE__ */ new Date();
11690
11691
  displayedDateRange = {
11691
11692
  start: QA(this.displayedDate),
11692
- end: BA(this.displayedDate)
11693
+ end: SA(this.displayedDate)
11693
11694
  };
11694
11695
  constructor(t) {
11695
11696
  DA(this), this.globalStore = t;
@@ -11878,7 +11879,7 @@ const cl = (A, t) => {
11878
11879
  ] }) });
11879
11880
  }
11880
11881
  ), dl = C(({ trackType: A }) => {
11881
- const { goals: t } = X(), { setAlert: i, monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = FA(), o = h.useMemo(() => {
11882
+ const { goals: t } = X(), { setAlert: i, monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = WA(), o = h.useMemo(() => {
11882
11883
  let d = 0;
11883
11884
  return A === B.SAVINGS_TRACK ? d = n?.amount_allocated_for_savings_goals || 0 : A === B.DEBT_TRACK ? d = n?.amount_allocated_for_debt_goals || 0 : A === B.RETIREMENT_TRACK && (d = n?.amount_allocated_for_retirement_goals || 0), d;
11884
11885
  }, [n]), [I, a] = h.useState(o), c = async () => {
@@ -11911,7 +11912,7 @@ const cl = (A, t) => {
11911
11912
  }
11912
11913
  ) });
11913
11914
  }), El = ({ goals: A }) => {
11914
- const { goals: t, common: i } = X(), { reorderGoals: n, setAlert: r } = FA(), [o, I] = h.useState(!1), [a, c] = h.useState(A.map((v) => ({ ...v })));
11915
+ const { goals: t, common: i } = X(), { reorderGoals: n, setAlert: r } = WA(), [o, I] = h.useState(!1), [a, c] = h.useState(A.map((v) => ({ ...v })));
11915
11916
  h.useEffect(() => {
11916
11917
  o && c(A.map((v) => ({ ...v })));
11917
11918
  }, [o]);
@@ -12056,7 +12057,7 @@ const cl = (A, t) => {
12056
12057
  ] }) })
12057
12058
  ] }) }, A.guid);
12058
12059
  }, vl = ({ trackType: A }) => {
12059
- const { goals: t, common: i } = X(), { orderedGoals: n } = FA(), r = n.filter((v) => v.track_type === A), o = r.filter(
12060
+ const { goals: t, common: i } = X(), { orderedGoals: n } = WA(), r = n.filter((v) => v.track_type === A), o = r.filter(
12060
12061
  (v) => v.track_type === B.SAVINGS_TRACK && !v.has_been_spent || v.track_type !== B.SAVINGS_TRACK && !v.is_complete
12061
12062
  ), I = r.filter(
12062
12063
  (v) => v.track_type === B.SAVINGS_TRACK && v.has_been_spent || v.track_type !== B.SAVINGS_TRACK && v.is_complete
@@ -12111,7 +12112,7 @@ const cl = (A, t) => {
12111
12112
  )
12112
12113
  ] });
12113
12114
  }, rn = C(({ trackType: A, onAddGoals: t }) => {
12114
- const { isMobile: i } = zA(), { goals: n } = X(), { orderedGoals: r, setSelectedGoal: o } = FA(), I = r.filter((f) => f.track_type === A), a = I.filter(
12115
+ const { isMobile: i } = zA(), { goals: n } = X(), { orderedGoals: r, setSelectedGoal: o } = WA(), I = r.filter((f) => f.track_type === A), a = I.filter(
12115
12116
  (f) => f.track_type === B.SAVINGS_TRACK && !f.has_been_spent || f.track_type !== B.SAVINGS_TRACK && !f.is_complete
12116
12117
  ), c = I.filter(
12117
12118
  (f) => f.track_type === B.SAVINGS_TRACK && f.has_been_spent || f.track_type !== B.SAVINGS_TRACK && f.is_complete
@@ -12239,7 +12240,7 @@ const cl = (A, t) => {
12239
12240
  }
12240
12241
  );
12241
12242
  }, ul = ({ onClose: A }) => {
12242
- const { goals: t } = X(), { addGoal: i, debtGoals: n, setAlert: r, setSelectedGoal: o } = FA(), { debtAccounts: I } = CA(), [a, c] = h.useState(!1), d = sl(t), f = (l, v, u) => {
12243
+ const { goals: t } = X(), { addGoal: i, debtGoals: n, setAlert: r, setSelectedGoal: o } = WA(), { debtAccounts: I } = CA(), [a, c] = h.useState(!1), d = sl(t), f = (l, v, u) => {
12243
12244
  u === B.DEBT_TRACK ? c(!0) : o({
12244
12245
  amount: 0,
12245
12246
  current_amount: 0,
@@ -12308,7 +12309,7 @@ const cl = (A, t) => {
12308
12309
  ] }) })
12309
12310
  ] });
12310
12311
  }, Pl = C(({ goal: A }) => {
12311
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, f = async () => {
12312
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.amount), a = !A.guid, c = o < 0 || o > 9999999999e-2, d = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, f = async () => {
12312
12313
  const l = { ...A, amount: o };
12313
12314
  A.amount = o, a ? n(l) : (await r(l), i(t.alert_goal_updated_amount));
12314
12315
  }, E = () => {
@@ -12342,7 +12343,7 @@ const cl = (A, t) => {
12342
12343
  }
12343
12344
  );
12344
12345
  }), bl = ({ goal: A }) => {
12345
- const { checkingAccounts: t, savingsAccounts: i } = CA(), { accounts: n, goals: r } = X(), { setAlert: o, setSelectedGoal: I, updateGoal: a } = FA(), c = !A.guid && !A.account_guid, [d, f] = h.useState(!1), E = async (l) => {
12346
+ const { checkingAccounts: t, savingsAccounts: i } = CA(), { accounts: n, goals: r } = X(), { setAlert: o, setSelectedGoal: I, updateGoal: a } = WA(), c = !A.guid && !A.account_guid, [d, f] = h.useState(!1), E = async (l) => {
12346
12347
  const v = { ...A, account_guid: l };
12347
12348
  c ? I(v) : (await a(v), o(r.alert_account_changed)), f(!1);
12348
12349
  };
@@ -12413,7 +12414,7 @@ const cl = (A, t) => {
12413
12414
  ] }) })
12414
12415
  ] });
12415
12416
  }, Hl = C(({ goal: A }) => {
12416
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.name), a = !A.guid, c = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, d = async () => {
12417
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.name), a = !A.guid, c = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, d = async () => {
12417
12418
  const E = { ...A, name: o };
12418
12419
  A.name = o, a ? n(E) : (await r(E), i(t.alert_goal_updated_name));
12419
12420
  }, f = () => {
@@ -12444,7 +12445,7 @@ const cl = (A, t) => {
12444
12445
  }
12445
12446
  );
12446
12447
  }), zl = ({ goal: A }) => {
12447
- const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = FA(), [o, I] = h.useState(A.retirement_age || 65), a = !A.guid, c = async () => {
12448
+ const { goals: t } = X(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = WA(), [o, I] = h.useState(A.retirement_age || 65), a = !A.guid, c = async () => {
12448
12449
  if (!isNaN(o)) {
12449
12450
  const E = { ...A, retirement_age: o };
12450
12451
  A.retirement_age = o, a ? n(E) : (await r(E), i(t.alert_goal_updated_retirement_age));
@@ -12478,7 +12479,7 @@ const cl = (A, t) => {
12478
12479
  }
12479
12480
  );
12480
12481
  }, Cl = C(({ goal: A }) => {
12481
- const { goals: t } = X(), { user: i, updateUser: n } = Ue(), { setAlert: r } = FA(), [o, I] = h.useState(yA(i.birthday ?? 0)), [a, c] = h.useState(null), d = A.is_complete, f = async () => {
12482
+ const { goals: t } = X(), { user: i, updateUser: n } = Ue(), { setAlert: r } = WA(), [o, I] = h.useState(yA(i.birthday ?? 0)), [a, c] = h.useState(null), d = A.is_complete, f = async () => {
12482
12483
  o && Go(o) && (await n({ ...i, birthday: gA(o) }), r(t.alert_goal_updated_birthday));
12483
12484
  };
12484
12485
  return /* @__PURE__ */ e(
@@ -12510,7 +12511,7 @@ const cl = (A, t) => {
12510
12511
  retirementGoalAccounts: o,
12511
12512
  setAlert: I,
12512
12513
  setNewRetirementGoalAccounts: a
12513
- } = FA(), [c, d] = h.useState(!1), f = !A.guid, E = i.filter(
12514
+ } = WA(), [c, d] = h.useState(!1), f = !A.guid, E = i.filter(
12514
12515
  (u) => f ? r.find((H) => H.account_guid === u.guid) : o.find((H) => H.account_guid === u.guid)
12515
12516
  ), l = i.filter(
12516
12517
  (u) => !o.find((H) => H.account_guid === u.guid)
@@ -12604,7 +12605,7 @@ const cl = (A, t) => {
12604
12605
  setAlert: c,
12605
12606
  setSelectedGoal: d,
12606
12607
  updateGoal: f
12607
- } = FA(), { user: E } = Ue(), [l, v] = h.useState(!1), u = !a?.guid, H = a?.track_type === B.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, P = h.useMemo(() => a ? a.track_type === B.SAVINGS_TRACK ? !!a.name && !!a.amount : a.track_type === B.DEBT_TRACK ? !0 : a.track_type === B.RETIREMENT_TRACK ? !!a.name && !!a.amount && !!a.retirement_age && !!E.birthday : !0 : !1, [a]);
12608
+ } = WA(), { user: E } = Ue(), [l, v] = h.useState(!1), u = !a?.guid, H = a?.track_type === B.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, P = h.useMemo(() => a ? a.track_type === B.SAVINGS_TRACK ? !!a.name && !!a.amount : a.track_type === B.DEBT_TRACK ? !0 : a.track_type === B.RETIREMENT_TRACK ? !!a.name && !!a.amount && !!a.retirement_age && !!E.birthday : !0 : !1, [a]);
12608
12609
  let p = i.delete_button, y = () => v(!0);
12609
12610
  u ? (y = () => x(), p = i.save_button) : H && (y = () => D(), p = t.mark_as_complete_button);
12610
12611
  const x = async () => {
@@ -12681,7 +12682,7 @@ const cl = (A, t) => {
12681
12682
  ]
12682
12683
  }
12683
12684
  ), jP = C(({ onBackClick: A, sx: t }) => {
12684
- const { onEvent: i } = K(), { isMobile: n } = zA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: I } = pA(), { goals: a, common: c } = X(), { alert: d, goals: f, loadGoals: E, monthlyCashFlowProfile: l, setAlert: v, retirmentGoals: u } = FA(), [H, P] = h.useState(0), [p, y] = h.useState(!1), x = l?.amount_allocated_for_savings_goals || 0, w = l?.amount_allocated_for_debt_goals || 0, D = l?.amount_allocated_for_retirement_goals || 0, m = z(
12685
+ const { onEvent: i } = K(), { isMobile: n } = zA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: I } = pA(), { goals: a, common: c } = X(), { alert: d, goals: f, loadGoals: E, monthlyCashFlowProfile: l, setAlert: v, retirmentGoals: u } = WA(), [H, P] = h.useState(0), [p, y] = h.useState(!1), x = l?.amount_allocated_for_savings_goals || 0, w = l?.amount_allocated_for_debt_goals || 0, D = l?.amount_allocated_for_retirement_goals || 0, m = z(
12685
12686
  n ? a.tab_subtitle_mobile : a.tab_subtitle,
12686
12687
  M(x, "0,0")
12687
12688
  ), j = z(
@@ -13848,7 +13849,7 @@ const Sl = ({
13848
13849
  }, jA = async (Ie) => {
13849
13850
  const bA = Ie[0], JA = Ie[1];
13850
13851
  bA && JA && D(as(JA, bA));
13851
- }, WA = {
13852
+ }, kA = {
13852
13853
  chartData: l,
13853
13854
  hoveredData: d,
13854
13855
  onButtonClick: cA,
@@ -13882,8 +13883,8 @@ const Sl = ({
13882
13883
  direction: P ? "column" : "row",
13883
13884
  spacing: P ? 0 : 48,
13884
13885
  children: [
13885
- /* @__PURE__ */ e(Ul, { ...WA }),
13886
- /* @__PURE__ */ e(Kl, { ...WA })
13886
+ /* @__PURE__ */ e(Ul, { ...kA }),
13887
+ /* @__PURE__ */ e(Kl, { ...kA })
13887
13888
  ]
13888
13889
  }
13889
13890
  )
@@ -18797,13 +18798,11 @@ const In = ({
18797
18798
  (n) => n.member_guid === i.guid && i.successfully_aggregated_at && n.guid !== t.guid
18798
18799
  );
18799
18800
  }, IR = () => {
18800
- const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = X(), l = oR(), { onEvent: v } = K(), { setFilter: u } = PA(), H = async (p) => {
18801
- await f({
18801
+ const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [I, a] = h.useState({}), { selectedAccount: c } = Xe(), { mergeAccounts: d, updateAccount: f } = CA(), { accounts: E } = X(), l = oR(), { onEvent: v } = K(), { loadTransactions: u } = PA(), H = async (p) => {
18802
+ console.log(p), await f({
18802
18803
  ...c,
18803
18804
  ...p
18804
- }), u({
18805
- custom: (y) => !y.accountIsClosed
18806
- });
18805
+ }), await u();
18807
18806
  }, P = () => {
18808
18807
  d([c.guid, I.guid]).finally(
18809
18808
  () => n(!1)
@@ -22614,7 +22613,7 @@ const si = h.createContext(null), u3 = ({
22614
22613
  ref: l,
22615
22614
  children: [
22616
22615
  A.map((sA, uA) => {
22617
- const cA = uA + 1, jA = A.length + 1, WA = z(
22616
+ const cA = uA + 1, jA = A.length + 1, kA = z(
22618
22617
  x.card_position_in_carousel_aria,
22619
22618
  cA.toString(),
22620
22619
  jA.toString()
@@ -22622,7 +22621,7 @@ const si = h.createContext(null), u3 = ({
22622
22621
  return /* @__PURE__ */ e(
22623
22622
  x3,
22624
22623
  {
22625
- ariaLabel: `${WA}: ${bA}, ${JA}`,
22624
+ ariaLabel: `${kA}: ${bA}, ${JA}`,
22626
22625
  beat: sA,
22627
22626
  index: uA,
22628
22627
  isActiveCard: uA === iA,
@@ -23180,7 +23179,7 @@ const si = h.createContext(null), u3 = ({
23180
23179
  I(
23181
23180
  i,
23182
23181
  QA(/* @__PURE__ */ new Date()),
23183
- BA(/* @__PURE__ */ new Date())
23182
+ SA(/* @__PURE__ */ new Date())
23184
23183
  ).finally();
23185
23184
  }, [i]);
23186
23185
  const [a, c] = h.useState(""), [d, f] = h.useState(0), E = h.useMemo(
@@ -23522,7 +23521,7 @@ const si = h.createContext(null), u3 = ({
23522
23521
  h.useEffect(() => {
23523
23522
  I(i);
23524
23523
  }, [i]), h.useEffect(() => {
23525
- o(QA(fA()), BA(fA())), d(!0), a(V.SPENDING_VIEW);
23524
+ o(QA(fA()), SA(fA())), d(!0), a(V.SPENDING_VIEW);
23526
23525
  }, []);
23527
23526
  const f = (E) => {
23528
23527
  o(E[0], E[1]);
@@ -23713,8 +23712,8 @@ const i7 = (A) => A.reduce((i, n) => {
23713
23712
  view_transactions: "View Transactions"
23714
23713
  }, l7 = ({ onBackClick: A, sx: t }) => {
23715
23714
  const i = oe(), { onEvent: n } = K(), { isDesktop: r, isTablet: o, isMobile: I } = zA(), { accounts: a } = CA(), { loadMonthlyCategoryTotals: c, monthlyCategoryTotals: d, getCategoryName: f } = qA(), { sortedTransactions: E } = PA(), { isInitialized: l, selectedAccounts: v, setSelectedAccounts: u } = pA(), { trends: H } = X(), P = i.palette.mode === "dark", [p, y] = h.useState(!1), [x, w] = h.useState(!1), [D, m] = h.useState("Chart"), [j, O] = h.useState(""), [T, tA] = h.useState({
23716
- start: ur(BA(Ne(/* @__PURE__ */ new Date(), 6)), 1),
23717
- end: BA(/* @__PURE__ */ new Date())
23715
+ start: ur(SA(Ne(/* @__PURE__ */ new Date(), 6)), 1),
23716
+ end: SA(/* @__PURE__ */ new Date())
23718
23717
  });
23719
23718
  h.useEffect(() => {
23720
23719
  u(a);
@@ -23762,7 +23761,7 @@ const i7 = (A) => A.reduce((i, n) => {
23762
23761
  O(bA);
23763
23762
  }, jA = (bA) => {
23764
23763
  O(bA), n(V.TRENDS_CLICK_LEGEND, { category: f(bA) });
23765
- }, WA = (bA) => {
23764
+ }, kA = (bA) => {
23766
23765
  n(V.TRENDS_HOVER_LEGEND, { category: f(bA) });
23767
23766
  }, fe = (bA) => {
23768
23767
  n(V.TRENDS_HOVER_AREA, { category: bA });
@@ -23868,7 +23867,7 @@ const i7 = (A) => A.reduce((i, n) => {
23868
23867
  {
23869
23868
  onClickLegend: jA,
23870
23869
  onHoverArea: fe,
23871
- onHoverLegend: WA,
23870
+ onHoverLegend: kA,
23872
23871
  onHoverPoint: Ie,
23873
23872
  stackedDatasets: Y.stackedDatasets,
23874
23873
  unstackedDatasets: Y.unstackedDatasets
@@ -23948,7 +23947,7 @@ export {
23948
23947
  NP as AccountsMiniWidget,
23949
23948
  MP as AccountsWidget,
23950
23949
  wI as ActivitySettings,
23951
- SA as ActivityStatus,
23950
+ UA as ActivityStatus,
23952
23951
  TA as ActivityType,
23953
23952
  Nd as AddAccountModal,
23954
23953
  rc as AnalyticsApi,
@@ -24148,7 +24147,7 @@ export {
24148
24147
  X as useGlobalCopyStore,
24149
24148
  oi as useGlobalStore,
24150
24149
  pA as useGlobalUiStore,
24151
- FA as useGoalStore,
24150
+ WA as useGoalStore,
24152
24151
  Yn as useHelpStore,
24153
24152
  Oc as useMerchantStore,
24154
24153
  Lc as useNetWorthStore,