@mx-cartographer/experiences 9.0.16-alpha.al0 → 9.0.16
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/CHANGELOG.md +5 -4
- package/dist/{AccountDetailsDrawer-CZPeLsCq.mjs → AccountDetailsDrawer-BuxLfuIm.mjs} +3 -3
- package/dist/{AccountDetailsHeader-BvbCUQSS.mjs → AccountDetailsHeader-ByGNPZpO.mjs} +0 -2
- package/dist/{EmbeddedCard-DH8vQ3qN.mjs → EmbeddedCard-BxgB26dd.mjs} +181 -183
- package/dist/{ExportCsvAction-C9KWH3Az.mjs → ExportCsvAction-BV69DnpC.mjs} +1 -1
- package/dist/{Help-aERwhajy.mjs → Help-BMCejaQr.mjs} +2 -2
- package/dist/ListItemWrapper-BHIbqx7E.mjs +42 -0
- package/dist/{ManageIncome-Dcsnnz86.mjs → ManageIncome-BadwsHRL.mjs} +8 -8
- package/dist/{RecurringSettings-D8hBbXV_.mjs → RecurringSettings-CGZiV-Ie.mjs} +1 -1
- package/dist/{TransactionDetails-roZ5xLq8.mjs → TransactionDetails-DQ_eE7M4.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-Dxghxphh.mjs → ViewMoreMicroCard-fnwE0hqd.mjs} +355 -351
- package/dist/accounts/index.es.js +4 -4
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +4 -4
- package/dist/common/components/ListItemWrapper.d.ts +1 -2
- package/dist/common/index.es.js +1 -1
- package/dist/debts/index.es.js +63 -63
- package/dist/finstrong/index.es.js +5 -5
- package/dist/help/index.es.js +1 -1
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/insights/index.es.js +2 -2
- package/dist/microinsights/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +138 -151
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +0 -1
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +4 -4
- package/package.json +6 -6
- package/dist/ListItemWrapper-DRse79Iu.mjs +0 -43
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
1
|
+
import { jsx as o, jsxs as N, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import E, { useEffect as le, useState as ce } from "react";
|
|
3
|
+
import { observer as z } from "mobx-react-lite";
|
|
4
4
|
import k from "@mui/material/Stack";
|
|
5
|
-
import
|
|
6
|
-
import { CategoryIcon as
|
|
7
|
-
import { Close as
|
|
8
|
-
import { L as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
5
|
+
import He from "@mui/material/Button";
|
|
6
|
+
import { CategoryIcon as $e, MerchantLogo as je, InstitutionLogo as Ye, P as he, Text as ge, H3 as Xe } from "@mxenabled/mxui";
|
|
7
|
+
import { Close as Ze, ChevronLeft as Qe, ChevronRight as Ne } from "@mxenabled/mx-icons";
|
|
8
|
+
import { L as qe } from "./Loader-CxeBwuPG.mjs";
|
|
9
|
+
import de from "@mui/material/Box";
|
|
10
|
+
import Ie from "@mui/material/IconButton";
|
|
11
11
|
import { useTheme as P, alpha as s } from "@mui/material/styles";
|
|
12
|
-
import { useInView as
|
|
12
|
+
import { useInView as Me } from "react-intersection-observer";
|
|
13
13
|
import { B as c } from "./BeatMaterialIcon-1KOfRZrA.mjs";
|
|
14
|
-
import { C as
|
|
15
|
-
import { b as
|
|
16
|
-
import
|
|
17
|
-
import { makeAutoObservable as
|
|
18
|
-
import { a as
|
|
19
|
-
import { G as
|
|
20
|
-
import { u as
|
|
21
|
-
import { Card as
|
|
22
|
-
class
|
|
23
|
-
copyApi = new
|
|
14
|
+
import { C as Je } from "./Category-DEKZGLYe.mjs";
|
|
15
|
+
import { b as et } from "./Localization-DnoVyBNK.mjs";
|
|
16
|
+
import tt from "@mui/material/CircularProgress";
|
|
17
|
+
import { makeAutoObservable as _e, runInAction as ve } from "mobx";
|
|
18
|
+
import { a as ot, u as nt, b as it } from "./Analytics-CkYXKvco.mjs";
|
|
19
|
+
import { G as Ee, B as ye } from "./GlobalCopyApi-wcnDUzMV.mjs";
|
|
20
|
+
import { u as rt } from "./useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
21
|
+
import { Card as at, CardActionArea as st, Box as ct, IconButton as lt, Stack as K, Button as fe } from "@mui/material";
|
|
22
|
+
class dt {
|
|
23
|
+
copyApi = new Ee("/", "");
|
|
24
24
|
copyObject = {};
|
|
25
25
|
namespace = "experiences";
|
|
26
26
|
translationKey = "micro_insights";
|
|
27
27
|
constructor() {
|
|
28
|
-
|
|
28
|
+
_e(this);
|
|
29
29
|
}
|
|
30
30
|
// NOTE: Not sure if this is special case, but other stores have this deprecation todo
|
|
31
31
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
32
32
|
// TODO: Remove this function
|
|
33
33
|
initialize = async (e, n) => {
|
|
34
|
-
this.copyApi = new
|
|
34
|
+
this.copyApi = new Ee(e, n), await this.loadCopy();
|
|
35
35
|
};
|
|
36
36
|
loadCopy = async () => {
|
|
37
37
|
const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
38
|
-
|
|
38
|
+
ve(() => {
|
|
39
39
|
this.copyObject = e[this.translationKey];
|
|
40
40
|
});
|
|
41
41
|
};
|
|
@@ -49,7 +49,7 @@ class rt {
|
|
|
49
49
|
return this.copyObject.zero_state;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const pe = {
|
|
53
53
|
BillAmountNotStandard: "BillAmountNotStandard",
|
|
54
54
|
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
55
55
|
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
@@ -66,42 +66,42 @@ const ce = {
|
|
|
66
66
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
67
67
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
68
68
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
69
|
-
}, O = window?.app?.clientConfig?.microwidget_instance_id || "",
|
|
69
|
+
}, O = window?.app?.clientConfig?.microwidget_instance_id || "", Ae = {
|
|
70
70
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
71
|
-
},
|
|
71
|
+
}, be = (t) => `on${t}Click`, Le = (t) => `on${t}View`, xe = (t) => `on${t}ViewFirstTime`, me = (t) => t.replace(/([a-z])([A-Z])/g, "$1 $2"), _t = () => Object.values(pe).reduce(
|
|
72
72
|
(t, e) => ({
|
|
73
73
|
...t,
|
|
74
|
-
[
|
|
75
|
-
action:
|
|
74
|
+
[be(e)]: {
|
|
75
|
+
action: L.MICRO_BEAT_CLICKED,
|
|
76
76
|
category: b.BEAT_INTERACTION,
|
|
77
|
-
label:
|
|
77
|
+
label: me(e),
|
|
78
78
|
value: O
|
|
79
79
|
}
|
|
80
80
|
}),
|
|
81
81
|
{}
|
|
82
|
-
),
|
|
82
|
+
), pt = () => Object.values(pe).reduce(
|
|
83
83
|
(t, e) => ({
|
|
84
84
|
...t,
|
|
85
|
-
[
|
|
86
|
-
action:
|
|
85
|
+
[Le(e)]: {
|
|
86
|
+
action: L.MICRO_BEAT_DISPLAYED,
|
|
87
87
|
category: b.BEAT_INTERACTION,
|
|
88
|
-
label:
|
|
88
|
+
label: me(e),
|
|
89
89
|
value: O
|
|
90
90
|
}
|
|
91
91
|
}),
|
|
92
92
|
{}
|
|
93
|
-
),
|
|
93
|
+
), mt = () => Object.values(pe).reduce(
|
|
94
94
|
(t, e) => ({
|
|
95
95
|
...t,
|
|
96
|
-
[
|
|
97
|
-
action:
|
|
96
|
+
[xe(e)]: {
|
|
97
|
+
action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
98
98
|
category: b.BEAT_INTERACTION,
|
|
99
|
-
label:
|
|
99
|
+
label: me(e),
|
|
100
100
|
value: O
|
|
101
101
|
}
|
|
102
102
|
}),
|
|
103
103
|
{}
|
|
104
|
-
),
|
|
104
|
+
), v = {
|
|
105
105
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
106
106
|
MICRO_WIDGET: "Micro Widget",
|
|
107
107
|
VIEW_MORE: "View More"
|
|
@@ -115,9 +115,9 @@ const ce = {
|
|
|
115
115
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
116
116
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
117
117
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
118
|
-
},
|
|
118
|
+
}, De = {
|
|
119
119
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
120
|
-
},
|
|
120
|
+
}, L = {
|
|
121
121
|
CONTROL_BACKWARD: "Control Backward",
|
|
122
122
|
CONTROL_FORWARD: "Control Forward",
|
|
123
123
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -129,91 +129,91 @@ const ce = {
|
|
|
129
129
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
130
130
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
131
131
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
132
|
-
},
|
|
132
|
+
}, Se = {
|
|
133
133
|
[B.MICRO_WIDGET_CAROUSEL]: {
|
|
134
|
-
label:
|
|
134
|
+
label: v.MICRO_WIDGET,
|
|
135
135
|
name: B.MICRO_WIDGET_CAROUSEL,
|
|
136
|
-
path:
|
|
136
|
+
path: Ae.INSIGHTS_MICRO_WIDGET,
|
|
137
137
|
value: O
|
|
138
138
|
},
|
|
139
139
|
// zero state
|
|
140
140
|
[B.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
141
|
-
label:
|
|
141
|
+
label: v.MICRO_WIDGET,
|
|
142
142
|
name: B.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
143
|
-
path:
|
|
143
|
+
path: Ae.INSIGHTS_MICRO_WIDGET,
|
|
144
144
|
value: O
|
|
145
145
|
},
|
|
146
146
|
// no relevant cards
|
|
147
147
|
[B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
148
|
-
label:
|
|
148
|
+
label: v.MICRO_WIDGET,
|
|
149
149
|
name: B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
150
150
|
path: "/micro-widget",
|
|
151
151
|
value: O
|
|
152
152
|
}
|
|
153
|
-
},
|
|
153
|
+
}, Te = {
|
|
154
154
|
// carousel control interaction events - clicks and swipes
|
|
155
155
|
[W.ON_CAROUSEL_BACK_CLICK]: {
|
|
156
|
-
action:
|
|
156
|
+
action: L.CONTROL_BACKWARD,
|
|
157
157
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
158
|
-
label:
|
|
158
|
+
label: v.CAROUSEL_CONTROL,
|
|
159
159
|
value: O
|
|
160
160
|
},
|
|
161
161
|
[W.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
162
|
-
action:
|
|
162
|
+
action: L.CONTROL_FORWARD,
|
|
163
163
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
164
|
-
label:
|
|
164
|
+
label: v.CAROUSEL_CONTROL,
|
|
165
165
|
value: O
|
|
166
166
|
},
|
|
167
167
|
[W.ON_CAROUSEL_BACK_SWIPE]: {
|
|
168
|
-
action:
|
|
168
|
+
action: L.SWIPE_BACKWARD,
|
|
169
169
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
170
|
-
label:
|
|
170
|
+
label: v.CAROUSEL_CONTROL,
|
|
171
171
|
value: O
|
|
172
172
|
},
|
|
173
173
|
[W.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
174
|
-
action:
|
|
174
|
+
action: L.SWIPE_FORWARD,
|
|
175
175
|
category: b.MICRO_WIDGET_INTERACTION,
|
|
176
|
-
label:
|
|
176
|
+
label: v.CAROUSEL_CONTROL,
|
|
177
177
|
value: O
|
|
178
178
|
},
|
|
179
179
|
// read more card events
|
|
180
180
|
[W.ON_VIEW_MORE_CLICKED]: {
|
|
181
|
-
action:
|
|
181
|
+
action: L.MICRO_BEAT_CLICKED,
|
|
182
182
|
category: b.BEAT_INTERACTION,
|
|
183
|
-
label:
|
|
183
|
+
label: v.VIEW_MORE,
|
|
184
184
|
value: O
|
|
185
185
|
},
|
|
186
|
-
[
|
|
187
|
-
action:
|
|
186
|
+
[De.ON_VIEW_MORE_VIEWED]: {
|
|
187
|
+
action: L.MICRO_BEAT_DISPLAYED,
|
|
188
188
|
category: b.BEAT_INTERACTION,
|
|
189
|
-
label:
|
|
189
|
+
label: v.VIEW_MORE,
|
|
190
190
|
value: O
|
|
191
191
|
},
|
|
192
|
-
...
|
|
193
|
-
...
|
|
194
|
-
...
|
|
195
|
-
},
|
|
192
|
+
..._t(),
|
|
193
|
+
...pt(),
|
|
194
|
+
...mt()
|
|
195
|
+
}, Re = async (t, e) => !e || !Te[t] ? null : e.sendAnalyticEvent(Te[t]).then((n) => n).catch((n) => {
|
|
196
196
|
throw n;
|
|
197
|
-
}),
|
|
197
|
+
}), Oe = async (t, e) => !e || !Se[t] ? null : e.sendAnalyticsPageview(Se[t]).then((n) => n).catch((n) => {
|
|
198
198
|
throw n;
|
|
199
199
|
});
|
|
200
|
-
class
|
|
201
|
-
onAnalyticEvent =
|
|
202
|
-
onAnalyticPageView =
|
|
203
|
-
beatApi = new
|
|
200
|
+
class ut {
|
|
201
|
+
onAnalyticEvent = Re;
|
|
202
|
+
onAnalyticPageView = Oe;
|
|
203
|
+
beatApi = new ye("/", "");
|
|
204
204
|
constructor() {
|
|
205
|
-
|
|
205
|
+
_e(this);
|
|
206
206
|
}
|
|
207
207
|
initialize = async (e, n, i) => {
|
|
208
208
|
this.onAnalyticEvent = (a, l) => {
|
|
209
|
-
|
|
209
|
+
Re(a, l).then((r) => r).catch((r) => {
|
|
210
210
|
throw r.status === 401 && i(), r;
|
|
211
211
|
});
|
|
212
212
|
}, this.onAnalyticPageView = (a, l) => {
|
|
213
|
-
|
|
213
|
+
Oe(a, l).then((r) => r).catch((r) => {
|
|
214
214
|
throw r.status === 401 && i(), r;
|
|
215
215
|
});
|
|
216
|
-
}, this.beatApi = new
|
|
216
|
+
}, this.beatApi = new ye(e, n);
|
|
217
217
|
};
|
|
218
218
|
updateBeat = async (e) => {
|
|
219
219
|
this.beatApi.updateBeat(e);
|
|
@@ -222,7 +222,7 @@ class lt {
|
|
|
222
222
|
this.beatApi.updateOffer(e);
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
class
|
|
225
|
+
class Ct {
|
|
226
226
|
copyStore;
|
|
227
227
|
endpoint = "/";
|
|
228
228
|
insightsMicroWidgetStore;
|
|
@@ -230,28 +230,28 @@ class dt {
|
|
|
230
230
|
token = "";
|
|
231
231
|
isInitialized = !1;
|
|
232
232
|
constructor() {
|
|
233
|
-
this.copyStore = new
|
|
233
|
+
this.copyStore = new dt(), this.insightsMicroWidgetStore = new ut(), _e(this);
|
|
234
234
|
}
|
|
235
235
|
initialize = async (e, n, i) => {
|
|
236
236
|
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n, i);
|
|
237
|
-
const a = await
|
|
238
|
-
|
|
237
|
+
const a = await ot(e, n, "1.0.0", "Micro Insights Carousel");
|
|
238
|
+
ve(() => {
|
|
239
239
|
this.session = a, this.isInitialized = !0;
|
|
240
240
|
});
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const F = E.createContext(null), ht = ({
|
|
244
244
|
onEvent: t,
|
|
245
245
|
onPageview: e,
|
|
246
246
|
store: n,
|
|
247
247
|
children: i
|
|
248
|
-
}) => /* @__PURE__ */ o(
|
|
249
|
-
const { primary_category_guid: e, category_guids: n } = t, i = e || n?.[0] ||
|
|
250
|
-
return /* @__PURE__ */ o(
|
|
251
|
-
},
|
|
248
|
+
}) => /* @__PURE__ */ o(F.Provider, { value: { onEvent: t, onPageview: e, store: n, children: i }, children: i }), gt = ({ beat: t }) => {
|
|
249
|
+
const { primary_category_guid: e, category_guids: n } = t, i = e || n?.[0] || Je.UNCATEGORIZED;
|
|
250
|
+
return /* @__PURE__ */ o($e, { categoryGuid: i, size: 32, sx: { minWidth: 32 } });
|
|
251
|
+
}, It = ({ beat: t }) => {
|
|
252
252
|
const { category_guids: e, merchant_guids: n, primary_category_guid: i, primary_merchant_guid: a } = t;
|
|
253
253
|
return /* @__PURE__ */ o(
|
|
254
|
-
|
|
254
|
+
je,
|
|
255
255
|
{
|
|
256
256
|
categoryGuid: i || e && e[0] || "",
|
|
257
257
|
merchantGuid: a || n[0],
|
|
@@ -263,27 +263,27 @@ const H = I.createContext(null), _t = ({
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
);
|
|
266
|
-
},
|
|
266
|
+
}, Et = (t) => t ? t.data ? t.data.map((e) => {
|
|
267
267
|
const n = {};
|
|
268
268
|
return t.names?.map((i, a) => {
|
|
269
269
|
n[i] = e[a];
|
|
270
270
|
}), n;
|
|
271
|
-
}) : [] : [], q = "primary",
|
|
272
|
-
const e =
|
|
271
|
+
}) : [] : [], q = "primary", Be = "success", Pe = "error", Ve = (t) => {
|
|
272
|
+
const e = Et(t), n = Math.floor(e.length / 2);
|
|
273
273
|
if (n === 0 || n === e.length) return q;
|
|
274
274
|
const i = e[0]?.amount, a = e[n]?.amount;
|
|
275
|
-
return i == null || a == null ? q : i > a ?
|
|
276
|
-
},
|
|
277
|
-
const e = P(), n =
|
|
275
|
+
return i == null || a == null ? q : i > a ? Pe : i < a ? Be : q;
|
|
276
|
+
}, yt = (t, e) => t < e ? Be : t > e ? Pe : q, ft = ({ beat: t }) => {
|
|
277
|
+
const e = P(), n = Ve(t.data_series), i = e.palette[n].main;
|
|
278
278
|
return /* @__PURE__ */ o(c, { bgColor: s(i, 0.15), iconColor: n, name: "bar_chart" });
|
|
279
|
-
},
|
|
279
|
+
}, At = ({ beat: t }) => {
|
|
280
280
|
const e = P(), n = t.payload?.average_spend || 0;
|
|
281
281
|
let i = 0;
|
|
282
282
|
if (t.data_series?.data && t.data_series.data.length > 0) {
|
|
283
283
|
const r = (t.data_series.names || []).indexOf("amount");
|
|
284
284
|
r !== -1 && (i = t.data_series.data[0][r] || 0);
|
|
285
285
|
}
|
|
286
|
-
const a =
|
|
286
|
+
const a = yt(i, n);
|
|
287
287
|
return /* @__PURE__ */ o(
|
|
288
288
|
c,
|
|
289
289
|
{
|
|
@@ -292,8 +292,8 @@ const H = I.createContext(null), _t = ({
|
|
|
292
292
|
name: "timeline"
|
|
293
293
|
}
|
|
294
294
|
);
|
|
295
|
-
},
|
|
296
|
-
const e = P(), n =
|
|
295
|
+
}, St = ({ beat: t }) => {
|
|
296
|
+
const e = P(), n = Ve(t.data_series), i = e.palette[n].main;
|
|
297
297
|
return /* @__PURE__ */ o(
|
|
298
298
|
c,
|
|
299
299
|
{
|
|
@@ -303,11 +303,11 @@ const H = I.createContext(null), _t = ({
|
|
|
303
303
|
name: "area_chart"
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
|
-
},
|
|
306
|
+
}, Tt = ({ beat: t }) => /* @__PURE__ */ o(Ye, { alt: t.institutionName || "", institutionGuid: t.institutionGuid || "" }), Rt = {
|
|
307
307
|
0: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" }),
|
|
308
|
-
1: (t) => /* @__PURE__ */ o(
|
|
309
|
-
2: (t) => /* @__PURE__ */ o(
|
|
310
|
-
3: (t) => /* @__PURE__ */ o(
|
|
308
|
+
1: (t) => /* @__PURE__ */ o(gt, { beat: t }),
|
|
309
|
+
2: (t) => /* @__PURE__ */ o(It, { beat: t }),
|
|
310
|
+
3: (t) => /* @__PURE__ */ o(ft, { beat: t }),
|
|
311
311
|
4: (t, e) => /* @__PURE__ */ o(
|
|
312
312
|
c,
|
|
313
313
|
{
|
|
@@ -340,7 +340,7 @@ const H = I.createContext(null), _t = ({
|
|
|
340
340
|
sx: { color: "text.primary" }
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
|
-
12: (t) => /* @__PURE__ */ o(
|
|
343
|
+
12: (t) => /* @__PURE__ */ o(St, { beat: t }),
|
|
344
344
|
13: () => /* @__PURE__ */ o(
|
|
345
345
|
c,
|
|
346
346
|
{
|
|
@@ -421,7 +421,7 @@ const H = I.createContext(null), _t = ({
|
|
|
421
421
|
),
|
|
422
422
|
27: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "directions_car" }),
|
|
423
423
|
28: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "contract" }),
|
|
424
|
-
29: (t) => /* @__PURE__ */ o(
|
|
424
|
+
29: (t) => /* @__PURE__ */ o(At, { beat: t }),
|
|
425
425
|
30: (t, e) => /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "calendar_month" }),
|
|
426
426
|
31: (t, e) => /* @__PURE__ */ o(
|
|
427
427
|
c,
|
|
@@ -440,38 +440,38 @@ const H = I.createContext(null), _t = ({
|
|
|
440
440
|
name: "storefront"
|
|
441
441
|
}
|
|
442
442
|
),
|
|
443
|
-
34: (t) => /* @__PURE__ */ o(
|
|
444
|
-
},
|
|
445
|
-
const e = P(), { icon_type: n } = t, i = n != null ?
|
|
443
|
+
34: (t) => /* @__PURE__ */ o(Tt, { beat: t })
|
|
444
|
+
}, Ot = ({ beat: t }) => {
|
|
445
|
+
const e = P(), { icon_type: n } = t, i = n != null ? Rt[n] : null;
|
|
446
446
|
return i ? i(t, e) : /* @__PURE__ */ o(c, { bgColor: s(e.palette.primary.main, 0.15), name: "error" });
|
|
447
|
-
},
|
|
448
|
-
const t =
|
|
447
|
+
}, x = () => {
|
|
448
|
+
const t = E.useContext(F);
|
|
449
449
|
if (!t)
|
|
450
450
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
451
451
|
return t.store.copyStore;
|
|
452
|
-
},
|
|
453
|
-
const t =
|
|
452
|
+
}, Wt = () => {
|
|
453
|
+
const t = E.useContext(F);
|
|
454
454
|
if (!t?.store?.insightsMicroWidgetStore)
|
|
455
455
|
throw new Error(
|
|
456
456
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
457
457
|
);
|
|
458
458
|
return t.store.insightsMicroWidgetStore;
|
|
459
|
-
},
|
|
460
|
-
const t =
|
|
459
|
+
}, H = () => {
|
|
460
|
+
const t = E.useContext(F);
|
|
461
461
|
if (!t)
|
|
462
462
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
463
463
|
return { onEvent: t.onEvent };
|
|
464
|
-
},
|
|
465
|
-
const t =
|
|
464
|
+
}, Ge = () => {
|
|
465
|
+
const t = E.useContext(F);
|
|
466
466
|
if (!t)
|
|
467
467
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
468
468
|
return { onPageview: t.onPageview };
|
|
469
|
-
},
|
|
469
|
+
}, wt = {
|
|
470
470
|
LARGE: 180,
|
|
471
471
|
STANDARD: 154,
|
|
472
472
|
XLARGE: 200,
|
|
473
473
|
XXLARGE: 248
|
|
474
|
-
},
|
|
474
|
+
}, Nt = 50, ke = 1, J = E.forwardRef(
|
|
475
475
|
function({
|
|
476
476
|
ariaLabel: e,
|
|
477
477
|
closeAriaLabel: n,
|
|
@@ -479,43 +479,43 @@ const H = I.createContext(null), _t = ({
|
|
|
479
479
|
elevation: a,
|
|
480
480
|
icon: l,
|
|
481
481
|
isActiveCard: r,
|
|
482
|
-
heightOverrides:
|
|
482
|
+
heightOverrides: m,
|
|
483
483
|
onClose: C,
|
|
484
|
-
onCardClick:
|
|
485
|
-
onPrimaryAction:
|
|
484
|
+
onCardClick: h,
|
|
485
|
+
onPrimaryAction: g,
|
|
486
486
|
onSecondaryAction: d,
|
|
487
487
|
primaryActionText: _,
|
|
488
488
|
secondaryActionText: p,
|
|
489
|
-
title:
|
|
489
|
+
title: I,
|
|
490
490
|
variant: y,
|
|
491
491
|
widthOverrides: S,
|
|
492
|
-
...
|
|
492
|
+
...w
|
|
493
493
|
}, T) {
|
|
494
|
-
const
|
|
494
|
+
const f = !!(g && _), R = /* @__PURE__ */ N(we, { children: [
|
|
495
495
|
C && /* @__PURE__ */ o(
|
|
496
|
-
|
|
496
|
+
lt,
|
|
497
497
|
{
|
|
498
498
|
"aria-label": n,
|
|
499
|
-
onClick: (
|
|
500
|
-
|
|
499
|
+
onClick: (u) => {
|
|
500
|
+
u.stopPropagation(), C?.();
|
|
501
501
|
},
|
|
502
|
-
onMouseDown: (
|
|
503
|
-
|
|
502
|
+
onMouseDown: (u) => {
|
|
503
|
+
u.stopPropagation();
|
|
504
504
|
},
|
|
505
|
-
onTouchStart: (
|
|
506
|
-
|
|
505
|
+
onTouchStart: (u) => {
|
|
506
|
+
u.stopPropagation();
|
|
507
507
|
},
|
|
508
508
|
sx: { minHeight: 40, minWidth: 40, position: "absolute", right: 4, top: 4 },
|
|
509
|
-
children: /* @__PURE__ */ o(
|
|
509
|
+
children: /* @__PURE__ */ o(Ze, {})
|
|
510
510
|
}
|
|
511
511
|
),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ N(K, { sx: { gap: 6, height: "100%", justifyContent: "space-between" }, children: [
|
|
513
|
+
/* @__PURE__ */ N(K, { sx: { flexDirection: "row", gap: 12 }, children: [
|
|
514
514
|
l && l,
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
-
/* @__PURE__ */ o(
|
|
515
|
+
/* @__PURE__ */ N(K, { sx: { gap: 6 }, children: [
|
|
516
|
+
/* @__PURE__ */ o(K, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: /* @__PURE__ */ o(he, { bold: !0, sx: { lineHeight: "16px" }, variant: "body1", children: I }) }),
|
|
517
517
|
/* @__PURE__ */ o(
|
|
518
|
-
|
|
518
|
+
he,
|
|
519
519
|
{
|
|
520
520
|
dangerouslySetInnerHTML: { __html: i },
|
|
521
521
|
sx: {
|
|
@@ -523,7 +523,7 @@ const H = I.createContext(null), _t = ({
|
|
|
523
523
|
overflow: "hidden",
|
|
524
524
|
textOverflow: "ellipsis",
|
|
525
525
|
WebkitBoxOrient: "vertical",
|
|
526
|
-
WebkitLineClamp:
|
|
526
|
+
WebkitLineClamp: f ? 2 : 3,
|
|
527
527
|
"& .bold-copy": {
|
|
528
528
|
fontWeight: "bold",
|
|
529
529
|
fontFamily: "inherit"
|
|
@@ -534,8 +534,8 @@ const H = I.createContext(null), _t = ({
|
|
|
534
534
|
)
|
|
535
535
|
] })
|
|
536
536
|
] }),
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
f && /* @__PURE__ */ N(
|
|
538
|
+
K,
|
|
539
539
|
{
|
|
540
540
|
sx: {
|
|
541
541
|
alignItems: "center",
|
|
@@ -545,40 +545,40 @@ const H = I.createContext(null), _t = ({
|
|
|
545
545
|
pl: l ? 36 : 0
|
|
546
546
|
},
|
|
547
547
|
children: [
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
f && /* @__PURE__ */ o(
|
|
549
|
+
fe,
|
|
550
550
|
{
|
|
551
|
-
onClick: (
|
|
552
|
-
|
|
551
|
+
onClick: (u) => {
|
|
552
|
+
u.stopPropagation(), g?.();
|
|
553
553
|
},
|
|
554
|
-
onMouseDown: (
|
|
555
|
-
|
|
554
|
+
onMouseDown: (u) => {
|
|
555
|
+
u.stopPropagation();
|
|
556
556
|
},
|
|
557
|
-
onTouchStart: (
|
|
558
|
-
|
|
557
|
+
onTouchStart: (u) => {
|
|
558
|
+
u.stopPropagation();
|
|
559
559
|
},
|
|
560
560
|
size: "small",
|
|
561
561
|
sx: { px: 8, ml: l ? 0 : -8 },
|
|
562
562
|
variant: "text",
|
|
563
|
-
children: /* @__PURE__ */ o(
|
|
563
|
+
children: /* @__PURE__ */ o(ge, { bold: !0, variant: "body2", children: _ })
|
|
564
564
|
}
|
|
565
565
|
),
|
|
566
566
|
!!(d && p) && /* @__PURE__ */ o(
|
|
567
|
-
|
|
567
|
+
fe,
|
|
568
568
|
{
|
|
569
|
-
onClick: (
|
|
570
|
-
|
|
569
|
+
onClick: (u) => {
|
|
570
|
+
u.stopPropagation(), d?.();
|
|
571
571
|
},
|
|
572
|
-
onMouseDown: (
|
|
573
|
-
|
|
572
|
+
onMouseDown: (u) => {
|
|
573
|
+
u.stopPropagation();
|
|
574
574
|
},
|
|
575
|
-
onTouchStart: (
|
|
576
|
-
|
|
575
|
+
onTouchStart: (u) => {
|
|
576
|
+
u.stopPropagation();
|
|
577
577
|
},
|
|
578
578
|
size: "small",
|
|
579
579
|
sx: { px: 8 },
|
|
580
580
|
variant: "text",
|
|
581
|
-
children: /* @__PURE__ */ o(
|
|
581
|
+
children: /* @__PURE__ */ o(ge, { bold: !0, sx: { color: "text.secondary" }, variant: "body2", children: p })
|
|
582
582
|
}
|
|
583
583
|
)
|
|
584
584
|
]
|
|
@@ -587,7 +587,7 @@ const H = I.createContext(null), _t = ({
|
|
|
587
587
|
] })
|
|
588
588
|
] });
|
|
589
589
|
return /* @__PURE__ */ o(
|
|
590
|
-
|
|
590
|
+
at,
|
|
591
591
|
{
|
|
592
592
|
"aria-hidden": !r,
|
|
593
593
|
"aria-label": e,
|
|
@@ -596,20 +596,20 @@ const H = I.createContext(null), _t = ({
|
|
|
596
596
|
role: "group",
|
|
597
597
|
sx: {
|
|
598
598
|
backgroundColor: "background.paper",
|
|
599
|
-
height:
|
|
599
|
+
height: m ? "100%" : 120,
|
|
600
600
|
minWidth: S ? `${S}px` : "100%",
|
|
601
601
|
position: "relative",
|
|
602
602
|
my: 1,
|
|
603
603
|
borderRadius: 2
|
|
604
604
|
},
|
|
605
|
-
tabIndex:
|
|
605
|
+
tabIndex: h || !r ? -1 : 0,
|
|
606
606
|
variant: y,
|
|
607
|
-
...
|
|
608
|
-
children:
|
|
609
|
-
|
|
607
|
+
...w,
|
|
608
|
+
children: h ? /* @__PURE__ */ o(
|
|
609
|
+
st,
|
|
610
610
|
{
|
|
611
611
|
component: "div",
|
|
612
|
-
onClick:
|
|
612
|
+
onClick: h,
|
|
613
613
|
sx: {
|
|
614
614
|
pb: 8,
|
|
615
615
|
pt: 16,
|
|
@@ -618,11 +618,11 @@ const H = I.createContext(null), _t = ({
|
|
|
618
618
|
},
|
|
619
619
|
children: R
|
|
620
620
|
}
|
|
621
|
-
) : /* @__PURE__ */ o(
|
|
621
|
+
) : /* @__PURE__ */ o(ct, { sx: { pb: 8, pt: 16, px: 16, height: "100%" }, children: R })
|
|
622
622
|
}
|
|
623
623
|
);
|
|
624
624
|
}
|
|
625
|
-
),
|
|
625
|
+
), Mt = ({
|
|
626
626
|
ariaLabel: t,
|
|
627
627
|
beat: e,
|
|
628
628
|
elevation: n,
|
|
@@ -630,23 +630,23 @@ const H = I.createContext(null), _t = ({
|
|
|
630
630
|
isActiveCard: a,
|
|
631
631
|
onCardClick: l,
|
|
632
632
|
posthog: r,
|
|
633
|
-
widthOverrides:
|
|
633
|
+
widthOverrides: m,
|
|
634
634
|
variant: C,
|
|
635
|
-
showIcon:
|
|
636
|
-
heightOverrides:
|
|
635
|
+
showIcon: h,
|
|
636
|
+
heightOverrides: g
|
|
637
637
|
}) => {
|
|
638
|
-
const { ref: d, inView: _ } =
|
|
639
|
-
threshold:
|
|
640
|
-
}), { cardsCopy: p } =
|
|
641
|
-
|
|
642
|
-
_ && (e.has_been_displayed ?
|
|
638
|
+
const { ref: d, inView: _ } = Me({
|
|
639
|
+
threshold: ke
|
|
640
|
+
}), { cardsCopy: p } = x(), { onEvent: I } = H(), { updateBeat: y, updateOffer: S } = Wt();
|
|
641
|
+
le(() => {
|
|
642
|
+
_ && (e.has_been_displayed ? I(Le(e.template)) : (e.guid.startsWith("OFR") ? S({
|
|
643
643
|
...e,
|
|
644
644
|
has_been_displayed: !0
|
|
645
645
|
}) : y({
|
|
646
646
|
...e,
|
|
647
647
|
has_been_displayed: !0
|
|
648
|
-
}),
|
|
649
|
-
}, [_]),
|
|
648
|
+
}), I(xe(e.template))));
|
|
649
|
+
}, [_]), le(() => {
|
|
650
650
|
if (_ && e)
|
|
651
651
|
if (e.template === "MarketingOffer") {
|
|
652
652
|
const T = e;
|
|
@@ -662,8 +662,8 @@ const H = I.createContext(null), _t = ({
|
|
|
662
662
|
position: i
|
|
663
663
|
});
|
|
664
664
|
}, [e, i, _]);
|
|
665
|
-
const
|
|
666
|
-
if (l && l(e),
|
|
665
|
+
const w = () => {
|
|
666
|
+
if (l && l(e), I(be(e.template)), e.template === "MarketingOffer") {
|
|
667
667
|
const T = e;
|
|
668
668
|
r?.capture("clicked_messaging_insight", {
|
|
669
669
|
template: e.template,
|
|
@@ -684,19 +684,19 @@ const H = I.createContext(null), _t = ({
|
|
|
684
684
|
ariaLabel: t,
|
|
685
685
|
description: e?.html_micro_description && e?.html_micro_description.length > 0 ? e.html_micro_description : e.html_description || "",
|
|
686
686
|
elevation: n,
|
|
687
|
-
heightOverrides:
|
|
688
|
-
icon:
|
|
687
|
+
heightOverrides: g,
|
|
688
|
+
icon: h && /* @__PURE__ */ o(Ot, { beat: e }),
|
|
689
689
|
isActiveCard: a,
|
|
690
|
-
onCardClick:
|
|
691
|
-
onPrimaryAction:
|
|
690
|
+
onCardClick: w,
|
|
691
|
+
onPrimaryAction: w,
|
|
692
692
|
primaryActionText: e.micro_call_to_action || p?.micro_card_cta,
|
|
693
693
|
ref: d,
|
|
694
694
|
title: e.micro_title && e.micro_title.length > 0 ? e.micro_title : e.title,
|
|
695
695
|
variant: C,
|
|
696
|
-
widthOverrides:
|
|
696
|
+
widthOverrides: m
|
|
697
697
|
}
|
|
698
698
|
);
|
|
699
|
-
},
|
|
699
|
+
}, vt = ({
|
|
700
700
|
currentBeatIndex: t,
|
|
701
701
|
numBeats: e,
|
|
702
702
|
onNextClick: n,
|
|
@@ -704,10 +704,10 @@ const H = I.createContext(null), _t = ({
|
|
|
704
704
|
scrollRightBoundary: a,
|
|
705
705
|
scrollX: l,
|
|
706
706
|
shouldApplyDotAnimation: r = !1,
|
|
707
|
-
visibleCardsCount:
|
|
707
|
+
visibleCardsCount: m = 1
|
|
708
708
|
}) => {
|
|
709
|
-
const C = P(), { carouselCopy:
|
|
710
|
-
return /* @__PURE__ */
|
|
709
|
+
const C = P(), { carouselCopy: h } = x(), g = Math.floor(l) > a || t - m + 1 === 0, d = l < 0 || e - 1 === t, _ = C.palette.grey[500], p = C.palette.primary.main;
|
|
710
|
+
return /* @__PURE__ */ N(
|
|
711
711
|
k,
|
|
712
712
|
{
|
|
713
713
|
direction: "row",
|
|
@@ -723,26 +723,26 @@ const H = I.createContext(null), _t = ({
|
|
|
723
723
|
},
|
|
724
724
|
children: [
|
|
725
725
|
/* @__PURE__ */ o(
|
|
726
|
-
|
|
726
|
+
Ie,
|
|
727
727
|
{
|
|
728
|
-
"aria-disabled":
|
|
729
|
-
"aria-label":
|
|
730
|
-
disabled:
|
|
728
|
+
"aria-disabled": g,
|
|
729
|
+
"aria-label": h?.previous_insight_cta_aria,
|
|
730
|
+
disabled: g,
|
|
731
731
|
onClick: i,
|
|
732
732
|
children: /* @__PURE__ */ o(
|
|
733
|
-
|
|
733
|
+
Qe,
|
|
734
734
|
{
|
|
735
735
|
sx: {
|
|
736
|
-
color:
|
|
736
|
+
color: g ? _ : p
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
)
|
|
740
740
|
}
|
|
741
741
|
),
|
|
742
|
-
Array.from({ length: e }).map((
|
|
742
|
+
Array.from({ length: e }).map((I, y) => {
|
|
743
743
|
const S = y === t;
|
|
744
744
|
return /* @__PURE__ */ o(
|
|
745
|
-
|
|
745
|
+
de,
|
|
746
746
|
{
|
|
747
747
|
className: "mx-insights-micro-carousel-dots",
|
|
748
748
|
sx: {
|
|
@@ -766,14 +766,14 @@ const H = I.createContext(null), _t = ({
|
|
|
766
766
|
);
|
|
767
767
|
}),
|
|
768
768
|
/* @__PURE__ */ o(
|
|
769
|
-
|
|
769
|
+
Ie,
|
|
770
770
|
{
|
|
771
771
|
"aria-disabled": d,
|
|
772
|
-
"aria-label":
|
|
772
|
+
"aria-label": h?.next_insight_cta_aria,
|
|
773
773
|
disabled: d,
|
|
774
774
|
onClick: n,
|
|
775
775
|
children: /* @__PURE__ */ o(
|
|
776
|
-
|
|
776
|
+
Ne,
|
|
777
777
|
{
|
|
778
778
|
sx: {
|
|
779
779
|
color: d ? _ : p
|
|
@@ -785,7 +785,7 @@ const H = I.createContext(null), _t = ({
|
|
|
785
785
|
]
|
|
786
786
|
}
|
|
787
787
|
);
|
|
788
|
-
},
|
|
788
|
+
}, bt = ({
|
|
789
789
|
activeCardIndex: t,
|
|
790
790
|
beats: e,
|
|
791
791
|
cardWidth: n,
|
|
@@ -793,48 +793,48 @@ const H = I.createContext(null), _t = ({
|
|
|
793
793
|
heightOverrides: a,
|
|
794
794
|
onCardClick: l,
|
|
795
795
|
posthog: r,
|
|
796
|
-
showIcon:
|
|
796
|
+
showIcon: m,
|
|
797
797
|
variant: C
|
|
798
798
|
}) => {
|
|
799
|
-
const { carouselCopy:
|
|
799
|
+
const { carouselCopy: h } = x(), g = {
|
|
800
800
|
elevation: i,
|
|
801
801
|
heightOverrides: a,
|
|
802
802
|
posthog: r,
|
|
803
|
-
showIcon:
|
|
803
|
+
showIcon: m,
|
|
804
804
|
variant: C
|
|
805
805
|
};
|
|
806
|
-
return /* @__PURE__ */
|
|
806
|
+
return /* @__PURE__ */ N(we, { children: [
|
|
807
807
|
e.map((d, _) => {
|
|
808
|
-
const p = _ + 1,
|
|
809
|
-
|
|
808
|
+
const p = _ + 1, I = e.length + 1, y = et(
|
|
809
|
+
h?.card_position_in_carousel_aria,
|
|
810
810
|
p.toString(),
|
|
811
|
-
|
|
812
|
-
), S = d.micro_title && d.micro_title.length > 0,
|
|
811
|
+
I.toString()
|
|
812
|
+
), S = d.micro_title && d.micro_title.length > 0, w = d.micro_description && d.micro_description.length > 0, T = S ? d.micro_title : d.title, f = w ? d.micro_description : d.description;
|
|
813
813
|
return /* @__PURE__ */ o(
|
|
814
|
-
|
|
814
|
+
Mt,
|
|
815
815
|
{
|
|
816
|
-
ariaLabel: `${y}: ${T}, ${
|
|
816
|
+
ariaLabel: `${y}: ${T}, ${f}`,
|
|
817
817
|
beat: d,
|
|
818
818
|
index: _,
|
|
819
819
|
isActiveCard: _ === t,
|
|
820
820
|
onCardClick: l,
|
|
821
821
|
widthOverrides: n || void 0,
|
|
822
|
-
...
|
|
822
|
+
...g
|
|
823
823
|
},
|
|
824
824
|
`${d.guid} ${_}`
|
|
825
825
|
);
|
|
826
826
|
}),
|
|
827
827
|
/* @__PURE__ */ o(
|
|
828
|
-
|
|
828
|
+
zt,
|
|
829
829
|
{
|
|
830
830
|
isActiveCard: t === e.length,
|
|
831
831
|
onCardClick: l,
|
|
832
832
|
widthOverrides: n || void 0,
|
|
833
|
-
...
|
|
833
|
+
...g
|
|
834
834
|
}
|
|
835
835
|
)
|
|
836
836
|
] });
|
|
837
|
-
},
|
|
837
|
+
}, Lt = ({
|
|
838
838
|
analyticsMetadata: t,
|
|
839
839
|
allowSingleCardPeeking: e,
|
|
840
840
|
beats: n = [],
|
|
@@ -842,49 +842,53 @@ const H = I.createContext(null), _t = ({
|
|
|
842
842
|
heightOverrides: a,
|
|
843
843
|
onCardClick: l,
|
|
844
844
|
posthog: r,
|
|
845
|
-
showCarouselControls:
|
|
845
|
+
showCarouselControls: m,
|
|
846
846
|
showIcon: C,
|
|
847
|
-
showWithMargin:
|
|
848
|
-
variant:
|
|
847
|
+
showWithMargin: h = !0,
|
|
848
|
+
variant: g,
|
|
849
849
|
widthOverrides: d,
|
|
850
850
|
visibleCardsCount: _ = 1
|
|
851
851
|
// Default to 1 card visible
|
|
852
852
|
}) => {
|
|
853
|
-
const p =
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
G = f;
|
|
863
|
-
m(G);
|
|
864
|
-
}
|
|
865
|
-
}, [_, p.current?.offsetWidth]), I.useEffect(() => {
|
|
866
|
-
const f = g.current?.offsetWidth;
|
|
867
|
-
if (typeof f == "number" && e) {
|
|
868
|
-
const z = (K) => {
|
|
869
|
-
const _e = [
|
|
853
|
+
const p = E.useRef(null), I = E.useRef(null), [y, S] = E.useState(0), [w, T] = E.useState(null), [f, ee] = E.useState(null), [R, u] = E.useState(null), { carouselCopy: $ } = x(), { onEvent: M } = H();
|
|
854
|
+
E.useEffect(() => {
|
|
855
|
+
const A = (re) => {
|
|
856
|
+
const G = I.current;
|
|
857
|
+
if (!G) return;
|
|
858
|
+
const U = re ?? G.offsetWidth;
|
|
859
|
+
if (e) {
|
|
860
|
+
const Q = [
|
|
861
|
+
{ maxWidth: 320, cardWidth: 220 },
|
|
870
862
|
{ maxWidth: 375, cardWidth: 268 },
|
|
871
863
|
{ maxWidth: 444, cardWidth: 300 },
|
|
872
864
|
{ maxWidth: 599, cardWidth: 350 },
|
|
873
865
|
{ maxWidth: 749, cardWidth: 450 },
|
|
874
866
|
{ maxWidth: 900, cardWidth: 600 }
|
|
875
|
-
].find((
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
867
|
+
].find((Fe) => U <= Fe.maxWidth);
|
|
868
|
+
u(Q ? Q.cardWidth : 750);
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
const ae = h ? Math.max(0, U - 32) : U, Ce = 8;
|
|
872
|
+
let se;
|
|
873
|
+
if (_ > 1) {
|
|
874
|
+
const Q = (ae - (_ - 1) * Ce) / _ / 3;
|
|
875
|
+
se = (ae - Q - (_ - 1) * Ce) / _;
|
|
876
|
+
} else
|
|
877
|
+
se = ae;
|
|
878
|
+
u(Math.max(0, se));
|
|
879
|
+
};
|
|
880
|
+
A();
|
|
881
|
+
const ue = () => A();
|
|
882
|
+
let ie = null;
|
|
883
|
+
return typeof ResizeObserver < "u" && I.current ? (ie = new ResizeObserver((re) => {
|
|
884
|
+
const G = re[0];
|
|
885
|
+
if (!G) return;
|
|
886
|
+
const U = G.borderBoxSize?.[0]?.inlineSize ?? G.contentRect.width;
|
|
887
|
+
A(U);
|
|
888
|
+
}), ie.observe(I.current)) : window.addEventListener("resize", ue), () => {
|
|
889
|
+
window.removeEventListener("resize", ue), ie?.disconnect();
|
|
890
|
+
};
|
|
891
|
+
}, [e, _, h]);
|
|
888
892
|
const V = () => {
|
|
889
893
|
M(W.ON_CAROUSEL_FORWARD_CLICK, t), p.current && R && p.current.scrollTo({
|
|
890
894
|
left: y + R + 8,
|
|
@@ -897,22 +901,22 @@ const H = I.createContext(null), _t = ({
|
|
|
897
901
|
top: 0,
|
|
898
902
|
behavior: "smooth"
|
|
899
903
|
});
|
|
900
|
-
},
|
|
904
|
+
}, j = () => {
|
|
901
905
|
p.current && S(p.current.scrollLeft);
|
|
902
|
-
},
|
|
903
|
-
if (!
|
|
904
|
-
|
|
905
|
-
}, oe = (
|
|
906
|
-
T(
|
|
907
|
-
}, ne = (
|
|
908
|
-
T(null), ee(
|
|
909
|
-
},
|
|
910
|
-
return /* @__PURE__ */
|
|
906
|
+
}, Y = () => {
|
|
907
|
+
if (!f || !w) return;
|
|
908
|
+
f - w > Nt ? M(W.ON_CAROUSEL_FORWARD_SWIPE, t) : M(W.ON_CAROUSEL_BACK_SWIPE, t);
|
|
909
|
+
}, oe = (A) => {
|
|
910
|
+
T(A.targetTouches[0].clientX);
|
|
911
|
+
}, ne = (A) => {
|
|
912
|
+
T(null), ee(A.targetTouches[0].clientX);
|
|
913
|
+
}, X = R ? Math.round(y / (R + 8)) : 0, Z = p.current ? p.current.scrollWidth - p.current.offsetWidth : 0;
|
|
914
|
+
return /* @__PURE__ */ N(
|
|
911
915
|
k,
|
|
912
916
|
{
|
|
913
|
-
"aria-label":
|
|
917
|
+
"aria-label": $?.carousel_title,
|
|
914
918
|
"aria-roledescription": "carousel",
|
|
915
|
-
ref:
|
|
919
|
+
ref: I,
|
|
916
920
|
role: "region",
|
|
917
921
|
sx: {
|
|
918
922
|
alignItems: "center",
|
|
@@ -925,8 +929,8 @@ const H = I.createContext(null), _t = ({
|
|
|
925
929
|
k,
|
|
926
930
|
{
|
|
927
931
|
direction: "row",
|
|
928
|
-
onScroll:
|
|
929
|
-
onTouchEnd:
|
|
932
|
+
onScroll: j,
|
|
933
|
+
onTouchEnd: Y,
|
|
930
934
|
onTouchMove: oe,
|
|
931
935
|
onTouchStart: ne,
|
|
932
936
|
ref: p,
|
|
@@ -936,7 +940,7 @@ const H = I.createContext(null), _t = ({
|
|
|
936
940
|
gap: 8,
|
|
937
941
|
listStyleType: "none",
|
|
938
942
|
m: 0,
|
|
939
|
-
maxWidth:
|
|
943
|
+
maxWidth: h ? "calc(100% - 32px)" : "100%",
|
|
940
944
|
overflowX: "auto",
|
|
941
945
|
overflowY: "hidden",
|
|
942
946
|
p: 0,
|
|
@@ -948,9 +952,9 @@ const H = I.createContext(null), _t = ({
|
|
|
948
952
|
}
|
|
949
953
|
},
|
|
950
954
|
children: /* @__PURE__ */ o(
|
|
951
|
-
|
|
955
|
+
bt,
|
|
952
956
|
{
|
|
953
|
-
activeCardIndex:
|
|
957
|
+
activeCardIndex: X,
|
|
954
958
|
beats: n,
|
|
955
959
|
cardWidth: R,
|
|
956
960
|
elevation: i,
|
|
@@ -958,19 +962,19 @@ const H = I.createContext(null), _t = ({
|
|
|
958
962
|
onCardClick: l,
|
|
959
963
|
posthog: r,
|
|
960
964
|
showIcon: C,
|
|
961
|
-
variant:
|
|
965
|
+
variant: g
|
|
962
966
|
}
|
|
963
967
|
)
|
|
964
968
|
}
|
|
965
969
|
),
|
|
966
|
-
|
|
967
|
-
|
|
970
|
+
m && /* @__PURE__ */ o(
|
|
971
|
+
vt,
|
|
968
972
|
{
|
|
969
|
-
currentBeatIndex:
|
|
973
|
+
currentBeatIndex: X + _ - 1,
|
|
970
974
|
numBeats: n.length + 1,
|
|
971
975
|
onNextClick: V,
|
|
972
976
|
onPreviousClick: te,
|
|
973
|
-
scrollRightBoundary:
|
|
977
|
+
scrollRightBoundary: Z,
|
|
974
978
|
scrollX: y,
|
|
975
979
|
shouldApplyDotAnimation: e,
|
|
976
980
|
visibleCardsCount: _
|
|
@@ -979,17 +983,17 @@ const H = I.createContext(null), _t = ({
|
|
|
979
983
|
]
|
|
980
984
|
}
|
|
981
985
|
);
|
|
982
|
-
},
|
|
986
|
+
}, xt = z(Lt), Dt = ({
|
|
983
987
|
analyticsMetadata: t,
|
|
984
988
|
onCardClick: e,
|
|
985
989
|
posthog: n,
|
|
986
990
|
widthOverrides: i,
|
|
987
991
|
headerSx: a
|
|
988
992
|
}) => {
|
|
989
|
-
const { carouselCopy: l } =
|
|
993
|
+
const { carouselCopy: l } = x(), { onEvent: r } = H(), m = () => {
|
|
990
994
|
r && (r(W.ON_VIEW_MORE_CLICKED, t), e(), n?.capture("clicked_view_more"));
|
|
991
995
|
};
|
|
992
|
-
return l ? /* @__PURE__ */
|
|
996
|
+
return l ? /* @__PURE__ */ N(
|
|
993
997
|
k,
|
|
994
998
|
{
|
|
995
999
|
alignItems: "center",
|
|
@@ -1003,12 +1007,12 @@ const H = I.createContext(null), _t = ({
|
|
|
1003
1007
|
...a
|
|
1004
1008
|
},
|
|
1005
1009
|
children: [
|
|
1006
|
-
/* @__PURE__ */ o(
|
|
1010
|
+
/* @__PURE__ */ o(Xe, { children: l.carousel_title }),
|
|
1007
1011
|
/* @__PURE__ */ o(
|
|
1008
|
-
|
|
1012
|
+
He,
|
|
1009
1013
|
{
|
|
1010
|
-
endIcon: /* @__PURE__ */ o(
|
|
1011
|
-
onClick:
|
|
1014
|
+
endIcon: /* @__PURE__ */ o(Ne, { size: 20 }),
|
|
1015
|
+
onClick: m,
|
|
1012
1016
|
size: "small",
|
|
1013
1017
|
variant: "text",
|
|
1014
1018
|
children: l.view_all_insights_in_full_feed_cta_aria
|
|
@@ -1016,15 +1020,15 @@ const H = I.createContext(null), _t = ({
|
|
|
1016
1020
|
)
|
|
1017
1021
|
]
|
|
1018
1022
|
}
|
|
1019
|
-
) : /* @__PURE__ */ o(
|
|
1020
|
-
},
|
|
1023
|
+
) : /* @__PURE__ */ o(qe, {});
|
|
1024
|
+
}, Bt = z(Dt), Pt = ({
|
|
1021
1025
|
heightOverrides: t,
|
|
1022
1026
|
widthOverrides: e,
|
|
1023
1027
|
children: n
|
|
1024
1028
|
}) => {
|
|
1025
|
-
const { carouselCopy: i } =
|
|
1029
|
+
const { carouselCopy: i } = x();
|
|
1026
1030
|
return /* @__PURE__ */ o(
|
|
1027
|
-
|
|
1031
|
+
de,
|
|
1028
1032
|
{
|
|
1029
1033
|
"aria-label": i?.carousel_title,
|
|
1030
1034
|
"aria-roledescription": "carousel",
|
|
@@ -1038,7 +1042,7 @@ const H = I.createContext(null), _t = ({
|
|
|
1038
1042
|
children: n
|
|
1039
1043
|
}
|
|
1040
1044
|
);
|
|
1041
|
-
},
|
|
1045
|
+
}, ze = ({
|
|
1042
1046
|
ariaLabel: t,
|
|
1043
1047
|
elevation: e,
|
|
1044
1048
|
heightOverrides: n,
|
|
@@ -1047,12 +1051,12 @@ const H = I.createContext(null), _t = ({
|
|
|
1047
1051
|
showIcon: l,
|
|
1048
1052
|
variant: r
|
|
1049
1053
|
}) => {
|
|
1050
|
-
const { cardsCopy:
|
|
1051
|
-
|
|
1052
|
-
|
|
1054
|
+
const { cardsCopy: m } = x(), C = P(), { onEvent: h } = H(), { onPageview: g } = Ge();
|
|
1055
|
+
E.useEffect(() => {
|
|
1056
|
+
g(B.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1053
1057
|
}, []);
|
|
1054
1058
|
const d = () => {
|
|
1055
|
-
i && i(),
|
|
1059
|
+
i && i(), h(W.ON_NO_RELEVANT_INSIGHTS_CLICKED), a?.capture("clicked_insight", {
|
|
1056
1060
|
template: "no_relevant_insights"
|
|
1057
1061
|
});
|
|
1058
1062
|
};
|
|
@@ -1060,18 +1064,18 @@ const H = I.createContext(null), _t = ({
|
|
|
1060
1064
|
J,
|
|
1061
1065
|
{
|
|
1062
1066
|
ariaLabel: t,
|
|
1063
|
-
description:
|
|
1067
|
+
description: m.no_relevant_insights_card_description,
|
|
1064
1068
|
elevation: e,
|
|
1065
1069
|
heightOverrides: n,
|
|
1066
1070
|
icon: l && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1067
1071
|
onCardClick: d,
|
|
1068
1072
|
onPrimaryAction: d,
|
|
1069
|
-
primaryActionText:
|
|
1070
|
-
title:
|
|
1073
|
+
primaryActionText: m.micro_card_cta,
|
|
1074
|
+
title: m.no_relevant_insights_card_title,
|
|
1071
1075
|
variant: r
|
|
1072
1076
|
}
|
|
1073
1077
|
);
|
|
1074
|
-
},
|
|
1078
|
+
}, lo = z(ze), Ue = ({
|
|
1075
1079
|
ariaLabel: t,
|
|
1076
1080
|
elevation: e,
|
|
1077
1081
|
heightOverrides: n,
|
|
@@ -1079,24 +1083,24 @@ const H = I.createContext(null), _t = ({
|
|
|
1079
1083
|
showIcon: a,
|
|
1080
1084
|
variant: l
|
|
1081
1085
|
}) => {
|
|
1082
|
-
const { onPageview: r } =
|
|
1083
|
-
return
|
|
1086
|
+
const { onPageview: r } = Ge(), { zeroStateCopy: m } = x(), C = P();
|
|
1087
|
+
return E.useEffect(() => {
|
|
1084
1088
|
r(B.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1085
1089
|
}, []), /* @__PURE__ */ o(
|
|
1086
1090
|
J,
|
|
1087
1091
|
{
|
|
1088
1092
|
ariaLabel: t,
|
|
1089
|
-
description:
|
|
1093
|
+
description: m.carousel_zero_state_description,
|
|
1090
1094
|
elevation: e,
|
|
1091
1095
|
heightOverrides: n,
|
|
1092
1096
|
icon: a && /* @__PURE__ */ o(c, { bgColor: s(C.palette.primary.main, 0.15), name: "lightbulb" }),
|
|
1093
1097
|
onCardClick: i,
|
|
1094
|
-
title:
|
|
1098
|
+
title: m.carousel_zero_state_title,
|
|
1095
1099
|
variant: l
|
|
1096
1100
|
}
|
|
1097
1101
|
);
|
|
1098
|
-
},
|
|
1099
|
-
|
|
1102
|
+
}, _o = z(Ue), Vt = () => /* @__PURE__ */ o(
|
|
1103
|
+
de,
|
|
1100
1104
|
{
|
|
1101
1105
|
sx: {
|
|
1102
1106
|
alignItems: "center",
|
|
@@ -1105,11 +1109,11 @@ const H = I.createContext(null), _t = ({
|
|
|
1105
1109
|
justifyContent: "center",
|
|
1106
1110
|
width: "100%"
|
|
1107
1111
|
},
|
|
1108
|
-
children: /* @__PURE__ */ o(
|
|
1112
|
+
children: /* @__PURE__ */ o(tt, {})
|
|
1109
1113
|
}
|
|
1110
|
-
),
|
|
1114
|
+
), We = {
|
|
1111
1115
|
featureVersion: "spendVsIncomeTrends"
|
|
1112
|
-
},
|
|
1116
|
+
}, D = new Ct(), Gt = ({
|
|
1113
1117
|
allowSingleCardPeeking: t = !0,
|
|
1114
1118
|
areBeatsLoading: e = !1,
|
|
1115
1119
|
beats: n = [],
|
|
@@ -1118,80 +1122,80 @@ const H = I.createContext(null), _t = ({
|
|
|
1118
1122
|
endpoint: a = "/",
|
|
1119
1123
|
headerSx: l,
|
|
1120
1124
|
heightOverrides: r,
|
|
1121
|
-
logOutUser:
|
|
1125
|
+
logOutUser: m = () => {
|
|
1122
1126
|
},
|
|
1123
1127
|
onCardClick: C = () => {
|
|
1124
1128
|
},
|
|
1125
|
-
onEvent:
|
|
1129
|
+
onEvent: h = () => {
|
|
1126
1130
|
},
|
|
1127
|
-
onPageview:
|
|
1131
|
+
onPageview: g = () => {
|
|
1128
1132
|
},
|
|
1129
1133
|
posthog: d,
|
|
1130
1134
|
showCarouselControls: _,
|
|
1131
1135
|
showHeader: p,
|
|
1132
|
-
showIcon:
|
|
1136
|
+
showIcon: I,
|
|
1133
1137
|
showWithMargin: y = !0,
|
|
1134
1138
|
token: S = "",
|
|
1135
|
-
userHasFullInsightFeedBeats:
|
|
1139
|
+
userHasFullInsightFeedBeats: w,
|
|
1136
1140
|
visibleCardsCount: T = 1,
|
|
1137
|
-
widthOverrides:
|
|
1141
|
+
widthOverrides: f
|
|
1138
1142
|
}) => {
|
|
1139
1143
|
const R = (() => {
|
|
1140
1144
|
if (i === "border") return "outlined";
|
|
1141
1145
|
if (i === "elevation 1") return "elevation";
|
|
1142
1146
|
if (i !== "flat")
|
|
1143
1147
|
return "elevation";
|
|
1144
|
-
})(),
|
|
1145
|
-
|
|
1148
|
+
})(), u = i === "flat" ? 0 : 1, [$, M] = ce("STANDARD"), [V, te] = ce(!1), [j, Y] = ce(!1), oe = nt([h], D), ne = it([g], D);
|
|
1149
|
+
rt({
|
|
1146
1150
|
widgetName: "InsightsMicroWidget",
|
|
1147
1151
|
isLoaded: V
|
|
1148
|
-
}),
|
|
1149
|
-
!
|
|
1150
|
-
}, [a, S,
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1153
|
-
}, [window.innerHeight]),
|
|
1154
|
-
te(!e &&
|
|
1155
|
-
}, [e,
|
|
1156
|
-
const
|
|
1152
|
+
}), E.useEffect(() => {
|
|
1153
|
+
!D.isInitialized && !j && (D.initialize(a, S, m).catch(() => Y(!1)), Y(!0));
|
|
1154
|
+
}, [a, S, m, D.isInitialized, j]), E.useEffect(() => {
|
|
1155
|
+
const A = window.innerHeight;
|
|
1156
|
+
A < 180 ? M("STANDARD") : A >= 180 && A < 200 ? M("LARGE") : A >= 200 && A < 248 ? M("XLARGE") : A >= 248 && M("XXLARGE");
|
|
1157
|
+
}, [window.innerHeight]), E.useEffect(() => {
|
|
1158
|
+
te(!e && D.isInitialized);
|
|
1159
|
+
}, [e, D.isInitialized]);
|
|
1160
|
+
const X = {
|
|
1157
1161
|
heightOverrides: r,
|
|
1158
1162
|
onCardClick: C,
|
|
1159
1163
|
posthog: d,
|
|
1160
|
-
showIcon:
|
|
1164
|
+
showIcon: I,
|
|
1161
1165
|
showWithMargin: y,
|
|
1162
|
-
widthOverrides:
|
|
1163
|
-
},
|
|
1164
|
-
carouselSize:
|
|
1165
|
-
elevation:
|
|
1166
|
+
widthOverrides: f
|
|
1167
|
+
}, Z = {
|
|
1168
|
+
carouselSize: $,
|
|
1169
|
+
elevation: u,
|
|
1166
1170
|
variant: R,
|
|
1167
1171
|
heightOverrides: r,
|
|
1168
1172
|
onCardClick: C,
|
|
1169
1173
|
posthog: d,
|
|
1170
|
-
showIcon:
|
|
1174
|
+
showIcon: I
|
|
1171
1175
|
};
|
|
1172
|
-
return /* @__PURE__ */ o(
|
|
1173
|
-
!V && /* @__PURE__ */ o(
|
|
1176
|
+
return /* @__PURE__ */ o(ht, { onEvent: oe, onPageview: ne, store: D, children: /* @__PURE__ */ N(Pt, { heightOverrides: r, widthOverrides: f, children: [
|
|
1177
|
+
!V && /* @__PURE__ */ o(Vt, {}),
|
|
1174
1178
|
V && p && /* @__PURE__ */ o(
|
|
1175
|
-
|
|
1179
|
+
Bt,
|
|
1176
1180
|
{
|
|
1177
|
-
analyticsMetadata:
|
|
1181
|
+
analyticsMetadata: We,
|
|
1178
1182
|
headerSx: l,
|
|
1179
1183
|
onCardClick: C,
|
|
1180
1184
|
posthog: d,
|
|
1181
|
-
widthOverrides:
|
|
1185
|
+
widthOverrides: f
|
|
1182
1186
|
}
|
|
1183
1187
|
),
|
|
1184
1188
|
V && !!n.length && /* @__PURE__ */ o(
|
|
1185
|
-
|
|
1189
|
+
xt,
|
|
1186
1190
|
{
|
|
1187
1191
|
allowSingleCardPeeking: t,
|
|
1188
|
-
analyticsMetadata:
|
|
1192
|
+
analyticsMetadata: We,
|
|
1189
1193
|
beats: n,
|
|
1190
|
-
elevation:
|
|
1194
|
+
elevation: u,
|
|
1191
1195
|
showCarouselControls: _,
|
|
1192
1196
|
variant: R,
|
|
1193
1197
|
visibleCardsCount: T,
|
|
1194
|
-
...
|
|
1198
|
+
...X
|
|
1195
1199
|
}
|
|
1196
1200
|
),
|
|
1197
1201
|
V && !n.length && /* @__PURE__ */ o(
|
|
@@ -1200,22 +1204,22 @@ const H = I.createContext(null), _t = ({
|
|
|
1200
1204
|
sx: {
|
|
1201
1205
|
alignItems: "center",
|
|
1202
1206
|
height: r,
|
|
1203
|
-
width:
|
|
1207
|
+
width: f || "100%"
|
|
1204
1208
|
},
|
|
1205
1209
|
children: /* @__PURE__ */ o(
|
|
1206
1210
|
k,
|
|
1207
1211
|
{
|
|
1208
1212
|
sx: {
|
|
1209
|
-
height: `calc(${
|
|
1210
|
-
width: y ? `calc(${
|
|
1213
|
+
height: `calc(${wt[$]}px - 44px)`,
|
|
1214
|
+
width: y ? `calc(${f}px - 32px)` : "100%"
|
|
1211
1215
|
},
|
|
1212
|
-
children:
|
|
1216
|
+
children: w ? /* @__PURE__ */ o(ze, { ...Z }) : /* @__PURE__ */ o(Ue, { ...Z })
|
|
1213
1217
|
}
|
|
1214
1218
|
)
|
|
1215
1219
|
}
|
|
1216
1220
|
)
|
|
1217
1221
|
] }) });
|
|
1218
|
-
},
|
|
1222
|
+
}, po = z(Gt), kt = ({
|
|
1219
1223
|
ariaLabel: t,
|
|
1220
1224
|
elevation: e,
|
|
1221
1225
|
heightOverrides: n,
|
|
@@ -1223,18 +1227,18 @@ const H = I.createContext(null), _t = ({
|
|
|
1223
1227
|
onCardClick: a,
|
|
1224
1228
|
posthog: l,
|
|
1225
1229
|
widthOverrides: r,
|
|
1226
|
-
showIcon:
|
|
1230
|
+
showIcon: m,
|
|
1227
1231
|
variant: C
|
|
1228
1232
|
}) => {
|
|
1229
|
-
const
|
|
1230
|
-
threshold:
|
|
1231
|
-
}), { cardsCopy: _ } =
|
|
1232
|
-
|
|
1233
|
-
d && (p(
|
|
1233
|
+
const h = P(), { ref: g, inView: d } = Me({
|
|
1234
|
+
threshold: ke
|
|
1235
|
+
}), { cardsCopy: _ } = x(), { onEvent: p } = H();
|
|
1236
|
+
le(() => {
|
|
1237
|
+
d && (p(De.ON_VIEW_MORE_VIEWED), l?.capture("viewed_insight", {
|
|
1234
1238
|
template: "view_more_card"
|
|
1235
1239
|
}));
|
|
1236
1240
|
}, [d]);
|
|
1237
|
-
const
|
|
1241
|
+
const I = () => {
|
|
1238
1242
|
a && a(), p(W.ON_VIEW_MORE_CLICKED), l?.capture("clicked_insight", {
|
|
1239
1243
|
template: "view_more_card"
|
|
1240
1244
|
});
|
|
@@ -1247,29 +1251,29 @@ const H = I.createContext(null), _t = ({
|
|
|
1247
1251
|
description: _?.view_more_card_description,
|
|
1248
1252
|
elevation: e,
|
|
1249
1253
|
heightOverrides: n,
|
|
1250
|
-
icon:
|
|
1254
|
+
icon: m && /* @__PURE__ */ o(c, { bgColor: s(h.palette.primary.main, 0.15), name: "show_chart" }),
|
|
1251
1255
|
isActiveCard: i,
|
|
1252
|
-
onCardClick:
|
|
1253
|
-
onPrimaryAction:
|
|
1256
|
+
onCardClick: I,
|
|
1257
|
+
onPrimaryAction: I,
|
|
1254
1258
|
primaryActionText: _?.micro_card_cta,
|
|
1255
|
-
ref:
|
|
1259
|
+
ref: g,
|
|
1256
1260
|
title: _?.view_more_card_title,
|
|
1257
1261
|
variant: C,
|
|
1258
1262
|
widthOverrides: r
|
|
1259
1263
|
}
|
|
1260
1264
|
);
|
|
1261
|
-
},
|
|
1265
|
+
}, zt = z(kt);
|
|
1262
1266
|
export {
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1267
|
+
Ct as A,
|
|
1268
|
+
Bt as C,
|
|
1269
|
+
Mt as I,
|
|
1270
|
+
xt as M,
|
|
1271
|
+
lo as N,
|
|
1272
|
+
We as T,
|
|
1273
|
+
zt as V,
|
|
1274
|
+
_o as Z,
|
|
1275
|
+
po as a,
|
|
1276
|
+
ht as b,
|
|
1273
1277
|
J as c,
|
|
1274
|
-
|
|
1278
|
+
ft as d
|
|
1275
1279
|
};
|