@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega2

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 (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-BF4QA-Lx.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,31 +1,33 @@
1
- import { jsx as e, jsxs as g, Fragment as xe } from "react/jsx-runtime";
2
- import u, { useEffect as te, useState as ee } from "react";
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
3
  import { observer as P } from "mobx-react-lite";
4
4
  import k from "@mui/material/Stack";
5
- import De from "@mui/material/Button";
5
+ import xe from "@mui/material/Button";
6
6
  import Le from "@mui/material/Typography";
7
7
  import { BarChart as Ve, Error as ae, Campaign as Ne, ChevronLeft as He, ChevronRight as Ce } from "@mxenabled/mx-icons";
8
- import { L as ke } from "./Loader-Ckqi9Rx6.mjs";
8
+ import { L as ke } from "./Loader-DUaFpDGv.mjs";
9
9
  import Z from "@mui/material/Box";
10
- import ce from "@mui/material/IconButton";
11
- import { useTheme as j } from "@mui/material/styles";
10
+ import se from "@mui/material/IconButton";
11
+ import { useTheme as Fe } from "@mui/material/styles";
12
12
  import { useInView as me } from "react-intersection-observer";
13
- import { P as Fe, CategoryIcon as Be, MerchantLogo as Ze } from "@mxenabled/mxui";
14
- import { b as Pe } from "./Category-Ccoew_sA.mjs";
15
- import { b as be } from "./Localization-2MODESHW.mjs";
16
- import Ge from "@mui/material/CircularProgress";
13
+ import { P as Be, CategoryIcon as Ze, MerchantLogo as Pe } from "@mxenabled/mxui";
14
+ import { b as be } from "./Category-CevNQ03n.mjs";
15
+ import te from "@mui/material/styles/useTheme";
16
+ import { b as Ge } from "./Localization-2MODESHW.mjs";
17
+ import Ue from "@mui/material/CircularProgress";
17
18
  import { makeAutoObservable as ie, runInAction as Re } from "mobx";
18
- import { G as se, b as Ue, u as ze, a as Ke } from "./useCombineEvents-kNzLTWCp.mjs";
19
+ import { G as ce, a as ze, u as Ke, b as $e } from "./useCombineEvents-CRwX-qWE.mjs";
19
20
  import { B as de } from "./BeatApi-De2IaqH2.mjs";
20
- import $e from "@mui/material/Card";
21
- import Ye from "@mui/material/CardActions";
22
- import je from "@mui/material/CardContent";
23
- import Xe from "@mui/material/CardHeader";
21
+ import { u as Ye } from "./useWidgetLoadTimer-hIOioiKx.mjs";
22
+ import je from "@mui/material/Card";
23
+ import Xe from "@mui/material/CardActions";
24
+ import Qe from "@mui/material/CardContent";
25
+ import qe from "@mui/material/CardHeader";
24
26
  const Ee = {
25
27
  featureVersion: "spendVsIncomeTrends"
26
28
  };
27
- class Qe {
28
- copyApi = new se("/", "");
29
+ class Je {
30
+ copyApi = new ce("/", "");
29
31
  copyObject = {};
30
32
  namespace = "experiences";
31
33
  translationKey = "micro_insights";
@@ -36,7 +38,7 @@ class Qe {
36
38
  // DEPRECATED: Initialize api in constructor and use loadCopy instead
37
39
  // TODO: Remove this function
38
40
  initialize = async (o, t) => {
39
- this.copyApi = new se(o, t), await this.loadCopy();
41
+ this.copyApi = new ce(o, t), await this.loadCopy();
40
42
  };
41
43
  loadCopy = async () => {
42
44
  const o = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
@@ -71,46 +73,47 @@ const oe = {
71
73
  WeeklyNewMerchantsV2: "WeeklyNewMerchantsV2",
72
74
  MonthlySpendComparison: "MonthlySpendComparison",
73
75
  MonthlySpendToIncomeComparison: "MonthlySpendToIncomeComparison"
74
- }, y = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
76
+ }, v = window?.app?.clientConfig?.microwidget_instance_id || "", he = {
75
77
  INSIGHTS_MICRO_WIDGET: "/micro-insights-carousel"
76
- }, ge = (i) => `on${i}Click`, Ie = (i) => `on${i}View`, ve = (i) => `on${i}ViewFirstTime`, le = (i) => i.replace(/([a-z])([A-Z])/g, "$1 $2"), qe = () => Object.values(oe).reduce(
78
+ }, 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"), et = () => Object.values(oe).reduce(
77
79
  (i, o) => ({
78
80
  ...i,
79
81
  [ge(o)]: {
80
82
  action: L.MICRO_BEAT_CLICKED,
81
- category: D.BEAT_INTERACTION,
83
+ category: x.BEAT_INTERACTION,
82
84
  label: le(o),
83
- value: y
85
+ value: v
84
86
  }
85
87
  }),
86
88
  {}
87
- ), Je = () => Object.values(oe).reduce(
89
+ ), tt = () => Object.values(oe).reduce(
88
90
  (i, o) => ({
89
91
  ...i,
90
92
  [Ie(o)]: {
91
93
  action: L.MICRO_BEAT_DISPLAYED,
92
- category: D.BEAT_INTERACTION,
94
+ category: x.BEAT_INTERACTION,
93
95
  label: le(o),
94
- value: y
96
+ value: v
95
97
  }
96
98
  }),
97
99
  {}
98
- ), et = () => Object.values(oe).reduce(
100
+ ), it = () => Object.values(oe).reduce(
99
101
  (i, o) => ({
100
102
  ...i,
101
- [ve(o)]: {
103
+ [ye(o)]: {
102
104
  action: L.MICRO_BEAT_DISPLAYED_FIRST_TIME,
103
- category: D.BEAT_INTERACTION,
105
+ category: x.BEAT_INTERACTION,
104
106
  label: le(o),
105
- value: y
107
+ value: v
106
108
  }
107
109
  }),
108
110
  {}
109
- ), x = {
111
+ ), D = {
112
+ CARD: "Card",
110
113
  CAROUSEL_CONTROL: "Carousel Control",
111
114
  MICRO_WIDGET: "Micro Widget",
112
115
  VIEW_MORE: "View More"
113
- }, D = {
116
+ }, x = {
114
117
  MICRO_WIDGET_INTERACTION: "Micro Widget Interaction",
115
118
  BEAT_INTERACTION: "Beat Interaction"
116
119
  }, S = {
@@ -120,7 +123,7 @@ const oe = {
120
123
  ON_CAROUSEL_FORWARD_SWIPE: "onCarouselForwardSwipe",
121
124
  ON_NO_RELEVANT_INSIGHTS_CLICKED: "onNoRelevantInsightsClicked",
122
125
  ON_VIEW_MORE_CLICKED: "onViewMoreClicked"
123
- }, ye = {
126
+ }, ve = {
124
127
  ON_VIEW_MORE_VIEWED: "onViewMoreCardView"
125
128
  }, L = {
126
129
  CONTROL_BACKWARD: "Control Backward",
@@ -136,73 +139,73 @@ const oe = {
136
139
  MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS: "Micro Widget Carousel No Relevant Insights"
137
140
  }, ue = {
138
141
  [H.MICRO_WIDGET_CAROUSEL]: {
139
- label: x.MICRO_WIDGET,
142
+ label: D.MICRO_WIDGET,
140
143
  name: H.MICRO_WIDGET_CAROUSEL,
141
144
  path: he.INSIGHTS_MICRO_WIDGET,
142
- value: y
145
+ value: v
143
146
  },
144
147
  // zero state
145
148
  [H.MICRO_WIDGET_CAROUSEL_ZERO_STATE]: {
146
- label: x.MICRO_WIDGET,
149
+ label: D.MICRO_WIDGET,
147
150
  name: H.MICRO_WIDGET_CAROUSEL_ZERO_STATE,
148
151
  path: he.INSIGHTS_MICRO_WIDGET,
149
- value: y
152
+ value: v
150
153
  },
151
154
  // no relevant cards
152
155
  [H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS]: {
153
- label: x.MICRO_WIDGET,
156
+ label: D.MICRO_WIDGET,
154
157
  name: H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS,
155
158
  path: "/micro-widget",
156
- value: y
159
+ value: v
157
160
  }
158
161
  }, pe = {
159
162
  // carousel control interaction events - clicks and swipes
160
163
  [S.ON_CAROUSEL_BACK_CLICK]: {
161
164
  action: L.CONTROL_BACKWARD,
162
- category: D.MICRO_WIDGET_INTERACTION,
163
- label: x.CAROUSEL_CONTROL,
164
- value: y
165
+ category: x.MICRO_WIDGET_INTERACTION,
166
+ label: D.CAROUSEL_CONTROL,
167
+ value: v
165
168
  },
166
169
  [S.ON_CAROUSEL_FORWARD_CLICK]: {
167
170
  action: L.CONTROL_FORWARD,
168
- category: D.MICRO_WIDGET_INTERACTION,
169
- label: x.CAROUSEL_CONTROL,
170
- value: y
171
+ category: x.MICRO_WIDGET_INTERACTION,
172
+ label: D.CAROUSEL_CONTROL,
173
+ value: v
171
174
  },
172
175
  [S.ON_CAROUSEL_BACK_SWIPE]: {
173
176
  action: L.SWIPE_BACKWARD,
174
- category: D.MICRO_WIDGET_INTERACTION,
175
- label: x.CAROUSEL_CONTROL,
176
- value: y
177
+ category: x.MICRO_WIDGET_INTERACTION,
178
+ label: D.CAROUSEL_CONTROL,
179
+ value: v
177
180
  },
178
181
  [S.ON_CAROUSEL_FORWARD_SWIPE]: {
179
182
  action: L.SWIPE_FORWARD,
180
- category: D.MICRO_WIDGET_INTERACTION,
181
- label: x.CAROUSEL_CONTROL,
182
- value: y
183
+ category: x.MICRO_WIDGET_INTERACTION,
184
+ label: D.CAROUSEL_CONTROL,
185
+ value: v
183
186
  },
184
187
  // read more card events
185
188
  [S.ON_VIEW_MORE_CLICKED]: {
186
189
  action: L.MICRO_BEAT_CLICKED,
187
- category: D.BEAT_INTERACTION,
188
- label: x.VIEW_MORE,
189
- value: y
190
+ category: x.BEAT_INTERACTION,
191
+ label: D.VIEW_MORE,
192
+ value: v
190
193
  },
191
- [ye.ON_VIEW_MORE_VIEWED]: {
194
+ [ve.ON_VIEW_MORE_VIEWED]: {
192
195
  action: L.MICRO_BEAT_DISPLAYED,
193
- category: D.BEAT_INTERACTION,
194
- label: x.VIEW_MORE,
195
- value: y
196
+ category: x.BEAT_INTERACTION,
197
+ label: D.VIEW_MORE,
198
+ value: v
196
199
  },
197
- ...qe(),
198
- ...Je(),
199
- ...et()
200
+ ...et(),
201
+ ...tt(),
202
+ ...it()
200
203
  }, _e = async (i, o) => !o || !pe[i] ? null : o.sendAnalyticEvent(pe[i]).then((t) => t).catch((t) => {
201
204
  throw t;
202
205
  }), fe = async (i, o) => !o || !ue[i] ? null : o.sendAnalyticsPageview(ue[i]).then((t) => t).catch((t) => {
203
206
  throw t;
204
207
  });
205
- class tt {
208
+ class ot {
206
209
  onAnalyticEvent = _e;
207
210
  onAnalyticPageView = fe;
208
211
  beatApi = new de("/", "");
@@ -227,7 +230,7 @@ class tt {
227
230
  this.beatApi.updateOffer(o);
228
231
  };
229
232
  }
230
- class it {
233
+ class lt {
231
234
  copyStore;
232
235
  endpoint = "/";
233
236
  insightsMicroWidgetStore;
@@ -235,40 +238,40 @@ class it {
235
238
  token = "";
236
239
  isInitialized = !1;
237
240
  constructor() {
238
- this.copyStore = new Qe(), this.insightsMicroWidgetStore = new tt(), ie(this);
241
+ this.copyStore = new Je(), this.insightsMicroWidgetStore = new ot(), ie(this);
239
242
  }
240
243
  initialize = async (o, t, l) => {
241
244
  await this.copyStore.initialize(o, t), await this.insightsMicroWidgetStore.initialize(o, t, l);
242
- const n = await Ue(o, t, "1.0.0", "Micro Insights Carousel");
245
+ const n = await ze(o, t, "1.0.0", "Micro Insights Carousel");
243
246
  Re(() => {
244
247
  this.session = n, this.isInitialized = !0;
245
248
  });
246
249
  };
247
250
  }
248
- const U = u.createContext(null), ot = ({
251
+ const U = u.createContext(null), nt = ({
249
252
  onEvent: i,
250
253
  onPageview: o,
251
254
  store: t,
252
255
  children: l
253
- }) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), X = u.forwardRef(function({
256
+ }) => /* @__PURE__ */ e(U.Provider, { value: { onEvent: i, onPageview: o, store: t, children: l }, children: l }), j = u.forwardRef(function({
254
257
  actionText: o,
255
258
  ariaLabel: t,
256
259
  backgroundColor: l,
257
260
  description: n,
258
261
  heightOverrides: r,
259
262
  icon: a,
260
- isActiveCard: s,
263
+ isActiveCard: c,
261
264
  isZeroState: h,
262
265
  onCardClick: f = () => {
263
266
  },
264
267
  showIcon: p,
265
268
  style: d = {},
266
269
  title: E,
267
- variant: c,
270
+ variant: s,
268
271
  widthOverrides: C
269
272
  }, _) {
270
- const R = j(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, v = c ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
271
- Fe,
273
+ const R = te(), [O, I] = u.useState(!1), { cardStyle: m, linkTextStyle: T } = d, y = s ? m : { border: "none", boxShadow: "none", ...m }, M = /* @__PURE__ */ e(
274
+ Be,
272
275
  {
273
276
  className: "mx-micro-card-description",
274
277
  color: "text.primary",
@@ -296,7 +299,7 @@ const U = u.createContext(null), ot = ({
296
299
  return /* @__PURE__ */ e(
297
300
  Z,
298
301
  {
299
- "aria-hidden": !s,
302
+ "aria-hidden": !c,
300
303
  "aria-label": t,
301
304
  "aria-labelledby": "divButton",
302
305
  "aria-roledescription": "slide",
@@ -310,7 +313,7 @@ const U = u.createContext(null), ot = ({
310
313
  children: /* @__PURE__ */ e(
311
314
  Z,
312
315
  {
313
- "aria-hidden": !s,
316
+ "aria-hidden": !c,
314
317
  "aria-label": t,
315
318
  id: "divButton",
316
319
  onClick: () => f(),
@@ -323,9 +326,9 @@ const U = u.createContext(null), ot = ({
323
326
  borderRadius: "8px",
324
327
  height: "100%"
325
328
  },
326
- tabIndex: s ? 0 : -1,
329
+ tabIndex: c ? 0 : -1,
327
330
  children: /* @__PURE__ */ e(
328
- $e,
331
+ je,
329
332
  {
330
333
  "aria-roledescription": "slide",
331
334
  className: "mx-micro-card",
@@ -336,12 +339,12 @@ const U = u.createContext(null), ot = ({
336
339
  cursor: "pointer",
337
340
  height: r ? "100%" : 124,
338
341
  p: 16,
339
- ...v,
342
+ ...y,
340
343
  "& .MuiCardHeader-avatar": {
341
344
  mr: "8px"
342
345
  }
343
346
  },
344
- variant: c,
347
+ variant: s,
345
348
  children: /* @__PURE__ */ g(
346
349
  k,
347
350
  {
@@ -351,7 +354,7 @@ const U = u.createContext(null), ot = ({
351
354
  },
352
355
  children: [
353
356
  /* @__PURE__ */ e(
354
- Xe,
357
+ qe,
355
358
  {
356
359
  avatar: p && a,
357
360
  subheader: h && M,
@@ -360,9 +363,9 @@ const U = u.createContext(null), ot = ({
360
363
  titleTypographyProps: { fontSize: 15, fontWeight: 600, variant: "h3" }
361
364
  }
362
365
  ),
363
- /* @__PURE__ */ e(je, { sx: { p: 0 }, children: !h && M }),
366
+ /* @__PURE__ */ e(Qe, { sx: { p: 0 }, children: !h && M }),
364
367
  !!o && /* @__PURE__ */ e(
365
- Ye,
368
+ Xe,
366
369
  {
367
370
  sx: {
368
371
  mt: "auto",
@@ -393,13 +396,13 @@ const U = u.createContext(null), ot = ({
393
396
  )
394
397
  }
395
398
  );
396
- }), lt = ({ beat: i }) => {
397
- const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || Pe.UNCATEGORIZED;
398
- return /* @__PURE__ */ e(Be, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
399
- }, nt = ({ beat: i }) => {
399
+ }), rt = ({ beat: i }) => {
400
+ const { primary_category_guid: o, category_guids: t } = i, l = o || t?.[0] || be.UNCATEGORIZED;
401
+ return /* @__PURE__ */ e(Ze, { categoryGuid: l, size: 16, sx: { minWidth: 16 } });
402
+ }, at = ({ beat: i }) => {
400
403
  const { category_guids: o, merchant_guids: t, primary_category_guid: l, primary_merchant_guid: n } = i;
401
404
  return /* @__PURE__ */ e(
402
- Ze,
405
+ Pe,
403
406
  {
404
407
  categoryGuid: l || o && o[0] || "",
405
408
  merchantGuid: n || t[0],
@@ -410,7 +413,7 @@ const U = u.createContext(null), ot = ({
410
413
  }
411
414
  }
412
415
  );
413
- }, rt = ({
416
+ }, st = ({
414
417
  color: i = "currentColor",
415
418
  height: o,
416
419
  size: t = 16,
@@ -436,16 +439,16 @@ const U = u.createContext(null), ot = ({
436
439
  }
437
440
  )
438
441
  }
439
- ), at = (i) => i ? i.data ? i.data.map((o) => {
442
+ ), ct = (i) => i ? i.data ? i.data.map((o) => {
440
443
  const t = {};
441
444
  return i.names?.map((l, n) => {
442
445
  t[l] = o[n];
443
446
  }), t;
444
- }) : [] : [], ct = (i, o) => {
445
- const t = at(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
447
+ }) : [] : [], dt = (i, o) => {
448
+ const t = ct(i), l = t.length / 2, n = t.slice(0, l), r = t.slice(l);
446
449
  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;
447
- }, st = ({ beat: i }) => {
448
- const o = j(), t = ct(i.data_series, o);
450
+ }, Et = ({ beat: i }) => {
451
+ const o = te(), t = dt(i.data_series, o);
449
452
  return /* @__PURE__ */ e(Ve, { sx: { color: t } });
450
453
  }, Se = () => /* @__PURE__ */ g("svg", { fill: "none", height: "36", viewBox: "0 0 40 36", width: "40", xmlns: "http://www.w3.org/2000/svg", children: [
451
454
  /* @__PURE__ */ e(
@@ -1228,9 +1231,9 @@ const U = u.createContext(null), ot = ({
1228
1231
  }
1229
1232
  )
1230
1233
  ] })
1231
- ] }), dt = ({ beat: i }) => {
1234
+ ] }), ht = ({ beat: i }) => {
1232
1235
  const { icon_type: o, icon_color: t } = i;
1233
- return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(lt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(nt, { beat: i }) : o === 3 ? /* @__PURE__ */ e(st, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
1236
+ return o === 0 ? /* @__PURE__ */ e(ae, { filled: !0, sx: { color: (l) => t || l.palette.primary.main } }) : o === 1 ? /* @__PURE__ */ e(rt, { beat: i }) : o === 2 ? /* @__PURE__ */ e(at, { beat: i }) : o === 3 ? /* @__PURE__ */ e(Et, { beat: i }) : o === 5 ? /* @__PURE__ */ e(Ne, {}) : /* @__PURE__ */ e(
1234
1237
  ae,
1235
1238
  {
1236
1239
  filled: !0,
@@ -1244,7 +1247,7 @@ const U = u.createContext(null), ot = ({
1244
1247
  if (!i)
1245
1248
  throw new Error("useCopyStore() must be used within the InsightsMicroWidgetDataProvider");
1246
1249
  return i.store.copyStore;
1247
- }, Et = () => {
1250
+ }, ut = () => {
1248
1251
  const i = u.useContext(U);
1249
1252
  if (!i?.store?.insightsMicroWidgetStore)
1250
1253
  throw new Error(
@@ -1261,12 +1264,12 @@ const U = u.createContext(null), ot = ({
1261
1264
  if (!i)
1262
1265
  throw new Error("usePageview() must be used within the InsightsMicroWidgetDataProvider");
1263
1266
  return { onPageview: i.onPageview };
1264
- }, ht = {
1267
+ }, pt = {
1265
1268
  LARGE: 180,
1266
1269
  STANDARD: 154,
1267
1270
  XLARGE: 200,
1268
1271
  XXLARGE: 248
1269
- }, ut = 50, Ae = 1, pt = ({
1272
+ }, _t = 50, Ae = 1, ft = ({
1270
1273
  ariaLabel: i,
1271
1274
  backgroundColor: o,
1272
1275
  beat: t,
@@ -1274,25 +1277,25 @@ const U = u.createContext(null), ot = ({
1274
1277
  heightOverrides: n,
1275
1278
  index: r,
1276
1279
  isActiveCard: a,
1277
- onCardClick: s,
1280
+ onCardClick: c,
1278
1281
  posthog: h,
1279
1282
  showIcon: f,
1280
1283
  variant: p,
1281
1284
  widthOverrides: d
1282
1285
  }) => {
1283
- const { ref: E, inView: c } = me({
1286
+ const { ref: E, inView: s } = me({
1284
1287
  threshold: Ae
1285
- }), { cardsCopy: C } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = Et();
1286
- te(() => {
1287
- c && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
1288
+ }), { cardsCopy: C } = V(), { onEvent: _ } = z(), { updateBeat: R, updateOffer: O } = ut();
1289
+ ee(() => {
1290
+ s && (t.has_been_displayed ? _(Ie(t.template)) : (t.guid.startsWith("OFR") ? O({
1288
1291
  ...t,
1289
1292
  has_been_displayed: !0
1290
1293
  }) : R({
1291
1294
  ...t,
1292
1295
  has_been_displayed: !0
1293
- }), _(ve(t.template))));
1294
- }, [c]), te(() => {
1295
- if (c && t)
1296
+ }), _(ye(t.template))));
1297
+ }, [s]), ee(() => {
1298
+ if (s && t)
1296
1299
  if (t.template === "MarketingOffer") {
1297
1300
  const m = t;
1298
1301
  h?.capture("viewed_messaging_insight", {
@@ -1306,9 +1309,9 @@ const U = u.createContext(null), ot = ({
1306
1309
  template: t.template,
1307
1310
  position: r
1308
1311
  });
1309
- }, [t, r, c]);
1312
+ }, [t, r, s]);
1310
1313
  const I = () => {
1311
- if (s && s(t), _(ge(t.template)), t.template === "MarketingOffer") {
1314
+ if (c && c(t), _(ge(t.template)), t.template === "MarketingOffer") {
1312
1315
  const m = t;
1313
1316
  h?.capture("clicked_messaging_insight", {
1314
1317
  template: t.template,
@@ -1323,14 +1326,14 @@ const U = u.createContext(null), ot = ({
1323
1326
  });
1324
1327
  };
1325
1328
  return /* @__PURE__ */ e(
1326
- X,
1329
+ j,
1327
1330
  {
1328
1331
  actionText: t.micro_call_to_action || C.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
  heightOverrides: n,
1333
- icon: /* @__PURE__ */ e(dt, { beat: t }),
1336
+ icon: /* @__PURE__ */ e(ht, { beat: t }),
1334
1337
  isActiveCard: a,
1335
1338
  onCardClick: I,
1336
1339
  posthog: h,
@@ -1342,7 +1345,7 @@ const U = u.createContext(null), ot = ({
1342
1345
  widthOverrides: d
1343
1346
  }
1344
1347
  );
1345
- }, _t = ({
1348
+ }, Ct = ({
1346
1349
  currentBeatIndex: i,
1347
1350
  numBeats: o,
1348
1351
  onNextClick: t,
@@ -1350,9 +1353,9 @@ const U = u.createContext(null), ot = ({
1350
1353
  scrollRightBoundary: n,
1351
1354
  scrollX: r,
1352
1355
  shouldApplyDotAnimation: a = !1,
1353
- visibleCardsCount: s = 1
1356
+ visibleCardsCount: c = 1
1354
1357
  }) => {
1355
- const h = j(), { carouselCopy: f } = V(), p = Math.floor(r) > n || i - s + 1 === 0, d = r < 0 || o - 1 === i, E = h.palette.grey[500], c = h.palette.primary.main;
1358
+ const h = Fe(), { carouselCopy: f } = 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;
1356
1359
  return /* @__PURE__ */ g(
1357
1360
  k,
1358
1361
  {
@@ -1369,7 +1372,7 @@ const U = u.createContext(null), ot = ({
1369
1372
  },
1370
1373
  children: [
1371
1374
  /* @__PURE__ */ e(
1372
- ce,
1375
+ se,
1373
1376
  {
1374
1377
  "aria-disabled": p,
1375
1378
  "aria-label": f.previous_insight_cta_aria,
@@ -1378,8 +1381,8 @@ const U = u.createContext(null), ot = ({
1378
1381
  children: /* @__PURE__ */ e(
1379
1382
  He,
1380
1383
  {
1381
- sx: {
1382
- color: p ? E : c
1384
+ style: {
1385
+ color: p ? E : s
1383
1386
  }
1384
1387
  }
1385
1388
  )
@@ -1392,7 +1395,7 @@ const U = u.createContext(null), ot = ({
1392
1395
  {
1393
1396
  className: "mx-insights-micro-carousel-dots",
1394
1397
  sx: {
1395
- bgcolor: R ? c : E,
1398
+ bgcolor: R ? s : E,
1396
1399
  height: 8,
1397
1400
  mr: 8,
1398
1401
  // existing comment from meganthan "we were using `gap` instead of margin, but it doesn't work in safari browsers older than iOS 14.1"
@@ -1412,7 +1415,7 @@ const U = u.createContext(null), ot = ({
1412
1415
  );
1413
1416
  }),
1414
1417
  /* @__PURE__ */ e(
1415
- ce,
1418
+ se,
1416
1419
  {
1417
1420
  "aria-disabled": d,
1418
1421
  "aria-label": f.next_insight_cta_aria,
@@ -1421,8 +1424,8 @@ const U = u.createContext(null), ot = ({
1421
1424
  children: /* @__PURE__ */ e(
1422
1425
  Ce,
1423
1426
  {
1424
- sx: {
1425
- color: d ? E : c
1427
+ style: {
1428
+ color: d ? E : s
1426
1429
  }
1427
1430
  }
1428
1431
  )
@@ -1431,7 +1434,7 @@ const U = u.createContext(null), ot = ({
1431
1434
  ]
1432
1435
  }
1433
1436
  );
1434
- }, ft = ({
1437
+ }, mt = ({
1435
1438
  activeCardIndex: i,
1436
1439
  beats: o,
1437
1440
  cardWidth: t,
@@ -1439,25 +1442,25 @@ const U = u.createContext(null), ot = ({
1439
1442
  heightOverrides: n,
1440
1443
  onCardClick: r,
1441
1444
  posthog: a,
1442
- showIcon: s,
1445
+ showIcon: c,
1443
1446
  variant: h
1444
1447
  }) => {
1445
1448
  const { carouselCopy: f } = V(), p = {
1446
1449
  showCTAColocatedWithText: l,
1447
1450
  heightOverrides: n,
1448
1451
  posthog: a,
1449
- showIcon: s,
1452
+ showIcon: c,
1450
1453
  variant: h
1451
1454
  };
1452
- return /* @__PURE__ */ g(xe, { children: [
1455
+ return /* @__PURE__ */ g(De, { children: [
1453
1456
  o.map((d, E) => {
1454
- const c = E + 1, C = o.length + 1, _ = be(
1457
+ const s = E + 1, C = o.length + 1, _ = Ge(
1455
1458
  f.card_position_in_carousel_aria,
1456
- c.toString(),
1459
+ s.toString(),
1457
1460
  C.toString()
1458
1461
  ), 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;
1459
1462
  return /* @__PURE__ */ e(
1460
- pt,
1463
+ ft,
1461
1464
  {
1462
1465
  ariaLabel: `${_}: ${I}, ${m}`,
1463
1466
  beat: d,
@@ -1471,7 +1474,7 @@ const U = u.createContext(null), ot = ({
1471
1474
  );
1472
1475
  }),
1473
1476
  /* @__PURE__ */ e(
1474
- Mt,
1477
+ Ot,
1475
1478
  {
1476
1479
  isActiveCard: i === o.length,
1477
1480
  onCardClick: r,
@@ -1480,7 +1483,7 @@ const U = u.createContext(null), ot = ({
1480
1483
  }
1481
1484
  )
1482
1485
  ] });
1483
- }, Ct = ({
1486
+ }, Rt = ({
1484
1487
  analyticsMetadata: i,
1485
1488
  allowSingleCardPeeking: o = !1,
1486
1489
  beats: t = [],
@@ -1488,7 +1491,7 @@ const U = u.createContext(null), ot = ({
1488
1491
  heightOverrides: n,
1489
1492
  onCardClick: r,
1490
1493
  posthog: a,
1491
- showCarouselControls: s,
1494
+ showCarouselControls: c,
1492
1495
  showIcon: h,
1493
1496
  showWithMargin: f = !0,
1494
1497
  variant: p,
@@ -1496,10 +1499,10 @@ const U = u.createContext(null), ot = ({
1496
1499
  visibleCardsCount: E = 1
1497
1500
  // Default to 1 card visible
1498
1501
  }) => {
1499
- const c = u.useRef(null), C = u.useRef(null), [_, R] = u.useState(0), [O, I] = u.useState(null), [m, T] = u.useState(null), [v, M] = u.useState(null), { carouselCopy: W } = V(), { onEvent: F } = z();
1502
+ const s = u.useRef(null), C = 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();
1500
1503
  u.useEffect(() => {
1501
- if (c.current && !o) {
1502
- const A = c.current.offsetWidth, b = 8;
1504
+ if (s.current && !o) {
1505
+ const A = s.current.offsetWidth, b = 8;
1503
1506
  let B;
1504
1507
  if (E > 1) {
1505
1508
  const ne = (A - (E - 1) * b) / E / 3;
@@ -1508,7 +1511,7 @@ const U = u.createContext(null), ot = ({
1508
1511
  B = A;
1509
1512
  M(B);
1510
1513
  }
1511
- }, [E, c.current?.offsetWidth]), u.useEffect(() => {
1514
+ }, [E, s.current?.offsetWidth]), u.useEffect(() => {
1512
1515
  const A = C.current?.offsetWidth;
1513
1516
  if (typeof A == "number" && o) {
1514
1517
  const b = (G) => {
@@ -1532,27 +1535,27 @@ const U = u.createContext(null), ot = ({
1532
1535
  }
1533
1536
  }, [o, C]);
1534
1537
  const K = () => {
1535
- F(S.ON_CAROUSEL_FORWARD_CLICK, i), c.current && v && c.current.scrollTo({
1536
- left: _ + v + 8,
1538
+ F(S.ON_CAROUSEL_FORWARD_CLICK, i), s.current && y && s.current.scrollTo({
1539
+ left: _ + y + 8,
1537
1540
  top: 0,
1538
1541
  behavior: "smooth"
1539
1542
  });
1540
1543
  }, $ = () => {
1541
- F(S.ON_CAROUSEL_BACK_CLICK, i), c.current && v && c.current.scrollTo({
1542
- left: Math.max(0, _ - (v + 8)),
1544
+ F(S.ON_CAROUSEL_BACK_CLICK, i), s.current && y && s.current.scrollTo({
1545
+ left: Math.max(0, _ - (y + 8)),
1543
1546
  top: 0,
1544
1547
  behavior: "smooth"
1545
1548
  });
1549
+ }, X = () => {
1550
+ s.current && R(s.current.scrollLeft);
1546
1551
  }, Q = () => {
1547
- c.current && R(c.current.scrollLeft);
1548
- }, q = () => {
1549
1552
  if (!m || !O) return;
1550
- m - O > ut ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
1551
- }, J = (A) => {
1553
+ m - O > _t ? F(S.ON_CAROUSEL_FORWARD_SWIPE, i) : F(S.ON_CAROUSEL_BACK_SWIPE, i);
1554
+ }, q = (A) => {
1552
1555
  I(A.targetTouches[0].clientX);
1553
1556
  }, Y = (A) => {
1554
1557
  I(null), T(A.targetTouches[0].clientX);
1555
- }, w = v ? Math.round(_ / (v + 8)) : 0, We = c.current ? c.current.scrollWidth - c.current.offsetWidth : 0;
1558
+ }, w = y ? Math.round(_ / (y + 8)) : 0, We = s.current ? s.current.scrollWidth - s.current.offsetWidth : 0;
1556
1559
  return /* @__PURE__ */ g(
1557
1560
  k,
1558
1561
  {
@@ -1571,11 +1574,11 @@ const U = u.createContext(null), ot = ({
1571
1574
  k,
1572
1575
  {
1573
1576
  direction: "row",
1574
- onScroll: Q,
1575
- onTouchEnd: q,
1576
- onTouchMove: J,
1577
+ onScroll: X,
1578
+ onTouchEnd: Q,
1579
+ onTouchMove: q,
1577
1580
  onTouchStart: Y,
1578
- ref: c,
1581
+ ref: s,
1579
1582
  sx: {
1580
1583
  alignItems: "center",
1581
1584
  height: n && "100%",
@@ -1594,11 +1597,11 @@ const U = u.createContext(null), ot = ({
1594
1597
  }
1595
1598
  },
1596
1599
  children: /* @__PURE__ */ e(
1597
- ft,
1600
+ mt,
1598
1601
  {
1599
1602
  activeCardIndex: w,
1600
1603
  beats: t,
1601
- cardWidth: v,
1604
+ cardWidth: y,
1602
1605
  heightOverrides: n,
1603
1606
  onCardClick: r,
1604
1607
  posthog: a,
@@ -1609,8 +1612,8 @@ const U = u.createContext(null), ot = ({
1609
1612
  )
1610
1613
  }
1611
1614
  ),
1612
- s && /* @__PURE__ */ e(
1613
- _t,
1615
+ c && /* @__PURE__ */ e(
1616
+ Ct,
1614
1617
  {
1615
1618
  currentBeatIndex: w + E - 1,
1616
1619
  numBeats: t.length + 1,
@@ -1625,7 +1628,7 @@ const U = u.createContext(null), ot = ({
1625
1628
  ]
1626
1629
  }
1627
1630
  );
1628
- }, mt = P(Ct), Rt = ({
1631
+ }, gt = P(Rt), It = ({
1629
1632
  analyticsMetadata: i,
1630
1633
  onCardClick: o,
1631
1634
  posthog: t,
@@ -1649,8 +1652,8 @@ const U = u.createContext(null), ot = ({
1649
1652
  /* @__PURE__ */ e(
1650
1653
  Le,
1651
1654
  {
1652
- sx: (s) => ({
1653
- color: s.palette.primary.main,
1655
+ sx: (c) => ({
1656
+ color: c.palette.primary.main,
1654
1657
  fontSize: 18,
1655
1658
  fontWeight: 700,
1656
1659
  lineHeight: "24px"
@@ -1660,13 +1663,13 @@ const U = u.createContext(null), ot = ({
1660
1663
  }
1661
1664
  ),
1662
1665
  /* @__PURE__ */ e(
1663
- De,
1666
+ xe,
1664
1667
  {
1665
1668
  endIcon: /* @__PURE__ */ e(Ce, { size: 20 }),
1666
1669
  onClick: a,
1667
1670
  size: "small",
1668
- sx: (s) => ({
1669
- color: s.palette.primary.main
1671
+ sx: (c) => ({
1672
+ color: c.palette.primary.main
1670
1673
  }),
1671
1674
  variant: "text",
1672
1675
  children: n.view_all_insights_in_full_feed_cta_aria
@@ -1675,7 +1678,7 @@ const U = u.createContext(null), ot = ({
1675
1678
  ]
1676
1679
  }
1677
1680
  ) : /* @__PURE__ */ e(ke, {});
1678
- }, gt = P(Rt), It = ({
1681
+ }, yt = P(It), vt = ({
1679
1682
  heightOverrides: i,
1680
1683
  widthOverrides: o,
1681
1684
  children: t
@@ -1704,17 +1707,17 @@ const U = u.createContext(null), ot = ({
1704
1707
  showIcon: n,
1705
1708
  variant: r
1706
1709
  }) => {
1707
- const { cardsCopy: a } = V(), { onEvent: s } = z(), { onPageview: h } = Me();
1710
+ const { cardsCopy: a } = V(), { onEvent: c } = z(), { onPageview: h } = Me();
1708
1711
  u.useEffect(() => {
1709
1712
  h(H.MICRO_WIDGET_CAROUSEL_NO_RELEVANT_INSIGHTS);
1710
1713
  }, []);
1711
1714
  const f = () => {
1712
- t && t(), s(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1715
+ t && t(), c(S.ON_NO_RELEVANT_INSIGHTS_CLICKED), l?.capture("clicked_insight", {
1713
1716
  template: "no_relevant_insights"
1714
1717
  });
1715
1718
  };
1716
1719
  return /* @__PURE__ */ e(
1717
- X,
1720
+ j,
1718
1721
  {
1719
1722
  actionText: a.micro_card_cta,
1720
1723
  ariaLabel: i,
@@ -1734,7 +1737,7 @@ const U = u.createContext(null), ot = ({
1734
1737
  variant: r
1735
1738
  }
1736
1739
  );
1737
- }, jt = P(Oe), Te = ({
1740
+ }, Jt = P(Oe), Te = ({
1738
1741
  ariaLabel: i,
1739
1742
  heightOverrides: o,
1740
1743
  onCardClick: t,
@@ -1742,25 +1745,25 @@ const U = u.createContext(null), ot = ({
1742
1745
  showIcon: n,
1743
1746
  variant: r
1744
1747
  }) => {
1745
- const { onPageview: a } = Me(), { zeroStateCopy: s } = V();
1748
+ const { onPageview: a } = Me(), { zeroStateCopy: c } = V();
1746
1749
  return u.useEffect(() => {
1747
1750
  a(H.MICRO_WIDGET_CAROUSEL_ZERO_STATE);
1748
1751
  }, []), /* @__PURE__ */ e(
1749
- X,
1752
+ j,
1750
1753
  {
1751
1754
  ariaLabel: i,
1752
- description: s.carousel_zero_state_description,
1755
+ description: c.carousel_zero_state_description,
1753
1756
  heightOverrides: o,
1754
1757
  icon: /* @__PURE__ */ e(Se, {}),
1755
1758
  isZeroState: !0,
1756
1759
  onCardClick: t,
1757
1760
  posthog: l,
1758
1761
  showIcon: n,
1759
- title: s.carousel_zero_state_title,
1762
+ title: c.carousel_zero_state_title,
1760
1763
  variant: r
1761
1764
  }
1762
1765
  );
1763
- }, Xt = P(Te), vt = () => /* @__PURE__ */ e(
1766
+ }, ei = P(Te), St = () => /* @__PURE__ */ e(
1764
1767
  Z,
1765
1768
  {
1766
1769
  sx: {
@@ -1770,9 +1773,9 @@ const U = u.createContext(null), ot = ({
1770
1773
  justifyContent: "center",
1771
1774
  width: "100%"
1772
1775
  },
1773
- children: /* @__PURE__ */ e(Ge, {})
1776
+ children: /* @__PURE__ */ e(Ue, {})
1774
1777
  }
1775
- ), N = new it(), yt = ({
1778
+ ), N = new lt(), Mt = ({
1776
1779
  allowSingleCardPeeking: i,
1777
1780
  areBeatsLoading: o,
1778
1781
  beats: t = [],
@@ -1781,7 +1784,7 @@ const U = u.createContext(null), ot = ({
1781
1784
  endpoint: n = "/",
1782
1785
  heightOverrides: r,
1783
1786
  logOutUser: a,
1784
- onCardClick: s = () => {
1787
+ onCardClick: c = () => {
1785
1788
  },
1786
1789
  onEvent: h = () => {
1787
1790
  },
@@ -1790,7 +1793,7 @@ const U = u.createContext(null), ot = ({
1790
1793
  posthog: p,
1791
1794
  showBorder: d = !0,
1792
1795
  showCarouselControls: E,
1793
- showHeader: c,
1796
+ showHeader: s,
1794
1797
  showIcon: C,
1795
1798
  showWithMargin: _ = !0,
1796
1799
  token: R = "",
@@ -1799,8 +1802,11 @@ const U = u.createContext(null), ot = ({
1799
1802
  visibleCardsCount: m = 1,
1800
1803
  widthOverrides: T
1801
1804
  }) => {
1802
- const [v, M] = ee("STANDARD"), [W, F] = ee(!1), [K, $] = ee(!1), Q = ze([h], N), q = Ke([f], N);
1803
- u.useEffect(() => {
1805
+ const [y, M] = J("STANDARD"), [W, F] = J(!1), [K, $] = J(!1), X = Ke([h], N), Q = $e([f], N);
1806
+ Ye({
1807
+ widgetName: "InsightsMicroWidget",
1808
+ isLoaded: W
1809
+ }), u.useEffect(() => {
1804
1810
  !N.isInitialized && !K && (N.initialize(n, R, a).catch(() => $(!1)), $(!0));
1805
1811
  }, [n, R, a, N.isInitialized, K]), u.useEffect(() => {
1806
1812
  const w = window.innerHeight;
@@ -1808,36 +1814,36 @@ const U = u.createContext(null), ot = ({
1808
1814
  }, [window.innerHeight]), u.useEffect(() => {
1809
1815
  F(!o && N.isInitialized);
1810
1816
  }, [o, N.isInitialized]);
1811
- const J = {
1817
+ const q = {
1812
1818
  showCTAColocatedWithText: l,
1813
1819
  heightOverrides: r,
1814
- onCardClick: s,
1820
+ onCardClick: c,
1815
1821
  posthog: p,
1816
1822
  showIcon: C,
1817
1823
  showWithMargin: _,
1818
1824
  widthOverrides: T
1819
1825
  }, Y = {
1820
- carouselSize: v,
1826
+ carouselSize: y,
1821
1827
  variant: I,
1822
1828
  showCTAColocatedWithText: l,
1823
1829
  heightOverrides: r,
1824
- onCardClick: s,
1830
+ onCardClick: c,
1825
1831
  posthog: p,
1826
1832
  showIcon: C
1827
1833
  };
1828
- return /* @__PURE__ */ e(ot, { onEvent: Q, onPageview: q, store: N, children: /* @__PURE__ */ g(It, { heightOverrides: r, widthOverrides: T, children: [
1829
- !W && /* @__PURE__ */ e(vt, {}),
1830
- W && c && /* @__PURE__ */ e(
1831
- gt,
1834
+ return /* @__PURE__ */ e(nt, { onEvent: X, onPageview: Q, store: N, children: /* @__PURE__ */ g(vt, { heightOverrides: r, widthOverrides: T, children: [
1835
+ !W && /* @__PURE__ */ e(St, {}),
1836
+ W && s && /* @__PURE__ */ e(
1837
+ yt,
1832
1838
  {
1833
1839
  analyticsMetadata: Ee,
1834
- onCardClick: s,
1840
+ onCardClick: c,
1835
1841
  posthog: p,
1836
1842
  widthOverrides: T
1837
1843
  }
1838
1844
  ),
1839
1845
  W && !!t.length && /* @__PURE__ */ e(
1840
- mt,
1846
+ gt,
1841
1847
  {
1842
1848
  allowSingleCardPeeking: i,
1843
1849
  analyticsMetadata: Ee,
@@ -1845,7 +1851,7 @@ const U = u.createContext(null), ot = ({
1845
1851
  showCarouselControls: E,
1846
1852
  variant: d ? I : void 0,
1847
1853
  visibleCardsCount: m,
1848
- ...J
1854
+ ...q
1849
1855
  }
1850
1856
  ),
1851
1857
  W && !t.length && /* @__PURE__ */ e(
@@ -1860,7 +1866,7 @@ const U = u.createContext(null), ot = ({
1860
1866
  k,
1861
1867
  {
1862
1868
  sx: {
1863
- height: `calc(${ht[v]}px - 44px)`,
1869
+ height: `calc(${pt[y]}px - 44px)`,
1864
1870
  width: _ ? `calc(${T}px - 32px)` : "100%"
1865
1871
  },
1866
1872
  children: O ? /* @__PURE__ */ e(Oe, { ...Y }) : /* @__PURE__ */ e(Te, { ...Y })
@@ -1869,7 +1875,7 @@ const U = u.createContext(null), ot = ({
1869
1875
  }
1870
1876
  )
1871
1877
  ] }) });
1872
- }, Qt = P(yt), St = ({
1878
+ }, ti = P(Mt), At = ({
1873
1879
  isActiveCard: i,
1874
1880
  ariaLabel: o,
1875
1881
  heightOverrides: t,
@@ -1877,53 +1883,53 @@ const U = u.createContext(null), ot = ({
1877
1883
  posthog: n,
1878
1884
  showIcon: r,
1879
1885
  variant: a,
1880
- widthOverrides: s
1886
+ widthOverrides: c
1881
1887
  }) => {
1882
- const h = j(), { ref: f, inView: p } = me({
1888
+ const h = te(), { ref: f, inView: p } = me({
1883
1889
  threshold: Ae
1884
1890
  }), { cardsCopy: d } = V(), { onEvent: E } = z();
1885
- te(() => {
1886
- p && (E(ye.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1891
+ ee(() => {
1892
+ p && (E(ve.ON_VIEW_MORE_VIEWED), n?.capture("viewed_insight", {
1887
1893
  template: "view_more_card"
1888
1894
  }));
1889
1895
  }, [p]);
1890
- const c = () => {
1896
+ const s = () => {
1891
1897
  l && l(), E(S.ON_VIEW_MORE_CLICKED), n?.capture("clicked_insight", {
1892
1898
  template: "view_more_card"
1893
1899
  });
1894
1900
  };
1895
1901
  return /* @__PURE__ */ e(
1896
- X,
1902
+ j,
1897
1903
  {
1898
1904
  actionText: d.micro_card_cta,
1899
1905
  ariaLabel: o,
1900
1906
  description: d.view_more_card_description,
1901
1907
  heightOverrides: t,
1902
- icon: /* @__PURE__ */ e(rt, { color: h.palette.primary.main }),
1908
+ icon: /* @__PURE__ */ e(st, { color: h.palette.primary.main }),
1903
1909
  isActiveCard: i,
1904
- onCardClick: c,
1910
+ onCardClick: s,
1905
1911
  posthog: n,
1906
1912
  ref: f,
1907
1913
  showIcon: r,
1908
1914
  title: d.view_more_card_title,
1909
1915
  variant: a,
1910
- widthOverrides: s
1916
+ widthOverrides: c
1911
1917
  }
1912
1918
  );
1913
- }, Mt = P(St);
1919
+ }, Ot = P(At);
1914
1920
  export {
1915
- it as A,
1916
- X as B,
1917
- gt as C,
1918
- ot as I,
1919
- mt as M,
1920
- jt as N,
1921
+ lt as A,
1922
+ j as B,
1923
+ yt as C,
1924
+ nt as I,
1925
+ gt as M,
1926
+ Jt as N,
1921
1927
  Ee as T,
1922
- Mt as V,
1923
- Xt as Z,
1924
- pt as a,
1925
- Qt as b,
1926
- rt as c,
1927
- st as d,
1928
+ Ot as V,
1929
+ ei as Z,
1930
+ ft as a,
1931
+ ti as b,
1932
+ st as c,
1933
+ Et as d,
1928
1934
  Se as e
1929
1935
  };