@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2

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 (513) hide show
  1. package/CHANGELOG.md +335 -0
  2. package/README.md +5 -3
  3. package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
  4. package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
  5. package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
  6. package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
  7. package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
  8. package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
  9. package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
  10. package/dist/Accounts-CseLC3lL.mjs +5 -0
  11. package/dist/Accounts-o7ohkngR.mjs +27 -0
  12. package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
  13. package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
  14. package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
  15. package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
  16. package/dist/CashflowStore-CeAzChyD.mjs +91 -0
  17. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  18. package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
  19. package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
  20. package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
  21. package/dist/Connect-eYIWqCEr.mjs +39 -0
  22. package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
  23. package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
  24. package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
  25. package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
  26. package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
  27. package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
  28. package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
  29. package/dist/Dialog-Ck34yr-d.mjs +63 -0
  30. package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
  31. package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
  32. package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
  33. package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
  34. package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
  35. package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
  36. package/dist/Goal-0loDagc5.mjs +6 -0
  37. package/dist/GoalStore-fgXt--2Y.mjs +418 -0
  38. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  39. package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
  40. package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
  41. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  42. package/dist/LineChart-EAr5ox5U.mjs +612 -0
  43. package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
  44. package/dist/Loader-D3rjKx72.mjs +21 -0
  45. package/dist/Localization-CPkpIwIx.mjs +37 -0
  46. package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
  47. package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
  48. package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
  49. package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
  50. package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
  51. package/dist/Notification-DTNYSd8P.mjs +7 -0
  52. package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
  53. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
  54. package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
  55. package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
  56. package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
  57. package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
  58. package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
  59. package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
  60. package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
  61. package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
  62. package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
  63. package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
  64. package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
  65. package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
  66. package/dist/SpendingLegend-BgjazduU.mjs +193 -0
  67. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  68. package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
  69. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  70. package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
  71. package/dist/Transaction-Cn5_iFm0.mjs +5 -0
  72. package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
  73. package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
  74. package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
  75. package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
  76. package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
  77. package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
  78. package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
  79. package/dist/accounts/AccountsWidget.d.ts +1 -1
  80. package/dist/accounts/api/AccountApi.d.ts +1 -1
  81. package/dist/accounts/components/AccountListItem.d.ts +1 -1
  82. package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
  83. package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
  84. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
  85. package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
  86. package/dist/accounts/index.es.js +459 -368
  87. package/dist/accounts/stores/AccountStore.d.ts +2 -1
  88. package/dist/accounts/stores/UiStore.d.ts +1 -1
  89. package/dist/accounts/utils/AccountDetails.d.ts +1 -1
  90. package/dist/accounts/utils/AccountFields.d.ts +1 -1
  91. package/dist/accounts/utils/Accounts.d.ts +2 -2
  92. package/dist/analytics/index.es.js +93 -112
  93. package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
  94. package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
  95. package/dist/budgets/api/BudgetsApi.d.ts +5 -1
  96. package/dist/budgets/components/BubbleChart.d.ts +1 -1
  97. package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
  98. package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
  99. package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
  100. package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
  101. package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
  102. package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
  103. package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
  104. package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
  105. package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
  106. package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
  107. package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
  108. package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
  109. package/dist/budgets/index.es.js +851 -865
  110. package/dist/budgets/store/BudgetsStore.d.ts +15 -1
  111. package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
  112. package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
  113. package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
  114. package/dist/cashflow/CashflowWidget.d.ts +1 -1
  115. package/dist/cashflow/api/CashflowApi.d.ts +1 -1
  116. package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
  117. package/dist/cashflow/index.es.js +290 -288
  118. package/dist/cashflow/stores/UiStore.d.ts +1 -1
  119. package/dist/cashflow/util/Filters.d.ts +1 -1
  120. package/dist/categories/components/CategoryRow.d.ts +1 -1
  121. package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
  122. package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
  123. package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
  124. package/dist/categories/components/SubcategoryList.d.ts +1 -1
  125. package/dist/categories/components/SubcategoryRow.d.ts +1 -1
  126. package/dist/categories/index.es.js +2 -2
  127. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  128. package/dist/categories/util/CategoryUtil.d.ts +1 -1
  129. package/dist/common/api/AnalyticsApi.d.ts +1 -1
  130. package/dist/common/api/AppDataApi.d.ts +1 -1
  131. package/dist/common/api/BeatApi.d.ts +1 -1
  132. package/dist/common/api/CategoryApi.d.ts +1 -1
  133. package/dist/common/api/GlobalCopyApi.d.ts +1 -1
  134. package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
  135. package/dist/common/api/NotificationApi.d.ts +1 -1
  136. package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
  137. package/dist/common/api/UserApi.d.ts +1 -1
  138. package/dist/common/components/CurrencyDialog.d.ts +1 -1
  139. package/dist/common/components/CurrencyInput.d.ts +1 -1
  140. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  141. package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
  142. package/dist/common/components/Loader.d.ts +1 -2
  143. package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
  144. package/dist/common/components/WidgetContainer.d.ts +1 -1
  145. package/dist/common/components/charts/LineChart.d.ts +1 -0
  146. package/dist/common/components/charts/index.d.ts +1 -0
  147. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
  148. package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
  149. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
  150. package/dist/common/components/index.d.ts +0 -1
  151. package/dist/common/constants/Account.d.ts +1 -1
  152. package/dist/common/constants/Analytics.d.ts +10 -0
  153. package/dist/common/constants/ApiEndpoints.d.ts +1 -0
  154. package/dist/common/constants/DefaultConfig.d.ts +1 -1
  155. package/dist/common/constants/ScheduledPayment.d.ts +1 -10
  156. package/dist/common/constants/SpendingPlan.d.ts +0 -10
  157. package/dist/common/constants/index.d.ts +2 -2
  158. package/dist/common/context/GlobalDataProvider.d.ts +2 -1
  159. package/dist/common/context/hooks.d.ts +4 -4
  160. package/dist/common/hooks/index.d.ts +1 -0
  161. package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
  162. package/dist/common/hooks/useCombineEvents.d.ts +1 -1
  163. package/dist/common/hooks/usePrevious.d.ts +2 -0
  164. package/dist/common/index.d.ts +0 -1
  165. package/dist/common/index.es.js +625 -860
  166. package/dist/common/stores/AppDataStore.d.ts +3 -3
  167. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  168. package/dist/common/stores/GlobalStore.d.ts +4 -2
  169. package/dist/common/stores/GlobalUiStore.d.ts +3 -3
  170. package/dist/common/stores/UserStore.d.ts +1 -1
  171. package/dist/common/utils/AccountDisplayName.d.ts +1 -1
  172. package/dist/common/utils/AccountFilter.d.ts +1 -1
  173. package/dist/common/utils/Analytics.d.ts +1 -1
  174. package/dist/common/utils/Categories.d.ts +1 -1
  175. package/dist/common/utils/Fetch.d.ts +1 -1
  176. package/dist/common/utils/Localization.d.ts +9 -1
  177. package/dist/common/utils/Theme.d.ts +3 -3
  178. package/dist/common/utils/User.d.ts +1 -1
  179. package/dist/common/utils/index.d.ts +1 -1
  180. package/dist/core/constants/index.d.ts +1 -0
  181. package/dist/core/constants/repeatingTransactions.d.ts +10 -0
  182. package/dist/core/index.d.ts +2 -0
  183. package/dist/core/index.es.js +41 -0
  184. package/dist/{common → core}/types/Analytics.d.ts +6 -3
  185. package/dist/{common → core}/types/AppData.d.ts +1 -0
  186. package/dist/{common → core}/types/Beat.d.ts +2 -0
  187. package/dist/{common → core}/types/Budget.d.ts +8 -0
  188. package/dist/{common → core}/types/Expense.d.ts +2 -1
  189. package/dist/{common → core}/types/Finstrong.d.ts +0 -2
  190. package/dist/{common → core}/types/Notification.d.ts +15 -5
  191. package/dist/{common → core}/types/index.d.ts +1 -2
  192. package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
  193. package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
  194. package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
  195. package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
  196. package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
  197. package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
  198. package/dist/dashboard/index.es.js +46 -45
  199. package/dist/debts/DebtsWidget.d.ts +1 -1
  200. package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
  201. package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
  202. package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
  203. package/dist/debts/index.es.js +705 -646
  204. package/dist/debts/store/DebtsStore.d.ts +2 -1
  205. package/dist/debts/utils/DebtStore.d.ts +1 -1
  206. package/dist/debts/utils/DebtsWidget.d.ts +7 -1
  207. package/dist/debts/utils/shared.d.ts +1 -1
  208. package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
  209. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  210. package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
  211. package/dist/finstrong/components/HealthChart.d.ts +1 -1
  212. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
  213. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
  214. package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
  215. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
  216. package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
  217. package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
  218. package/dist/finstrong/index.es.js +161 -159
  219. package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
  220. package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
  221. package/dist/goals/GoalsWidget.d.ts +1 -1
  222. package/dist/goals/api/GoalApi.d.ts +2 -2
  223. package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
  224. package/dist/goals/components/AddGoal.d.ts +1 -1
  225. package/dist/goals/components/GoalDetails.d.ts +1 -1
  226. package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
  227. package/dist/goals/components/GoalList.d.ts +1 -1
  228. package/dist/goals/components/GoalStatusCard.d.ts +1 -1
  229. package/dist/goals/components/ManageGoals.d.ts +1 -1
  230. package/dist/goals/components/actions/AccountAction.d.ts +1 -1
  231. package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
  232. package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
  233. package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
  234. package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
  235. package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
  236. package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
  237. package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
  238. package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
  239. package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
  240. package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
  241. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  242. package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
  243. package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
  244. package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
  245. package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
  246. package/dist/goals/index.es.js +445 -419
  247. package/dist/goals/stores/GoalStore.d.ts +2 -1
  248. package/dist/goals/util/GoalsUtil.d.ts +1 -1
  249. package/dist/help/HelpWidget.d.ts +1 -1
  250. package/dist/help/api/HelpApi.d.ts +1 -1
  251. package/dist/help/components/HelpContent.d.ts +1 -1
  252. package/dist/help/components/HelpList.d.ts +1 -1
  253. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  254. package/dist/help/components/content/ContentItem.d.ts +1 -1
  255. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  256. package/dist/help/components/content/NoImageContent.d.ts +1 -1
  257. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  258. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  259. package/dist/help/components/content/section/Accounts.d.ts +1 -1
  260. package/dist/help/components/content/section/Budgets.d.ts +1 -1
  261. package/dist/help/components/content/section/CashFlow.d.ts +1 -1
  262. package/dist/help/components/content/section/Debts.d.ts +1 -1
  263. package/dist/help/components/content/section/General.d.ts +1 -1
  264. package/dist/help/components/content/section/Goals.d.ts +1 -1
  265. package/dist/help/components/content/section/Insights.d.ts +1 -1
  266. package/dist/help/components/content/section/Investments.d.ts +1 -1
  267. package/dist/help/components/content/section/Mobile.d.ts +1 -1
  268. package/dist/help/components/content/section/NetWorth.d.ts +1 -1
  269. package/dist/help/components/content/section/Notifications.d.ts +1 -1
  270. package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
  271. package/dist/help/components/content/section/Spending.d.ts +1 -1
  272. package/dist/help/components/content/section/Transactions.d.ts +1 -1
  273. package/dist/help/components/content/section/Trends.d.ts +1 -1
  274. package/dist/help/components/content/section/index.d.ts +15 -15
  275. package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
  276. package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
  277. package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
  278. package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
  279. package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
  280. package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
  281. package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
  282. package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
  283. package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
  284. package/dist/help/index.es.js +8 -8
  285. package/dist/help/store/HelpStore.d.ts +5 -4
  286. package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
  287. package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
  288. package/dist/insights/components/feed/Header.d.ts +8 -0
  289. package/dist/insights/components/index.d.ts +4 -0
  290. package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
  291. package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
  292. package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
  293. package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
  294. package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
  295. package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
  296. package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
  297. package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
  298. package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
  299. package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
  300. package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
  301. package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
  302. package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
  303. package/dist/insights/index.es.js +1361 -1081
  304. package/dist/insights/store/BeatStore.d.ts +1 -1
  305. package/dist/investments/InvestmentsWidget.d.ts +1 -1
  306. package/dist/investments/api/HoldingApi.d.ts +1 -1
  307. package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
  308. package/dist/investments/index.es.js +258 -258
  309. package/dist/investments/stores/HoldingStore.d.ts +2 -1
  310. package/dist/investments/util/InvestmentUtil.d.ts +1 -1
  311. package/dist/merchants/api/MerchantApi.d.ts +1 -1
  312. package/dist/merchants/index.es.js +16 -16
  313. package/dist/merchants/stores/MerchantStore.d.ts +2 -1
  314. package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
  315. package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
  316. package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
  317. package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
  318. package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
  319. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
  320. package/dist/microinsights/beaticons/index.d.ts +3 -0
  321. package/dist/microinsights/cards/InsightCard.d.ts +1 -1
  322. package/dist/microinsights/carousel/BeatList.d.ts +1 -1
  323. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
  324. package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
  325. package/dist/microinsights/constants/Analytics.d.ts +1 -1
  326. package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
  327. package/dist/microinsights/context/hooks.d.ts +1 -1
  328. package/dist/microinsights/index.es.js +1 -1
  329. package/dist/microinsights/interfaces.d.ts +1 -1
  330. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  331. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  332. package/dist/microinsights/utils/DataSeries.d.ts +1 -1
  333. package/dist/microinsights/utils/colorType.d.ts +22 -0
  334. package/dist/networth/NetWorthWidget.d.ts +1 -1
  335. package/dist/networth/components/micro/NetworthData.d.ts +1 -1
  336. package/dist/networth/components/micro/ZeroState.d.ts +1 -1
  337. package/dist/networth/index.es.js +181 -174
  338. package/dist/networth/stores/NetWorthStore.d.ts +2 -1
  339. package/dist/networth/types/NetWorth.d.ts +1 -1
  340. package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
  341. package/dist/notifications/components/NotificationBadge.d.ts +1 -1
  342. package/dist/notifications/components/NotificationCard.d.ts +1 -1
  343. package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
  344. package/dist/notifications/components/NotificationList.d.ts +2 -1
  345. package/dist/notifications/index.es.js +104 -92
  346. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  347. package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
  348. package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
  349. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
  350. package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
  351. package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
  352. package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
  353. package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
  354. package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
  355. package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
  356. package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
  357. package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
  358. package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
  359. package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
  360. package/dist/recurringtransactions/index.es.js +477 -451
  361. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
  362. package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
  363. package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
  364. package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
  365. package/dist/settings/SettingsWidget.d.ts +1 -1
  366. package/dist/settings/TransactionRulesWidget.d.ts +1 -1
  367. package/dist/settings/api/SettingsApi.d.ts +1 -2
  368. package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
  369. package/dist/settings/components/devices/DeviceList.d.ts +1 -1
  370. package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
  371. package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
  372. package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
  373. package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
  374. package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
  375. package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
  376. package/dist/settings/index.es.js +314 -323
  377. package/dist/settings/stores/SettingsStore.d.ts +3 -2
  378. package/dist/settings/util/Notifications.d.ts +1 -1
  379. package/dist/spending/SpendingMiniWidget.d.ts +1 -1
  380. package/dist/spending/SpendingWidget.d.ts +1 -1
  381. package/dist/spending/index.es.js +167 -166
  382. package/dist/spending/utils/SpendingData.d.ts +1 -1
  383. package/dist/transactions/TransactionWidget.d.ts +1 -1
  384. package/dist/transactions/api/TransactionApi.d.ts +1 -1
  385. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
  386. package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
  387. package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
  388. package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
  389. package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
  390. package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
  391. package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
  392. package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
  393. package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
  394. package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
  395. package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
  396. package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
  397. package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
  398. package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
  399. package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
  400. package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
  401. package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
  402. package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
  403. package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
  404. package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
  405. package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
  406. package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
  407. package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
  408. package/dist/transactions/constants/Actions.d.ts +4 -3
  409. package/dist/transactions/constants/Transaction.d.ts +1 -1
  410. package/dist/transactions/index.es.js +195 -187
  411. package/dist/transactions/stores/TransactionStore.d.ts +2 -1
  412. package/dist/transactions/stores/UiStore.d.ts +1 -1
  413. package/dist/transactions/utils/Filters.d.ts +1 -1
  414. package/dist/transactions/utils/Transactions.d.ts +1 -1
  415. package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
  416. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
  417. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
  418. package/dist/trends/TrendsFullWidget.d.ts +1 -1
  419. package/dist/trends/TrendsMiniWidget.d.ts +1 -1
  420. package/dist/trends/TrendsWidget.d.ts +1 -1
  421. package/dist/trends/components/CategoriesList.d.ts +1 -1
  422. package/dist/trends/components/CategoriesListItem.d.ts +1 -1
  423. package/dist/trends/components/CategoryDetails.d.ts +3 -0
  424. package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
  425. package/dist/trends/components/TrendsInsights.d.ts +1 -1
  426. package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
  427. package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
  428. package/dist/trends/index.es.js +817 -764
  429. package/dist/trends/stores/TrendsStore.d.ts +2 -1
  430. package/dist/trends/utils/SpendingData.d.ts +1 -1
  431. package/dist/trends/utils/TrendsData.d.ts +1 -1
  432. package/dist/trends/utils/TrendsTable.d.ts +1 -1
  433. package/dist/trends/utils/TrendsWidget.d.ts +7 -0
  434. package/dist/trends/utils/shared.d.ts +1 -1
  435. package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
  436. package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
  437. package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
  438. package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
  439. package/package.json +17 -10
  440. package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
  441. package/dist/AccountListItem-k63LpVBs.mjs +0 -90
  442. package/dist/Accounts-CuE8aSZN.mjs +0 -27
  443. package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
  444. package/dist/CashflowStore-naOtJcwo.mjs +0 -91
  445. package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
  446. package/dist/Dialog-jmgGw5WA.mjs +0 -58
  447. package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
  448. package/dist/GoalStore-BjHKNAVm.mjs +0 -421
  449. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  450. package/dist/LineChart-CnscUFUG.mjs +0 -580
  451. package/dist/Loader-icSc5MlE.mjs +0 -24
  452. package/dist/Localization-2MODESHW.mjs +0 -30
  453. package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
  454. package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
  455. package/dist/Notification-Bs1fdbzI.mjs +0 -95
  456. package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
  457. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  458. package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
  459. package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
  460. package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
  461. package/dist/TransactionList-BDffKJMO.mjs +0 -204
  462. package/dist/User-DS18cMaz.mjs +0 -237
  463. package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
  464. package/dist/common/components/barchart/Bar.d.ts +0 -25
  465. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  466. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  467. package/dist/common/components/barchart/Legend.d.ts +0 -8
  468. package/dist/common/components/barchart/Util.d.ts +0 -42
  469. package/dist/common/components/barchart/index.d.ts +0 -1
  470. package/dist/common/types/SpendingPlan.d.ts +0 -44
  471. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  472. package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
  473. /package/dist/{common → core}/types/Account.d.ts +0 -0
  474. /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
  475. /package/dist/{common → core}/types/Category.d.ts +0 -0
  476. /package/dist/{common → core}/types/Client.d.ts +0 -0
  477. /package/dist/{common → core}/types/Date.d.ts +0 -0
  478. /package/dist/{common → core}/types/Debt.d.ts +0 -0
  479. /package/dist/{common → core}/types/Global.d.ts +0 -0
  480. /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
  481. /package/dist/{common → core}/types/Goal.d.ts +0 -0
  482. /package/dist/{common → core}/types/Handlers.d.ts +0 -0
  483. /package/dist/{common → core}/types/Help.d.ts +0 -0
  484. /package/dist/{common → core}/types/Holding.d.ts +0 -0
  485. /package/dist/{common → core}/types/Institution.d.ts +0 -0
  486. /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
  487. /package/dist/{common → core}/types/Merchant.d.ts +0 -0
  488. /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
  489. /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
  490. /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
  491. /package/dist/{common → core}/types/Transaction.d.ts +0 -0
  492. /package/dist/{common → core}/types/User.d.ts +0 -0
  493. /package/dist/{common → core}/types/Widgets.d.ts +0 -0
  494. /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
  495. /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
  496. /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
  497. /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
  498. /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
  499. /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
  500. /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
  501. /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
  502. /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
  503. /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
  504. /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
  505. /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
  506. /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
  507. /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
  508. /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
  509. /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
  510. /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
  511. /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
  512. /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
  513. /package/dist/{common → core}/types/localization/index.d.ts +0 -0
@@ -1,273 +1,270 @@
1
- import { jsxs as m, jsx as e, Fragment as Ve } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as e, Fragment as Ke } from "react/jsx-runtime";
2
2
  import l from "react";
3
- import { observer as E } from "mobx-react-lite";
3
+ import { observer as I } from "mobx-react-lite";
4
4
  import { endOfMonth as Ce } from "date-fns/endOfMonth";
5
- import { isAfter as Xe } from "date-fns/isAfter";
6
- import { startOfMonth as re } from "date-fns/startOfMonth";
7
- import { startOfToday as ae } from "date-fns/startOfToday";
8
- import ke from "@mui/material/Alert";
9
- import Ne from "@mui/material/Snackbar";
10
- import S from "@mui/material/Stack";
11
- import ie from "@mui/material/styles/useTheme";
12
- import W from "@mui/material/Box";
13
- import Y from "@mui/material/List";
14
- import { Text as C, CategoryIcon as H, Icon as j, H2 as Ye, H3 as Se } from "@mxenabled/mxui";
15
- import { u as w, k as D, i as ce, m as Z, p as le, a as $e, g as q, b as J, h as Q, d as Pe } from "../hooks-CBl85iRr.mjs";
16
- import { f as T } from "../NumberFormatting-DjTD0t3W.mjs";
17
- import xe from "@mui/material/Button";
18
- import de from "@mui/material/Divider";
19
- import ee from "@mui/material/ListItem";
20
- import ue from "@mui/material/ListItemAvatar";
21
- import te from "@mui/material/ListItemButton";
22
- import oe from "@mui/material/ListItemText";
23
- import { b as M } from "../Localization-2MODESHW.mjs";
24
- import { D as $ } from "../Drawer-Bet2ZPJo.mjs";
25
- import Ze from "@mui/material/ListItemSecondaryAction";
26
- import { C as qe } from "../CurrencyInput-BEB3FS70.mjs";
27
- import { D as U } from "../Dialog-jmgGw5WA.mjs";
28
- import { C as Je } from "../ConnectionsDrawer-DMBBzlIJ.mjs";
29
- import * as R from "d3";
30
- import Qe from "@mui/material/Tooltip";
31
- import { useTheme as Ge, alpha as et } from "@mui/material/styles";
32
- import { L as me } from "../Loader-icSc5MlE.mjs";
33
- import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
34
- import { E as _e } from "../EmptyState-DHAkGsjk.mjs";
35
- import { A as G } from "../Analytics-i5h6BxR1.mjs";
36
- import Ie from "@mui/material/Tab";
37
- import tt from "@mui/material/Tabs";
38
- import { e as ot } from "../exportTransactionsToCSV-CGnrndmA.mjs";
39
- import { T as Ae } from "../TransactionList-BDffKJMO.mjs";
40
- import { T as nt } from "../TransactionDetails-Lvt9GCU5.mjs";
5
+ import { isAfter as Ye } from "date-fns/isAfter";
6
+ import { startOfMonth as ae } from "date-fns/startOfMonth";
7
+ import { startOfToday as oe } from "date-fns/startOfToday";
8
+ import Se from "@mui/material/Alert";
9
+ import xe from "@mui/material/Snackbar";
10
+ import A from "@mui/material/Stack";
11
+ import se from "@mui/material/styles/useTheme";
12
+ import V from "@mui/material/Box";
13
+ import K from "@mui/material/List";
14
+ import { Text as B, CategoryIcon as H, Icon as j, H3 as Le } from "@mxenabled/mxui";
15
+ import { u as E, m as w, i as ie, l as Y, p as ce, a as Ne, g as X, b as Z, h as q, d as ke } from "../hooks-BxkfR-Ff.mjs";
16
+ import { f as D } from "../NumberFormatting-QCaNwbjv.mjs";
17
+ import $e from "@mui/material/Button";
18
+ import le from "@mui/material/Divider";
19
+ import J from "@mui/material/ListItem";
20
+ import de from "@mui/material/ListItemAvatar";
21
+ import Q from "@mui/material/ListItemButton";
22
+ import ee from "@mui/material/ListItemText";
23
+ import { b as L } from "../Localization-CPkpIwIx.mjs";
24
+ import { D as $ } from "../Drawer-Bbe4AMB1.mjs";
25
+ import Xe from "@mui/material/ListItemSecondaryAction";
26
+ import { C as Ze } from "../CurrencyInput-DuMktPu3.mjs";
27
+ import { D as W } from "../Dialog-Ck34yr-d.mjs";
28
+ import { C as qe } from "../ConnectionsDrawer-IA7vnv1J.mjs";
29
+ import * as M from "d3";
30
+ import Je from "@mui/material/Tooltip";
31
+ import { useTheme as Ge, alpha as Qe } from "@mui/material/styles";
32
+ import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
33
+ import { L as me } from "../Loader-D3rjKx72.mjs";
34
+ import { E as ye } from "../EmptyState-DHAkGsjk.mjs";
35
+ import { A as G } from "../Analytics-BYItVAe-.mjs";
36
+ import Ee from "@mui/material/Tab";
37
+ import et from "@mui/material/Tabs";
38
+ import { e as tt } from "../exportTransactionsToCSV-MCYH_zzN.mjs";
39
+ import { T as Ae } from "../StatusIndicator-4tWnjeKS.mjs";
40
+ import { T as ot, c as nt } from "../TransactionDetails-D1I1XEsT.mjs";
41
41
  import ve from "@mui/material/Card";
42
42
  import Te from "@mui/material/CardContent";
43
- import { S as Be } from "../StatusBar-CPfSXe80.mjs";
44
- import { S as je } from "../SingleSegmentDonut-PsRQPkmV.mjs";
45
- import { u as at, C as rt } from "../CategorySelectorDrawer-CzRxYpiP.mjs";
46
- import we from "@mui/material/CardHeader";
43
+ import { S as Be } from "../StatusBar-BK_uYHAB.mjs";
44
+ import { S as Pe } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
+ import { u as at, b as rt } from "../CategorySelectorDrawer-Dc9Widy9.mjs";
46
+ import je from "@mui/material/CardHeader";
47
47
  import { subDays as st } from "date-fns/subDays";
48
48
  import it from "@mui/material/IconButton";
49
- import { M as ct } from "../ManageIncome-BVqHHIO7.mjs";
50
- import { u as Fe } from "../useWidgetLoadTimer-DmNCCLa-.mjs";
51
- import { W as lt } from "../WidgetContainer-DFwVgavi.mjs";
52
- import { u as dt, C as ut } from "../BudgetUtil-BZiGckNY.mjs";
53
- import { M as mt } from "../MiniWidgetContainer-CXQcSWSl.mjs";
54
- import { Icon as gt, ChevronRight as pt } from "@mxenabled/mx-icons";
55
- import { b as Ee } from "../CategoryUtil-DB-9JMbi.mjs";
56
- import { S as ht } from "../StatusIndicator-CNMQeYyJ.mjs";
57
- import { f as ft } from "../DateFormats-Cs-NbEZ7.mjs";
58
- const bt = E(() => {
59
- const { budgets: t } = w(), { totalBudgeted: a } = D(), { incomeTotal: i } = ce(), s = i - a;
60
- return /* @__PURE__ */ m(S, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
61
- /* @__PURE__ */ m(S, { alignItems: "center", children: [
62
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: T(i, "0,0") }),
63
- /* @__PURE__ */ e(C, { color: "secondary", variant: "Small", children: t.projected_income })
49
+ import { M as ct } from "../ManageIncome-Cc-wba0I.mjs";
50
+ import { u as ze } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
51
+ import { W as lt } from "../WidgetContainer-B7xDq2bM.mjs";
52
+ import { u as dt, g as ut, C as mt } from "../BudgetUtil-CLhRnCoX.mjs";
53
+ import { M as gt } from "../MiniWidgetContainer-Bhkv-hpz.mjs";
54
+ import { b as we } from "../CategoryUtil-BVixr0d5.mjs";
55
+ const pt = I(() => {
56
+ const { budgets: t } = E(), { totalBudgeted: n } = w(), { incomeTotal: c } = ie(), i = c - n;
57
+ return /* @__PURE__ */ m(A, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
58
+ /* @__PURE__ */ m(A, { alignItems: "center", children: [
59
+ /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: D(c, "0,0") }),
60
+ /* @__PURE__ */ e(B, { color: "secondary", variant: "body2", children: t.projected_income })
64
61
  ] }),
65
- /* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
66
- /* @__PURE__ */ m(S, { alignItems: "center", children: [
67
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: T(a, "0,0") }),
68
- /* @__PURE__ */ e(C, { color: "secondary", variant: "Small", children: t.budgeted })
62
+ /* @__PURE__ */ e(B, { bold: !0, justifyContent: "center", variant: "body1", children: "-" }),
63
+ /* @__PURE__ */ m(A, { alignItems: "center", children: [
64
+ /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: D(n, "0,0") }),
65
+ /* @__PURE__ */ e(B, { color: "secondary", variant: "body2", children: t.budgeted })
69
66
  ] }),
70
- /* @__PURE__ */ e(C, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
71
- /* @__PURE__ */ m(S, { alignItems: "center", children: [
72
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: T(s, "0,0") }),
73
- /* @__PURE__ */ e(C, { color: "secondary", variant: "Small", children: t.remaining })
67
+ /* @__PURE__ */ e(B, { bold: !0, justifyContent: "center", variant: "body1", children: "=" }),
68
+ /* @__PURE__ */ m(A, { alignItems: "center", children: [
69
+ /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: D(i, "0,0") }),
70
+ /* @__PURE__ */ e(B, { color: "secondary", variant: "body2", children: t.remaining })
74
71
  ] })
75
72
  ] });
76
- }), _t = E(
73
+ }), ht = I(
77
74
  ({ category: t }) => {
78
- const { budgets: a } = w(), { budgets: i } = D(), s = l.useMemo(() => {
79
- const o = i.find((c) => c.category_guid === t.guid), r = T(t.totalAverageAmount, "0,0"), n = o ? M(a.recalculate_previous_budget, T(o.amount, "0,0")) : a.recalculate_new_budget;
80
- return `${r} - ${n}`;
81
- }, [a, i]);
75
+ const { budgets: n } = E(), { budgets: c } = w(), i = l.useMemo(() => {
76
+ const a = c.find((r) => r.category_guid === t.guid), s = D(t.totalAverageAmount, "0,0"), o = a ? L(n.recalculate_previous_budget, D(a.amount, "0,0")) : n.recalculate_new_budget;
77
+ return `${s} - ${o}`;
78
+ }, [n, c]);
82
79
  return /* @__PURE__ */ m(l.Fragment, { children: [
83
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { children: [
84
- /* @__PURE__ */ e(ue, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid, variant: "filled" }) }),
85
- /* @__PURE__ */ e(oe, { primary: t.name, secondary: s })
80
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ m(Q, { children: [
81
+ /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid, variant: "filled" }) }),
82
+ /* @__PURE__ */ e(ee, { primary: t.name, secondary: i })
86
83
  ] }) }),
87
- /* @__PURE__ */ e(de, {})
84
+ /* @__PURE__ */ e(le, {})
88
85
  ] }, t.guid);
89
86
  }
90
- ), yt = ({ onRecalculateBudgets: t }) => {
91
- const { budgets: a, common: i } = w(), { spendCategories: s } = Z(), { recalculateBudgets: o, setAlert: r } = D(), [n, c] = l.useState(!1), u = s.filter((g) => g.totalAverageAmount > 0), d = async () => {
92
- await o(u), c(!1), r(a.alert_recalculated_budgets), t?.();
87
+ ), bt = ({ onRecalculateBudgets: t }) => {
88
+ const { budgets: n, common: c } = E(), { spendCategories: i } = Y(), { recalculateBudgets: a, setAlert: s } = w(), [o, r] = l.useState(!1), g = i.filter((u) => u.totalAverageAmount > 0), d = async () => {
89
+ await a(g), r(!1), s(n.alert_recalculated_budgets), t?.();
93
90
  };
94
91
  return /* @__PURE__ */ m(l.Fragment, { children: [
95
- /* @__PURE__ */ e(xe, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: a.recalculate_button }),
96
- /* @__PURE__ */ e(C, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: a.recalculate_help }),
92
+ /* @__PURE__ */ e($e, { onClick: () => r(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: n.recalculate_button }),
93
+ /* @__PURE__ */ e(B, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "subtitle1", children: n.recalculate_help }),
97
94
  /* @__PURE__ */ e(
98
95
  $,
99
96
  {
100
- ariaLabelClose: i.close_aria,
101
- isOpen: n,
102
- onClose: () => c(!1),
97
+ ariaLabelClose: c.close_aria,
98
+ isOpen: o,
99
+ onClose: () => r(!1),
103
100
  onPrimaryAction: d,
104
- title: a.recalculate_title,
105
- children: /* @__PURE__ */ m(S, { children: [
106
- /* @__PURE__ */ m(S, { mx: 24, my: 16, children: [
107
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: a.recalculate_description_top }),
108
- /* @__PURE__ */ e(C, { variant: "ParagraphSmall", children: a.recalculate_description_bottom })
101
+ title: n.recalculate_title,
102
+ children: /* @__PURE__ */ m(A, { children: [
103
+ /* @__PURE__ */ m(A, { mx: 24, my: 16, children: [
104
+ /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: n.recalculate_description_top }),
105
+ /* @__PURE__ */ e(B, { variant: "subtitle2", children: n.recalculate_description_bottom })
109
106
  ] }),
110
- /* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Y, { children: u.map((g) => /* @__PURE__ */ e(_t, { category: g }, g.guid)) }) })
107
+ /* @__PURE__ */ e(V, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: g.map((u) => /* @__PURE__ */ e(ht, { category: u }, u.guid)) }) })
111
108
  ] })
112
109
  }
113
110
  )
114
111
  ] });
115
- }, pe = ({
112
+ }, ge = ({
116
113
  amount: t,
117
- categoryName: a,
118
- onAmountChanged: i
114
+ categoryName: n,
115
+ onAmountChanged: c
119
116
  }) => {
120
- const { budgets: s } = w(), { totalBudgeted: o } = D(), { incomeTotal: r } = ce(), n = r - o;
121
- return /* @__PURE__ */ m(S, { gap: 16, children: [
122
- /* @__PURE__ */ m(S, { children: [
123
- /* @__PURE__ */ e(C, { children: M(
124
- s.add_description_top,
125
- T(n, "0,0")
117
+ const { budgets: i } = E(), { totalBudgeted: a } = w(), { incomeTotal: s } = ie(), o = s - a;
118
+ return /* @__PURE__ */ m(A, { gap: 16, children: [
119
+ /* @__PURE__ */ m(A, { children: [
120
+ /* @__PURE__ */ e(B, { children: L(
121
+ i.add_description_top,
122
+ D(o, "0,0")
126
123
  ) }),
127
- /* @__PURE__ */ e(C, { children: M(s.add_description_bottom, a) })
124
+ /* @__PURE__ */ e(B, { children: L(i.add_description_bottom, n) })
128
125
  ] }),
129
126
  /* @__PURE__ */ e(
130
- qe,
127
+ Ze,
131
128
  {
132
129
  amount: t,
133
130
  autoFocus: !0,
134
- label: s.add_label,
131
+ label: i.add_label,
135
132
  minAmount: 0,
136
- setAmount: i,
137
- sx: { ".MuiTypography-Body": { p: 0 } }
133
+ setAmount: c,
134
+ sx: { ".MuiTypography-body1": { p: 0 } }
138
135
  }
139
136
  )
140
137
  ] });
141
- }, Ct = E(({ category: t, onAddBudget: a }) => {
142
- const { budgets: i, common: s } = w(), [o, r] = l.useState(!1), [n, c] = l.useState(
138
+ }, ft = I(({ category: t, onAddBudget: n }) => {
139
+ const { budgets: c, common: i } = E(), [a, s] = l.useState(!1), [o, r] = l.useState(
143
140
  `${t.totalAmount === 0 ? "" : t.totalAmount}`
144
141
  );
145
142
  return /* @__PURE__ */ m(l.Fragment, { children: [
146
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { onClick: () => r(!0), children: [
147
- /* @__PURE__ */ e(ue, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid }) }),
143
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ m(Q, { onClick: () => s(!0), children: [
144
+ /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(H, { categoryGuid: t.guid }) }),
148
145
  /* @__PURE__ */ e(
149
- oe,
146
+ ee,
150
147
  {
151
148
  primary: t.name,
152
- secondary: T(t.totalAmount, "0,0")
149
+ secondary: D(t.totalAmount, "0,0")
153
150
  }
154
151
  ),
155
- /* @__PURE__ */ e(Ze, { children: /* @__PURE__ */ e(j, { name: "add", size: 20 }) })
152
+ /* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(j, { name: "add", size: 20 }) })
156
153
  ] }) }, t.guid),
157
154
  /* @__PURE__ */ e(
158
- U,
155
+ W,
159
156
  {
160
- copy: { close_aria: s.close_aria, title: i.add_title },
161
- disablePrimaryButton: Number(n) <= 0,
162
- isOpen: o,
163
- onClose: () => r(!1),
164
- onPrimaryAction: () => a(t, Number(n)),
165
- primaryText: i.add_save_button,
166
- children: /* @__PURE__ */ e(pe, { amount: n, categoryName: t.name, onAmountChanged: c })
157
+ copy: { close_aria: i.close_aria, title: c.add_title },
158
+ disablePrimaryButton: Number(o) <= 0,
159
+ isOpen: a,
160
+ onClose: () => s(!1),
161
+ onPrimaryAction: () => n(t, Number(o)),
162
+ primaryText: c.add_save_button,
163
+ children: /* @__PURE__ */ e(ge, { amount: o, categoryName: t.name, onAmountChanged: r })
167
164
  }
168
165
  )
169
166
  ] });
170
- }), ze = E(({ onAddBudget: t, onRecalculateBudgets: a }) => {
171
- const { budgets: i } = w(), { addBudget: s, setAlert: o, unbudgetedCategories: r } = D(), n = async (c, u) => {
172
- await s(c, u), t?.(), o(M(i.alert_budget_created, c.name));
167
+ }), Fe = I(({ onAddBudget: t, onRecalculateBudgets: n }) => {
168
+ const { budgets: c } = E(), { addBudget: i, setAlert: a, unbudgetedCategories: s } = w(), o = async (r, g) => {
169
+ await i(r, g), t?.(), a(L(c.alert_budget_created, r.name));
173
170
  };
174
- return /* @__PURE__ */ m(S, { children: [
175
- /* @__PURE__ */ e(bt, {}),
176
- /* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(Y, { children: r.map((c) => /* @__PURE__ */ e(
177
- Ct,
171
+ return /* @__PURE__ */ m(A, { children: [
172
+ /* @__PURE__ */ e(pt, {}),
173
+ /* @__PURE__ */ e(V, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: s.map((r) => /* @__PURE__ */ e(
174
+ ft,
178
175
  {
179
- category: c,
180
- onAddBudget: n
176
+ category: r,
177
+ onAddBudget: o
181
178
  },
182
- c.guid
179
+ r.guid
183
180
  )) }) }),
184
- /* @__PURE__ */ e(yt, { onRecalculateBudgets: a })
181
+ /* @__PURE__ */ e(bt, { onRecalculateBudgets: n })
185
182
  ] });
186
- }), Oe = 5, Ue = 100, se = 25, Bt = (t) => {
187
- const a = (o) => {
188
- o.active || t.alphaTarget(0.3).restart(), o.subject.fx = o.subject.x, o.subject.fy = o.subject.y;
189
- }, i = (o) => {
190
- o.subject.fx = o.x, o.subject.fy = o.y;
191
- }, s = (o) => {
192
- o.active || t.alphaTarget(0), o.subject.fx = null, o.subject.fy = null;
183
+ }), Ie = 5, Ue = 100, re = 25, yt = (t) => {
184
+ const n = (a) => {
185
+ a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
186
+ }, c = (a) => {
187
+ a.subject.fx = a.x, a.subject.fy = a.y;
188
+ }, i = (a) => {
189
+ a.active || t.alphaTarget(0), a.subject.fx = null, a.subject.fy = null;
193
190
  };
194
- return R.drag().on("start", a).on("drag", i).on("end", s);
195
- }, St = (t) => {
196
- let a = t.transaction_total / t.amount;
197
- a < 0 ? a = 0 : a > 1 && (a = 1);
198
- const i = a * 2 * Math.PI, s = R.interpolate(0, i), o = R.arc().cornerRadius(5).innerRadius(t.radius - Oe * 2).outerRadius(t.radius - Oe).startAngle(0).endAngle(0);
199
- return (r) => (o.endAngle(s(r)), o(t) || "");
200
- }, xt = (t) => {
201
- R.selectAll(".bubble").call(Bt(t));
202
- }, Me = (t, a, i) => Math.min(Math.max(t, a), i), At = (t, a, i) => {
191
+ return M.drag().on("start", n).on("drag", c).on("end", i);
192
+ }, _t = (t) => {
193
+ let n = t.transaction_total / t.amount;
194
+ n < 0 ? n = 0 : n > 1 && (n = 1);
195
+ const c = n * 2 * Math.PI, i = M.interpolate(0, c), a = M.arc().cornerRadius(5).innerRadius(t.radius - Ie * 2).outerRadius(t.radius - Ie).startAngle(0).endAngle(0);
196
+ return (s) => (a.endAngle(i(s)), a(t) || "");
197
+ }, Ct = (t) => {
198
+ M.selectAll(".bubble").call(yt(t));
199
+ }, Oe = (t, n, c) => Math.min(Math.max(t, n), c), Bt = (t, n, c) => {
203
200
  t.alpha(1).restart().force(
204
201
  "x",
205
- R.forceX().x(i / 2).strength(0.01)
202
+ M.forceX().x(c / 2).strength(0.01)
206
203
  ).force(
207
204
  "y",
208
- R.forceY().y(a / 2).strength(0.02)
205
+ M.forceY().y(n / 2).strength(0.02)
209
206
  ).on("tick", () => {
210
- const s = t.nodes();
211
- s.forEach((o) => {
212
- const r = o.radius ?? se;
213
- o.x = Me(o.x ?? 0, r, i - r), o.y = Me(o.y ?? 0, r, a - r);
214
- }), R.selectAll(".bubble").data(s).attr("transform", (o) => `translate(${o.x},${o.y})`);
207
+ const i = t.nodes();
208
+ i.forEach((a) => {
209
+ const s = a.radius ?? re;
210
+ a.x = Oe(a.x ?? 0, s, c - s), a.y = Oe(a.y ?? 0, s, n - s);
211
+ }), M.selectAll(".bubble").data(i).attr("transform", (a) => `translate(${a.x},${a.y})`);
215
212
  });
216
- }, We = (t, a) => R.scaleLinear().domain([t, a]).range([se, Ue]), vt = (t) => {
217
- const a = t.reduce((r, n) => {
218
- const c = Math.max(n.transaction_total, n.amount);
219
- return c > r ? c : r;
220
- }, 0), i = t.reduce((r, n) => {
221
- const c = Math.max(n.transaction_total, n.amount);
222
- return c < r ? c : r;
223
- }, a), s = We(i, a), o = t.map((r) => {
224
- const n = s(Math.max(r.transaction_total, r.amount)) || 25;
213
+ }, We = (t, n) => M.scaleLinear().domain([t, n]).range([re, Ue]), St = (t) => {
214
+ const n = t.reduce((s, o) => {
215
+ const r = Math.max(o.transaction_total, o.amount);
216
+ return r > s ? r : s;
217
+ }, 0), c = t.reduce((s, o) => {
218
+ const r = Math.max(o.transaction_total, o.amount);
219
+ return r < s ? r : s;
220
+ }, n), i = We(c, n), a = t.map((s) => {
221
+ const o = i(Math.max(s.transaction_total, s.amount)) || 25;
225
222
  return {
226
- ...r,
227
- radius: n
223
+ ...s,
224
+ radius: o
228
225
  };
229
226
  });
230
- return R.forceSimulation(o).velocityDecay(0.05).force("collide", R.forceCollide((r) => r.radius + 2).strength(0.7));
231
- }, Tt = (t, a, i) => {
232
- const o = Math.PI * se ** 2 * t, r = i < 400 || a < 300, n = r ? 40 : 20, c = Math.max(100, i - n), u = Math.max(100, a - n), d = c * u;
233
- let g = se;
234
- if (o < d) {
235
- const h = Math.sqrt(d / (t * Math.PI)), _ = Math.min(c, u) / 4;
236
- g = Math.min(Ue, h, _);
227
+ return M.forceSimulation(a).velocityDecay(0.05).force("collide", M.forceCollide((s) => s.radius + 2).strength(0.7));
228
+ }, xt = (t, n, c) => {
229
+ const a = Math.PI * re ** 2 * t, s = c < 400 || n < 300, o = s ? 40 : 20, r = Math.max(100, c - o), g = Math.max(100, n - o), d = r * g;
230
+ let u = re;
231
+ if (a < d) {
232
+ const p = Math.sqrt(d / (t * Math.PI)), h = Math.min(r, g) / 4;
233
+ u = Math.min(Ue, p, h);
237
234
  }
238
- return r && t <= 3 && (g = Math.min(g, 45)), { minRadius: Math.max(20, g * 0.6), maxRadius: g };
239
- }, wt = (t, a, i, s, o) => {
240
- const { maxRadius: r, minRadius: n } = Tt(t, a, o);
241
- return R.scaleLinear().domain([s, i]).range([n, r]);
242
- }, Dt = (t, a, i = !1, s, o) => {
243
- const r = a.map((d) => Math.max(d.transaction_total, d.amount)), n = Math.min(...r), c = Math.max(...r), u = i ? wt(t.length, s, c, n, o) : We(n, c);
235
+ return s && t <= 3 && (u = Math.min(u, 45)), { minRadius: Math.max(20, u * 0.6), maxRadius: u };
236
+ }, At = (t, n, c, i, a) => {
237
+ const { maxRadius: s, minRadius: o } = xt(t, n, a);
238
+ return M.scaleLinear().domain([i, c]).range([o, s]);
239
+ }, vt = (t, n, c = !1, i, a) => {
240
+ const s = n.map((d) => Math.max(d.transaction_total, d.amount)), o = Math.min(...s), r = Math.max(...s), g = c ? At(t.length, i, r, o, a) : We(o, r);
244
241
  return t.map((d) => ({
245
242
  ...d,
246
- radius: u(Math.max(d.transaction_total, d.amount))
243
+ radius: g(Math.max(d.transaction_total, d.amount))
247
244
  }));
248
- }, Re = 5, It = 2e3, Et = ({ bubble: t }) => {
249
- const a = ie(), {
250
- amount: i,
251
- guid: s,
252
- budgetColors: { mercury: o },
253
- radius: r,
254
- transaction_total: n
255
- } = t, c = `mercury-${s}`;
245
+ }, Me = 5, Tt = 2e3, Dt = ({ bubble: t }) => {
246
+ const n = se(), {
247
+ amount: c,
248
+ guid: i,
249
+ budgetColors: { mercury: a },
250
+ radius: s,
251
+ transaction_total: o
252
+ } = t, r = `mercury-${i}`;
256
253
  l.useEffect(() => {
257
- R.select(`.${c}`).selectAll(".status").remove(), R.select(`.${c}`).append("path").transition().duration(It).delay(0).attr("class", "status").attr("style", `fill: ${o}; fill-opacity: 1;`).attrTween("d", () => St(t));
258
- }, [i, r, n]);
259
- const u = R.arc().innerRadius((d) => d - 2 * Re).outerRadius((d) => d - Re).startAngle(0).endAngle(2 * Math.PI);
260
- return /* @__PURE__ */ e("g", { className: c, children: /* @__PURE__ */ e(
254
+ M.select(`.${r}`).selectAll(".status").remove(), M.select(`.${r}`).append("path").transition().duration(Tt).delay(0).attr("class", "status").attr("style", `fill: ${a}; fill-opacity: 1;`).attrTween("d", () => _t(t));
255
+ }, [c, s, o]);
256
+ const g = M.arc().innerRadius((d) => d - 2 * Me).outerRadius((d) => d - Me).startAngle(0).endAngle(2 * Math.PI);
257
+ return /* @__PURE__ */ e("g", { className: r, children: /* @__PURE__ */ e(
261
258
  "path",
262
259
  {
263
- d: u(r) || "",
264
- style: { fill: a.palette.common.white, fillOpacity: 0.35 }
260
+ d: g(s) || "",
261
+ style: { fill: n.palette.common.white, fillOpacity: 0.35 }
265
262
  }
266
263
  ) });
267
- }, Ot = l.memo(Et), z = 75, ye = 50;
268
- function Mt({ bubble: t, isDraggable: a, onClick: i = () => {
264
+ }, Et = l.memo(Dt), U = 75, _e = 50;
265
+ function wt({ bubble: t, isDraggable: n, onClick: c = () => {
269
266
  } }) {
270
- const [s, o] = l.useState(!1), r = Ge(), { availableWidth: n } = le(), c = l.useMemo(() => {
267
+ const [i, a] = l.useState(!1), s = Ge(), { availableWidth: o } = ce(), r = l.useMemo(() => {
271
268
  if (t)
272
269
  return {
273
270
  amount: t.amount,
@@ -279,50 +276,50 @@ function Mt({ bubble: t, isDraggable: a, onClick: i = () => {
279
276
  }, [t.amount, t.budgetColors, t.guid, t.radius, t.transaction_total]);
280
277
  if (!t) return;
281
278
  const {
282
- budgetColors: { background: u, text: d },
283
- category: { icon: g, name: f },
284
- guid: h,
285
- description: _,
286
- radius: p,
287
- x: y,
288
- y: b
289
- } = t, A = n < 400 ? -8 : -12;
290
- let B = A, v = A;
291
- p > z ? (B = -14, v = -45) : p > ye && (v = -32);
292
- let x = 32;
293
- p <= z && (x = n < 400 ? 16 : 24);
294
- const O = `${t.category.name}: ${_}`, L = {
279
+ budgetColors: { background: g, text: d },
280
+ category: { icon: u, name: y },
281
+ guid: p,
282
+ description: h,
283
+ radius: _,
284
+ x: C,
285
+ y: x
286
+ } = t, v = o < 400 ? -8 : -12;
287
+ let b = v, S = v;
288
+ _ > U ? (b = -14, S = -45) : _ > _e && (S = -32);
289
+ let f = 32;
290
+ _ <= U && (f = o < 400 ? 16 : 24);
291
+ const T = `${t.category.name}: ${h}`, N = {
295
292
  modifiers: [
296
293
  {
297
294
  name: "offset",
298
295
  options: { offset: [0, 15] }
299
296
  }
300
297
  ]
301
- }, I = (N) => {
302
- (N.key === "Enter" || N.key === " ") && (N.preventDefault(), i(t));
303
- }, k = () => {
304
- o(!0);
305
- }, P = () => {
306
- o(!1);
298
+ }, R = (k) => {
299
+ (k.key === "Enter" || k.key === " ") && (k.preventDefault(), c(t));
300
+ }, O = () => {
301
+ a(!0);
302
+ }, z = () => {
303
+ a(!1);
307
304
  };
308
305
  return /* @__PURE__ */ m(
309
306
  "g",
310
307
  {
311
- "aria-label": `${f} - ${_}`,
308
+ "aria-label": `${y} - ${h}`,
312
309
  className: "bubble",
313
- id: `bubble-${h}`,
314
- onBlur: P,
315
- onClick: () => i(t),
316
- onFocus: k,
317
- onKeyDown: I,
318
- onMouseEnter: () => o(!0),
319
- onMouseLeave: () => o(!1),
310
+ id: `bubble-${p}`,
311
+ onBlur: z,
312
+ onClick: () => c(t),
313
+ onFocus: O,
314
+ onKeyDown: R,
315
+ onMouseEnter: () => a(!0),
316
+ onMouseLeave: () => a(!1),
320
317
  role: "button",
321
- style: { cursor: a ? "pointer" : "default" },
318
+ style: { cursor: n ? "pointer" : "default" },
322
319
  tabIndex: 0,
323
320
  textAnchor: "middle",
324
- x: y,
325
- y: b,
321
+ x: C,
322
+ y: x,
326
323
  children: [
327
324
  /* @__PURE__ */ e("style", { children: `
328
325
  .bubble:focus,
@@ -331,111 +328,111 @@ function Mt({ bubble: t, isDraggable: a, onClick: i = () => {
331
328
  }
332
329
  .bubble:focus circle,
333
330
  .bubble:focus-visible circle {
334
- stroke: ${r.palette.primary.main};
331
+ stroke: ${s.palette.primary.main};
335
332
  stroke-width: 3;
336
333
  stroke-opacity: 0.8;
337
334
  }
338
335
  ` }),
339
- /* @__PURE__ */ e(Qe, { open: s, slotProps: { popper: L }, title: O, children: /* @__PURE__ */ e("circle", { fill: u, id: `circle-${h}`, r: p }) }),
340
- /* @__PURE__ */ e("svg", { x: B, y: v, children: /* @__PURE__ */ e(j, { name: g, size: x, sx: { fill: d } }) }),
341
- p > z && /* @__PURE__ */ e(
342
- C,
336
+ /* @__PURE__ */ e(Je, { open: i, slotProps: { popper: N }, title: T, children: /* @__PURE__ */ e("circle", { fill: g, id: `circle-${p}`, r: _ }) }),
337
+ /* @__PURE__ */ e("svg", { x: b, y: S, children: /* @__PURE__ */ e(j, { name: u, size: f, sx: { fill: d } }) }),
338
+ _ > U && /* @__PURE__ */ e(
339
+ B,
343
340
  {
344
341
  bold: !0,
345
342
  component: "text",
346
- id: `budget-category-${h}`,
343
+ id: `budget-category-${p}`,
347
344
  sx: { fill: d },
348
- variant: "Small",
345
+ variant: "body2",
349
346
  y: 4,
350
- children: f
347
+ children: y
351
348
  }
352
349
  ),
353
- p > ye && /* @__PURE__ */ e(
354
- C,
350
+ _ > _e && /* @__PURE__ */ e(
351
+ B,
355
352
  {
356
353
  bold: !0,
357
354
  component: "text",
358
- id: `budget-description-${h}-1`,
355
+ id: `budget-description-${p}-1`,
359
356
  sx: { fill: d },
360
- variant: "Body",
361
- y: p <= z ? 12 : 24,
362
- children: p <= z ? _.split(" ")[0] : _
357
+ variant: "body1",
358
+ y: _ <= U ? 12 : 24,
359
+ children: _ <= U ? h.split(" ")[0] : h
363
360
  }
364
361
  ),
365
- p <= z && p > ye && /* @__PURE__ */ e(
366
- C,
362
+ _ <= U && _ > _e && /* @__PURE__ */ e(
363
+ B,
367
364
  {
368
365
  component: "text",
369
- id: `budget-description-${h}-2`,
366
+ id: `budget-description-${p}-2`,
370
367
  sx: { fill: d },
371
- variant: "XSmall",
368
+ variant: "caption",
372
369
  y: 28,
373
- children: _.split(" ")[1]
370
+ children: h.split(" ")[1]
374
371
  }
375
372
  ),
376
- /* @__PURE__ */ e(Ot, { bubble: c })
373
+ /* @__PURE__ */ e(Et, { bubble: r })
377
374
  ]
378
375
  },
379
- h
376
+ p
380
377
  );
381
378
  }
382
- const Rt = ({
379
+ const It = ({
383
380
  height: t,
384
- width: a,
385
- isDraggable: i = !1,
386
- onClick: s = () => {
381
+ width: n,
382
+ isDraggable: c = !1,
383
+ onClick: i = () => {
387
384
  }
388
385
  }) => {
389
- const [o, r] = l.useState([]), n = l.useRef(null), c = l.useRef(!1), { detailedBudgets: u } = D(), d = l.useCallback(() => {
390
- const g = n.current, f = vt(u), h = f.nodes();
391
- if (g) {
392
- const _ = g.nodes(), p = new Map(_.map((y) => [y.guid, y]));
393
- h.forEach((y) => {
394
- const b = p.get(y.guid);
395
- b && Object.assign(y, {
396
- vx: b.vx,
397
- vy: b.vy,
398
- x: b.x,
399
- y: b.y
386
+ const [a, s] = l.useState([]), o = l.useRef(null), r = l.useRef(!1), { detailedBudgets: g } = w(), d = l.useCallback(() => {
387
+ const u = o.current, y = St(g), p = y.nodes();
388
+ if (u) {
389
+ const h = u.nodes(), _ = new Map(h.map((C) => [C.guid, C]));
390
+ p.forEach((C) => {
391
+ const x = _.get(C.guid);
392
+ x && Object.assign(C, {
393
+ vx: x.vx,
394
+ vy: x.vy,
395
+ x: x.x,
396
+ y: x.y
400
397
  });
401
398
  });
402
399
  }
403
- n.current = f, c.current = !1, r(h);
404
- }, [u]);
400
+ o.current = y, r.current = !1, s(p);
401
+ }, [g]);
405
402
  return l.useEffect(() => {
406
403
  d();
407
404
  }, [d]), l.useEffect(() => () => {
408
- n.current && (n.current.stop(), n.current = null);
405
+ o.current && (o.current.stop(), o.current = null);
409
406
  }, []), l.useEffect(() => {
410
- const g = n.current;
411
- if (!g) return;
412
- const f = g.nodes(), h = a > 0 && a < 450 || t > 0 && t < 300, _ = Dt(f, u, h, t, a);
413
- g.nodes(_), At(g, t, a), i && setTimeout(() => {
414
- xt(g);
415
- }, 0), r([..._]);
416
- }, [t, a, i, u]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(a), children: o.map((g) => /* @__PURE__ */ e(Mt, { bubble: g, isDraggable: i, onClick: s }, g.guid)) });
417
- }, Lt = E(Rt), kt = ({
407
+ const u = o.current;
408
+ if (!u) return;
409
+ const y = u.nodes(), p = n > 0 && n < 450 || t > 0 && t < 300, h = vt(y, g, p, t, n);
410
+ u.nodes(h), Bt(u, t, n), c && setTimeout(() => {
411
+ Ct(u);
412
+ }, 0), s([...h]);
413
+ }, [t, n, c, g]), /* @__PURE__ */ e("svg", { height: t, style: { overflow: "visible" }, width: Math.abs(n), children: a.map((u) => /* @__PURE__ */ e(wt, { bubble: u, isDraggable: c, onClick: i }, u.guid)) });
414
+ }, Ot = I(It), Mt = ({
418
415
  isMiniWidget: t = !1,
419
- onConnectAccountsClick: a,
420
- createBudgetOnClick: i
416
+ onConnectAccountsClick: n,
417
+ createBudgetOnClick: c
421
418
  }) => {
422
- const { config: s } = $e(), { recalculateBudgets: o } = D(), { spendCategories: r } = Z(), { budgets: n } = w(), { availableWidth: c } = le(), { isMobile: u } = ge(c), d = t && u, [g, f] = l.useState(!1), [h, _] = l.useState(!1), [p, y] = l.useState(!1), b = l.useMemo(() => [...r.filter((B) => B.totalAverageAmount > 0)], [r]), A = async () => {
423
- y(!0);
424
- const { data: B, isSuccess: v } = await o(b);
425
- y(!1), v ? (B.length === 0 && _(!0), f(!1)) : f(!0);
419
+ const { config: i } = Ne(), { recalculateBudgets: a } = w(), { spendCategories: s } = Y(), { budgets: o } = E(), { availableWidth: r } = ce(), { isMobile: g } = ue(r), d = t && g, [u, y] = l.useState(!1), [p, h] = l.useState(!1), [_, C] = l.useState(!1), x = l.useMemo(() => [...s.filter((b) => b.totalAverageAmount > 0)], [s]), v = async () => {
420
+ C(!0);
421
+ const { data: b, isSuccess: S } = await a(x);
422
+ C(!1), S ? (b.length === 0 && h(!0), y(!1)) : y(!0);
426
423
  };
427
- return p ? /* @__PURE__ */ e(me, {}) : g ? /* @__PURE__ */ e(
428
- _e,
424
+ return _ ? /* @__PURE__ */ e(me, {}) : u ? /* @__PURE__ */ e(
425
+ ye,
429
426
  {
430
- header: n.autogenerate_budgets_error_header,
427
+ header: o.autogenerate_budgets_error_header,
431
428
  icon: "error",
432
429
  iconColor: "#4D4D4D",
433
- onClick: (B) => {
434
- B === "primary" ? A() : i();
430
+ onClick: (b) => {
431
+ b === "primary" ? v() : c();
435
432
  },
436
- primaryButton: n.autogenerate_budgets_error_primary_button,
437
- secondaryButton: n.zero_state_generate_budgets_secondary_button,
438
- subText: n.autogenerate_budgets_error_subheader,
433
+ primaryButton: o.autogenerate_budgets_error_primary_button,
434
+ secondaryButton: o.zero_state_generate_budgets_secondary_button,
435
+ subText: o.autogenerate_budgets_error_subheader,
439
436
  sx: {
440
437
  width: { sm: 468 },
441
438
  ".buttons-footer": {
@@ -445,18 +442,18 @@ const Rt = ({
445
442
  ...d && { justifyContent: "center", mt: 0, svg: { height: 32, width: 32 } }
446
443
  }
447
444
  }
448
- ) : /* @__PURE__ */ e(Ve, { children: h ? /* @__PURE__ */ e(
449
- _e,
445
+ ) : /* @__PURE__ */ e(Ke, { children: p ? /* @__PURE__ */ e(
446
+ ye,
450
447
  {
451
- header: n.zero_state_generate_budgets_header,
448
+ header: o.zero_state_generate_budgets_header,
452
449
  icon: "error",
453
450
  iconColor: "#4D4D4D",
454
- onClick: (B) => {
455
- B === "primary" ? a() : i();
451
+ onClick: (b) => {
452
+ b === "primary" ? n() : c();
456
453
  },
457
- primaryButton: s.show_connections_widget_in_master ? n.zero_state_generate_budgets_primary_button : void 0,
458
- secondaryButton: n.zero_state_generate_budgets_secondary_button,
459
- subText: n.zero_state_generate_budgets_subheader,
454
+ primaryButton: i.show_connections_widget_in_master ? o.zero_state_generate_budgets_primary_button : void 0,
455
+ secondaryButton: o.zero_state_generate_budgets_secondary_button,
456
+ subText: o.zero_state_generate_budgets_subheader,
460
457
  sx: {
461
458
  width: t ? "100%" : { sm: 500 },
462
459
  height: t ? "100%" : { sm: 468 },
@@ -471,17 +468,17 @@ const Rt = ({
471
468
  }
472
469
  }
473
470
  ) : /* @__PURE__ */ e(
474
- _e,
471
+ ye,
475
472
  {
476
- header: n.create_budgets_title,
473
+ header: o.create_budgets_title,
477
474
  icon: "bubble_chart",
478
475
  iconColor: "#1A1A1A",
479
- onClick: (B) => {
480
- B === "primary" ? A() : i();
476
+ onClick: (b) => {
477
+ b === "primary" ? v() : c();
481
478
  },
482
- primaryButton: n.empty_state_primary_button,
483
- secondaryButton: t ? void 0 : n.empty_state_secondary_button,
484
- subText: n.empty_state_subheader,
479
+ primaryButton: o.empty_state_primary_button,
480
+ secondaryButton: t ? void 0 : o.empty_state_secondary_button,
481
+ subText: o.empty_state_subheader,
485
482
  sx: {
486
483
  width: t ? "100%" : { sm: 432 },
487
484
  height: t ? "100%" : { sm: 468 },
@@ -496,51 +493,51 @@ const Rt = ({
496
493
  }
497
494
  }
498
495
  ) });
499
- }, He = E(
496
+ }, He = I(
500
497
  ({
501
498
  createBudgetOnClick: t = () => {
502
499
  },
503
- height: a,
504
- isDraggable: i = !1,
505
- isMiniWidget: s = !1,
506
- shouldShowZeroState: o,
507
- unavailableWidth: r = 24
500
+ height: n,
501
+ isDraggable: c = !1,
502
+ isMiniWidget: i = !1,
503
+ shouldShowZeroState: a,
504
+ unavailableWidth: s = 24
508
505
  }) => {
509
- const { onEvent: n } = q(), { setSelectedBudget: c } = D(), { isInitialized: u } = J(), { accounts: d } = w(), { availableWidth: g } = le(), { isMobile: f } = ge(), [h, _] = l.useState(!1), p = l.useMemo(() => g - r, [g]), y = (A) => {
510
- c(A), n(G.BUDGETS_CLICK_BUDGET_CATEGORY, {
511
- budget_category: A.category.name,
506
+ const { onEvent: o } = X(), { setSelectedBudget: r } = w(), { isInitialized: g } = Z(), { accounts: d } = E(), { availableWidth: u } = ce(), { isMobile: y } = ue(), [p, h] = l.useState(!1), _ = l.useMemo(() => u - s, [u]), C = (v) => {
507
+ r(v), o(G.BUDGETS_CLICK_BUDGET_CATEGORY, {
508
+ budget_category: v.category.name,
512
509
  click_type: "bubble"
513
510
  });
514
- }, b = () => {
515
- _(!0), n(G.ACCOUNTS_CLICK_CONNECT);
511
+ }, x = () => {
512
+ h(!0), o(G.ACCOUNTS_CLICK_CONNECT);
516
513
  };
517
514
  return /* @__PURE__ */ m(
518
- W,
515
+ V,
519
516
  {
520
- ml: o || f ? 0 : 24,
521
- sx: { alignSelf: "center", ...s && { height: "100%" } },
517
+ ml: a || y ? 0 : 24,
518
+ sx: { alignSelf: "center", ...i && { height: "100%" } },
522
519
  children: [
523
- o || !u ? /* @__PURE__ */ e(
524
- kt,
520
+ a || !g ? /* @__PURE__ */ e(
521
+ Mt,
525
522
  {
526
523
  createBudgetOnClick: t,
527
- isMiniWidget: s,
528
- onConnectAccountsClick: b
524
+ isMiniWidget: i,
525
+ onConnectAccountsClick: x
529
526
  }
530
527
  ) : /* @__PURE__ */ e(
531
- Lt,
528
+ Ot,
532
529
  {
533
- height: a,
534
- isDraggable: i,
535
- onClick: y,
536
- width: p
530
+ height: n,
531
+ isDraggable: c,
532
+ onClick: C,
533
+ width: _
537
534
  }
538
535
  ),
539
536
  /* @__PURE__ */ e(
540
- Je,
537
+ qe,
541
538
  {
542
- onClose: () => _(!1),
543
- showConnectionsWidget: h,
539
+ onClose: () => h(!1),
540
+ showConnectionsWidget: p,
544
541
  title: d.manage_connections
545
542
  }
546
543
  )
@@ -548,586 +545,601 @@ const Rt = ({
548
545
  }
549
546
  );
550
547
  }
551
- ), Ke = ({ budget: t }) => {
548
+ ), Ve = ({ budget: t }) => {
552
549
  const {
553
- amount: a,
554
- budgetColors: { background: i },
555
- category: { name: s },
556
- category_guid: o,
557
- percentage: r,
558
- transaction_total: n
559
- } = t, c = [
550
+ amount: n,
551
+ budgetColors: { background: c },
552
+ category: { name: i },
553
+ category_guid: a,
554
+ percentage: s,
555
+ transaction_total: o
556
+ } = t, r = [
560
557
  {
561
- color: i,
562
- percentage: `${r}%`
558
+ color: c,
559
+ percentage: `${s}%`
563
560
  }
564
561
  ];
565
- return /* @__PURE__ */ e(ve, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ m(S, { alignItems: "center", gap: 16, children: [
566
- /* @__PURE__ */ e(H, { categoryGuid: o, size: 56 }),
567
- /* @__PURE__ */ e(Ye, { variant: "H1", children: `${T(n, "0,0")} / ${T(a, "0,0")}` }),
568
- /* @__PURE__ */ e(C, { bold: !0, variant: "XSmall", children: s }),
569
- /* @__PURE__ */ e(Be, { data: c, height: 10 })
562
+ return /* @__PURE__ */ e(ve, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ m(A, { alignItems: "center", gap: 16, children: [
563
+ /* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
564
+ /* @__PURE__ */ e(B, { variant: "h1", children: `${D(o, "0,0")} / ${D(n, "0,0")}` }),
565
+ /* @__PURE__ */ e(B, { bold: !0, variant: "caption", children: i }),
566
+ /* @__PURE__ */ e(Be, { data: r, height: 10 })
570
567
  ] }) }) });
571
- }, Nt = E(() => {
572
- const { budgets: t } = w();
573
- return /* @__PURE__ */ m(S, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
574
- /* @__PURE__ */ e(j, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
575
- /* @__PURE__ */ e(C, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
576
- /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
568
+ }, Rt = I(() => {
569
+ const { budgets: t } = E();
570
+ return /* @__PURE__ */ m(A, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
571
+ /* @__PURE__ */ e(j, { color: "action", name: "bubble_chart", sx: { fontSize: 32 } }),
572
+ /* @__PURE__ */ e(B, { bold: !0, color: "text.secondary", variant: "body2", children: t.zero_state_no_sub_budgets }),
573
+ /* @__PURE__ */ e(B, { color: "text.secondary", variant: "caption", children: t.zero_state_no_sub_budgets_description })
577
574
  ] });
578
- }), $t = E(({ budget: t }) => {
575
+ }), Lt = I(({ budget: t }) => {
579
576
  const {
580
- amount: a,
581
- budgetColors: { background: i },
582
- category: s,
583
- percentage: o,
584
- transaction_total: r
585
- } = t, { setSelectedSubBudget: n } = D();
586
- return /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { onClick: () => n(t), children: [
587
- /* @__PURE__ */ e(ue, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(je, { color: i, percent: o, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: s.parent_guid, variant: "basic" }) }) }),
577
+ amount: n,
578
+ budgetColors: { background: c },
579
+ category: i,
580
+ percentage: a,
581
+ transaction_total: s
582
+ } = t, { setSelectedSubBudget: o } = w();
583
+ return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ m(Q, { onClick: () => o(t), children: [
584
+ /* @__PURE__ */ e(de, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: c, percent: a, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: i.parent_guid, variant: "basic" }) }) }),
588
585
  /* @__PURE__ */ e(
589
- oe,
586
+ ee,
590
587
  {
591
- primary: /* @__PURE__ */ e(S, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.category.name }) }),
592
- secondary: /* @__PURE__ */ e(S, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(C, { fontWeight: 400, variant: "Body", children: `
593
- ${T(r, "0,0")} /
594
- ${T(a, "0,0")}
588
+ primary: /* @__PURE__ */ e(A, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: t.category.name }) }),
589
+ secondary: /* @__PURE__ */ e(A, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(B, { fontWeight: 400, variant: "body1", children: `
590
+ ${D(s, "0,0")} /
591
+ ${D(n, "0,0")}
595
592
  ` }) })
596
593
  }
597
594
  )
598
595
  ] }) });
599
- }), Pt = E(({ category: t, parentBudget: a }) => {
600
- const { budgets: i, common: s } = w(), { setExpandedGuid: o, setOnSelect: r } = at(), { addBudget: n } = D(), [c, u] = l.useState(!1), [d, g] = l.useState(!1), [f, h] = l.useState(""), [_, p] = l.useState(void 0);
596
+ }), Nt = I(({ category: t, parentBudget: n }) => {
597
+ const { budgets: c, common: i } = E(), { setExpandedGuid: a, setOnSelect: s } = at(), { addBudget: o } = w(), [r, g] = l.useState(!1), [d, u] = l.useState(!1), [y, p] = l.useState(""), [h, _] = l.useState(void 0);
601
598
  l.useEffect(() => {
602
- r((A) => {
603
- const B = t.subCategories.find((v) => v.guid === A);
604
- B && (p(B), h(`${B.currentAmount === 0 ? "" : B.currentAmount}`), g(!0));
599
+ s((v) => {
600
+ const b = t.subCategories.find((S) => S.guid === v);
601
+ b && (_(b), p(`${b.currentAmount === 0 ? "" : b.currentAmount}`), u(!0));
605
602
  });
606
603
  }, []);
607
- const y = () => {
608
- o(t.guid), u(!0);
609
- }, b = async () => {
610
- _ && Number(f) > 0 && (await n(_, Number(f), a.guid), g(!1), u(!1), p(void 0));
604
+ const C = () => {
605
+ a(t.guid), g(!0);
606
+ }, x = async () => {
607
+ h && Number(y) > 0 && (await o(h, Number(y), n.guid), u(!1), g(!1), _(void 0));
611
608
  };
612
- return /* @__PURE__ */ m(W, { children: [
613
- /* @__PURE__ */ e(ee, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(te, { onClick: y, children: /* @__PURE__ */ e(oe, { children: /* @__PURE__ */ m(S, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
614
- /* @__PURE__ */ m(S, { alignItems: "center", direction: "row", gap: 8, children: [
609
+ return /* @__PURE__ */ m(V, { children: [
610
+ /* @__PURE__ */ e(J, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Q, { onClick: C, children: /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(A, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
611
+ /* @__PURE__ */ m(A, { alignItems: "center", direction: "row", gap: 8, children: [
615
612
  /* @__PURE__ */ e(j, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
616
- /* @__PURE__ */ e(C, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
613
+ /* @__PURE__ */ e(B, { bold: !0, sx: { color: "primary.light" }, variant: "body1", children: c.add_sub_budget_button })
617
614
  ] }),
618
615
  /* @__PURE__ */ e(j, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
619
616
  ] }) }) }) }),
620
- /* @__PURE__ */ e(de, {}),
617
+ /* @__PURE__ */ e(le, {}),
621
618
  /* @__PURE__ */ e(
622
619
  $,
623
620
  {
624
- ariaLabelClose: s.close_aria,
625
- isOpen: c,
626
- onClose: () => u(!1),
627
- title: i.add_sub_budget_title,
628
- children: /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(rt, { category: t, subCategories: t.subCategories }) })
621
+ ariaLabelClose: i.close_aria,
622
+ isOpen: r,
623
+ onClose: () => g(!1),
624
+ title: c.add_sub_budget_title,
625
+ children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(rt, { category: t, subCategories: t.subCategories }) })
629
626
  }
630
627
  ),
631
628
  /* @__PURE__ */ e(
632
- U,
629
+ W,
633
630
  {
634
- copy: { close_aria: s.close_aria, title: i.add_title },
635
- disablePrimaryButton: Number(f) <= 0,
631
+ copy: { close_aria: i.close_aria, title: c.add_title },
632
+ disablePrimaryButton: Number(y) <= 0,
636
633
  isOpen: d,
637
- onClose: () => g(!1),
638
- onPrimaryAction: b,
639
- primaryText: i.add_save_button,
634
+ onClose: () => u(!1),
635
+ onPrimaryAction: x,
636
+ primaryText: c.add_save_button,
640
637
  children: /* @__PURE__ */ e(
641
- pe,
638
+ ge,
642
639
  {
643
- amount: f,
644
- categoryName: _?.name || "",
645
- onAmountChanged: h
640
+ amount: y,
641
+ categoryName: h?.name || "",
642
+ onAmountChanged: p
646
643
  }
647
644
  )
648
645
  }
649
646
  )
650
647
  ] });
651
- }), Gt = E(({ budget: t }) => {
652
- const { category: a, subBudgets: i } = t, { budgets: s, common: o } = w(), { deleteBudget: r, selectedSubBudget: n, setSelectedSubBudget: c, updateBudget: u } = D(), { filter: d, setFilter: g } = Q(), [f, h] = l.useState(!1), [_, p] = l.useState(!1), [y, b] = l.useState("");
648
+ }), kt = I(({ budget: t }) => {
649
+ const { category: n, subBudgets: c } = t, { budgets: i, common: a } = E(), { deleteBudget: s, selectedSubBudget: o, setSelectedSubBudget: r, updateBudget: g } = w(), { filter: d, setFilter: u } = q(), [y, p] = l.useState(!1), [h, _] = l.useState(!1), [C, x] = l.useState("");
653
650
  l.useEffect(() => {
654
- n && (b(`${n.amount}`), g({
651
+ o && (x(`${o.amount}`), u({
655
652
  ...d,
656
- custom: (x) => x.category_guid === n.category_guid
653
+ custom: (f) => f.category_guid === o.category_guid
657
654
  }));
658
- }, [n]);
659
- const A = async () => {
660
- n && await u({
661
- ...n,
662
- amount: Number(y)
655
+ }, [o]);
656
+ const v = async () => {
657
+ o && await g({
658
+ ...o,
659
+ amount: Number(C)
663
660
  });
664
- }, B = async () => {
665
- n && await r(n.guid), p(!1), v();
666
- }, v = () => {
667
- g({
661
+ }, b = async () => {
662
+ o && await s(o.guid), _(!1), S();
663
+ }, S = () => {
664
+ u({
668
665
  ...d,
669
- custom: (x) => x.category_guid === t.category_guid || x.top_level_category_guid === t.category_guid
670
- }), c(void 0);
666
+ custom: (f) => f.category_guid === t.category_guid || f.top_level_category_guid === t.category_guid
667
+ }), r(void 0);
671
668
  };
672
669
  return /* @__PURE__ */ m(l.Fragment, { children: [
673
- /* @__PURE__ */ m(Y, { sx: { bgcolor: "background.paper" }, children: [
674
- i.length === 0 ? /* @__PURE__ */ e(Nt, {}) : i.map((x) => /* @__PURE__ */ m(l.Fragment, { children: [
675
- /* @__PURE__ */ e($t, { budget: x }),
676
- /* @__PURE__ */ e(de, {})
677
- ] }, x.guid)),
678
- /* @__PURE__ */ e(Pt, { category: a, parentBudget: t })
670
+ /* @__PURE__ */ m(K, { sx: { bgcolor: "background.paper" }, children: [
671
+ c.length === 0 ? /* @__PURE__ */ e(Rt, {}) : c.map((f) => /* @__PURE__ */ m(l.Fragment, { children: [
672
+ /* @__PURE__ */ e(Lt, { budget: f }),
673
+ /* @__PURE__ */ e(le, {})
674
+ ] }, f.guid)),
675
+ /* @__PURE__ */ e(Nt, { category: n, parentBudget: t })
679
676
  ] }),
680
677
  /* @__PURE__ */ e(
681
678
  $,
682
679
  {
683
- ariaLabelClose: o.close_aria,
684
- isOpen: !!n,
685
- onClose: v,
686
- onPrimaryAction: () => h(!0),
687
- onSecondaryAction: () => p(!0),
688
- primaryText: s.details_edit_button,
689
- secondaryText: s.details_delete_button,
690
- title: s.details_title,
691
- children: n && /* @__PURE__ */ m(S, { gap: 24, children: [
692
- /* @__PURE__ */ e(Ke, { budget: n }),
680
+ ariaLabelClose: a.close_aria,
681
+ isOpen: !!o,
682
+ onClose: S,
683
+ onPrimaryAction: () => p(!0),
684
+ onSecondaryAction: () => _(!0),
685
+ primaryText: i.details_edit_button,
686
+ secondaryText: i.details_delete_button,
687
+ title: i.details_title,
688
+ children: o && /* @__PURE__ */ m(A, { gap: 24, children: [
689
+ /* @__PURE__ */ e(Ve, { budget: o }),
693
690
  /* @__PURE__ */ e(Ae, { height: "100%" })
694
691
  ] })
695
692
  }
696
693
  ),
697
- n && /* @__PURE__ */ m(l.Fragment, { children: [
694
+ o && /* @__PURE__ */ m(l.Fragment, { children: [
698
695
  /* @__PURE__ */ e(
699
- U,
696
+ W,
700
697
  {
701
- copy: { close_aria: o.close_aria, title: s.details_edit_title },
702
- disablePrimaryButton: Number(y) <= 0,
703
- isOpen: f,
704
- onClose: () => h(!1),
705
- onPrimaryAction: A,
706
- primaryText: s.edit_save_button,
698
+ copy: { close_aria: a.close_aria, title: i.details_edit_title },
699
+ disablePrimaryButton: Number(C) <= 0,
700
+ isOpen: y,
701
+ onClose: () => p(!1),
702
+ onPrimaryAction: v,
703
+ primaryText: i.edit_save_button,
707
704
  children: /* @__PURE__ */ e(
708
- pe,
705
+ ge,
709
706
  {
710
- amount: y,
711
- categoryName: n.category.name,
712
- onAmountChanged: b
707
+ amount: C,
708
+ categoryName: o.category.name,
709
+ onAmountChanged: x
713
710
  }
714
711
  )
715
712
  }
716
713
  ),
717
714
  /* @__PURE__ */ e(
718
- U,
715
+ W,
719
716
  {
720
- copy: { close_aria: o.close_aria, title: s.delete_title },
721
- isOpen: _,
722
- onClose: () => p(!1),
723
- onPrimaryAction: B,
717
+ copy: { close_aria: a.close_aria, title: i.delete_title },
718
+ isOpen: h,
719
+ onClose: () => _(!1),
720
+ onPrimaryAction: b,
724
721
  primaryColor: "error",
725
722
  primaryText: "Delete",
726
723
  secondaryColor: "secondary",
727
- children: /* @__PURE__ */ e(C, { variant: "Paragraph", children: M(s.delete_description, n.category.name) })
724
+ children: /* @__PURE__ */ e(B, { variant: "subtitle1", children: L(i.delete_description, o.category.name) })
728
725
  }
729
726
  )
730
727
  ] })
731
728
  ] });
732
- }), jt = E(({ budget: t }) => {
733
- const { is_mobile_webview: a } = $e(), { setAlert: i } = D(), { budgets: s, common: o, transactions: r } = w(), { isDesktop: n, isSmallTablet: c, isTablet: u } = ge(), {
729
+ }), $t = I(({ budget: t }) => {
730
+ const { is_mobile_webview: n } = Ne(), { setAlert: c } = w(), { budgets: i, common: a, transactions: s } = E(), { isDesktop: o, isSmallTablet: r, isTablet: g } = ue(), {
734
731
  sortedTransactions: d,
735
- sortedTransactionsWithSplits: g,
736
- tags: f
737
- } = Q(), [h, _] = l.useState(0), [p, y] = l.useState(""), b = l.useMemo(
738
- () => d.find((x) => x.guid === p),
739
- [p, d]
740
- ), A = (x, O) => {
741
- _(O);
742
- }, B = () => {
743
- ot(g, f), i(s.alert_csv_downloaded);
744
- }, v = d.length > 0 && !a && (n || u && !c);
745
- return /* @__PURE__ */ m(S, { gap: 24, children: [
746
- /* @__PURE__ */ e(Ke, { budget: t }),
747
- /* @__PURE__ */ m(S, { children: [
732
+ sortedTransactionsWithSplits: u,
733
+ tags: y
734
+ } = q(), [p, h] = l.useState(0), [_, C] = l.useState(""), x = l.useMemo(
735
+ () => d.find((f) => f.guid === _),
736
+ [_, d]
737
+ ), v = (f, T) => {
738
+ h(T);
739
+ }, b = () => {
740
+ tt(u, y), c(i.alert_csv_downloaded);
741
+ }, S = d.length > 0 && !n && (o || g && !r);
742
+ return /* @__PURE__ */ m(A, { gap: 24, children: [
743
+ /* @__PURE__ */ e(Ve, { budget: t }),
744
+ /* @__PURE__ */ m(A, { children: [
748
745
  /* @__PURE__ */ m(
749
- tt,
746
+ et,
750
747
  {
751
- onChange: A,
748
+ onChange: v,
752
749
  sx: { width: "100%" },
753
750
  textColor: "primary",
754
- value: h,
751
+ value: p,
755
752
  variant: "fullWidth",
756
753
  children: [
757
- /* @__PURE__ */ e(Ie, { label: s.details_transactions_tab }),
758
- /* @__PURE__ */ e(Ie, { label: s.details_subbudgets_tab })
754
+ /* @__PURE__ */ e(Ee, { label: i.details_transactions_tab }),
755
+ /* @__PURE__ */ e(Ee, { label: i.details_subbudgets_tab })
759
756
  ]
760
757
  }
761
758
  ),
762
- h === 0 && /* @__PURE__ */ m(S, { children: [
763
- v && /* @__PURE__ */ e(S, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
764
- xe,
759
+ p === 0 && /* @__PURE__ */ m(A, { children: [
760
+ S && /* @__PURE__ */ e(A, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
761
+ $e,
765
762
  {
766
- onClick: B,
763
+ onClick: b,
767
764
  startIcon: /* @__PURE__ */ e(j, { name: "ios_share" }),
768
765
  variant: "text",
769
- children: r.export_csv_btn
766
+ children: s.export_csv_btn
770
767
  }
771
768
  ) }),
772
- /* @__PURE__ */ e(Ae, { height: "100%", onClick: y })
769
+ /* @__PURE__ */ e(Ae, { height: "100%", onClick: C })
773
770
  ] }),
774
- h === 1 && /* @__PURE__ */ e(Gt, { budget: t }),
771
+ p === 1 && /* @__PURE__ */ e(kt, { budget: t }),
775
772
  /* @__PURE__ */ e(
776
773
  $,
777
774
  {
778
- ariaLabelClose: o.close_aria,
779
- isOpen: !!b,
780
- onClose: () => y(""),
781
- title: s.details_transaction_drawer,
782
- children: b && /* @__PURE__ */ e(nt, { transaction: b })
775
+ ariaLabelClose: a.close_aria,
776
+ isOpen: !!x,
777
+ onClose: () => C(""),
778
+ title: i.details_transaction_drawer,
779
+ children: x && /* @__PURE__ */ e(ot, { transaction: x })
783
780
  }
784
781
  )
785
782
  ] })
786
783
  ] });
787
- }), Ft = E(() => {
788
- const { selectedAccountGuids: t } = J(), { budgets: a, common: i } = w(), {
789
- alert: s,
790
- dateRange: o,
791
- deleteBudget: r,
792
- selectedBudget: n,
793
- selectedSubBudget: c,
794
- setAlert: u,
784
+ }), Gt = I(() => {
785
+ const { selectedAccountGuids: t } = Z(), { budgets: n, common: c } = E(), {
786
+ alert: i,
787
+ dateRange: a,
788
+ deleteBudget: s,
789
+ selectedBudget: o,
790
+ selectedSubBudget: r,
791
+ setAlert: g,
795
792
  setSelectedBudget: d,
796
- updateBudget: g
797
- } = D(), { setFilter: f } = Q(), [h, _] = l.useState(!1), [p, y] = l.useState(!1), [b, A] = l.useState(!1), [B, v] = l.useState("");
793
+ updateBudget: u
794
+ } = w(), { setFilter: y } = q(), [p, h] = l.useState(!1), [_, C] = l.useState(!1), [x, v] = l.useState(!1), [b, S] = l.useState("");
798
795
  l.useEffect(() => {
799
- n && !c && (v(`${n.amount}`), _(!0), f({
796
+ o && !r && (S(`${o.amount}`), h(!0), y({
800
797
  accounts: t,
801
- dateRange: o,
802
- custom: (k) => k.category_guid === n.category_guid || k.top_level_category_guid === n.category_guid,
798
+ dateRange: a,
799
+ custom: (O) => O.category_guid === o.category_guid || O.top_level_category_guid === o.category_guid,
803
800
  showSplits: !0
804
801
  }));
805
- }, [n]);
806
- const x = async () => {
807
- n && (await g({
808
- ...n,
809
- amount: Number(B),
810
- percentage: n.category.totalAmount / Number(B) * 100
811
- }), y(!1), u(M(a.alert_budget_updated, n.category.name)));
812
- }, O = async () => {
813
- n && (await r(n.guid), u(M(a.alert_budget_deleted, n.category.name))), L();
814
- }, L = () => {
815
- _(!1), setTimeout(() => {
802
+ }, [o]);
803
+ const f = async () => {
804
+ o && (await u({
805
+ ...o,
806
+ amount: Number(b),
807
+ percentage: o.category.totalAmount / Number(b) * 100
808
+ }), C(!1), g(L(n.alert_budget_updated, o.category.name)));
809
+ }, T = async () => {
810
+ o && (await s(o.guid), g(L(n.alert_budget_deleted, o.category.name))), N();
811
+ }, N = () => {
812
+ h(!1), setTimeout(() => {
816
813
  d(void 0);
817
814
  }, 250);
818
- }, I = () => {
819
- y(!1), v(`${n?.amount}`);
815
+ }, R = () => {
816
+ C(!1), S(`${o?.amount}`);
820
817
  };
821
- if (n)
818
+ if (o)
822
819
  return /* @__PURE__ */ m(l.Fragment, { children: [
823
820
  /* @__PURE__ */ m(
824
821
  $,
825
822
  {
826
- ariaLabelClose: i.close_aria,
827
- isOpen: h,
828
- onClose: L,
829
- onPrimaryAction: () => y(!0),
830
- onSecondaryAction: () => A(!0),
831
- primaryText: a.details_edit_button,
823
+ ariaLabelClose: c.close_aria,
824
+ isOpen: p,
825
+ onClose: N,
826
+ onPrimaryAction: () => C(!0),
827
+ onSecondaryAction: () => v(!0),
828
+ primaryText: n.details_edit_button,
832
829
  secondaryColor: "error",
833
- secondaryText: a.details_delete_button,
834
- title: a.details_title,
830
+ secondaryText: n.details_delete_button,
831
+ title: n.details_title,
835
832
  children: [
836
- /* @__PURE__ */ e(jt, { budget: n }),
833
+ /* @__PURE__ */ e($t, { budget: o }),
837
834
  /* @__PURE__ */ e(
838
- Ne,
835
+ xe,
839
836
  {
840
837
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
841
838
  autoHideDuration: 3500,
842
- onClose: () => u(""),
843
- open: !!s,
844
- children: /* @__PURE__ */ e(ke, { closeText: "", onClose: () => u(""), severity: "success", variant: "filled", children: s })
839
+ onClose: () => g(""),
840
+ open: !!i,
841
+ children: /* @__PURE__ */ e(Se, { closeText: "", onClose: () => g(""), severity: "success", variant: "filled", children: i })
845
842
  }
846
843
  )
847
844
  ]
848
845
  }
849
846
  ),
850
847
  /* @__PURE__ */ e(
851
- U,
848
+ W,
852
849
  {
853
- copy: { close_aria: i.close_aria, title: a.details_edit_title },
854
- disablePrimaryButton: Number(B) <= 0,
855
- isOpen: p,
856
- onClose: I,
857
- onPrimaryAction: x,
858
- onSecondaryAction: I,
859
- primaryText: a.edit_save_button,
850
+ copy: { close_aria: c.close_aria, title: n.details_edit_title },
851
+ disablePrimaryButton: Number(b) <= 0,
852
+ isOpen: _,
853
+ onClose: R,
854
+ onPrimaryAction: f,
855
+ onSecondaryAction: R,
856
+ primaryText: n.edit_save_button,
860
857
  children: /* @__PURE__ */ e(
861
- pe,
858
+ ge,
862
859
  {
863
- amount: B,
864
- categoryName: n.category.name,
865
- onAmountChanged: v
860
+ amount: b,
861
+ categoryName: o.category.name,
862
+ onAmountChanged: S
866
863
  }
867
864
  )
868
865
  }
869
866
  ),
870
867
  /* @__PURE__ */ e(
871
- U,
868
+ W,
872
869
  {
873
- copy: { close_aria: i.close_aria, title: a.delete_title },
874
- isOpen: b,
875
- onClose: () => A(!1),
876
- onPrimaryAction: O,
870
+ copy: { close_aria: c.close_aria, title: n.delete_title },
871
+ isOpen: x,
872
+ onClose: () => v(!1),
873
+ onPrimaryAction: T,
877
874
  primaryColor: "error",
878
- primaryText: a.details_delete_button,
875
+ primaryText: n.details_delete_button,
879
876
  secondaryColor: "secondary",
880
- children: /* @__PURE__ */ e(C, { variant: "Paragraph", children: M(a.delete_description, n.category.name) })
877
+ children: /* @__PURE__ */ e(B, { variant: "subtitle1", children: L(n.delete_description, o.category.name) })
881
878
  }
882
879
  )
883
880
  ] });
884
- }), zt = ({ budget: t, onClick: a }) => {
881
+ }), Pt = ({ budget: t, onClick: n }) => {
885
882
  const {
886
- amount: i,
887
- budgetColors: { background: s, description: o },
888
- category_guid: r,
889
- description: n,
890
- percentage: c,
891
- subBudgets: u,
883
+ amount: c,
884
+ budgetColors: { background: i, description: a },
885
+ category_guid: s,
886
+ description: o,
887
+ percentage: r,
888
+ subBudgets: g,
892
889
  transaction_total: d
893
- } = t;
894
- return /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ m(te, { onClick: () => a?.(t), children: [
895
- /* @__PURE__ */ e(ue, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(je, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: r, variant: "basic" }) }) }),
890
+ } = t, u = r > 100;
891
+ return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ m(Q, { onClick: () => n?.(t), children: [
892
+ /* @__PURE__ */ e(de, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Pe, { color: i, percent: r, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: s, variant: "basic" }) }) }),
896
893
  /* @__PURE__ */ e(
897
- oe,
894
+ ee,
898
895
  {
899
- primary: /* @__PURE__ */ m(S, { component: "span", direction: "row", justifyContent: "space-between", children: [
900
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.category.name }),
901
- /* @__PURE__ */ e(C, { fontWeight: 400, variant: "Body", children: `
902
- ${T(d, "0,0")} /
903
- ${T(i, "0,0")}
896
+ primary: /* @__PURE__ */ m(A, { component: "span", direction: "row", justifyContent: "space-between", children: [
897
+ /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: t.category.name }),
898
+ /* @__PURE__ */ e(B, { fontWeight: 400, variant: "body1", children: `
899
+ ${D(d, "0,0")} /
900
+ ${D(c, "0,0")}
904
901
  ` })
905
902
  ] }),
906
- secondary: /* @__PURE__ */ m(S, { component: "span", direction: "row", justifyContent: "space-between", children: [
907
- /* @__PURE__ */ e(C, { variant: "XSmall", children: `${u.length} Sub-budgets` }),
908
- /* @__PURE__ */ e(C, { bold: c > 100, color: o, variant: "XSmall", children: n })
903
+ secondary: /* @__PURE__ */ m(A, { component: "span", direction: "row", justifyContent: "space-between", children: [
904
+ /* @__PURE__ */ e(B, { variant: "caption", children: `${g.length} Sub-budgets` }),
905
+ /* @__PURE__ */ e(
906
+ B,
907
+ {
908
+ bold: u,
909
+ sx: {
910
+ color: a,
911
+ ...u && {
912
+ ".MuiListItemButton-root:hover &, .MuiListItemButton-root:active &": {
913
+ color: "error.dark"
914
+ }
915
+ }
916
+ },
917
+ variant: "caption",
918
+ children: o
919
+ }
920
+ )
909
921
  ] })
910
922
  }
911
923
  )
912
924
  ] }) });
913
- }, Ut = E(() => {
914
- const { onEvent: t } = q(), { budgets: a } = w(), { detailedBudgets: i, setSelectedBudget: s } = D(), o = (r) => {
915
- s(r), t(G.BUDGETS_CLICK_BUDGET_CATEGORY, {
916
- budget_category: r.category.name,
925
+ }, jt = I(() => {
926
+ const { onEvent: t } = X(), { budgets: n } = E(), { detailedBudgets: c, setSelectedBudget: i } = w(), a = (s) => {
927
+ i(s), t(G.BUDGETS_CLICK_BUDGET_CATEGORY, {
928
+ budget_category: s.category.name,
917
929
  click_type: "list"
918
930
  });
919
931
  };
920
932
  return /* @__PURE__ */ m(ve, { elevation: 2, children: [
921
- /* @__PURE__ */ e(we, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Se, { children: a.budget_categories_title }) }),
922
- /* @__PURE__ */ e(Te, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(Y, { children: i.map((r) => /* @__PURE__ */ m(l.Fragment, { children: [
923
- /* @__PURE__ */ e(zt, { budget: r, onClick: o }),
924
- /* @__PURE__ */ e(de, {})
925
- ] }, r.guid)) }) })
933
+ /* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: n.budget_categories_title }) }),
934
+ /* @__PURE__ */ e(Te, { sx: { p: 0, ":last-child": { p: 0 } }, children: /* @__PURE__ */ e(K, { children: c.map((s) => /* @__PURE__ */ m(l.Fragment, { children: [
935
+ /* @__PURE__ */ e(Pt, { budget: s, onClick: a }),
936
+ /* @__PURE__ */ e(le, {})
937
+ ] }, s.guid)) }) })
926
938
  ] });
927
- }), Wt = E(() => {
928
- const t = ie(), { onEvent: a } = q(), { visibleAccounts: i } = Pe(), { budgets: s, common: o, recurring: r } = w(), { incomeCategories: n, spendCategories: c } = Z(), { detailedBudgets: u, totalBudgeted: d } = D(), { incomeTotal: g } = ce(), { setFilter: f } = Q(), [h, _] = l.useState(!1), [p, y] = l.useMemo(() => {
929
- const v = c.reduce((I, k) => I + k.totalAmount, 0);
930
- let x = v / d;
931
- x > 1 && (x = 1);
932
- let O = t.palette.success.main;
933
- x > 0.8 && x < 1 ? O = t.palette.warning.main : x >= 1 && (O = t.palette.error.main);
934
- const L = [
939
+ }), zt = I(() => {
940
+ const t = se(), { onEvent: n } = X(), { visibleAccounts: c } = ke(), { budgets: i, common: a, recurring: s } = E(), { incomeCategories: o, spendCategories: r } = Y(), { detailedBudgets: g, totalBudgeted: d } = w(), { incomeTotal: u } = ie(), { setFilter: y } = q(), [p, h] = l.useState(!1), [_, C] = l.useMemo(() => {
941
+ const S = r.reduce((R, O) => R + O.totalAmount, 0);
942
+ let f = S / d;
943
+ f > 1 && (f = 1);
944
+ let T = t.palette.success.main;
945
+ f > 0.8 && f < 1 ? T = t.palette.warning.main : f >= 1 && (T = t.palette.error.main);
946
+ const N = [
935
947
  {
936
- color: O,
937
- percentage: `${x}`
948
+ color: T,
949
+ percentage: `${f}`
938
950
  }
939
951
  ];
940
- return [v, L];
941
- }, [u, c]), [b, A] = l.useMemo(() => {
942
- const v = Math.abs(
943
- n.reduce((L, I) => L + I.totalAmount, 0)
952
+ return [S, N];
953
+ }, [g, r]), [x, v] = l.useMemo(() => {
954
+ const S = Math.abs(
955
+ o.reduce((N, R) => N + R.totalAmount, 0)
944
956
  );
945
- let x = v / g;
946
- x > 1 && (x = 1);
947
- const O = [
957
+ let f = S / u;
958
+ f > 1 && (f = 1);
959
+ const T = [
948
960
  {
949
961
  color: t.palette.secondary.main,
950
- percentage: `${x}`
962
+ percentage: `${f}`
951
963
  }
952
964
  ];
953
- return [v, O];
954
- }, [n, g]), B = () => {
955
- f({
956
- accounts: i.map((v) => v.guid),
965
+ return [S, T];
966
+ }, [o, u]), b = () => {
967
+ y({
968
+ accounts: c.map((S) => S.guid),
957
969
  dateRange: {
958
970
  start: st(/* @__PURE__ */ new Date(), 90),
959
971
  end: /* @__PURE__ */ new Date()
960
972
  }
961
- }), _(!0), a(G.BUDGETS_CLICK_EDIT_INCOME);
973
+ }), h(!0), n(G.BUDGETS_CLICK_EDIT_INCOME);
962
974
  };
963
975
  return /* @__PURE__ */ m(ve, { elevation: 2, sx: { overflow: "visible" }, children: [
964
- /* @__PURE__ */ e(we, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Se, { children: s.overview_title }) }),
965
- /* @__PURE__ */ e(Te, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(S, { gap: 24, children: [
966
- /* @__PURE__ */ m(S, { gap: 8, children: [
967
- /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
968
- /* @__PURE__ */ e(Be, { data: y, height: 16 }),
969
- /* @__PURE__ */ e(C, { variant: "Small", children: M(
970
- s.spending_description,
971
- T(p, "0,0"),
972
- T(d, "0,0")
976
+ /* @__PURE__ */ e(je, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Le, { children: i.overview_title }) }),
977
+ /* @__PURE__ */ e(Te, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ m(A, { gap: 24, children: [
978
+ /* @__PURE__ */ m(A, { gap: 8, children: [
979
+ /* @__PURE__ */ e(B, { bold: !0, sx: { mb: 8 }, variant: "body1", children: i.spending_title }),
980
+ /* @__PURE__ */ e(Be, { data: C, height: 16 }),
981
+ /* @__PURE__ */ e(B, { variant: "body2", children: L(
982
+ i.spending_description,
983
+ D(_, "0,0"),
984
+ D(d, "0,0")
973
985
  ) })
974
986
  ] }),
975
- /* @__PURE__ */ m(S, { gap: 8, children: [
976
- /* @__PURE__ */ m(S, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
977
- /* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: s.income_title }),
987
+ /* @__PURE__ */ m(A, { gap: 8, children: [
988
+ /* @__PURE__ */ m(A, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
989
+ /* @__PURE__ */ e(B, { bold: !0, variant: "body1", children: i.income_title }),
978
990
  /* @__PURE__ */ e(
979
991
  it,
980
992
  {
981
- "aria-label": r.manage_income,
982
- onClick: B,
993
+ "aria-label": s.manage_income,
994
+ onClick: b,
983
995
  sx: { p: 0 },
984
996
  children: /* @__PURE__ */ e(j, { color: "primary", name: "edit" })
985
997
  }
986
998
  )
987
999
  ] }),
988
- /* @__PURE__ */ e(Be, { data: A, height: 16 }),
989
- /* @__PURE__ */ e(C, { variant: "Small", children: M(
990
- s.income_description,
991
- T(b, "0,0"),
992
- T(g, "0,0")
1000
+ /* @__PURE__ */ e(Be, { data: v, height: 16 }),
1001
+ /* @__PURE__ */ e(B, { variant: "body2", children: L(
1002
+ i.income_description,
1003
+ D(x, "0,0"),
1004
+ D(u, "0,0")
993
1005
  ) })
994
1006
  ] })
995
1007
  ] }) }),
996
1008
  /* @__PURE__ */ e(
997
1009
  $,
998
1010
  {
999
- ariaLabelClose: o.close_aria,
1000
- isOpen: h,
1001
- onClose: () => _(!1),
1002
- title: r.manage_income,
1011
+ ariaLabelClose: a.close_aria,
1012
+ isOpen: p,
1013
+ onClose: () => h(!1),
1014
+ title: s.manage_income,
1003
1015
  children: /* @__PURE__ */ e(ct, { forOverview: !0 })
1004
1016
  }
1005
1017
  )
1006
1018
  ] });
1007
- }), Le = 480, qo = E(({ onBackClick: t, sx: a }) => {
1008
- const i = ie(), { onEvent: s } = q(), { visibleAccounts: o } = Pe(), { budgets: r, common: n } = w(), { isInitialized: c, selectedAccounts: u, setDisplayedDate: d } = J(), {
1009
- alert: g,
1010
- dateRange: f,
1011
- isDataLoaded: h,
1012
- loadBudgetData: _,
1013
- setDateRange: p,
1014
- setAlert: y,
1015
- setTheme: b,
1016
- detailedBudgets: A
1017
- } = D(), { setDateRange: B } = ce(), { loadDateRangeCategoryTotals: v } = Z(), { isSmallTablet: x, isMobile: O, isSmallMobile: L } = ge(), I = x || O || L, [k, P] = l.useState(!1);
1018
- Fe({
1019
+ }), Re = 480, Ho = I(({ onBackClick: t, sx: n }) => {
1020
+ const c = se(), { onEvent: i } = X(), { visibleAccounts: a } = ke(), { budgets: s, common: o } = E(), { isInitialized: r, selectedAccounts: g, setDisplayedDate: d } = Z(), {
1021
+ alert: u,
1022
+ dateRange: y,
1023
+ isDataLoaded: p,
1024
+ loadBudgetData: h,
1025
+ setDateRange: _,
1026
+ setAlert: C,
1027
+ setTheme: x,
1028
+ detailedBudgets: v
1029
+ } = w(), { setDateRange: b } = ie(), { loadDateRangeCategoryTotals: S, loadMonthlyCategoryTotals: f } = Y(), { isSmallTablet: T, isMobile: N, isSmallMobile: R } = ue(), O = T || N || R, [z, k] = l.useState(!1);
1030
+ ze({
1019
1031
  widgetName: "BubbleBudgetsWidget",
1020
- isLoaded: h
1032
+ isLoaded: p
1021
1033
  }), l.useEffect(() => {
1022
- b(i), h || _().finally(() => {
1023
- s(G.BUDGETS_VIEW);
1034
+ x(c), p || h().finally(() => {
1035
+ i(G.BUDGETS_VIEW);
1024
1036
  });
1025
- }, []), l.useEffect(() => (p({ start: re(ae()), end: Ce(ae()) }), () => {
1026
- p({ start: re(ae()), end: Ce(ae()) });
1027
- }), [o]), l.useEffect(() => {
1028
- c && (d(f.start, f.end), v(u, f.start, f.end).finally(), B(f));
1029
- }, [c, u, f]);
1030
- const N = (V) => {
1031
- p({ start: V[0] || /* @__PURE__ */ new Date(), end: V[1] || /* @__PURE__ */ new Date() });
1032
- }, K = () => {
1033
- s(G.BUDGETS_CLICK_FILTER);
1034
- }, F = () => {
1035
- P(!0), s(G.BUDGETS_CLICK_ADD);
1037
+ }, []), l.useEffect(() => (_({ start: ae(oe()), end: Ce(oe()) }), () => {
1038
+ _({ start: ae(oe()), end: Ce(oe()) });
1039
+ }), [a]), l.useEffect(() => {
1040
+ r && (d(y.start, y.end), S(g, y.start, y.end).finally(), f(g).finally(), b(y));
1041
+ }, [r, g, y]);
1042
+ const pe = (F) => {
1043
+ _({ start: F[0] || /* @__PURE__ */ new Date(), end: F[1] || /* @__PURE__ */ new Date() });
1036
1044
  }, he = () => {
1037
- P(!1);
1038
- }, ne = () => {
1039
- P(!1);
1040
- }, fe = Xe(f.end, re(/* @__PURE__ */ new Date()));
1041
- return !c || !h ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ m(
1045
+ i(G.BUDGETS_CLICK_FILTER);
1046
+ }, te = () => {
1047
+ k(!0), i(G.BUDGETS_CLICK_ADD);
1048
+ }, be = () => {
1049
+ k(!1);
1050
+ }, fe = () => {
1051
+ k(!1);
1052
+ }, P = Ye(y.end, ae(/* @__PURE__ */ new Date()));
1053
+ return !r || !p ? /* @__PURE__ */ e(me, {}) : /* @__PURE__ */ m(
1042
1054
  lt,
1043
1055
  {
1044
1056
  actions: [
1045
1057
  {
1046
1058
  iconName: "add",
1047
- label: r.add_title,
1048
- onClick: F
1059
+ label: s.add_title,
1060
+ onClick: te
1049
1061
  }
1050
1062
  ],
1051
1063
  calendarActions: {
1052
- onRangeChanged: N,
1053
- shouldDisableNext: fe,
1064
+ onRangeChanged: pe,
1065
+ shouldDisableNext: P,
1054
1066
  shouldDisablePicker: !0
1055
1067
  },
1056
- onAccountsFilterClick: K,
1068
+ onAccountsFilterClick: he,
1057
1069
  onBackClick: t,
1058
- sx: a,
1059
- title: r.budgets_title,
1070
+ sx: n,
1071
+ title: s.budgets_title,
1060
1072
  children: [
1061
1073
  /* @__PURE__ */ m(
1062
- S,
1074
+ A,
1063
1075
  {
1064
- direction: I ? "column" : "row",
1076
+ direction: O ? "column" : "row",
1065
1077
  height: "100%",
1066
1078
  sx: { justifyContent: "center" },
1067
1079
  width: "100%",
1068
1080
  children: [
1069
- /* @__PURE__ */ e(S, { height: I ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1081
+ /* @__PURE__ */ e(A, { height: O ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
1070
1082
  He,
1071
1083
  {
1072
- createBudgetOnClick: F,
1073
- height: I ? 450 : 800,
1084
+ createBudgetOnClick: te,
1085
+ height: O ? 450 : 800,
1074
1086
  isDraggable: !0,
1075
- shouldShowZeroState: A.length === 0,
1076
- unavailableWidth: I ? 0 : Le
1087
+ shouldShowZeroState: v.length === 0,
1088
+ unavailableWidth: O ? 0 : Re
1077
1089
  }
1078
1090
  ) }),
1079
- A.length !== 0 && /* @__PURE__ */ m(
1080
- S,
1091
+ v.length !== 0 && /* @__PURE__ */ m(
1092
+ A,
1081
1093
  {
1082
1094
  gap: 24,
1083
1095
  height: "100%",
1084
1096
  sx: { mr: 24, mt: 48 },
1085
- width: I ? "100%" : Le,
1097
+ width: O ? "100%" : Re,
1086
1098
  children: [
1087
- /* @__PURE__ */ e(Wt, {}),
1088
- /* @__PURE__ */ e(Ut, {})
1099
+ /* @__PURE__ */ e(zt, {}),
1100
+ /* @__PURE__ */ e(jt, {})
1089
1101
  ]
1090
1102
  }
1091
1103
  )
1092
1104
  ]
1093
1105
  }
1094
1106
  ),
1095
- /* @__PURE__ */ e(Ft, {}),
1107
+ /* @__PURE__ */ e(Gt, {}),
1096
1108
  /* @__PURE__ */ e(
1097
1109
  $,
1098
1110
  {
1099
- ariaLabelClose: n.close_aria,
1100
- isOpen: k,
1101
- onClose: () => P(!1),
1102
- title: r.add_new_title,
1111
+ ariaLabelClose: o.close_aria,
1112
+ isOpen: z,
1113
+ onClose: () => k(!1),
1114
+ title: s.add_new_title,
1103
1115
  children: /* @__PURE__ */ e(
1104
- ze,
1116
+ Fe,
1105
1117
  {
1106
- onAddBudget: he,
1107
- onRecalculateBudgets: ne
1118
+ onAddBudget: be,
1119
+ onRecalculateBudgets: fe
1108
1120
  }
1109
1121
  )
1110
1122
  }
1111
1123
  ),
1112
1124
  /* @__PURE__ */ e(
1113
- Ne,
1125
+ xe,
1114
1126
  {
1115
1127
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
1116
1128
  autoHideDuration: 3500,
1117
1129
  onClose: () => {
1118
- y("");
1130
+ C("");
1119
1131
  },
1120
- open: !!g,
1132
+ open: !!u,
1121
1133
  children: /* @__PURE__ */ e(
1122
- ke,
1134
+ Se,
1123
1135
  {
1124
1136
  closeText: "",
1125
1137
  onClose: () => {
1126
- y("");
1138
+ C("");
1127
1139
  },
1128
1140
  severity: "success",
1129
1141
  variant: "filled",
1130
- children: g
1142
+ children: u
1131
1143
  }
1132
1144
  )
1133
1145
  }
@@ -1135,88 +1147,89 @@ const Rt = ({
1135
1147
  ]
1136
1148
  }
1137
1149
  );
1138
- }), Ht = ({
1150
+ }), Ft = ({
1139
1151
  budgetsCopy: t,
1140
- difference: a,
1141
- handleAddClick: i,
1142
- shouldShowZeroState: s
1152
+ difference: n,
1153
+ handleAddClick: c,
1154
+ shouldShowZeroState: i
1143
1155
  }) => {
1144
- const { availableHeight: o = 0 } = le(), r = l.useRef(null);
1156
+ const { availableHeight: a = 0 } = ce(), s = l.useRef(null);
1145
1157
  l.useEffect(() => {
1146
- o > 0 && r.current === null && (r.current = o);
1147
- }, [o]);
1148
- const n = l.useMemo(() => {
1149
- const c = r.current ?? o;
1150
- return c > 0 ? Math.round(Math.max(120, Math.min(450, c * 0.8))) - 40 : 450;
1151
- }, [o]);
1152
- return /* @__PURE__ */ m(S, { sx: { height: "100%", justifyContent: "space-between" }, children: [
1158
+ a > 0 && s.current === null && (s.current = a);
1159
+ }, [a]);
1160
+ const o = l.useMemo(() => {
1161
+ const r = s.current ?? a;
1162
+ return r > 0 ? Math.round(Math.max(120, Math.min(450, r * 0.8))) - 40 : 450;
1163
+ }, [a]);
1164
+ return /* @__PURE__ */ m(A, { sx: { height: "100%", justifyContent: "space-between" }, children: [
1153
1165
  /* @__PURE__ */ e(
1154
1166
  He,
1155
1167
  {
1156
- createBudgetOnClick: i,
1157
- height: n,
1168
+ createBudgetOnClick: c,
1169
+ height: o,
1158
1170
  isMiniWidget: !0,
1159
- shouldShowZeroState: s
1171
+ shouldShowZeroState: i
1160
1172
  }
1161
1173
  ),
1162
- !s && /* @__PURE__ */ m(W, { ml: 16, children: [
1163
- /* @__PURE__ */ e(C, { bold: !0, color: a < 0 ? "error.main" : "success.main", children: T(Math.abs(a), "0,0") }),
1164
- /* @__PURE__ */ e(C, { children: a < 0 ? t.overspent_in_budgets : t.left_in_budgets })
1174
+ !i && /* @__PURE__ */ m(V, { ml: 16, children: [
1175
+ /* @__PURE__ */ e(B, { bold: !0, color: n < 0 ? "error.main" : "success.main", children: D(Math.abs(n), "0,0") }),
1176
+ /* @__PURE__ */ e(B, { children: n < 0 ? t.overspent_in_budgets : t.left_in_budgets })
1165
1177
  ] })
1166
1178
  ] });
1167
- }, Kt = (t) => {
1168
- const a = ie(), { onEvent: i } = q(), { detailedBudgets: s, isDataLoaded: o, loadBudgetData: r, setTheme: n } = D(), { budgets: c, common: u } = w(), { isInitialized: d, selectedAccounts: g } = J(), { loadDateRangeCategoryTotals: f } = Z(), h = dt(), [_, p] = l.useState(!1);
1179
+ }, Ut = (t) => {
1180
+ const n = se(), { onEvent: c } = X(), { detailedBudgets: i, isDataLoaded: a, loadBudgetData: s, setTheme: o } = w(), { budgets: r, common: g } = E(), { isInitialized: d, selectedAccounts: u } = Z(), { loadDateRangeCategoryTotals: y, loadMonthlyCategoryTotals: p } = Y(), h = dt(), [_, C] = l.useState(!1);
1169
1181
  l.useEffect(() => {
1170
- o || r().finally();
1182
+ a || s().finally();
1171
1183
  }, []), l.useEffect(() => {
1172
- n(a);
1173
- }, [a]), l.useEffect(() => {
1174
- d && !o && f(
1175
- g,
1176
- re(/* @__PURE__ */ new Date()),
1184
+ o(n);
1185
+ }, [n]), l.useEffect(() => {
1186
+ d && !a && (y(
1187
+ u,
1188
+ ae(/* @__PURE__ */ new Date()),
1177
1189
  Ce(/* @__PURE__ */ new Date())
1178
- ).finally();
1179
- }, [d, g, o]);
1180
- const y = () => {
1181
- p(!0), i(G.BUDGETS_CLICK_ADD);
1182
- }, b = () => {
1183
- p(!1);
1184
- }, A = () => p(!1);
1185
- if (Fe({
1190
+ ).finally(), p(u).finally());
1191
+ }, [d, u, a]);
1192
+ const x = () => {
1193
+ C(!0), c(G.BUDGETS_CLICK_ADD);
1194
+ }, v = () => {
1195
+ C(!1);
1196
+ }, b = () => C(!1);
1197
+ if (ze({
1186
1198
  widgetName: "BubbleBudgetsMiniWidget",
1187
- isLoaded: o
1188
- }), !d || !o) return /* @__PURE__ */ e(me, {});
1189
- const B = s.length === 0;
1199
+ isLoaded: a
1200
+ }), !d || !a) return /* @__PURE__ */ e(me, {});
1201
+ const S = i.length === 0;
1190
1202
  return /* @__PURE__ */ m(
1191
- mt,
1203
+ gt,
1192
1204
  {
1193
1205
  contentStyles: { height: "calc(100% - 66px)", ":last-child": { pb: 0 } },
1194
- primaryCtaLabel: B ? c.get_started_cta : c.details_cta,
1206
+ primaryCtaLabel: S ? r.get_started_cta : r.details_cta,
1207
+ primaryCtaLabelAria: r.details_cta_aria,
1195
1208
  sx: { height: "100%" },
1196
- title: c.budgets_title,
1209
+ title: r.budgets_title,
1197
1210
  ...t,
1198
1211
  children: [
1199
1212
  /* @__PURE__ */ e(
1200
- Ht,
1213
+ Ft,
1201
1214
  {
1202
- budgetsCopy: c,
1215
+ budgetsCopy: r,
1203
1216
  difference: h,
1204
- handleAddClick: y,
1205
- shouldShowZeroState: B
1217
+ handleAddClick: x,
1218
+ shouldShowZeroState: S
1206
1219
  }
1207
1220
  ),
1208
1221
  /* @__PURE__ */ e(
1209
1222
  $,
1210
1223
  {
1211
- ariaLabelClose: u.close_aria,
1224
+ ariaLabelClose: g.close_aria,
1212
1225
  isOpen: _,
1213
- onClose: () => p(!1),
1214
- title: c.add_new_title,
1226
+ onClose: () => C(!1),
1227
+ title: r.add_new_title,
1215
1228
  children: /* @__PURE__ */ e(
1216
- ze,
1229
+ Fe,
1217
1230
  {
1218
- onAddBudget: b,
1219
- onRecalculateBudgets: A
1231
+ onAddBudget: v,
1232
+ onRecalculateBudgets: b
1220
1233
  }
1221
1234
  )
1222
1235
  }
@@ -1224,182 +1237,155 @@ const Rt = ({
1224
1237
  ]
1225
1238
  }
1226
1239
  );
1227
- }, Jo = E(Kt), Vt = ({ onClose: t, onViewHistory: a }) => {
1240
+ }, Vo = I(Ut), ne = {
1241
+ CANCEL_DELETE: "Cancel - Delete",
1242
+ END_SAVE: "End - Save",
1243
+ END_DELETE: "End - Delete",
1244
+ START_DELETE: "Start - Delete"
1245
+ }, Wt = ({
1246
+ onClose: t,
1247
+ onEvent: n,
1248
+ onViewHistory: c,
1249
+ transactionListProps: i
1250
+ }) => {
1228
1251
  const {
1229
- dateRange: i,
1230
- deleteBudget: s,
1231
- selectedBudget: o,
1232
- selectedSubBudget: r,
1233
- setSelectedBudget: n,
1234
- updateBudget: c
1235
- } = D(), { budgets: u, common: d } = w(), { isCopyLoaded: g, selectedAccountGuids: f } = J(), h = Ge(), { setFilter: _ } = Q(), [p, y] = l.useState(""), [b, A] = l.useState(null), [B, v] = l.useState(!1);
1252
+ alert: a,
1253
+ dateRange: s,
1254
+ deleteBudget: o,
1255
+ selectedBudget: r,
1256
+ selectedSubBudget: g,
1257
+ setAlert: d,
1258
+ setSelectedBudget: u,
1259
+ updateBudget: y
1260
+ } = w(), { budgets: p, common: h } = E(), { isCopyLoaded: _, selectedAccountGuids: C } = Z(), x = Ge(), { setFilter: v } = q(), [b, S] = l.useState(""), [f, T] = l.useState(null), [N, R] = l.useState(!1), O = l.useRef(!1);
1236
1261
  if (l.useEffect(() => {
1237
- !o || r || (y(`${o.amount}`), _({
1238
- accounts: f,
1239
- dateRange: i,
1240
- custom: ({ category_guid: X, top_level_category_guid: be }) => {
1241
- const { category_guid: De } = o;
1242
- return X === De || be === De;
1262
+ !r || g || (S(`${r.amount}`), v({
1263
+ accounts: C,
1264
+ dateRange: s,
1265
+ custom: ({ category_guid: P, top_level_category_guid: F }) => {
1266
+ const { category_guid: De } = r;
1267
+ return P === De || F === De;
1243
1268
  },
1244
1269
  showSplits: !0
1245
- }), v(!0));
1246
- }, [o]), !g) return /* @__PURE__ */ e(me, {});
1247
- if (!o) return null;
1248
- const x = () => {
1249
- y(""), A(null), v(!1), setTimeout(() => {
1250
- n(void 0), t?.();
1270
+ }), R(!0));
1271
+ }, [r]), !_) return /* @__PURE__ */ e(me, {});
1272
+ if (!r) return null;
1273
+ const z = () => {
1274
+ S(""), T(null), R(!1), setTimeout(() => {
1275
+ u(void 0), t?.();
1251
1276
  }, 250);
1252
- }, O = () => {
1253
- y(o.amount ? `${o.amount}` : ""), A(null);
1254
- }, L = async () => {
1255
- b === "edit" && (await c({
1256
- ...o,
1257
- amount: Number(p)
1258
- }), A(null)), b === "delete" && (await s(o.guid), x());
1259
- }, I = o.transaction_total ?? 0, k = o.amount ?? 0, P = Math.max(0, k - I), N = k > 0 ? Math.min(100, I / k * 100) : 0, K = {
1260
- off: {
1261
- iconColor: "error",
1262
- iconName: "error",
1263
- statusName: u.status_off_track
1264
- },
1265
- on: {
1266
- iconColor: "success",
1267
- iconName: "check_circle",
1268
- statusName: u.status_on_track
1269
- },
1270
- near: {
1271
- iconColor: "warning",
1272
- iconName: "info",
1273
- statusName: u.status_near
1277
+ }, k = () => {
1278
+ f === "delete" && n?.(ne.CANCEL_DELETE, b), S(r.amount ? `${r.amount}` : ""), T(null);
1279
+ }, pe = async () => {
1280
+ if (f === "edit") {
1281
+ if (O.current) return;
1282
+ O.current = !0, await y({
1283
+ ...r,
1284
+ amount: Number(b)
1285
+ }), n?.(ne.END_SAVE, b), d(
1286
+ L(p.alert_budget_updated, r.category.name)
1287
+ ), T(null), O.current = !1;
1274
1288
  }
1275
- };
1276
- let F = K.on;
1277
- N >= 100 ? F = K.off : N >= 50 && (F = K.near);
1278
- const { statusName: he, iconColor: ne, iconName: fe } = F, V = (X, be) => M(X, /* @__PURE__ */ e("b", { children: be }));
1289
+ f === "delete" && (await o(r.guid), n?.(ne.END_DELETE, b), z());
1290
+ }, { remainingAmount: he, spentPercentage: te, iconColor: be } = ut(
1291
+ r.transaction_total ?? 0,
1292
+ r.amount ?? 0
1293
+ ), fe = (P, F) => L(P, /* @__PURE__ */ e("b", { children: F }));
1279
1294
  return /* @__PURE__ */ m(l.Fragment, { children: [
1280
1295
  /* @__PURE__ */ m(
1281
1296
  $,
1282
1297
  {
1283
- ariaLabelClose: d.close_aria,
1298
+ ariaLabelClose: h.close_aria,
1284
1299
  footerStyles: {
1285
1300
  px: 24,
1286
1301
  py: 16
1287
1302
  },
1288
- isOpen: B,
1289
- onClose: x,
1290
- onPrimaryAction: () => A(
1303
+ isOpen: N,
1304
+ onClose: z,
1305
+ onPrimaryAction: () => T(
1291
1306
  "edit"
1292
1307
  /* EDIT */
1293
1308
  ),
1294
- onSecondaryAction: () => A(
1295
- "delete"
1296
- /* DELETE */
1297
- ),
1298
- primaryText: u.details_edit_button,
1309
+ onSecondaryAction: () => {
1310
+ n?.(ne.START_DELETE, b), T(
1311
+ "delete"
1312
+ /* DELETE */
1313
+ );
1314
+ },
1315
+ primaryText: p.details_edit_button,
1299
1316
  secondaryColor: "error",
1300
- secondaryText: u.details_delete_button,
1301
- title: u.details_title,
1317
+ secondaryText: p.details_delete_button,
1318
+ sx: {
1319
+ "& .list-wrapper": {
1320
+ pr: 24
1321
+ }
1322
+ },
1323
+ title: L(p.details_type_title, r.category.name),
1302
1324
  children: [
1303
- /* @__PURE__ */ m(W, { sx: { bgcolor: "background.paper" }, children: [
1304
- /* @__PURE__ */ e(
1305
- we,
1306
- {
1307
- subheader: /* @__PURE__ */ m(S, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1308
- /* @__PURE__ */ e(gt, { color: ne, fill: !0, name: fe }),
1309
- /* @__PURE__ */ e(C, { color: "text.secondary", uppercase: !0, variant: "body2", children: he })
1310
- ] }),
1311
- sx: {
1312
- alignItems: "flex-start",
1313
- pb: 8,
1314
- pt: 24,
1315
- px: 24
1316
- },
1317
- title: /* @__PURE__ */ e(Se, { children: M(
1318
- u.details_type_title,
1319
- o.category.name
1320
- ) })
1321
- }
1322
- ),
1323
- /* @__PURE__ */ e(
1324
- ht,
1325
- {
1326
- amount: T(o.amount, "0,0.00"),
1327
- completeColor: `${ne}.main`,
1328
- icon: /* @__PURE__ */ e(
1329
- H,
1330
- {
1331
- categoryGuid: o.category.guid,
1332
- size: 44,
1333
- sx: {
1334
- bgcolor: et(Ee(o.category.guid, h), 0.15),
1335
- border: `1px solid ${Ee(o.category.guid, h)}`,
1336
- color: "text.primary"
1337
- }
1325
+ /* @__PURE__ */ e(
1326
+ nt,
1327
+ {
1328
+ amount: r.amount,
1329
+ icon: /* @__PURE__ */ e(
1330
+ H,
1331
+ {
1332
+ categoryGuid: r.category.guid,
1333
+ size: 44,
1334
+ sx: {
1335
+ bgcolor: Qe(we(r.category.guid, x), 0.15),
1336
+ border: `1px solid ${we(r.category.guid, x)}`,
1337
+ color: "text.primary"
1338
1338
  }
1339
- ),
1340
- label: V(
1341
- u.spent_label,
1342
- ft(new Date(o.start_date * 1e3), { month: "short" })
1343
- ),
1344
- leftLabel: M(u.percent_spent, N.toFixed()),
1345
- percentComplete: N,
1346
- rightLabel: M(
1347
- u.balance_left,
1348
- T(P, "0,0.00")
1349
- )
1350
- }
1351
- ),
1352
- /* @__PURE__ */ m(
1353
- S,
1354
- {
1355
- sx: {
1356
- alignItems: "center",
1357
- borderBottomColor: "divider",
1358
- borderBottomStyle: "solid",
1359
- borderBottomWidth: 1,
1360
- flexDirection: "row",
1361
- justifyContent: "space-between",
1362
- pb: 4,
1363
- pt: 16,
1364
- px: 24
1365
- },
1366
- children: [
1367
- /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: u.details_transactions_tab }),
1368
- a && /* @__PURE__ */ e(xe, { endIcon: /* @__PURE__ */ e(pt, {}), onClick: a, sx: { height: 28 }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "body2", children: d.view_history }) })
1369
- ]
1370
- }
1371
- )
1372
- ] }),
1373
- /* @__PURE__ */ e(Ae, {})
1339
+ }
1340
+ ),
1341
+ iconColor: be,
1342
+ onViewHistory: c,
1343
+ remainingAmount: he,
1344
+ spentPercentage: te,
1345
+ startDate: (s.start.getTime() ?? 0) / 1e3,
1346
+ totalTransaction: r.transaction_total
1347
+ }
1348
+ ),
1349
+ /* @__PURE__ */ e(Ae, { ...i }),
1350
+ a && /* @__PURE__ */ e(
1351
+ xe,
1352
+ {
1353
+ anchorOrigin: { horizontal: "right", vertical: "bottom" },
1354
+ autoHideDuration: 3500,
1355
+ onClose: () => d(""),
1356
+ open: !!a,
1357
+ children: /* @__PURE__ */ e(Se, { closeText: "", onClose: () => d(""), severity: "success", variant: "filled", children: a })
1358
+ }
1359
+ )
1374
1360
  ]
1375
1361
  }
1376
1362
  ),
1377
- b && /* @__PURE__ */ e(
1378
- ut,
1363
+ f && /* @__PURE__ */ e(
1364
+ mt,
1379
1365
  {
1380
- closeAriaLabel: d.close_aria,
1381
- content: V(
1382
- u[b === "edit" ? "edit_budget_content" : "delete_description"],
1383
- o.category.name
1366
+ closeAriaLabel: h.close_aria,
1367
+ content: fe(
1368
+ p[f === "edit" ? "edit_budget_content" : "delete_description"],
1369
+ r.category.name
1384
1370
  ),
1385
- handleInputChange: (X) => y(X.toString()),
1386
- handleModalClose: O,
1387
- handlePrimaryAction: L,
1388
- handleSecondaryAction: O,
1389
- inputLabel: b === "edit" ? u.details_edit_title : "",
1390
- inputValue: p,
1371
+ handleInputChange: (P) => S(P.toString()),
1372
+ handleModalClose: k,
1373
+ handlePrimaryAction: pe,
1374
+ handleSecondaryAction: k,
1375
+ inputLabel: f === "edit" ? p.details_edit_title : "",
1376
+ inputValue: b,
1391
1377
  isOpen: !0,
1392
- primaryColor: b === "edit" ? "primary" : "error",
1393
- primaryText: u[b === "edit" ? "add_save_button" : "details_delete_button"],
1394
- secondaryColor: b === "edit" ? "primary" : "inherit",
1395
- secondaryText: d.cancel_button,
1396
- title: u[b === "edit" ? "details_edit_title" : "delete_title"]
1378
+ primaryColor: f === "edit" ? "primary" : "error",
1379
+ primaryText: p[f === "edit" ? "add_save_button" : "details_delete_button"],
1380
+ secondaryColor: f === "edit" ? "primary" : "inherit",
1381
+ secondaryText: h.cancel_button,
1382
+ title: p[f === "edit" ? "details_edit_title" : "delete_title"]
1397
1383
  }
1398
1384
  )
1399
1385
  ] });
1400
- }, Qo = E(Vt);
1386
+ }, Ko = I(Wt);
1401
1387
  export {
1402
- Jo as BubbleBudgetsMiniWidget,
1403
- qo as BubbleBudgetsWidget,
1404
- Qo as BudgetDetailsDrawerV2
1388
+ Vo as BubbleBudgetsMiniWidget,
1389
+ Ho as BubbleBudgetsWidget,
1390
+ Ko as BudgetDetailsDrawerV2
1405
1391
  };