@mx-cartographer/experiences 4.2.0-alpha.sms3 → 4.2.0-alpha.sms5
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 +59 -61
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { eachWeekOfInterval as $o } from "date-fns/eachWeekOfInterval";
|
|
|
41
41
|
import { endOfMonth as Re } from "date-fns/endOfMonth";
|
|
42
42
|
import { format as Ve } from "date-fns/format";
|
|
43
43
|
import { isSameMonth as es } from "date-fns/isSameMonth";
|
|
44
|
-
import { startOfMonth as
|
|
44
|
+
import { startOfMonth as De } from "date-fns/startOfMonth";
|
|
45
45
|
import { subMonths as bA } from "date-fns/subMonths";
|
|
46
46
|
import gA from "@mui/material/Paper";
|
|
47
47
|
import As from "@mui/icons-material/KeyboardArrowLeftRounded";
|
|
@@ -80,7 +80,7 @@ import vA from "@mui/material/Avatar";
|
|
|
80
80
|
import be from "@mui/material/ListItemAvatar";
|
|
81
81
|
import nA from "@mui/material/ListItemIcon";
|
|
82
82
|
import { ChevronRight as wA, Payments as xs, NoteStack as Os, Person as _s, CheckCircle as Ns, Icon as Ya, ExpandLess as Ps, ExpandMore as Ms, AccountBalance as Rs, AddBox as di } from "@mxenabled/mx-icons";
|
|
83
|
-
import { makeAutoObservable as
|
|
83
|
+
import { makeAutoObservable as xe, runInAction as Y, reaction as oa, autorun as Hs, observable as Bs } from "mobx";
|
|
84
84
|
import { differenceInDays as zs } from "date-fns/differenceInDays";
|
|
85
85
|
import Cn from "@mui/icons-material/ChevronRight";
|
|
86
86
|
import sa from "@mui/icons-material/ExpandMore";
|
|
@@ -1741,7 +1741,7 @@ const dl = ({
|
|
|
1741
1741
|
h(A), p(n), A && d(A);
|
|
1742
1742
|
}, [A, n]);
|
|
1743
1743
|
const f = g.useMemo(() => {
|
|
1744
|
-
const w = $o({ start:
|
|
1744
|
+
const w = $o({ start: De(c), end: Re(c) }), D = [];
|
|
1745
1745
|
for (let _ = 0; _ < w.length; _++) {
|
|
1746
1746
|
const O = w[_], x = Zo({ start: O, end: OA(O, 6) }), z = [];
|
|
1747
1747
|
for (let K = 0; K < x.length; K++)
|
|
@@ -2655,7 +2655,7 @@ const dl = ({
|
|
|
2655
2655
|
calendarActions: e,
|
|
2656
2656
|
color: A = "primary",
|
|
2657
2657
|
copy: n,
|
|
2658
|
-
range: a = [
|
|
2658
|
+
range: a = [De(ie()), Re(ot())],
|
|
2659
2659
|
shouldShrinkToIcon: r = !0,
|
|
2660
2660
|
toolTipContent: i = "",
|
|
2661
2661
|
variant: o = "outlined"
|
|
@@ -3677,7 +3677,7 @@ class Kl {
|
|
|
3677
3677
|
api = new cn("/", "");
|
|
3678
3678
|
isInitialized = !1;
|
|
3679
3679
|
constructor() {
|
|
3680
|
-
|
|
3680
|
+
xe(this);
|
|
3681
3681
|
}
|
|
3682
3682
|
initialize = async (A, n) => {
|
|
3683
3683
|
this.api = new cn(A, n), await this.getCopy(this.featureNamespace), Y(() => {
|
|
@@ -3706,7 +3706,7 @@ class ql {
|
|
|
3706
3706
|
appData = {};
|
|
3707
3707
|
api = new Cr("/", "");
|
|
3708
3708
|
constructor() {
|
|
3709
|
-
|
|
3709
|
+
xe(this);
|
|
3710
3710
|
}
|
|
3711
3711
|
initialize = async (A, n) => {
|
|
3712
3712
|
this.api = new Cr(A, n), await this.loadAppData();
|
|
@@ -3734,7 +3734,7 @@ class kl {
|
|
|
3734
3734
|
beats = [];
|
|
3735
3735
|
api = new Et("/", "");
|
|
3736
3736
|
constructor() {
|
|
3737
|
-
|
|
3737
|
+
xe(this);
|
|
3738
3738
|
}
|
|
3739
3739
|
initialize = async (A, n) => {
|
|
3740
3740
|
this.api = new Et(A, n), await this.loadBeats();
|
|
@@ -3825,13 +3825,13 @@ class jl {
|
|
|
3825
3825
|
categoryApi = new sn("/", "");
|
|
3826
3826
|
globalStore;
|
|
3827
3827
|
alert = "";
|
|
3828
|
-
dateRange = { start:
|
|
3828
|
+
dateRange = { start: De(ie()), end: Re(ie()) };
|
|
3829
3829
|
budgets = [];
|
|
3830
3830
|
selectedBudget;
|
|
3831
3831
|
selectedSubBudget;
|
|
3832
3832
|
theme = {};
|
|
3833
3833
|
constructor(A) {
|
|
3834
|
-
this.globalStore = A,
|
|
3834
|
+
this.globalStore = A, xe(this);
|
|
3835
3835
|
}
|
|
3836
3836
|
initialize = async (A, n) => {
|
|
3837
3837
|
this.api = new fr(A, n), this.categoryApi = new sn(A, n), oa(
|
|
@@ -4537,7 +4537,7 @@ const Vl = [
|
|
|
4537
4537
|
}, td = (e, A, n) => {
|
|
4538
4538
|
const {
|
|
4539
4539
|
accounts: a = [],
|
|
4540
|
-
dateRange: r = { start:
|
|
4540
|
+
dateRange: r = { start: De(ie()), end: ot() },
|
|
4541
4541
|
custom: i = () => !0,
|
|
4542
4542
|
searchTerm: o = ""
|
|
4543
4543
|
} = e;
|
|
@@ -4590,7 +4590,7 @@ const Fi = {
|
|
|
4590
4590
|
tags: []
|
|
4591
4591
|
};
|
|
4592
4592
|
let sd = class {
|
|
4593
|
-
beginDate =
|
|
4593
|
+
beginDate = De(/* @__PURE__ */ new Date());
|
|
4594
4594
|
endDate = Re(/* @__PURE__ */ new Date());
|
|
4595
4595
|
expandedSplits = [];
|
|
4596
4596
|
isInitialized = !1;
|
|
@@ -4603,7 +4603,7 @@ let sd = class {
|
|
|
4603
4603
|
isAmountValid = !1;
|
|
4604
4604
|
showInsights = !1;
|
|
4605
4605
|
constructor() {
|
|
4606
|
-
|
|
4606
|
+
xe(this);
|
|
4607
4607
|
}
|
|
4608
4608
|
setDateRange = (A, n) => {
|
|
4609
4609
|
this.beginDate = A, this.endDate = n;
|
|
@@ -4660,18 +4660,17 @@ class cd {
|
|
|
4660
4660
|
tags: r = [],
|
|
4661
4661
|
transactionRules: i = [],
|
|
4662
4662
|
transactions: o = [],
|
|
4663
|
-
|
|
4664
|
-
updateExternallyManagedTransactions: c
|
|
4663
|
+
updateExternallyManagedTransactions: s
|
|
4665
4664
|
} = n;
|
|
4666
|
-
this.taggings = a, this.tags = r, this.transactionRules = i, this.transactions = o, this.
|
|
4665
|
+
this.taggings = a, this.tags = r, this.transactionRules = i, this.transactions = o, this.updateExternallyManagedTransactions = s, this.setIsLoading(!1), this.shouldManageDataExternally = !0;
|
|
4667
4666
|
}
|
|
4668
|
-
this.globalStore = A, this.uiStore = new sd(),
|
|
4667
|
+
this.globalStore = A, this.uiStore = new sd(), xe(this);
|
|
4669
4668
|
}
|
|
4670
4669
|
initialize = async (A, n) => {
|
|
4671
|
-
this.api = new Er(A, n), this.beatApi = new Et(A, n), this.shouldManageDataExternally ? (this.uiStore.setIsInitialized(!0), Hs(() => {
|
|
4670
|
+
this.api = new Er(A, n), this.beatApi = new Et(A, n), this.shouldManageDataExternally ? (this.uiStore.setIsInitialized(!0), await this.loadAssociatedBeats(De(/* @__PURE__ */ new Date())), Hs(() => {
|
|
4672
4671
|
this.globalStore.isInitialized && (this.transactions = this.augmentTransactions(this.transactions));
|
|
4673
4672
|
})) : await Promise.all([
|
|
4674
|
-
this.loadAssociatedBeats(
|
|
4673
|
+
this.loadAssociatedBeats(De(/* @__PURE__ */ new Date())),
|
|
4675
4674
|
this.loadTags(),
|
|
4676
4675
|
this.loadTaggings(),
|
|
4677
4676
|
this.loadTransactionRules(),
|
|
@@ -5550,7 +5549,7 @@ const xd = ({
|
|
|
5550
5549
|
}, Dr = (e) => {
|
|
5551
5550
|
const A = [], n = ie();
|
|
5552
5551
|
for (let a = 0; a <= Ir; a++) {
|
|
5553
|
-
const r =
|
|
5552
|
+
const r = De(bA(n, Ir - a)), o = e.filter(
|
|
5554
5553
|
(s) => s.year_month === Number(Ve(r, "yyyyMM"))
|
|
5555
5554
|
).reduce((s, c) => s + c.total, 0);
|
|
5556
5555
|
A.push({
|
|
@@ -5572,7 +5571,7 @@ let Yd = class {
|
|
|
5572
5571
|
savedOnSelect;
|
|
5573
5572
|
// todo
|
|
5574
5573
|
constructor() {
|
|
5575
|
-
|
|
5574
|
+
xe(this);
|
|
5576
5575
|
}
|
|
5577
5576
|
setExpandedGuid = (A) => this.expandedGuid = A;
|
|
5578
5577
|
setSelectedGuid = (A) => this.selectedGuid = A;
|
|
@@ -5593,7 +5592,7 @@ class Vd {
|
|
|
5593
5592
|
monthlyCategoryTotals = [];
|
|
5594
5593
|
isLoadingCategoryTotals = !1;
|
|
5595
5594
|
constructor(A) {
|
|
5596
|
-
this.globalStore = A, this.uiStore = new Yd(),
|
|
5595
|
+
this.globalStore = A, this.uiStore = new Yd(), xe(this);
|
|
5597
5596
|
}
|
|
5598
5597
|
initialize = async (A, n) => {
|
|
5599
5598
|
this.api = new sn(A, n), await this.loadCategories();
|
|
@@ -5653,7 +5652,7 @@ class Vd {
|
|
|
5653
5652
|
}
|
|
5654
5653
|
};
|
|
5655
5654
|
loadMonthlyCategoryTotals = async (A = this.globalStore.accountStore.accounts, n, a) => {
|
|
5656
|
-
const r = Ce(
|
|
5655
|
+
const r = Ce(De(n ?? bA(/* @__PURE__ */ new Date(), 11))), i = Ce(Re(a ?? /* @__PURE__ */ new Date()));
|
|
5657
5656
|
try {
|
|
5658
5657
|
const o = await this.api.getMonthlyCategoryTotals(r, i, A);
|
|
5659
5658
|
Y(() => {
|
|
@@ -5671,7 +5670,7 @@ class Vd {
|
|
|
5671
5670
|
Ce(a),
|
|
5672
5671
|
A
|
|
5673
5672
|
), i = await this.api.getMonthlyCategoryTotals(
|
|
5674
|
-
Ce(
|
|
5673
|
+
Ce(De(bA(a, 11))),
|
|
5675
5674
|
Ce(Re(a)),
|
|
5676
5675
|
A
|
|
5677
5676
|
);
|
|
@@ -6942,7 +6941,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
6942
6941
|
g.useEffect(() => {
|
|
6943
6942
|
te(r);
|
|
6944
6943
|
}, [r]), g.useEffect(() => {
|
|
6945
|
-
const ze =
|
|
6944
|
+
const ze = De(ie()), ka = Re(ie());
|
|
6946
6945
|
V(ze, ka), E({
|
|
6947
6946
|
dateRange: { start: ze, end: ka },
|
|
6948
6947
|
accounts: G.map((zo) => zo.guid)
|
|
@@ -7827,7 +7826,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
7827
7826
|
};
|
|
7828
7827
|
}), s = a.filter(
|
|
7829
7828
|
(u) => ft(Le(u.expected_date), {
|
|
7830
|
-
start:
|
|
7829
|
+
start: De(ie()),
|
|
7831
7830
|
end: OA(ie(), 30)
|
|
7832
7831
|
})
|
|
7833
7832
|
).filter((u) => {
|
|
@@ -7877,7 +7876,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
7877
7876
|
recurrenceDay: A.recurrence_day,
|
|
7878
7877
|
scheduledPaymentGuid: A.guid,
|
|
7879
7878
|
transactionGuid: ""
|
|
7880
|
-
}, c = A.recurrence_day, d = ie(), u =
|
|
7879
|
+
}, c = A.recurrence_day, d = ie(), u = De(ie()), h = OA(ie(), 30);
|
|
7881
7880
|
let m = u;
|
|
7882
7881
|
switch (A.recurrence_type) {
|
|
7883
7882
|
case X.EveryWeek:
|
|
@@ -8024,16 +8023,16 @@ const Qi = ({ transaction: e }) => {
|
|
|
8024
8023
|
e === 1 && /* @__PURE__ */ t(Pa, {})
|
|
8025
8024
|
] });
|
|
8026
8025
|
}, io = T(Zu), _t = (e, A) => e + A.amount, zn = (e) => e.activityType === Ne.Income && ft(e.expectedDate, {
|
|
8027
|
-
start:
|
|
8026
|
+
start: De(ie()),
|
|
8028
8027
|
end: Re(ie())
|
|
8029
8028
|
}), en = (e) => e.activityType === Ne.Expense && ft(e.expectedDate, {
|
|
8030
|
-
start:
|
|
8029
|
+
start: De(ie()),
|
|
8031
8030
|
end: Re(ie())
|
|
8032
8031
|
}), Kn = (e) => e.occurredOnDate && ft(e.occurredOnDate, {
|
|
8033
|
-
start:
|
|
8032
|
+
start: De(/* @__PURE__ */ new Date()),
|
|
8034
8033
|
end: OA(ie(), 30)
|
|
8035
8034
|
}) || ft(e.expectedDate, {
|
|
8036
|
-
start:
|
|
8035
|
+
start: De(/* @__PURE__ */ new Date()),
|
|
8037
8036
|
end: OA(ie(), 30)
|
|
8038
8037
|
}), $u = ({ day: e, outsideCurrentMonth: A, ...n }) => {
|
|
8039
8038
|
const { recurring: a } = L(), { selectedAccountGuids: r } = ye(), { activities: i, setSelectedDay: o } = ke(), c = g.useMemo(
|
|
@@ -8119,7 +8118,7 @@ const Qi = ({ transaction: e }) => {
|
|
|
8119
8118
|
ha,
|
|
8120
8119
|
{
|
|
8121
8120
|
maxDate: Re(oA(/* @__PURE__ */ new Date(), 1)),
|
|
8122
|
-
minDate:
|
|
8121
|
+
minDate: De(/* @__PURE__ */ new Date()),
|
|
8123
8122
|
onMonthChange: i,
|
|
8124
8123
|
showDaysOutsideCurrentMonth: !0,
|
|
8125
8124
|
slots: {
|
|
@@ -8453,7 +8452,7 @@ class hh {
|
|
|
8453
8452
|
selectedDay;
|
|
8454
8453
|
isLoading = !0;
|
|
8455
8454
|
constructor(A) {
|
|
8456
|
-
this.globalStore = A,
|
|
8455
|
+
this.globalStore = A, xe(this);
|
|
8457
8456
|
}
|
|
8458
8457
|
initialize = async (A, n) => {
|
|
8459
8458
|
this.api = new or(A, n), this.cashflowApi = new Br(A, n), this.loadActivity();
|
|
@@ -8566,7 +8565,7 @@ class hh {
|
|
|
8566
8565
|
loadExpectedEvents = async () => {
|
|
8567
8566
|
try {
|
|
8568
8567
|
const A = await this.cashflowApi.getProjectedCashflowEvents(
|
|
8569
|
-
|
|
8568
|
+
De(ie()),
|
|
8570
8569
|
OA(ie(), 30)
|
|
8571
8570
|
);
|
|
8572
8571
|
Y(() => {
|
|
@@ -9442,7 +9441,7 @@ const wh = ({ activity: e }) => /* @__PURE__ */ l(Q, { children: [
|
|
|
9442
9441
|
), V = !!n.length, te = async () => {
|
|
9443
9442
|
O(2), c(
|
|
9444
9443
|
// Beginning of the month, 90 days before today
|
|
9445
|
-
|
|
9444
|
+
De(TA(ie(), 90)),
|
|
9446
9445
|
ie()
|
|
9447
9446
|
), u({ ...d, custom: Xt }), O(3);
|
|
9448
9447
|
}, ue = async () => {
|
|
@@ -9696,7 +9695,7 @@ let Fh = class {
|
|
|
9696
9695
|
upcomingExpenses = [];
|
|
9697
9696
|
selectedCashAccounts = [];
|
|
9698
9697
|
constructor() {
|
|
9699
|
-
|
|
9698
|
+
xe(this);
|
|
9700
9699
|
}
|
|
9701
9700
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
|
9702
9701
|
get daysUntilNextIncome() {
|
|
@@ -9721,7 +9720,7 @@ class Xh {
|
|
|
9721
9720
|
globalStore;
|
|
9722
9721
|
uiStore;
|
|
9723
9722
|
constructor(A) {
|
|
9724
|
-
this.globalStore = A, this.uiStore = new Fh(),
|
|
9723
|
+
this.globalStore = A, this.uiStore = new Fh(), xe(this);
|
|
9725
9724
|
}
|
|
9726
9725
|
completeOnboarding = async () => {
|
|
9727
9726
|
const A = {
|
|
@@ -9735,7 +9734,7 @@ class jh {
|
|
|
9735
9734
|
widgetApi = new cr("/", "");
|
|
9736
9735
|
globalStore;
|
|
9737
9736
|
constructor(A) {
|
|
9738
|
-
this.globalStore = A,
|
|
9737
|
+
this.globalStore = A, xe(this);
|
|
9739
9738
|
}
|
|
9740
9739
|
initialize = async (A, n) => {
|
|
9741
9740
|
this.widgetApi = new cr(A, n);
|
|
@@ -10182,7 +10181,7 @@ const tn = {
|
|
|
10182
10181
|
return ve().uiStore;
|
|
10183
10182
|
}, On = (e) => e.top_level_category_guid === b.INCOME || e.category_guid === b.INCOME, Jh = (e) => !On(e) && !lo(e), co = (e) => tr.includes(e.top_level_category_guid) || tr.includes(e.category_guid), lo = (e) => e.top_level_category_guid === b.TRANSFER || e.category_guid === b.TRANSFER, Zh = (e) => !On(e) && !co(e) && !lo(e), $h = (e) => e.filter((A) => A.category_guid === A.top_level_category_guid), Ra = (e, A) => {
|
|
10184
10183
|
const n = [];
|
|
10185
|
-
let a =
|
|
10184
|
+
let a = De(bA(/* @__PURE__ */ new Date(), 5));
|
|
10186
10185
|
const r = /* @__PURE__ */ new Date();
|
|
10187
10186
|
for (; Te(a, r); )
|
|
10188
10187
|
n.push({
|
|
@@ -10203,7 +10202,7 @@ const tn = {
|
|
|
10203
10202
|
const A = [], n = e.filter(
|
|
10204
10203
|
(i) => i.top_level_category_guid !== b.INCOME && i.top_level_category_guid !== b.TRANSFER && i.total > 0
|
|
10205
10204
|
);
|
|
10206
|
-
let a =
|
|
10205
|
+
let a = De(bA(/* @__PURE__ */ new Date(), 5));
|
|
10207
10206
|
const r = Re(/* @__PURE__ */ new Date());
|
|
10208
10207
|
for (; Te(a, r); )
|
|
10209
10208
|
A.push({
|
|
@@ -11179,7 +11178,7 @@ class zg {
|
|
|
11179
11178
|
isLoading = !1;
|
|
11180
11179
|
selectedDebtChartData = {};
|
|
11181
11180
|
constructor() {
|
|
11182
|
-
|
|
11181
|
+
xe(this);
|
|
11183
11182
|
}
|
|
11184
11183
|
get showError() {
|
|
11185
11184
|
const { interest_rate: A, monthly_payment: n } = this.selectedDebtChartData;
|
|
@@ -11195,7 +11194,7 @@ class Kg {
|
|
|
11195
11194
|
globalStore;
|
|
11196
11195
|
uiStore;
|
|
11197
11196
|
constructor(A) {
|
|
11198
|
-
this.globalStore = A, this.uiStore = new zg(),
|
|
11197
|
+
this.globalStore = A, this.uiStore = new zg(), xe(this);
|
|
11199
11198
|
}
|
|
11200
11199
|
get debts() {
|
|
11201
11200
|
const { debtAccounts: A } = this.globalStore.accountStore, { debtGoals: n } = this.globalStore.goalStore;
|
|
@@ -11209,11 +11208,11 @@ class qg {
|
|
|
11209
11208
|
selectedAccountGuids = this.selectedAccounts.map((A) => A.guid);
|
|
11210
11209
|
displayedDate = /* @__PURE__ */ new Date();
|
|
11211
11210
|
displayedDateRange = {
|
|
11212
|
-
start:
|
|
11211
|
+
start: De(this.displayedDate),
|
|
11213
11212
|
end: Re(this.displayedDate)
|
|
11214
11213
|
};
|
|
11215
11214
|
constructor(A) {
|
|
11216
|
-
|
|
11215
|
+
xe(this), this.globalStore = A;
|
|
11217
11216
|
}
|
|
11218
11217
|
setInitialized = (A) => {
|
|
11219
11218
|
this.isInitialized = A;
|
|
@@ -12232,7 +12231,7 @@ class a1 {
|
|
|
12232
12231
|
selectedGoal = void 0;
|
|
12233
12232
|
monthlyCashFlowProfile = void 0;
|
|
12234
12233
|
constructor(A) {
|
|
12235
|
-
this.globalStore = A,
|
|
12234
|
+
this.globalStore = A, xe(this);
|
|
12236
12235
|
}
|
|
12237
12236
|
initialize = async (A, n) => {
|
|
12238
12237
|
this.api = new kr(A, n);
|
|
@@ -12630,7 +12629,7 @@ class s1 {
|
|
|
12630
12629
|
appConfig;
|
|
12631
12630
|
globalStore;
|
|
12632
12631
|
constructor(A) {
|
|
12633
|
-
this.globalStore = A,
|
|
12632
|
+
this.globalStore = A, xe(this);
|
|
12634
12633
|
}
|
|
12635
12634
|
loadAppConfig = (A) => this.appConfig = A;
|
|
12636
12635
|
get helpCategories() {
|
|
@@ -12716,7 +12715,7 @@ class u1 {
|
|
|
12716
12715
|
merchants = [];
|
|
12717
12716
|
isLoading = !1;
|
|
12718
12717
|
constructor() {
|
|
12719
|
-
|
|
12718
|
+
xe(this);
|
|
12720
12719
|
}
|
|
12721
12720
|
initialize = async (A, n) => {
|
|
12722
12721
|
this.api = new Fr(A, n);
|
|
@@ -12739,7 +12738,7 @@ const vo = 13, h1 = (e, A) => e.filter((n) => {
|
|
|
12739
12738
|
}), g1 = (e, A) => [...e, ...A], Xr = (e) => {
|
|
12740
12739
|
if (e && e.length > 0)
|
|
12741
12740
|
return e[e.length - 1];
|
|
12742
|
-
}, m1 = (e, A) => e.year_month - A.year_month, p1 = () => Array.from({ length: vo }, (e, A) => Math.floor(
|
|
12741
|
+
}, m1 = (e, A) => e.year_month - A.year_month, p1 = () => Array.from({ length: vo }, (e, A) => Math.floor(De(bA(/* @__PURE__ */ new Date(), A)).getTime() / 1e3)).sort(), C1 = (e, A, n) => !e.length || !A.length ? [] : p1().reduceRight((r, i) => {
|
|
12743
12742
|
const o = A.filter(
|
|
12744
12743
|
({ year_month: u }) => u === parseInt(Ve(Le(i), "yyyyMM"))
|
|
12745
12744
|
), s = e.map((u) => {
|
|
@@ -12819,7 +12818,7 @@ class y1 {
|
|
|
12819
12818
|
hoveredData;
|
|
12820
12819
|
selectedData;
|
|
12821
12820
|
constructor(A) {
|
|
12822
|
-
this.globalStore = A,
|
|
12821
|
+
this.globalStore = A, xe(this);
|
|
12823
12822
|
}
|
|
12824
12823
|
loadNetWorthData = async (A) => {
|
|
12825
12824
|
try {
|
|
@@ -13313,7 +13312,7 @@ class H1 {
|
|
|
13313
13312
|
notifications = [];
|
|
13314
13313
|
recentNotifications = [];
|
|
13315
13314
|
constructor() {
|
|
13316
|
-
|
|
13315
|
+
xe(this, { notifications: Bs });
|
|
13317
13316
|
}
|
|
13318
13317
|
initialize = async (A, n) => {
|
|
13319
13318
|
this.api = new ir(A, n), await this.loadNotifications();
|
|
@@ -13419,7 +13418,7 @@ class F1 {
|
|
|
13419
13418
|
globalStore;
|
|
13420
13419
|
api = new sr("/", "");
|
|
13421
13420
|
constructor(A) {
|
|
13422
|
-
this.globalStore = A,
|
|
13421
|
+
this.globalStore = A, xe(this);
|
|
13423
13422
|
}
|
|
13424
13423
|
initialize = async (A, n) => {
|
|
13425
13424
|
this.api = new sr(A, n);
|
|
@@ -13484,7 +13483,7 @@ class G8 {
|
|
|
13484
13483
|
accountStoreProps: A = void 0,
|
|
13485
13484
|
transactionStoreProps: n = void 0
|
|
13486
13485
|
}) {
|
|
13487
|
-
this.accountStore = new vm(this, A), this.appDataStore = new ql(), this.beatStore = new kl(), this.budgetsStore = new jl(this), this.cashflowStore = new Xh(this), this.categoryStore = new Vd(this), this.connectStore = new jh(this), this.copyStore = new Kl(), this.debtsStore = new Kg(this), this.goalStore = new a1(this), this.helpStore = new s1(this), this.merchantStore = new u1(), this.netWorthStore = new y1(this), this.notificationStore = new H1(), this.recurringActivityStore = new hh(this), this.transactionStore = new cd(this, n), this.userStore = new F1(this), this.globalUiStore = new qg(this),
|
|
13486
|
+
this.accountStore = new vm(this, A), this.appDataStore = new ql(), this.beatStore = new kl(), this.budgetsStore = new jl(this), this.cashflowStore = new Xh(this), this.categoryStore = new Vd(this), this.connectStore = new jh(this), this.copyStore = new Kl(), this.debtsStore = new Kg(this), this.goalStore = new a1(this), this.helpStore = new s1(this), this.merchantStore = new u1(), this.netWorthStore = new y1(this), this.notificationStore = new H1(), this.recurringActivityStore = new hh(this), this.transactionStore = new cd(this, n), this.userStore = new F1(this), this.globalUiStore = new qg(this), xe(this);
|
|
13488
13487
|
}
|
|
13489
13488
|
initialize = async (A, n, a = X1) => {
|
|
13490
13489
|
await this.copyStore.initialize(A, n), await this.appDataStore.initialize(A, n);
|
|
@@ -14800,7 +14799,7 @@ class fm {
|
|
|
14800
14799
|
selectedAccount = {};
|
|
14801
14800
|
selectedMember = {};
|
|
14802
14801
|
constructor() {
|
|
14803
|
-
|
|
14802
|
+
xe(this);
|
|
14804
14803
|
}
|
|
14805
14804
|
setIsLoading = (A) => this.isLoading = A;
|
|
14806
14805
|
setSelectedAccount = (A) => this.selectedAccount = A;
|
|
@@ -14827,15 +14826,14 @@ class vm {
|
|
|
14827
14826
|
const {
|
|
14828
14827
|
accounts: a = [],
|
|
14829
14828
|
institutions: r = [],
|
|
14830
|
-
// members = [],
|
|
14831
14829
|
updateExternallyManagedAccounts: i
|
|
14832
14830
|
} = n;
|
|
14833
14831
|
this.accounts = a, this.institutions = r, this.updateExternallyManagedAccounts = i, this.shouldManageDataExternally = !!a.length && !!r;
|
|
14834
14832
|
}
|
|
14835
|
-
this.globalStore = A, this.uiStore = new fm(),
|
|
14833
|
+
this.globalStore = A, this.uiStore = new fm(), xe(this);
|
|
14836
14834
|
}
|
|
14837
14835
|
initialize = async (A, n) => {
|
|
14838
|
-
this.api = new Qr(A, n), this.shouldManageDataExternally ? await this.loadMembers() : await Promise.all([this.loadAccounts(), this.loadInstitutions()]), oa(
|
|
14836
|
+
this.api = new Qr(A, n), this.shouldManageDataExternally ? await this.loadMembers() : await Promise.all([this.loadMembers(), this.loadAccounts(), this.loadInstitutions()]), oa(
|
|
14839
14837
|
() => this.accounts,
|
|
14840
14838
|
(a) => {
|
|
14841
14839
|
this.shouldManageDataExternally && (this.accounts = this.sortAccounts(this.augmentAccounts(a)), this.updateExternallyManagedAccounts?.(a));
|
|
@@ -15773,7 +15771,7 @@ const _m = ({
|
|
|
15773
15771
|
z(!0), a(F.BUDGETS_CLICK_ADD);
|
|
15774
15772
|
}, V = () => {
|
|
15775
15773
|
z(!1);
|
|
15776
|
-
}, te = yt(m.end,
|
|
15774
|
+
}, te = yt(m.end, De(/* @__PURE__ */ new Date()));
|
|
15777
15775
|
return !s || !_ ? /* @__PURE__ */ t(We, {}) : /* @__PURE__ */ l(
|
|
15778
15776
|
CA,
|
|
15779
15777
|
{
|
|
@@ -16729,7 +16727,7 @@ class lp {
|
|
|
16729
16727
|
namespace = "experiences";
|
|
16730
16728
|
translationKey = "micro_insights";
|
|
16731
16729
|
constructor() {
|
|
16732
|
-
|
|
16730
|
+
xe(this);
|
|
16733
16731
|
}
|
|
16734
16732
|
initialize = async (A, n) => {
|
|
16735
16733
|
this.copyApi = new cn(A, n), await this.loadCopy();
|
|
@@ -16904,7 +16902,7 @@ class gp {
|
|
|
16904
16902
|
onAnalyticPageView = ti;
|
|
16905
16903
|
beatApi = new Et("/", "");
|
|
16906
16904
|
constructor() {
|
|
16907
|
-
|
|
16905
|
+
xe(this);
|
|
16908
16906
|
}
|
|
16909
16907
|
initialize = async (A, n, a) => {
|
|
16910
16908
|
this.onAnalyticEvent = (r, i) => {
|
|
@@ -16929,7 +16927,7 @@ class mp {
|
|
|
16929
16927
|
token = "";
|
|
16930
16928
|
isInitialized = !1;
|
|
16931
16929
|
constructor() {
|
|
16932
|
-
this.copyStore = new lp(), this.insightsMicroWidgetStore = new gp(),
|
|
16930
|
+
this.copyStore = new lp(), this.insightsMicroWidgetStore = new gp(), xe(this);
|
|
16933
16931
|
}
|
|
16934
16932
|
initialize = async (A, n, a) => {
|
|
16935
16933
|
await this.copyStore.initialize(A, n), await this.insightsMicroWidgetStore.initialize(A, n, a), this.session = await Ic(A, n, "1.0.0", "Micro Insights Carousel"), Y(() => {
|
|
@@ -18689,7 +18687,7 @@ const Vt = g.createContext(null), pp = ({
|
|
|
18689
18687
|
g.useEffect(() => {
|
|
18690
18688
|
o(
|
|
18691
18689
|
n,
|
|
18692
|
-
|
|
18690
|
+
De(/* @__PURE__ */ new Date()),
|
|
18693
18691
|
Re(/* @__PURE__ */ new Date())
|
|
18694
18692
|
).finally();
|
|
18695
18693
|
}, [n]);
|
|
@@ -19032,7 +19030,7 @@ const Vt = g.createContext(null), pp = ({
|
|
|
19032
19030
|
g.useEffect(() => {
|
|
19033
19031
|
o(n);
|
|
19034
19032
|
}, [n]), g.useEffect(() => {
|
|
19035
|
-
i(
|
|
19033
|
+
i(De(ie()), Re(ie())), d(!0), s(F.SPENDING_VIEW);
|
|
19036
19034
|
}, []);
|
|
19037
19035
|
const u = (h) => {
|
|
19038
19036
|
i(h[0], h[1]);
|