@mx-cartographer/experiences 7.0.0-alpha.mega1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{Account-DY6nxO7y.mjs → Account-BFol-JYA.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-DvPs81kL.mjs → AccountDetailsContent-Do3z1FnQ.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-W2U7ZVm_.mjs → AccountDetailsHeader-DnEyQMpX.mjs} +12 -12
  5. package/dist/{AccountFields-DAVcbZy5.mjs → AccountFields-CeHZrIQe.mjs} +2 -2
  6. package/dist/{AccountListItem-DFlbdcmT.mjs → AccountListItem-C7JzYpqf.mjs} +3 -3
  7. package/dist/{AccountStore-CU7qV3vg.mjs → AccountStore-Cu3GoLh-.mjs} +1 -1
  8. package/dist/{Accounts-BLlrQA5m.mjs → Accounts-BuYXUMhP.mjs} +1 -1
  9. package/dist/{BudgetUtil-Ci1TN0J5.mjs → BudgetUtil-spowPvBM.mjs} +2 -2
  10. package/dist/{Category-5S6uwuXz.mjs → Category-CevNQ03n.mjs} +4 -4
  11. package/dist/{CategorySelectorDrawer-rHyHHYuh.mjs → CategorySelectorDrawer-Dyzb3UDU.mjs} +1 -1
  12. package/dist/{CategoryStore-B5EW6I1d.mjs → CategoryStore-BOyzQjQp.mjs} +2 -2
  13. package/dist/{CategoryUtil-DRyruNgi.mjs → CategoryUtil-BR3H5i6n.mjs} +1 -1
  14. package/dist/{ConnectDrawer-D9cR5phc.mjs → ConnectDrawer-WfKHsHSF.mjs} +1 -1
  15. package/dist/{ConnectionsDrawer-BzGqljSp.mjs → ConnectionsDrawer-Czp-E0-m.mjs} +2 -2
  16. package/dist/{CurrencyInput-D74cemI2.mjs → CurrencyInput-CSZjO22Z.mjs} +1 -1
  17. package/dist/{DebtsStore-S0l9kr0r.mjs → DebtsStore-D9holN8L.mjs} +1 -1
  18. package/dist/ExportCsvAction-dpvaZxbS.mjs +24 -0
  19. package/dist/{GoalStore-DioeeL-s.mjs → GoalStore-Drf76ell.mjs} +4 -4
  20. package/dist/{Help-DpYRO8oA.mjs → Help-DRUwVDvo.mjs} +1 -1
  21. package/dist/{LineChart-CcyX38kK.mjs → LineChart-CYiUS-px.mjs} +88 -85
  22. package/dist/{ListItemAction-BabpYivr.mjs → ListItemAction-BzmbPuNp.mjs} +1 -1
  23. package/dist/{ManageIncome-ndMuhJMG.mjs → ManageIncome-B6kmMN_z.mjs} +178 -186
  24. package/dist/{MicroWidgetContainer-CsvHLYKX.mjs → MicroWidgetContainer-DmYiksbT.mjs} +1 -1
  25. package/dist/{MiniWidgetContainer-BoOp-A05.mjs → MiniWidgetContainer-DqKQNubH.mjs} +1 -1
  26. package/dist/{NetWorthStore-PD-RUe09.mjs → NetWorthStore-BK1_NbXW.mjs} +2 -2
  27. package/dist/{Notification-AMGWM1Al.mjs → Notification-ByMBpJ5u.mjs} +33 -22
  28. package/dist/{NotificationSettings-VhHuMAFU.mjs → NotificationSettings-BznqGVQ2.mjs} +35 -34
  29. package/dist/{OriginalBalanceAction-D39mx6uE.mjs → OriginalBalanceAction-CSu5brQE.mjs} +3 -3
  30. package/dist/RecurringSettings-Be1dzkMz.mjs +57 -0
  31. package/dist/ResponsiveButton-DZFp78fJ.mjs +45 -0
  32. package/dist/{SettingsStore-CE7jDVFL.mjs → SettingsStore-B4gi6oOw.mjs} +1 -1
  33. package/dist/{SpendingData-BkrxzHdr.mjs → SpendingData-D5vsfYKo.mjs} +5 -5
  34. package/dist/{Transaction-CA0FW2Ij.mjs → Transaction-CyqrHmAA.mjs} +1 -1
  35. package/dist/{TransactionDetails-WBHFmbxL.mjs → TransactionDetails-D4B9DSWo.mjs} +421 -417
  36. package/dist/{TransactionStore-CeLdmVnC.mjs → TransactionStore-DSyXtPek.mjs} +8 -8
  37. package/dist/TrendsStore-DR8etTL2.mjs +547 -0
  38. package/dist/{ViewMoreMicroCard-CAPFNz-J.mjs → ViewMoreMicroCard-BZI5VMNW.mjs} +476 -468
  39. package/dist/{WidgetContainer-DWCusxYI.mjs → WidgetContainer-BG-fdDOf.mjs} +110 -104
  40. package/dist/accounts/index.es.js +12 -12
  41. package/dist/analytics/index.es.js +8 -8
  42. package/dist/budgets/index.es.js +10 -10
  43. package/dist/cashflow/index.es.js +7 -7
  44. package/dist/categories/index.es.js +2 -2
  45. package/dist/common/components/WidgetContainer.d.ts +1 -1
  46. package/dist/common/components/charts/LineChart.d.ts +1 -0
  47. package/dist/common/components/index.d.ts +1 -0
  48. package/dist/common/components/listitems/ToggleButtonListItem.d.ts +2 -1
  49. package/dist/common/constants/Analytics.d.ts +16 -10
  50. package/dist/common/index.es.js +432 -469
  51. package/dist/dashboard/index.es.js +13 -13
  52. package/dist/debts/index.es.js +66 -66
  53. package/dist/{exportTransactionsToCSV-CmwsKl2D.mjs → exportTransactionsToCSV-BlVifaOG.mjs} +2 -2
  54. package/dist/finstrong/index.es.js +6 -6
  55. package/dist/goals/index.es.js +32 -32
  56. package/dist/help/index.es.js +3 -3
  57. package/dist/{hooks-30y_BLwc.mjs → hooks-02T565vf.mjs} +10 -10
  58. package/dist/investments/index.es.js +3 -3
  59. package/dist/merchants/index.es.js +1 -1
  60. package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +1 -0
  61. package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +1 -0
  62. package/dist/microinsights/index.es.js +1 -1
  63. package/dist/networth/index.es.js +7 -7
  64. package/dist/notifications/index.es.js +9 -9
  65. package/dist/recurringtransactions/index.es.js +8 -8
  66. package/dist/settings/index.es.js +25 -25
  67. package/dist/spending/index.es.js +13 -13
  68. package/dist/transactions/components/shared/TransactionList.d.ts +2 -0
  69. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +5 -1
  70. package/dist/transactions/index.d.ts +1 -0
  71. package/dist/transactions/index.es.js +143 -141
  72. package/dist/trends/constants/TrendsWidget.d.ts +3 -0
  73. package/dist/trends/index.es.js +576 -635
  74. package/package.json +1 -1
  75. package/dist/RecurringSettings-D_HnMYZP.mjs +0 -57
  76. package/dist/TrendsStore-BHJUapXF.mjs +0 -487
  77. package/dist/index.d.ts +0 -0
  78. package/dist/trends/components/TransactionsList.d.ts +0 -7
@@ -1,30 +1,33 @@
1
- import { jsx as e, jsxs as R } from "react/jsx-runtime";
2
- import E, { useState as ae, useEffect as q } from "react";
3
- import { observer as P } from "mobx-react-lite";
4
- import Pe from "@mui/material/CssBaseline";
5
- import { useTheme as ye, ThemeProvider as Ge } from "@mui/material/styles";
6
- import be from "@mui/material/Link";
7
- import U from "@mui/material/Stack";
1
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
+ import u, { useState as ae, useEffect as ee } from "react";
3
+ import { observer as Z } from "mobx-react-lite";
4
+ import be from "@mui/material/CssBaseline";
5
+ import { useTheme as ve, ThemeProvider as Ue } from "@mui/material/styles";
6
+ import ze from "@mui/material/Link";
7
+ import K from "@mui/material/Stack";
8
8
  import Ee from "@mui/material/Typography";
9
- import { ChevronLeft as Ue, ChevronRight as ve } from "@mxenabled/mx-icons";
10
- import { L as ze } from "./Loader-Dp1P2gNw.mjs";
11
- import b from "@mui/material/Box";
9
+ import { ChevronLeft as Ke, ChevronRight as Se } from "@mxenabled/mx-icons";
10
+ import { L as $e } from "./Loader-Dp1P2gNw.mjs";
11
+ import U from "@mui/material/Box";
12
12
  import ue from "@mui/material/IconButton";
13
- import { useInView as Se } from "react-intersection-observer";
14
- import { P as Ke, CategoryIcon as $e, useTokens as Me, MerchantLogo as Ye, Icon as Q } from "@mxenabled/mxui";
15
- import Ae from "@mui/material/styles/useTheme";
16
- import { c as je } from "./Category-5S6uwuXz.mjs";
17
- import { css as Xe } from "@mxenabled/cssinjs";
18
- import { b as Qe } from "./Localization-2MODESHW.mjs";
19
- import qe from "@mui/material/CircularProgress";
20
- import { makeAutoObservable as ce, runInAction as Oe } from "mobx";
21
- import { G as pe, a as Je, u as et, b as tt } from "./useCombineEvents-DaDBSR_1.mjs";
13
+ import { useInView as Me } from "react-intersection-observer";
14
+ import { P as Ye, CategoryIcon as je, useTokens as Ae, MerchantLogo as Xe, Icon as J } from "@mxenabled/mxui";
15
+ import Oe from "@mui/material/styles/useTheme";
16
+ import { b as Qe } from "./Category-CevNQ03n.mjs";
17
+ import { css as qe } from "@mxenabled/cssinjs";
18
+ import { b as Je } from "./Localization-2MODESHW.mjs";
19
+ import et from "@mui/material/CircularProgress";
20
+ import { makeAutoObservable as ce, runInAction as Te } from "mobx";
21
+ import { G as pe, a as tt, u as it, b as ot } from "./useCombineEvents-DaDBSR_1.mjs";
22
22
  import { B as _e } from "./BeatApi-DLu87ijw.mjs";
23
- import it from "@mui/material/Card";
24
- import ot from "@mui/material/CardActions";
25
- import rt from "@mui/material/CardContent";
26
- import lt from "@mui/material/CardHeader";
27
- class nt {
23
+ import rt from "@mui/material/Card";
24
+ import lt from "@mui/material/CardActions";
25
+ import nt from "@mui/material/CardContent";
26
+ import at from "@mui/material/CardHeader";
27
+ const Ce = {
28
+ featureVersion: "spendVsIncomeTrends"
29
+ };
30
+ class ct {
28
31
  copyApi = new pe("/", "");
29
32
  copyObject = {};
30
33
  namespace = "experiences";
@@ -37,7 +40,7 @@ class nt {
37
40
  };
38
41
  loadCopy = async () => {
39
42
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
40
- Oe(() => {
43
+ Te(() => {
41
44
  this.copyObject = o[this.translationKey];
42
45
  });
43
46
  };
@@ -68,59 +71,59 @@ const de = {
68
71
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
69
72
  MonthlySpendComparison: "MonthlySpendComparison",
70
73
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
71
- }, v = window?.app?.clientConfig?.microwidget_instance_id || "", Ce = {
74
+ }, S = window?.app?.clientConfig?.microwidget_instance_id || "", fe = {
72
75
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
73
- }, Te = (i) => `on${i}Click`, We = (i) => `on${i}View`, we = (i) => `on${i}ViewFirstTime`, se = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), at = () => Object.values(de).reduce(
76
+ }, We = (i) => `on${i}Click`, we = (i) => `on${i}View`, xe = (i) => `on${i}ViewFirstTime`, se = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), dt = () => Object.values(de).reduce(
74
77
  (i, o) => ({
75
78
  ...i,
76
- [Te(o)]: {
77
- action: N.MICRO_BEAT_CLICKED,
78
- category: L.BEAT_INTERACTION,
79
+ [We(o)]: {
80
+ action: D.MICRO_BEAT_CLICKED,
81
+ category: x.BEAT_INTERACTION,
79
82
  label: se(o),
80
- value: v
83
+ value: S
81
84
  }
82
85
  }),
83
86
  {}
84
- ), ct = () => Object.values(de).reduce(
87
+ ), st = () => Object.values(de).reduce(
85
88
  (i, o) => ({
86
89
  ...i,
87
- [We(o)]: {
88
- action: N.MICRO_BEAT_DISPLAYED,
89
- category: L.BEAT_INTERACTION,
90
+ [we(o)]: {
91
+ action: D.MICRO_BEAT_DISPLAYED,
92
+ category: x.BEAT_INTERACTION,
90
93
  label: se(o),
91
- value: v
94
+ value: S
92
95
  }
93
96
  }),
94
97
  {}
95
- ), dt = () => Object.values(de).reduce(
98
+ ), ht = () => Object.values(de).reduce(
96
99
  (i, o) => ({
97
100
  ...i,
98
- [we(o)]: {
99
- action: N.MICRO_BEAT_DISPLAYED_FIRST_TIME,
100
- category: L.BEAT_INTERACTION,
101
+ [xe(o)]: {
102
+ action: D.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
+ category: x.BEAT_INTERACTION,
101
104
  label: se(o),
102
- value: v
105
+ value: S
103
106
  }
104
107
  }),
105
108
  {}
106
- ), D = {
109
+ ), w = {
107
110
  CARD: "Card",
108
111
  CAROUSEL_CONTROL: "Carousel Control",
109
112
  MICRO_WIDGET: "Micro Widget",
110
113
  VIEW_MORE: "View More"
111
- }, L = {
114
+ }, x = {
112
115
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
113
116
  BEAT_INTERACTION: "Beat Interaction"
114
- }, S = {
117
+ }, M = {
115
118
  ON_CAROUSEL_BACK_CLICK: "onCarouselBackClick",
116
119
  ON_CAROUSEL_BACK_SWIPE: "onCarouselBackSwipe",
117
120
  ON_CAROUSEL_FORWARD_CLICK: "onCarouselForwardClick",
118
121
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
119
122
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
120
123
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
121
- }, xe = {
124
+ }, De = {
122
125
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
123
- }, N = {
126
+ }, D = {
124
127
  CONTROL_BACKWARD: "Control Backward",
125
128
  CONTROL_FORWARD: "Control Forward",
126
129
  MICRO_BEAT_CLICKED: "Micro Beat Clicked",
@@ -128,92 +131,92 @@ const de = {
128
131
  MICRO_BEAT_DISPLAYED_FIRST_TIME: "Micro Beat Displayed For First Time",
129
132
  SWIPE_BACKWARD: "Swipe Backward",
130
133
  SWIPE_FORWARD: "Swipe Forward"
131
- }, k = {
134
+ }, V = {
132
135
  MICRO_WIDGET_CAROUSEL: "Micro Widget Carousel",
133
136
  MICRO_WIDGET_CAROUSEL_ZERO_STATE: "Micro Widget Carousel Zero State",
134
137
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
135
- }, fe = {
136
- [k.MICRO_WIDGET_CAROUSEL]: {
137
- label: D.MICRO_WIDGET,
138
- name: k.MICRO_WIDGET_CAROUSEL,
139
- path: Ce.INSIGHTS_MICRO_WIDGET,
140
- value: v
138
+ }, me = {
139
+ [V.MICRO_WIDGET_CAROUSEL]: {
140
+ label: w.MICRO_WIDGET,
141
+ name: V.MICRO_WIDGET_CAROUSEL,
142
+ path: fe.INSIGHTS_MICRO_WIDGET,
143
+ value: S
141
144
  },
142
145
  // zero state
143
- [k.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
144
- label: D.MICRO_WIDGET,
145
- name: k.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
146
- path: Ce.INSIGHTS_MICRO_WIDGET,
147
- value: v
146
+ [V.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
147
+ label: w.MICRO_WIDGET,
148
+ name: V.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
149
+ path: fe.INSIGHTS_MICRO_WIDGET,
150
+ value: S
148
151
  },
149
152
  // no relevant cards
150
- [k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
151
- label: D.MICRO_WIDGET,
152
- name: k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
153
+ [V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
154
+ label: w.MICRO_WIDGET,
155
+ name: V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
153
156
  path: "/micro-widget",
154
- value: v
157
+ value: S
155
158
  }
156
- }, me = {
159
+ }, Re = {
157
160
  // carousel control interaction events - clicks and swipes
158
- [S.ON_CAROUSEL_BACK_CLICK]: {
159
- action: N.CONTROL_BACKWARD,
160
- category: L.MICRO_WIDGET_INTERACTION,
161
- label: D.CAROUSEL_CONTROL,
162
- value: v
161
+ [M.ON_CAROUSEL_BACK_CLICK]: {
162
+ action: D.CONTROL_BACKWARD,
163
+ category: x.MICRO_WIDGET_INTERACTION,
164
+ label: w.CAROUSEL_CONTROL,
165
+ value: S
163
166
  },
164
- [S.ON_CAROUSEL_FORWARD_CLICK]: {
165
- action: N.CONTROL_FORWARD,
166
- category: L.MICRO_WIDGET_INTERACTION,
167
- label: D.CAROUSEL_CONTROL,
168
- value: v
167
+ [M.ON_CAROUSEL_FORWARD_CLICK]: {
168
+ action: D.CONTROL_FORWARD,
169
+ category: x.MICRO_WIDGET_INTERACTION,
170
+ label: w.CAROUSEL_CONTROL,
171
+ value: S
169
172
  },
170
- [S.ON_CAROUSEL_BACK_SWIPE]: {
171
- action: N.SWIPE_BACKWARD,
172
- category: L.MICRO_WIDGET_INTERACTION,
173
- label: D.CAROUSEL_CONTROL,
174
- value: v
173
+ [M.ON_CAROUSEL_BACK_SWIPE]: {
174
+ action: D.SWIPE_BACKWARD,
175
+ category: x.MICRO_WIDGET_INTERACTION,
176
+ label: w.CAROUSEL_CONTROL,
177
+ value: S
175
178
  },
176
- [S.ON_CAROUSEL_FORWARD_SWIPE]: {
177
- action: N.SWIPE_FORWARD,
178
- category: L.MICRO_WIDGET_INTERACTION,
179
- label: D.CAROUSEL_CONTROL,
180
- value: v
179
+ [M.ON_CAROUSEL_FORWARD_SWIPE]: {
180
+ action: D.SWIPE_FORWARD,
181
+ category: x.MICRO_WIDGET_INTERACTION,
182
+ label: w.CAROUSEL_CONTROL,
183
+ value: S
181
184
  },
182
185
  // read more card events
183
- [S.ON_VIEW_MORE_CLICKED]: {
184
- action: N.MICRO_BEAT_CLICKED,
185
- category: L.BEAT_INTERACTION,
186
- label: D.VIEW_MORE,
187
- value: v
186
+ [M.ON_VIEW_MORE_CLICKED]: {
187
+ action: D.MICRO_BEAT_CLICKED,
188
+ category: x.BEAT_INTERACTION,
189
+ label: w.VIEW_MORE,
190
+ value: S
188
191
  },
189
- [xe.ON_VIEW_MORE_VIEWED]: {
190
- action: N.MICRO_BEAT_DISPLAYED,
191
- category: L.BEAT_INTERACTION,
192
- label: D.VIEW_MORE,
193
- value: v
192
+ [De.ON_VIEW_MORE_VIEWED]: {
193
+ action: D.MICRO_BEAT_DISPLAYED,
194
+ category: x.BEAT_INTERACTION,
195
+ label: w.VIEW_MORE,
196
+ value: S
194
197
  },
195
- ...at(),
196
- ...ct(),
197
- ...dt()
198
- }, Re = async (i, o) => !o || !me[i] ? null : o.sendAnalyticEvent(me[i]).then((t) => t).catch((t) => {
198
+ ...dt(),
199
+ ...st(),
200
+ ...ht()
201
+ }, ge = async (i, o) => !o || !Re[i] ? null : o.sendAnalyticEvent(Re[i]).then((t) => t).catch((t) => {
199
202
  throw t;
200
- }), ge = async (i, o) => !o || !fe[i] ? null : o.sendAnalyticsPageview(fe[i]).then((t) => t).catch((t) => {
203
+ }), Ie = async (i, o) => !o || !me[i] ? null : o.sendAnalyticsPageview(me[i]).then((t) => t).catch((t) => {
201
204
  throw t;
202
205
  });
203
- class st {
204
- onAnalyticEvent = Re;
205
- onAnalyticPageView = ge;
206
+ class Et {
207
+ onAnalyticEvent = ge;
208
+ onAnalyticPageView = Ie;
206
209
  beatApi = new _e("/", "");
207
210
  constructor() {
208
211
  ce(this);
209
212
  }
210
213
  initialize = async (o, t, r) => {
211
214
  this.onAnalyticEvent = (l, n) => {
212
- Re(l, n).then((a) => a).catch((a) => {
215
+ ge(l, n).then((a) => a).catch((a) => {
213
216
  throw a.status === 401 && r(), a;
214
217
  });
215
218
  }, this.onAnalyticPageView = (l, n) => {
216
- ge(l, n).then((a) => a).catch((a) => {
219
+ Ie(l, n).then((a) => a).catch((a) => {
217
220
  throw a.status === 401 && r(), a;
218
221
  });
219
222
  }, this.beatApi = new _e(o, t);
@@ -225,7 +228,7 @@ class st {
225
228
  this.beatApi.updateOffer(o);
226
229
  };
227
230
  }
228
- class ht {
231
+ class ut {
229
232
  copyStore;
230
233
  endpoint = "/";
231
234
  insightsMicroWidgetStore;
@@ -233,22 +236,22 @@ class ht {
233
236
  token = "";
234
237
  isInitialized = !1;
235
238
  constructor() {
236
- this.copyStore = new nt(), this.insightsMicroWidgetStore = new st(), ce(this);
239
+ this.copyStore = new ct(), this.insightsMicroWidgetStore = new Et(), ce(this);
237
240
  }
238
241
  initialize = async (o, t, r) => {
239
242
  await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, r);
240
- const l = await Je(o, t, "1.0.0", "Micro Insights Carousel");
241
- Oe(() => {
243
+ const l = await tt(o, t, "1.0.0", "Micro Insights Carousel");
244
+ Te(() => {
242
245
  this.session = l, this.isInitialized = !0;
243
246
  });
244
247
  };
245
248
  }
246
- const z = E.createContext(null), Et = ({
249
+ const $ = u.createContext(null), pt = ({
247
250
  onEvent: i,
248
251
  onPageview: o,
249
252
  store: t,
250
253
  children: r
251
- }) => /* @__PURE__ */ e(z.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), J = E.forwardRef(
254
+ }) => /* @__PURE__ */ e($.Provider, { value: { onEvent: i, onPageview: o, store: t, children: r }, children: r }), te = u.forwardRef(
252
255
  function({
253
256
  actionText: o,
254
257
  ariaLabel: t,
@@ -256,30 +259,30 @@ const z = E.createContext(null), Et = ({
256
259
  description: l,
257
260
  heightOverrides: n,
258
261
  icon: a,
259
- isActiveCard: _,
260
- isZeroState: u,
261
- onCardClick: p = () => {
262
+ isActiveCard: s,
263
+ isZeroState: p,
264
+ onCardClick: _ = () => {
262
265
  },
263
266
  showIcon: C,
264
267
  style: f = {},
265
- fontColors: s = {},
266
- title: d,
268
+ fontColors: h = {},
269
+ title: m,
267
270
  variant: c,
268
- widthOverrides: y
269
- }, m) {
270
- const [M, A] = E.useState(!1), { cardStyle: T, linkTextStyle: g } = f, G = c ? T : { border: "none", boxShadow: "none", ...T }, I = /* @__PURE__ */ e(
271
- Ke,
271
+ widthOverrides: E
272
+ }, R) {
273
+ const [y, O] = u.useState(!1), { cardStyle: T, linkTextStyle: v } = f, k = c ? T : { border: "none", boxShadow: "none", ...T }, P = /* @__PURE__ */ e(
274
+ Ye,
272
275
  {
273
276
  className: "mx-micro-card-description",
274
- color: s.textColor ? "undefined" : "text.primary",
277
+ color: h.textColor ? "undefined" : "text.primary",
275
278
  sx: {
276
279
  display: "-webkit-box",
277
280
  fontSize: 13,
278
281
  letterSpacing: 0.48,
279
282
  lineHeight: "20px",
280
283
  overflow: "hidden",
281
- pl: u ? 0 : 28,
282
- pr: u ? 0 : 8,
284
+ pl: p ? 0 : 28,
285
+ pr: p ? 0 : 8,
283
286
  WebkitBoxOrient: "vertical",
284
287
  WebkitLineClamp: 2,
285
288
  wordWrap: "break-word"
@@ -288,37 +291,37 @@ const z = E.createContext(null), Et = ({
288
291
  }
289
292
  );
290
293
  return /* @__PURE__ */ e(
291
- b,
294
+ U,
292
295
  {
293
- "aria-hidden": !_,
296
+ "aria-hidden": !s,
294
297
  "aria-label": t,
295
298
  "aria-labelledby": "divButton",
296
299
  "aria-roledescription": "slide",
297
- ref: m,
300
+ ref: R,
298
301
  role: "group",
299
302
  sx: {
300
303
  height: "100%",
301
- minWidth: y ? `${y}px` : "100%"
304
+ minWidth: E ? `${E}px` : "100%"
302
305
  },
303
306
  children: /* @__PURE__ */ e(
304
- b,
307
+ U,
305
308
  {
306
- "aria-hidden": !_,
309
+ "aria-hidden": !s,
307
310
  "aria-label": t,
308
311
  id: "divButton",
309
- onClick: () => p(),
310
- onKeyDown: () => A(!1),
311
- onKeyUp: () => A(!0),
312
- ref: m,
312
+ onClick: () => _(),
313
+ onKeyDown: () => O(!1),
314
+ onKeyUp: () => O(!0),
315
+ ref: R,
313
316
  role: "button",
314
317
  sx: {
315
- border: M ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
318
+ border: y ? "1px solid rgba(82, 138, 224, 0.8)" : void 0,
316
319
  borderRadius: "8px",
317
320
  height: "100%"
318
321
  },
319
- tabIndex: _ ? 0 : -1,
322
+ tabIndex: s ? 0 : -1,
320
323
  children: /* @__PURE__ */ e(
321
- it,
324
+ rt,
322
325
  {
323
326
  "aria-roledescription": "slide",
324
327
  className: "mx-micro-card",
@@ -328,15 +331,15 @@ const z = E.createContext(null), Et = ({
328
331
  cursor: "pointer",
329
332
  height: n ? "100%" : 124,
330
333
  p: 16,
331
- ...G,
334
+ ...k,
332
335
  "& .MuiCardHeader-avatar": {
333
- color: s.iconColor,
336
+ color: h.iconColor,
334
337
  mr: "8px"
335
338
  }
336
339
  },
337
340
  variant: c,
338
- children: /* @__PURE__ */ R(
339
- U,
341
+ children: /* @__PURE__ */ g(
342
+ K,
340
343
  {
341
344
  sx: {
342
345
  alignItems: "space-between",
@@ -344,33 +347,33 @@ const z = E.createContext(null), Et = ({
344
347
  },
345
348
  children: [
346
349
  /* @__PURE__ */ e(
347
- lt,
350
+ at,
348
351
  {
349
352
  avatar: C && a,
350
- subheader: u && I,
351
- sx: { color: s.headerColor, p: 0 },
352
- title: d,
353
+ subheader: p && P,
354
+ sx: { color: h.headerColor, p: 0 },
355
+ title: m,
353
356
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
354
357
  }
355
358
  ),
356
- /* @__PURE__ */ e(rt, { sx: { p: 0 }, children: !u && I }),
359
+ /* @__PURE__ */ e(nt, { sx: { p: 0 }, children: !p && P }),
357
360
  !!o && /* @__PURE__ */ e(
358
- ot,
361
+ lt,
359
362
  {
360
363
  sx: {
361
364
  mt: "auto",
362
365
  p: 0
363
366
  },
364
367
  children: /* @__PURE__ */ e(
365
- b,
368
+ U,
366
369
  {
367
- sx: (W) => ({
368
- color: s.buttonColor ? s.buttonColor : W.palette.primary.main,
370
+ sx: (I) => ({
371
+ color: h.buttonColor ? h.buttonColor : I.palette.primary.main,
369
372
  // TODO: Per Cameron the theme package in @mxenabled/mxui will be getting a big update and this will be theme.palette.primary_main
370
373
  fontSize: 14,
371
374
  fontWeight: "bold",
372
375
  px: 28,
373
- ...g
376
+ ...v
374
377
  }),
375
378
  children: o
376
379
  }
@@ -387,15 +390,15 @@ const z = E.createContext(null), Et = ({
387
390
  }
388
391
  );
389
392
  }
390
- ), ut = ({ beat: i }) => {
391
- const [o, t] = ae(je.UNCATEGORIZED);
392
- return q(() => {
393
+ ), _t = ({ beat: i }) => {
394
+ const [o, t] = ae(Qe.UNCATEGORIZED);
395
+ return ee(() => {
393
396
  i.primary_category_guid ? t(i.primary_category_guid) : i.category_guids?.length && t(i.category_guids[0]);
394
- }, []), /* @__PURE__ */ e($e, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
395
- }, pt = ({ beat: i }) => {
396
- const o = Me(), t = _t(o);
397
+ }, []), /* @__PURE__ */ e(je, { categoryGuid: o, size: 16, sx: { minWidth: 16 } });
398
+ }, Ct = ({ beat: i }) => {
399
+ const o = Ae(), t = ft(o);
397
400
  return /* @__PURE__ */ e(
398
- Ye,
401
+ Xe,
399
402
  {
400
403
  categoryGuid: i.primary_category_guid || i.category_guids && i.category_guids[0] || "",
401
404
  className: t,
@@ -403,12 +406,12 @@ const z = E.createContext(null), Et = ({
403
406
  size: 16
404
407
  }
405
408
  );
406
- }, _t = (i) => Xe({
409
+ }, ft = (i) => qe({
407
410
  marginTop: i.Spacing.XTiny,
408
411
  "& .kyper-categoryicon": {
409
412
  display: "flex"
410
413
  }
411
- }), Ct = P(pt), ft = ({
414
+ }), mt = Z(Ct), Rt = ({
412
415
  color: i = "currentColor",
413
416
  height: o,
414
417
  size: t = 16,
@@ -434,18 +437,18 @@ const z = E.createContext(null), Et = ({
434
437
  }
435
438
  )
436
439
  }
437
- ), mt = (i) => i ? i.data ? i.data.map((o) => {
440
+ ), gt = (i) => i ? i.data ? i.data.map((o) => {
438
441
  const t = {};
439
442
  return i.names?.map((r, l) => {
440
443
  t[r] = o[l];
441
444
  }), t;
442
- }) : [] : [], Rt = (i, o) => {
443
- const t = mt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
445
+ }) : [] : [], It = (i, o) => {
446
+ const t = gt(i), r = t.length / 2, l = t.slice(0, r), n = t.slice(r);
444
447
  return !l.length || !n.length ? o.Color.Primary300 : l[0].amount > n[0].amount ? o.Color.Error300 : l[0].amount < n[0].amount ? o.Color.Success300 : o.Color.Primary300;
445
- }, gt = ({ beat: i }) => {
446
- const o = Me(), t = Rt(i.data_series, o);
447
- return /* @__PURE__ */ e(Q, { name: "bar_chart", sx: { color: t } });
448
- }, De = () => /* @__PURE__ */ R("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
448
+ }, yt = ({ beat: i }) => {
449
+ const o = Ae(), t = It(i.data_series, o);
450
+ return /* @__PURE__ */ e(J, { name: "bar_chart", sx: { color: t } });
451
+ }, Le = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
449
452
  /* @__PURE__ */ e(
450
453
  "path",
451
454
  {
@@ -689,7 +692,7 @@ const z = E.createContext(null), Et = ({
689
692
  fillRule: "evenodd"
690
693
  }
691
694
  ),
692
- /* @__PURE__ */ R("g", { filter: "url(#filter0_d_1565_98011)", children: [
695
+ /* @__PURE__ */ g("g", { filter: "url(#filter0_d_1565_98011)", children: [
693
696
  /* @__PURE__ */ e("mask", { height: "22", id: "mask1_1565_98011", maskUnits: "userSpaceOnUse", width: "17", x: "16", y: "12", children: /* @__PURE__ */ e(
694
697
  "path",
695
698
  {
@@ -945,10 +948,10 @@ const z = E.createContext(null), Et = ({
945
948
  ),
946
949
  /* @__PURE__ */ e("path", { d: "M17.9668 31.5737H19.4947", stroke: "#E4E8EE", strokeWidth: "0.264005" })
947
950
  ] }),
948
- /* @__PURE__ */ R("g", { filter: "url(#filter1_d_1565_98011)", children: [
951
+ /* @__PURE__ */ g("g", { filter: "url(#filter1_d_1565_98011)", children: [
949
952
  /* @__PURE__ */ e("circle", { cx: "15.0441", cy: "16.0441", fill: "#CDD3DD", r: "15.0441" }),
950
953
  /* @__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" }) }),
951
- /* @__PURE__ */ R("g", { mask: "url(#mask2_1565_98011)", children: [
954
+ /* @__PURE__ */ g("g", { mask: "url(#mask2_1565_98011)", children: [
952
955
  /* @__PURE__ */ e("rect", { fill: "white", height: "31.1359", transform: "translate(0 0.162598)", width: "31.0101" }),
953
956
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "4.52002" }),
954
957
  /* @__PURE__ */ e("rect", { fill: "#A8B1BD", height: "3.0172", rx: "0.167622", width: "3.0172", x: "3.26953", y: "17.1758" }),
@@ -1138,8 +1141,8 @@ const z = E.createContext(null), Et = ({
1138
1141
  fill: "#CDD3DD"
1139
1142
  }
1140
1143
  ),
1141
- /* @__PURE__ */ R("defs", { children: [
1142
- /* @__PURE__ */ R(
1144
+ /* @__PURE__ */ g("defs", { children: [
1145
+ /* @__PURE__ */ g(
1143
1146
  "filter",
1144
1147
  {
1145
1148
  colorInterpolationFilters: "sRGB",
@@ -1182,7 +1185,7 @@ const z = E.createContext(null), Et = ({
1182
1185
  ]
1183
1186
  }
1184
1187
  ),
1185
- /* @__PURE__ */ R(
1188
+ /* @__PURE__ */ g(
1186
1189
  "filter",
1187
1190
  {
1188
1191
  colorInterpolationFilters: "sRGB",
@@ -1226,10 +1229,10 @@ const z = E.createContext(null), Et = ({
1226
1229
  }
1227
1230
  )
1228
1231
  ] })
1229
- ] }), Ie = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1230
- const l = Ae(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
1231
- return r === 0 ? /* @__PURE__ */ e(Q, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(ut, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(Ct, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(gt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(Q, { name: "campaign" }) : /* @__PURE__ */ e(
1232
- Q,
1232
+ ] }), ye = ({ beat: i, clientColorScheme: o, color: t, type: r }) => {
1233
+ const l = Oe(), n = o?.primary_300 ? o.primary_300 : l.palette.primary.main;
1234
+ return r === 0 ? /* @__PURE__ */ e(J, { fill: !0, name: "error", sx: { color: t || n } }) : r === 1 && i ? /* @__PURE__ */ e(_t, { beat: i }) : r === 2 && i ? /* @__PURE__ */ e(mt, { beat: i }) : r === 3 && i ? /* @__PURE__ */ e(yt, { beat: i }) : r === 5 && i ? /* @__PURE__ */ e(J, { name: "campaign" }) : /* @__PURE__ */ e(
1235
+ J,
1233
1236
  {
1234
1237
  fill: !0,
1235
1238
  name: "info",
@@ -1238,34 +1241,34 @@ const z = E.createContext(null), Et = ({
1238
1241
  }
1239
1242
  }
1240
1243
  );
1241
- }, F = () => {
1242
- const i = E.useContext(z);
1244
+ }, H = () => {
1245
+ const i = u.useContext($);
1243
1246
  if (!i)
1244
1247
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1245
1248
  return i.store.copyStore;
1246
- }, It = () => {
1247
- const i = E.useContext(z);
1249
+ }, vt = () => {
1250
+ const i = u.useContext($);
1248
1251
  if (!i?.store?.insightsMicroWidgetStore)
1249
1252
  throw new Error(
1250
1253
  "useInsightsMicroWidgetStore() must be used within the InsightsMicroWidgetDataProvider"
1251
1254
  );
1252
1255
  return i.store.insightsMicroWidgetStore;
1253
- }, K = () => {
1254
- const i = E.useContext(z);
1256
+ }, Y = () => {
1257
+ const i = u.useContext($);
1255
1258
  if (!i)
1256
1259
  throw new Error("useEvent() must be used within the InsightsMicroWidgetDataProvider");
1257
1260
  return { onEvent: i.onEvent };
1258
- }, Le = () => {
1259
- const i = E.useContext(z);
1261
+ }, Ne = () => {
1262
+ const i = u.useContext($);
1260
1263
  if (!i)
1261
1264
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1262
1265
  return { onPageview: i.onPageview };
1263
- }, Ne = {
1266
+ }, Ve = {
1264
1267
  LARGE: 180,
1265
1268
  STANDARD: 154,
1266
1269
  XLARGE: 200,
1267
1270
  XXLARGE: 248
1268
- }, yt = 50, Ve = 1, vt = ({
1271
+ }, St = 50, He = 1, Mt = ({
1269
1272
  ariaLabel: i,
1270
1273
  backgroundColor: o,
1271
1274
  beat: t,
@@ -1273,66 +1276,66 @@ const z = E.createContext(null), Et = ({
1273
1276
  showCTAColocatedWithText: l = !0,
1274
1277
  heightOverrides: n,
1275
1278
  index: a,
1276
- isActiveCard: _,
1277
- onCardClick: u,
1278
- posthog: p,
1279
+ isActiveCard: s,
1280
+ onCardClick: p,
1281
+ posthog: _,
1279
1282
  showIcon: C,
1280
1283
  variant: f,
1281
- widthOverrides: s
1284
+ widthOverrides: h
1282
1285
  }) => {
1283
- const { ref: d, inView: c } = Se({
1284
- threshold: Ve
1285
- }), { cardsCopy: y } = F(), { onEvent: m } = K(), { updateBeat: M, updateOffer: A } = It();
1286
- q(() => {
1287
- c && (t.has_been_displayed ? m(We(t.template)) : (t.guid.startsWith("OFR") ? A({
1286
+ const { ref: m, inView: c } = Me({
1287
+ threshold: He
1288
+ }), { cardsCopy: E } = H(), { onEvent: R } = Y(), { updateBeat: y, updateOffer: O } = vt();
1289
+ ee(() => {
1290
+ c && (t.has_been_displayed ? R(we(t.template)) : (t.guid.startsWith("OFR") ? O({
1288
1291
  ...t,
1289
1292
  has_been_displayed: !0
1290
- }) : M({
1293
+ }) : y({
1291
1294
  ...t,
1292
1295
  has_been_displayed: !0
1293
- }), m(we(t.template))));
1294
- }, [c]), q(() => {
1296
+ }), R(xe(t.template))));
1297
+ }, [c]), ee(() => {
1295
1298
  if (c && t)
1296
1299
  if (t.template === "MarketingOffer") {
1297
- const g = t;
1298
- p?.capture("viewed_messaging_insight", {
1300
+ const v = t;
1301
+ _?.capture("viewed_messaging_insight", {
1299
1302
  template: t.template,
1300
- campaign_guid: g.campaign_guid,
1301
- campaign_name: g.pulse_campaign_name
1303
+ campaign_guid: v.campaign_guid,
1304
+ campaign_name: v.pulse_campaign_name
1302
1305
  });
1303
1306
  } else
1304
- p?.capture("viewed_insight", {
1307
+ _?.capture("viewed_insight", {
1305
1308
  beat_guid: t.guid,
1306
1309
  template: t.template,
1307
1310
  position: a
1308
1311
  });
1309
1312
  }, [t, a, c]);
1310
1313
  const T = () => {
1311
- if (u && u(t), m(Te(t.template)), t.template === "MarketingOffer") {
1312
- const g = t;
1313
- p?.capture("clicked_messaging_insight", {
1314
+ if (p && p(t), R(We(t.template)), t.template === "MarketingOffer") {
1315
+ const v = t;
1316
+ _?.capture("clicked_messaging_insight", {
1314
1317
  template: t.template,
1315
- campaign_guid: g.campaign_guid,
1316
- campaign_name: g.pulse_campaign_name
1318
+ campaign_guid: v.campaign_guid,
1319
+ campaign_name: v.pulse_campaign_name
1317
1320
  });
1318
1321
  } else
1319
- p?.capture("clicked_insight", {
1322
+ _?.capture("clicked_insight", {
1320
1323
  beat_guid: t.guid,
1321
1324
  template: t.template,
1322
1325
  position: a
1323
1326
  });
1324
1327
  };
1325
1328
  return /* @__PURE__ */ e(
1326
- J,
1329
+ te,
1327
1330
  {
1328
- actionText: t.micro_call_to_action || y.micro_card_cta,
1331
+ actionText: t.micro_call_to_action || E.micro_card_cta,
1329
1332
  ariaLabel: i,
1330
1333
  backgroundColor: o,
1331
1334
  description: t?.html_micro_description && t?.html_micro_description.length > 0 ? t.html_micro_description : t.html_description,
1332
1335
  fontColors: { buttonColor: r?.primary_300 },
1333
1336
  heightOverrides: n,
1334
- icon: Ie && /* @__PURE__ */ e(
1335
- Ie,
1337
+ icon: ye && /* @__PURE__ */ e(
1338
+ ye,
1336
1339
  {
1337
1340
  beat: t,
1338
1341
  clientColorScheme: r,
@@ -1340,18 +1343,18 @@ const z = E.createContext(null), Et = ({
1340
1343
  type: t?.icon_type
1341
1344
  }
1342
1345
  ),
1343
- isActiveCard: _,
1346
+ isActiveCard: s,
1344
1347
  onCardClick: T,
1345
- posthog: p,
1346
- ref: d,
1348
+ posthog: _,
1349
+ ref: m,
1347
1350
  showCTAColocatedWithText: l,
1348
1351
  showIcon: C,
1349
1352
  title: t.micro_title && t.micro_title.length > 0 ? t.micro_title : t.title,
1350
1353
  variant: f,
1351
- widthOverrides: s
1354
+ widthOverrides: h
1352
1355
  }
1353
1356
  );
1354
- }, St = ({
1357
+ }, At = ({
1355
1358
  clientColorScheme: i,
1356
1359
  currentBeatIndex: o,
1357
1360
  numBeats: t,
@@ -1359,12 +1362,12 @@ const z = E.createContext(null), Et = ({
1359
1362
  onPreviousClick: l,
1360
1363
  scrollRightBoundary: n,
1361
1364
  scrollX: a,
1362
- shouldApplyNewAnimation: _ = !1,
1363
- visibleCardsCount: u = 1
1365
+ shouldApplyNewAnimation: s = !1,
1366
+ visibleCardsCount: p = 1
1364
1367
  }) => {
1365
- const p = ye(), { carouselCopy: C } = F(), f = Math.floor(a) > n || o - u + 1 === 0, s = a < 0 || t - 1 === o, d = p.palette.grey[500], c = i?.primary_300 ?? p.palette.primary.main;
1366
- return /* @__PURE__ */ R(
1367
- U,
1368
+ const _ = ve(), { carouselCopy: C } = H(), f = Math.floor(a) > n || o - p + 1 === 0, h = a < 0 || t - 1 === o, m = _.palette.grey[500], c = i?.primary_300 ?? _.palette.primary.main;
1369
+ return /* @__PURE__ */ g(
1370
+ K,
1368
1371
  {
1369
1372
  direction: "row",
1370
1373
  sx: {
@@ -1386,27 +1389,27 @@ const z = E.createContext(null), Et = ({
1386
1389
  disabled: f,
1387
1390
  onClick: l,
1388
1391
  children: /* @__PURE__ */ e(
1389
- Ue,
1392
+ Ke,
1390
1393
  {
1391
1394
  style: {
1392
- color: f ? d : c
1395
+ color: f ? m : c
1393
1396
  }
1394
1397
  }
1395
1398
  )
1396
1399
  }
1397
1400
  ),
1398
- Array.from({ length: t }).map((y, m) => {
1399
- const M = m === o;
1401
+ Array.from({ length: t }).map((E, R) => {
1402
+ const y = R === o;
1400
1403
  return /* @__PURE__ */ e(
1401
- b,
1404
+ U,
1402
1405
  {
1403
1406
  className: "mx-insights-micro-carousel-dots",
1404
1407
  sx: {
1405
- bgcolor: M ? c : d,
1408
+ bgcolor: y ? c : m,
1406
1409
  height: 8,
1407
1410
  mr: 8,
1408
1411
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
1409
- ..._ ? {
1412
+ ...s ? {
1410
1413
  borderRadius: "4px",
1411
1414
  transformOrigin: "center",
1412
1415
  transition: "all 0.5s ease-out",
@@ -1415,24 +1418,24 @@ const z = E.createContext(null), Et = ({
1415
1418
  borderRadius: "50%",
1416
1419
  p: 0
1417
1420
  },
1418
- width: M && _ ? 24 : 8
1421
+ width: y && s ? 24 : 8
1419
1422
  }
1420
1423
  },
1421
- `carousel-button-${m}`
1424
+ `carousel-button-${R}`
1422
1425
  );
1423
1426
  }),
1424
1427
  /* @__PURE__ */ e(
1425
1428
  ue,
1426
1429
  {
1427
- "aria-disabled": s,
1430
+ "aria-disabled": h,
1428
1431
  "aria-label": C.next_insight_cta_aria,
1429
- disabled: s,
1432
+ disabled: h,
1430
1433
  onClick: r,
1431
1434
  children: /* @__PURE__ */ e(
1432
- ve,
1435
+ Se,
1433
1436
  {
1434
1437
  style: {
1435
- color: s ? d : c
1438
+ color: h ? m : c
1436
1439
  }
1437
1440
  }
1438
1441
  )
@@ -1441,118 +1444,119 @@ const z = E.createContext(null), Et = ({
1441
1444
  ]
1442
1445
  }
1443
1446
  );
1444
- }, Mt = ({
1445
- allowSingleCardPeeking: i = !1,
1446
- beats: o = [],
1447
- clientColorScheme: t,
1448
- showCTAColocatedWithText: r,
1449
- heightOverrides: l,
1450
- onCardClick: n,
1451
- posthog: a,
1452
- shouldApplyNewAnimation: _ = !1,
1453
- showCarouselControls: u,
1454
- showIcon: p,
1455
- showWithMargin: C = !0,
1456
- variant: f,
1457
- widthOverrides: s,
1458
- visibleCardsCount: d = 1
1447
+ }, Ot = ({
1448
+ analyticsMetadata: i,
1449
+ allowSingleCardPeeking: o = !1,
1450
+ beats: t = [],
1451
+ clientColorScheme: r,
1452
+ showCTAColocatedWithText: l,
1453
+ heightOverrides: n,
1454
+ onCardClick: a,
1455
+ posthog: s,
1456
+ shouldApplyNewAnimation: p = !1,
1457
+ showCarouselControls: _,
1458
+ showIcon: C,
1459
+ showWithMargin: f = !0,
1460
+ variant: h,
1461
+ widthOverrides: m,
1462
+ visibleCardsCount: c = 1
1459
1463
  // Default to 1 card visible
1460
1464
  }) => {
1461
- const c = E.useRef(null), y = E.useRef(null), [m, M] = E.useState(0), [A, T] = E.useState(null), [g, G] = E.useState(null), [I, W] = E.useState(null), [ee, te] = E.useState(_), { carouselCopy: B } = F(), { onEvent: w } = K();
1462
- E.useEffect(() => {
1463
- if (c.current && !i) {
1464
- const h = c.current.offsetWidth, O = 8;
1465
- let H;
1466
- if (d > 1) {
1467
- const j = (h - (d - 1) * O) / d / 3;
1468
- H = (h - j - (d - 1) * O) / d;
1465
+ const E = u.useRef(null), R = u.useRef(null), [y, O] = u.useState(0), [T, v] = u.useState(null), [k, P] = u.useState(null), [I, z] = u.useState(null), [ie, G] = u.useState(p), { carouselCopy: F } = H(), { onEvent: b } = Y();
1466
+ u.useEffect(() => {
1467
+ if (E.current && !o) {
1468
+ const d = E.current.offsetWidth, A = 8;
1469
+ let N;
1470
+ if (c > 1) {
1471
+ const Q = (d - (c - 1) * A) / c / 3;
1472
+ N = (d - Q - (c - 1) * A) / c;
1469
1473
  } else
1470
- H = h;
1471
- W(H);
1474
+ N = d;
1475
+ z(N);
1472
1476
  }
1473
- }, [d, c.current?.offsetWidth]), E.useEffect(() => {
1474
- const h = y.current?.offsetWidth;
1475
- if (typeof h == "number" && i) {
1476
- const O = (Z) => {
1477
- te(!0);
1478
- const X = [
1477
+ }, [c, E.current?.offsetWidth]), u.useEffect(() => {
1478
+ const d = R.current?.offsetWidth;
1479
+ if (typeof d == "number" && o) {
1480
+ const A = (B) => {
1481
+ G(!0);
1482
+ const q = [
1479
1483
  { maxWidth: 375, cardWidth: 268 },
1480
1484
  { maxWidth: 444, cardWidth: 300 },
1481
1485
  { maxWidth: 599, cardWidth: 350 },
1482
1486
  { maxWidth: 749, cardWidth: 450 },
1483
1487
  { maxWidth: 900, cardWidth: 600 }
1484
- ].find((ne) => Z <= ne.maxWidth);
1485
- return X ? X.cardWidth : 750;
1488
+ ].find((ne) => B <= ne.maxWidth);
1489
+ return q ? q.cardWidth : 750;
1486
1490
  };
1487
- W(O(h));
1488
- const H = () => {
1489
- const Z = y.current?.offsetWidth;
1490
- typeof Z == "number" && W(O(Z));
1491
+ z(A(d));
1492
+ const N = () => {
1493
+ const B = R.current?.offsetWidth;
1494
+ typeof B == "number" && z(A(B));
1491
1495
  };
1492
- return window.addEventListener("resize", H), () => {
1493
- window.removeEventListener("resize", H);
1496
+ return window.addEventListener("resize", N), () => {
1497
+ window.removeEventListener("resize", N);
1494
1498
  };
1495
1499
  }
1496
- }, [i, y]);
1497
- const ie = () => {
1498
- w(S.ON_CAROUSEL_FORWARD_CLICK), c.current && I && c.current.scrollTo({
1499
- left: m + I + 8,
1500
+ }, [o, R]);
1501
+ const oe = () => {
1502
+ b(M.ON_CAROUSEL_FORWARD_CLICK, i), E.current && I && E.current.scrollTo({
1503
+ left: y + I + 8,
1500
1504
  top: 0,
1501
1505
  behavior: "smooth"
1502
1506
  });
1503
- }, oe = () => {
1504
- w(S.ON_CAROUSEL_BACK_CLICK), c.current && I && c.current.scrollTo({
1505
- left: Math.max(0, m - (I + 8)),
1507
+ }, re = () => {
1508
+ b(M.ON_CAROUSEL_BACK_CLICK, i), E.current && I && E.current.scrollTo({
1509
+ left: Math.max(0, y - (I + 8)),
1506
1510
  top: 0,
1507
1511
  behavior: "smooth"
1508
1512
  });
1509
- }, re = () => {
1510
- c.current && M(c.current.scrollLeft);
1511
- }, $ = () => {
1512
- if (!g || !A) return;
1513
- g - A > yt ? w(S.ON_CAROUSEL_FORWARD_SWIPE) : w(S.ON_CAROUSEL_BACK_SWIPE);
1514
- }, Y = (h) => {
1515
- T(h.targetTouches[0].clientX);
1516
- }, V = (h) => {
1517
- T(null), G(h.targetTouches[0].clientX);
1513
+ }, j = () => {
1514
+ E.current && O(E.current.scrollLeft);
1515
+ }, X = () => {
1516
+ if (!k || !T) return;
1517
+ k - T > St ? b(M.ON_CAROUSEL_FORWARD_SWIPE, i) : b(M.ON_CAROUSEL_BACK_SWIPE, i);
1518
+ }, L = (d) => {
1519
+ v(d.targetTouches[0].clientX);
1520
+ }, Be = (d) => {
1521
+ v(null), P(d.targetTouches[0].clientX);
1518
1522
  }, he = {
1519
- clientColorScheme: t,
1520
- showCTAColocatedWithText: r,
1521
- heightOverrides: l,
1522
- posthog: a,
1523
- showIcon: p,
1524
- variant: f
1525
- }, le = I ? Math.round(m / (I + 8)) : 0, Fe = c.current ? c.current.scrollWidth - c.current.offsetWidth : 0;
1526
- return /* @__PURE__ */ R(
1527
- U,
1523
+ clientColorScheme: r,
1524
+ showCTAColocatedWithText: l,
1525
+ heightOverrides: n,
1526
+ posthog: s,
1527
+ showIcon: C,
1528
+ variant: h
1529
+ }, le = I ? Math.round(y / (I + 8)) : 0, Ze = E.current ? E.current.scrollWidth - E.current.offsetWidth : 0;
1530
+ return /* @__PURE__ */ g(
1531
+ K,
1528
1532
  {
1529
- "aria-label": B.carousel_title,
1533
+ "aria-label": F.carousel_title,
1530
1534
  "aria-roledescription": "carousel",
1531
- ref: y,
1535
+ ref: R,
1532
1536
  role: "group/region",
1533
1537
  sx: {
1534
1538
  alignItems: "center",
1535
1539
  boxSizing: "border-box",
1536
- height: l,
1537
- width: s || "100%"
1540
+ height: n,
1541
+ width: m || "100%"
1538
1542
  },
1539
1543
  children: [
1540
- /* @__PURE__ */ R(
1541
- U,
1544
+ /* @__PURE__ */ g(
1545
+ K,
1542
1546
  {
1543
1547
  direction: "row",
1544
- onScroll: re,
1545
- onTouchEnd: $,
1546
- onTouchMove: Y,
1547
- onTouchStart: V,
1548
- ref: c,
1548
+ onScroll: j,
1549
+ onTouchEnd: X,
1550
+ onTouchMove: L,
1551
+ onTouchStart: Be,
1552
+ ref: E,
1549
1553
  sx: {
1550
1554
  alignItems: "center",
1551
- height: l && "100%",
1555
+ height: n && "100%",
1552
1556
  gap: 8,
1553
1557
  listStyleType: "none",
1554
1558
  m: 0,
1555
- maxWidth: C ? "calc(100% - 32px)" : "100%",
1559
+ maxWidth: f ? "calc(100% - 32px)" : "100%",
1556
1560
  overflowX: "auto",
1557
1561
  overflowY: "hidden",
1558
1562
  p: 0,
@@ -1564,31 +1568,31 @@ const z = E.createContext(null), Et = ({
1564
1568
  }
1565
1569
  },
1566
1570
  children: [
1567
- o.map((h, O) => {
1568
- const H = O + 1, Z = o.length + 1, j = Qe(
1569
- B.card_position_in_carousel_aria,
1570
- H.toString(),
1571
- Z.toString()
1572
- ), X = h.micro_title && h.micro_title.length > 0, ne = h.micro_description && h.micro_description.length > 0, Be = X ? h.micro_title : h.title, Ze = ne ? h.micro_description : h.description;
1571
+ t.map((d, A) => {
1572
+ const N = A + 1, B = t.length + 1, Q = Je(
1573
+ F.card_position_in_carousel_aria,
1574
+ N.toString(),
1575
+ B.toString()
1576
+ ), q = d.micro_title && d.micro_title.length > 0, ne = d.micro_description && d.micro_description.length > 0, Pe = q ? d.micro_title : d.title, Ge = ne ? d.micro_description : d.description;
1573
1577
  return /* @__PURE__ */ e(
1574
- vt,
1578
+ Mt,
1575
1579
  {
1576
- ariaLabel: `${j}: ${Be}, ${Ze}`,
1577
- beat: h,
1578
- index: O,
1579
- isActiveCard: O === le,
1580
- onCardClick: n,
1580
+ ariaLabel: `${Q}: ${Pe}, ${Ge}`,
1581
+ beat: d,
1582
+ index: A,
1583
+ isActiveCard: A === le,
1584
+ onCardClick: a,
1581
1585
  widthOverrides: I || void 0,
1582
1586
  ...he
1583
1587
  },
1584
- `${h.guid} ${O}`
1588
+ `${d.guid} ${A}`
1585
1589
  );
1586
1590
  }),
1587
1591
  /* @__PURE__ */ e(
1588
- Lt,
1592
+ Vt,
1589
1593
  {
1590
- isActiveCard: le === o.length,
1591
- onCardClick: n,
1594
+ isActiveCard: le === t.length,
1595
+ onCardClick: a,
1592
1596
  widthOverrides: I || void 0,
1593
1597
  ...he
1594
1598
  }
@@ -1596,42 +1600,43 @@ const z = E.createContext(null), Et = ({
1596
1600
  ]
1597
1601
  }
1598
1602
  ),
1599
- u && /* @__PURE__ */ e(
1600
- St,
1603
+ _ && /* @__PURE__ */ e(
1604
+ At,
1601
1605
  {
1602
- clientColorScheme: t,
1603
- currentBeatIndex: le + d - 1,
1604
- numBeats: o.length + 1,
1605
- onNextClick: ie,
1606
- onPreviousClick: oe,
1607
- scrollRightBoundary: Fe,
1608
- scrollX: m,
1609
- shouldApplyNewAnimation: ee,
1610
- visibleCardsCount: d
1606
+ clientColorScheme: r,
1607
+ currentBeatIndex: le + c - 1,
1608
+ numBeats: t.length + 1,
1609
+ onNextClick: oe,
1610
+ onPreviousClick: re,
1611
+ scrollRightBoundary: Ze,
1612
+ scrollX: y,
1613
+ shouldApplyNewAnimation: ie,
1614
+ visibleCardsCount: c
1611
1615
  }
1612
1616
  )
1613
1617
  ]
1614
1618
  }
1615
1619
  );
1616
- }, At = P(Mt), Ot = ({
1617
- clientColorScheme: i,
1618
- onCardClick: o,
1619
- posthog: t,
1620
- widthOverrides: r
1620
+ }, Tt = Z(Ot), Wt = ({
1621
+ analyticsMetadata: i,
1622
+ clientColorScheme: o,
1623
+ onCardClick: t,
1624
+ posthog: r,
1625
+ widthOverrides: l
1621
1626
  }) => {
1622
- const { carouselCopy: l } = F(), { onEvent: n } = K(), a = () => {
1623
- n && (n(S.ON_VIEW_MORE_CLICKED), o(), t?.capture("clicked_view_more"));
1627
+ const { carouselCopy: n } = H(), { onEvent: a } = Y(), s = () => {
1628
+ a && (a(M.ON_VIEW_MORE_CLICKED, i), t(), r?.capture("clicked_view_more"));
1624
1629
  };
1625
- return l ? /* @__PURE__ */ R(
1626
- U,
1630
+ return n ? /* @__PURE__ */ g(
1631
+ K,
1627
1632
  {
1628
1633
  alignItems: "center",
1629
1634
  direction: "row",
1630
1635
  justifyContent: "space-between",
1631
1636
  spacing: 2,
1632
1637
  sx: {
1633
- padding: r ? 0 : 16,
1634
- width: r || void 0
1638
+ padding: l ? 0 : 16,
1639
+ width: l || void 0
1635
1640
  },
1636
1641
  children: [
1637
1642
  /* @__PURE__ */ e(
@@ -1643,13 +1648,13 @@ const z = E.createContext(null), Et = ({
1643
1648
  lineHeight: "24px"
1644
1649
  },
1645
1650
  variant: "h3",
1646
- children: l.carousel_title
1651
+ children: n.carousel_title
1647
1652
  }
1648
1653
  ),
1649
- /* @__PURE__ */ R(
1650
- be,
1654
+ /* @__PURE__ */ g(
1655
+ ze,
1651
1656
  {
1652
- onClick: a,
1657
+ onClick: s,
1653
1658
  sx: {
1654
1659
  display: "flex",
1655
1660
  alignItems: "center",
@@ -1666,30 +1671,30 @@ const z = E.createContext(null), Et = ({
1666
1671
  Ee,
1667
1672
  {
1668
1673
  sx: {
1669
- color: i?.primary_300,
1674
+ color: o?.primary_300,
1670
1675
  fontSize: 15,
1671
1676
  fontWeight: 600,
1672
1677
  lineHeight: "20px"
1673
1678
  },
1674
1679
  variant: "body1",
1675
- children: l.view_all_insights_in_full_feed_cta_aria
1680
+ children: n.view_all_insights_in_full_feed_cta_aria
1676
1681
  }
1677
1682
  ),
1678
- /* @__PURE__ */ e(ve, { sx: { color: i?.primary_300, ml: "8px" } })
1683
+ /* @__PURE__ */ e(Se, { sx: { color: o?.primary_300, ml: "8px" } })
1679
1684
  ]
1680
1685
  }
1681
1686
  )
1682
1687
  ]
1683
1688
  }
1684
- ) : /* @__PURE__ */ e(ze, {});
1685
- }, Tt = P(Ot), Wt = ({
1689
+ ) : /* @__PURE__ */ e($e, {});
1690
+ }, wt = Z(Wt), xt = ({
1686
1691
  heightOverrides: i,
1687
1692
  widthOverrides: o,
1688
1693
  children: t
1689
1694
  }) => {
1690
- const { carouselCopy: r } = F();
1695
+ const { carouselCopy: r } = H();
1691
1696
  return /* @__PURE__ */ e(
1692
- b,
1697
+ U,
1693
1698
  {
1694
1699
  "aria-label": r?.carousel_title,
1695
1700
  "aria-roledescription": "carousel",
@@ -1703,7 +1708,7 @@ const z = E.createContext(null), Et = ({
1703
1708
  children: t
1704
1709
  }
1705
1710
  );
1706
- }, He = ({
1711
+ }, ke = ({
1707
1712
  ariaLabel: i,
1708
1713
  carouselSize: o,
1709
1714
  clientColorScheme: t,
@@ -1711,38 +1716,38 @@ const z = E.createContext(null), Et = ({
1711
1716
  onCardClick: l,
1712
1717
  posthog: n,
1713
1718
  showIcon: a,
1714
- showWithMargin: _,
1715
- variant: u,
1716
- widthOverrides: p
1719
+ showWithMargin: s,
1720
+ variant: p,
1721
+ widthOverrides: _
1717
1722
  }) => {
1718
- const { cardsCopy: C } = F(), { onEvent: f } = K(), { onPageview: s } = Le();
1719
- E.useEffect(() => {
1720
- s(k.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1723
+ const { cardsCopy: C } = H(), { onEvent: f } = Y(), { onPageview: h } = Ne();
1724
+ u.useEffect(() => {
1725
+ h(V.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1721
1726
  }, []);
1722
- const d = () => {
1723
- l && l(), f(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
1727
+ const m = () => {
1728
+ l && l(), f(M.ON_NO_RELEVANT_INSIGHTS_CLICKED), n?.capture("clicked_insight", {
1724
1729
  template: "no_relevant_insights"
1725
1730
  });
1726
1731
  };
1727
1732
  return /* @__PURE__ */ e(
1728
- J,
1733
+ te,
1729
1734
  {
1730
1735
  actionText: C.micro_card_cta,
1731
1736
  ariaLabel: i,
1732
1737
  description: C.no_relevant_insights_card_description,
1733
1738
  fontColors: { buttonColor: t?.primary_300 },
1734
1739
  heightOverrides: r,
1735
- icon: /* @__PURE__ */ e(De, {}),
1740
+ icon: /* @__PURE__ */ e(Le, {}),
1736
1741
  isZeroState: !0,
1737
- onCardClick: d,
1742
+ onCardClick: m,
1738
1743
  posthog: n,
1739
1744
  showIcon: a,
1740
1745
  style: {
1741
1746
  cardStyle: {
1742
1747
  card: {
1743
- height: `calc(${Ne[o]}px - 44px)`,
1748
+ height: `calc(${Ve[o]}px - 44px)`,
1744
1749
  m: "0 auto",
1745
- width: _ ? "calc(100% - 32px)" : "100%"
1750
+ width: s ? "calc(100% - 32px)" : "100%"
1746
1751
  },
1747
1752
  description: {
1748
1753
  WebkitLineClamp: 4
@@ -1753,11 +1758,11 @@ const z = E.createContext(null), Et = ({
1753
1758
  }
1754
1759
  },
1755
1760
  title: C.no_relevant_insights_card_title,
1756
- variant: u,
1757
- widthOverrides: p
1761
+ variant: p,
1762
+ widthOverrides: _
1758
1763
  }
1759
1764
  );
1760
- }, ni = P(He), ke = ({
1765
+ }, ci = Z(ke), Fe = ({
1761
1766
  ariaLabel: i,
1762
1767
  carouselSize: o,
1763
1768
  heightOverrides: t,
@@ -1765,19 +1770,19 @@ const z = E.createContext(null), Et = ({
1765
1770
  posthog: l,
1766
1771
  showIcon: n,
1767
1772
  showWithMargin: a,
1768
- variant: _,
1769
- widthOverrides: u
1773
+ variant: s,
1774
+ widthOverrides: p
1770
1775
  }) => {
1771
- const { onPageview: p } = Le(), { zeroStateCopy: C } = F();
1772
- return E.useEffect(() => {
1773
- p(k.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1776
+ const { onPageview: _ } = Ne(), { zeroStateCopy: C } = H();
1777
+ return u.useEffect(() => {
1778
+ _(V.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1774
1779
  }, []), /* @__PURE__ */ e(
1775
- J,
1780
+ te,
1776
1781
  {
1777
1782
  ariaLabel: i,
1778
1783
  description: C.carousel_zero_state_description,
1779
1784
  heightOverrides: t,
1780
- icon: /* @__PURE__ */ e(De, {}),
1785
+ icon: /* @__PURE__ */ e(Le, {}),
1781
1786
  isZeroState: !0,
1782
1787
  onCardClick: r,
1783
1788
  posthog: l,
@@ -1785,7 +1790,7 @@ const z = E.createContext(null), Et = ({
1785
1790
  style: {
1786
1791
  cardStyle: {
1787
1792
  card: {
1788
- height: `calc(${Ne[o]}px - 44px)`,
1793
+ height: `calc(${Ve[o]}px - 44px)`,
1789
1794
  m: "0 auto",
1790
1795
  width: a ? "calc(100% - 32px)" : "100%"
1791
1796
  },
@@ -1795,12 +1800,12 @@ const z = E.createContext(null), Et = ({
1795
1800
  }
1796
1801
  },
1797
1802
  title: C.carousel_zero_state_title,
1798
- variant: _,
1799
- widthOverrides: u
1803
+ variant: s,
1804
+ widthOverrides: p
1800
1805
  }
1801
1806
  );
1802
- }, ai = P(ke), wt = () => /* @__PURE__ */ e(
1803
- b,
1807
+ }, di = Z(Fe), Dt = () => /* @__PURE__ */ e(
1808
+ U,
1804
1809
  {
1805
1810
  sx: {
1806
1811
  alignItems: "center",
@@ -1809,9 +1814,9 @@ const z = E.createContext(null), Et = ({
1809
1814
  justifyContent: "center",
1810
1815
  width: "100%"
1811
1816
  },
1812
- children: /* @__PURE__ */ e(qe, {})
1817
+ children: /* @__PURE__ */ e(et, {})
1813
1818
  }
1814
- ), x = new ht(), xt = ({
1819
+ ), W = new ut(), Lt = ({
1815
1820
  allowSingleCardPeeking: i,
1816
1821
  areBeatsLoading: o,
1817
1822
  beats: t = [],
@@ -1821,84 +1826,86 @@ const z = E.createContext(null), Et = ({
1821
1826
  showCTAColocatedWithText: l = !0,
1822
1827
  endpoint: n = "/",
1823
1828
  heightOverrides: a,
1824
- logOutUser: _,
1825
- onCardClick: u = () => {
1829
+ logOutUser: s,
1830
+ onCardClick: p = () => {
1826
1831
  },
1827
- onEvent: p = () => {
1832
+ onEvent: _ = () => {
1828
1833
  },
1829
1834
  onPageview: C = () => {
1830
1835
  },
1831
1836
  posthog: f,
1832
- shouldApplyNewAnimation: s = !1,
1833
- showBorder: d = !0,
1837
+ shouldApplyNewAnimation: h = !1,
1838
+ showBorder: m = !0,
1834
1839
  showCarouselControls: c,
1835
- showHeader: y,
1836
- showIcon: m,
1837
- showWithMargin: M = !0,
1838
- token: A = "",
1840
+ showHeader: E,
1841
+ showIcon: R,
1842
+ showWithMargin: y = !0,
1843
+ token: O = "",
1839
1844
  useDarkMode: T,
1840
- userHasFullInsightFeedBeats: g,
1841
- variant: G,
1842
- visibleCardsCount: I = 1,
1843
- widthOverrides: W
1845
+ userHasFullInsightFeedBeats: v,
1846
+ variant: k,
1847
+ visibleCardsCount: P = 1,
1848
+ widthOverrides: I
1844
1849
  }) => {
1845
- const ee = ye(), [te, B] = ae("STANDARD"), [w, ie] = ae(!1), oe = et([p], x), re = tt([C], x);
1846
- E.useEffect(() => {
1847
- x.isInitialized || x.initialize(n, A, _);
1848
- }, [n, A, _, x.isInitialized]), E.useEffect(() => {
1849
- const V = window.innerHeight;
1850
- V < 180 ? B("STANDARD") : V >= 180 && V < 200 ? B("LARGE") : V >= 200 && V < 248 ? B("XLARGE") : V >= 248 && B("XXLARGE");
1851
- }, [window.innerHeight]), E.useEffect(() => {
1852
- ie(!o && x.isInitialized);
1853
- }, [o, x.isInitialized]);
1854
- const $ = {
1850
+ const z = ve(), [ie, G] = ae("STANDARD"), [F, b] = ae(!1), oe = it([_], W), re = ot([C], W);
1851
+ u.useEffect(() => {
1852
+ W.isInitialized || W.initialize(n, O, s);
1853
+ }, [n, O, s, W.isInitialized]), u.useEffect(() => {
1854
+ const L = window.innerHeight;
1855
+ L < 180 ? G("STANDARD") : L >= 180 && L < 200 ? G("LARGE") : L >= 200 && L < 248 ? G("XLARGE") : L >= 248 && G("XXLARGE");
1856
+ }, [window.innerHeight]), u.useEffect(() => {
1857
+ b(!o && W.isInitialized);
1858
+ }, [o, W.isInitialized]);
1859
+ const j = {
1855
1860
  showCTAColocatedWithText: l,
1856
1861
  heightOverrides: a,
1857
- onCardClick: u,
1862
+ onCardClick: p,
1858
1863
  posthog: f,
1859
- showIcon: m,
1860
- showWithMargin: M,
1864
+ showIcon: R,
1865
+ showWithMargin: y,
1861
1866
  useDarkMode: T,
1862
- widthOverrides: W
1863
- }, Y = {
1864
- carouselSize: te,
1865
- variant: G,
1866
- ...$
1867
+ widthOverrides: I
1868
+ }, X = {
1869
+ carouselSize: ie,
1870
+ variant: k,
1871
+ ...j
1867
1872
  };
1868
1873
  return (
1869
1874
  // The Theme provider must wrap the component so that the styles don't break when imported into other applications.
1870
- /* @__PURE__ */ R(Ge, { theme: ee, children: [
1871
- /* @__PURE__ */ e(Pe, {}),
1872
- /* @__PURE__ */ e(Et, { onEvent: oe, onPageview: re, store: x, children: /* @__PURE__ */ R(Wt, { heightOverrides: a, widthOverrides: W, children: [
1873
- (o || !x.isInitialized) && /* @__PURE__ */ e(wt, {}),
1874
- w && y && /* @__PURE__ */ e(
1875
- Tt,
1875
+ /* @__PURE__ */ g(Ue, { theme: z, children: [
1876
+ /* @__PURE__ */ e(be, {}),
1877
+ /* @__PURE__ */ e(pt, { onEvent: oe, onPageview: re, store: W, children: /* @__PURE__ */ g(xt, { heightOverrides: a, widthOverrides: I, children: [
1878
+ (o || !W.isInitialized) && /* @__PURE__ */ e(Dt, {}),
1879
+ F && E && /* @__PURE__ */ e(
1880
+ wt,
1876
1881
  {
1882
+ analyticsMetadata: Ce,
1877
1883
  clientColorScheme: r,
1878
- onCardClick: u,
1884
+ onCardClick: p,
1879
1885
  posthog: f,
1880
- widthOverrides: W
1886
+ widthOverrides: I
1881
1887
  }
1882
1888
  ),
1883
- w && !!t.length && /* @__PURE__ */ e(
1884
- At,
1889
+ F && !!t.length && /* @__PURE__ */ e(
1890
+ Tt,
1885
1891
  {
1886
1892
  allowSingleCardPeeking: i,
1893
+ analyticsMetadata: Ce,
1887
1894
  beats: t,
1888
1895
  clientColorScheme: r,
1889
- shouldApplyNewAnimation: s,
1896
+ shouldApplyNewAnimation: h,
1890
1897
  showCarouselControls: c,
1891
- variant: d ? G : void 0,
1892
- visibleCardsCount: I,
1893
- ...$
1898
+ variant: m ? k : void 0,
1899
+ visibleCardsCount: P,
1900
+ ...j
1894
1901
  }
1895
1902
  ),
1896
- w && !t.length && g && /* @__PURE__ */ e(He, { clientColorScheme: r, ...Y }),
1897
- w && !t.length && !g && /* @__PURE__ */ e(ke, { ...Y })
1903
+ F && !t.length && v && /* @__PURE__ */ e(ke, { clientColorScheme: r, ...X }),
1904
+ F && !t.length && !v && /* @__PURE__ */ e(Fe, { ...X })
1898
1905
  ] }) })
1899
1906
  ] })
1900
1907
  );
1901
- }, ci = P(xt), Dt = ({
1908
+ }, si = Z(Lt), Nt = ({
1902
1909
  isActiveCard: i,
1903
1910
  ariaLabel: o,
1904
1911
  clientColorScheme: t,
@@ -1906,54 +1913,55 @@ const z = E.createContext(null), Et = ({
1906
1913
  onCardClick: l,
1907
1914
  posthog: n,
1908
1915
  showIcon: a,
1909
- variant: _,
1910
- widthOverrides: u
1916
+ variant: s,
1917
+ widthOverrides: p
1911
1918
  }) => {
1912
- const p = Ae(), { ref: C, inView: f } = Se({
1913
- threshold: Ve
1914
- }), { cardsCopy: s } = F(), { onEvent: d } = K();
1915
- q(() => {
1916
- f && (d(xe.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1919
+ const _ = Oe(), { ref: C, inView: f } = Me({
1920
+ threshold: He
1921
+ }), { cardsCopy: h } = H(), { onEvent: m } = Y();
1922
+ ee(() => {
1923
+ f && (m(De.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1917
1924
  template: "view_more_card"
1918
1925
  }));
1919
1926
  }, [f]);
1920
1927
  const c = () => {
1921
- l && l(), d(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
1928
+ l && l(), m(M.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
1922
1929
  template: "view_more_card"
1923
1930
  });
1924
1931
  };
1925
1932
  return /* @__PURE__ */ e(
1926
- J,
1933
+ te,
1927
1934
  {
1928
- actionText: s.micro_card_cta,
1935
+ actionText: h.micro_card_cta,
1929
1936
  ariaLabel: o,
1930
- description: s.view_more_card_description,
1937
+ description: h.view_more_card_description,
1931
1938
  fontColors: { buttonColor: t?.primary_300 },
1932
1939
  heightOverrides: r,
1933
- icon: /* @__PURE__ */ e(ft, { color: t?.primary_300 ?? p.palette.primary.main }),
1940
+ icon: /* @__PURE__ */ e(Rt, { color: t?.primary_300 ?? _.palette.primary.main }),
1934
1941
  isActiveCard: i,
1935
1942
  onCardClick: c,
1936
1943
  posthog: n,
1937
1944
  ref: C,
1938
1945
  showIcon: a,
1939
- title: s.view_more_card_title,
1940
- variant: _,
1941
- widthOverrides: u
1946
+ title: h.view_more_card_title,
1947
+ variant: s,
1948
+ widthOverrides: p
1942
1949
  }
1943
1950
  );
1944
- }, Lt = P(Dt);
1951
+ }, Vt = Z(Nt);
1945
1952
  export {
1946
- ht as A,
1947
- vt as B,
1948
- Tt as C,
1949
- Et as I,
1950
- At as M,
1951
- ni as N,
1952
- Lt as V,
1953
- ai as Z,
1954
- J as a,
1955
- ci as b,
1956
- ft as c,
1957
- gt as d,
1958
- De as e
1953
+ ut as A,
1954
+ Mt as B,
1955
+ wt as C,
1956
+ pt as I,
1957
+ Tt as M,
1958
+ ci as N,
1959
+ Ce as T,
1960
+ Vt as V,
1961
+ di as Z,
1962
+ te as a,
1963
+ si as b,
1964
+ Rt as c,
1965
+ yt as d,
1966
+ Le as e
1959
1967
  };