@zeniai/web-app-ui 5.0.98-qa → 5.0.99-qa

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 (117) hide show
  1. package/dist/assets/AddressRoutes-cXow29D-.js +1 -0
  2. package/dist/assets/{AddressScreen-CWbRsmbp.js → AddressScreen-B_5E3MmM.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-ByJaMYdf.js → AiCfoScreen-piPA6RFX.js} +5 -5
  4. package/dist/assets/{BillPayApprovalRoutes-B3i4J9uo.js → BillPayApprovalRoutes-diXVz4nM.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-6NMIykXi.js → BillPayRoutes-BoyMv8RB.js} +9 -9
  6. package/dist/assets/{BusinessVerificationPageScreen-CKWDQbki.js → BusinessVerificationPageScreen-BVcSTjFx.js} +2 -2
  7. package/dist/assets/ChargeCardRoutes-DPqsyA37.js +71 -0
  8. package/dist/assets/{CompanyPassportScreen-gi1zQDQy.js → CompanyPassportScreen-CHpXpJn6.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-tshMxKRH.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-87drfziv.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-3ZdetMQC.js → CustomerOnboardingRoutes-BxAfG8_3.js} +4 -4
  12. package/dist/assets/{DashboardRoutes-B4iMdus4.js → DashboardRoutes-BGTJN2Hc.js} +4 -4
  13. package/dist/assets/{DefaultTenantHome-CmtmKMal.js → DefaultTenantHome-UMJXG41u.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-i5P7thz2.js → DomesticWireDetailScreen-Dnmn2DLO.js} +3 -3
  15. package/dist/assets/DrawerScreen-BjlccLEt.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-CWwGc_Bt.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-TQM73kS9.js → ExpenseAutomationRoutes-V3pQ54ba.js} +3 -3
  18. package/dist/assets/{FeaturePreviewScreen-C1MJa7gv.js → FeaturePreviewScreen-CENCPCVN.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-B7ampOQu.js → HubSpotOAuthCallbackScreen-BiBYkGaM.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-NEjpbABr.js → MagicLinkRoutes-B4aCWmBq.js} +9 -9
  21. package/dist/assets/MagicLinkSignInScreen-LjEIpxnr.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-n526oWrk.js → MobileAppDrawer-eEi9_FXN.js} +1 -1
  23. package/dist/assets/NotFoundScreen-DMqI-4f-.js +1 -0
  24. package/dist/assets/{NotificationRoutes-VqdMKuyJ.js → NotificationRoutes-BM8KwKeB.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-BB710FHj.js → OAuthConsentScreen-BPjvOt6Y.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-ZxQLGrNQ.js → PandLWithForecastRoutes-b1ayGBjn.js} +1 -1
  27. package/dist/assets/PeopleRoutes-D1MYRvV3.js +22 -0
  28. package/dist/assets/PerformanceRoutes-C4ZHgjOU.js +1 -0
  29. package/dist/assets/{Preview-D0x6u8Nz.js → Preview-CnRRxuBY.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-DvvmYU71.js → QBOConnectionScreen-hggnN49Z.js} +1 -1
  31. package/dist/assets/ReferralListScreen-C95kfC0i.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-BxZSJ2YX.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DqylTjul.js → ReimbursementApprovalRuleDetailScreen-QJgEZUII.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-Ck-7Lo_C.js → ReimbursementRoutes-iqf5jjbn.js} +4 -4
  35. package/dist/assets/{ReportsRoutes-Cmht3lbb.js → ReportsRoutes-6i8X1ifi.js} +1 -1
  36. package/dist/assets/RewardsRoutes-DIFQ4eNe.js +1 -0
  37. package/dist/assets/{ScreenRoutes-CA8fUnaP.js → ScreenRoutes-CImZTqLK.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-Dni4ADoP.js → SettingsRoutes-DiImRVlM.js} +8 -8
  39. package/dist/assets/{SetupPagesScreen-_IKYoHXM.js → SetupPagesScreen-uBSRBD3f.js} +5 -5
  40. package/dist/assets/{SignInScreen-RaghIVhM.js → SignInScreen-WrVGlb_5.js} +1 -1
  41. package/dist/assets/SignOutScreen-D6xLc_Ad.js +9 -0
  42. package/dist/assets/{TaskListScreen-D8kgWT4b.js → TaskListScreen-BV8rjW4r.js} +2 -2
  43. package/dist/assets/{TaskRoutes-Cz1ZyHoB.js → TaskRoutes-BJvDn6R0.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-63tKIp6E.js → TransactionDetailRoutes-DHG610mN.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-DioDP0gW.js → TransactionDetailScreen-DwW_XiLL.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-Dtm4HNMN.js → TransactionListRoutes-Cgm0DlO0.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-BhRZ97cm.js → TreasuryRoutes-BOB1Hsx4.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-ODAB2xhO.js → VendorsRoutes-Qrz3O9YE.js} +1 -1
  49. package/dist/assets/WiseConfirmationScreen-BOj-cvtu.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-RdAjME8K.js → ZeniAccountRoutes--J0O-zAf.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-BKZPFNf1.js +9 -0
  52. package/dist/assets/{accountMappingHelper-pKhoHYRw.js → accountMappingHelper-BlOCWlFe.js} +1 -1
  53. package/dist/assets/{analytics-D310XSjQ.js → analytics-BwB4OxqF.js} +1 -1
  54. package/dist/assets/{analyticsHelper-CnXSrEd_.js → analyticsHelper-CwLhXR8O.js} +1 -1
  55. package/dist/assets/{core-Fwwp8hop.js → core-C0jlpEOv.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-DaWuthXc.js → decodeURIComponentSafe-DxEB-kYT.js} +1 -1
  57. package/dist/assets/{dnd-B_nt-Uf4.js → dnd-BQyDclsp.js} +1 -1
  58. package/dist/assets/{empty-CLLWe6m6.js → empty-CuwrcYLl.js} +1 -1
  59. package/dist/assets/{empty-BOxndxwD.js → empty-rQJasWmn.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Dqc7f16l.js → emptyVideoElement-19-80Uux.js} +1 -1
  61. package/dist/assets/{epic-rmzsjdl7.js → epic-DbgmAKxp.js} +1 -1
  62. package/dist/assets/getLocaleForTenant-DtXpovnb.js +1 -0
  63. package/dist/assets/{index-B-WtQiD1.js → index-0-yV8w8w.js} +2 -2
  64. package/dist/assets/{index-CfQpPMgv.js → index-C3r_VLlw.js} +1 -1
  65. package/dist/assets/{index-D6xVpTbl.js → index-CMkYtCT8.js} +1 -1
  66. package/dist/assets/{index-B6b9dX2I.js → index-DVo4Z0nu.js} +1 -1
  67. package/dist/assets/{index-DkSJ4_OZ.js → index-DebUSch4.js} +1 -1
  68. package/dist/assets/{index-py9Wsjt2.js → index-Dv5w3h7p.js} +1 -1
  69. package/dist/assets/{index-CG4cMKGN.js → index-h6OO0yPc.js} +1 -1
  70. package/dist/assets/{index-Sm9Ycasn.js → index-rYzTwTWr.js} +13124 -13094
  71. package/dist/assets/{lexical-D4DqnnDh.js → lexical-Dyz9C9bA.js} +1 -1
  72. package/dist/assets/{liveblocks-D1TxH59e.js → liveblocks-MDXlbwyz.js} +1 -1
  73. package/dist/assets/{lottie-BGeomX3N.js → lottie-BppXIe9P.js} +1 -1
  74. package/dist/assets/{mui-Dar_oGjJ.js → mui-BhC7MwUp.js} +1 -1
  75. package/dist/assets/{pathToGoBack-CFMq10u8.js → pathToGoBack-DxHHYpbP.js} +1 -1
  76. package/dist/assets/{pdf-BftxTBXg.js → pdf-C0iGSR-p.js} +4 -4
  77. package/dist/assets/{pdf-lib-oQPUkPP1.js → pdf-lib-CipnbJ-V.js} +1 -1
  78. package/dist/assets/{plaid-BGhwh8RZ.js → plaid-Cen9BFHL.js} +1 -1
  79. package/dist/assets/{pusher-B0sMSaHR.js → pusher-v3d_Hsmx.js} +1 -1
  80. package/dist/assets/{react-qOh0QNtz.js → react-B8JQ_FaW.js} +1 -1
  81. package/dist/assets/{react-BG3-H3hY.js → react-De5emeEF.js} +1 -1
  82. package/dist/assets/{react-BaMiVVMt.js → react-DrbwoyUO.js} +1 -1
  83. package/dist/assets/{react-sGqG8JxF.js → react-Gq9PWwg1.js} +1 -1
  84. package/dist/assets/{react-C_Slx_Fd.js → react-W49A4zcQ.js} +1 -1
  85. package/dist/assets/{react-DrseuhQt.js → react-vhOkHd2J.js} +1 -1
  86. package/dist/assets/{recharts-DuOI9Nsb.js → recharts-doG6MzQe.js} +1 -1
  87. package/dist/assets/{routePaths-Pqm-PNC8.js → routePaths-DyDRwNtO.js} +1 -1
  88. package/dist/assets/{sentry-5pTQe3BK.js → sentry-P6IGH2JA.js} +1 -1
  89. package/dist/assets/{url-CfkU6Gnm.js → url-BcxaTbQe.js} +1 -1
  90. package/dist/assets/{url-DFizNyrO.js → url-DnJY0BY-.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CUpKl9RP.js → useAiCfoDashboardSuggestedQuestionsChips-D0HxzDgV.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-BSH7JN4M.js +1 -0
  93. package/dist/assets/{useDeviceId-9VsPbMb7.js → useDeviceId-BqqN1f4l.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-ELLLToSA.js → useInitialThreadRequest-DnjrXC7Q.js} +1 -1
  95. package/dist/assets/{utils-3_hFkWEq.js → utils-2XzATZuY.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-Dk7__fUW.js → withTransactionSidePanel-DtKkPyJR.js} +3 -3
  97. package/dist/assets/{zeni-epic-state-i1VxNGkd.js → zeni-epic-state-CZVxf74e.js} +3 -3
  98. package/dist/index.html +1 -1
  99. package/package.json +2 -2
  100. package/dist/assets/AddressRoutes-CZnINFd1.js +0 -1
  101. package/dist/assets/ChargeCardRoutes-CuET-m0-.js +0 -71
  102. package/dist/assets/ConnectionAuthScreen-De-vuICZ.js +0 -11
  103. package/dist/assets/CustomerOnboardingAuthScreen-Cm9qzjcw.js +0 -1
  104. package/dist/assets/DrawerScreen-8pLwC76h.js +0 -1
  105. package/dist/assets/EntityDetailRoutes-Dr3SOu7N.js +0 -1
  106. package/dist/assets/MagicLinkSignInScreen-CosgA8eP.js +0 -12
  107. package/dist/assets/NotFoundScreen-Brpo5hIh.js +0 -1
  108. package/dist/assets/PeopleRoutes-CAPFlXeC.js +0 -22
  109. package/dist/assets/PerformanceRoutes-DRea1YUE.js +0 -1
  110. package/dist/assets/ReferralListScreen-D8LbwXaw.js +0 -5
  111. package/dist/assets/ReimbursementApprovalRoutes-DRpummvD.js +0 -1
  112. package/dist/assets/RewardsRoutes-PWORm-gP.js +0 -1
  113. package/dist/assets/SignOutScreen-CNkJNt7x.js +0 -9
  114. package/dist/assets/WiseConfirmationScreen-BXqYXseQ.js +0 -12
  115. package/dist/assets/ZeniAccountStatementScreen-Dh6yAFkp.js +0 -9
  116. package/dist/assets/getLocaleForTenant-B-vHrKHL.js +0 -1
  117. package/dist/assets/useAskAiCfoHostNavButtonProps-B40bGqEV.js +0 -1
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-Sm9Ycasn.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-5pTQe3BK.js"><link rel="modulepreload" crossorigin href="/assets/core-Fwwp8hop.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-i1VxNGkd.js"><link rel="modulepreload" crossorigin href="/assets/mui-Dar_oGjJ.js"><link rel="modulepreload" crossorigin href="/assets/analytics-D310XSjQ.js"><link rel="modulepreload" crossorigin href="/assets/utils-3_hFkWEq.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate"><meta http-equiv="expires" content="0"><meta http-equiv="pragma" content="no-cache"><meta charset="UTF-8"><link rel="icon" type="image/svg+xml" href="/assets/favicon-D56XvgAH.ico"><meta name="ROBOTS" content="NOINDEX, NOFOLLOW"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"><meta name="theme-color" content="#000000"><meta name="description" content="Zeni - Modern Finance Team For Startups"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&family=Manrope:wght@200..800&display=swap"><link rel="apple-touch-icon" href="/assets/logo192-CqcTe-t4.png"><link rel="manifest" href="/assets/manifest-icT4lOF5.json"><title>Zeni - Modern Finance Team For Startups</title><script src="/theme-detect.js"></script><style>:root{--logo-color-from:#D4DCDD;--logo-color-to:#E9F0F0;--bar-color-from:#E9F0F0;--bar-color-to:#D4DCDD;--sidebar-bg:#F3F7F7;--main-bg:#FAFCFC;--divider-color:#D4DCDD}html{background-color:#f3f7f7}html[data-theme=dark]{background-color:#1b1c1c;--logo-color-from:#545B5C;--logo-color-to:#3E4343;--bar-color-from:#3E4343;--bar-color-to:#545B5C;--sidebar-bg:#1B1C1C;--main-bg:#202222;--divider-color:#545B5C}.app-shell-loader{position:fixed;inset:0;display:flex;background-color:var(--sidebar-bg);z-index:9999}.app-shell-sidebar{width:210px;flex-shrink:0;background-color:var(--sidebar-bg);padding:16px 16px 0;display:flex;flex-direction:column;gap:36px;border-right:1px solid var(--divider-color);box-sizing:border-box}.app-shell-sidebar-group{display:flex;flex-direction:column;gap:10px}.app-shell-bar{height:10px;border-radius:5px;background-color:var(--bar-color-from);animation:app-shell-bar-shimmer 1.6s linear infinite}.app-shell-navbar{height:56px;display:flex;flex-direction:row;border-bottom:1px solid var(--divider-color);padding:0 32px;align-items:center;justify-content:space-between;box-sizing:border-box}@keyframes app-shell-bar-shimmer{0%,100%{background-color:var(--bar-color-from)}50%{background-color:var(--bar-color-to)}}.app-shell-main{flex:1;background-color:var(--main-bg)}.app-shell-logo{display:inline-flex;width:100%;height:calc(100vh - 56px);justify-content:center;align-items:center}.app-shell-logo svg path{animation:app-shell-color-cycle 1.6s linear infinite}@keyframes app-shell-color-cycle{0%,100%{fill:var(--logo-color-from)}50%{fill:var(--logo-color-to)}}@media (max-width:899px){.app-shell-sidebar{display:none}.app-shell-main{background-color:var(--sidebar-bg)}}</style><noscript><style>.app-shell-loader{display:none}</style></noscript><script async type="module" crossorigin src="/assets/index-rYzTwTWr.js"></script><link rel="modulepreload" crossorigin href="/assets/sentry-P6IGH2JA.js"><link rel="modulepreload" crossorigin href="/assets/core-C0jlpEOv.js"><link rel="modulepreload" crossorigin href="/assets/zeni-epic-state-CZVxf74e.js"><link rel="modulepreload" crossorigin href="/assets/mui-BhC7MwUp.js"><link rel="modulepreload" crossorigin href="/assets/analytics-BwB4OxqF.js"><link rel="modulepreload" crossorigin href="/assets/utils-2XzATZuY.js"><link rel="stylesheet" crossorigin href="/assets/index-Bc34frN_.css"></head><body style="margin:0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div class="app-shell-loader" id="app-shell-loader"><div class="app-shell-sidebar"><div class="app-shell-sidebar-group"><div class="app-shell-bar zeni-logo" style="width:96px;height:20px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:78px;height:16px"></div><div class="app-shell-bar" style="width:46px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:110px;height:16px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div></div><div class="app-shell-sidebar-group"><div class="app-shell-bar" style="width:55px;height:12px"></div><div class="app-shell-bar" style="width:84px;height:16px"></div><div class="app-shell-bar" style="width:64px;height:16px"></div></div></div><div class="app-shell-main"><div class="app-shell-navbar"><div class="app-shell-bar" style="width:106px;height:27px"></div><div class="app-shell-bar" style="width:111px;height:32px"></div></div><div class="app-shell-logo"><svg width="96" height="96" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.768 0.0270284C16.571 -0.055168 16.348 0.0572476 16.2913 0.267574C16.2713 0.342517 16.2489 0.417461 16.2253 0.491196C16.0094 1.15723 15.6459 1.76645 15.148 2.27776C14.3056 3.14203 13.1847 3.61949 11.9918 3.6207H11.9883C10.7978 3.6207 9.67689 3.14565 8.83445 2.2838C8.33653 1.7737 7.97077 1.16448 7.75367 0.499657C7.73007 0.425922 7.70765 0.350979 7.68641 0.276035C7.62978 0.065709 7.40678 -0.0454978 7.20974 0.0366985C6.05463 0.522624 4.98565 1.17899 4.0323 1.97436C3.91195 2.07468 3.87301 2.24512 3.93083 2.39259C3.9792 2.51589 4.03112 2.63797 4.08539 2.75764C4.51133 3.70894 5.10364 4.5853 5.84815 5.34682C7.48937 7.0246 9.66863 7.9493 11.9871 7.9493H11.9954C14.3162 7.94689 16.4978 7.01855 18.1379 5.33595C18.8812 4.57321 19.4711 3.69564 19.8959 2.74434C19.9502 2.62347 20.0009 2.50138 20.0493 2.37809C20.1071 2.23062 20.0682 2.06018 19.9478 1.95985C18.9933 1.16569 17.9231 0.511745 16.768 0.0270284Z"/><path d="M19.9102 21.2422C19.4843 20.2933 18.8931 19.4194 18.151 18.6603C16.5086 16.9801 14.3223 16.053 12.0038 16.0578C8.50304 16.0614 5.48371 18.1961 4.11031 21.2603C4.05722 21.38 4.0053 21.5009 3.95575 21.623C3.89675 21.7704 3.93569 21.9421 4.05722 22.0436C5.01175 22.8366 6.08073 23.4893 7.23466 23.9728C7.4317 24.055 7.65352 23.9438 7.71134 23.7335C7.73139 23.6573 7.75381 23.5836 7.77859 23.5086C8.37207 21.6979 10.0416 20.3888 12.0073 20.3864H12.012C13.2025 20.3864 14.3234 20.8614 15.1659 21.7233C15.6626 22.231 16.026 22.8378 16.2431 23.5002C16.2679 23.5739 16.2903 23.6489 16.3104 23.7238C16.3682 23.9341 16.59 24.0453 16.787 23.9619C17.9422 23.476 19.01 22.8209 19.9633 22.0255C20.0837 21.9252 20.1226 21.7535 20.0648 21.606C20.0164 21.4828 19.9645 21.3631 19.9102 21.2422Z"/><path d="M0.132148 10.1666C0.158105 9.98769 0.305591 9.85352 0.482575 9.85352L23.5093 9.81726C23.6863 9.81726 23.8338 9.95022 23.8609 10.1291C23.9518 10.7347 23.999 11.3548 23.999 11.9858C24.0001 12.6131 23.9541 13.2284 23.8668 13.8292C23.8408 14.0081 23.6934 14.1422 23.5164 14.1422L0.489654 14.1773C0.312671 14.1773 0.165185 14.0443 0.138047 13.8654C0.0471956 13.2598 0 12.6397 0 12.0088C0 11.3826 0.0448358 10.7673 0.132148 10.1666Z"/></svg></div></div></div></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/web-app-ui",
3
- "version": "5.0.98-qa",
3
+ "version": "5.0.99-qa",
4
4
  "files": [
5
5
  "dist/**/*"
6
6
  ],
@@ -29,7 +29,7 @@
29
29
  "@stripe/stripe-js": "^4.4.0",
30
30
  "@zeniai/client-analytics": "2.0.14",
31
31
  "@zeniai/client-epic-state": "5.0.53",
32
- "@zeniai/web-components": "4.1.7",
32
+ "@zeniai/web-components": "4.1.8",
33
33
  "color": "3.1.3",
34
34
  "cross-fetch": "^4.0.0",
35
35
  "crypto-js": "4.2.0",
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-D1TxH59e.js";import{A as d}from"./AddressScreen-CWbRsmbp.js";import i from"./NotFoundScreen-Brpo5hIh.js";import"./sentry-5pTQe3BK.js";import{o as s,p as r}from"./core-Fwwp8hop.js";import"./zeni-epic-state-i1VxNGkd.js";import"./recharts-DuOI9Nsb.js";import"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="4677917c-1bd8-4b00-9bd0-d308073173a3",t._sentryDebugIdIdentifier="sentry-dbid-4677917c-1bd8-4b00-9bd0-d308073173a3")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
@@ -1,71 +0,0 @@
1
- import{j as s}from"./liveblocks-D1TxH59e.js";import{h as le,i as ca,u as ue,j as y,g as ge,n as pe,N as ga,s as ut,o as Wt,p as te}from"./core-Fwwp8hop.js";import{eP as ce,bs as Ue,Pa as ka,eY as be,eZ as ye,e_ as Se,fT as Ge,cs as ze,Pb as Ye,Pc as Ma,tq as ba,jL as ya,Pd as Sa,gQ as oa,zW as Xe,zY as $a,zZ as Ga,jB as mt,Pe as Ze,zK as Ct,Pf as qt,Pg as Qt,zN as Da,Ph as Jt,Nz as _a,rC as pt,zT as za,g$ as Xt,Pi as ht,Pj as Ke,bq as en,Pk as an,fE as Pa,fD as wa,Ar as tn,fC as Ta,Nf as nn,Pl as ft,cl as gt,cM as rn,Ny as da,B1 as sn,Pm as tt,AD as Fa,Pn as bt,B2 as on,N_ as cn,B3 as dn,BZ as ln,sM as un,BT as mn,Ac as yt,A5 as Cn,Po as pn,fV as hn,Al as St,Ap as It,fU as fn,Pp as gn,AP as At,Pq as bn,Pr as yn,Ps as Sn,An as Et,A8 as kt,zQ as Dt,Ah as _t,Af as Pt,Aj as In,zX as nt,Pt as wt,Pu as va,AA as Ia,Ke as Tt,cN as Ya,Pv as An,Pw as En,Px as kn,Py as Dn,Ax as Na,AW as _n,AS as Pn,At as wn,AU as Tn,AK as Fn,AM as vn,Pz as Ft,B0 as vt,HD as xn,PA as Bn,PB as Ln,PC as Rn,PD as xt,PE as Un,Bn as On,AC as Bt,Aw as ia,AB as jn,PF as Nn,PG as Vn,zH as Hn,PH as Lt,PI as Rt,PJ as Mn,zJ as $n,zI as rt,PK as Gn,PL as zn,PM as Yn,Ka as Zn,PN as Za,PO as Kn,wi as Ut,kj as Wn,gR as qn,Bs as Qn,PP as Ot,PQ as Jn,Bt as Xn,PR as er,de as ar,tk as tr,Bi as nr,Bc as Re,bt as rr,bF as sr,cx as or,bG as ir,Jn as cr}from"./zeni-epic-state-i1VxNGkd.js";import{z as X,k as je,$ as se,I as Y,q as la,c3 as xa,ce as dr,p as ve,cf as lr,cg as ur,J as ua,aN as Fe,m as fe,bm as Ka,ch as mr,s as ma,i as Ba,h as Wa,c as Q,O as qa,ci as Cr,Y as jt,aq as Qa,by as Qe,cj as Va,ck as pr,H as Ja,a7 as hr,cl as fr,at as Nt,a2 as Ha,U as Vt,e as Ht,cm as gr,cn as br,co as yr,cp as Sr,cq as Ir,cr as Ar,o as Aa,cs as Er,ct as kr,cu as Ua,F as Dr,cv as _r,cw as Pr,cx as wr,cy as Tr,cz as Fr,a9 as vr}from"./index-Sm9Ycasn.js";import{n as _e,D as Mt,S as xr}from"./mui-Dar_oGjJ.js";import{a as c}from"./sentry-5pTQe3BK.js";import{g as Ce,a as Ca,b as $t,c as Ie,d as Ae,e as Oe,f as Ne,A as Br,h as Xa,P as Lr,i as et,s as Je,j as Gt,k as Me,l as zt,m as Rr,n as Yt,p as Ur,S as st}from"./SetupPagesScreen-_IKYoHXM.js";import{u as Or}from"./useInitialThreadRequest-ELLLToSA.js";import La from"./NotFoundScreen-Brpo5hIh.js";import{M as $e}from"./MobileAppDrawer-n526oWrk.js";import{u as Zt}from"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import{v as ot}from"./utils-3_hFkWEq.js";import{t as jr}from"./AddressScreen-CWbRsmbp.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./analyticsHelper-CnXSrEd_.js";import"./routePaths-Pqm-PNC8.js";import"./BusinessVerificationPageScreen-CKWDQbki.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="01f23871-ba8e-4401-9d03-2ad4353bafb0",e._sentryDebugIdIdentifier="sentry-dbid-01f23871-ba8e-4401-9d03-2ad4353bafb0")}catch{}})();function Nr(){const e=le(),{cardId:t}=ca(),a=ue(),r=X.getSignedInUser(),n=y(J=>ce(J)),m=je(),u=Ue(m?.loggedInUserRoleMap),{useFeatureGate:f}=se();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[I,o]=c.useState(!1),i=y(J=>ka(J).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const E=n.userRole.includes("charge_card_user"),{isFeatureEnabled:S}=f(Y.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:U}=f(Y.isDebitCardFeatureEnabled),v=be(n),k=ye(n),C=Se(U,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:C}),d=Ae({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:S,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,T=y(J=>Ge(J,n.companyId)),V=ze(T.controllers),{creditAccount:L,creditAccountRepayment:w}=y(J=>Ye(J)),H=y(J=>J.classListState.fetchState),p=!E&&d&&h,l=y(J=>Ma(J,t,p,d)),[_,F]=c.useState(!1),N=l.chargeCard,R=N?.cardCreatedByUser?.userId,G=y(J=>R!=null?ba(J.userRoleState,R):void 0),P=G?.accountingClassIDs[0],B=y(J=>P!=null?ya(J.classState,{classId:P,reportId:"class_list"}):void 0),j=N?.cardHolderUser?.userId,O=y(J=>j!=null?ba(J.userRoleState,j):void 0),W=O?.accountingClassIDs[0],A=y(J=>W!=null?ya(J.classState,{classId:W,reportId:"class_list"}):void 0),Z=N?.type.code==="business_physical_credit_card"||N?.type.code==="business_physical_debit_card",q=N?.type.code==="business_physical_debit_card";c.useEffect(()=>{i&&I===!1&&Z&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[i,I,Z,q]),c.useEffect(()=>{_||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(F(!0),a(Xe(t,p,!1)))},[_,l,t,a]),c.useEffect(()=>{if(l.fetchState==="Completed"&&(Z===!1||Z&&N?.status?.code!=="active"||N?.cardHolderUserId!==r.userId||i===!1&&I===!1||N?.type.code==="business_physical_debit_card"||N?.type.code==="business_virtual_debit_card")){const J=Ce(n.tenantEmailDomain,t,r,N,i);e(J)}},[l.fetchState,i,Z]),c.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&d&&h&&u&&a($a()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&h&&u&&a(Ga()),H!=="Completed"&&H!=="In-Progress"&&a(mt())},[L.fetchState,w.fetchState,a,d,h,u,H]);const z=()=>{if(r!=null&&t!=null){a(Sa());const J=Ce(n.tenantEmailDomain,t,r);e(J)}},x=N?.type.code==="business_physical_debit_card"||N?.type.code==="business_virtual_debit_card",oe=Oe(d,g,D,h),ae=Ca(d,h,u,L,w),ne=$t(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:i}),s.jsx(dr,{onGotItClick:z,isDebitCard:N?.type.code==="business_physical_debit_card",controllerEmails:V,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:h,productInformation:oe,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:L,classListFetchState:H,creditAccountRepayment:w,cardIssuedByRoles:G?.userRoles,cardIssuedByDepartmentName:B?.className,cardHolderRoles:O?.userRoles,cardHolderDepartmentName:A?.className})]})}const Vr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Hr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(S=>ce(S)),{useFeatureGate:m}=se(),{isFeatureEnabled:u}=m(Y.isCardsCommentingEnabled),[f,I]=c.useState(!1),o=y(S=>Ze(S)),i=Or(n.companyId,{clearParams:o.fetchState==="Completed"}),E=c.useCallback(()=>{const S=ve(a.state?.pathnameStackToGoBack),h=S.poppedPathname??Mr(n.tenantEmailDomain);e(h,{state:{pathnameStackToGoBack:S.newStack}})},[e,a,n.tenantEmailDomain]);if(c.useEffect(()=>{f||o.fetchState==="Completed"||o.fetchState==="In-Progress"||(I(!0),t(Ct()))},[f,o,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return o.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:E}):o.cashbackSummary.cashbackEarned.amount===0&&o.fetchState==="Completed"?s.jsx(La,{}):s.jsx(Vr,{onBackClick:E,isCardsCommentingEnabled:u,initialOpenThreadRequest:i})}const Mr=e=>`/${e}/cards`,$r={containerWidth:new ma(100,58)},Gr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ca(),m=ge(),{useDynamicConfig:u}=se(),[f,I]=c.useState(!1),[o,i]=c.useState(!1),[E,S]=c.useState(!1),[h,U]=c.useState(!1),v=X.getSignedInUser();if(v==null)throw Error("Can't access onboarding card page without signing in...");const k=y(A=>ce(A));if(n==null)throw Error("Empty card id is not valid...");const{configValue:C}=u(Fe.zeniCardsConfig),b=C.max_charge_card_activation_attempts_by_card_id,g=y(A=>Qt(A,n)),d=g.chargeCard,D=y(A=>A.chargeCardConfigState.fetchState),{useFeatureGate:T}=se(),{isFeatureEnabled:V}=T(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:L}=T(Y.isDebitCardFeatureEnabled),w=Se(L,k),H=Ie({isDebitCardFeatureEnabled:L,isBankingOnlyTenant:w}),p=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),_=be(k),F=ye(k),N=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,R=Ae({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:V,isBookKeepingTenant:F,isDebitCardProductVisible:H,chargeCardsCreditAccountLimit:N}),G=!l&&R&&p;c.useEffect(()=>{f===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),I(!0)),o===!1&&g.fetchState==="Not-Started"&&(i(!0),a(Xe(n,G,R)))},[o,g.fetchState,f,D]);const P=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";c.useEffect(()=>{if(g.fetchState==="Completed"){if(E===!1&&(P===!1||P&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==v.userId)){const A=Ce(k.tenantEmailDomain,n,v,d,!0),Z=fe(m.state?.pathnameStackToGoBack,m.pathname);r(A,{state:{pathnameStackToGoBack:Z}})}else if(E&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Jt({chargeCardId:n}));const A=Ce(k.tenantEmailDomain,n,v,d,!0),Z=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(A,{state:{pathnameStackToGoBack:Z}})}}},[g.fetchState,d?.type.code,E,g.isRefreshingViewInBackground]);const B=X.getZeniOtpTokenForCardHolder(n),j=y(A=>pt(A.userState,v.userId)),O=()=>{d?.status?.code!=="active"&&a(za(n,!0))};c.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(A=>A.statusCode==="success")===!0&&E===!1&&(setTimeout(O,3e3),S(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=A=>{U(A)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Zr,{children:[s.jsx($e,{isAppContentDrawerOpen:h,handleDrawerToggle:W}),s.jsx(zr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:v,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:B,navigate:r,currentTenant:k,location:m,maxChargeCardActivationAttempts:b[n]!=null?b[n]:C.default_max_charge_card_activation_attempts!=null?C.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:C.charge_card_cashback_rate_per_transaction!=null?C.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Yr,{windowSize:t,children:e}):null]})},zr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const m=Xt(e.addressState,a);if(m==null)throw Error("Can't access shippingAddress.");const u=ht(e,n),f=t.updateStatus,I=Ke(e,!1,!1,!1);let o=!1;I.fetchState==="Completed"&&I.cards.length<=1&&(o=!0);const i=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||i,showMenuIcon:o,shippingAddress:m,vgsVaultId:Ba.cardVaultId,twoFAView:u,activationWaitStatus:f,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,chargeCardDetailState:u}=t,f=u.chargeCard?.cardProviderID,{tenantEmailDomain:I}=m;return{onGetOtp:o=>{f!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{f!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{f!=null&&e(Pa(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),Yr=_e.div`
2
- display: flex;
3
- flex-direction: column;
4
- width: ${e=>`${$r.containerWidth.value(e.windowSize)}%`};
5
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
6
- `,Zr=_e.div`
7
- display: flex;
8
- min-height: 100%;
9
- width: 100%;
10
- flex: 1 1 auto;
11
- flex-direction: column;
12
- align-items: center;
13
- background-color: ${e=>e.theme.colors.grey4};
14
- `,Ea=qa.getLocalizedStrings().dateFormat,Kr={overlayWidth:new ma(100,100,58)},Wr=pe(function(e,t){const a=t.currentTenant?.companyId;return{plaidConnectionDetails:cn(e,a,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:dn(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:a,currentTenant:r,hasZeniAccountsAdminAccess:n,isZeniAccountsUser:m,isCashbackInfoFetchStateCompleted:u,isCreditCardInfoFetchStateCompleted:f,isDebitCardInfoFetchStateCompleted:I,controllerEmails:o,paymentDetails:i,productInformation:E,cashbackInformation:S,paymentSourceInformation:h,creditAccountInformation:U,debitAccountInformation:v,paymentInitiatedDate:k,sourcePage:C}=t,{tenantEmailDomain:b}=r;return{onBackNavigation:()=>{if(u&&f&&I&&S!=null&&Q.trackCardsPayEarlyFormClick(o,E,S,"Back",i.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:i.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:i.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:i.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:i.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:k?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:k?.format(Ea.visual.MMMDCommaYYYYformat)},h,U,v),C==="cardPaymentHistory")t.closeDrawerHandler(!0),e(bt());else{const g=Ne(b);a(g)}},onUpdatePaymentAccountStatus:(g,d,D)=>{e(mn(g,d,"bill_pay","bill_pay_detail",D))},onEstablishConnectionSuccess:()=>{e(Fa(r.companyId,!0))},onFetchLinkTokenClick:g=>{e(un("external_account",g))},onEstablishConnectionClick:g=>{e(ln(g,r.companyId,"charge_card_payment","charge_cards"))},onSignUpAccountClick:()=>{n?window.open(`/${b}/checking/promo`,"_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onMoveMoneyClick:()=>{m?window.open(`/${b}/checking/transfer`):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Cr),at=({isPaymentDrawerOpen:e,closeDrawerHandler:t,pageName:a,creditAccountSpentAmount:r,productInformation:n,sourcePage:m,creditAccountInformation:u,debitAccountInformation:f,cashbackInformation:I,isDebitCardInfoFetchStateCompleted:o,isCreditCardInfoFetchStateCompleted:i,isCashbackInfoFetchStateCompleted:E,paymentInitiatedDate:S,retryRepayment:h})=>{const U=le(),{useDynamicConfig:v}=se(),{configValue:k}=v(Fe.zeniAccountsConfig),C=nn(k),b=y(z=>ft(z)),{creditAccount:g}=y(z=>Ye(z)),d=y(z=>ce(z)),D=Wa(),T=ua(),V=ue(),L=X.getSignedInUser(),w=je(),[H,p]=c.useState(!1),[l,_]=c.useState(!1),{configValue:F}=v(Fe.zeniCardsConfig),N=F.credit_card_auto_pay_threshold_by_company_id?.[d.companyId]??F.default_credit_card_auto_pay_threshold??Br,R=gt(w?.loggedInUserRoleMap),G=rn(w?.loggedInUserRoleMap),P=!!d.companyZeniAccountInfo?.info?.isZeniAccountEnabled,B=y(z=>da(z,d.companyId)),j=B.companyChargeCardInfo?.primaryFundingAccount,O=B.allFundingAccounts.find(z=>z.id===j?.accountId),W=y(z=>Ge(z,d.companyId)),A=ze(W.controllers);c.useEffect(()=>{if(b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&V(sn()),b.fetchState==="Completed"&&!l){const z=d.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,x=b.transferFromAccounts.find(ae=>ae.id===z);let oe;if(m==="cardPaymentHistory"&&h){const ae=h.paymentAccountId!=null?b.transferFromAccounts.find(ne=>ne.id===h.paymentAccountId):void 0;oe={amount:h.amount,isAutoRepayment:d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:ae??x}}else oe={amount:{amount:g.balance.amount+g.hold.amount,currencyCode:g.balance.currencyCode,currencySymbol:g.balance.currencySymbol},isAutoRepayment:d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,idempotencyKey:ot(),transferFrom:x};V(tt(oe)),_(!0)}},[b.fetchState,l,m,h,b.transferFromAccounts,d.companyChargeCardInfo?.info?.primaryFundingAccount?.accountId,d.companyChargeCardInfo?.info?.isAutoPayEnabled,g.balance.amount,g.balance.currencyCode,g.balance.currencySymbol,g.hold.amount,V]);const Z={isZeniCheckingEnabled:d.companyZeniAccountInfo?.info?.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:O?.accType==="depositAccount",creditCardPaymentSourceAccountName:O?.label,creditCardPaymentSourceAccountType:O?.accType,creditCardPaymentSourceLastFourDigits:O?.accountLast4,creditCardPaymentSourceBalance:O?.accountBalance?.available?.amount??0};if(c.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&V(Fa(d.companyId,!0))},[B.fetchState]),c.useEffect(()=>{b.updateStatus==="Completed"&&I!=null&&E&&i&&o&&Q.trackCardsPayEarlyPayNowClick(A,n,I,b.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:b.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:b.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:b.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:b.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:S?.add(3,"day").format(Ea.visual.MMMDCommaYYYYformat),paymentInitiatedDate:S?.format(Ea.visual.MMMDCommaYYYYformat)},Z,u,f)},[b.updateStatus,I,E,i,o,S]),c.useEffect(()=>{b.fetchState==="Completed"&&I!=null&&E&&i&&o&&!H&&e&&l&&I!=null&&(Q.trackCardsPayEarlyFormView(A,n,I,a,d.companyChargeCardInfo?.info?.isAutoPayEnabled??!1,g.balance.amount,Z,u,f),p(!0))},[b,E,i,o,H,e,l]),L==null)throw Error("Can't access invite people page without signing in...");const q=()=>{t(!0),V(bt())};return s.jsx(s.Fragment,{children:s.jsx(Mt,{onClose:()=>{q()},anchor:"right",transitionDuration:250,open:e,PaperProps:{style:{width:Kr.overlayWidth.valuePercentage(T),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:D.colors.black,opacity:.75,cursor:"pointer"}}},children:s.jsx(qr,{onClick:z=>z.stopPropagation(),children:s.jsx(Wr,{closeDrawerHandler:t,navigate:U,paymentDetails:b,creditAccountSpentAmount:r,onTransferClick:()=>{E&&i&&o&&I!=null&&Q.trackCardsPayEarlyFormClick(A,n,I,"Pay Now",b.chargeCardRepaymentDetailLocalData.isAutoRepayment,{paymentAmount:b.chargeCardRepaymentDetailLocalData.amount.amount,paymentAccountName:b.chargeCardRepaymentDetailLocalData.transferFrom?.label,paymentAccountType:b.chargeCardRepaymentDetailLocalData.transferFrom?.accType,paymentAccountLastFourDigits:b.chargeCardRepaymentDetailLocalData.transferFrom?.accountLast4,paymentCompleteEta:void 0,paymentInitiatedDate:void 0},Z,u,f),V(on({companyId:d.companyId}))},onDismissClick:q,onSaveChangesToLocalStore:z=>{V(tt(z))},currentTenant:d,hasZeniAccountsAdminAccess:R,isZeniAccountsUser:G,isZeniAccountSetupEnabled:P,productInformation:n,sourcePage:m,controllerEmails:A,autoPayThreshold:N,paymentSourceInformation:Z,creditAccountInformation:u,debitAccountInformation:f,cashbackInformation:I,isCashbackInfoFetchStateCompleted:E,isCreditCardInfoFetchStateCompleted:i,isDebitCardInfoFetchStateCompleted:o,paymentInitiatedDate:S,maxInsuredAmount:C.maxInsuredAmount})})})})},qr=_e(xr)`
15
- display: flex;
16
- min-height: 100%;
17
- flex-direction: column;
18
- `,Kt="charge-card-transaction-update",Oa=qa.getLocalizedStrings().dateFormat,Qr=pe(function(e,t){const{includeCreditAccountInfo:a,cardId:r,signedInUserToken:n,isChargeCardFeatureEnabled:m}=t,u=X.getSignedInUser(),f=e.tenantState.currentTenantId,I={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:f??""},o=Ma(e,r,a,m),i=pn(e,r),E=hn(e);return{chargeCardDetailView:o,chargeCardsRecurringExpensesState:i,vgsVaultId:Ba.cardVaultId,transactionAttachmentsEndpointToFetch:`${Ha}/card_transaction_attachments`,transactionAttachmentEndpointToDownload:`${Ha}/card_transaction_attachment`,authParams:I,isSnackbarOpen:E.isSnackbarOpen,cardsEndPoint:`${Nt.cardMicroServiceBaseUrl}`,signedInUserToken:o.twoFAView.token??n}},function(e,t){const{cardId:a,currentTenant:r,navigate:n,location:m,cardProviderId:u,includeCreditAccountInfo:f,setIsPaymentOpen:I,controllerEmails:o,productInformation:i,cashbackInformation:E,primaryFundingAccountDetails:S,creditAccountInformation:h,debitAccountInformation:U,isChargeCardFeatureEnabled:v}=t,{tenantEmailDomain:k}=r;return{onEventReceived:C=>{C===Kt&&(e(za(a,!0)),e(nt(a,null,null,!0)))},onReloadTransactions:()=>{e(Xe(a,f,v))},onFetchChargeCardTransactionList:(C,b)=>{e(nt(a,C,b))},onUpdateScrollYOffset:C=>{},onGetOtp:C=>{u!=null&&e(Ta(C,"ChargeCardHolder",a))},onResendOtp:C=>{u!=null&&e(wa(C,"ChargeCardHolder",a))},onVerifyOtp:(C,b)=>{u!=null&&e(Pa(C,b,"ChargeCardHolder",a))},onVerifyOtpSuccess:C=>{C!=null&&X.saveZeniOtpTokenForCardHolder(C,a)},onColorCodeChange:C=>{e(In(a,C))},onLockChargeCard:(C,b)=>{e(Pt(C,a,b))},onUnlockChargeCard:C=>{e(_t(C,a))},onCloseChargeCard:C=>{e(Dt(a,C))},onFetchChargeCardsRecurringExpenses:()=>{e(kt([a]))},updateChargeCardName:(C,b)=>{e(Et(C,a,b))},updateChargeCardTransactionAttachments:(C,b)=>{b!=null&&e(Sn({transactionId:C,data:b}))},updateChargeCardTransactionUploadReceiptsFetchStatus:(C,b,g,d)=>{e(yn({chargeCardId:b,transactionId:C,fetchState:g,error:d}))},updateChargeCardTransactionReceiptsShowTick:(C,b,g)=>{e(bn({chargeCardId:b,transactionId:C,shouldShowTick:g}))},onChargeCardRevokeInviteClick:()=>{e(At(a))},updateChargeCardTransactionIsViewReceiptClicked:(C,b,g)=>{e(gn({chargeCardId:b,transactionId:C,isViewReceiptClicked:g}))},onChargeCardTransactionRowClick:(C,b)=>{const g=fe(m.state?.pathnameStackToGoBack,m.pathname);n(`../../transaction/${C}/${b}`,{state:{pathnameStackToGoBack:g}})},onBackClick:()=>{const C=ve(m.state?.pathnameStackToGoBack),b=Ne(k);n(b,{state:{pathnameStackToGoBack:C.newStack,message:"comingFromCardDetail"}})},removeSnackbar:()=>{e(fn())},onUpdateDebitCardPinAttempt:C=>{e(It(a,C)),C==="success"&&e(oa({messageSection:"update_debit_card_pin_attempt",messageText:"success",type:"success",showStatusIcon:!0}))},onUploadReceiptComplete:(C,b)=>{C?e(oa({messageSection:"charge_card_receipt_upload",messageText:"success",type:"success",showStatusIcon:!0})):b!=null&&e(oa({messageSection:"charge_card_receipt_upload",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"_api-error_",variableValue:b.message}]}))},updateSpendLimit(C,b,g,d){e(St(C,b,g.code,d))},shouldOpenCreditCardPaymentDrawer(C){C&&E!=null&&Q.trackCardsPayEarlyClick(o,i,E,"Card Detail","Text Button","Pay Now",{isZeniCheckingEnabled:r.company?.companyZeniAccountInfo.isZeniAccountEnabled??!1,isZeniCheckingPaymentSource:S?.accType==="depositAccount",creditCardPaymentSourceAccountName:S?.label,creditCardPaymentSourceAccountType:S?.accType,creditCardPaymentSourceLastFourDigits:S?.accountLast4,creditCardPaymentSourceBalance:S?.accountBalance?.available?.amount??0},h,U),I(C)}}})(hr(fr));function Jr(){const e=le(),t=ue(),a=ge(),{cardId:r}=ca(),[n,m]=c.useState(!1),[u,f]=c.useState(!1),{useDynamicConfig:I}=se(),o=X.getSignedInUser(),i=y(M=>ce(M)),E=y(M=>ka(M).firstViewAfterActivation),S=y(M=>M.classListState.fetchState),{configValue:h}=I(Fe.documentAiReceiptMaxSizeLimitBytesConfig),{configValue:U}=I(Fe.zeniCardsConfig),v=U.enable_card_controls_for_company_ids,k=U.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(v)&&v.includes(i.companyId),[C,b]=c.useState(!1),[g,d]=c.useState(!1),{useFeatureGate:D}=se(),{isFeatureEnabled:T}=D(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:V}=D(Y.isDebitCardFeatureEnabled),L=Se(V,i),w=Ie({isDebitCardFeatureEnabled:V,isBankingOnlyTenant:L}),{isFeatureEnabled:H}=D(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:p}=D(Y.isCardsCommentingEnabled),l=ye(i),_=be(i),F=i.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,N=Ae({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:T,isBookKeepingTenant:l,isDebitCardProductVisible:w,chargeCardsCreditAccountLimit:F}),R=!!i.companyDebitCardInfo?.info?.isDebitCardEnabled,G=!!i.companyChargeCardInfo?.info?.isChargeCardEnabled,P=!i.userRole.includes("charge_card_user")&&N&&G;if(r==null)throw Error("Empty card id is not valid...");const B=y(M=>da(M,i.companyId)),{creditAccount:j,creditAccountRepayment:O}=y(M=>Ye(M)),W=X.getZeniOtpTokenForCardHolder(r),A=y(M=>Ma(M,r,P,N)),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:q}=Zt({mobileExploreReferrer:"Card Detail"});jt({isDataReady:A.fetchState==="Completed"});const z=y(M=>Ze(M)),x=A.chargeCard,oe=je(),ae=Ue(oe?.loggedInUserRoleMap),ne=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_virtual_debit_card",J=x?.type.code==="business_physical_debit_card"||x?.type.code==="business_physical_credit_card",re=x?.type.code==="business_virtual_debit_card"||x?.type.code==="business_virtual_credit_card",Ee=x?.type.code==="business_virtual_debit_card",xe=Ca(N,G,ae,j,O),K=$t(ne,A),he=Xa(ae,z),ke=Oe(N,w,R,G),Be=A.depositAccountLimitFetchState.fetchState!=="Completed"&&A.depositAccountLimitFetchState.fetchState!=="In-Progress",Pe=y(M=>Ge(M,i.companyId)),we=ze(Pe.controllers),ee=y(M=>x?.cardCreatedByUser?.userId!=null?ba(M.userRoleState,x?.cardCreatedByUser?.userId):void 0),pa=y(M=>ee?.accountingClassIDs[0]!=null?ya(M.classState,{classId:ee?.accountingClassIDs[0],reportId:"class_list"}):void 0),ie=y(M=>x?.cardHolderUser?.userId!=null?ba(M.userRoleState,x?.cardHolderUser?.userId):void 0),ea=y(M=>ie?.accountingClassIDs[0]!=null?ya(M.classState,{classId:ie?.accountingClassIDs[0],reportId:"class_list"}):void 0),de=i?.userRole,Le=y(M=>Ke(M,!1,w,T).revokeCardInvite),aa=Qa(Le.saveStatus.fetchState);if(c.useEffect(()=>{if(aa==="In-Progress"&&Le.saveStatus.fetchState==="Completed"){const M=Ne(i.tenantEmailDomain);e(M)}},[aa,Le.saveStatus.fetchState,e,i.tenantEmailDomain]),c.useEffect(()=>{E&&n===!1&&re&&(m(!0),setTimeout(()=>{t(Sa()),Ee&&t(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[E,n,re,Ee]),c.useEffect(()=>{C||A.fetchState==="Completed"||A.fetchState==="In-Progress"||r==null||(b(!0),t(Xe(r,P,N,!1)))},[C,A,r,t]),c.useEffect(()=>{!g&&A.fetchState==="Completed"&&A.chargeCard?.connectedAccountId!=null&&ne&&Be&&ae&&(d(!0),t(yt({depositAccountId:A.chargeCard?.connectedAccountId})))},[g,A,t,Be,ae]),c.useEffect(()=>{z.fetchState!=="Completed"&&z.fetchState!=="In-Progress"&&ae&&t(Ct()),S!=="Completed"&&S!=="In-Progress"&&t(mt()),A.transactionStatistics.fetchState!=="Completed"&&A.transactionStatistics.fetchState!=="In-Progress"&&t(Cn({chargeCardId:r})),B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&t(Fa(i.companyId,!0))},[z.fetchState,t,ae,S,A.transactionStatistics.fetchState,B.fetchState]),c.useEffect(()=>{if(!(A.fetchState!=="Completed"||N&&j.fetchState!=="Completed"||x==null||A.transactionStatistics.fetchState!=="Completed"||ne&&ae&&A.depositAccountLimitFetchState.fetchState!=="Completed")){const M=x.type.code.includes("physical"),me=M?x.cardActivationAttemptHistory[0]?.timestamp:x.createTime;Q.trackCardsCardDetailView(we,ke,{cardId:r,cardName:x.cardName,cardType:x.type.code.includes("credit")?"credit":"debit",cardCategory:M?"physical":"virtual",cardLimit:Qe(x.limit.amount),cardLastFourDigits:x.accountLast4,cardStatus:x.status.code,cardAssignedDate:x.createTime?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardIssuedDate:x.providerCardCreateTime?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardActivatedDate:me?.format(Oa.analytics.MMMDashDDDashYYYYFormat),cardLimitFrequency:x.creditLimitFrequency.name,cardSpentAmount:Qe(x.balance.amount),cardAvailableLimit:Qe(x.available.amount),cardUtilizationPercent:x.limit.amount>0?Math.round((x.limit.amount-x.available.amount)/x.limit.amount*100):0,cardUtilizationAmount:Qe(x.limit.amount-x.available.amount),totalNumberOfDeclinedTransactions:A.transactionStatistics.statistics.totalNumberOfDeclinedTransactions,numberOfDeclinedTransactionsCurrentMonth:A.transactionStatistics.statistics.numberOfDeclinedTransactionsCurrentMonth,totalNumberOfPaidTransactions:A.transactionStatistics.statistics.totalNumberOfPaidTransactions,numberOfPaidTransactionsCurrentMonth:A.transactionStatistics.statistics.numberOfPaidTransactionsCurrentMonth,totalNumberOfCanceledTransactions:A.transactionStatistics.statistics.totalNumberOfCanceledTransactions,numberOfCanceledTransactionsCurrentMonth:A.transactionStatistics.statistics.numberOfCanceledTransactionsCurrentMonth,totalNumberOfAuthorizedTransactions:A.transactionStatistics.statistics.totalNumberOfAuthorizedTransactions,numberOfAuthorizedTransactionsCurrentMonth:A.transactionStatistics.statistics.numberOfAuthorizedTransactionsCurrentMonth,totalNumberOfTransactionsWithReceipts:A.transactionStatistics.statistics.totalNumberOfTransactionsWithReceipts,numberOfTransactionsWithReceiptsCurrentMonth:A.transactionStatistics.statistics.numberOfTransactionsWithReceiptsCurrentMonth},{cardIssuedByName:Va(x.cardCreatedByUser,!1),cardIssuedByEmail:x.cardCreatedByUser?.email,cardIssuedByUserId:x.cardCreatedByUser?.userId,cardIssuedByRole:ee?.userRoles,cardIssuedByDepartment:pa?.className},{cardholderName:Va(x.cardHolderUser,!1),cardholderEmail:x.cardHolderUser?.email,cardholderRole:ie?.userRoles,cardholderUserId:x.cardHolderUser?.userId,cardholderDepartment:ea?.className},xe,K)}},[A.fetchState,A.depositAccountLimitFetchState.fetchState,A.transactionStatistics.fetchState,j.fetchState,ae]),o==null)throw Error("Can't access card detail page without signing in...");const We=i.companyId??X.getSignedInUserTenant(i.tenantEmailDomain)?.companyId,ta={events:We!=null?[`private-encrypted-${We}.${Kt}`]:[],eventCallback:(M,me,Te)=>{Te.onEventReceived(M)}},na=()=>{if(r!=null&&x!=null){const{ownerName:M,cardName:me,utilisation:Te,limit:Ve,frequency:qe,cardColor:$}=ja(x),De=x.cardHolderUserId===o.userId;Q.trackCardsDetailPageViewed(r,M,me,Te,Ve,qe,$,De)}};c.useEffect(()=>{if(A.fetchState==="Completed"){const M=A.chargeCard;if(M?.status.code==="inactive"||ne&&M?.isPinSet===!1||J&&E){const me=Ce(i.tenantEmailDomain,r,o,x,E);e(me)}}},[A.fetchState]);const ra=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:Ve,utilisation:qe,limit:$,frequency:De}=ja(x),He=x.cardHolderUserId===o.userId;Q.trackCardsDetailPageClicked(r,Te,Ve,qe,$,De,M,He,me)}},sa=(M,me)=>{if(r!=null&&x!=null){const{ownerName:Te,cardName:Ve,utilisation:qe,limit:$,frequency:De}=ja(x),He=x.cardHolderUserId===o.userId;Q.trackCardsVerifyPopUpClick(r,Te,Ve,qe,$,De,M,He,me)}},Ra=j.balance.amount+j.hold.amount,ha=i.companyChargeCardInfo?.info?.primaryFundingAccount,fa=B.allFundingAccounts.find(M=>M.id===ha?.accountId);return r==null||A.fetchState==="Error"?s.jsx(La,{}):A.fetchState==="In-Progress"||A.fetchState==="Not-Started"||Le.saveStatus.fetchState==="In-Progress"||ne&&ae&&A.depositAccountLimitFetchState.fetchState!=="Completed"?s.jsx(pr,{}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:E}),A.fetchState==="Completed"?s.jsx(Ja,{analytics:Q,onLoad:na}):null,u===!0?s.jsx(at,{closeDrawerHandler:()=>f(!1),isPaymentDrawerOpen:u,pageName:"Card Detail",sourcePage:"cardDetailPage",productInformation:ke,creditAccountInformation:xe,debitAccountInformation:K,cashbackInformation:he,creditAccountSpentAmount:Ra,isDebitCardInfoFetchStateCompleted:!ne||!ae||A.depositAccountLimitFetchState.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!N||j.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!ae||z.fetchState==="Completed",paymentInitiatedDate:O.initiatedRepaymentDate}):null,s.jsx(Qr,{...ta,hideSorting:!0,onColumnSortConfigChanged:()=>{},onFireVerifyPopOnClickAnalytics:sa,onFireOnClickAnalytics:ra,isSandboxEnv:Ka(),signedInUser:o,location:a,navigate:e,setIsPaymentOpen:f,cardIssuedByRoles:ee?.userRoles,cardIssuedByDepartmentName:pa?.className,cardHolderRoles:ie?.userRoles,cardHolderDepartmentName:ea?.className,loggedInUserRole:de,isChargeCardFeatureEnabled:N,isDebitCardFeatureEnabled:w,isDebitCardSetupEnabled:R,isChargeCardSetupEnabled:G,isCardControlsEnabled:k,isEarlyPayEnabled:H,controllerEmails:we,chargeCardCashbackDetailState:z,productInformation:ke,creditAccountInformation:xe,debitAccountInformation:K,cashbackInformation:he,classListFetchState:S,primaryFundingAccountDetails:fa,currentTenant:i,cardProviderId:A.chargeCard?.cardProviderID,cardId:r,creditAccount:j,creditAccountRepayment:O,includeCreditAccountInfo:P,signedInUserToken:W,appleWalletLink:"shoebox://",googleWalletLink:"https://www.android.com/payapp/",documentAiReceiptMaxSizeLimit:h.documentAiReceiptMaxSizeLimitBytes!=null?h.documentAiReceiptMaxSizeLimitBytes:9437184,isAiCfoAccessEnabled:Z,onAskAiCfoClick:q,isCardsCommentingEnabled:p})]})}const ja=e=>{const t=`${e.cardHolderUser?.firstName.toLowerCase()} ${e.cardHolderUser?.lastName.toLowerCase()}`,a=e.cardName,r=(e.limit.amount??0)-(e.available.amount??0),n=e.limit.amount,m=e.creditLimitFrequency.name;return{ownerName:t,cardName:a,utilisation:r,cardColor:e.cardColorCode??"",frequency:m,limit:n}},Xr=_e.div`
19
- display: flex;
20
- width: 100%;
21
- flex: 1 1 auto;
22
- flex-direction: column;
23
- align-items: center;
24
- background-color: ${e=>e.theme.colors.grey4};
25
- `,es=pe(function(e,t){const a=Ke(e,t.includeCreditAccountDebitSummaryAndCashbackInfo,t.isDebitCardFeatureEnabled&&t.isDebitCardSetupEnabled,t.isChargeCardFeatureEnabled&&t.isChargeCardSetupEnabled);return{chargeCardListView:a,rowActionView:An(e),bulkActionView:En(e),companyLegalName:t.currentTenant.companyName,admins:t.admins,searchText:a.searchText,uiState:a.uiState,signedInUser:t.signedInUser}},function(e,t){const{navigateAndClearBulkSelection:a,currentTenant:r,location:n,signedInUser:m,chargeCardListState:u,includeCreditAccountDebitSummaryAndCashbackInfo:f,isChargeCardFeatureEnabled:I,isCreditCardProductVisibleForExpressInterest:o,isChargeCardSetupEnabled:i,isDebitCardFeatureEnabled:E,isDebitCardSetupEnabled:S,isDebitCardTOSAccepted:h,isChargeCardTOSAccepted:U,controllerEmails:v,depositAccountListWithDebitCardIssued:k,primaryFundingAccountDetails:C,chargeCardSetUpViewFetchState:b,productInformation:g,cashbackInformation:d,creditAccountInformation:D,debitAccountInformation:T,updatePayNowInfoTooltip:V,isUserHasCardsAdminLevelAccess:L}=t,{tenantEmailDomain:w}=r,{cards:H}=u;return{onChargeCardRowClick:(p,l)=>{const _=zt(H,p);let F;_!=null&&((R=>{const G=R.limit.amount-R.available.amount,P=`${R.cardHolderUser?.firstName.toLowerCase()} ${R.cardHolderUser?.lastName.toLowerCase()}`,B=R.cardName,j=R.department?.className??"",O=R.limit.amount,W=R.creditLimitFrequency.name;Q.trackCardsListRowClicked(P,B,j,G,O,W,m.userId===R.cardHolderUserId)})(_),Me(E,S,k)&&Q.trackCardsCardListRowClick(v,g,"Card Row Item","row_clicked",l+1,{cardOwner:Va(_.cardHolderUser,!1),cardName:_.cardName,cardType:_.type.code.includes("credit")?"credit":"debit",cardStatus:_.status.code,cardUtilizationAmount:Qe(_.limit.amount-_.available.amount),cardUtilizationPercent:_.limit.amount>0?Math.round((_.limit.amount-_.available.amount)/_.limit.amount*100):0,cardLimit:Qe(_.limit.amount)},d,D,T)),F=_?.status.code==="request_on_hold"&&m.userId===_.cardHolderUserId?Yt(w):Ce(w,p,m,_);const N=fe(n.state?.pathnameStackToGoBack,n.pathname);a(F,{state:{pathnameStackToGoBack:N}})},onFetchChargeCardsRecurringExpenses:p=>{e(kt(p))},onFetchDepositAccountLimit:p=>{e(yt({depositAccountId:p}))},onChargeCardResendInviteClick:p=>{e(vn(p))},onChargeCardRevokeInviteClick:p=>{e(At(p))},onLockChargeCardList:(p,l)=>{e(Fn(p,l))},onUnlockChargeCardList:p=>{e(Tn(p))},onCloseChargeCardList:(p,l)=>{e(wn(p,l))},onRevokeChargeCardList:p=>{e(Pn(p))},updateChargeCardListSpendLimit(p,l,_){e(_n(p,l,_.code))},onLockChargeCard:(p,l)=>{e(Pt(L,p,l))},onUnlockChargeCard:p=>{e(_t(L,p))},onCloseChargeCard:(p,l)=>{e(Dt(p,l))},onUpdateSpendLimit(p,l,_,F){e(St(p,l,_.code,F))},updateChargeCardName:(p,l)=>{e(Et(L,p,l))},onClickSetupIcon:()=>{Q.trackCardsListPageClicked("settings"),Me(E,S,k)&&d!=null&&Q.trackCardsSettingsClick(v,g,d,D,T);const p=Rr(w),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(p,{state:{pathnameStackToGoBack:l}})},onIssueCardClick:()=>{Q.trackCardsListPageClicked("new card"),Me(E,S,k)&&d!=null&&Q.trackCardsNewCardClick(v,g,d,"New Button","card_creation_initiated","Card List",D,T);const p=as(w),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(p,{state:{pathnameStackToGoBack:l}})},onColumnSortConfigChanged:(p,l)=>{Me(E,S,k)&&d!=null&&Q.trackCardsCardListSortClick(v,g,d,"Sort Icon","sort",p,l==="ascending"?"ASC":"DESC","Cards List",D,T),e(Na({uiState:{sortKey:p,sortOrder:l}}))},onSearchTextChanged:p=>{e(Dn(p))},onReloadCards:()=>{e(Ia(f,E&&S,I&&i,!0))},onLetsGoClick:()=>{a("./onboard")},onBackClick:()=>{a("../../")},onTotalCashbackClick:()=>{Me(E,S,k)&&d!=null&&Q.trackCardsCashbackOverviewClick(v,g,d,"Cashback Overview","cashback_details_viewed",D,T),a("./cashback")},onClickStatementsIcon:()=>{Me(E,S,k)&&d!=null&&Q.trackCardsStatementsClick(v,g,d,D,T),a("./statements")},onCreateNowClick:p=>{Me(E,S,k)&&d!=null&&Q.trackCardsNewCardClick(v,g,d,"Promo Banner","card_creation_initiated","Card List",D,T),a(`./new?cardType=${p}`)},onPromoCardClick:p=>{a(p==="debit"&&E&&!h||p==="credit"&&o&&!U?`../promo?cardPromoType=${p}`:"./setup")},navigateToCreditCardPaymentPage:(p,l)=>{b==="Completed"&&r.company!=null&&d!=null&&Q.trackCardsPayEarlyClick(v,g,d,"Card List",p,l,{isZeniCheckingEnabled:r.company.companyZeniAccountInfo.isZeniAccountEnabled,isZeniCheckingPaymentSource:C?.accType==="depositAccount",creditCardPaymentSourceAccountName:C?.label,creditCardPaymentSourceAccountType:C?.accType,creditCardPaymentSourceLastFourDigits:C?.accountLast4,creditCardPaymentSourceBalance:C?.accountBalance?.available?.amount??0},D,T);const _=ts(w);a(_)},navigateToCreditCardPaymentHistoryPage:()=>{const p=ns(w),l=fe(n.state?.pathnameStackToGoBack,n.pathname);a(p,{state:{pathnameStackToGoBack:l}})},shouldShowPayNowInfoTooltip:V,onSetRowActionCardId:p=>{e(kn(p))},onSetBulkActionCardIds:p=>{e(wt(p))}}})(gr);function it({isPaymentDrawerOpen:e}){const t=le(),a=ue(),r=ge(),n=c.useCallback(($,De)=>{a(wt([])),t($,De)},[a,t]),[m,u]=c.useState(!1),[f,I]=c.useState(X.getPayNowInfoTooltip()??!1),o=$=>{X.savePayNowInfoTooltip($),I($)},[i,E]=c.useState(!1),S=X.getSignedInUser(),h=y($=>ce($)),[U,v]=c.useState(!1),[k,C]=c.useState(!1),{isAiCfoAccessEnabled:b,onAskAiCfoClick:g}=Zt({mobileExploreReferrer:"Cards"}),d=h.userRole.includes("charge_card_user"),D=!d,T=!!h.companyDebitCardInfo?.info?.isDebitCardEnabled,{useFeatureGate:V,useDynamicConfig:L}=se(),{isFeatureEnabled:w}=V(Y.isCashbackFeatureEnabled),{isFeatureEnabled:H}=V(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:p}=V(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=V(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:_}=V(Y.isChargeCardPaymentHistoryFeatureEnabled),{isFeatureEnabled:F}=V(Y.isCardsCommentingEnabled),N=Se(p,h),R=Ie({isDebitCardFeatureEnabled:p,isBankingOnlyTenant:N}),G=be(h),P=ye(h),B=h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,j=Ae({isCardsOnlyTenant:G,isChargeCardFeatureEnabled:H,isBookKeepingTenant:P,isDebitCardProductVisible:R,chargeCardsCreditAccountLimit:B}),O=Gt({isCardsOnlyTenant:G,isChargeCardFeatureEnabled:H,isBookKeepingTenant:P}),{configValue:W}=L(Fe.zeniCardsConfig),A=je(),Z=Ue(A?.loggedInUserRoleMap),q=y($=>Ge($,h.companyId)),z=ze(q.controllers),x=W.charge_card_cashback_rate_per_transaction!=null?W.charge_card_cashback_rate_per_transaction:.0175,oe=W.credit_card_pay_now_threshold_by_company_id?.[h.companyId]??W.default_credit_card_pay_now_threshold??Lr,ae=W.is_card_controls_enabled_for_all_tenants===!0||Array.isArray(W.enable_card_controls_for_company_ids)&&W.enable_card_controls_for_company_ids.includes(h.companyId),ne=!!h.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,J=!!h.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,re=!!h.companyChargeCardInfo?.info?.isChargeCardEnabled,Ee=y($=>ft($)),xe=Qa(Ee.updateStatus),K=y($=>Ke($,D,R&&T,j&&re)),he=K.cards.filter($=>$.type.code.includes("debit")).map($=>$.connectedAccountId),ke=[...new Set(he)],Be=y($=>Ze($)),Pe=y($=>va($,ke)),we=y($=>da($,h.companyId)),ee=we.companyChargeCardInfo?.primaryFundingAccount,pa=we.allFundingAccounts.find($=>$.id===ee?.accountId),ie=K.fetchState,ea=K.creditAccount;jt({isDataReady:ie==="Completed"});const{creditAccountRepayment:de}=y($=>Ye($)),Le=y($=>ka($).firstViewAfterActivation),{areTenantIdsInSync:aa}=Vt(),We=Xa(Z,Be),ta=Ca(j,re,Z,ea,de),na=et(R,T,Z,Pe,K.debitCardSummary),ra=Oe(j,R,T,re),sa=K.creditAccount.balance.amount+K.creditAccount.hold.amount;if(c.useEffect(()=>{ie==="Completed"&&(X.getPayNowInfoTooltip()==null||sa<oe*K.creditAccount.limit.amount/100)&&o(!0)},[ie,oe,sa,K.creditAccount.limit.amount]),c.useEffect(()=>{if(e!=null&&e===!0&&de.initiatedRepayments.amount===0&&de.fetchState==="Completed"||xe==="In-Progress"&&Ee.updateStatus==="Completed")o(!1),u(!0);else if(de.initiatedRepayments.amount>0&&de.fetchState==="Completed"){u(!1),document.body.style.overflow="auto";const $=Ne(h.tenantEmailDomain);n($)}},[e,de.initiatedRepayments.amount,de.fetchState,xe,Ee.updateStatus,n,h.tenantEmailDomain]),c.useEffect(()=>{!U&&(re||T)&&aa&&(v(!0),a(Ia(D,R&&T,j&&re,!1)))},[U,D,a,aa]),c.useEffect(()=>{Le&&i===!1&&(E(!0),setTimeout(()=>{a(Sa())},5e3))},[Le,i]),c.useEffect(()=>{ie==="Completed"&&d&&K.cards.length===1&&(K.cards[0].status.code==="inactive"&&K.cards[0].type.code==="business_physical_credit_card"?n(`./${K.cards[0].id}/activate`):K.cards[0].status.code!=="request_on_hold"&&(r.state?.message==="comingFromCardDetail"?n("../../"):n(`./${K.cards[0].id}`)))},[ie,d,r.state,n,K.cards]),c.useEffect(()=>{if(ie==="Completed"&&d){const $=K.cards.length,De=K.cards.filter(He=>He.cardHolderUserId===S?.userId).filter(He=>He.status.code==="request_on_hold");De.length>0&&$===De.length&&n("./onboard")}},[ie,K.cards,d,n,S?.userId]),c.useEffect(()=>{ie!=="Completed"||j&&de.fetchState!=="Completed"||R&&T&&Z&&Pe.fetchState!=="Completed"||Q.trackCardsCardListView(z,ra,We,ta,na)},[ie,ea,de.fetchState,Pe.fetchState,Z]),S==null)throw Error("Can't access charge card list page without signing in...");const Ra=y($=>Tt($.userState,$.userRoleState,$.userListViewState,"cardAdmin")),ha=Ya(A?.loggedInUserRoleMap),fa=$=>{C($)},M=K.creditAccount.limit,me=()=>{u(!1),n("..")},Te=h.companyChargeCardInfo?.info!=null&&Je({cardInfo:h.companyChargeCardInfo.info,isProductVisible:j,isTOSAccepted:ne,isSetupEnabled:re,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:ha}),Ve=h.companyDebitCardInfo?.info!=null&&Je({cardInfo:h.companyDebitCardInfo.info,isProductVisible:R,isTOSAccepted:J,isSetupEnabled:T,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:ha});return re||T?s.jsxs(s.Fragment,{children:[ie==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Ja,{analytics:Q,onLoad:()=>{Q.trackPageLoaded(Ht.Event.cardsListPage),(j&&!re||R&&!T)&&Q.trackCardsPromoView(z,{isCreditCardOffered:j,isDebitCardOffered:R,isDebitCardEnabled:T,isCreditCardEnabled:re},"Banner",R&&!T?"Debit Card":j&&!re?"Credit Card":"","Card List")}}),s.jsx(xa,{showConfetti:Le})]}):null,m===!0?s.jsx(at,{closeDrawerHandler:me,isPaymentDrawerOpen:m,pageName:"Card List",sourcePage:"cardListPage",creditAccountSpentAmount:sa,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isDebitCardInfoFetchStateCompleted:!(R&&T&&Z)||Pe.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!j||de.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!Z||Be.fetchState==="Completed",paymentInitiatedDate:de.initiatedRepaymentDate}):null,s.jsxs(Xr,{children:[s.jsx($e,{isAppContentDrawerOpen:k,handleDrawerToggle:fa}),s.jsx(es,{isCashbackFeatureEnabled:w,isChargeCardFeatureEnabled:j,isDebitCardFeatureEnabled:R,isCreditCardProductVisibleForExpressInterest:O,updatePayNowInfoTooltip:o,showPayNowInfoTooltip:f,creditCardPayNowThreshold:oe,signedInUser:S,chargeCardListState:K,location:r,admins:Ra.users,navigateAndClearBulkSelection:n,currentTenant:h,isCardControlsEnabled:ae,companyChargeCardInfoCreditAccountLimit:h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,isCompanyInterestedInChargeCard:h.companyChargeCardInfo?.info?.isCompanyInterestedInChargeCard??!1,isUserHasCardsAdminLevelAccess:Z,includeCreditAccountDebitSummaryAndCashbackInfo:D,onClickMenuIcon:()=>{fa(!0)},creditLimit:M,isChargeCardSetupEnabled:re,isDebitCardSetupEnabled:T,isEarlyPayEnabled:l,isChargeCardPaymentHistoryFeatureEnabled:_,cashbackRate:x,controllerEmails:z,chargeCardCashbackDetailState:Be,depositAccountListWithDebitCardIssued:Pe,isChargeCardTOSAccepted:ne,isDebitCardTOSAccepted:J,primaryFundingAccountDetails:pa,chargeCardSetUpViewFetchState:we.fetchState,productInformation:ra,creditAccountInformation:ta,debitAccountInformation:na,cashbackInformation:We,isAiCfoAccessEnabled:b,onAskAiCfoClick:g,isCardsCommentingEnabled:F})]})]}):(ne||J)&&Z===!0?s.jsx(ga,{to:"../setup"}):Te||Ve?s.jsx(ga,{to:"../promo"}):s.jsx(la,{fetchState:ie})}const as=e=>`/${e}/cards/new`,ts=e=>`/${e}/cards/payment`,ns=e=>`/${e}/cards/payment-history`,rs=pe(function(e){const t=X.getSignedInUser(),a=ce(e),r=e.tenantState.currentTenantId,n=Ft(e),m={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:r??""},u=a?.companyName??"",f=e.chargeCardPaymentHistoryState.downloadUIState.downloadState;return{fetchState:n.fetchState,filters:n.filters,isZeniTenant:xn(a),repaymentList:n.repaymentHistory,searchText:n.searchText,repaymentHistoryUsers:n.repaymentHistoryUsers,sortConfig:{sortKey:n.uiState.sortKey,sortOrder:n.uiState.sortOrder},downloadParams:{authParams:m,companyName:u,spendManagementEndPoint:`${Ha}/spendManagement`,isShowDeletedBillsEnabled:!1,isShowDeletedReimbursementEnabled:!1},downloadState:f}},function(e,t){const{location:a,navigate:r}=t;return{onBackClick:()=>{const n=ve(a.state?.pathnameStackToGoBack),m=n.poppedPathname??"..";r(m,{state:{pathnameStackToGoBack:n.newStack}})},onColumnSortConfigChanged:(n,m)=>{e({type:"chargeCardPaymentHistory/updatePaymentHistoryUIState",payload:{uiState:{sortKey:n,sortOrder:m}}})},onFiltersChange:n=>{e(Ln({filters:n}))},onReloadPayments:()=>{e(vt(!0))},onSearchTextChanged:n=>{e({type:"chargeCardPaymentHistory/updatePaymentHistorySearchText",payload:n})},updateDownloadStateHandler:n=>{e(Bn({uiState:{downloadState:n}}))}}})(br);function ss(){const e=le(),t=ge(),a=ue(),{areTenantIdsInSync:r}=Vt(),{useFeatureGate:n}=se();if(X.getSignedInUser()==null)throw Error("Can't access payment history page without signing in...");const m=y(q=>ce(q)),u=y(q=>Ft(q)),[f,I]=c.useState(!1),[o,i]=c.useState(!1),[E,S]=c.useState(!1),[h,U]=c.useState(null),v=!m.userRole.includes("charge_card_user"),k=!!m.companyDebitCardInfo?.info?.isDebitCardEnabled,{isFeatureEnabled:C}=n(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:b}=n(Y.isDebitCardFeatureEnabled),g=Se(b,m),d=Ie({isDebitCardFeatureEnabled:b,isBankingOnlyTenant:g}),D=be(m),T=ye(m),V=m.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ae({isCardsOnlyTenant:D,isChargeCardFeatureEnabled:C,isBookKeepingTenant:T,isDebitCardProductVisible:d,chargeCardsCreditAccountLimit:V}),w=!!m.companyChargeCardInfo?.info?.isChargeCardEnabled,H=je(),p=Ue(H?.loggedInUserRoleMap),l=y(q=>Ke(q,v,d&&k,L&&w)),_=c.useMemo(()=>{const q=l.cards.filter(z=>z.type.code.includes("debit"));return[...new Set(q.map(z=>z.connectedAccountId))]},[l.cards]),F=y(q=>Ze(q)),N=y(q=>va(q,_)),{creditAccountRepayment:R}=y(q=>Ye(q)),G=c.useMemo(()=>Xa(p,F),[p,F]),P=c.useMemo(()=>Ca(L,w,p,l.creditAccount,R),[L,w,p,l.creditAccount,R]),B=c.useMemo(()=>et(d,k,p,N,l.debitCardSummary),[d,k,p,N,l.debitCardSummary]),j=c.useMemo(()=>Oe(L,d,k,w),[L,d,k,w]),O=l.creditAccount.balance.amount+l.creditAccount.hold.amount,W=c.useMemo(()=>h!=null?u.repaymentHistory.find(q=>q.cardRepaymentId===h):void 0,[h,u.repaymentHistory]),A=c.useCallback(q=>{U(q),a(Ia(v,d&&k,L&&w,!1)),S(!0)},[a,v,d,k,L,w]),Z=c.useCallback(()=>{S(!1),U(null),document.body.style.overflow="auto"},[]);return c.useEffect(()=>{f||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(I(!0),a(vt()))},[f,a,u.fetchState]),c.useEffect(()=>{!o&&(w||k)&&r&&(i(!0),a(Ia(v,!1,L&&w,!1)))},[o,w,k,r,a,v,L]),s.jsxs(s.Fragment,{children:[E?s.jsx(at,{closeDrawerHandler:Z,isPaymentDrawerOpen:E,pageName:"Payment History",sourcePage:"cardPaymentHistory",creditAccountSpentAmount:O,productInformation:j,creditAccountInformation:P,debitAccountInformation:B,cashbackInformation:G,isDebitCardInfoFetchStateCompleted:!(d&&k&&p)||N.fetchState==="Completed",isCreditCardInfoFetchStateCompleted:!L||R.fetchState==="Completed",isCashbackInfoFetchStateCompleted:!p||F.fetchState==="Completed",paymentInitiatedDate:R.initiatedRepaymentDate,retryRepayment:W}):null,s.jsx(rs,{location:t,navigate:e,accountInfoByAccountId:u.accountInfoByAccountId,onRetryPaymentClick:A})]})}const ct=_e.div`
26
- display: flex;
27
- height: 100vh;
28
- width: 100%;
29
- flex: 1 1 auto;
30
- flex-direction: column;
31
- overflow: auto;
32
- align-items: center;
33
- background-color: ${e=>e.theme.colors.grey4};
34
- `,dt=qa.getLocalizedStrings().months;function os(){const e=le(),t=ue(),a=ge(),{creditAccount:r,creditAccountRepayment:n}=y(P=>Ye(P)),m=`${Nt.cardMicroServiceBaseUrl}/1.0/credit-accounts/${r.id}`,[u,f]=c.useState(!1),[I,o]=c.useState(!1),i=y(P=>Rn(P)),{useFeatureGate:E}=se(),S=y(P=>ce(P)),{isFeatureEnabled:h}=E(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:U}=E(Y.isDebitCardFeatureEnabled),v=Se(U,S),k=Ie({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:v}),C=be(S),b=ye(S),g=S.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,d=Ae({isCardsOnlyTenant:C,isChargeCardFeatureEnabled:h,isBookKeepingTenant:b,isDebitCardProductVisible:k,chargeCardsCreditAccountLimit:g}),D=!!S.companyDebitCardInfo?.info?.isDebitCardEnabled,T=!!S.companyChargeCardInfo?.info?.isChargeCardEnabled,V=y(P=>Ge(P,S.companyId)),L=ze(V.controllers),w=y(P=>xt(P)),H=w.cards.filter(P=>P.type.code.includes("debit")).map(P=>P.connectedAccountId),p=[...new Set(H)],l=y(P=>va(P,p)),_=y(P=>Un(P));c.useEffect(()=>{I||r.fetchState==="Completed"||r.fetchState==="In-Progress"||(f(!0),t($a()))},[u,t,r.fetchState]),c.useEffect(()=>{I||r.fetchState!=="Completed"||r.id==null||i.fetchState==="Completed"||i.fetchState==="In-Progress"||(o(!0),t(On(r.id)))},[I,t,r.fetchState,r.id,i.fetchState]),c.useEffect(()=>{l.fetchState!=="Completed"&&l.fetchState!=="In-Progress"&&k&&D&&t(Bt()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&t(ia()),_.fetchState!=="Completed"&&_.fetchState!=="In-Progress"&&k&&D&&t(jn()),n.fetchState!=="Completed"&&n.fetchState!=="In-Progress"&&d&&T&&t(Ga())},[l.fetchState,k,D,w.fetchState,_.fetchState,n.fetchState,d,T]),c.useEffect(()=>{if(i.fetchState==="Completed"&&r.fetchState==="Completed"&&n.fetchState==="Completed"&&w.fetchState==="Completed"&&(!k||!D||l.fetchState==="Completed"&&_.fetchState==="Completed")){let P="",B="";if(i.statements.length>0){const A=i.statements[i.statements.length-1].period,[Z,q]=A.split("-"),z=i.statements[0].period,[x,oe]=z.split("-");P=`${dt[parseInt(q)-1]} ${Z}`,B=`${dt[parseInt(oe)-1]} ${x}`}const j=Oe(d,k,D,T),O=Ca(d,T,!0,r,n),W=et(k,D,!0,l,_);Q.trackCardsCreditCardStatementsView(L,j,{numberOfStatements:i.statements.length,oldestStatementMonthYear:P,latestStatementMonthYear:B},O,W)}},[i.fetchState,r.fetchState,n.fetchState,l.fetchState,w.fetchState,_.fetchState]);const F=()=>{const P=ve(a.state?.pathnameStackToGoBack),B=P.poppedPathname??"..";e(B,{state:{pathnameStackToGoBack:P.newStack}})},N=y(P=>Ze(P)),R=X.getSignedInUser(),G={userId:R?.userId??"",sessionId:R?.zeniSessionId??"",tenantId:S.tenantId??""};if(R==null)throw Error("Can't access address page without signing in...");if(i.fetchState!=="Completed")return s.jsx(ct,{children:s.jsx(yr,{onBackClick:F})});{const P=Oe(d,k,D,T);return s.jsx(ct,{children:s.jsx(Sr,{currentTenantCompanyName:S.companyName,statementListView:i,productInformation:P,onBackClick:F,authParams:G,controllerEmails:L,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:k,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:T,chargeCardCashbackDetailState:N,creditAccount:r,creditAccountRepayment:n,depositAccountListWithDebitCardIssued:l,debitCardSummary:_,downloadEndPoint:m})})}}const is={containerWidth:new ma(100,58)},cs=({appContent:e})=>{const t=ua(),a=ue(),r=le(),n=ge(),{useDynamicConfig:m}=se(),[u,f]=c.useState(!1),[I,o]=c.useState(!1),[i,E]=c.useState(!1),[S,h]=c.useState(!1),[U,v]=c.useState(!1),[k,C]=c.useState(!1),b=X.getSignedInUser();if(b==null)throw Error("Can't access onboarding card page without signing in...");const g=y(O=>ce(O)),{configValue:d}=m(Fe.zeniCardsConfig),D=y(O=>Nn(O)),{tenantEmailDomain:T}=g,V=y(O=>O.settingsViewState.profile.fetchState),L=y(O=>O.chargeCardListState.fetchState),w=y(O=>O.settingsViewState.profile.userId),H=y(O=>O.chargeCardConfigState.fetchState);c.useEffect(()=>{u===!1&&V!=="In-Progress"&&V!=="Completed"&&(a(Vn()),f(!0)),I===!1&&H!=="In-Progress"&&H!=="Completed"&&(a(Da()),o(!0)),i===!1&&L==="Not-Started"&&(E(!0),a(ia()))},[u,i,L,I,H]),c.useEffect(()=>{V==="Completed"&&U===!1&&w!=null&&L==="Completed"&&D.cards.length>0&&(a(Hn({userId:w})),a(Lt({cardId:D.cards[D.cards.length-1].id})),v(!0))},[V,U,w,L]),c.useEffect(()=>{if(!S&&D.fetchState==="Completed"&&D.cards.length===0){const O=ve(n.state?.pathnameStackToGoBack),W=O.poppedPathname??Ne(T);r(W,{state:{pathnameStackToGoBack:O.newStack}})}},[D.fetchState,D.cards,S]);const p=y(O=>ka(O)),l=Qa(p.updateStatus.fetchState),_=p.currentDisplayedCardId,{useFeatureGate:F}=se(),{isFeatureEnabled:N}=F(Y.isChargeCardFeatureEnabled),R=!!g.companyChargeCardInfo?.info?.isChargeCardEnabled,G=!g.userRole.includes("charge_card_user")&&N&&R,P=y(O=>_!=null?Rt(O.chargeCardState,_):null),B=()=>{_!=null&&(a(Xe(_,G,!0)),a(ia()),h(!0))};c.useEffect(()=>{if(S&&_!=null&&P!=null&&P.status.code!=="request_on_hold"){const O=Ce(g.tenantEmailDomain,_,b,P),W=fe(n.state?.pathnameStackToGoBack,n.pathname);a(Mn()),P?.type.code==="business_virtual_credit_card"&&a(_a()),r(O,{state:{pathnameStackToGoBack:W},replace:!0})}},[S,P?.status.code]),c.useEffect(()=>{l==="In-Progress"&&p.updateStatus.fetchState==="Completed"&&setTimeout(B,3e3)},[l,p.updateStatus.fetchState]);const j=O=>{C(O)};if(!S&&L!=="Completed"||V!=="Completed"||D.cards.length===0)return s.jsxs(lt,{children:[s.jsx($e,{isAppContentDrawerOpen:k,handleDrawerToggle:j}),s.jsx(Ir,{})]});if(w==null)throw Error("Can't access my userId.");return s.jsxs(lt,{children:[s.jsx($e,{isAppContentDrawerOpen:k,handleDrawerToggle:j}),s.jsx(ds,{chargeCardListView:D,cardUserOnboardingView:p,navigate:r,currentTenant:g,myUserId:w,location:n,chargeCardCashbackRatePerTransaction:d.charge_card_cashback_rate_per_transaction!=null?d.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{j(!0)}}),e!=null?s.jsx(ls,{windowSize:t,children:e}):null]})},ds=pe(function(e,{currentTenant:t,cardUserOnboardingView:a,chargeCardListView:r,myUserId:n}){const m=Ke(e,!1,!1,!1);let u=!1;return m.fetchState==="Completed"&&m.cards.length<=1&&(u=!0),{cards:r.cards,showMenuIcon:u,companyLegalName:t.companyName,twoFAView:a.twoFAView,cardUserOnboardingLocalData:a.cardUserOnboardingLocalData??{userId:n},isDOBDisabled:a.isDOBPresent,onboardingProgressStatus:a.onboardingProgressStatus}},function(e,t){const{navigate:a,cardUserOnboardingView:r,location:n,currentTenant:m}=t,{tenantEmailDomain:u}=m;return{updateCardUserOnboardingLocalData:f=>{e(rt({localData:f}))},onGetOtp:f=>{if(r.cardUserOnboardingLocalData!=null){const I={...r.cardUserOnboardingLocalData,phone:f};e(rt({localData:I}))}e(Ta(f,"CardUserOnboarding"))},onResendOtp:f=>{e(wa(f,"CardUserOnboarding"))},onVerifyOtp:(f,I)=>{e(Pa(f,I,"CardUserOnboarding"))},onVerifyOtpSuccess:f=>{e($n()),f!=null&&X.saveZeniOtpToken(f)},setCurrentDisplayedCardId:f=>{e(Lt({cardId:f}))},onBackClick:()=>{const f=ve(n.state?.pathnameStackToGoBack),I=f.poppedPathname??Ne(u);a(I,{state:{pathnameStackToGoBack:f.newStack}})}}})(Ar),ls=_e.div`
35
- display: flex;
36
- flex-direction: column;
37
- width: ${e=>`${is.containerWidth.value(e.windowSize)}%`};
38
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
39
- `,lt=_e.div`
40
- display: flex;
41
- min-height: 100%;
42
- width: 100%;
43
- flex: 1 1 auto;
44
- flex-direction: column;
45
- align-items: center;
46
- background-color: ${e=>e.theme.colors.grey4};
47
- `,us={containerWidth:new ma(100,58)},ms=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ca(),m=ge(),{useDynamicConfig:u,useFeatureGate:f}=se(),[I,o]=c.useState(!1),[i,E]=c.useState(!1),[S,h]=c.useState(!1),[U,v]=c.useState(!1),k=X.getSignedInUser();if(k==null)throw Error("Can't access onboarding card page without signing in...");const C=y(B=>ce(B));if(n==null)throw Error("Empty card id is not valid...");const{configValue:b}=u(Fe.zeniCardsConfig),g=y(B=>Gn(B,n)),{isFeatureEnabled:d}=f(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:D}=f(Y.isDebitCardFeatureEnabled),T=Se(D,C),V=Ie({isDebitCardFeatureEnabled:D,isBankingOnlyTenant:T}),L=be(C),w=ye(C),H=C.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,p=Ae({isCardsOnlyTenant:L,isChargeCardFeatureEnabled:d,isBookKeepingTenant:w,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),l=g.chargeCard,_=y(B=>B.chargeCardConfigState.fetchState);c.useEffect(()=>{I===!1&&_!=="In-Progress"&&_!=="Completed"&&(a(Da()),o(!0)),i===!1&&g.fetchState==="Not-Started"&&(E(!0),a(Xe(n,!1,p)))},[i,g.fetchState,I,_]);const F=l?.type.code==="business_physical_debit_card"||l?.type.code==="business_virtual_debit_card";c.useEffect(()=>{if(g.fetchState==="Completed"){if(S===!1&&(F===!1||F&&l.status?.code!=="active"||F&&l.status.code==="active"&&l.isPinSet||l.cardHolderUserId!==k.userId)){const B=Ce(C.tenantEmailDomain,n,k,l,!0),j=fe(m.state?.pathnameStackToGoBack,m.pathname);r(B,{state:{pathnameStackToGoBack:j}})}else if(S&&g.isRefreshingViewInBackground===!1&&l?.isPinSet===!0){a(zn({chargeCardId:n}));const B=Ce(C.tenantEmailDomain,n,k,l,!0),j=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(B,{state:{pathnameStackToGoBack:j}})}}},[g.fetchState,l?.type.code,S,g.isRefreshingViewInBackground]);const N=X.getZeniOtpTokenForCardHolder(n),R=y(B=>pt(B.userState,k.userId)),G=()=>{l?.isPinSet!==!0&&a(za(n,!0))};c.useEffect(()=>{g.updateDebitCardPinAttemptFetchState.fetchState==="Completed"&&(setTimeout(G,3e3),h(!0))},[g.updateDebitCardPinAttemptFetchState.fetchState]);const P=B=>{v(B)};if(_!=="Completed"||l==null)return s.jsx(la,{fetchState:"In-Progress"});if(R?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(hs,{children:[s.jsx($e,{isAppContentDrawerOpen:U,handleDrawerToggle:P}),s.jsx(Cs,{cardId:n,card:l,phone:R.phone,signedInUser:k,isSandboxEnv:Ka(),debitCardDetailState:g,signedInUserToken:N,navigate:r,currentTenant:C,location:m,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{P(!0)}}),e!=null?s.jsx(ps,{windowSize:t,children:e}):null]})},Cs=pe(function(e,{debitCardDetailState:t,cardId:a}){const r=ht(e,a),n=t.updateStatus,m=Ke(e,!1,!1,!1);let u=!1;return m.fetchState==="Completed"&&m.cards.length<=1&&(u=!0),{showMenuIcon:u,vgsVaultId:Ba.cardVaultId,twoFAView:r,setPinWaitStatus:n}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,debitCardDetailState:u}=t,f=u.chargeCard?.cardProviderID,{tenantEmailDomain:I}=m;return{onGetOtp:o=>{f!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdateDebitCardPinAttempt:o=>{e(It(r,o))},onResendOtp:o=>{f!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{f!=null&&e(Pa(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onSetPinSuccess:()=>{e(Yn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("activate")===!0?Ne(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(Er),ps=_e.div`
48
- display: flex;
49
- flex-direction: column;
50
- width: ${e=>`${us.containerWidth.value(e.windowSize)}%`};
51
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
52
- box-shadow: ${e=>`${Aa.sp0} 2px ${Aa.sp1} ${e.theme.colors.dropShadowNormal}`};
53
- `,hs=_e.div`
54
- display: flex;
55
- min-height: 100%;
56
- width: 100%;
57
- flex: 1 1 auto;
58
- flex-direction: column;
59
- align-items: center;
60
- background-color: ${e=>e.theme.colors.grey4};
61
- box-shadow: ${e=>`${Aa.sp0} 2px ${Aa.sp1} ${e.theme.colors.dropShadowNormal}`};
62
- `,fs={overlayWidth:new ma(Ua[12],Ua[12],Ua[9])},gs=pe(function(e,t){const a=Za(e,!1,!1),r=t.lineId,n=a.customAddress[r],m=a.customAddressStatus[r]??{fetchState:"Not-Started",error:void 0};return{googleAPIKey:t.googleAPIKey,customAddress:n,customAddressStatus:m,lineId:r}},function(e,t){const{newCustomAddressId:a,lineId:r,chargeCardTypeOption:n}=t;return{onSubmitHandler:m=>{a!=null&&e(Ut(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`));const u=jr(m);e(Wn({addressType:`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`,addressToCreate:u})),e(qn(`${n==="creditCard"?"credit":"debit"}_custom_shipping_${r}_address`))},onDismissClick:()=>{t.onDismissClick(),a!=null&&e(Kn({addressId:a,cardLineId:r,cardType:n==="creditCard"?"business_physical_credit_card":"business_physical_debit_card"}))}}})(kr),bs=({lineId:e,closeDrawerHandler:t,chargeCardTypeOption:a})=>{const r=Wa(),n=ua(),m=()=>{t()},u=y(f=>Zn(`${a==="creditCard"?"credit":"debit"}_custom_shipping_${e}_address`,f))?.newAddressId;return s.jsx(Mt,{anchor:"right",open:e.length>0,PaperProps:{style:{minWidth:fs.overlayWidth.valuePercentage(n),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:(f,I)=>(I==="backdropClick"||I==="escapeKeyDown")&&m(),children:s.jsx(gs,{googleAPIKey:Ba.googleMapsAPIKey,onDismissClick:m,lineId:e,chargeCardTypeOption:a,newCustomAddressId:u})})},ys=pe(function(e,t){const{isChargeCardFeatureEnabled:a,isDebitCardFeatureEnabled:r,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:m,isChargeCardSetupEnabled:u,isDebitCardSetupEnabled:f}=t,I=Za(e,a&&u,r&&f);return{issueChargeCards:I,isIssuePhysicalCardEnabled:n,isIssuePhysicalDebitCardEnabled:m,isDebitCardFeatureEnabled:r,isChargeCardFeatureEnabled:a,isChargeCardSetupEnabled:u,isDebitCardSetupEnabled:f,cardHolderCandidates:I.userList.map(o=>o.user).filter(Boolean),allRoles:I.userList.map(o=>o.userRole),allAccountingClasses:I.allAccountingClasses,userList:I.userList}},function(e,t){return{onIssueCardClick:()=>{e(Xn())},onSaveChangesToLocalStore:a=>{e(Jn(a))},onDismissClick:()=>{e(Ot()),t.navigate("../")},resetCustomAddressByLineID:(a,r)=>{e(Ut(`${r==="creditCard"?"credit":"debit"}_custom_shipping_${a}_address`))},openAddAddressDrawerHandler:t.openAddAddressDrawerHandler}})(Pr);function Ss(){const e=X.getSignedInUser(),t=le(),a=ue(),r=Dr(),[n]=ut(),m=n.get("cardType"),{useFeatureGate:u}=se(),{isFeatureEnabled:f}=u(Y.isIssuePhysicalCardEnabled),{isFeatureEnabled:I}=u(Y.isIssuePhysicalDebitCardEnabled),{isFeatureEnabled:o}=u(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:i}=u(Y.isChargeCardFeatureEnabled),E=y(G=>ce(G)),S=Se(o,E),h=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:S}),U=be(E),v=ye(E),k=E.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,C=Ae({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:i,isBookKeepingTenant:v,isDebitCardProductVisible:h,chargeCardsCreditAccountLimit:k}),[b,g]=c.useState(!1);if(e==null)throw Error("Can't access issue card page without signing in...");c.useEffect(()=>{b||(g(!0),a(Qn(h&&D,C&&d,!1)))},[b,g,a]);const d=!!E.companyChargeCardInfo?.info?.isChargeCardEnabled,D=!!E.companyDebitCardInfo?.info?.isDebitCardEnabled,T=y(G=>Za(G,C&&d,h&&D)),V=T.fetchState,L=T.issueCardStatus.fetchState,w=T.lastSelfIssuedDebitCardId,H=y(G=>w!=null?Rt(G.chargeCardState,w):void 0),[p,l]=c.useState(null),[_,F]=c.useState(null),N=()=>{l(null)},R=(G,P)=>{l(G),F(P)};return c.useEffect(()=>{if(L==="Completed"){if(w!=null&&H?.type.code==="business_virtual_debit_card"){let G;G=H?.status.code==="request_on_hold"&&e.userId===H.cardHolderUserId?Yt(E.tenantEmailDomain):Ce(E.tenantEmailDomain,w,e,H),t(G)}else t("../");a(Ot())}},[L,w]),V==="Completed"?s.jsxs(s.Fragment,{children:[p!==null&&_!==null?s.jsx(bs,{closeDrawerHandler:N,lineId:p,chargeCardTypeOption:_}):null,s.jsx(ys,{themeState:r,isIssuePhysicalCardEnabled:f,isIssuePhysicalDebitCardEnabled:I,isDebitCardFeatureEnabled:h,isChargeCardFeatureEnabled:C,isChargeCardSetupEnabled:d,isDebitCardSetupEnabled:D,navigate:t,fetchState:T.fetchState,openAddAddressDrawerHandler:R,defaultCardType:m==="creditCard"||m==="debitCard"?m:void 0})]}):V==="Error"?s.jsx(La,{}):s.jsx(_r,{})}const Is=_e.div`
63
- display: flex;
64
- height: 100vh;
65
- width: 100%;
66
- flex: 1 1 auto;
67
- flex-direction: column;
68
- overflow: auto;
69
- align-items: center;
70
- background-color: ${e=>e.theme.colors.grey4};
71
- `,As=pe(function(e,t){const{myPendingActivationChargeCardListState:a}=t;return{myPendingActivationChargeCardListView:a,uiState:a.uiState,signedInUser:t.signedInUser}},function(e,t){const{navigate:a,currentTenant:r,location:n,signedInUser:m,myPendingActivationChargeCardListState:u}=t,{tenantEmailDomain:f}=r,{cards:I}=u;return{onChargeCardRowClick:o=>{const i=zt(I,o),E=Ce(f,o,m,i),S=fe(n.state?.pathnameStackToGoBack,n.pathname);a(E,{state:{pathnameStackToGoBack:S}})},onColumnSortConfigChanged:(o,i)=>{e(Na({uiState:{sortKey:o,sortOrder:i}}))},onReloadCards:()=>{e(ia())},onBackClick:()=>{const o=r.userRole.includes("charge_card_user");e(Na({uiState:{sortKey:o?"cardName":"owner",sortOrder:"ascending"}})),a("../")}}})(wr);function Es(){const e=le(),t=ue(),a=ge(),r=Wa(),[n,m]=c.useState(!1),u=y(F=>er(F)),f=y(F=>ce(F)),I=y(F=>Ge(F,f.companyId)),o=ze(I.controllers),{useFeatureGate:i}=se(),{isFeatureEnabled:E}=i(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:S}=i(Y.isDebitCardFeatureEnabled),h=Se(S,f),U=Ie({isDebitCardFeatureEnabled:S,isBankingOnlyTenant:h}),v=!!f.companyDebitCardInfo?.info?.isDebitCardEnabled,k=!!f.companyChargeCardInfo?.info?.isChargeCardEnabled,C=je(),b=be(f),g=ye(f),d=f.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=Ae({isCardsOnlyTenant:b,isChargeCardFeatureEnabled:E,isBookKeepingTenant:g,isDebitCardProductVisible:U,chargeCardsCreditAccountLimit:d}),T=Ue(C?.loggedInUserRoleMap),V=y(F=>Ze(F)),{creditAccount:L,creditAccountRepayment:w}=y(F=>Ye(F)),H=y(F=>xt(F)).cards.filter(F=>F.type.code.includes("debit")).map(F=>F.connectedAccountId),p=[...new Set(H)],l=y(F=>va(F,p));c.useEffect(()=>{n||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(m(!0),t(ia()),t(Da()))},[n,t,u.fetchState]),c.useEffect(()=>{if(u.fetchState==="Completed"&&u.cards.length===1&&_!=null){const F=Ce(f.tenantEmailDomain,u.cards[0].id,_,u.cards[0]);e(F,{state:{message:a.state?.message}})}},[u.fetchState,u.cards]);const _=X.getSignedInUser();if(c.useEffect(()=>{L.fetchState!=="Completed"&&L.fetchState!=="In-Progress"&&D&&k&&T&&t($a()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&T&&t(Ga()),l.fetchState!=="Completed"&&l.fetchState!=="In-Progress"&&U&&v&&T&&t(Bt())},[L.fetchState,w.fetchState,t,l.fetchState,U,v,T,D,k]),_==null)throw Error("Can't access address page without signing in...");if(u.fetchState!=="Completed")return s.jsx(la,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}});{const F=Oe(D,U,v,k);return s.jsx(Is,{children:s.jsx(As,{navigate:e,currentTenant:f,signedInUser:_,productInformation:F,myPendingActivationChargeCardListState:u,isChargeCardFeatureEnabled:D,isDebitCardFeatureEnabled:U,isDebitCardSetupEnabled:v,isChargeCardSetupEnabled:k,chargeCardCashbackDetailState:V,creditAccount:L,creditAccountRepayment:w,depositAccountListWithDebitCardIssued:l,controllerEmails:o,location:a})})}}const ks=pe(function(e,t){const{companyId:a,companyLegalName:r}=t;return{chargeCardSetupView:da(e,a),admins:t.adminList,companyLegalName:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-zeni-charge-cards?embed=true"}},function(e,t){const{navigate:a,companyId:r,isCompanyBusinessVerificationAndPaymentSetUpDone:n,isDebitCardSetupEnabled:m,isChargeCardSetupEnabled:u,signedInUser:f,location:I,productInformation:o,isEarlyPayEnabled:i,controllerEmails:E,chargeCardsCreditAccountLimit:S}=t;return{onSetupButtonClick:h=>{if(f!=null&&Q.trackCardsPromoPageClicked("enable cards"),n)switch(Q.trackCardsEnableCardsClick(E,o,"Cards Promo"),h){case"credit":e(Re(r,!0,"charge_cards",i,!1));break;case"debit":e(Re(r,!0,"debit_cards",i,!1));break;case"debit_and_credit":e(S===0?Re(r,!0,"debit_cards",i,!0):Re(r,!0,"charge_cards__debit_cards",i,!1))}else switch(Q.trackCardsSetupCardsClick(E,o,"Cards Promo"),h){case"credit":e(Re(r,!1,"charge_cards",i,!1));break;case"debit":e(Re(r,!1,"debit_cards",i,!1));break;case"debit_and_credit":e(S===0?Re(r,!1,"debit_cards",i,!0):Re(r,!1,"charge_cards__debit_cards",i,!1))}},onBackClick:()=>{const h=ve(I.state?.pathnameStackToGoBack);let U=h.poppedPathname;U==null&&(U=m||u?"..":"../.."),a(U,{state:{pathnameStackToGoBack:h.newStack}})},onLetsGoClick:()=>{a("./onboard")},onSetupChargeCardSuccess:()=>{n?(e(_a()),a("../",{relative:"path"})):a("../setup",{relative:"path"})},onExpressInterestClick:()=>{e(nr(r))}}})(Fr),Ds=()=>{const e=le(),{tenantEmailDomain:t}=ca(),[a]=ut(),r=a.get("cardPromoType"),n=ue(),{useDynamicConfig:m,useFeatureGate:u}=se(),[f,I]=c.useState(!1),{isFeatureEnabled:o}=u(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:i}=u(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:E}=u(Y.isChargeCardFeatureEnabled),{configValue:S}=m(Fe.zeniCardsConfig),h=y(ee=>ce(ee)),U=y(ee=>Ge(ee,h.companyId)),v=ze(U.controllers),k=S.charge_card_cashback_rate_per_transaction!=null?S.charge_card_cashback_rate_per_transaction:.0175,C=ge(),b=X.getSignedInUserTenant(t)?.companyId??h.companyId,g=y(ee=>da(ee,b)),d=g.primaryFundingAccount,D=h.companyBillPayInfo?.info,T=be(h),V=ye(h),L=Se(o,h),w=h.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,H=Ie({isDebitCardFeatureEnabled:o,isBankingOnlyTenant:L}),p=Ae({isCardsOnlyTenant:T,isChargeCardFeatureEnabled:E,isBookKeepingTenant:V,isDebitCardProductVisible:H,chargeCardsCreditAccountLimit:w}),l=Gt({isCardsOnlyTenant:T,isChargeCardFeatureEnabled:E,isBookKeepingTenant:V}),_=H&&p===!1,F=D?.businessVerificationStatus?.code==="verified"&&(_||d?.accType==="depositAccount"||ar(d?.providerVerificationStatus?.code??"")),N=X.getSignedInUser(),R=!!h.companyZeniAccountInfo?.info?.isZeniAccountEnabled,G=!!h.companyChargeCardInfo?.info?.isChargeCardTOSAccepted,P=!!h.company?.companyChargeCardInfo.isChargeCardEnabled,B=!!h.company?.companyDebitCardInfo.isDebitCardEnabled,j=!!h.companyDebitCardInfo?.info?.isDebitCardTOSAccepted,O=ee=>{I(ee)},W=y(ee=>ee.chargeCardSetupViewState.fetchState);if(N==null)throw Error("Can't access Charge Card promo page without signing in...");const A=je(),Z=Ue(A?.loggedInUserRoleMap),q=Ya(A?.loggedInUserRoleMap),[z,x]=c.useState(!1),[oe,ae]=c.useState(!1),[ne,J]=c.useState(!1);c.useEffect(()=>{z===!1&&C.state?.message==="activation"&&x(!0)},[C.state]),c.useEffect(()=>{oe||W!=="Not-Started"||b==null||(ae(!0),n(Fa(b,!0)))},[oe,W,b,n]);const re=h.companyChargeCardInfo?.info!=null&&Je({cardInfo:h.companyChargeCardInfo.info,isProductVisible:l,isTOSAccepted:G,isSetupEnabled:P,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:q}),Ee=h.companyDebitCardInfo?.info!=null&&Je({cardInfo:h.companyDebitCardInfo.info,isProductVisible:H,isTOSAccepted:j,isSetupEnabled:B,isUserHasCardsAdminLevelAccess:Z,isUserHasCardsAccess:q}),xe=H&&Ee&&l&&w>=0&&re?"debit_and_credit":H&&Ee?"debit":"credit",K=Ur(r,xe),he=g?.chargeCardTermsDetails?.fetchStatus?.fetchState,ke=c.useRef(null);c.useEffect(()=>{he==="In-Progress"?ke.current=K:he!=="Error"&&he!=="Not-Started"||(ke.current=null)},[he,K]);const Be=he!=="In-Progress"&&he!=="Completed"||ke.current==null?K:ke.current;c.useEffect(()=>{K==="credit"&&(P||l===!1&&B)||K==="debit"&&B||K==="debit_and_credit"&&B&&P?e("../"):(K==="debit_and_credit"&&G===!0&&j===!0||K==="credit"&&(G===!0||l===!1&&j===!0)||K==="debit"&&j===!0)&&Z===!0&&e("../setup")},[F,P,B,K,G,j]),c.useEffect(()=>{ne||(n(tr("cardAdmin")),J(!0))},[ne]);const Pe=y(ee=>Tt(ee.userState,ee.userRoleState,ee.userListViewState,"cardAdmin")),we=Oe(l,H,B,P);return(re||Ee)&&W==="Completed"?s.jsxs(s.Fragment,{children:[s.jsx(Ja,{analytics:Q,onLoad:()=>{if(Q.trackPageLoaded(Ht.Event.cardsPromoPage),!!l&&!P||!!H&&!B||!!l&&!!H&&!B&&!P){const ee=_s({isDebitCardSetupEnabled:B,isChargeCardSetupEnabled:P,isCreditCardProductVisibleForExpressInterest:l,isDebitCardProductVisible:H});Q.trackCardsPromoView(v,we,"Page",ee,"Promo Page")}}}),s.jsx(xa,{showConfetti:z}),s.jsx($e,{isAppContentDrawerOpen:f,handleDrawerToggle:O}),s.jsx(ks,{signedInUser:N,location:C,showEnableCardButton:F,isCompanyBusinessVerificationAndPaymentSetUpDone:F,isChargeCardSetupEnabled:P,isDebitCardSetupEnabled:B,companyLegalName:h.companyName,adminList:Pe.users,isCheckingEnabled:R,navigate:e,companyId:b,cardPromoType:Be,controllerEmails:v,productInformation:we,isCreditCardProductVisible:p,isDebitCardFeatureEnabled:o,isEarlyPayEnabled:i,cashbackRate:k,chargeCardsCreditAccountLimit:w,onClickMenuIcon:()=>{O(!0)}})]}):s.jsxs(s.Fragment,{children:[s.jsx($e,{isAppContentDrawerOpen:f,handleDrawerToggle:O}),s.jsx(Tr,{})]})},_s=({isDebitCardSetupEnabled:e,isChargeCardSetupEnabled:t,isCreditCardProductVisibleForExpressInterest:a,isDebitCardProductVisible:r})=>a&&r&&!e&&!t?"Credit & Debit Card":a&&!t?"Credit Card":r&&!e?"Debit Card":"";function Qs(){const e=ge(),t=y(W=>ce(W)),{useFeatureGate:a}=se(),{isFeatureEnabled:r}=a(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:n}=a(Y.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=a(Y.isEarlyPayFeatureEnabled),{isFeatureEnabled:u}=a(Y.isChargeCardPaymentHistoryFeatureEnabled),f=Se(n,t),I=Ie({isDebitCardFeatureEnabled:n,isBankingOnlyTenant:f}),o=vr(t,r,n),i=!!t.company?.companyChargeCardInfo.isChargeCardTOSAccepted,E=!!t.company?.companyDebitCardInfo.isDebitCardTOSAccepted,S=!!t.company?.companyChargeCardInfo.isChargeCardEnabled,h=!!t.company?.companyDebitCardInfo.isDebitCardEnabled,U=je(),v=Ue(U?.loggedInUserRoleMap),k=Ya(U?.loggedInUserRoleMap),{isFeatureEnabled:C}=a(Y.isCashbackFeatureEnabled),b=t.userRole.includes("charge_card_user"),g=!b,d=!b&&S,D=t?.userRole!=null&&rr(t?.userRole),T=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!D)&&sr(U?.loggedInUserRoleMap),V=or(U?.loggedInUserRoleMap),L=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!D)&&ir(U?.loggedInUserRoleMap),{isFeatureEnabled:w}=a(Y.isDepositAccountsFeatureEnabled),H=w&&!D&&gt(U?.loggedInUserRoleMap),p=S&&!D,l=h&&!D,_=o&&!D&&Ue(U?.loggedInUserRoleMap),F=cr(U?.loggedInUserRoleMap),N=be(t),R=ye(t),G=t.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,P=Ae({isCardsOnlyTenant:N,isChargeCardFeatureEnabled:r,isBookKeepingTenant:R,isDebitCardProductVisible:I,chargeCardsCreditAccountLimit:G}),B=t.companyChargeCardInfo?.info!=null&&Je({cardInfo:t.companyChargeCardInfo.info,isProductVisible:P,isTOSAccepted:i,isSetupEnabled:S,isUserHasCardsAdminLevelAccess:v,isUserHasCardsAccess:k}),j=t.companyDebitCardInfo?.info!=null&&Je({cardInfo:t.companyDebitCardInfo.info,isProductVisible:I,isTOSAccepted:E,isSetupEnabled:h,isUserHasCardsAdminLevelAccess:v,isUserHasCardsAccess:k}),O=B||j;return s.jsxs(Wt,{children:[v?s.jsx(te,{path:"setup",element:s.jsx(st,{isBillPayAdminLevelAccess:T,isReimbursementAdminLevelAccess:L,isZeniAccountAdminLevelAccess:H,isChargeCardAdminLevelAccess:_,isUserHasOnlyCardAccess:F,isUserHasOnlyBillPayAccess:V,productType:"charge_cards",type:"setup"})}):null,v?s.jsx(te,{path:"verification",element:s.jsx(st,{isBillPayAdminLevelAccess:T,isUserHasOnlyBillPayAccess:V,isReimbursementAdminLevelAccess:L,isZeniAccountAdminLevelAccess:H,isChargeCardAdminLevelAccess:_,isUserHasOnlyCardAccess:F,productType:"charge_cards",type:"verification"})}):null,s.jsx(te,{path:"promo",element:s.jsx(Ds,{})}),p||l?s.jsxs(s.Fragment,{children:[s.jsx(te,{path:"/",element:s.jsx(it,{isPaymentDrawerOpen:!1})}),_&&m?s.jsx(te,{path:"payment",element:s.jsx(it,{isPaymentDrawerOpen:!0})}):null,s.jsx(te,{path:"activate",element:s.jsx(Es,{})}),s.jsx(te,{path:"onboard",element:s.jsx(cs,{})}),v?s.jsx(te,{path:"new",element:s.jsx(Ss,{})}):null,C&&g?s.jsx(te,{path:"cashback",element:s.jsx(Hr,{})}):null,d?s.jsx(te,{path:"statements",element:s.jsx(os,{})}):null,_&&u&&S?s.jsx(te,{path:"payment-history",element:s.jsx(ss,{})}):null,s.jsx(te,{path:":cardId/activate",element:s.jsx(Gr,{})}),s.jsx(te,{path:":cardId/setPin",element:s.jsx(ms,{})}),s.jsx(te,{path:":cardId/addToWallet",element:s.jsx(Nr,{})}),s.jsx(te,{path:":cardId/*",element:s.jsx(Jr,{})}),s.jsx(te,{path:"*",element:s.jsx(La,{})})]}):(i||E)&&v?s.jsx(te,{path:"*",element:s.jsx(ga,{to:"../setup"})}):O?s.jsx(te,{path:"*",element:s.jsx(ga,{to:"../promo",state:e.state})}):s.jsx(te,{path:"*",element:null})]})}export{Qs as default};
@@ -1,11 +0,0 @@
1
- import{j as C}from"./liveblocks-D1TxH59e.js";import{a}from"./sentry-5pTQe3BK.js";import{u as D,g as v,j as u,N as w}from"./core-Fwwp8hop.js";import{Jj as O,eP as j,fo as A,mT as U,fP as h,fn as _,eW as L,Jq as F}from"./zeni-epic-state-i1VxNGkd.js";import{u as P,z as p,L as g,O as $,o as k}from"./index-Sm9Ycasn.js";import{n as H}from"./mui-Dar_oGjJ.js";import{t as z}from"./getLocaleForTenant-B-vHrKHL.js";import{g as R,Q as J}from"./QBOConnectionScreen-DvvmYU71.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";import"./empty-BOxndxwD.js";import"./pdf-lib-oQPUkPP1.js";import"./index-D6xVpTbl.js";import"./url-CfkU6Gnm.js";import"./index-CfQpPMgv.js";import"./decodeURIComponentSafe-DaWuthXc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="d1cb094e-b022-44a6-a38f-561589a663de",t._sentryDebugIdIdentifier="sentry-dbid-d1cb094e-b022-44a6-a38f-561589a663de")}catch{}})();const q=H.div`
2
- display: flex;
3
- flex: 1 1 auto;
4
- flex-direction: row;
5
- justify-content: center;
6
- align-items: center;
7
- width: 100%;
8
- height: 100vh;
9
- background-color: ${t=>t.theme.colors.background};
10
- box-shadow: ${t=>`0px 2px ${k.sp1} ${t.theme.colors.dropShadowNormal}`};
11
- `;function fe(){const t=D(),i=v(),{setLoading:d,clearAllLoading:b}=P(),f=a.useRef(!1),c=a.useRef(!1),{code:x,realmId:T,state:y}=R(i.search),N=x!==""&&T!==""&&y!=="",I=u(l=>O(l)),e=u(l=>j(l)),n=u(l=>l.tenantState.fetchState),r=u(l=>l.tenantState.activeTenantFetchState.fetchState),o=p.getSignedInUser(),m=p.getActiveTenantForUser()?.tenantId,s=e?.externalConnections?.fetchState,E=e?.externalConnections?.saveConnectionState,S=e.externalConnections?.accounting[0]?.isValid;return a.useLayoutEffect(()=>{d(g.CONNECTION_AUTH)},[d]),a.useEffect(()=>{f.current||o==null||m==null||(f.current=!0,n==="Completed"||r!=="Not-Started"&&r!=="Error"||(d(g.TENANT_FETCHING),t(A(o.userId,m))))},[f,n,d]),a.useEffect(()=>{e.tenantId==null&&!c.current&&o!=null&&(c.current=!0,!(m==null||m!=null&&(r==="Completed"||r==="Error"))||n!=="Not-Started"&&n!=="Error"||t(U(o.userId)))},[c,n,r]),a.useEffect(()=>{o==null||e?.tenantId==null||e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||E!=="Error"||(d(g.CONNECTION_AUTH),t(h(o.userId,e.tenantId)))},[E]),a.useEffect(()=>{n!=="Completed"&&r!=="Completed"||o==null||e?.tenantId==null||(t(_(e.tenantId)),p.saveActiveTenantDomainForUser(e.tenantEmailDomain),L(o?.userId,o?.zeniSessionId,e.tenantId),$.updateAppLocaleID(z(F(e))),e.externalConnections!=null||n!=="Completed"&&r!=="Completed"||s==="In-Progress"||o==null||e==null||t(h(o.userId,e.tenantId)))},[n,r,s]),a.useEffect(()=>{I.tenantsCoreDetailsInOrder.length>0&&n==="Completed"&&p.saveSignedInUserTenants(I.tenantsCoreDetailsInOrder)},[I.tenantsCoreDetailsInOrder.length,n]),a.useEffect(()=>{n!=="Completed"&&n!=="Error"||r!=="Completed"&&r!=="Error"||s!=="Completed"&&s!=="Error"||b()},[n,r,s]),e==null||n!=="Completed"&&r!=="Completed"||s!=="Completed"?null:N||S===!1?C.jsx(q,{children:C.jsx(J,{})}):C.jsx(w,{to:"/",replace:!0})}export{fe as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-D1TxH59e.js";import{z as n}from"./index-Sm9Ycasn.js";import{g as d}from"./QBOConnectionScreen-DvvmYU71.js";import"./sentry-5pTQe3BK.js";import{g as p,N as a}from"./core-Fwwp8hop.js";import"./zeni-epic-state-i1VxNGkd.js";import"./recharts-DuOI9Nsb.js";import"./mui-Dar_oGjJ.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";import"./empty-BOxndxwD.js";import"./pdf-lib-oQPUkPP1.js";import"./index-D6xVpTbl.js";import"./url-CfkU6Gnm.js";import"./index-CfQpPMgv.js";import"./decodeURIComponentSafe-DaWuthXc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e53e9b9f-4e1e-4d41-afae-a46e42efc4b3",e._sentryDebugIdIdentifier="sentry-dbid-e53e9b9f-4e1e-4d41-afae-a46e42efc4b3")}catch{}})();const U=()=>{const e=p(),{code:t,realmId:o,state:r}=d(e.search),s=n.getSignedInUser()?.userId??"";if(f(t,o,r,s)===!0){const m=`../../${r}/onboarding?code=${t}&realmId=${o}&state=auth_flow`;return i.jsx(a,{to:m})}return i.jsx(a,{to:"../../"})},f=(e,t,o,r)=>e!=""&&t!=""&&o!=""&&r!=null&&r!="";export{U as default,f as hasValidParams};
@@ -1 +0,0 @@
1
- import{j as i}from"./liveblocks-D1TxH59e.js";import{J as l,s as c,h as f}from"./index-Sm9Ycasn.js";import{D as p}from"./mui-Dar_oGjJ.js";import"./sentry-5pTQe3BK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="33e15337-9daa-4a10-ac68-a7ea0591c1e3",e._sentryDebugIdIdentifier="sentry-dbid-33e15337-9daa-4a10-ac68-a7ea0591c1e3")}catch{}})();const u={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=l(),s=o?.valuePx(a)??u.drawerLeftMargin.valuePx(a),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{h as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-D1TxH59e.js";import{a as d}from"./sentry-5pTQe3BK.js";import{h as B,u as G,g as F,i as K,j as l,N as q,n as L,o as N,p as _}from"./core-Fwwp8hop.js";import{LA as z,eP as O,KZ as R,kD as H,Hz as I,LF as M,Ks as W,jD as Y,HA as S,L2 as $,L3 as V,Ku as Z,Kt as J}from"./zeni-epic-state-i1VxNGkd.js";import{aR as Q,c as U,p as X,m as tt}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import{d as k}from"./decodeURIComponentSafe-DaWuthXc.js";import{w as et}from"./withTransactionSidePanel-Dk7__fUW.js";import{f as at,c as nt}from"./routePaths-Pqm-PNC8.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";import"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import"./TransactionDetailScreen-DioDP0gW.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="f05df252-0378-4766-881b-6646ffd05cf9",a._sentryDebugIdIdentifier="sentry-dbid-f05df252-0378-4766-881b-6646ffd05cf9")}catch{}})();const ot=L(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:Y(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(J("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=B(),o=G(),c=F(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=K(),r=k(j??""),f=k(x??""),p=rt(r,f),v=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=l(n=>O(n).company?.companyInfo.firstMonthOfFY??1),u=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(H(i)))},[m,p,i]);const P=l(n=>n.trendState.fetchState),E=u?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&P==="Completed"&&(D(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,P]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:b(v.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-D1TxH59e.js";import{a as g}from"./sentry-5pTQe3BK.js";import{u as U,g as w,h as _,s as J,j as l,N as T}from"./core-Fwwp8hop.js";import{z as r,h as P,O as M,d as V,c as A,e as N,C as W,B,g as R}from"./index-Sm9Ycasn.js";import{eP as $,Jl as q,Jv as G,Jm as H,eW as K,fn as Q,Jr as X,fL as Y,cT as Z,Jw as ee,Jx as te}from"./zeni-epic-state-i1VxNGkd.js";import{n as ne}from"./mui-Dar_oGjJ.js";import{u as se}from"./useDeviceId-9VsPbMb7.js";import{f as ie}from"./analyticsHelper-CnXSrEd_.js";import{t as ae}from"./getLocaleForTenant-B-vHrKHL.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="23c94b4e-168e-4507-86dc-b48c18502934",t._sentryDebugIdIdentifier="sentry-dbid-23c94b4e-168e-4507-86dc-b48c18502934")}catch{}})();const x=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function xe(){const t=U(),i=w(),f=_(),[k]=J(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&a!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,m)))},[n,p,t,a,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),M.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=R();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,i.state,t]);const O=g.useCallback(()=>{f("/signin/auth")},[f]),j=g.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),F=g.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(W,{phoneNumber:C,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:O});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!x(n,p)||m==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(B,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{xe as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-D1TxH59e.js";import{h as r,n}from"./core-Fwwp8hop.js";import{G as i}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import"./sentry-5pTQe3BK.js";import"./zeni-epic-state-i1VxNGkd.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="b959eae6-68be-4f7c-be9c-c7323a968e13",o._sentryDebugIdIdentifier="sentry-dbid-b959eae6-68be-4f7c-be9c-c7323a968e13")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1,22 +0,0 @@
1
- import{j as s}from"./liveblocks-D1TxH59e.js";import{Kb as te,eP as J,jD as z,e_ as Q,eY as ne,HD as q,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as K,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-i1VxNGkd.js";import{J as pe,$ as X,I as E,z as G,a9 as ue,v as me,ak as ge,al as Re,s as he,o as R,w as fe,O as Ce,am as Oe,U as Ve,Y as Ue,H as Be,c as be,e as Ze,m as $e,an as Ke,k as _e}from"./index-Sm9Ycasn.js";import{D as ye,n as M,S as we}from"./mui-Dar_oGjJ.js";import ae from"./NotFoundScreen-Brpo5hIh.js";import{a as r}from"./sentry-5pTQe3BK.js";import{u as ee,i as He,j as m,h as ze,g as Ge,n as Me,o as se,p as $}from"./core-Fwwp8hop.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import{M as Ye}from"./MobileAppDrawer-n526oWrk.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4f169715-1198-4424-9078-fd75d1e42820",a._sentryDebugIdIdentifier="sentry-dbid-4f169715-1198-4424-9078-fd75d1e42820")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=He(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),L=ne(u),T=q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Qe=M(we)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Se=M(fe.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${a=>a.theme.colors.primary};
10
- word-break: break-word;
11
- `,De=M(fe.LargeRegularSp)`
12
- color: ${a=>a.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,qe={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>z(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Q(f,d),P=ne(d),L=q(d),T=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=M(we)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,aa=Me(function(a,t){const l=le(a),n=G.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function Y({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=Ge(),{areTenantIdsInSync:o}=Ve(),y=G.getSignedInUser(),h=m(e=>J(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Q(O,h)&&V,w=q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[T,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),b=h?.companyId;r.useEffect(()=>{u&&T===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Ye,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(K({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(Y,{})}),s.jsx($,{path:"new",element:s.jsx(Y,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(Y,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-D1TxH59e.js";import E from"./NotFoundScreen-Brpo5hIh.js";import{a as r}from"./sentry-5pTQe3BK.js";import{h as _,g as P,j as p,i as v,u as M,N as U,n as z,o as F,p as h}from"./core-Fwwp8hop.js";import{eP as O,PW as b,bo as B,bn as N,hk as V,gQ as Q}from"./zeni-epic-state-i1VxNGkd.js";import{F as W,z as I,Y,cC as $}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import{M as G}from"./MobileAppDrawer-n526oWrk.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d01ea2bf-f7cd-46d9-8ce4-ea681b3f0d34",e._sentryDebugIdIdentifier="sentry-dbid-d01ea2bf-f7cd-46d9-8ce4-ea681b3f0d34")}catch{}})();const H=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})($),J=()=>{const e=_(),t=P(),c=W(),o=p(a=>O(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=v(),u=M(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,C]=r.useState(!1),S=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=S||k||x,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(G,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(F,{children:[s.jsx(h,{path:"*",element:s.jsx(J,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-D1TxH59e.js";import{a as o}from"./sentry-5pTQe3BK.js";import{j as f,h as L,u as _,g as M,n as V}from"./core-Fwwp8hop.js";import{h as F,J as N,z as R,b9 as U,s as W,U as $,Y as z,H as G,c as l,e as Y,a7 as J,ba as q}from"./index-Sm9Ycasn.js";import{f2 as K,eP as Q,MG as P,MH as X,u8 as Z,t_ as g,f4 as ee,bO as ae,u3 as re,MI as ne}from"./zeni-epic-state-i1VxNGkd.js";import{D as te,e as se,n as oe,S as ie}from"./mui-Dar_oGjJ.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import{M as ce}from"./MobileAppDrawer-n526oWrk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="2b4a5571-17d3-4c77-afa8-caa204fac84c",e._sentryDebugIdIdentifier="sentry-dbid-2b4a5571-17d3-4c77-afa8-caa204fac84c")}catch{}})();const de={overlayWidth:new W(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=F(),n=N();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>K(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx(U,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,I="refer-and-earn-status-update",we=V(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(J(q));function ve({isReferralDrawerOpen:e}){const a=L(),r=_(),n=M(),[i,u]=o.useState(!1),[c,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>Q(t)),m=f(t=>P(t)),y=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),b=X([m,p]),{areTenantIdsInSync:d}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&x===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&y==="Not-Started"&&d&&(u(!0),r(g(!0)))},[y,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(D(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:H,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:b===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,B)=>{B.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[b===!0?s.jsx(G,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:H,onAskAiCfoClick:O,...T})]})}export{ve as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-D1TxH59e.js";import x from"./NotFoundScreen-Brpo5hIh.js";import{a as p}from"./sentry-5pTQe3BK.js";import{h as C,g as I,u as A,j as u,N as D,n as E,o as k,p as c}from"./core-Fwwp8hop.js";import{eP as T,NA as g,NQ as S,D5 as V,Ce as N,D4 as m,CX as U,O4 as _}from"./zeni-epic-state-i1VxNGkd.js";import{h as O,z as $,q as P,a7 as Q,bQ as W,af as q}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DqylTjul.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="b2d5015e-0c9e-4127-8549-0731fa3f158a",e._sentryDebugIdIdentifier="sentry-dbid-b2d5015e-0c9e-4127-8549-0731fa3f158a")}catch{}})();const d="reimbursement-approval-rule-update",z=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(_(!1))},onBackClick:()=>{q(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(Q(W)),B=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),h=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=O(),i=u(n=>g(n)),b=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{b?.updateStatus.fetchState==="Completed"&&a(V())},[b]),p.useEffect(()=>{l||h!=="Not-Started"||(s(!0),a(N(!0)))},[l,h,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,X,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(D,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(z,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(B,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-D1TxH59e.js";import{$ as j,z as w,aN as y,H as E,c as p,e as F,cM as P,I as L}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import l from"./NotFoundScreen-Brpo5hIh.js";import{a as u}from"./sentry-5pTQe3BK.js";import{u as T,j as b,h as V,g as A,n as R,o as U,p as f}from"./core-Fwwp8hop.js";import{eP as z,Qt as C,Nf as Q,Qu as _,u8 as Y,f4 as G,Qv as H,u6 as M}from"./zeni-epic-state-i1VxNGkd.js";import{R as x}from"./ReferralListScreen-D8LbwXaw.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";import"./useAskAiCfoHostNavButtonProps-B40bGqEV.js";import"./MobileAppDrawer-n526oWrk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a9827836-263e-4c27-9508-19b67e93a7f7",e._sentryDebugIdIdentifier="sentry-dbid-a9827836-263e-4c27-9508-19b67e93a7f7")}catch{}})();const O=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(M())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),$=()=>{const e=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=V(),v=A(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),N=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:k}=g(y.zeniAccountsConfig),D=Q(k);u.useEffect(()=>{e(_()),r?.rewardsLastViewedTime==null&&i===!1&&(e(Y()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[m.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:c,location:v,currentTenant:r,companyName:I,userName:N,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:D.maxAnnualPercentageYield})]})};function fe(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx($,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{fe as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-D1TxH59e.js";import{a as n}from"./sentry-5pTQe3BK.js";import{u,g as m,h as p,N as g}from"./core-Fwwp8hop.js";import{z as d,q as b,t as y,c as f,e as h}from"./index-Sm9Ycasn.js";import{fQ as x,fR as I,JJ as w}from"./zeni-epic-state-i1VxNGkd.js";import{n as j}from"./mui-Dar_oGjJ.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="61a8ce2b-2e88-41ba-80a2-ddf407deb5ba",e._sentryDebugIdIdentifier="sentry-dbid-61a8ce2b-2e88-41ba-80a2-ddf407deb5ba")}catch{}})();function U(){const e=u(),t=m(),a=p(),i=n.useRef(!1),c=d.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{d.clearAll(),e(x()),e(I(!1)),w(),y.reset(),f.trackLogout(h.Event.logoutSuccess),f.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=j.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;export{U as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-D1TxH59e.js";import{a as f}from"./sentry-5pTQe3BK.js";import{s as u,u as h,j as b,N as y}from"./core-Fwwp8hop.js";import{JG as I,eW as w,zF as j}from"./zeni-epic-state-i1VxNGkd.js";import{z as l,q as x,v as S,w as v}from"./index-Sm9Ycasn.js";import{n as c}from"./mui-Dar_oGjJ.js";import"./recharts-DuOI9Nsb.js";import"./analytics-D310XSjQ.js";import"./plaid-BGhwh8RZ.js";import"./dnd-B_nt-Uf4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BGeomX3N.js";import"./lexical-D4DqnnDh.js";import"./pdf-BftxTBXg.js";import"./utils-3_hFkWEq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9c63dfb5-e9bd-488b-a08b-6a0ec0570c54",e._sentryDebugIdIdentifier="sentry-dbid-9c63dfb5-e9bd-488b-a08b-6a0ec0570c54")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(j(t,p,i)))},[n,a]),s.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=c.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,E=c(v.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{R as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-D1TxH59e.js";import{a as u}from"./sentry-5pTQe3BK.js";import{h as x,u as j,g as C,i as T,j as p}from"./core-Fwwp8hop.js";import{ID as s,IC as $,OT as v,eP as B,OU as D}from"./zeni-epic-state-i1VxNGkd.js";import{J as P,at as g,h as z,z as E,q as L,c5 as U,p as N}from"./index-Sm9Ycasn.js";import{n as _}from"./mui-Dar_oGjJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6092dcdf-889e-4597-963f-907ebd752d4d",e._sentryDebugIdIdentifier="sentry-dbid-6092dcdf-889e-4597-963f-907ebd752d4d")}catch{}})();const G=_.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;function Z(){const e=x(),n=j(),d=P(),l=C();let{accountId:t}=T(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${t}`;t==null&&l.pathname.includes(`${s}/statements`)&&(t=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=z();u.useEffect(()=>{m||(y(!0),n($(t??"",!1)))},[m,n]);const o=p(a=>v(a,t??"")),I=()=>{const a=N(l.state?.pathnameStackToGoBack),S=a.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:a.newStack}})},r=E.getSignedInUser(),c=p(a=>B(a)),b={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=D(t??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(U,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:f})})}export{Z};
@@ -1 +0,0 @@
1
- import{j as n}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";import"./sentry-5pTQe3BK.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="b6b8e9af-f8bc-404b-b199-bcf35ce4c4cd",e._sentryDebugIdIdentifier="sentry-dbid-b6b8e9af-f8bc-404b-b199-bcf35ce4c4cd")}catch{}})();function r(e){if(e.companyLocaleInfo!=null&&e.companyLocaleInfo.languageCode.length>0&&e.companyLocaleInfo.companyIncCountryCode.length>0){const o=`${e.companyLocaleInfo.languageCode.toLowerCase()}-${e.companyLocaleInfo.companyIncCountryCode.toUpperCase()}`;return console.warn(`localeID ${o}`),n(o)??"en"}return"en"}export{r as t};
@@ -1 +0,0 @@
1
- import{a as b}from"./sentry-5pTQe3BK.js";import{h as u,g,i as h,j as S}from"./core-Fwwp8hop.js";import{eP as y}from"./zeni-epic-state-i1VxNGkd.js";import{T as k,J as C,a as T,X as A,Z as I,m as w,a1 as D}from"./index-Sm9Ycasn.js";import"./mui-Dar_oGjJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e502f19f-50f0-4f06-91f9-4bae9444f699",e._sentryDebugIdIdentifier="sentry-dbid-e502f19f-50f0-4f06-91f9-4bae9444f699")}catch{}})();function j(e){const{mobileExploreReferrer:t}=e,{isAiCfoOpen:n,setIsAiCfoOpen:r}=k(),s=u(),o=g(),{tenantEmailDomain:f}=h(),c=C(),i=D(c),d=T(),m=A(),p=S(a=>a.tenantState.fetchState==="Completed"||a.tenantState.activeTenantFetchState.fetchState==="Completed"?y(a):void 0),l=p?.masterTOSInfo?.isMasterTOSAccepted??!1;return{isAiCfoAccessEnabled:m&&d&&!n,onAskAiCfoClick:b.useCallback(()=>{if(f!=null)if(l)if(i){const a=w(o.state?.pathnameStackToGoBack,o.pathname);s(`/${f}/ai-cfo/explore`,{state:{pathnameStackToGoBack:a,referrer:t}})}else r(!0);else I({location:o,navigate:s,mergeState:{referrer:t}})},[l,i,o,t,s,r,f])}}export{j as u};