@mx-cartographer/experiences 9.7.197 → 9.7.199-alpha-moratorium

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 (86) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/core/types/Insights.d.ts +1 -1
  3. package/dist/core/types/Insights.es.js.map +1 -1
  4. package/dist/core/types/localization/InsightsFeedCopy.d.ts +6 -0
  5. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.es.js +4 -4
  6. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.es.js +4 -4
  7. package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.es.js +4 -4
  8. package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.es.js +8 -8
  9. package/dist/insights/components/shared/Charts/EmptyBarChart.es.js +4 -4
  10. package/dist/insights/components/shared/ZeroState/LinedCardZeroState.es.js +4 -4
  11. package/dist/insights/index.es.js +84 -84
  12. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
  13. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
  14. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
  15. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
  16. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
  18. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
  19. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +1 -0
  21. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +216 -185
  22. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  23. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +3 -1
  24. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +12 -11
  25. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
  26. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +2 -2
  27. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +13 -13
  28. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
  29. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +10 -4
  30. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +78 -71
  31. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
  32. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
  33. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
  34. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
  35. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +30 -24
  36. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
  37. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
  38. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
  39. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
  40. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
  41. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +10 -0
  42. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +17 -0
  43. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
  44. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +25 -25
  45. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
  46. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
  47. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
  48. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
  49. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
  50. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  51. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
  52. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
  53. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  54. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
  55. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
  56. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
  57. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
  58. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  59. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +5 -3
  60. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +11 -9
  61. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
  62. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +28 -27
  63. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
  64. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
  65. package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
  66. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  67. package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +26 -0
  68. package/dist/insights-v2/components/CompactDirectDepositCard.es.js +73 -0
  69. package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
  70. package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
  71. package/dist/insights-v2/components/DirectDepositCard.es.js +22 -20
  72. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
  73. package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
  74. package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
  75. package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
  76. package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
  77. package/dist/insights-v2/components/TransactionListCard.es.js +25 -25
  78. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
  79. package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
  80. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  81. package/dist/insights-v2/index.es.js +120 -116
  82. package/dist/insights-v2/mappings/blocks.es.js +118 -116
  83. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  84. package/dist/microinsights/cards/InsightCard.es.js +53 -53
  85. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  86. package/package.json +1 -1
@@ -1,18 +1,19 @@
1
- import { buildDynamicCopy as g } from "../../../core/utils/Localization.es.js";
2
- import { DATE_FORMATS_INTL as T, formatDate as y } from "../../../core/constants/DateFormats.es.js";
3
- import { TransactionStatus as F } from "../../../core/types/Transaction.es.js";
4
- import { fromUnixUTC as L } from "../../../core/utils/DateUtil.es.js";
5
- import { CURRENCY_FORMAT as x } from "../../../core/utils/NumberFormatting.es.js";
6
- import { getCategoryColor as V } from "../../../core/utils/CategoryUtil.es.js";
7
- import { buildDataSeries as H } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
8
- import { asGuidList as A, asNonEmptyText as c, asNumber as m } from "../../blocks/slotReaders.es.js";
1
+ import { CategoryGuids as w } from "../../../core/constants/Category.es.js";
2
+ import { buildDynamicCopy as d } from "../../../core/utils/Localization.es.js";
3
+ import { DATE_FORMATS_INTL as v, formatDate as T } from "../../../core/constants/DateFormats.es.js";
4
+ import { TransactionStatus as x } from "../../../core/types/Transaction.es.js";
5
+ import { fromUnixUTC as U } from "../../../core/utils/DateUtil.es.js";
6
+ import { CURRENCY_FORMAT as z } from "../../../core/utils/NumberFormatting.es.js";
7
+ import { getCategoryColor as W } from "../../../core/utils/CategoryUtil.es.js";
8
+ import { buildDataSeries as D } from "../../blocks/ChartBlocks/BarchartBlock/utils.es.js";
9
+ import { asGuidList as E, asNonEmptyText as _, asNumber as l } from "../../blocks/slotReaders.es.js";
9
10
  import { getLayoutConfig as O } from "../../blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js";
10
- import B from "../../components/LogoMark.es.js";
11
- import { calendarDateOf as z, toDrillDownSlotData as W } from "./utils.es.js";
12
- import { Icon as R } from "@mxenabled/mx-icons";
13
- import { jsx as i } from "react/jsx-runtime";
14
- import { endOfMonth as C, fromUnixTime as j, isValid as E, parseISO as h, startOfMonth as D } from "date-fns";
15
- var n = {
11
+ import H from "../../components/LogoMark.es.js";
12
+ import { calendarDateOf as j, toDrillDownSlotData as M } from "./utils.es.js";
13
+ import { Icon as P } from "@mxenabled/mx-icons";
14
+ import { jsx as c } from "react/jsx-runtime";
15
+ import { endOfMonth as I, fromUnixTime as q, isValid as L, parseISO as S, startOfMonth as R } from "date-fns";
16
+ var i = {
16
17
  TRANSACTION: "not_standard_amount",
17
18
  CATEGORY_SPEND: "category_spend",
18
19
  MONTHLY_SPEND: "monthly_spend_comparison",
@@ -28,176 +29,196 @@ var n = {
28
29
  SUBSCRIPTION_AGGREGATE: "monthly_subscription_aggregate",
29
30
  MERCHANT_BUDGET: "merchant_budget",
30
31
  TOP_MERCHANT: "top_merchant"
31
- }, G = (t) => t.insights_feed?.general?.transaction_history_title ?? "", d = (t, e) => e && V(e, t) || t.palette.primary.main, p = (t) => typeof t == "string" ? h(t) : new Date(t ?? NaN), v = (t) => ({
32
- start: D(p(t)),
33
- end: C(p(t))
34
- }), P = (t) => t?.length ? { accounts: t } : {}, K = ({ beat: t }) => {
32
+ }, k = (t) => t.insights_feed?.general?.transaction_history_title ?? "", B = { [w.GAS]: {
33
+ parent: w.AUTO_AND_TRANSPORT,
34
+ headingKey: "gas_month_heading",
35
+ tipKey: "gas_tip_message"
36
+ } }, u = (t, e) => e && W(e, t) || t.palette.primary.main, J = (t, e) => u(t, e && B[e]?.parent || e), h = (t) => typeof t == "string" ? S(t) : new Date(t ?? NaN), b = (t) => ({
37
+ start: R(h(t)),
38
+ end: I(h(t))
39
+ }), F = (t) => t?.length ? { accounts: t } : {}, Q = ({ beat: t }) => {
35
40
  const { account_guid: e, from_date: a, to_date: r } = t.insights_payload?.drilldown_data ?? {};
36
41
  return typeof e != "string" || typeof a != "number" || typeof r != "number" || !Number.isFinite(a) || !Number.isFinite(r) || r <= a ? {
37
42
  accounts: [],
38
43
  custom: () => !1
39
44
  } : {
40
45
  accounts: [e],
41
- custom: (o) => !o.is_hidden && o.feed_status !== F.PENDING,
46
+ custom: (o) => !o.is_hidden && o.feed_status !== x.PENDING,
42
47
  showSplits: !0,
43
48
  dateRange: {
44
- start: L(a),
45
- end: L(r - 1)
49
+ start: U(a),
50
+ end: U(r - 1)
46
51
  }
47
52
  };
48
- }, q = (t) => {
53
+ }, X = (t) => {
49
54
  const e = t?.drilldown_data ?? {};
50
55
  return {
51
- transaction_guids: A(e.transaction_guids),
52
- date: z(e.due_date),
53
- category_guid: c(e.category_guid),
54
- average_amount: m(e.average_amount),
55
- merchant_name: c(e.merchant_name)
56
+ transaction_guids: E(e.transaction_guids),
57
+ date: j(e.due_date),
58
+ category_guid: _(e.category_guid),
59
+ average_amount: l(e.average_amount),
60
+ merchant_name: _(e.merchant_name)
56
61
  };
57
- }, l = (t) => {
62
+ }, g = (t) => {
58
63
  const e = t;
59
64
  return Array.isArray(e?.names) && Array.isArray(e?.data) ? e : void 0;
60
- }, J = (t) => {
65
+ }, Z = (t) => {
61
66
  const e = t?.drilldown_data ?? {};
62
67
  return {
63
- account_guids: A(e.account_guids),
64
- data_series: l(e.data_series),
65
- average_amount: m(e.average_amount)
68
+ account_guids: E(e.account_guids),
69
+ data_series: g(e.data_series),
70
+ average_amount: l(e.average_amount)
66
71
  };
67
- }, Q = (t) => {
72
+ }, $ = (t) => {
68
73
  const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data, r = t?.instance_slot_data;
69
74
  return {
70
- data_series: l(e.data_series),
71
- average_amount: m(e.average_amount),
72
- merchant_guid: c(a?.merchant_guid) ?? c(r?.merchant_guid),
73
- merchant_name: c(a?.merchant_name) ?? c(r?.merchant_name)
75
+ data_series: g(e.data_series),
76
+ average_amount: l(e.average_amount),
77
+ merchant_guid: _(a?.merchant_guid) ?? _(r?.merchant_guid),
78
+ merchant_name: _(a?.merchant_name) ?? _(r?.merchant_name)
74
79
  };
75
- }, X = (t, e) => {
80
+ }, tt = (t, e) => {
76
81
  const a = e ?? {};
77
82
  return {
78
- data_series: l(a.data_series),
79
- average_amount: m(a.average_amount),
80
- category_guid: c(a.category_guid),
81
- described_month: c(a.described_month),
82
- merchant_guid: c(a.merchant_guid),
83
- merchant_name: c(a.merchant_name),
84
- rank: m(a.rank)
83
+ data_series: g(a.data_series),
84
+ average_amount: l(a.average_amount),
85
+ category_guid: _(a.category_guid),
86
+ described_month: _(a.described_month),
87
+ merchant_guid: _(a.merchant_guid),
88
+ merchant_name: _(a.merchant_name),
89
+ rank: l(a.rank)
85
90
  };
86
- }, k = ["income", "other"], Z = (t) => {
91
+ }, K = ["income", "other"], et = (t) => {
87
92
  const e = t?.drilldown_data ?? {}, a = t?.instance_slot?.data?.legends?.map(({ label: r }) => r);
88
93
  return {
89
- data_series: l(e.data_series),
90
- average_amount: m(e.average_amount),
91
- income_transaction_guids: A(e.income_transaction_guids),
92
- sub_tab_labels: a?.length === k.length ? a : void 0
94
+ data_series: g(e.data_series),
95
+ average_amount: l(e.average_amount),
96
+ income_transaction_guids: E(e.income_transaction_guids),
97
+ sub_tab_labels: a?.length === K.length ? a : void 0
93
98
  };
94
- }, $ = 2, Y = (t, e) => {
95
- const a = e ?? {}, r = l(a.series), o = Array.isArray(a.labels) ? a.labels.map(c) : [];
96
- return !r || o.length !== $ || !o.every((s) => !!s) ? {} : {
99
+ }, at = (t, e) => {
100
+ const a = e ?? {}, r = g(a.series);
101
+ if (!r) return M(t?.instance_slot?.data ?? {});
102
+ const o = D(r).map((s) => l(s.amount)).filter((s) => s !== void 0), n = o.length ? o.reduce((s, m) => s + m, 0) / o.length : void 0;
103
+ return M({
104
+ category_guid: _(a.category_guid),
105
+ series: r,
106
+ average_amount: l(a.average_amount) ?? n
107
+ });
108
+ }, rt = (t, e, a, r) => {
109
+ const o = r?.category_guid ? B[r.category_guid]?.tipKey : void 0, n = o ? e.transaction_history_block?.[o] : void 0;
110
+ if (n)
111
+ return {
112
+ message: d(n, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title })),
113
+ onDismiss: () => t(!0)
114
+ };
115
+ }, ot = 2, V = (t, e) => {
116
+ const a = e ?? {}, r = g(a.series), o = Array.isArray(a.labels) ? a.labels.map(_) : [];
117
+ return !r || o.length !== ot || !o.every((n) => !!n) ? {} : {
97
118
  data_series: r,
98
- legends: o.map((s) => ({
99
- label: s,
119
+ legends: o.map((n) => ({
120
+ label: n,
100
121
  value: 0
101
122
  }))
102
123
  };
103
- }, w = (t, e) => H(l(e?.series)).flatMap((a) => a.aggregated_guids ?? []), tt = (t, e) => {
124
+ }, A = (t, e) => D(g(e?.series)).flatMap((a) => a.aggregated_guids ?? []), nt = (t, e) => {
104
125
  const a = e.transaction_history_block?.monthly_debt_to_income_tip_message, r = e.transaction_history_block?.monthly_debt_to_income_tip_limit;
105
126
  if (!(!a || !r))
106
127
  return {
107
- message: g(a, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: r })),
128
+ message: d(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })),
108
129
  onDismiss: () => t(!0)
109
130
  };
110
- }, et = (t, e) => {
111
- const a = Y(t, e);
112
- return a.data_series ? a : W(t?.instance_slot?.data ?? {});
113
- }, at = (t, e) => {
131
+ }, st = (t, e) => {
132
+ const a = V(t, e);
133
+ return a.data_series ? a : M(t?.instance_slot?.data ?? {});
134
+ }, it = (t, e) => {
114
135
  const a = e.transaction_history_block?.savings_to_income_tip_message, r = e.transaction_history_block?.savings_to_income_tip_percentage;
115
136
  if (!(!a || !r))
116
- return { message: g(a, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: r })) };
117
- }, rt = (t) => H(l(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), ot = (t, e, a, r) => {
118
- const o = r?.merchant_name, s = r?.date;
119
- if (!o || !s) return;
120
- const _ = e.transaction_history_block?.upcoming_bill_tip_message;
121
- if (_)
122
- return { message: g(_, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), o, y(h(s), T.FULL_MONTH_DAY)) };
123
- }, M = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
124
- const r = e[a], o = r?.guid, s = t.find((_) => _.guid === o)?.has_been_split;
137
+ return { message: d(a, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: r })) };
138
+ }, ct = (t) => D(g(t.insights_payload?.drilldown_data?.data_series)).flatMap((e) => e.aggregated_guids ?? []), _t = (t, e, a, r) => {
139
+ const o = r?.merchant_name, n = r?.date;
140
+ if (!o || !n) return;
141
+ const s = e.transaction_history_block?.upcoming_bill_tip_message;
142
+ if (s)
143
+ return { message: d(s, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), o, T(S(n), v.FULL_MONTH_DAY)) };
144
+ }, C = ({ beatTransactions: t, dataSeries: e, selectedIndex: a }) => {
145
+ const r = e[a], o = r?.guid, n = t.find((s) => s.guid === o)?.has_been_split;
125
146
  return {
126
- custom: (_) => _.guid === o,
127
- dateRange: v(r?.date),
128
- showSplits: !s
147
+ custom: (s) => s.guid === o,
148
+ dateRange: b(r?.date),
149
+ showSplits: !n
129
150
  };
130
- }, st = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
151
+ }, dt = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
131
152
  const r = t[e], o = a.category_guid ?? r?.guid;
132
153
  return {
133
- custom: (s) => s.category_guid === o || s.top_level_category_guid === o,
134
- dateRange: v(r?.date)
154
+ custom: (n) => n.category_guid === o || n.top_level_category_guid === o,
155
+ dateRange: b(r?.date)
135
156
  };
136
- }, nt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
157
+ }, lt = ({ dataSeries: t, selectedIndex: e, spendCategoryGuids: a, instanceSlotData: r }) => {
137
158
  const o = t[e];
138
159
  return {
139
- custom: (s) => !!s.top_level_category_guid && a.includes(s.top_level_category_guid),
140
- dateRange: v(o?.date),
141
- ...P(r.account_guids)
160
+ custom: (n) => !!n.top_level_category_guid && a.includes(n.top_level_category_guid),
161
+ dateRange: b(o?.date),
162
+ ...F(r.account_guids)
142
163
  };
143
- }, U = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
144
- const r = a.merchant_guid, o = h(t[e]?.date ?? "");
145
- return !r || !E(o) ? {
164
+ }, Y = ({ dataSeries: t, selectedIndex: e, instanceSlotData: a }) => {
165
+ const r = a.merchant_guid, o = S(t[e]?.date ?? "");
166
+ return !r || !L(o) ? {
146
167
  accounts: [],
147
168
  custom: () => !1
148
169
  } : {
149
- custom: (s) => s.merchant_guid === r && !s.is_hidden,
170
+ custom: (n) => n.merchant_guid === r && !n.is_hidden,
150
171
  dateRange: {
151
- start: D(o),
152
- end: C(o)
172
+ start: R(o),
173
+ end: I(o)
153
174
  }
154
175
  };
155
- }, it = (t) => typeof t == "number" ? j(t) : h(t ?? ""), ct = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
156
- const s = e[a], { start: _, end: S } = v(s?.date), u = it(t.created_at), f = o.account_guids, I = {
157
- start: _,
158
- end: r && E(u) && u < S ? u : S
176
+ }, gt = (t) => typeof t == "number" ? q(t) : S(t ?? ""), mt = ({ beat: t, dataSeries: e, selectedIndex: a, isLastTab: r, instanceSlotData: o }) => {
177
+ const n = e[a], { start: s, end: m } = b(n?.date), p = gt(t.created_at), y = o.account_guids, G = {
178
+ start: s,
179
+ end: r && L(p) && p < m ? p : m
159
180
  };
160
- return f?.length ? {
161
- dateRange: I,
162
- accounts: f
181
+ return y?.length ? {
182
+ dateRange: G,
183
+ accounts: y
163
184
  } : {
164
- dateRange: I,
185
+ dateRange: G,
165
186
  accounts: [],
166
187
  custom: () => !1
167
188
  };
168
189
  }, N = (t, e, a) => {
169
- const r = new Set(t), o = h(e ?? "");
170
- return !r.size || !E(o) ? {
190
+ const r = new Set(t), o = S(e ?? "");
191
+ return !r.size || !L(o) ? {
171
192
  accounts: [],
172
193
  custom: () => !1
173
194
  } : {
174
- custom: (s) => r.has(s.guid),
195
+ custom: (n) => r.has(n.guid),
175
196
  dateRange: {
176
- start: D(o),
177
- end: C(o)
197
+ start: R(o),
198
+ end: I(o)
178
199
  },
179
- ...P(a)
200
+ ...F(a)
180
201
  };
181
- }, _t = ({ beat: t, dataSeries: e, selectedIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), b = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
202
+ }, ut = ({ beat: t, dataSeries: e, selectedIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), f = ({ beat: t, comparisonBars: e, selectedIndex: a, subIndex: r }) => {
182
203
  const o = e[a];
183
204
  return N(r === 1 ? o?.comparisonGuids : o?.mainGuids, o?.date, t.account_guids);
184
- }, lt = ({ beat: t, dataSeries: e, subIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), dt = (t) => {
185
- const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, s = e[a], _ = new Set(o.income_transaction_guids), S = k[r] === "income", u = o.sub_tab_labels ? s?.aggregated_guids?.filter((f) => _.has(f) === S) : s?.aggregated_guids;
186
- return N(u, s?.date);
187
- }, At = {
188
- [n.TRANSACTION]: {
189
- title: G,
205
+ }, pt = ({ beat: t, dataSeries: e, subIndex: a }) => N(e[a]?.aggregated_guids, e[a]?.date, t.account_guids), ht = (t) => {
206
+ const { dataSeries: e, selectedIndex: a, subIndex: r, instanceSlotData: o } = t, n = e[a], s = new Set(o.income_transaction_guids), m = K[r] === "income", p = o.sub_tab_labels ? n?.aggregated_guids?.filter((y) => s.has(y) === m) : n?.aggregated_guids;
207
+ return N(p, n?.date);
208
+ }, Rt = {
209
+ [i.TRANSACTION]: {
210
+ title: k,
190
211
  top: "singleBar",
191
212
  scope: "store",
192
213
  filterMode: "store",
193
- filterStrategy: M,
194
- colors: (t, e) => [d(t, e)],
214
+ filterStrategy: C,
215
+ colors: (t, e) => [u(t, e)],
195
216
  header: (t) => {
196
217
  const { title: e, subHeader: a } = t;
197
218
  return {
198
219
  heading: e,
199
220
  subHeadingText: a?.text || void 0,
200
- icon: /* @__PURE__ */ i(B, {
221
+ icon: /* @__PURE__ */ c(H, {
201
222
  logo: {
202
223
  ...a?.logo,
203
224
  merchant_name: a?.text ?? a?.logo?.merchant_name
@@ -207,111 +228,120 @@ var n = {
207
228
  };
208
229
  },
209
230
  tipSection: (t, e, a = "") => ({
210
- message: g(e.general.tip_section_message, /* @__PURE__ */ i("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ i("strong", { children: a })),
231
+ message: d(e.general.tip_section_message, /* @__PURE__ */ c("strong", { children: e.general.tip_section_title }), /* @__PURE__ */ c("strong", { children: a })),
211
232
  onDismiss: () => t(!0)
212
233
  })
213
234
  },
214
- [n.CATEGORY_SPEND]: {
235
+ [i.CATEGORY_SPEND]: {
215
236
  top: "singleBar",
216
- averageFormat: x.whole,
217
- filterStrategy: st,
237
+ averageFormat: z.whole,
238
+ slotData: at,
239
+ fetchMissingTransactions: A,
240
+ tipSection: rt,
241
+ filterStrategy: dt,
218
242
  scope: "store",
219
243
  filterMode: "store",
220
- colors: (t, e) => [d(t, e)],
221
- header: (t) => ({
222
- heading: t.categoryName,
223
- subHeadingText: t.selectedDate && y(p(t.selectedDate), T.MONTH_LONG) || "",
224
- icon: /* @__PURE__ */ i(R, {
225
- color: "primary",
226
- name: "calendar_month",
227
- size: 16
228
- })
229
- })
244
+ colors: (t, e) => [J(t, e)],
245
+ header: (t) => {
246
+ const e = t.selectedDate && T(h(t.selectedDate), v.MONTH_LONG) || "", a = t.slotData?.category_guid, r = a ? B[a]?.headingKey : void 0, o = r && t.copy?.transaction_history_block?.[r];
247
+ return o && e ? {
248
+ heading: d(o, e),
249
+ subHeadingText: ""
250
+ } : {
251
+ heading: t.categoryName,
252
+ subHeadingText: e,
253
+ icon: /* @__PURE__ */ c(P, {
254
+ color: "primary",
255
+ name: "calendar_month",
256
+ size: 16
257
+ })
258
+ };
259
+ }
230
260
  },
231
- [n.MONTHLY_SPEND]: {
261
+ [i.MONTHLY_SPEND]: {
232
262
  top: "singleBar",
233
- filterStrategy: nt,
263
+ filterStrategy: lt,
234
264
  scope: "store",
235
265
  filterMode: "store",
236
266
  colors: (t) => [t.palette.chart.chart2 ?? t.palette.primary.main]
237
267
  },
238
- [n.ACCOUNT_BALANCE]: {
268
+ [i.ACCOUNT_BALANCE]: {
239
269
  title: (t, e) => e?.insights_payload?.title || void 0,
240
270
  top: "singleBar",
241
- filterStrategy: ct,
242
- slotData: J,
271
+ filterStrategy: mt,
272
+ slotData: Z,
243
273
  scope: "store",
244
274
  filterMode: "store",
245
275
  colors: (t) => [t.palette.success.main]
246
276
  },
247
- [n.UPCOMING_BILL]: {
277
+ [i.UPCOMING_BILL]: {
248
278
  top: "upcomingBill",
249
- filterStrategy: M,
279
+ filterStrategy: C,
250
280
  scope: "beat",
251
281
  filterMode: "local",
252
- colors: (t, e) => [d(t, e)],
253
- slotData: q,
282
+ colors: (t, e) => [u(t, e)],
283
+ slotData: X,
254
284
  fetchMissingTransactions: (t) => t.insights_payload?.drilldown_data?.transaction_guids,
255
- tipSection: ot
285
+ tipSection: _t
256
286
  },
257
- [n.DEPOSIT_SUMMARY]: {
287
+ [i.DEPOSIT_SUMMARY]: {
258
288
  top: "singleBar",
259
- filterStrategy: dt,
289
+ filterStrategy: ht,
260
290
  scope: "store",
261
291
  filterMode: "store",
262
292
  colors: (t) => [t.palette.success.main],
263
- slotData: Z,
264
- fetchMissingTransactions: rt,
293
+ slotData: et,
294
+ fetchMissingTransactions: ct,
265
295
  subTabs: ({ instanceSlotData: t }) => t.sub_tab_labels ?? [],
266
296
  barLegendLabel: (t) => t.general.deposit,
267
297
  showMonthlyAmount: !1
268
298
  },
269
- [n.LOW_BALANCE]: {
299
+ [i.LOW_BALANCE]: {
270
300
  top: "list",
271
- filterStrategy: K,
301
+ filterStrategy: Q,
272
302
  scope: "store",
273
303
  filterMode: "store",
274
304
  colors: (t) => [t.palette.primary.main]
275
305
  },
276
- [n.SUBSCRIPTION_AGGREGATE]: {
306
+ [i.SUBSCRIPTION_AGGREGATE]: {
277
307
  top: "monthTabs",
278
- filterStrategy: _t,
308
+ filterStrategy: ut,
279
309
  scope: "store",
280
310
  filterMode: "store",
281
311
  colors: (t) => [t.palette.primary.main]
282
312
  },
283
- [n.MERCHANT_BUDGET]: {
313
+ [i.MERCHANT_BUDGET]: {
284
314
  top: "singleBar",
285
- filterStrategy: U,
286
- slotData: Q,
315
+ filterStrategy: Y,
316
+ slotData: $,
287
317
  scope: "store",
288
318
  filterMode: "store",
289
319
  colors: (t) => [t.palette.chart.chart1 ?? t.palette.primary.main],
290
320
  header: (t) => ({
291
321
  heading: t.slotData?.merchant_name ?? t.title,
292
- subHeadingText: t.selectedDate && y(p(t.selectedDate), T.MONTH_LONG) || "",
293
- icon: /* @__PURE__ */ i(R, {
322
+ subHeadingText: t.selectedDate && T(h(t.selectedDate), v.MONTH_LONG) || "",
323
+ icon: /* @__PURE__ */ c(P, {
294
324
  color: "primary",
295
325
  name: "calendar_month",
296
326
  size: 16
297
327
  })
298
328
  })
299
329
  },
300
- [n.TOP_MERCHANT]: {
330
+ [i.TOP_MERCHANT]: {
301
331
  top: "singleBar",
302
332
  showMonthTabs: !1,
303
333
  showTransactionsHeader: !1,
304
- filterStrategy: U,
305
- slotData: X,
334
+ filterStrategy: Y,
335
+ slotData: tt,
306
336
  scope: "store",
307
337
  filterMode: "store",
308
- colors: (t, e) => [d(t, e)],
338
+ colors: (t, e) => [u(t, e)],
309
339
  header: ({ copy: t, slotData: e, title: a }) => {
310
- const r = e?.merchant_name, o = t?.top_merchants, s = e?.described_month && y(p(e.described_month), T.MONTH_SHORT_YEAR) || "";
340
+ const r = e?.merchant_name, o = t?.top_merchants, n = e?.described_month && T(h(e.described_month), v.MONTH_SHORT_YEAR) || "";
311
341
  return {
312
- heading: r && o?.merchant_spending ? g(o.merchant_spending, r) : r ?? a,
313
- subHeadingText: e?.rank && o?.most_visited_merchant ? g(o.most_visited_merchant, String(e.rank), s) : s,
314
- logo: e?.merchant_guid ? /* @__PURE__ */ i(B, {
342
+ heading: r && o?.merchant_spending ? d(o.merchant_spending, r) : r ?? a,
343
+ subHeadingText: e?.rank && o?.most_visited_merchant ? d(o.most_visited_merchant, String(e.rank), n) : n,
344
+ logo: e?.merchant_guid ? /* @__PURE__ */ c(H, {
315
345
  logo: {
316
346
  category_guid: e.category_guid,
317
347
  merchant_guid: e.merchant_guid,
@@ -322,72 +352,73 @@ var n = {
322
352
  };
323
353
  }
324
354
  },
325
- [n.SPEND_TO_INCOME]: {
355
+ [i.SPEND_TO_INCOME]: {
326
356
  top: "doubleBar",
327
- filterStrategy: b,
357
+ filterStrategy: f,
328
358
  scope: "store",
329
359
  filterMode: "store",
330
360
  colors: (t) => O(t, "spend_to_income")?.color ?? [],
331
361
  boldLabel: !0,
332
362
  subTabAriaLabels: (t) => [t.general.spend_transactions, t.general.income_transactions]
333
363
  },
334
- [n.COST_OF_LIVING]: {
364
+ [i.COST_OF_LIVING]: {
335
365
  top: "doubleBar",
336
- filterStrategy: b,
366
+ filterStrategy: f,
337
367
  scope: "store",
338
368
  filterMode: "store",
339
- colors: (t, e) => [d(t, e), t.palette.chart.chart4 ?? t.palette.primary.main],
369
+ colors: (t, e) => [u(t, e), t.palette.chart.chart4 ?? t.palette.primary.main],
340
370
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions]
341
371
  },
342
- [n.DEBT_TO_INCOME]: {
343
- title: (t) => t.insights_feed?.transaction_history_block?.monthly_debt_to_income_drawer_title ?? G(t),
372
+ [i.DEBT_TO_INCOME]: {
373
+ title: (t) => t.insights_feed?.transaction_history_block?.monthly_debt_to_income_drawer_title ?? k(t),
344
374
  top: "doubleBar",
345
- filterStrategy: b,
375
+ filterStrategy: f,
346
376
  scope: "store",
347
377
  filterMode: "store",
348
378
  colors: (t) => O(t, "debt_to_income")?.color ?? [],
349
379
  boldLabel: !0,
350
380
  subTabAriaLabels: (t) => [void 0, t.general.income_transactions],
351
- slotData: Y,
352
- fetchMissingTransactions: w,
353
- tipSection: tt
381
+ slotData: V,
382
+ fetchMissingTransactions: A,
383
+ tipSection: nt
354
384
  },
355
- [n.SAVINGS_TO_INCOME]: {
385
+ [i.SAVINGS_TO_INCOME]: {
356
386
  top: "doubleBar",
357
- filterStrategy: b,
387
+ filterStrategy: f,
358
388
  scope: "store",
359
389
  filterMode: "store",
360
390
  colors: (t) => O(t, "savings_to_income")?.color ?? [],
361
391
  boldLabel: !0,
362
392
  subTabAriaLabels: (t) => [t.general.savings_transactions, t.general.income_transactions],
363
- slotData: et,
364
- fetchMissingTransactions: w,
365
- tipSection: at
393
+ slotData: st,
394
+ fetchMissingTransactions: A,
395
+ tipSection: it
366
396
  },
367
- [n.NON_ESSENTIAL_CATEGORY]: {
397
+ [i.NON_ESSENTIAL_CATEGORY]: {
368
398
  top: "tabsOnly",
369
- filterStrategy: lt,
399
+ filterStrategy: pt,
370
400
  scope: "store",
371
401
  filterMode: "store",
372
402
  colors: (t) => [t.palette.primary.main]
373
403
  }
374
- }, Ct = {
404
+ }, Bt = {
375
405
  top: "singleBar",
376
- filterStrategy: M,
406
+ filterStrategy: C,
377
407
  scope: "store",
378
408
  filterMode: "store",
379
- colors: (t, e) => [d(t, e)]
409
+ colors: (t, e) => [u(t, e)]
380
410
  };
381
411
  export {
382
- n as DRILLDOWN_VARIANTS,
383
- Ct as FALLBACK,
384
- At as layout,
385
- Y as resolveDebtToIncomeSlotData,
386
- Z as resolveDepositSummarySlotData,
387
- Q as resolveMerchantBudgetSlotData,
388
- J as resolveSavingsContributionsSlotData,
389
- X as resolveTopMerchantSlotData,
390
- q as resolveUpcomingBillSlotData
412
+ i as DRILLDOWN_VARIANTS,
413
+ Bt as FALLBACK,
414
+ Rt as layout,
415
+ at as resolveCategorySpendSlotData,
416
+ V as resolveDebtToIncomeSlotData,
417
+ et as resolveDepositSummarySlotData,
418
+ $ as resolveMerchantBudgetSlotData,
419
+ Z as resolveSavingsContributionsSlotData,
420
+ tt as resolveTopMerchantSlotData,
421
+ X as resolveUpcomingBillSlotData
391
422
  };
392
423
 
393
424
  //# sourceMappingURL=layout.es.js.map