@mx-cartographer/experiences 7.4.1 → 7.4.3
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 +8 -0
- package/dist/{AccountDetailsContent-gke-5zMF.mjs → AccountDetailsContent-COMjOzwr.mjs} +5 -5
- package/dist/{AccountDetailsHeader-CRzfuFA2.mjs → AccountDetailsHeader-Cbi5G6fJ.mjs} +2 -2
- package/dist/{AccountFields-CPkGZ3SD.mjs → AccountFields-Cd_nOWmf.mjs} +1 -1
- package/dist/{AccountListItem-D4uG9yC-.mjs → AccountListItem-DxY4cCF1.mjs} +2 -2
- package/dist/{BudgetUtil-wjoNuj7B.mjs → BudgetUtil-Df2nII9u.mjs} +1 -1
- package/dist/{CurrencyInput-xH-hqry9.mjs → CurrencyInput-BFKcs-_K.mjs} +1 -1
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{FinstrongStore-CfD6bbJk.mjs → FinstrongStore-BnBCtVTl.mjs} +1 -1
- package/dist/{GoalStore-j6QYHgEa.mjs → GoalStore-CrNhjvNc.mjs} +1 -1
- package/dist/{LineChart-DttMO7uS.mjs → LineChart-bc1D9xBE.mjs} +81 -81
- package/dist/{ManageIncome-CU5C0AeO.mjs → ManageIncome-A69EUO5u.mjs} +3 -3
- package/dist/{NotificationSettings-DI5B1spM.mjs → NotificationSettings-CNmJWVeI.mjs} +2 -2
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CCmnsd7y.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +2 -2
- package/dist/{RecurringSettings-Cm5Bqcai.mjs → RecurringSettings-B0uObPlD.mjs} +2 -2
- package/dist/{RecurringTransactions-CngsRZ3K.mjs → RecurringTransactions-BqijW_8S.mjs} +1 -1
- package/dist/{RecurringTransactionsStore-Bc1wCiNB.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +1 -1
- package/dist/{SpendingLegend-B2BYr8B4.mjs → SpendingLegend-BbrZWbFX.mjs} +2 -2
- package/dist/{TransactionDetails-CtbBBSoU.mjs → TransactionDetails-COH0OKNG.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-dHzKolxh.mjs → ViewMoreMicroCard-C0832BMe.mjs} +420 -413
- package/dist/accounts/index.es.js +8 -8
- package/dist/budgets/index.es.js +5 -5
- package/dist/cashflow/index.es.js +7 -7
- package/dist/common/index.es.js +11 -11
- package/dist/debts/index.es.js +4 -4
- package/dist/finstrong/index.es.js +417 -413
- package/dist/goals/index.es.js +7 -7
- package/dist/investments/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +0 -1
- package/dist/networth/index.es.js +3 -3
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +2 -2
- package/dist/spending/index.es.js +3 -3
- package/dist/transactions/index.es.js +4 -4
- package/dist/trends/index.es.js +319 -320
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as g, Fragment as De } from "react/jsx-runtime";
|
|
2
|
+
import u, { useEffect as ee, useState as J } from "react";
|
|
3
|
+
import { observer as P } from "mobx-react-lite";
|
|
4
|
+
import k from "@mui/material/Stack";
|
|
5
5
|
import xe from "@mui/material/Button";
|
|
6
6
|
import Le from "@mui/material/Typography";
|
|
7
|
-
import { BarChart as Ve, Error as
|
|
7
|
+
import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as fe } from "@mxenabled/mx-icons";
|
|
8
8
|
import { L as ke } from "./Loader-DUaFpDGv.mjs";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import Z from "@mui/material/Box";
|
|
10
|
+
import se from "@mui/material/IconButton";
|
|
11
11
|
import { useTheme as Fe } from "@mui/material/styles";
|
|
12
|
-
import { useInView as
|
|
12
|
+
import { useInView as me } from "react-intersection-observer";
|
|
13
13
|
import { P as Be, CategoryIcon as Ze, MerchantLogo as Pe } from "@mxenabled/mxui";
|
|
14
14
|
import { b as be } from "./Category-CevNQ03n.mjs";
|
|
15
|
-
import
|
|
15
|
+
import te from "@mui/material/styles/useTheme";
|
|
16
16
|
import { b as Ge } from "./Localization-2MODESHW.mjs";
|
|
17
17
|
import Ue from "@mui/material/CircularProgress";
|
|
18
|
-
import { makeAutoObservable as
|
|
19
|
-
import { G as
|
|
20
|
-
import { B as
|
|
18
|
+
import { makeAutoObservable as ie, runInAction as Re } from "mobx";
|
|
19
|
+
import { G as ce, a as ze, u as Ke, b as $e } from "./useCombineEvents-CRwX-qWE.mjs";
|
|
20
|
+
import { B as de } from "./BeatApi-De2IaqH2.mjs";
|
|
21
21
|
import Ye from "@mui/material/Card";
|
|
22
22
|
import je from "@mui/material/CardActions";
|
|
23
23
|
import Xe from "@mui/material/CardContent";
|
|
@@ -26,22 +26,22 @@ const Ee = {
|
|
|
26
26
|
featureVersion: "spendVsIncomeTrends"
|
|
27
27
|
};
|
|
28
28
|
class qe {
|
|
29
|
-
copyApi = new
|
|
29
|
+
copyApi = new ce("/", "");
|
|
30
30
|
copyObject = {};
|
|
31
31
|
namespace = "experiences";
|
|
32
32
|
translationKey = "micro_insights";
|
|
33
33
|
constructor() {
|
|
34
|
-
|
|
34
|
+
ie(this);
|
|
35
35
|
}
|
|
36
36
|
// NOTE: Not sure if this is special case, but other stores have this deprecation todo
|
|
37
37
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
38
38
|
// TODO: Remove this function
|
|
39
39
|
initialize = async (o, t) => {
|
|
40
|
-
this.copyApi = new
|
|
40
|
+
this.copyApi = new ce(o, t), await this.loadCopy();
|
|
41
41
|
};
|
|
42
42
|
loadCopy = async () => {
|
|
43
43
|
const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
44
|
-
|
|
44
|
+
Re(() => {
|
|
45
45
|
this.copyObject = o[this.translationKey];
|
|
46
46
|
});
|
|
47
47
|
};
|
|
@@ -55,7 +55,7 @@ class qe {
|
|
|
55
55
|
return this.copyObject.zero_state;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const oe = {
|
|
59
59
|
BillAmountNotStandard: "BillAmountNotStandard",
|
|
60
60
|
CanadianUpcomingDeadlineAlert: "CanadianUpcomingDeadlineAlert",
|
|
61
61
|
DuplicatePaymentV2: "DuplicatePaymentV2",
|
|
@@ -72,59 +72,59 @@ const le = {
|
|
|
72
72
|
WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
|
|
73
73
|
MonthlySpendComparison: "MonthlySpendComparison",
|
|
74
74
|
MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
|
|
75
|
-
}, v = window?.app?.clientConfig?.microwidget_instance_id || "",
|
|
75
|
+
}, v = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
|
|
76
76
|
INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
|
|
77
|
-
},
|
|
77
|
+
}, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ye = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), Je = () => Object.values(oe).reduce(
|
|
78
78
|
(i, o) => ({
|
|
79
79
|
...i,
|
|
80
|
-
[
|
|
81
|
-
action:
|
|
82
|
-
category:
|
|
83
|
-
label:
|
|
80
|
+
[ge(o)]: {
|
|
81
|
+
action: L.MICRO_BEAT_CLICKED,
|
|
82
|
+
category: x.BEAT_INTERACTION,
|
|
83
|
+
label: le(o),
|
|
84
84
|
value: v
|
|
85
85
|
}
|
|
86
86
|
}),
|
|
87
87
|
{}
|
|
88
|
-
), et = () => Object.values(
|
|
88
|
+
), et = () => Object.values(oe).reduce(
|
|
89
89
|
(i, o) => ({
|
|
90
90
|
...i,
|
|
91
|
-
[
|
|
92
|
-
action:
|
|
93
|
-
category:
|
|
94
|
-
label:
|
|
91
|
+
[Ie(o)]: {
|
|
92
|
+
action: L.MICRO_BEAT_DISPLAYED,
|
|
93
|
+
category: x.BEAT_INTERACTION,
|
|
94
|
+
label: le(o),
|
|
95
95
|
value: v
|
|
96
96
|
}
|
|
97
97
|
}),
|
|
98
98
|
{}
|
|
99
|
-
), tt = () => Object.values(
|
|
99
|
+
), tt = () => Object.values(oe).reduce(
|
|
100
100
|
(i, o) => ({
|
|
101
101
|
...i,
|
|
102
102
|
[ye(o)]: {
|
|
103
|
-
action:
|
|
104
|
-
category:
|
|
105
|
-
label:
|
|
103
|
+
action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
|
|
104
|
+
category: x.BEAT_INTERACTION,
|
|
105
|
+
label: le(o),
|
|
106
106
|
value: v
|
|
107
107
|
}
|
|
108
108
|
}),
|
|
109
109
|
{}
|
|
110
|
-
),
|
|
110
|
+
), D = {
|
|
111
111
|
CARD: "Card",
|
|
112
112
|
CAROUSEL_CONTROL: "Carousel Control",
|
|
113
113
|
MICRO_WIDGET: "Micro Widget",
|
|
114
114
|
VIEW_MORE: "View More"
|
|
115
|
-
},
|
|
115
|
+
}, x = {
|
|
116
116
|
MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
|
|
117
117
|
BEAT_INTERACTION: "Beat Interaction"
|
|
118
|
-
},
|
|
118
|
+
}, S = {
|
|
119
119
|
ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
|
|
120
120
|
ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
|
|
121
121
|
ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
|
|
122
122
|
ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
|
|
123
123
|
ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
|
|
124
124
|
ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
|
|
125
|
-
},
|
|
125
|
+
}, ve = {
|
|
126
126
|
ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
|
|
127
|
-
},
|
|
127
|
+
}, L = {
|
|
128
128
|
CONTROL_BACKWARD: "Control Backward",
|
|
129
129
|
CONTROL_FORWARD: "Control Forward",
|
|
130
130
|
MICRO_BEAT_CLICKED: "Micro Beat Clicked",
|
|
@@ -136,91 +136,91 @@ const le = {
|
|
|
136
136
|
MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
|
|
137
137
|
MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
|
|
138
138
|
MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
|
|
139
|
-
},
|
|
139
|
+
}, ue = {
|
|
140
140
|
[H.MICRO_WIDGET_CAROUSEL]: {
|
|
141
|
-
label:
|
|
141
|
+
label: D.MICRO_WIDGET,
|
|
142
142
|
name: H.MICRO_WIDGET_CAROUSEL,
|
|
143
|
-
path:
|
|
143
|
+
path: he.INSIGHTS_MICRO_WIDGET,
|
|
144
144
|
value: v
|
|
145
145
|
},
|
|
146
146
|
// zero state
|
|
147
147
|
[H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
|
|
148
|
-
label:
|
|
148
|
+
label: D.MICRO_WIDGET,
|
|
149
149
|
name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
|
|
150
|
-
path:
|
|
150
|
+
path: he.INSIGHTS_MICRO_WIDGET,
|
|
151
151
|
value: v
|
|
152
152
|
},
|
|
153
153
|
// no relevant cards
|
|
154
154
|
[H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
|
|
155
|
-
label:
|
|
155
|
+
label: D.MICRO_WIDGET,
|
|
156
156
|
name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
|
|
157
157
|
path: "/micro-widget",
|
|
158
158
|
value: v
|
|
159
159
|
}
|
|
160
|
-
},
|
|
160
|
+
}, pe = {
|
|
161
161
|
// carousel control interaction events - clicks and swipes
|
|
162
|
-
[
|
|
163
|
-
action:
|
|
164
|
-
category:
|
|
165
|
-
label:
|
|
162
|
+
[S.ON_CAROUSEL_BACK_CLICK]: {
|
|
163
|
+
action: L.CONTROL_BACKWARD,
|
|
164
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
165
|
+
label: D.CAROUSEL_CONTROL,
|
|
166
166
|
value: v
|
|
167
167
|
},
|
|
168
|
-
[
|
|
169
|
-
action:
|
|
170
|
-
category:
|
|
171
|
-
label:
|
|
168
|
+
[S.ON_CAROUSEL_FORWARD_CLICK]: {
|
|
169
|
+
action: L.CONTROL_FORWARD,
|
|
170
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
171
|
+
label: D.CAROUSEL_CONTROL,
|
|
172
172
|
value: v
|
|
173
173
|
},
|
|
174
|
-
[
|
|
175
|
-
action:
|
|
176
|
-
category:
|
|
177
|
-
label:
|
|
174
|
+
[S.ON_CAROUSEL_BACK_SWIPE]: {
|
|
175
|
+
action: L.SWIPE_BACKWARD,
|
|
176
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
177
|
+
label: D.CAROUSEL_CONTROL,
|
|
178
178
|
value: v
|
|
179
179
|
},
|
|
180
|
-
[
|
|
181
|
-
action:
|
|
182
|
-
category:
|
|
183
|
-
label:
|
|
180
|
+
[S.ON_CAROUSEL_FORWARD_SWIPE]: {
|
|
181
|
+
action: L.SWIPE_FORWARD,
|
|
182
|
+
category: x.MICRO_WIDGET_INTERACTION,
|
|
183
|
+
label: D.CAROUSEL_CONTROL,
|
|
184
184
|
value: v
|
|
185
185
|
},
|
|
186
186
|
// read more card events
|
|
187
|
-
[
|
|
188
|
-
action:
|
|
189
|
-
category:
|
|
190
|
-
label:
|
|
187
|
+
[S.ON_VIEW_MORE_CLICKED]: {
|
|
188
|
+
action: L.MICRO_BEAT_CLICKED,
|
|
189
|
+
category: x.BEAT_INTERACTION,
|
|
190
|
+
label: D.VIEW_MORE,
|
|
191
191
|
value: v
|
|
192
192
|
},
|
|
193
|
-
[
|
|
194
|
-
action:
|
|
195
|
-
category:
|
|
196
|
-
label:
|
|
193
|
+
[ve.ON_VIEW_MORE_VIEWED]: {
|
|
194
|
+
action: L.MICRO_BEAT_DISPLAYED,
|
|
195
|
+
category: x.BEAT_INTERACTION,
|
|
196
|
+
label: D.VIEW_MORE,
|
|
197
197
|
value: v
|
|
198
198
|
},
|
|
199
199
|
...Je(),
|
|
200
200
|
...et(),
|
|
201
201
|
...tt()
|
|
202
|
-
},
|
|
202
|
+
}, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
|
|
203
203
|
throw t;
|
|
204
|
-
}),
|
|
204
|
+
}), Ce = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
|
|
205
205
|
throw t;
|
|
206
206
|
});
|
|
207
207
|
class it {
|
|
208
|
-
onAnalyticEvent =
|
|
209
|
-
onAnalyticPageView =
|
|
210
|
-
beatApi = new
|
|
208
|
+
onAnalyticEvent = _e;
|
|
209
|
+
onAnalyticPageView = Ce;
|
|
210
|
+
beatApi = new de("/", "");
|
|
211
211
|
constructor() {
|
|
212
|
-
|
|
212
|
+
ie(this);
|
|
213
213
|
}
|
|
214
214
|
initialize = async (o, t, l) => {
|
|
215
|
-
this.onAnalyticEvent = (
|
|
216
|
-
|
|
215
|
+
this.onAnalyticEvent = (n, r) => {
|
|
216
|
+
_e(n, r).then((a) => a).catch((a) => {
|
|
217
217
|
throw a.status === 401 && l(), a;
|
|
218
218
|
});
|
|
219
|
-
}, this.onAnalyticPageView = (
|
|
220
|
-
|
|
219
|
+
}, this.onAnalyticPageView = (n, r) => {
|
|
220
|
+
Ce(n, r).then((a) => a).catch((a) => {
|
|
221
221
|
throw a.status === 401 && l(), a;
|
|
222
222
|
});
|
|
223
|
-
}, this.beatApi = new
|
|
223
|
+
}, this.beatApi = new de(o, t);
|
|
224
224
|
};
|
|
225
225
|
updateBeat = async (o) => {
|
|
226
226
|
this.beatApi.updateBeat(o);
|
|
@@ -237,39 +237,39 @@ class ot {
|
|
|
237
237
|
token = "";
|
|
238
238
|
isInitialized = !1;
|
|
239
239
|
constructor() {
|
|
240
|
-
this.copyStore = new qe(), this.insightsMicroWidgetStore = new it(),
|
|
240
|
+
this.copyStore = new qe(), this.insightsMicroWidgetStore = new it(), ie(this);
|
|
241
241
|
}
|
|
242
242
|
initialize = async (o, t, l) => {
|
|
243
243
|
await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
this.session =
|
|
244
|
+
const n = await ze(o, t, "1.0.0", "Micro Insights Carousel");
|
|
245
|
+
Re(() => {
|
|
246
|
+
this.session = n, this.isInitialized = !0;
|
|
247
247
|
});
|
|
248
248
|
};
|
|
249
249
|
}
|
|
250
|
-
const
|
|
250
|
+
const U = u.createContext(null), lt = ({
|
|
251
251
|
onEvent: i,
|
|
252
252
|
onPageview: o,
|
|
253
253
|
store: t,
|
|
254
254
|
children: l
|
|
255
|
-
}) => /* @__PURE__ */ e(
|
|
255
|
+
}) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), j = u.forwardRef(function({
|
|
256
256
|
actionText: o,
|
|
257
257
|
ariaLabel: t,
|
|
258
258
|
backgroundColor: l,
|
|
259
|
-
description:
|
|
260
|
-
heightOverrides:
|
|
259
|
+
description: n,
|
|
260
|
+
heightOverrides: r,
|
|
261
261
|
icon: a,
|
|
262
|
-
isActiveCard:
|
|
263
|
-
isZeroState:
|
|
262
|
+
isActiveCard: c,
|
|
263
|
+
isZeroState: h,
|
|
264
264
|
onCardClick: C = () => {
|
|
265
265
|
},
|
|
266
|
-
showIcon:
|
|
267
|
-
style:
|
|
268
|
-
title:
|
|
266
|
+
showIcon: p,
|
|
267
|
+
style: d = {},
|
|
268
|
+
title: E,
|
|
269
269
|
variant: s,
|
|
270
|
-
widthOverrides:
|
|
270
|
+
widthOverrides: f
|
|
271
271
|
}, _) {
|
|
272
|
-
const R =
|
|
272
|
+
const R = te(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, y = s ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
|
|
273
273
|
Be,
|
|
274
274
|
{
|
|
275
275
|
className: "mx-micro-card-description",
|
|
@@ -280,25 +280,25 @@ const z = p.createContext(null), lt = ({
|
|
|
280
280
|
letterSpacing: 0.48,
|
|
281
281
|
lineHeight: "20px",
|
|
282
282
|
overflow: "hidden",
|
|
283
|
-
pl:
|
|
284
|
-
pr:
|
|
283
|
+
pl: h ? 0 : 28,
|
|
284
|
+
pr: h ? 0 : 8,
|
|
285
285
|
WebkitBoxOrient: "vertical",
|
|
286
286
|
WebkitLineClamp: 2,
|
|
287
287
|
wordWrap: "break-word"
|
|
288
288
|
},
|
|
289
|
-
children:
|
|
289
|
+
children: n && /* @__PURE__ */ e(
|
|
290
290
|
"span",
|
|
291
291
|
{
|
|
292
|
-
dangerouslySetInnerHTML: { __html:
|
|
292
|
+
dangerouslySetInnerHTML: { __html: n },
|
|
293
293
|
style: { fontFamily: R.typography.fontFamily }
|
|
294
294
|
}
|
|
295
295
|
)
|
|
296
296
|
}
|
|
297
297
|
);
|
|
298
298
|
return /* @__PURE__ */ e(
|
|
299
|
-
|
|
299
|
+
Z,
|
|
300
300
|
{
|
|
301
|
-
"aria-hidden": !
|
|
301
|
+
"aria-hidden": !c,
|
|
302
302
|
"aria-label": t,
|
|
303
303
|
"aria-labelledby": "divButton",
|
|
304
304
|
"aria-roledescription": "slide",
|
|
@@ -306,26 +306,26 @@ const z = p.createContext(null), lt = ({
|
|
|
306
306
|
role: "group",
|
|
307
307
|
sx: {
|
|
308
308
|
height: "100%",
|
|
309
|
-
minWidth:
|
|
309
|
+
minWidth: f ? `${f}px` : "100%",
|
|
310
310
|
fontFamily: R.typography.fontFamily
|
|
311
311
|
},
|
|
312
312
|
children: /* @__PURE__ */ e(
|
|
313
|
-
|
|
313
|
+
Z,
|
|
314
314
|
{
|
|
315
|
-
"aria-hidden": !
|
|
315
|
+
"aria-hidden": !c,
|
|
316
316
|
"aria-label": t,
|
|
317
317
|
id: "divButton",
|
|
318
318
|
onClick: () => C(),
|
|
319
|
-
onKeyDown: () =>
|
|
320
|
-
onKeyUp: () =>
|
|
319
|
+
onKeyDown: () => I(!1),
|
|
320
|
+
onKeyUp: () => I(!0),
|
|
321
321
|
ref: _,
|
|
322
322
|
role: "button",
|
|
323
323
|
sx: {
|
|
324
|
-
border:
|
|
324
|
+
border: O ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
|
|
325
325
|
borderRadius: "8px",
|
|
326
326
|
height: "100%"
|
|
327
327
|
},
|
|
328
|
-
tabIndex:
|
|
328
|
+
tabIndex: c ? 0 : -1,
|
|
329
329
|
children: /* @__PURE__ */ e(
|
|
330
330
|
Ye,
|
|
331
331
|
{
|
|
@@ -336,16 +336,16 @@ const z = p.createContext(null), lt = ({
|
|
|
336
336
|
backgroundColor: l,
|
|
337
337
|
boxSizing: "border-box",
|
|
338
338
|
cursor: "pointer",
|
|
339
|
-
height:
|
|
339
|
+
height: r ? "100%" : 124,
|
|
340
340
|
p: 16,
|
|
341
|
-
...
|
|
341
|
+
...y,
|
|
342
342
|
"& .MuiCardHeader-avatar": {
|
|
343
343
|
mr: "8px"
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
346
|
variant: s,
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
-
|
|
347
|
+
children: /* @__PURE__ */ g(
|
|
348
|
+
k,
|
|
349
349
|
{
|
|
350
350
|
sx: {
|
|
351
351
|
alignItems: "space-between",
|
|
@@ -355,14 +355,14 @@ const z = p.createContext(null), lt = ({
|
|
|
355
355
|
/* @__PURE__ */ e(
|
|
356
356
|
Qe,
|
|
357
357
|
{
|
|
358
|
-
avatar:
|
|
359
|
-
subheader:
|
|
358
|
+
avatar: p && a,
|
|
359
|
+
subheader: h && M,
|
|
360
360
|
sx: { p: 0 },
|
|
361
|
-
title:
|
|
361
|
+
title: E,
|
|
362
362
|
titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
/* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: !
|
|
365
|
+
/* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: !h && M }),
|
|
366
366
|
!!o && /* @__PURE__ */ e(
|
|
367
367
|
je,
|
|
368
368
|
{
|
|
@@ -371,15 +371,15 @@ const z = p.createContext(null), lt = ({
|
|
|
371
371
|
p: 0
|
|
372
372
|
},
|
|
373
373
|
children: /* @__PURE__ */ e(
|
|
374
|
-
|
|
374
|
+
Z,
|
|
375
375
|
{
|
|
376
|
-
sx: (
|
|
377
|
-
color:
|
|
376
|
+
sx: (W) => ({
|
|
377
|
+
color: W.palette.primary.main,
|
|
378
378
|
fontSize: 14,
|
|
379
379
|
fontWeight: "bold",
|
|
380
380
|
px: 28,
|
|
381
|
-
fontFamily:
|
|
382
|
-
...
|
|
381
|
+
fontFamily: W.typography.fontFamily,
|
|
382
|
+
...T
|
|
383
383
|
}),
|
|
384
384
|
children: o
|
|
385
385
|
}
|
|
@@ -395,16 +395,16 @@ const z = p.createContext(null), lt = ({
|
|
|
395
395
|
)
|
|
396
396
|
}
|
|
397
397
|
);
|
|
398
|
-
}),
|
|
398
|
+
}), nt = ({ beat: i }) => {
|
|
399
399
|
const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || be.UNCATEGORIZED;
|
|
400
400
|
return /* @__PURE__ */ e(Ze, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
|
|
401
|
-
},
|
|
402
|
-
const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid:
|
|
401
|
+
}, rt = ({ beat: i }) => {
|
|
402
|
+
const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
|
|
403
403
|
return /* @__PURE__ */ e(
|
|
404
404
|
Pe,
|
|
405
405
|
{
|
|
406
406
|
categoryGuid: l || o && o[0] || "",
|
|
407
|
-
merchantGuid:
|
|
407
|
+
merchantGuid: n || t[0],
|
|
408
408
|
size: 16,
|
|
409
409
|
sx: {
|
|
410
410
|
display: "flex",
|
|
@@ -417,8 +417,8 @@ const z = p.createContext(null), lt = ({
|
|
|
417
417
|
height: o,
|
|
418
418
|
size: t = 16,
|
|
419
419
|
styles: l,
|
|
420
|
-
viewBox:
|
|
421
|
-
width:
|
|
420
|
+
viewBox: n = "0 0 16 16",
|
|
421
|
+
width: r
|
|
422
422
|
}) => /* @__PURE__ */ e(
|
|
423
423
|
"svg",
|
|
424
424
|
{
|
|
@@ -427,8 +427,8 @@ const z = p.createContext(null), lt = ({
|
|
|
427
427
|
focusable: !1,
|
|
428
428
|
height: o || t,
|
|
429
429
|
style: l,
|
|
430
|
-
viewBox:
|
|
431
|
-
width:
|
|
430
|
+
viewBox: n,
|
|
431
|
+
width: r || t,
|
|
432
432
|
xmlns: "http://www.w3.org/2000/svg",
|
|
433
433
|
children: /* @__PURE__ */ e(
|
|
434
434
|
"path",
|
|
@@ -440,16 +440,16 @@ const z = p.createContext(null), lt = ({
|
|
|
440
440
|
}
|
|
441
441
|
), st = (i) => i ? i.data ? i.data.map((o) => {
|
|
442
442
|
const t = {};
|
|
443
|
-
return i.names?.map((l,
|
|
444
|
-
t[l] = o[
|
|
443
|
+
return i.names?.map((l, n) => {
|
|
444
|
+
t[l] = o[n];
|
|
445
445
|
}), t;
|
|
446
446
|
}) : [] : [], ct = (i, o) => {
|
|
447
|
-
const t = st(i), l = t.length / 2,
|
|
448
|
-
return !
|
|
447
|
+
const t = st(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
|
|
448
|
+
return !n.length || !r.length ? o.palette.primary.main : n[0].amount > r[0].amount ? o.palette.error.main : n[0].amount < r[0].amount ? o.palette.success.main : o.palette.primary.main;
|
|
449
449
|
}, dt = ({ beat: i }) => {
|
|
450
|
-
const o =
|
|
450
|
+
const o = te(), t = ct(i.data_series, o);
|
|
451
451
|
return /* @__PURE__ */ e(Ve, { sx: { color: t } });
|
|
452
|
-
},
|
|
452
|
+
}, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
453
453
|
/* @__PURE__ */ e(
|
|
454
454
|
"path",
|
|
455
455
|
{
|
|
@@ -693,7 +693,7 @@ const z = p.createContext(null), lt = ({
|
|
|
693
693
|
fillRule: "evenodd"
|
|
694
694
|
}
|
|
695
695
|
),
|
|
696
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
|
|
697
697
|
/* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
|
|
698
698
|
"path",
|
|
699
699
|
{
|
|
@@ -949,10 +949,10 @@ const z = p.createContext(null), lt = ({
|
|
|
949
949
|
),
|
|
950
950
|
/* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
|
|
951
951
|
] }),
|
|
952
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
|
|
953
953
|
/* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
|
|
954
954
|
/* @__PURE__ */ e("mask", { height: "30", id: "mask2_1565_98011", maskUnits: "userSpaceOnUse", width: "30", x: "0", y: "1", children: /* @__PURE__ */ e("circle", { cx: "15.0435", cy: "16.0445", fill: "#F8F9FB", r: "14.3951" }) }),
|
|
955
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
|
|
956
956
|
/* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
|
|
957
957
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
|
|
958
958
|
/* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
|
|
@@ -1142,8 +1142,8 @@ const z = p.createContext(null), lt = ({
|
|
|
1142
1142
|
fill: "#CDD3DD"
|
|
1143
1143
|
}
|
|
1144
1144
|
),
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ g("defs", { children: [
|
|
1146
|
+
/* @__PURE__ */ g(
|
|
1147
1147
|
"filter",
|
|
1148
1148
|
{
|
|
1149
1149
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1186,7 +1186,7 @@ const z = p.createContext(null), lt = ({
|
|
|
1186
1186
|
]
|
|
1187
1187
|
}
|
|
1188
1188
|
),
|
|
1189
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ g(
|
|
1190
1190
|
"filter",
|
|
1191
1191
|
{
|
|
1192
1192
|
colorInterpolationFilters: "sRGB",
|
|
@@ -1230,10 +1230,10 @@ const z = p.createContext(null), lt = ({
|
|
|
1230
1230
|
}
|
|
1231
1231
|
)
|
|
1232
1232
|
] })
|
|
1233
|
-
] }),
|
|
1233
|
+
] }), Et = ({ beat: i }) => {
|
|
1234
1234
|
const { icon_type: o, icon_color: t } = i;
|
|
1235
|
-
return o === 0 ? /* @__PURE__ */ e(
|
|
1236
|
-
|
|
1235
|
+
return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(rt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(dt, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
|
|
1236
|
+
ae,
|
|
1237
1237
|
{
|
|
1238
1238
|
filled: !0,
|
|
1239
1239
|
sx: {
|
|
@@ -1241,25 +1241,25 @@ const z = p.createContext(null), lt = ({
|
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
1243
|
);
|
|
1244
|
-
},
|
|
1245
|
-
const i =
|
|
1244
|
+
}, V = () => {
|
|
1245
|
+
const i = u.useContext(U);
|
|
1246
1246
|
if (!i)
|
|
1247
1247
|
throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
|
|
1248
1248
|
return i.store.copyStore;
|
|
1249
|
-
},
|
|
1250
|
-
const i =
|
|
1249
|
+
}, ht = () => {
|
|
1250
|
+
const i = u.useContext(U);
|
|
1251
1251
|
if (!i?.store?.insightsMicroWidgetStore)
|
|
1252
1252
|
throw new Error(
|
|
1253
1253
|
"useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
|
|
1254
1254
|
);
|
|
1255
1255
|
return i.store.insightsMicroWidgetStore;
|
|
1256
|
-
},
|
|
1257
|
-
const i =
|
|
1256
|
+
}, z = () => {
|
|
1257
|
+
const i = u.useContext(U);
|
|
1258
1258
|
if (!i)
|
|
1259
1259
|
throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
|
|
1260
1260
|
return { onEvent: i.onEvent };
|
|
1261
|
-
},
|
|
1262
|
-
const i =
|
|
1261
|
+
}, Me = () => {
|
|
1262
|
+
const i = u.useContext(U);
|
|
1263
1263
|
if (!i)
|
|
1264
1264
|
throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
|
|
1265
1265
|
return { onPageview: i.onPageview };
|
|
@@ -1268,80 +1268,80 @@ const z = p.createContext(null), lt = ({
|
|
|
1268
1268
|
STANDARD: 154,
|
|
1269
1269
|
XLARGE: 200,
|
|
1270
1270
|
XXLARGE: 248
|
|
1271
|
-
}, pt = 50,
|
|
1271
|
+
}, pt = 50, Ae = 1, _t = ({
|
|
1272
1272
|
ariaLabel: i,
|
|
1273
1273
|
backgroundColor: o,
|
|
1274
1274
|
beat: t,
|
|
1275
1275
|
showCTAColocatedWithText: l = !0,
|
|
1276
|
-
heightOverrides:
|
|
1277
|
-
index:
|
|
1276
|
+
heightOverrides: n,
|
|
1277
|
+
index: r,
|
|
1278
1278
|
isActiveCard: a,
|
|
1279
|
-
onCardClick:
|
|
1280
|
-
posthog:
|
|
1279
|
+
onCardClick: c,
|
|
1280
|
+
posthog: h,
|
|
1281
1281
|
showIcon: C,
|
|
1282
|
-
variant:
|
|
1283
|
-
widthOverrides:
|
|
1282
|
+
variant: p,
|
|
1283
|
+
widthOverrides: d
|
|
1284
1284
|
}) => {
|
|
1285
|
-
const { ref:
|
|
1286
|
-
threshold:
|
|
1287
|
-
}), { cardsCopy:
|
|
1288
|
-
|
|
1289
|
-
s && (t.has_been_displayed ? _(
|
|
1285
|
+
const { ref: E, inView: s } = me({
|
|
1286
|
+
threshold: Ae
|
|
1287
|
+
}), { cardsCopy: f } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = ht();
|
|
1288
|
+
ee(() => {
|
|
1289
|
+
s && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
|
|
1290
1290
|
...t,
|
|
1291
1291
|
has_been_displayed: !0
|
|
1292
1292
|
}) : R({
|
|
1293
1293
|
...t,
|
|
1294
1294
|
has_been_displayed: !0
|
|
1295
1295
|
}), _(ye(t.template))));
|
|
1296
|
-
}, [s]),
|
|
1296
|
+
}, [s]), ee(() => {
|
|
1297
1297
|
if (s && t)
|
|
1298
1298
|
if (t.template === "MarketingOffer") {
|
|
1299
|
-
const
|
|
1300
|
-
|
|
1299
|
+
const m = t;
|
|
1300
|
+
h?.capture("viewed_messaging_insight", {
|
|
1301
1301
|
template: t.template,
|
|
1302
|
-
campaign_guid:
|
|
1303
|
-
campaign_name:
|
|
1302
|
+
campaign_guid: m.campaign_guid,
|
|
1303
|
+
campaign_name: m.pulse_campaign_name
|
|
1304
1304
|
});
|
|
1305
1305
|
} else
|
|
1306
|
-
|
|
1306
|
+
h?.capture("viewed_insight", {
|
|
1307
1307
|
beat_guid: t.guid,
|
|
1308
1308
|
template: t.template,
|
|
1309
|
-
position:
|
|
1309
|
+
position: r
|
|
1310
1310
|
});
|
|
1311
|
-
}, [t,
|
|
1312
|
-
const
|
|
1313
|
-
if (
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1311
|
+
}, [t, r, s]);
|
|
1312
|
+
const I = () => {
|
|
1313
|
+
if (c && c(t), _(ge(t.template)), t.template === "MarketingOffer") {
|
|
1314
|
+
const m = t;
|
|
1315
|
+
h?.capture("clicked_messaging_insight", {
|
|
1316
1316
|
template: t.template,
|
|
1317
|
-
campaign_guid:
|
|
1318
|
-
campaign_name:
|
|
1317
|
+
campaign_guid: m.campaign_guid,
|
|
1318
|
+
campaign_name: m.pulse_campaign_name
|
|
1319
1319
|
});
|
|
1320
1320
|
} else
|
|
1321
|
-
|
|
1321
|
+
h?.capture("clicked_insight", {
|
|
1322
1322
|
beat_guid: t.guid,
|
|
1323
1323
|
template: t.template,
|
|
1324
|
-
position:
|
|
1324
|
+
position: r
|
|
1325
1325
|
});
|
|
1326
1326
|
};
|
|
1327
1327
|
return /* @__PURE__ */ e(
|
|
1328
|
-
|
|
1328
|
+
j,
|
|
1329
1329
|
{
|
|
1330
|
-
actionText: t.micro_call_to_action ||
|
|
1330
|
+
actionText: t.micro_call_to_action || f.micro_card_cta,
|
|
1331
1331
|
ariaLabel: i,
|
|
1332
1332
|
backgroundColor: o,
|
|
1333
1333
|
description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
|
|
1334
|
-
heightOverrides:
|
|
1335
|
-
icon: /* @__PURE__ */ e(
|
|
1334
|
+
heightOverrides: n,
|
|
1335
|
+
icon: /* @__PURE__ */ e(Et, { beat: t }),
|
|
1336
1336
|
isActiveCard: a,
|
|
1337
|
-
onCardClick:
|
|
1338
|
-
posthog:
|
|
1339
|
-
ref:
|
|
1337
|
+
onCardClick: I,
|
|
1338
|
+
posthog: h,
|
|
1339
|
+
ref: E,
|
|
1340
1340
|
showCTAColocatedWithText: l,
|
|
1341
1341
|
showIcon: C,
|
|
1342
1342
|
title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
|
|
1343
|
-
variant:
|
|
1344
|
-
widthOverrides:
|
|
1343
|
+
variant: p,
|
|
1344
|
+
widthOverrides: d
|
|
1345
1345
|
}
|
|
1346
1346
|
);
|
|
1347
1347
|
}, Ct = ({
|
|
@@ -1349,14 +1349,14 @@ const z = p.createContext(null), lt = ({
|
|
|
1349
1349
|
numBeats: o,
|
|
1350
1350
|
onNextClick: t,
|
|
1351
1351
|
onPreviousClick: l,
|
|
1352
|
-
scrollRightBoundary:
|
|
1353
|
-
scrollX:
|
|
1352
|
+
scrollRightBoundary: n,
|
|
1353
|
+
scrollX: r,
|
|
1354
1354
|
shouldApplyDotAnimation: a = !1,
|
|
1355
|
-
visibleCardsCount:
|
|
1355
|
+
visibleCardsCount: c = 1
|
|
1356
1356
|
}) => {
|
|
1357
|
-
const
|
|
1358
|
-
return /* @__PURE__ */
|
|
1359
|
-
|
|
1357
|
+
const h = Fe(), { carouselCopy: C } = V(), p = Math.floor(r) > n || i - c + 1 === 0, d = r < 0 || o - 1 === i, E = h.palette.grey[500], s = h.palette.primary.main;
|
|
1358
|
+
return /* @__PURE__ */ g(
|
|
1359
|
+
k,
|
|
1360
1360
|
{
|
|
1361
1361
|
direction: "row",
|
|
1362
1362
|
sx: {
|
|
@@ -1371,30 +1371,30 @@ const z = p.createContext(null), lt = ({
|
|
|
1371
1371
|
},
|
|
1372
1372
|
children: [
|
|
1373
1373
|
/* @__PURE__ */ e(
|
|
1374
|
-
|
|
1374
|
+
se,
|
|
1375
1375
|
{
|
|
1376
|
-
"aria-disabled":
|
|
1376
|
+
"aria-disabled": p,
|
|
1377
1377
|
"aria-label": C.previous_insight_cta_aria,
|
|
1378
|
-
disabled:
|
|
1378
|
+
disabled: p,
|
|
1379
1379
|
onClick: l,
|
|
1380
1380
|
children: /* @__PURE__ */ e(
|
|
1381
1381
|
He,
|
|
1382
1382
|
{
|
|
1383
1383
|
style: {
|
|
1384
|
-
color:
|
|
1384
|
+
color: p ? E : s
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
)
|
|
1388
1388
|
}
|
|
1389
1389
|
),
|
|
1390
|
-
Array.from({ length: o }).map((
|
|
1390
|
+
Array.from({ length: o }).map((f, _) => {
|
|
1391
1391
|
const R = _ === i;
|
|
1392
1392
|
return /* @__PURE__ */ e(
|
|
1393
|
-
|
|
1393
|
+
Z,
|
|
1394
1394
|
{
|
|
1395
1395
|
className: "mx-insights-micro-carousel-dots",
|
|
1396
1396
|
sx: {
|
|
1397
|
-
bgcolor: R ? s :
|
|
1397
|
+
bgcolor: R ? s : E,
|
|
1398
1398
|
height: 8,
|
|
1399
1399
|
mr: 8,
|
|
1400
1400
|
// existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
|
|
@@ -1414,17 +1414,17 @@ const z = p.createContext(null), lt = ({
|
|
|
1414
1414
|
);
|
|
1415
1415
|
}),
|
|
1416
1416
|
/* @__PURE__ */ e(
|
|
1417
|
-
|
|
1417
|
+
se,
|
|
1418
1418
|
{
|
|
1419
|
-
"aria-disabled":
|
|
1419
|
+
"aria-disabled": d,
|
|
1420
1420
|
"aria-label": C.next_insight_cta_aria,
|
|
1421
|
-
disabled:
|
|
1421
|
+
disabled: d,
|
|
1422
1422
|
onClick: t,
|
|
1423
1423
|
children: /* @__PURE__ */ e(
|
|
1424
|
-
|
|
1424
|
+
fe,
|
|
1425
1425
|
{
|
|
1426
1426
|
style: {
|
|
1427
|
-
color:
|
|
1427
|
+
color: d ? E : s
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
1430
|
)
|
|
@@ -1438,47 +1438,47 @@ const z = p.createContext(null), lt = ({
|
|
|
1438
1438
|
beats: o,
|
|
1439
1439
|
cardWidth: t,
|
|
1440
1440
|
showCTAColocatedWithText: l,
|
|
1441
|
-
heightOverrides:
|
|
1442
|
-
onCardClick:
|
|
1441
|
+
heightOverrides: n,
|
|
1442
|
+
onCardClick: r,
|
|
1443
1443
|
posthog: a,
|
|
1444
|
-
showIcon:
|
|
1445
|
-
variant:
|
|
1444
|
+
showIcon: c,
|
|
1445
|
+
variant: h
|
|
1446
1446
|
}) => {
|
|
1447
|
-
const { carouselCopy: C } =
|
|
1447
|
+
const { carouselCopy: C } = V(), p = {
|
|
1448
1448
|
showCTAColocatedWithText: l,
|
|
1449
|
-
heightOverrides:
|
|
1449
|
+
heightOverrides: n,
|
|
1450
1450
|
posthog: a,
|
|
1451
|
-
showIcon:
|
|
1452
|
-
variant:
|
|
1451
|
+
showIcon: c,
|
|
1452
|
+
variant: h
|
|
1453
1453
|
};
|
|
1454
|
-
return /* @__PURE__ */
|
|
1455
|
-
o.map((
|
|
1456
|
-
const s =
|
|
1454
|
+
return /* @__PURE__ */ g(De, { children: [
|
|
1455
|
+
o.map((d, E) => {
|
|
1456
|
+
const s = E + 1, f = o.length + 1, _ = Ge(
|
|
1457
1457
|
C.card_position_in_carousel_aria,
|
|
1458
1458
|
s.toString(),
|
|
1459
|
-
|
|
1460
|
-
), R =
|
|
1459
|
+
f.toString()
|
|
1460
|
+
), R = d.micro_title && d.micro_title.length > 0, O = d.micro_description && d.micro_description.length > 0, I = R ? d.micro_title : d.title, m = O ? d.micro_description : d.description;
|
|
1461
1461
|
return /* @__PURE__ */ e(
|
|
1462
1462
|
_t,
|
|
1463
1463
|
{
|
|
1464
|
-
ariaLabel: `${_}: ${
|
|
1465
|
-
beat:
|
|
1466
|
-
index:
|
|
1467
|
-
isActiveCard:
|
|
1468
|
-
onCardClick:
|
|
1464
|
+
ariaLabel: `${_}: ${I}, ${m}`,
|
|
1465
|
+
beat: d,
|
|
1466
|
+
index: E,
|
|
1467
|
+
isActiveCard: E === i,
|
|
1468
|
+
onCardClick: r,
|
|
1469
1469
|
widthOverrides: t || void 0,
|
|
1470
|
-
...
|
|
1470
|
+
...p
|
|
1471
1471
|
},
|
|
1472
|
-
`${
|
|
1472
|
+
`${d.guid} ${E}`
|
|
1473
1473
|
);
|
|
1474
1474
|
}),
|
|
1475
1475
|
/* @__PURE__ */ e(
|
|
1476
1476
|
At,
|
|
1477
1477
|
{
|
|
1478
1478
|
isActiveCard: i === o.length,
|
|
1479
|
-
onCardClick:
|
|
1479
|
+
onCardClick: r,
|
|
1480
1480
|
widthOverrides: t || void 0,
|
|
1481
|
-
...
|
|
1481
|
+
...p
|
|
1482
1482
|
}
|
|
1483
1483
|
)
|
|
1484
1484
|
] });
|
|
@@ -1487,100 +1487,100 @@ const z = p.createContext(null), lt = ({
|
|
|
1487
1487
|
allowSingleCardPeeking: o = !1,
|
|
1488
1488
|
beats: t = [],
|
|
1489
1489
|
showCTAColocatedWithText: l,
|
|
1490
|
-
heightOverrides:
|
|
1491
|
-
onCardClick:
|
|
1490
|
+
heightOverrides: n,
|
|
1491
|
+
onCardClick: r,
|
|
1492
1492
|
posthog: a,
|
|
1493
|
-
showCarouselControls:
|
|
1494
|
-
showIcon:
|
|
1493
|
+
showCarouselControls: c,
|
|
1494
|
+
showIcon: h,
|
|
1495
1495
|
showWithMargin: C = !0,
|
|
1496
|
-
variant:
|
|
1497
|
-
widthOverrides:
|
|
1498
|
-
visibleCardsCount:
|
|
1496
|
+
variant: p,
|
|
1497
|
+
widthOverrides: d,
|
|
1498
|
+
visibleCardsCount: E = 1
|
|
1499
1499
|
// Default to 1 card visible
|
|
1500
1500
|
}) => {
|
|
1501
|
-
const s =
|
|
1502
|
-
|
|
1501
|
+
const s = u.useRef(null), f = u.useRef(null), [_, R] = u.useState(0), [O, I] = u.useState(null), [m, T] = u.useState(null), [y, M] = u.useState(null), { carouselCopy: W } = V(), { onEvent: F } = z();
|
|
1502
|
+
u.useEffect(() => {
|
|
1503
1503
|
if (s.current && !o) {
|
|
1504
|
-
const
|
|
1505
|
-
let
|
|
1506
|
-
if (
|
|
1507
|
-
const ne = (
|
|
1508
|
-
|
|
1504
|
+
const A = s.current.offsetWidth, b = 8;
|
|
1505
|
+
let B;
|
|
1506
|
+
if (E > 1) {
|
|
1507
|
+
const ne = (A - (E - 1) * b) / E / 3;
|
|
1508
|
+
B = (A - ne - (E - 1) * b) / E;
|
|
1509
1509
|
} else
|
|
1510
|
-
|
|
1511
|
-
|
|
1510
|
+
B = A;
|
|
1511
|
+
M(B);
|
|
1512
1512
|
}
|
|
1513
|
-
}, [
|
|
1514
|
-
const
|
|
1515
|
-
if (typeof
|
|
1516
|
-
const
|
|
1517
|
-
const
|
|
1513
|
+
}, [E, s.current?.offsetWidth]), u.useEffect(() => {
|
|
1514
|
+
const A = f.current?.offsetWidth;
|
|
1515
|
+
if (typeof A == "number" && o) {
|
|
1516
|
+
const b = (G) => {
|
|
1517
|
+
const re = [
|
|
1518
1518
|
{ maxWidth: 375, cardWidth: 268 },
|
|
1519
1519
|
{ maxWidth: 444, cardWidth: 300 },
|
|
1520
1520
|
{ maxWidth: 599, cardWidth: 350 },
|
|
1521
1521
|
{ maxWidth: 749, cardWidth: 450 },
|
|
1522
1522
|
{ maxWidth: 900, cardWidth: 600 }
|
|
1523
|
-
].find((we) =>
|
|
1524
|
-
return
|
|
1523
|
+
].find((we) => G <= we.maxWidth);
|
|
1524
|
+
return re ? re.cardWidth : 750;
|
|
1525
1525
|
};
|
|
1526
|
-
|
|
1527
|
-
const
|
|
1528
|
-
const
|
|
1529
|
-
typeof
|
|
1526
|
+
M(b(A));
|
|
1527
|
+
const B = () => {
|
|
1528
|
+
const G = f.current?.offsetWidth;
|
|
1529
|
+
typeof G == "number" && M(b(G));
|
|
1530
1530
|
};
|
|
1531
|
-
return window.addEventListener("resize",
|
|
1532
|
-
window.removeEventListener("resize",
|
|
1531
|
+
return window.addEventListener("resize", B), () => {
|
|
1532
|
+
window.removeEventListener("resize", B);
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
1535
|
-
}, [o,
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1538
|
-
left: _ +
|
|
1535
|
+
}, [o, f]);
|
|
1536
|
+
const K = () => {
|
|
1537
|
+
F(S.ON_CAROUSEL_FORWARD_CLICK, i), s.current && y && s.current.scrollTo({
|
|
1538
|
+
left: _ + y + 8,
|
|
1539
1539
|
top: 0,
|
|
1540
1540
|
behavior: "smooth"
|
|
1541
1541
|
});
|
|
1542
1542
|
}, $ = () => {
|
|
1543
|
-
|
|
1544
|
-
left: Math.max(0, _ - (
|
|
1543
|
+
F(S.ON_CAROUSEL_BACK_CLICK, i), s.current && y && s.current.scrollTo({
|
|
1544
|
+
left: Math.max(0, _ - (y + 8)),
|
|
1545
1545
|
top: 0,
|
|
1546
1546
|
behavior: "smooth"
|
|
1547
1547
|
});
|
|
1548
|
-
},
|
|
1548
|
+
}, X = () => {
|
|
1549
1549
|
s.current && R(s.current.scrollLeft);
|
|
1550
|
-
},
|
|
1551
|
-
if (!
|
|
1552
|
-
|
|
1553
|
-
},
|
|
1554
|
-
|
|
1555
|
-
},
|
|
1556
|
-
|
|
1557
|
-
},
|
|
1558
|
-
return /* @__PURE__ */
|
|
1559
|
-
|
|
1550
|
+
}, Q = () => {
|
|
1551
|
+
if (!m || !O) return;
|
|
1552
|
+
m - O > pt ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
|
|
1553
|
+
}, q = (A) => {
|
|
1554
|
+
I(A.targetTouches[0].clientX);
|
|
1555
|
+
}, Y = (A) => {
|
|
1556
|
+
I(null), T(A.targetTouches[0].clientX);
|
|
1557
|
+
}, w = y ? Math.round(_ / (y + 8)) : 0, We = s.current ? s.current.scrollWidth - s.current.offsetWidth : 0;
|
|
1558
|
+
return /* @__PURE__ */ g(
|
|
1559
|
+
k,
|
|
1560
1560
|
{
|
|
1561
|
-
"aria-label":
|
|
1561
|
+
"aria-label": W.carousel_title,
|
|
1562
1562
|
"aria-roledescription": "carousel",
|
|
1563
|
-
ref:
|
|
1563
|
+
ref: f,
|
|
1564
1564
|
role: "group/region",
|
|
1565
1565
|
sx: {
|
|
1566
1566
|
alignItems: "center",
|
|
1567
1567
|
boxSizing: "border-box",
|
|
1568
|
-
height:
|
|
1569
|
-
width:
|
|
1568
|
+
height: n,
|
|
1569
|
+
width: d || "100%"
|
|
1570
1570
|
},
|
|
1571
1571
|
children: [
|
|
1572
1572
|
/* @__PURE__ */ e(
|
|
1573
|
-
|
|
1573
|
+
k,
|
|
1574
1574
|
{
|
|
1575
1575
|
direction: "row",
|
|
1576
|
-
onScroll:
|
|
1577
|
-
onTouchEnd:
|
|
1578
|
-
onTouchMove:
|
|
1579
|
-
onTouchStart:
|
|
1576
|
+
onScroll: X,
|
|
1577
|
+
onTouchEnd: Q,
|
|
1578
|
+
onTouchMove: q,
|
|
1579
|
+
onTouchStart: Y,
|
|
1580
1580
|
ref: s,
|
|
1581
1581
|
sx: {
|
|
1582
1582
|
alignItems: "center",
|
|
1583
|
-
height:
|
|
1583
|
+
height: n && "100%",
|
|
1584
1584
|
gap: 8,
|
|
1585
1585
|
listStyleType: "none",
|
|
1586
1586
|
m: 0,
|
|
@@ -1598,46 +1598,46 @@ const z = p.createContext(null), lt = ({
|
|
|
1598
1598
|
children: /* @__PURE__ */ e(
|
|
1599
1599
|
ft,
|
|
1600
1600
|
{
|
|
1601
|
-
activeCardIndex:
|
|
1601
|
+
activeCardIndex: w,
|
|
1602
1602
|
beats: t,
|
|
1603
|
-
cardWidth:
|
|
1604
|
-
heightOverrides:
|
|
1605
|
-
onCardClick:
|
|
1603
|
+
cardWidth: y,
|
|
1604
|
+
heightOverrides: n,
|
|
1605
|
+
onCardClick: r,
|
|
1606
1606
|
posthog: a,
|
|
1607
1607
|
showCTAColocatedWithText: l,
|
|
1608
|
-
showIcon:
|
|
1609
|
-
variant:
|
|
1608
|
+
showIcon: h,
|
|
1609
|
+
variant: p
|
|
1610
1610
|
}
|
|
1611
1611
|
)
|
|
1612
1612
|
}
|
|
1613
1613
|
),
|
|
1614
|
-
|
|
1614
|
+
c && /* @__PURE__ */ e(
|
|
1615
1615
|
Ct,
|
|
1616
1616
|
{
|
|
1617
|
-
currentBeatIndex:
|
|
1617
|
+
currentBeatIndex: w + E - 1,
|
|
1618
1618
|
numBeats: t.length + 1,
|
|
1619
|
-
onNextClick:
|
|
1619
|
+
onNextClick: K,
|
|
1620
1620
|
onPreviousClick: $,
|
|
1621
|
-
scrollRightBoundary:
|
|
1621
|
+
scrollRightBoundary: We,
|
|
1622
1622
|
scrollX: _,
|
|
1623
1623
|
shouldApplyDotAnimation: o,
|
|
1624
|
-
visibleCardsCount:
|
|
1624
|
+
visibleCardsCount: E
|
|
1625
1625
|
}
|
|
1626
1626
|
)
|
|
1627
1627
|
]
|
|
1628
1628
|
}
|
|
1629
1629
|
);
|
|
1630
|
-
}, Rt =
|
|
1630
|
+
}, Rt = P(mt), gt = ({
|
|
1631
1631
|
analyticsMetadata: i,
|
|
1632
1632
|
onCardClick: o,
|
|
1633
1633
|
posthog: t,
|
|
1634
1634
|
widthOverrides: l
|
|
1635
1635
|
}) => {
|
|
1636
|
-
const { carouselCopy:
|
|
1637
|
-
|
|
1636
|
+
const { carouselCopy: n } = V(), { onEvent: r } = z(), a = () => {
|
|
1637
|
+
r && (r(S.ON_VIEW_MORE_CLICKED, i), o(), t?.capture("clicked_view_more"));
|
|
1638
1638
|
};
|
|
1639
|
-
return
|
|
1640
|
-
|
|
1639
|
+
return n ? /* @__PURE__ */ g(
|
|
1640
|
+
k,
|
|
1641
1641
|
{
|
|
1642
1642
|
alignItems: "center",
|
|
1643
1643
|
direction: "row",
|
|
@@ -1651,39 +1651,40 @@ const z = p.createContext(null), lt = ({
|
|
|
1651
1651
|
/* @__PURE__ */ e(
|
|
1652
1652
|
Le,
|
|
1653
1653
|
{
|
|
1654
|
-
sx: {
|
|
1654
|
+
sx: (c) => ({
|
|
1655
|
+
color: c.palette.primary.main,
|
|
1655
1656
|
fontSize: 18,
|
|
1656
1657
|
fontWeight: 700,
|
|
1657
1658
|
lineHeight: "24px"
|
|
1658
|
-
},
|
|
1659
|
+
}),
|
|
1659
1660
|
variant: "h3",
|
|
1660
|
-
children:
|
|
1661
|
+
children: n.carousel_title
|
|
1661
1662
|
}
|
|
1662
1663
|
),
|
|
1663
1664
|
/* @__PURE__ */ e(
|
|
1664
1665
|
xe,
|
|
1665
1666
|
{
|
|
1666
|
-
endIcon: /* @__PURE__ */ e(
|
|
1667
|
+
endIcon: /* @__PURE__ */ e(fe, { size: 20 }),
|
|
1667
1668
|
onClick: a,
|
|
1668
1669
|
size: "small",
|
|
1669
|
-
sx: (
|
|
1670
|
-
color:
|
|
1670
|
+
sx: (c) => ({
|
|
1671
|
+
color: c.palette.primary.main
|
|
1671
1672
|
}),
|
|
1672
1673
|
variant: "text",
|
|
1673
|
-
children:
|
|
1674
|
+
children: n.view_all_insights_in_full_feed_cta_aria
|
|
1674
1675
|
}
|
|
1675
1676
|
)
|
|
1676
1677
|
]
|
|
1677
1678
|
}
|
|
1678
1679
|
) : /* @__PURE__ */ e(ke, {});
|
|
1679
|
-
}, It =
|
|
1680
|
+
}, It = P(gt), yt = ({
|
|
1680
1681
|
heightOverrides: i,
|
|
1681
1682
|
widthOverrides: o,
|
|
1682
1683
|
children: t
|
|
1683
1684
|
}) => {
|
|
1684
|
-
const { carouselCopy: l } =
|
|
1685
|
+
const { carouselCopy: l } = V();
|
|
1685
1686
|
return /* @__PURE__ */ e(
|
|
1686
|
-
|
|
1687
|
+
Z,
|
|
1687
1688
|
{
|
|
1688
1689
|
"aria-label": l?.carousel_title,
|
|
1689
1690
|
"aria-roledescription": "carousel",
|
|
@@ -1697,76 +1698,72 @@ const z = p.createContext(null), lt = ({
|
|
|
1697
1698
|
children: t
|
|
1698
1699
|
}
|
|
1699
1700
|
);
|
|
1700
|
-
},
|
|
1701
|
+
}, Oe = ({
|
|
1701
1702
|
ariaLabel: i,
|
|
1702
1703
|
heightOverrides: o,
|
|
1703
1704
|
onCardClick: t,
|
|
1704
1705
|
posthog: l,
|
|
1705
|
-
showIcon:
|
|
1706
|
-
variant:
|
|
1707
|
-
widthOverrides: a
|
|
1706
|
+
showIcon: n,
|
|
1707
|
+
variant: r
|
|
1708
1708
|
}) => {
|
|
1709
|
-
const { cardsCopy:
|
|
1710
|
-
|
|
1711
|
-
|
|
1709
|
+
const { cardsCopy: a } = V(), { onEvent: c } = z(), { onPageview: h } = Me();
|
|
1710
|
+
u.useEffect(() => {
|
|
1711
|
+
h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
|
|
1712
1712
|
}, []);
|
|
1713
|
-
const
|
|
1714
|
-
t && t(),
|
|
1713
|
+
const C = () => {
|
|
1714
|
+
t && t(), c(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
|
|
1715
1715
|
template: "no_relevant_insights"
|
|
1716
1716
|
});
|
|
1717
1717
|
};
|
|
1718
1718
|
return /* @__PURE__ */ e(
|
|
1719
|
-
|
|
1719
|
+
j,
|
|
1720
1720
|
{
|
|
1721
|
-
actionText:
|
|
1721
|
+
actionText: a.micro_card_cta,
|
|
1722
1722
|
ariaLabel: i,
|
|
1723
|
-
description:
|
|
1723
|
+
description: a.no_relevant_insights_card_description,
|
|
1724
1724
|
heightOverrides: o,
|
|
1725
|
-
icon: /* @__PURE__ */ e(
|
|
1725
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
1726
1726
|
isZeroState: !0,
|
|
1727
|
-
onCardClick:
|
|
1727
|
+
onCardClick: C,
|
|
1728
1728
|
posthog: l,
|
|
1729
|
-
showIcon:
|
|
1729
|
+
showIcon: n,
|
|
1730
1730
|
style: {
|
|
1731
1731
|
linkTextStyle: {
|
|
1732
1732
|
ml: 48
|
|
1733
1733
|
}
|
|
1734
1734
|
},
|
|
1735
|
-
title:
|
|
1736
|
-
variant:
|
|
1737
|
-
widthOverrides: a
|
|
1735
|
+
title: a.no_relevant_insights_card_title,
|
|
1736
|
+
variant: r
|
|
1738
1737
|
}
|
|
1739
1738
|
);
|
|
1740
|
-
}, Qt =
|
|
1739
|
+
}, Qt = P(Oe), Te = ({
|
|
1741
1740
|
ariaLabel: i,
|
|
1742
1741
|
heightOverrides: o,
|
|
1743
1742
|
onCardClick: t,
|
|
1744
1743
|
posthog: l,
|
|
1745
|
-
showIcon:
|
|
1746
|
-
variant:
|
|
1747
|
-
widthOverrides: a
|
|
1744
|
+
showIcon: n,
|
|
1745
|
+
variant: r
|
|
1748
1746
|
}) => {
|
|
1749
|
-
const { onPageview:
|
|
1750
|
-
return
|
|
1751
|
-
|
|
1747
|
+
const { onPageview: a } = Me(), { zeroStateCopy: c } = V();
|
|
1748
|
+
return u.useEffect(() => {
|
|
1749
|
+
a(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
|
|
1752
1750
|
}, []), /* @__PURE__ */ e(
|
|
1753
|
-
|
|
1751
|
+
j,
|
|
1754
1752
|
{
|
|
1755
1753
|
ariaLabel: i,
|
|
1756
|
-
description:
|
|
1754
|
+
description: c.carousel_zero_state_description,
|
|
1757
1755
|
heightOverrides: o,
|
|
1758
|
-
icon: /* @__PURE__ */ e(
|
|
1756
|
+
icon: /* @__PURE__ */ e(Se, {}),
|
|
1759
1757
|
isZeroState: !0,
|
|
1760
1758
|
onCardClick: t,
|
|
1761
1759
|
posthog: l,
|
|
1762
|
-
showIcon:
|
|
1763
|
-
title:
|
|
1764
|
-
variant:
|
|
1765
|
-
widthOverrides: a
|
|
1760
|
+
showIcon: n,
|
|
1761
|
+
title: c.carousel_zero_state_title,
|
|
1762
|
+
variant: r
|
|
1766
1763
|
}
|
|
1767
1764
|
);
|
|
1768
|
-
}, qt =
|
|
1769
|
-
|
|
1765
|
+
}, qt = P(Te), vt = () => /* @__PURE__ */ e(
|
|
1766
|
+
Z,
|
|
1770
1767
|
{
|
|
1771
1768
|
sx: {
|
|
1772
1769
|
alignItems: "center",
|
|
@@ -1783,60 +1780,62 @@ const z = p.createContext(null), lt = ({
|
|
|
1783
1780
|
beats: t = [],
|
|
1784
1781
|
// This also determines the length of the carousel controls (beat.length + 1)
|
|
1785
1782
|
showCTAColocatedWithText: l = !0,
|
|
1786
|
-
endpoint:
|
|
1787
|
-
heightOverrides:
|
|
1783
|
+
endpoint: n = "/",
|
|
1784
|
+
heightOverrides: r,
|
|
1788
1785
|
logOutUser: a,
|
|
1789
|
-
onCardClick:
|
|
1786
|
+
onCardClick: c = () => {
|
|
1790
1787
|
},
|
|
1791
|
-
onEvent:
|
|
1788
|
+
onEvent: h = () => {
|
|
1792
1789
|
},
|
|
1793
1790
|
onPageview: C = () => {
|
|
1794
1791
|
},
|
|
1795
|
-
posthog:
|
|
1796
|
-
showBorder:
|
|
1797
|
-
showCarouselControls:
|
|
1792
|
+
posthog: p,
|
|
1793
|
+
showBorder: d = !0,
|
|
1794
|
+
showCarouselControls: E,
|
|
1798
1795
|
showHeader: s,
|
|
1799
|
-
showIcon:
|
|
1796
|
+
showIcon: f,
|
|
1800
1797
|
showWithMargin: _ = !0,
|
|
1801
1798
|
token: R = "",
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
widthOverrides: g
|
|
1799
|
+
userHasFullInsightFeedBeats: O,
|
|
1800
|
+
variant: I,
|
|
1801
|
+
visibleCardsCount: m = 1,
|
|
1802
|
+
widthOverrides: T
|
|
1807
1803
|
}) => {
|
|
1808
|
-
const [
|
|
1809
|
-
|
|
1810
|
-
!N.isInitialized &&
|
|
1811
|
-
}, [
|
|
1812
|
-
const
|
|
1813
|
-
|
|
1814
|
-
}, [window.innerHeight]),
|
|
1815
|
-
|
|
1804
|
+
const [y, M] = J("STANDARD"), [W, F] = J(!1), [K, $] = J(!1), X = Ke([h], N), Q = $e([C], N);
|
|
1805
|
+
u.useEffect(() => {
|
|
1806
|
+
!N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
|
|
1807
|
+
}, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
|
|
1808
|
+
const w = window.innerHeight;
|
|
1809
|
+
w < 180 ? M("STANDARD") : w >= 180 && w < 200 ? M("LARGE") : w >= 200 && w < 248 ? M("XLARGE") : w >= 248 && M("XXLARGE");
|
|
1810
|
+
}, [window.innerHeight]), u.useEffect(() => {
|
|
1811
|
+
F(!o && N.isInitialized);
|
|
1816
1812
|
}, [o, N.isInitialized]);
|
|
1817
|
-
const
|
|
1813
|
+
const q = {
|
|
1818
1814
|
showCTAColocatedWithText: l,
|
|
1819
|
-
heightOverrides:
|
|
1820
|
-
onCardClick:
|
|
1821
|
-
posthog:
|
|
1822
|
-
showIcon:
|
|
1815
|
+
heightOverrides: r,
|
|
1816
|
+
onCardClick: c,
|
|
1817
|
+
posthog: p,
|
|
1818
|
+
showIcon: f,
|
|
1823
1819
|
showWithMargin: _,
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1820
|
+
widthOverrides: T
|
|
1821
|
+
}, Y = {
|
|
1822
|
+
carouselSize: y,
|
|
1823
|
+
variant: I,
|
|
1824
|
+
showCTAColocatedWithText: l,
|
|
1825
|
+
heightOverrides: r,
|
|
1826
|
+
onCardClick: c,
|
|
1827
|
+
posthog: p,
|
|
1828
|
+
showIcon: f
|
|
1830
1829
|
};
|
|
1831
|
-
return /* @__PURE__ */ e(lt, { onEvent:
|
|
1832
|
-
!W && /* @__PURE__ */ e(
|
|
1830
|
+
return /* @__PURE__ */ e(lt, { onEvent: X, onPageview: Q, store: N, children: /* @__PURE__ */ g(yt, { heightOverrides: r, widthOverrides: T, children: [
|
|
1831
|
+
!W && /* @__PURE__ */ e(vt, {}),
|
|
1833
1832
|
W && s && /* @__PURE__ */ e(
|
|
1834
1833
|
It,
|
|
1835
1834
|
{
|
|
1836
1835
|
analyticsMetadata: Ee,
|
|
1837
|
-
onCardClick:
|
|
1838
|
-
posthog:
|
|
1839
|
-
widthOverrides:
|
|
1836
|
+
onCardClick: c,
|
|
1837
|
+
posthog: p,
|
|
1838
|
+
widthOverrides: T
|
|
1840
1839
|
}
|
|
1841
1840
|
),
|
|
1842
1841
|
W && !!t.length && /* @__PURE__ */ e(
|
|
@@ -1845,70 +1844,78 @@ const z = p.createContext(null), lt = ({
|
|
|
1845
1844
|
allowSingleCardPeeking: i,
|
|
1846
1845
|
analyticsMetadata: Ee,
|
|
1847
1846
|
beats: t,
|
|
1848
|
-
showCarouselControls:
|
|
1849
|
-
variant:
|
|
1850
|
-
visibleCardsCount:
|
|
1851
|
-
...
|
|
1847
|
+
showCarouselControls: E,
|
|
1848
|
+
variant: d ? I : void 0,
|
|
1849
|
+
visibleCardsCount: m,
|
|
1850
|
+
...q
|
|
1852
1851
|
}
|
|
1853
1852
|
),
|
|
1854
1853
|
W && !t.length && /* @__PURE__ */ e(
|
|
1855
|
-
|
|
1854
|
+
k,
|
|
1856
1855
|
{
|
|
1857
1856
|
sx: {
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
width: "100%"
|
|
1857
|
+
alignItems: "center",
|
|
1858
|
+
height: r,
|
|
1859
|
+
width: T || "100%"
|
|
1862
1860
|
},
|
|
1863
|
-
children:
|
|
1861
|
+
children: /* @__PURE__ */ e(
|
|
1862
|
+
k,
|
|
1863
|
+
{
|
|
1864
|
+
sx: {
|
|
1865
|
+
height: `calc(${ut[y]}px - 44px)`,
|
|
1866
|
+
width: _ ? `calc(${T}px - 32px)` : "100%"
|
|
1867
|
+
},
|
|
1868
|
+
children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
|
|
1869
|
+
}
|
|
1870
|
+
)
|
|
1864
1871
|
}
|
|
1865
1872
|
)
|
|
1866
1873
|
] }) });
|
|
1867
|
-
}, Jt =
|
|
1874
|
+
}, Jt = P(St), Mt = ({
|
|
1868
1875
|
isActiveCard: i,
|
|
1869
1876
|
ariaLabel: o,
|
|
1870
1877
|
heightOverrides: t,
|
|
1871
1878
|
onCardClick: l,
|
|
1872
|
-
posthog:
|
|
1873
|
-
showIcon:
|
|
1879
|
+
posthog: n,
|
|
1880
|
+
showIcon: r,
|
|
1874
1881
|
variant: a,
|
|
1875
|
-
widthOverrides:
|
|
1882
|
+
widthOverrides: c
|
|
1876
1883
|
}) => {
|
|
1877
|
-
const
|
|
1878
|
-
threshold:
|
|
1879
|
-
}), { cardsCopy:
|
|
1880
|
-
|
|
1881
|
-
|
|
1884
|
+
const h = te(), { ref: C, inView: p } = me({
|
|
1885
|
+
threshold: Ae
|
|
1886
|
+
}), { cardsCopy: d } = V(), { onEvent: E } = z();
|
|
1887
|
+
ee(() => {
|
|
1888
|
+
p && (E(ve.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
|
|
1882
1889
|
template: "view_more_card"
|
|
1883
1890
|
}));
|
|
1884
|
-
}, [
|
|
1891
|
+
}, [p]);
|
|
1885
1892
|
const s = () => {
|
|
1886
|
-
l && l(),
|
|
1893
|
+
l && l(), E(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
|
|
1887
1894
|
template: "view_more_card"
|
|
1888
1895
|
});
|
|
1889
1896
|
};
|
|
1890
1897
|
return /* @__PURE__ */ e(
|
|
1891
|
-
|
|
1898
|
+
j,
|
|
1892
1899
|
{
|
|
1893
|
-
actionText:
|
|
1900
|
+
actionText: d.micro_card_cta,
|
|
1894
1901
|
ariaLabel: o,
|
|
1895
|
-
description:
|
|
1902
|
+
description: d.view_more_card_description,
|
|
1896
1903
|
heightOverrides: t,
|
|
1897
|
-
icon: /* @__PURE__ */ e(at, { color:
|
|
1904
|
+
icon: /* @__PURE__ */ e(at, { color: h.palette.primary.main }),
|
|
1898
1905
|
isActiveCard: i,
|
|
1899
1906
|
onCardClick: s,
|
|
1900
|
-
posthog:
|
|
1907
|
+
posthog: n,
|
|
1901
1908
|
ref: C,
|
|
1902
|
-
showIcon:
|
|
1903
|
-
title:
|
|
1909
|
+
showIcon: r,
|
|
1910
|
+
title: d.view_more_card_title,
|
|
1904
1911
|
variant: a,
|
|
1905
|
-
widthOverrides:
|
|
1912
|
+
widthOverrides: c
|
|
1906
1913
|
}
|
|
1907
1914
|
);
|
|
1908
|
-
}, At =
|
|
1915
|
+
}, At = P(Mt);
|
|
1909
1916
|
export {
|
|
1910
1917
|
ot as A,
|
|
1911
|
-
|
|
1918
|
+
j as B,
|
|
1912
1919
|
It as C,
|
|
1913
1920
|
lt as I,
|
|
1914
1921
|
Rt as M,
|
|
@@ -1920,5 +1927,5 @@ export {
|
|
|
1920
1927
|
Jt as b,
|
|
1921
1928
|
at as c,
|
|
1922
1929
|
dt as d,
|
|
1923
|
-
|
|
1930
|
+
Se as e
|
|
1924
1931
|
};
|